query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
2cc3fd66a7b4ea6576c7204bf5aaaa52
Gets a menu by its id or name
[ { "docid": "2db1e07271b0b20f835536505d34fdb3", "score": "0.72678614", "text": "public function menu($nameOrId)\n {\n if (is_int($nameOrId)) {\n return $this->menuById($nameOrId);\n } elseif (is_string($nameOrId)) {\n return $this->menuByName($nameOrId);\n }\n return $nameOrId;\n }", "title": "" } ]
[ { "docid": "473e4023276d610e87bf1d141fc40b20", "score": "0.81468517", "text": "public function getMenuByName($menuName);", "title": "" }, { "docid": "80d0e69c47d02831b2fbe9fd8652bf73", "score": "0.8041776", "text": "public function getMenuById($menuId);", "title": "" }, { "docid": "9995aeab98b34638253f2614e7c68e28", "score": "0.78362477", "text": "public function getMenuItem($id)\n\t{\n\t\treturn $this->find($id);\n\t}", "title": "" }, { "docid": "d52f86170465df684bb1dd4420373318", "score": "0.76494277", "text": "public function getMenu( $name )\r\r\n {\r\r\n if ( isset($this->menus[$name]) )\r\r\n {\r\r\n return $this->menus[$name];\r\r\n }\r\r\n\r\r\n return null;\r\r\n }", "title": "" }, { "docid": "0e4c1c4c3377a9722200bedf2d34ad16", "score": "0.76234597", "text": "public function getMenu($id) {\n\n if (!is_numeric($id)) {\n throw new Zend_Exception(\"menudID is not numeric\");\n }\n\n return $this->find($id)->current();\n }", "title": "" }, { "docid": "0b166268c20fe218a3db020a4303a689", "score": "0.7617115", "text": "public function getMenu($id = '')\n {\n return $this->response(true, (new Menu)->getMenu($id));\n }", "title": "" }, { "docid": "f6f83e473955530393f56a86bc3cd3c2", "score": "0.7591736", "text": "public function get($name)\n {\n return $this->menus->get($name);\n }", "title": "" }, { "docid": "e4fb60f46a2c535dd156fed1443e877b", "score": "0.759028", "text": "public function get_menu($id)\n { \n $data = $this->get_details($id); \n $has_menu = $data[0]['has_menu'];\n if($has_menu)\n {\n return $data[0]['menus'];\n }\n return array(); \n }", "title": "" }, { "docid": "d896973e0798174ec4ff9333421f527f", "score": "0.7495088", "text": "public function getMenuItem($id)\n {\n return $this->getItem($id);\n }", "title": "" }, { "docid": "eb53fef5bdea3eaa6f0a1afbd610aa59", "score": "0.7451079", "text": "public function getMenuItemById(int $id): object;", "title": "" }, { "docid": "8b7ce164d1daa4c0d219b302bdab667b", "score": "0.74412215", "text": "public static function getMenuById($id)\n {\n $menu = self::findOrFail($id);\n return $menu;\n }", "title": "" }, { "docid": "9c152530acd04620e0b3a99dc037a468", "score": "0.74213064", "text": "public function getItem( int $id ) {\n\t\treturn Menu::where( 'id', $id )->first();\n\t}", "title": "" }, { "docid": "2e8626f98e5d20619e70c0cd8c2b6a29", "score": "0.7415902", "text": "public function retrieve($id)\n {\n return MenuItem::find($id);\n }", "title": "" }, { "docid": "d0c7f1c175761b97b5483b99252d463f", "score": "0.7314832", "text": "public function menu($id = '')\n {\n if ('' == $id) {\n return $this->menus;\n }\n\n if (!isset($this->menus[$id])) {\n return false;\n }\n\n return $this->menus[$id];\n }", "title": "" }, { "docid": "a72c8d33b25555ea5310cc9c38c0ce63", "score": "0.72977304", "text": "public function getMenu($name)\n {\n $enabledModuleNames = Engine_Api::_()->getDbtable('modules', 'core')->getEnabledModuleNames();\n\n // Get items\n $table = $this->api()->getDbtable('menuItems', 'core');\n $select = $table->select()\n ->where('menu = ?', $name)\n ->where('module IN(?)', $enabledModuleNames)\n ->order('order ASC');\n\n return $table->fetchAll($select);\n }", "title": "" }, { "docid": "6e523cd6c1bb99478cf785949ce2e229", "score": "0.7269903", "text": "public function get($name)\n {\n return $this->has($name) ? $this->menus[$name] : null;\n }", "title": "" }, { "docid": "12eefacfab62fca10a0cb658cd0cd833", "score": "0.72547716", "text": "public function get_menu_by_id($id){\n\t\t\t$query = $this->db->get_where('module', array('module_id' => $id));\n\t\t\treturn $result = $query->row_array();\n\t\t}", "title": "" }, { "docid": "c79c3cc059bd4643f659507adfbb7b0e", "score": "0.7220044", "text": "public function get($name, array $options = array())\n {\n return $this->manager->getMenu($name, $options);\n \n }", "title": "" }, { "docid": "33ade4bbb495af9b17425880b62f4ce0", "score": "0.71715456", "text": "public static function getMenu($id)\n {\n if (Auth::user()->user_type_id == 1) {\n $result = DB::table('menus')\n ->where('parent_id', $id)->where('menu_status', 1)\n ->orderBy('menu_order', 'ASC')\n ->get();\n } else {\n $result = DB::table('menus')->select('menus.*')\n ->join('user_roles', 'menus.id', '=', 'user_roles.menu_id')\n ->where('parent_id', $id)\n ->where('menu_status', '1')\n ->where('allow_view', '1')\n ->whereNotIn('menus.id', [4])\n ->where('user_type_id', Auth::user()->user_type_id)\n ->orderBy('menu_order', 'ASC')\n ->get();\n }\n return $result;\n\n }", "title": "" }, { "docid": "8e10513bbd6581bb441d3f084fd282b2", "score": "0.7141981", "text": "public function menuById(int $id)\n {\n $menu = $this->resolveMenuCache()->where('id', $id)->first();\n if (is_null($menu)) {\n throw new MenuDoesntExists(\"Couldn't find a menu for id $id\");\n }\n return $menu;\n }", "title": "" }, { "docid": "27472916402e1e957b0ec4ab9887f2f1", "score": "0.7065711", "text": "public function retrieveByMenuId($menuId);", "title": "" }, { "docid": "c3fb40d2594879db1bc7ef1b3c5a937a", "score": "0.70518875", "text": "public function getMenu() {\n $men= new Menu;\n $menu= $men->getMenu();\n if(!is_array($menu)) {\n $this->returnResponse(SUCCESS_RESPONSE,['message'=>'Menu not found']);\n } \n $this->returnResponse(SUCCESS_RESPONSE,$menu); \n\n\n }", "title": "" }, { "docid": "b60b013b7b3b28c10155f306f5a9e5da", "score": "0.7028882", "text": "function get_menu($id){\n\tglobal $db;\n\t$ret = array();\n\tdb_query('SELECT * FROM menu', $ret);\n\t// print_r($ret);\n\tforeach ($ret as $k => $t) {\n\t\techo'\n\t\t\t<li class=\"nav-item\">\n <a class=\"nav-link\" href=\"?id='.$t['plik'].'\">'.$t['tytul'].'</a>\n </li>\n\t\t\t\t';\n\t}\n}", "title": "" }, { "docid": "a1d5780343318d5f11d7d9fd624f74da", "score": "0.69900894", "text": "function getMenuName($id)\n{\n\tglobal $objDB;\n\t$val = '';\n\t$Query = \"select menuName from \".SITE_TABLE_PREFIX.\"menus WHERE id='\".$id.\"' \";\n\t$objDB->setQuery($Query);\n\t$rsTotal = $objDB->select();\n\t\n\tif(count($rsTotal) == 1)\n\t{\n\t\t$val = $rsTotal[0]['menuName'];\n\t}\n\treturn $val;\n}", "title": "" }, { "docid": "b0f8a9e0120d33a30597ff95600e93b7", "score": "0.69722944", "text": "public function show($id)\n {\n return MenuItems::findOrFail($id);\n }", "title": "" }, { "docid": "a3583fd4a69b8d7a239a9e4ec3958235", "score": "0.6873776", "text": "public static function getMenuItemById($id)\n {\n $item = self::findItem($id);\n if ($item instanceof MenuItem) {\n return $item;\n }\n return null;\n }", "title": "" }, { "docid": "e76dbd0e4ccc829680014f6d7395dda5", "score": "0.68703526", "text": "function getMenuItem($menu){\r\n $sql = \"select * from menu\\n\"\r\n . \"where Item_Name = :menu\";\r\n $result = $db ->prepare($sql);\r\n $result -> bindParam(':menu', $menu);\r\n $result -> execute();\r\n $getMenu = $result2->fetch(PDO::FETCH_ASSOC);\r\n return $getMenu;\r\n }", "title": "" }, { "docid": "41ab76f05d546b1499afa51d05ffb005", "score": "0.68666357", "text": "public function getMenuById($id) {\n\t\t$sql = \"SELECT * FROM menu\n \tWHERE kategori_id = :id\";\n \t\t$this->db->query($sql);\n $this->db->bind('id', $id);\n \n return $this->db->resultAll();\n\t}", "title": "" }, { "docid": "a723c2b4f6ae830817095c1c087c2eef", "score": "0.6864136", "text": "public function getMenu()\r\n\t{\r\n\t\tif(is_null($this->menu))\r\n\t\t{\r\n\t\t\t$this->loadXML()->generateMenu();\r\n\t\t}\r\n\t\treturn $this->menu;\r\n\t}", "title": "" }, { "docid": "6ef899c8aadc3bee55cb7e95b7774f21", "score": "0.68500054", "text": "protected function getMenu()\n {\n }", "title": "" }, { "docid": "9e5b77b340f148324eaa06efe59b3abb", "score": "0.68457675", "text": "public static function getMenuById($menuName = NULL, LanguageInterface $language = NULL) {\n if ($menuName && $language) {\n\n // Get the menu Tree.\n $menuTree = \\Drupal::menuTree();\n\n // Set the parameters.\n $parameters = new MenuTreeParameters();\n $parameters->onlyEnabledLinks();\n\n // Load the tree based on this set of parameters.\n $tree = $menuTree->load($menuName, $parameters);\n // Transform the tree using the manipulators you want.\n $manipulators = array(\n // Only show links that are accessible for the current user.\n array('callable' => 'menu.default_tree_manipulators:checkAccess'),\n // Use the default sorting of menu links.\n array('callable' => 'menu.default_tree_manipulators:generateIndexAndSort'),\n );\n $tree = $menuTree->transform($tree, $manipulators);\n\n // Finally, build a renderable array from the transformed tree.\n $menu = $menuTree->build($tree);\n\n $menuItems = [];\n\n if ($menu['#items']) {\n Menu::getMenuItems($menu['#items'], $menuItems, $language);\n }\n\n if (!empty($menuItems)) {\n return $menuItems;\n }\n // Return empty array when no menu items where found.\n return array();\n }\n return new HttpException(t(\"Entity wasn't provided\"));\n }", "title": "" }, { "docid": "c11790258f28d60db536d9f1dc6d28db", "score": "0.6802275", "text": "public function findMenuById(int $id, bool $withItems = false): Menu;", "title": "" }, { "docid": "8e88fb1a2699f7afb2015d5e21ec0015", "score": "0.67956555", "text": "public function getMenu($args)\n {\n $menuId = $args[0];\n\n $helperMapper = new \\Ilch\\Layout\\Helper\\Menu\\Mapper($this->_layout);\n $menuMapper = new \\Admin\\Mappers\\Menu();\n\n $menu = $helperMapper->getMenu($menuMapper->getMenuIdForPosition($menuId));\n\n if (isset($args[1])) {\n return $menu->getItems($args[1]);\n }\n\n return $menu->getItems();\n }", "title": "" }, { "docid": "a7c2c311e5f068266e0c70a0db217ca6", "score": "0.6775356", "text": "public function menuByName(string $name)\n {\n $menu = $this->resolveMenuCache()->where('machineName', $name)->first();\n if (is_null($menu)) {\n throw new MenuDoesntExists(\"Couldn't find a menu for machine name $name\");\n }\n return $menu;\n }", "title": "" }, { "docid": "b4d8720d167992a797d8b0b6a14f17e9", "score": "0.6759602", "text": "function getMenu() {\n $query = \"SELECT menuCategoryID, menuTitle, menuLink FROM Core_Menu\";\n \n $content = $this->handleQuery($query);\n \n return $content;\n }", "title": "" }, { "docid": "437a394478bb29fcb4d0a17986011486", "score": "0.6747232", "text": "function get_menu_by_id($menu_id) {\n global $connection;\n $query = \"SELECT * FROM main_menus WHERE id = {$menu_id} LIMIT 1\";\n $result_set = mysql_query($query, $connection);\n confirm_query($result_set);\n // If no rows are returned, fetch_array will return false\n if($menu = mysql_fetch_array($result_set)) {\n return $menu;\n } else {\n return NULL;\n }\n}", "title": "" }, { "docid": "4ba15a858fd0f0d730e87a583afbe905", "score": "0.67135936", "text": "public function getMenu() {\n\n $sSQL = sprintf(\"SELECT id FROM DOCUMENT_MENU WHERE parent_id = 0 ORDER BY parent_id, the_order\");\n $results = mysql_db::getInstance()->query($sSQL,__FILE__,__LINE__);\n\n if ($results && $results['recordCount'] >= 1) {\n array_pop($results);\n $return = array();\n foreach ($results as $v) {\n $t = new pagemenu();\n if ($t->load($v['id'])) { array_push($return,$t); }\n }\n return $return;\n } else {\n return array();\n }\n\n }", "title": "" }, { "docid": "f2e3595f89fe8e92d9b3cf7aa7ff2ac1", "score": "0.6706597", "text": "public abstract function fetchMenu(Menu $menu);", "title": "" }, { "docid": "0526eec542af27e0090a568390890381", "score": "0.6682425", "text": "public function getMenuItem() {\r\n $criteria = new CDbCriteria;\r\n $criteria->compare('level', 1);\r\n $criteria->order='rank ASC';\r\n return Menu::model()->findAll($criteria);\r\n }", "title": "" }, { "docid": "9a2f9b3112ff7db95a4d3764891635d6", "score": "0.6636932", "text": "public function getMenu()\n\t{\n\t\treturn $menu;\n\t}", "title": "" }, { "docid": "b69054c724989fad8d5b63471d07c487", "score": "0.6626767", "text": "function getMenu() {\n return NULL;\n }", "title": "" }, { "docid": "715f4d04c26df85020065be124ca33bf", "score": "0.66240895", "text": "public static function getMenuItem($menuId){\n\t\t$sql = \"select * from menu_item\nwhere menu_id=$menuId\norder by `order` ASC\";\n\t\t$query = DataBaseHelper::query($sql);\n\t\t$menus = array();\n\t\tforeach($query as $k => $v){\n\t\t\t$menus[$v->menuItemId] = array(\n\t\t\t\t'menuId' => $v->menuId,\n\t\t\t\t'id' => $v->menuItemId,\n\t\t\t\t'link' => $v->link,\n\t\t\t\t'title' => $v->title,\n\t\t\t\t'parentId' => $v->parentId,\n\t\t\t\t'order' => $v->order,\n\t\t\t\t'level' => $v->level,\n\t\t\t\t'icon' => $v->icon,\n 'class' => $v->class,\n\t\t\t\t'type' => $v->type,\n\t\t\t\t'params' => $v->params,\n\t\t\t);\n\t\t}\n\t\t\n\t\t//check have children\n\t\tforeach($menus as $key => $value){\n\t\t\t$menus[$key]['haveChild'] = false;\n\t\t\tforeach($menus as $k => $v){\n\t\t\t\tif($v['parentId'] == $key){\n\t\t\t\t\t$menus[$key]['haveChild'] = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$newMenus = array();\n\t\t$newMenus = ArrayHelper::dequi($newMenus, $menus, 0);\n\t\treturn $newMenus;\n\t}", "title": "" }, { "docid": "e91a802255b82d127e9c977683e30641", "score": "0.66205114", "text": "function get_user_menu($id)\n {\n return $this->db->get_where('user_menu', array('id' => $id))->row_array();\n }", "title": "" }, { "docid": "a66505819f7ab966a83edf349a03ab9d", "score": "0.66152215", "text": "public function get_menu()\n\t{\n\t\t$menu = Menu::find(Input::get('id'));\n\n\t\tif ($menu)\n\t\t{\n\t\t\t$menu->children();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$menu = new Menu();\n\t\t}\n\n\t\treturn array(\n\t\t\t'status' => true,\n\t\t\t'menu' => $menu,\n\t\t);\n\t}", "title": "" }, { "docid": "85f7434472f4a75169ed37cb2f7e6895", "score": "0.6608362", "text": "public function getMenu()\n\t{\n\t\tif (!$this->hasMenu()) {\n\t\t\t$this->setMenu($this->getResource()->getMenu($this));\n\t\t}\n\n\t\treturn $this->getData('menu');\n\t}", "title": "" }, { "docid": "8173ef2a99495991882f79a6991710cb", "score": "0.6596694", "text": "public function getMenu()\n {\n return $this->hasOne(Menu::className(), ['id' => 'menu_id']);\n }", "title": "" }, { "docid": "39e3c91a65fd1d09f1dbc2fd98920634", "score": "0.6590926", "text": "public function getMenu($id = 0)\n {\n if (!empty($id)) {\n $result = $this->where(['id' => $id])->first();\n $result = $result->toArray();\n if (!empty($result['parent'])) {\n $parent_menu = $this->where(['id' => $result['parent']])->select('title')->first();\n $result['parent_name'] = $parent_menu['title'];\n }\n } else {\n $result = [];\n $this->orderBy('id', 'desc')->chunk(100, function ($items) use (&$result) {\n foreach ($items as $item) {\n $result[] = $item->toArray();\n }\n });\n foreach ($result as &$menu) {\n foreach ($result as $value) {\n if ($menu['parent'] == $value['id']) {\n $menu['parent_name'] = $value['title'];\n }\n }\n }\n unset($menu);\n }\n\n return $result;\n }", "title": "" }, { "docid": "1e3368a75284001838ddee7ba74ce297", "score": "0.65657467", "text": "function elgg_get_menu_item($menu_name, $item_name) {\n\tglobal $CONFIG;\n\n\tif (!isset($CONFIG->menus[$menu_name])) {\n\t\treturn null;\n\t}\n\n\tforeach ($CONFIG->menus[$menu_name] as $index => $menu_object) {\n\t\t/* @var \\ElggMenuItem $menu_object */\n\t\tif ($menu_object->getName() == $item_name) {\n\t\t\treturn $CONFIG->menus[$menu_name][$index];\n\t\t}\n\t}\n\n\treturn null;\n}", "title": "" }, { "docid": "8b191ffb89f72d0d074cdf3bf8c674fa", "score": "0.65632915", "text": "public function getMenu()\n {\n return $this->menu;\n }", "title": "" }, { "docid": "8b191ffb89f72d0d074cdf3bf8c674fa", "score": "0.65632915", "text": "public function getMenu()\n {\n return $this->menu;\n }", "title": "" }, { "docid": "baefdbcc02633017b17a1e24bc77b589", "score": "0.6551081", "text": "private function __get_menu_instance()\n {\n $modules = PW\\wire('modules');\n\n if ($modules->isInstalled('MarkupSimpleNavigation')) {\n $menu = $modules->get('MarkupSimpleNavigation');\n } else {\n trigger_error('MarkupSimpleNavigation must be added as a module to use ' . __FUNCTION__ . '()', E_USER_ERROR);\n\n return false;\n }\n\n return $menu;\n }", "title": "" }, { "docid": "ccb9789f9bc2182b8da8de8f5ca9a425", "score": "0.6525385", "text": "public static function menu() {\n\t\treturn self::$menu ? : ( self::$menu = TypeRegistry::get_type( 'Menu' ) );\n\t}", "title": "" }, { "docid": "0a96ca3fd6c8047d76d2e3953cdd5120", "score": "0.6513339", "text": "function get_sub_menu($id)\n {\n return $this->db->get_where('sub_menu', array('id' => $id))->row_array();\n }", "title": "" }, { "docid": "4af3e5ae8928f62d612b03a37ddcc889", "score": "0.6498159", "text": "public function getMenus()\n {\n\n }", "title": "" }, { "docid": "5cef171ffff35146022fee5deed446d3", "score": "0.64867777", "text": "public function getMenu()\n {\n return $this->hasOne(Menus::className(), ['menuId' => 'menuId']);\n }", "title": "" }, { "docid": "ab694c8fe15b09972804fa38706721d1", "score": "0.64782476", "text": "public function get_index()\n\t{\n\t\treturn Menu::menus();\n\t\treturn ($id = Input::get('id')) ? Menu::find($id) : Menu::menus();\n\t}", "title": "" }, { "docid": "48c1f2f12d8e908ecc87bfd7ed405fe5", "score": "0.64627457", "text": "public function show($id)\n {\n $menu = $this->repository->find($id);\n return $this->response()->item($menu, new WechatMenuTransformer());\n }", "title": "" }, { "docid": "0f203fb318f96f9211f8875f63524167", "score": "0.6428541", "text": "public function getName($which){\n foreach ($this->data as $record){\n if ($record['id'] == $which){\n return $record['menu'];\n }\n }\n return null;\n\t}", "title": "" }, { "docid": "57452ab3eda4af154a3f447cf6b6273b", "score": "0.6421598", "text": "public function getMenuItems($id = 0)\n {\n if ($id) {\n return $this->getItems($id);\n } else {\n return $this->getDefaultMenu();\n }\n }", "title": "" }, { "docid": "6e2d7b872e6f291f76d777d30de25755", "score": "0.64212674", "text": "public function getMenu() {\n\t\treturn $this->menu;\n\t}", "title": "" }, { "docid": "6bb8f97f7f89cbc8919769339567376f", "score": "0.6417564", "text": "function genererMenu()\n\t{\n $aMenu = getMenuItems();\n return $aMenu;\n\t}", "title": "" }, { "docid": "dcf1b0e38dba5b1d0fb7dc440a25e832", "score": "0.6410478", "text": "public function getMenu()\n {\n return $this->getElement('Admin menu');\n }", "title": "" }, { "docid": "cadbfe76c5c307ae3d6889b6fbbd26b9", "score": "0.6389736", "text": "public function get(string $name, array $options = []): ItemInterface\n {\n return $this->knpMenuAdapter->createMenu($name, $options);\n }", "title": "" }, { "docid": "87e0dc9dc1824ad3db69727259b5f4a2", "score": "0.63783616", "text": "public function retrieveByMenuId($menuId)\n {\n return MenuItem::whereMenuId($menuId)->orderBy('lft', 'asc')->get();\n }", "title": "" }, { "docid": "426d7bdb7e51451bd8c077db744a420d", "score": "0.63561356", "text": "public function get_menu($type)\n {\n $this->db->where('type = \"'.$type.'\"');\n $this->db->join('menu_type', 'menu_type.id_menu_type = menu.id_menu_type', 'left');\n $this->db->order_by('sort', 'ASC');\n $menus = $this->db->get('menu')->result_array();\n\n return $this->get_nestable_menu($menus);\n }", "title": "" }, { "docid": "92d73a060bcf33ee285a3f6377d4987c", "score": "0.63207334", "text": "public function getIdMenu()\n {\n return $this->id_menu;\n }", "title": "" }, { "docid": "f6cbcaf1ec7f1adcf2d29277fe76e9b7", "score": "0.6317407", "text": "private function get_menu($group_id) {\n // $sql = sprintf('SELECT * FROM %s WHERE %s = %s ORDER BY %s, %s', MENU_TABLE, MENU_GROUP, $group_id, MENU_PARENT, MENU_POSITION);\n return $this->where(MENU_GROUP, '=', $group_id)->orderBy(MENU_PARENT)->orderBy(MENU_POSITION)->get()->toArray();\n }", "title": "" }, { "docid": "bf8683f154090415464128d2a44cd0a8", "score": "0.63096225", "text": "public function createMenu();", "title": "" }, { "docid": "78b3c495089062e9397d1e4fc624ed2a", "score": "0.62958497", "text": "private function get_menu() {\n\t\t$items = $this->main_menu();\n\n\t\t$this->load->library(\"multi_menu\");\n\t\t$this->multi_menu->set_items($items);\n\n\t\t$this->load->library(array('layout', 'multi_menu'));\n\n\t\t$config[\"nav_tag_open\"] = '<ul class=\"mainnav\">';\t\t\n\t\t$config[\"parent_tag_open\"] = '<li class=\"dropdown\">';\t\t\t\n\t\t$config[\"children_tag_open\"] = '<ul class=\"dropdown-menu\">';\n\t\t$this->multi_menu->initialize($config);\n }", "title": "" }, { "docid": "8aae069d06c30205b0566451d5c58414", "score": "0.6279633", "text": "private function getMenuItem($nodeId=null){\n \t\n \t$permissao = $this->request->session()->read('permissao');\n \tif(!$permissao) return \"\";\n \t \n \t\n \t$sistema = $this->request->session()->read('sistema');\n \tif(!$sistema) return \"\";\n \t\n \t$menus = TableRegistry::get('Base.Menus');\n \t \n \t\n \t// Templates para montar os itens de menu:\n \t//$templateRoot = '<div class=\"collapse navbar-collapse\" id=\"bs-example-navbar-collapse-1\"><ul class=\"nav navbar-nav\">'.\"\\n{INNER}\\n\".'</ul></div>'.\"\\n\";\n \t$templateMenu = '<li class=\"dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\">'.\"\\n{NAME}\\n\".' <span class=\"caret\"></span></a> <ul class=\"dropdown-menu\">'.\"\\n{INNER}\\n\".'</ul></li>'.\"\\n\";\n \t$templateItem = '<li class=\"\"><a href=\"{URL}\">{NAME}</a></li>'.\"\\n\";\n \t\n \t$atual = false;\n \tif($nodeId)\n \t\t$atual = $menus->get($nodeId, ['contain'=>['Acoes']]);\n \t// busca os itens\n \t$conditions = ['Menus.parent_id IS NULL', 'Menus.ativo'=>true, 'Menus.sistema_id'=>$sistema['id']];\n \tif($nodeId)\n \t\t$conditions = ['Menus.parent_id'=>$nodeId, 'Menus.ativo'=>true,'Menus.sistema_id'=>$sistema['id']];\n \t\n \t$filhos = $menus->find('all', ['conditions'=>$conditions, 'order'=>'Menus.lft', ]);\n// \t\tdebug($filhos->count());\n \t// Escolhe o template: raiz, sub-menu, item de menu\n \t$thisTemplateNode = \"\";\n \tif($nodeId){\n\t \tif($filhos->isEmpty()){\n\t \t\t$thisTemplateNode = $templateItem;\n\t \t}\n\t \telse {\n\t \t\t$thisTemplateNode = $templateMenu;\n\t \t}\n\t \t$thisTemplateNode = str_replace('{NAME}', $atual->descricao, $thisTemplateNode);\n\t \t\n\t \t$url = \"#\";\n\t \t\n\t \t/* Faz a verificacao do controle de acesso do menu */\n\t \tif($atual->acao_id){\n\t \t\t//debug($atual);\n\t \t\tif(!$this->menuHasPermission($atual->acao_id)) return \"\";\n\t \t\t$url = Router::url([ 'plugin'=>($atual->acao->prefix ? $atual->acao->prefix : NULL),'controller'=>$atual->acao->controller, 'action'=> $atual->acao->action]);\n\t \t}\n\t \tif($atual->action){\n\t \t\t$url = $atual->action;\n\t \t}\n\t \t\n\t \t$thisTemplateNode = str_replace('{URL}', $url, $thisTemplateNode);\n\t \t\n \t}\n \t$return=\"\";\n \tforeach ($filhos as $menuItem){\n \t\t$return .= $this->getMenuItem($menuItem->id);\n \t}\n \tif($thisTemplateNode)\n \t\t\t$return = str_replace('{INNER}', $return, $thisTemplateNode);\n \t\t \t\n \treturn $return;\n \t\n }", "title": "" }, { "docid": "beb732afa858de0c32f8f0cfc928c48e", "score": "0.6275647", "text": "public function show($id)\n {\n \t$menu=Menu::find($id);\n \treturn json_encode($menu);\n }", "title": "" }, { "docid": "1e5b44d7d4ecc087ddc0bdbace348b13", "score": "0.62646985", "text": "public function get_menus() {\n $result = DataObject::get('CustomMenuHolder');\n return $result;\n }", "title": "" }, { "docid": "16606cbb865db3dce2870f9bf2438a1d", "score": "0.6258609", "text": "public function get_menu()\n {\n // Markers\n add_menu_page(\n 'Pinezki',\n 'Pinezki',\n 'read',\n self::MENU_SLUG_MARKERS,\n [&$this, 'get_markers_page_content'],\n 'dashicons-post-status',\n 26\n );\n add_submenu_page(\n self::MENU_SLUG_MARKERS,\n 'Pinezka',\n 'Dodaj nową',\n 'read',\n 'marker-edit',\n [&$this, 'get_marker_edit_page_content']\n );\n\n if (get_option('pinezka_ak_enable_teams') || current_user_can('edit_users')) {\n // Teams\n add_menu_page(\n 'Zespoły',\n 'Zespoły',\n 'read',\n self::MENU_SLUG_TEAMS,\n [&$this, 'get_teams_page_content'],\n 'dashicons-groups',\n 27\n );\n add_submenu_page(\n self::MENU_SLUG_TEAMS,\n 'Zespół',\n 'Dodaj nowy',\n 'read',\n 'team-edit',\n [&$this, 'get_team_edit_page_content']\n );\n }\n add_submenu_page(\n self::MENU_SLUG_TEAMS,\n 'Ustawienia zespołów',\n 'Ustawienia',\n 'edit_users',\n 'team-settings',\n [&$this, 'get_team_settings_page_content']\n );\n }", "title": "" }, { "docid": "ba3019a8a630671541bbec89b86be725", "score": "0.6257461", "text": "public function getMenuTitle();", "title": "" }, { "docid": "a9a2fec9d7241c8f9f6ca6daaf1793c9", "score": "0.62529325", "text": "public function loadByMenuID($id) {\n $sSQL = sprintf(\"SELECT page_id FROM PAGE_MENU WHERE id = %d\",$id);\n $results = mysql_db::getInstance()->query($sSQL,__FILE__,__LINE__);\n\n if ($results) {\n return $this->load($results[0]['page_id']);\n }\n \n return false;\n \n }", "title": "" }, { "docid": "8956a883b3874dd340b6c71d4e5fa8ba", "score": "0.624858", "text": "public function getMenu($naam)\n\t{\n\t\tif (empty($naam)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->cache->get($this->createCacheKey($naam), function () use (\n\t\t\t$naam\n\t\t) {\n\t\t\ttry {\n\t\t\t\t$root = $this->getMenuRoot($naam);\n\n\t\t\t\tif ($root == null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t$this->getExtendedTree($root, true);\n\n\t\t\t\t// Voorkom dat extendedTree updates doorvoert\n\t\t\t\t$this->_em->clear(MenuItem::class);\n\n\t\t\t\treturn $root;\n\t\t\t} catch (EntityNotFoundException $ex) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "e7861aa0ff1bb3845a4cd30fc76c3340", "score": "0.6231596", "text": "public function getFreemenuSideMenuItem($id)\n {\n $sidemenu = SideMenu::where('main_id', $id)->where('is_deleted', 0)->where('is_active', 1)->first();\n if ($sidemenu) {\n return json_decode($sidemenu->items);\n }\n }", "title": "" }, { "docid": "13246088cdbf11af67105f33fad4088e", "score": "0.6188781", "text": "public function getMenuName(){\n\t\treturn $this->menuName;\n\t}", "title": "" }, { "docid": "098eebeb8f253f289b4bc0a34a630623", "score": "0.6180509", "text": "public function getMenu()\n {\n if (!$this->menu) {\n\n /**\n * This event is triggered to collect all available admin menu items. Subscribe to this event if you want\n * to add one or more items to the Piwik admin menu. Just define the name of your menu item as well as a\n * controller and an action that should be executed once a user selects your menu item. It is also possible\n * to display the item only for users having a specific role.\n *\n * Example:\n * ```\n * public function addMenuItems()\n * {\n * MenuAdmin::getInstance()->add(\n * 'MenuName',\n * 'SubmenuName',\n * array('module' => 'MyPlugin', 'action' => 'index'),\n * Piwik::isUserIsSuperUser(),\n * $order = 6\n * );\n * }\n * ```\n */\n Piwik::postEvent('Menu.Admin.addItems');\n }\n return parent::getMenu();\n }", "title": "" }, { "docid": "79e06f013cecae2aea460568f91ec0c3", "score": "0.61757714", "text": "public function show($id)\n {\n try {\n $menu = Menu::find($id);\n return response()->json([\n 'status' => true,\n 'code' => 200,\n 'data' => $menu,\n ]);\n } catch (\\Throwable $th) {\n return $this->errorMessage($th, 404);\n }\n }", "title": "" }, { "docid": "09a74b3f777b37391177b5bd6c1128dd", "score": "0.6164963", "text": "public function get_menu_item($group_id)\n\t{\n\t\t$this->db->select('id,title,parent_id');\n\t\t$this->db->where('group_id',$group_id);\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() > 0 ) {\n\t\t\treturn $query->result();\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8338e1d6c684b85e07057e24f7f9dcf4", "score": "0.615736", "text": "private function getMenu($menuName)\n {\n $menu = null;\n foreach ($this->menuProviders as $menuProvider) {\n $menu = $menuProvider->getMenu($menuName);\n\n if ($menu) {\n break;\n }\n }\n\n if (!$menu) {\n throw new MenuException(\"Menu $menuName does not exists.\");\n }\n\n return $menu;\n }", "title": "" }, { "docid": "d96aeefd5e03607223fbca07a58e9482", "score": "0.61515534", "text": "function getMenu($args = \"\")\n{\n global $PagesInMenu;\n global $PagesAccess;\n\n // GRAPHIC STUFF\n $menu = \"<div id=\\\"menu\\\"><h3 id=\\\"titleSec\\\">\" . myhtmlentities(_('Functionalities')) . \"</h3><ul>\\n\";\n foreach($PagesInMenu as $id => $link)\n {\n $menu .= \"<li>\" . \"<a href=\\\"\" . $link . $args . \"\\\">\" . myhtmlentities(_($id)) . \"</a></li>\\n\";\n }\n $menu .= \"</ul></div>\\n\";\n // GRAPHIC STUFF\n\n return $menu;\n}", "title": "" }, { "docid": "fcc727958cfe4364552a6ee6b72da776", "score": "0.61459535", "text": "public function getMenuName() : string {\n return $this->menuName;\n }", "title": "" }, { "docid": "359e42ccf4e7cf356093163cae0933cb", "score": "0.61439407", "text": "function selectByIdpa_menu($menu_id){\n\t\t\t$this->connection = Connection::getinstance()->getConn();\n\t\t\t$PreparedStatement = \"SELECT menu_id, nombre, descripcion, link, menu_padre_id, area_id, es_padre, exclusivo, complemento, posicion, tab, \n (SELECT nombre FROM pa_menu WHERE menu_id = pa_menu_tmp.menu_padre_id) AS menu_padre \n FROM pa_menu AS pa_menu_tmp WHERE menu_id = \".Connection::inject($menu_id).\" ;\";\n\t\t\t$ResultSet = mysql_query($PreparedStatement,$this->connection);\n\t\t\tlogs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);\n\n\t\t\t$elem = new pa_menuTO();\n\t\t\twhile($row = mysql_fetch_array($ResultSet)){\n\t\t\t\t$elem = new pa_menuTO();\n\t\t\t\t$elem->setMenu_id($row['menu_id']);\n\t\t\t\t$elem->setNombre($row['nombre']);\n\t\t\t\t$elem->setDescripcion($row['descripcion']);\n\t\t\t\t$elem->setLink($row['link']);\n\t\t\t\t$elem->setMenu_padre_id($row['menu_padre_id']);\n\t\t\t\t$elem->setArea_id($row['area_id']);\n\t\t\t\t$elem->setEs_padre($row['es_padre']);\n\t\t\t\t$elem->setExclusivo($row['exclusivo']);\n\t\t\t\t$elem->setComplemento($row['complemento']);\n\t\t\t\t$elem->setPosicion($row['posicion']);\n $elem->setMenu_padre($row['menu_padre']);\n $elem->setTab($row['tab']);\n\t\t\t}\n\t\t\tmysql_free_result($ResultSet);\n\t\t\treturn $elem;\n\t\t}", "title": "" }, { "docid": "c74d3ddb5ac4e3cbdd5a2ee17e07a7dd", "score": "0.61361235", "text": "function pleroma_get_info_nav( $location_id ) {\n $locations = get_registered_nav_menus();\n $menus = wp_get_nav_menus();\n $menu_locations = get_nav_menu_locations();\n if (isset($menu_locations[ $location_id ])) {\n foreach ($menus as $menu) {\n if ($menu->term_id == $menu_locations[$location_id]) {\n return $menu;\n break;\n }\n\n }\n\n }\n}", "title": "" }, { "docid": "872e3f2dc041db45c3472e0fa6226053", "score": "0.6134763", "text": "public function getMenu($chave) {\n $menu = $this->actionsMenu();\n\n for ($i = 0; $i < count($menu); $i++) {\n if (array_key_exists(\"items\", $menu[$i])) {\n $menu[$i][\"active\"] = $this->isAllItemsSubmenus($menu[$i][\"items\"]);\n }\n }\n\n $item = $this->getItemMenu($menu, $chave);\n\n return $item;\n }", "title": "" }, { "docid": "6fdcacd93d2088cc1180868ff28b11fb", "score": "0.6133141", "text": "public function menu($name, &$menu) {\r\n switch ($name) {\r\n case 'admin':\r\n $menu->{'wysiwyg'} = t('Editor');\r\n $menu->{'wysiwyg'}->order = 200;\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "3baf078e9b607d53b39a025440286f7c", "score": "0.61204016", "text": "function getMenuCategory($id) {\n $query = \"SELECT Core_MenuCategory.menuCategoryID, Core_MenuCategory.categoryName, Core_MenuCategory.imageFolderPath\n FROM Core_MenuCategory\n WHERE Core_MenuCategory.menuCategoryID = '$id'\";\n \n $content = $this->handleQuery($query);;\n \n return $content;\n }", "title": "" }, { "docid": "d3699235bc73b615e3ed6b78a8f6ab48", "score": "0.6119022", "text": "public function getMenu($res_id){\n\t\t$this->db->select('res.*,ht.menu_name');\n\t\t$this->db->from(RESTAURANT_MENU.\" as res\");\n\t\t$this->db->join(MENU.\" as ht\", \"ht.id = res.menu_id\");\n\t\t$this->db->where('restaurant_id',$res_id);\n\t\t$this->db->where('ht.is_active',1);\n\t\t$this->db->where('ht.is_deleted',0);\n\t\t$query = $this->db->get();\t\t\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "1e7802db4fefa2f0d28bf24e2dd569b9", "score": "0.6098268", "text": "public static function menu_item() {\n\t\treturn self::$menu_item ? : ( self::$menu_item = TypeRegistry::get_type( 'MenuItem' ) );\n\t}", "title": "" }, { "docid": "031461c0da614e4e866f330edd123b5f", "score": "0.6091703", "text": "public function show($id)\n {\n return response()->json(array('data' => Menu::find($id)));\n }", "title": "" }, { "docid": "4bd21d92f82b43c9c6ed0c2ac5392331", "score": "0.6091642", "text": "public static function getMenuByTag($tag){\n\n $menus=self::getMenus();\n if(isset($menus[$tag])){\n return $menus[$tag];\n }\n return null;\n }", "title": "" }, { "docid": "e5ae3183aad8c108f93a07b6600e51be", "score": "0.6087911", "text": "public function get($menu, array $path = array())\n {\n return $this->helper->get($menu, $path);\n }", "title": "" }, { "docid": "3a4ed343c9e8769133cc309bb6160d3f", "score": "0.6084434", "text": "public function get_menu($type = 'side menu')\n {\n // Privilage\n $this->CI->db->where('id_groups', null);\n $this->CI->db->join('groups_menu', 'groups_menu.id_menu = menu.id_menu', 'left');\n $this->CI->db->select('menu.id_menu');\n $menu_all = $this->CI->db->get('menu');\n foreach ($menu_all->result() as $new_menu_all) {\n $id_menu[] = $new_menu_all->id_menu;\n }\n\n if ($this->CI->ion_auth->logged_in()) {\n $this->CI->db->where('user_id', $this->CI->ion_auth->user()->row()->id);\n $this->CI->db->join('groups_menu', 'groups_menu.id_groups = users_groups.group_id', 'right');\n $this->CI->db->group_by('id_menu');\n $this->CI->db->select('id_menu');\n $groups = $this->CI->db->get('users_groups');\n foreach ($groups->result() as $groups) {\n $id_menu[] = $groups->id_menu;\n }\n }\n\n $where_type = 'type = \"'.$type.'\"';\n if (is_array($id_menu)) {\n $where_privilage = 'id_menu in ('.implode(',', $id_menu).') and ';\n } else {\n $where_privilage = null;\n }\n $this->CI->db->where($where_privilage.$where_type);\n $this->CI->db->join('menu_type', 'menu_type.id_menu_type = menu.id_menu_type', 'left');\n $this->CI->db->order_by('sort', 'ASC');\n $this->CI->db->order_by('label', 'ASC');\n $menus = $this->CI->db->get('menu');\n\n return $this->menus($menus->result_array());\n }", "title": "" }, { "docid": "496e873678155c3a4ddd5a1e2ba13db0", "score": "0.60833806", "text": "public static function get_menu_obj( $slug ) {\n\t\t\t$menus = wp_get_nav_menus();\n\t\t\t\n\t\t\tforeach ( $menus as $menu ) {\n\t\t\t\tif ( $menu->slug == $slug ) {\n\t\t\t\t\treturn $menu;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "c346e2b88546d147aafa65a1571e2a2f", "score": "0.6081172", "text": "public function getMenu(): ItemInterface\n {\n return $this->menu;\n }", "title": "" }, { "docid": "baca271400f7401245b3053ef6a4fc45", "score": "0.6068442", "text": "function Get_Restaurent_Menu($restaurant_menu_id = '') {\n if (isset($restaurant_menu_id) && $restaurant_menu_id != '') {\n $objDb = new dbModel();\n $sql = \"SELECT name from tbl_restaurant_menu_product where id='$restaurant_menu_id'\";\n return $objDb->run($sql);\n }\n}", "title": "" }, { "docid": "7b3526c1b2c76e82667d00169c5720d8", "score": "0.6053159", "text": "function retrieve_directory_path_from_menu($id=-2){\n\t\t$this->directories=Array();\n\t\t$num_occurs = count($this->menu_structure);\n\t\tif ($num_occurs==0){\n\t\t\t$this->load_menu();\n\t\t\t$num_occurs = count($this->menu_structure);\n\t\t}\n\t\tfor($i=0;$i<$num_occurs;$i++){\n\t\t\tif ($id == $this->menu_structure[$i][\"IDENTIFIER\"]){\n\t\t\t\treturn $this->retrieve_directory_path($this->menu_structure[$i][\"DIRECTORY\"]);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "dafb23256a18a371f8cb0fe648ab9562", "score": "0.6043932", "text": "public function getMenu()\n {\n if ($this->_erfurt->getAc()->isActionAllowed('ModelManagement')) {\n $editMenu = new OntoWiki_Menu();\n $editMenu->setEntry('Create Knowledge Base', $this->_config->urlBase . 'model/create');\n }\n\n $viewMenu = new OntoWiki_Menu();\n $session = new Zend_Session_Namespace(_OWSESSION);\n if (!isset($session->showHiddenGraphs) || $session->showHiddenGraphs == false) {\n $viewMenu->setEntry('Show Hidden Knowledge Bases', array('class' => 'modellist_hidden_button show'));\n } else {\n $viewMenu->setEntry('Hide Hidden Knowledge Bases', array('class' => 'modellist_hidden_button'));\n }\n\n // build menu out of sub menus\n $mainMenu = new OntoWiki_Menu();\n\n if (isset($editMenu)) {\n $mainMenu->setEntry('Edit', $editMenu);\n }\n $mainMenu->setEntry('View', $viewMenu);\n\n return $mainMenu;\n }", "title": "" } ]
6aab6b41776f0b7693cee2fffd37fbad
Add option page to the Faqs menu
[ { "docid": "1423a4e9602411f075c8e8b4fd2573d3", "score": "0.0", "text": "function import_page() {\n\t// add top level menu page\n\tadd_submenu_page(\n\t\t'edit.php?post_type=faq',\n\t\t'FAQ Import',\n\t\t'Import',\n\t\t'publish_posts',\n\t\t'import',\n\t\t'\\CCL\\Faqs\\import_page_html'\n\t);\n}", "title": "" } ]
[ { "docid": "bbb08777011b50d89c17362d7da12389", "score": "0.78639233", "text": "public function addOptionsPage() {\n add_action( 'admin_menu', [$this, 'defineOptionsPage']);\n }", "title": "" }, { "docid": "f5808b7097de393d18ffc7b1cd08d018", "score": "0.775998", "text": "public function defineOptionsPage() {\n\n add_options_page(\n __( $this->pageArguments['page_title'], 'textdomain' ), // Page Title\n __( $this->pageArguments['menu_title'], 'textdomain' ), // Menu Title\n $this->pageArguments['capability'], // Capability\n $this->pageArguments['unique_page_slug'], // ! Menu slug !\n [$this, 'outputOptionsPage'] // Callback to render form\n );\n\n }", "title": "" }, { "docid": "b7941cadca9ba7678f3a972828ba1934", "score": "0.7638094", "text": "public function add_menu_page()\n {\n add_options_page('Kml Options', 'Kml Options', 'administrator', __FILE__, array('resources\\php\\KmlOptions', 'display_options_page'));\n }", "title": "" }, { "docid": "556740004875b975f11852fc3212bae6", "score": "0.762372", "text": "function asideshop_create_options_page()\n{\n\tadd_options_page('AsideShop', 'AsideShop', 9, basename(__FILE__), 'asideshop_conf');\n}", "title": "" }, { "docid": "4bd748ec7d5deab281009ce8fd6ba1d0", "score": "0.7610572", "text": "function finance_questionnaire_menu(){\n add_options_page( 'Finance Questionnaire Options', 'Finance Questionnaire', 'manage_options', 'finance-questionnaire', 'finance_questionnaire_options' );\n}", "title": "" }, { "docid": "6d78adc3556fe289eb29fccf6af73c25", "score": "0.7607", "text": "function admin_menu() {\n\t\tif ( function_exists( 'add_options_page' ) ) {\n\t\t\tadd_options_page( __( 'flickr Photostream Options', MFP_TEXT_DOMAIN ), __( 'flickr Photostream', MFP_TEXT_DOMAIN ), 8, basename( __FILE__ ), array( &$this, 'build_optionsPage' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "232c3514bb8ab8c6908e220b5f4baaa6", "score": "0.75876117", "text": "public function optionsPage() {\n\t\t$title = CS()->common()->properTitle();\n\t\tadd_options_page( $title, $title, 'manage_options', 'cornerstone', array( $this, 'renderOptionsPage' ) );\n\t}", "title": "" }, { "docid": "150732a70a243bafd8ae1cf2d25f4c8b", "score": "0.75669235", "text": "public function add_options_page() {\n\t\t$this->plugin_screen_hook_suffix = add_options_page(\n\t\t\t__( 'Vaasco Blogcast', 'vaasco' ),\n\t\t\t__( 'Vaasco Blogcast', 'vaasco' ),\n\t\t\t'manage_options',\n\t\t\t$this->plugin_name,\n\t\t\tarray( $this, 'display_options_page' )\n\t\t);\n\t}", "title": "" }, { "docid": "d0bd5e959f9af2c265915aaeb135cd3e", "score": "0.7478309", "text": "function options_pages() \n\t{\n\t\t$options = get_option('wpvq_settings');\n\t\t$allow_subscribers = (isset($options['checkbox_allow_subscribers']));\n\t\t\n\t\tadd_menu_page('WP Viral Quiz', 'WP Viral Quiz', ($allow_subscribers) ? 'read':'edit_posts', 'wp-viral-quiz', array('WPVQInitController', 'init_page_admin'), 'dashicons-forms');\n\t\tadd_submenu_page( 'wp-viral-quiz', __('Settings', 'wpvq'), __('Settings', 'wpvq'), 'manage_options', 'wp-viral-quiz-settings', 'wp_viral_quiz_options_page' );\n\t\tadd_submenu_page( 'wp-viral-quiz', __('Players', 'wpvq'), __('Players', 'wpvq'), 'edit_posts', 'wp-viral-quiz-players', array('WPVQInitController', 'init_page_admin_players') );\n\t\tadd_submenu_page( 'wp-viral-quiz', __('Awesome Addons', 'wpvq'), __('Awesome Addons', 'wpvq'), 'manage_options', 'wp-viral-quiz-addons', array('WPVQInitController', 'init_page_admin_addons') );\n\t}", "title": "" }, { "docid": "f9f62359570d96b563a3a6002c45923b", "score": "0.7459055", "text": "public function add_options_page() {\n\t\t\t$this->options_page = add_options_page( $this->title, $this->title, 'manage_options', $this->key, [ $this, 'admin_page_display' ] );\n\t\t}", "title": "" }, { "docid": "24b98b2f456c66bcc51d703f8c6b1875", "score": "0.7410524", "text": "function create_options_page() {\n\tadd_menu_page(\n\t\t__( 'Relative Sharer', 'relative-sharer' ),\n\t\t__( 'Relative Sharer', 'relative-sharer' ),\n\t\t'manage_options',\n\t\t'relative-sharer',\n\t\t__NAMESPACE__ . '\\\\output_options_page',\n\t\t'dashicons-screenoptions'\n\t);\n}", "title": "" }, { "docid": "11a44daed52e7871ce09348cdb5b6683", "score": "0.74046355", "text": "function options_page() {\n add_options_page('Comeet Settings', 'Comeet', 'manage_options', 'comeet', array($this, 'handle_options'));\n }", "title": "" }, { "docid": "6b18d44fe1ef03d92f941ad3c348b545", "score": "0.74034464", "text": "public function add_options_page() {\n\t\t\n\t\t\n\t\t$this->options_page = add_submenu_page( \n\t\t\t'tools.php', \n\t\t\t$this->title, \n\t\t\t$this->title, \n\t\t\t'manage_options', \n\t\t\t$this->key, \n\t\t\tarray( $this, 'admin_page_display' )\n\t\t);\n\t\t\n\t\tadd_action( \"load-$this->options_page\", array( $this, 'screen_option' ), 10 );\n\t\tadd_action( \"load-$this->options_page\", array( $this, 'init_list' ), 10 );\t\t\n\t\t\n\t\t// Include CMB CSS in the head to avoid FOUC\n\t\tadd_action( \"admin_print_styles-{$this->options_page}\", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );\n\t}", "title": "" }, { "docid": "5b5e80132cb8d7c4ae7a818facedb590", "score": "0.73835504", "text": "function pu_theme_menu()\n\t\t{\n\t\t\tadd_theme_page( 'Veebilehe välimus', 'Veebilehe välimus', 'manage_options', 'pu_theme_options.php', 'pu_theme_page'); \n\t\t}", "title": "" }, { "docid": "dbde68dc2ee3687a9320bf80c7d37895", "score": "0.737435", "text": "public function option_page() {\n\t\tglobal $catpdf_templates,$catpdf_data;\n // Set options\n $data['options'] = $catpdf_data->get_options();\n // Get templates\n $data['templates'] = $catpdf_templates->get_template();\n // Display option form\n $this->view(CATPDF_PATH . '/includes/views/options.php', $data);\n }", "title": "" }, { "docid": "def25ddd3468d82214d5478368cff465", "score": "0.73686993", "text": "function option_menu ( )\n {\n if ( function_exists ( 'add_options_page' ) && (self::get_plugin_object() instanceof BMLTPlugin) )\n {\n add_options_page ( self::$local_options_title, self::$local_menu_string, 9, basename ( __FILE__ ), array ( self::get_plugin_object(), 'admin_page' ) );\n }\n elseif ( !function_exists ( 'add_options_page' ) )\n {\n echo \"<!-- BMLTPlugin ERROR (option_menu)! No add_options_page()! -->\";\n }\n else\n {\n echo \"<!-- BMLTPlugin ERROR (option_menu)! No BMLTPlugin Object! -->\";\n }\n }", "title": "" }, { "docid": "bbbf3f319412ea457c146f41b9627196", "score": "0.73439205", "text": "function faviroll_menu() {\r\n\t\tadd_submenu_page('link-manager.php', __('Faviroll', 'faviroll'), __('Faviroll', 'faviroll'), 'manage_options', basename(__FILE__), 'faviroll_option_page');\r\n\t}", "title": "" }, { "docid": "c2b392e32ebc3f6599dca3fcd3932a08", "score": "0.7334126", "text": "function menu() {\n\t\t$this->page_name = add_options_page( __( 'Image Sizes', 'add-image-size' ), __( 'Image Sizes', 'add-image-size' ), 'edit_posts', __CLASS__, array( $this, 'page' ) );\n\t}", "title": "" }, { "docid": "8de6d5bced8e7f6d98561999c3b88f2c", "score": "0.73337346", "text": "public static function pictator_menu()\n {\n \tadd_options_page( 'Pictator Settings', 'Pictator', 'manage_options', 'pictator-settings', array('Pictator', 'pictator_settings') );\n }", "title": "" }, { "docid": "0f9de0aa8c6003230a4ac88151164dec", "score": "0.72934747", "text": "function googanalytics_theme_options_add_page() {\n\t\t$theme_page = add_submenu_page(\n\t\t\t'options-general.php', // parent slug\n\t\t\t'Google Analytics', // Label in menu\n\t\t\t'Google Analytics', // Label in menu\n\t\t\t'edit_theme_options', // Capability required\n\t\t\t'googanalytics_theme_options', // Menu slug, used to uniquely identify the page\n\t\t\t'googanalytics_theme_options_render_page' // Function that renders the options page\n\t\t);\n\t}", "title": "" }, { "docid": "16f1a54738efa732e8dd3a2466c4af39", "score": "0.7288642", "text": "function add_a_test_menu_page() {\n\t\t// used to create in the function acf_add_options_page() \n\t\t$page_title = 'Test Options Page';\n\t\t$menu_title = 'Test Options Page';\n\t\t$capability = 'edit_posts';\n\t\t// choose a menu postions that you know will not be changed\n\t\t$position = '75.374981';\n\t\t\t// set the page slug, do not let it be generated\n\t\t\t// or you may not be able to find it to remove\n\t\t$menu_slug = 'test-options-page';\n\t\t$callback = '';\n\t\t$icon = 'dashicons-warning';\n\t\tadd_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon, $position);\n\t}", "title": "" }, { "docid": "67726e190a9d39bbd63c4c4dd783ddfa", "score": "0.72764605", "text": "function yarp_admin_menu(){\n\t// add_options_page();\n}", "title": "" }, { "docid": "26d7ea5d4e7702fd4967197b3c932436", "score": "0.72704613", "text": "function _options_page(){\n\t\tif($this->args['page_type'] == 'submenu'){\n\t\t\tif(!isset($this->args['page_parent']) || empty($this->args['page_parent'])){\n\t\t\t\t$this->args['page_parent'] = 'themes.php';\n\t\t\t}\n\t\t\t$this->page = add_submenu_page(\n\t\t\t\t\t\t\t$this->args['page_parent'],\n\t\t\t\t\t\t\t$this->args['page_title'], \n\t\t\t\t\t\t\t$this->args['menu_title'], \n\t\t\t\t\t\t\t$this->args['page_cap'], \n\t\t\t\t\t\t\t$this->args['page_slug'], \n\t\t\t\t\t\t\tarray(&$this, '_options_page_html')\n\t\t\t\t\t\t);\n\t\t}else{\n\t\t\t$this->page = add_menu_page(\n\t\t\t\t\t\t\t$this->args['page_title'], \n\t\t\t\t\t\t\t$this->args['menu_title'], \n\t\t\t\t\t\t\t$this->args['page_cap'], \n\t\t\t\t\t\t\t$this->args['page_slug'], \n\t\t\t\t\t\t\tarray(&$this, '_options_page_html'),\n\t\t\t\t\t\t\t$this->args['menu_icon'],\n\t\t\t\t\t\t\t$this->args['page_position']\n\t\t\t\t\t\t);\n\t\t}//else\n\n\t\tadd_action('admin_print_styles-'.$this->page, array(&$this, '_enqueue'));\n\t\tadd_action('load-'.$this->page, array(&$this, '_load_page'));\n\t}", "title": "" }, { "docid": "e7bbbb131c29f45e667ab16db3169372", "score": "0.7261333", "text": "function pexeto_add_options_menu() {\r\n\t\tglobal $pexeto;\r\n\r\n\t\tadd_menu_page(\r\n\t\t\tPEXETO_THEMENAME,\r\n\t\t\tPEXETO_THEMENAME,\r\n\t\t\t'edit_theme_options',\r\n\t\t\tPEXETO_OPTIONS_PAGE,\r\n\t\t\tarray( $pexeto->options_manager, 'print_options_page' ),\r\n\t\t\t'none' );\r\n\r\n\t\tadd_submenu_page(\r\n\t\t\tPEXETO_OPTIONS_PAGE,\r\n\t\t\tPEXETO_THEMENAME.' Options',\r\n\t\t\tPEXETO_THEMENAME.' Options',\r\n\t\t\t'edit_theme_options',\r\n\t\t\tPEXETO_OPTIONS_PAGE,\r\n\t\t\tarray( $pexeto->options_manager, 'print_options_page' ) );\r\n\t}", "title": "" }, { "docid": "3bcec643bd884a01ae773dc526610ea0", "score": "0.72524023", "text": "public function add_menu_item()\n {\n // This page will be under \"Settings\"\n add_options_page(\n 'Social Media Settings',\n 'Social Media Links',\n 'manage_options',\n 'social-setting-admin',\n [$this, 'create_admin_page']\n );\n }", "title": "" }, { "docid": "f043fd8930a10052b8d05491692cce8e", "score": "0.7238995", "text": "function adminMenu(){\n\t\tadd_options_page( __( 'Inline Attachments', \"inlineattachments\" ), __( 'Inline Attachments', \"inlineattachments\" ), 'level_10', basename(__FILE__), array($this, 'optionsPage') );\n\t}", "title": "" }, { "docid": "457e00699ef5408ac14efd5d9a15ece5", "score": "0.72219795", "text": "function posk_add_options_page() {\r\n\tadd_options_page('Flashcard Settings Page', 'Flashcard', 'manage_options', __FILE__, 'posk_render_form');\r\n}", "title": "" }, { "docid": "60e7d47c970dad0f8e2d8c7ab82a865e", "score": "0.7195089", "text": "function wsp_add_options_page() {\n\tif (function_exists('add_options_page')) {\n\t\t$page_title = __('AtoZ Sitemap Page', 'AtoZ_sitemap');\n\t\t$menu_title = __('AtoZ Sitemap Page', 'AtoZ_sitemap');\n\t\t$capability = 'administrator';\n\t\t$menu_slug = 'AtoZ_sitemap';\n\t\t$function = 'wsp_settings_page'; // function that contain the page\n\t\tadd_options_page( $page_title, $menu_title, $capability, $menu_slug, $function );\n\t}\n}", "title": "" }, { "docid": "36e19766f69c39e790b1c781e206eafe", "score": "0.7173402", "text": "function osbcs_options_page() {\n add_options_page(\n\t'One Stop Background Color Shop!', \n\t'One Stop Background Color Shop', \n\t'manage_options', \n\t'one-stop-bg-color-shop', \n\t'osbcs_option_page_html'\n );\n}", "title": "" }, { "docid": "21188a5d3e3ed041a0b826098693725b", "score": "0.71702784", "text": "function honyb_add_options_page() {\n add_options_page(__('Honyb Setting'), __('Honyb Settings'), 'manage_options', __FILE__, 'honyb_render_form');\n}", "title": "" }, { "docid": "2aa38950fb8a5e4dfdd903a9d29e9bc9", "score": "0.71676356", "text": "public function imgix_add_options_link() {\n\t\tadd_options_page( 'imgix', 'imgix', 'manage_options', 'imgix-options', [ $this, 'imgix_options_page' ] );\n\t}", "title": "" }, { "docid": "38db3840fc083ba64e03794afae0c3cd", "score": "0.71573865", "text": "public function add_options_page() {\r\r\n\t\t$this->options_page = add_menu_page( \r\r\n $this->title, // page_title\r\r\n $this->title, // menu_title\r\r\n 'manage_options', // capability\r\r\n $this->key, // menu_slug\r\r\n array( $this, 'admin_page_display' ), // function\r\r\n 'dashicons-phone' // icon_url\r\r\n );\r\r\n \r\r\n\t\t// Include CMB CSS in the head to avoid FOUC\r\r\n\t\tadd_action( \"admin_print_styles-{$this->options_page}\", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );\r\r\n\t}", "title": "" }, { "docid": "7555970ae2c3831831e8382cb1b78b63", "score": "0.71466756", "text": "function twfy_options_page() {\n add_submenu_page(\n 'options-general.php',\n 'TheyWorkForYou',\n 'TheyWorkForYou',\n 'manage_options',\n 'twfy',\n 'twfy_options_page_html'\n );\n}", "title": "" }, { "docid": "56849141f8a78be967ae2b12395a4db3", "score": "0.7145295", "text": "function restaurant2_options() {\n // (Page Title, Menu Title, user right, menu slug, function yg akan communicate dgn function ini, icon, posisi)\n add_menu_page('Restaurant', 'Restaurant Options', 'administrator', 'restaurant2_options', 'restaurant2_adjusment', '', 20);\n\n // Add Sub menu\n // (Parent, page title, menu title, user right, menu slug, function that's going to executed )\n add_submenu_page('restaurant2_options', 'Reservations', 'Reservations', 'administrator', 'restaurant2_reservations', 'restaurant2_reservations');\n\n}", "title": "" }, { "docid": "dcb8d94f673f27c990ca9ea41df5f35e", "score": "0.71433425", "text": "function HW_register_options_page() {\n\tadd_menu_page('Hashtag Wall Settings', 'Hashtag Wall', 'manage_options', 'hashtag-wall', 'HW_options_page');\n}", "title": "" }, { "docid": "e02956089075394fbd6a0f6e9708656f", "score": "0.7142789", "text": "public static function add_menu() {\n\t\tadd_options_page( 'Posts Importer', 'Posts Importer', 'manage_options', 'tlspi_plugin', array( 'the_la_source_importer', 'tlspi_initiate_page' ) );\n\t\n\t}", "title": "" }, { "docid": "fbb0200bac144fba8643fe68fb7b2f03", "score": "0.71246386", "text": "function create_theme_options_page() {\n add_menu_page('Opcje admina', 'Opcje admina', 'administrator', __FILE__, 'build_options_page');\n}", "title": "" }, { "docid": "dcd0e9faf669277e0379a19c6c343624", "score": "0.7124336", "text": "function cprogressive_theme_menu() {\n add_theme_page( 'Theme Option', 'Theme Options', 'manage_options', 'cprogressive_theme_options.php', 'cprogressive_theme_page');\n}", "title": "" }, { "docid": "aabe8f7de40d5236babdd7da9e60b602", "score": "0.71228147", "text": "public function add_theme_options_page() {\n add_menu_page(__('Showthemes', 'dxef'), __('Showthemes', 'dxef'), 'manage_options', 'ef-options', array($this, 'theme_options_callback'), 'http://www.showthemes.com/ads/logo_mini.png');\n add_submenu_page('ef-options', __('Theme Options', 'dxef'), __('Theme Options', 'dxef'), 'manage_options', 'ef-options', array($this, 'theme_options_callback'));\n add_submenu_page('ef-options', __('More Themes', 'dxef'), __('More Themes', 'dxef'), 'manage_options', 'ef-other-themes', array($this, 'theme_otherthemes_callback'));\n }", "title": "" }, { "docid": "c0bf64e3aeee6ffd315141ef705cabc0", "score": "0.7119218", "text": "function register_main_admin_option(){\r\n\t\t\t\t\r\n\t\t\t\t// add the hook to create admin option\r\n\t\t\t\t$page = add_menu_page($this->setting['page_title'], $this->setting['menu_title'], \r\n\t\t\t\t\t$this->setting['role'], $this->setting['menu_slug'], \r\n\t\t\t\t\tarray(&$this, 'create_admin_option'), \r\n\t\t\t\t\t$this->setting['icon_url'], $this->setting['position']); \r\n\r\n\t\t\t\t// include the script to admin option\r\n\t\t\t\tadd_action('admin_print_styles-' . $page, array(&$this, 'register_admin_option_style'));\t\r\n\t\t\t\tadd_action('admin_print_scripts-' . $page, array(&$this, 'register_admin_option_script'));\t\t\t\r\n\t\t\t}", "title": "" }, { "docid": "1f54bcf6299f22935d952f20708f42e3", "score": "0.71191204", "text": "function _tw_settings_menu() {\n add_options_page( __( $this->name, $this->tag ), __( $this->name, $this->tag ), 'manage_options', 'tw-plugin-options', array( $this, '_tw_render_plugin_options' ) );\n }", "title": "" }, { "docid": "0e434d795b2f289e17796168c478cfef", "score": "0.7112837", "text": "function theme_options_add_page() {\n\t\tadd_theme_page('Optionen', 'Optionen', 'edit_theme_options', 'theme-optionen', 'kb_theme_options_page' ); // Seitentitel, Titel in der Navi, Berechtigung zum Editieren (http://codex.wordpress.org/Roles_and_Capabilities) , Slug, Funktion \n\t}", "title": "" }, { "docid": "10f16c7a8c8bdaae3a34178b69aac81c", "score": "0.7106437", "text": "function register_options_page()\n{\n\tif(function_exists('acf_add_options_page')) {\n\n\t\tacf_add_options_page(array(\n\t\t\t'page_title' => 'Site Options',\n\t\t\t'menu_title' => 'Site Options',\n\t\t\t'menu_slug' => 'theme-general-settings',\n\t\t\t'capability' => 'edit_posts',\n\t\t\t'redirect' => false\n\t\t));\n\n\t}\n}", "title": "" }, { "docid": "335ccdcaaaccb930de19d9c9aec6b934", "score": "0.70991355", "text": "function gkl_settings_menu() {\n\tadd_options_page(__('Post Avatar Options', 'gklpa'), 'Post Avatar', 'manage_options', basename(__FILE__), 'gkl_settings_form');\n}", "title": "" }, { "docid": "ee07dd516b5e157cbe5e354066ec21aa", "score": "0.7095696", "text": "function sic_add_options_page() {\n\tadd_options_page('Sharing is Caring Options Page', 'Sharing is Caring', 'manage_options', __FILE__, 'sic_render_form');\n}", "title": "" }, { "docid": "69efa83cddad45fa0fd8471d196d6a75", "score": "0.7092289", "text": "public function add_options_page()\n {\n $this->options_page = add_menu_page($this->title, $this->title, 'manage_options', $this->key,\n array($this, 'adminPageDisplay'));\n // Include CMB CSS in the head to avoid FOUC\n add_action(\"admin_print_styles-{$this->options_page}\", array('CMB2_hookup', 'enqueue_cmb_css'));\n }", "title": "" }, { "docid": "0338bb754a9eba3723d5ebeb3c483098", "score": "0.7078304", "text": "function weather_add_pages() {\r\n add_options_page('Weather', 'Weather', 'administrator', 'weather', 'weather_options_page');\r\n}", "title": "" }, { "docid": "1daf60545da4c85416e70fa7d92cb194", "score": "0.707758", "text": "public function page_menu () {\n\t\t$settings_page = add_options_page( 'Enable Multi-Site', 'Enable Multi-Site', 'manage_options', 'enable-multi-site', array( &$this, 'admin_settings_page' ) );\n\t}", "title": "" }, { "docid": "b7baeb0729d8c319e30ac12f5de8d92c", "score": "0.70670915", "text": "function hook_options_page() {\r\n\t\tif ( function_exists('add_options_page') ) {\r\n\t \t\t$plugin_page = add_options_page( $this->options_title, $this->options_title, 8, basename(__FILE__), array( $this, 'hook_options_subpanel') );\r\n\t\t\tadd_action( 'admin_head-'. $plugin_page, array( $this, 'hook_admin_head' ) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d6873a29379b0b42113ce2c518cb5952", "score": "0.705537", "text": "function paws_photoswipe_theme_options_add_page() {\n\t\t$theme_page = add_submenu_page(\n\t\t\t'upload.php', // parent slug\n\t\t\t'Photo Galleries', // Label in menu\n\t\t\t'Photo Galleries', // Label in menu\n\t\t\t'edit_theme_options', // Capability required\n\t\t\t'paws_photoswipe_theme_options', // Menu slug, used to uniquely identify the page\n\t\t\t'paws_photoswipe_theme_options_render_page' // Function that renders the options page\n\t\t);\n\t}", "title": "" }, { "docid": "dc9891010738d984ef9ae59659d1460d", "score": "0.7048164", "text": "function baidu_sitemap_menu() {\n /** Add a page to the options section of the website **/\n if (current_user_can('manage_options')) \t\t\t\t\n \t\tadd_options_page(\"Baidu-Sitemap\",\"Baidu-Sitemap\", 8, __FILE__, 'baidu_sitemap_optionpage');\n}", "title": "" }, { "docid": "1d4e0d9d83256dceb64e8510f41f2a1a", "score": "0.70438933", "text": "function page() {\n add_options_page(\n __( 'Uploads', 'uploads' ),\n __( 'Uploads', 'uploads' ),\n 'administrator',\n 'uploads',\n array( __CLASS__, 'page_body' )\n );\n }", "title": "" }, { "docid": "26e01b39e66b13ef7520c7730534cf0b", "score": "0.704185", "text": "public function nptv_build_menu(){\n\n\n add_menu_page( \n NPTV_NAME, \n NPTV_NAME, \n $this->capability, \n NPTV_SLUG, \n array($this,'nptv_easy_options_page'), \n plugins_url( 'nptv-easy/src/assets/logo_menu.jpg', NPTV_DIR), \n 6);\n\n // add_options_page(\n // $this->plugin_meta['name'] . 'Plugin', \n // $this->plugin_meta['name'] , \n // 'manage_options', \n // $this->plugin_meta['slug'], \n // array( $this, 'nptv_easy_options_page') \n // );\n }", "title": "" }, { "docid": "8271c7d2ea80c7e9105f5dece943b327", "score": "0.70358515", "text": "function dfcg_add_to_options_menu() {\n\t\n\tglobal $dfcg_page_hook;\n\t\n\t// Populate plugin's options (since 3.3.1, now runs BEFORE settings page is added. Duh!)\n\tdfcg_set_gallery_options();\n\t\n\t// Grab base settings using helper function\n\t$base = dfcg_base_settings();\n\t$page_title = $base['dfcg_page_title'];\n\t$menu_title = $base['dfcg_nice_name'];\n\t\n\t// Add Settings Page\n\t// add_options_page($page_title, $menu_title, $capability, $menu_slug, $function)\n\t$dfcg_page_hook = add_options_page( $page_title, $menu_title, 'manage_options', DFCG_FILE_HOOK, 'dfcg_do_settings_page' );\n\t\n\t// Load Admin external scripts and CSS\n\tadd_action( 'admin_enqueue_scripts', 'dfcg_load_admin_scripts', 100 );\n\tadd_action( 'admin_enqueue_scripts', 'dfcg_load_admin_styles', 100 );\n}", "title": "" }, { "docid": "6b3f79fdc90919167406183980076383", "score": "0.7031881", "text": "function epp_add_page() {\n add_theme_page(__('Easy Peasy Options'), __('Easy Peasy Options'), 8, 'easy_peasy_options', 'epp_do_page');\n }", "title": "" }, { "docid": "6139e479d586d6999bd70b07b2770cc7", "score": "0.7030321", "text": "function cl_add_pages() {\n\t// Add a new submenu under Options:\n\tadd_options_page('Contacts List Options', 'Contacts List', 8, __FILE__, 'cl_options_page');\n}", "title": "" }, { "docid": "da4602a32be6dbd38d4d939a5d531c0b", "score": "0.70221156", "text": "function q_adminTab() {\n add_menu_page( \n 'Quiz Result Q', \n 'Quiz Result Q', \n 'edit_posts', \n 'quiz_result', \n 'result_finder', \n 'dashicons-analytics' \n\n );\n}", "title": "" }, { "docid": "8e534c7fe698f005f8a9ee8da220dd58", "score": "0.70182997", "text": "function myeffecto_admin_actions() {\r\n\tglobal $eff_settings_page;\r\n\tadd_options_page('MyEffecto', 'MyEffecto', 'manage_options', $eff_settings_page, 'myeffecto_admin', null, '59.5');\r\n}", "title": "" }, { "docid": "ec880b3e70ccc17817ed601e44cb04b3", "score": "0.7015549", "text": "function ia_jsfiddle_menu() {\n\t\t//add options page under the Settings menu\n\t\tadd_submenu_page('options-general.php','JSFiddle Shortcode','JSFiddle Shortcode Settings','ia_jsfiddle_options','ia_jsfiddle_options','ia_jsfiddle_options_page');\n\t}", "title": "" }, { "docid": "8b01668ef28b6d4c48c79450d94c6f62", "score": "0.70103914", "text": "public function simple_alert_plugin_create_menu() {\t\r\n\t\t\r\n\t\tadd_options_page(__('Simple Alert', 'simple-alert'), __('Simple Alert', 'simple-alert'), 'manage_options', 'simple-alert', array( $this,'simple_alert_plugin_settings_page' ) );\r\n\t\t\t\r\n\t}", "title": "" }, { "docid": "6dd3577ab8eb0ce81bb1bf218ea37faa", "score": "0.7006151", "text": "function create_menu() {\r\n\r\n\t\t\tadd_options_page('301 Redirects', '301 Redirects', 'manage_options', '301options', array( $this,'options_page' ) );\r\n\r\n\t\t}", "title": "" }, { "docid": "807e17cdfc7f2a764756bf1d6f860086", "score": "0.6997124", "text": "public function add_options_page() {\n\t\t$this->plugin_screen_hook_suffix = add_options_page(\n\t\t\t__( 'LibCal Hours Settings', 'wplibcalhours' ),\n\t\t\t__( 'LibCal Hours', 'wplibcalhours' ),\n\t\t\t'manage_options',\n\t\t\t$this->plugin_name,\n\t\t\tarray( $this, 'display_options_page' )\n\t\t);\n\t}", "title": "" }, { "docid": "dd8bc9751aceaa748502e3af30a00efd", "score": "0.69832367", "text": "function addToACF() {\n\t\tif( function_exists('acf_add_options_page') ) {\n\t\t\t\n\t\t\tacf_add_options_page(array(\n\t\t\t\t'page_title' \t=> 'General Settings',\n\t\t\t\t'menu_title'\t=> 'Site Settings',\n\t\t\t\t'menu_slug' \t=> 'site-general-settings',\n\t\t\t\t'capability'\t=> 'edit_posts',\n\t\t\t\t'redirect'\t\t=> false\n\t\t\t));\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "f42a6e48576b120a96e68aac11e48d5c", "score": "0.69832027", "text": "function kwebble_getarchives_admin_pages() {\r\n\t// Add a new submenu under Options:\r\n\tadd_options_page('Kwebble', 'Kwebble', 'manage_options', 'kwebble_options', 'kwebble_getarchives_admin_options_page');\r\n}", "title": "" }, { "docid": "3186abb30ed11c3b33cd41ea3175c8d1", "score": "0.6981868", "text": "function create_menu() {\r\n\t\t add_options_page('301 Redirects', '301 Redirects', 'manage_options', '301options', array($this,'options_page'));\r\n\t\t}", "title": "" }, { "docid": "fcc0d0c611c0265cbf223d484834b093", "score": "0.69752336", "text": "function add_page()\n\t{\n\t\t// check capability of user to manage options (access control)\n\t\tif(current_user_can('manage_options'))\n\t\t{\n\t\t\t//Add the submenu page to \"settings\" menu\n\t\t\t$hookname = add_submenu_page('options-general.php', __('Breadcrumb NavXT Settings', 'breadcrumb_navxt'), 'Breadcrumb NavXT', 'manage_options', 'breadcrumb-navxt', array($this, 'admin_panel'));\t\t\n\t\t\t//Register admin_head-$hookname callback\n\t\t\tadd_action('admin_head-'.$hookname, array($this, 'admin_head'));\t\t\t\n\t\t\t//Register Help Output\n\t\t\tadd_action('contextual_help', array($this, 'contextual_help'), 10, 2);\n\t\t}\n\t}", "title": "" }, { "docid": "d371c52c48b7f36db5f869879064b3da", "score": "0.6974093", "text": "function sj_add_pages() {\n // Add a new submenu under Settings:\n add_options_page(__('Social Juggernaut',''), __('Social Juggernaut',''), 'manage_options', 'socialjuggernaut', 'sj_settings_page');\n}", "title": "" }, { "docid": "f9a8d6de3e1c4a87d32238f19a9e5f26", "score": "0.6965756", "text": "function ad_reachppc_option_page() {\r\n if (function_exists('add_options_page')) {\r\n add_options_page('ReachPPC Link Unit', 'ReachPPC Link Unit', 8, __FILE__, 'ad_insertion_options_page');\r\n }\r\n}", "title": "" }, { "docid": "31e53581ea11860812e5c0b5659f091c", "score": "0.696156", "text": "public function display_options_page() {\n\t\tinclude_once 'partials/vaasco-admin-display.php';\n\t}", "title": "" }, { "docid": "5969a789482b302c1a08add8ed639e03", "score": "0.6950856", "text": "public function add_menu()\n {\n // Add a page to manage this plugin's settings\n \t add_submenu_page('edit.php?post_type=atpay-item', 'Options', 'Options', 'manage_options', 'atpay-settings', array(&$this, 'plugin_settings_page') );\n\n\n\n }", "title": "" }, { "docid": "08912b48efa365810f47dd2e52456206", "score": "0.6950261", "text": "public function admin_menu() {\r\n $menu = add_options_page('Core.Wp', 'Core.WP', 'manage_options', 'core-wp', array(&$this,'menu'));\r\n }", "title": "" }, { "docid": "b08057025418fd13c3f2fdd0cd4873af", "score": "0.6943062", "text": "public function dmof_add_menu_page_func() {\n\t\t$opt_settings = apply_filters('add_dmof_options','settings');\n\t\t$opt_settings = (isset($opt_settings['settings'])) ? $opt_settings['settings'] : '';\n\n\t\t$page_title \t= (isset($opt_settings['page_title'])) ? $opt_settings['page_title'] : 'Theme Options';\n\t\t$menu_title \t= (isset($opt_settings['menu_title'])) ? $opt_settings['menu_title'] : 'Theme Options';\n\t\t$page_slug \t\t= (isset($opt_settings['page_slug'])) ? $opt_settings['page_slug'] : 'dmof_options_page';\n\t\t$menu_type \t\t= (isset($opt_settings['menu_type'])) ? $opt_settings['menu_type'] : 'submenu';\n\t\t$page_parent \t= (isset($opt_settings['page_parent'])) ? $opt_settings['page_parent'] : 'themes.php';\n\t\t$menu_icon \t\t= (isset($opt_settings['menu_icon'])) ? $opt_settings['menu_icon'] : '';\n\t\t\n\t\tif ($menu_type == 'menu') {\n\t\t\tadd_menu_page(__( $page_title, 'dmof' ),__( $menu_title,'dmof' ),'manage_options', $page_slug, array( $this , 'dmof_theme_options_page_callback'),$menu_icon);\n\t\t}else{\n\t\t\tadd_submenu_page( $page_parent, $page_title, $menu_title, 'manage_options', $page_slug, array( $this , 'dmof_theme_options_page_callback') );\n\t\t}\n\n\t}", "title": "" }, { "docid": "312df7606b46f5097455223d39bb5d09", "score": "0.693957", "text": "function pinbin_menu_options() {\n\t//add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function);\n add_theme_page('Pinbin Options', 'Pinbin Options', 'edit_theme_options', 'pinbin-settings', 'pinbin_admin_options_page');\n}", "title": "" }, { "docid": "3e37b91f7425d561af649211ccfdaf36", "score": "0.6937514", "text": "function my_plugin_menu() {\n\tadd_options_page( 'My Plugin Options', 'Filters settings', 'manage_options', 'some_slug', 'my_plugin_options' );\n}", "title": "" }, { "docid": "537b9d7006e2a0dc4c4915e25b0ce20c", "score": "0.69280046", "text": "function london_entrepreneurship_add_options_page() {\n\t\tadd_options_page('London Entrepreneurship', 'London Entrepreneurship', 'manage_options', 'london-entrepreneurship', 'london_entrepreneurship_display_options_page');\n\t}", "title": "" }, { "docid": "2c33855cad4776a4100ec7030c1c7c5d", "score": "0.6922274", "text": "function desq_add_admin_menu() { \n\tadd_options_page( \n\t\t'DeSQ Toolbox', \t// Page Title\n\t\t'DeSQ Toolbox', \t// Menu Name\n\t\t'manage_options', \t// Limit Capabilities\n\t\t'desq_toolbox', \t// Menu Slug\n\t\t'desq_options_page' // Function Name\n\t);\n}", "title": "" }, { "docid": "e3c952b8edf7a2d1dc11dff761199cf6", "score": "0.69119453", "text": "function options_page() {\n\t\t?> \n\t\t<div class=\"wrap\">\n\t\t\t<div class=\"icon32\" id=\"icon-options-general\"><br/></div>\n\n\t\t\t<h2><?php _e('Documentation Redux Options', 'docredux-theme') ?></h2>\n\n\t\t\t<form action=\"options.php\" method=\"post\">\n\n\t\t\t\t<?php settings_fields( $this->options_group ); ?>\n\t\t\t\t<?php do_settings_sections( $this->settings_page ); ?>\n\n\t\t\t\t<p class=\"submit\"><input name=\"submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes'); ?>\" /></p>\n\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "de43e0cb56b7e4574136432314777214", "score": "0.6907107", "text": "public function add_to_menu()\n {\n add_submenu_page(\n 'edit.php?post_type=wccf_product_field',\n __('Settings', 'rp_wccf'),\n __('Settings', 'rp_wccf'),\n WCCF::get_admin_capability('manage_posts'),\n 'wccf_settings',\n array('WCCF_Settings', 'print_settings_page')\n );\n }", "title": "" }, { "docid": "704bca58e8b8646d305e375895275b5d", "score": "0.6904826", "text": "function build_optionsPage() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.', MFP_TEXT_DOMAIN ) );\n\t\t}\n\t\t?>\n\n\t\t<div class=\"wrap\" id=\"theme-options-wrap\">\n\t\t\t<div class=\"icon32\" id=\"icon-themes\"><br /></div>\n\t\t\t<h2><?php _e( 'flickr Photostream Options', MFP_TEXT_DOMAIN ); ?></h2>\n\t\t\t\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php settings_fields( 'mflickrphotostream_options' ); ?>\n\t\t\t\t<?php do_settings_sections( basename( __FILE__ ) ); ?>\n\t\t\t\t<p class=\"submit\"><input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', MFP_TEXT_DOMAIN ); ?>\" /></p>\n\t\t\t</form>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "758ccb37a717e273f86e7c286b930a35", "score": "0.69012594", "text": "function owms_admin_menu() {\n\tadd_options_page( __('OWMS Options', 'owms'), __('OWMS', 'owms'), 'manage_options', basename(__FILE__), 'owms_options_page');\n}", "title": "" }, { "docid": "350cfdf88a4745062560032e366a7ca3", "score": "0.68758965", "text": "function learn_options_page() {\n add_menu_page(\n ' my learn plugin ' ,\n 'Learn Options',\n 'manage_options',\n 'learn_option',\n 'learn_options_page_html',\n 'dashicons-groups', // https://developer.wordpress.org/resource/dashicons\n //plugin_dir_url(__FILE__) . 'includes/icons/icon_learn.png',\n 20\n );\n\n add_submenu_page(\n 'learn_option',\n 'Learn Design',\n 'Learn Design',\n 'manage_options',\n 'learn_design',\n 'learn_design_page_html'\n\n );\n\n}", "title": "" }, { "docid": "bc378710b7a2e511e667bd876aa678a9", "score": "0.68742657", "text": "function tf_options_page() {\n\tadd_options_page('Twitter Flock', 'Twitter Flock', 10, 'twitter-flock/options.php');\n}", "title": "" }, { "docid": "11e1da7238da3c41bc44687335c61e7f", "score": "0.6852001", "text": "function admin_menu() {\n add_options_page('SoundCloud', 'SoundCloud', 'manage_options', \n 'soundcloud', array(&$this, 'render_options_page'));\n }", "title": "" }, { "docid": "8ed0868326e271f9a9c36416b20cf733", "score": "0.68517405", "text": "function add_all_general_settings_link(){ add_options_page(__('Tous les paramètres'), __('Tous les paramètres'), 'administrator', 'options.php'); }", "title": "" }, { "docid": "2bd237b823e2d59482fc4ffe0b8d5db4", "score": "0.6848844", "text": "function add_sc_option_page() {\r\n\tglobal $wpdb;\r\n\tadd_options_page('StatCounter Options', 'StatCounter', \"manage_options\", basename(__FILE__), 'sc_options_page');\r\n}", "title": "" }, { "docid": "4403e10f50669618c688f7f7c3a65194", "score": "0.6847587", "text": "public function me_display_menu_options()\n {\n include_once('view/options.php');\n }", "title": "" }, { "docid": "72d028d9322dc4e57c6377b3938edf4c", "score": "0.6842802", "text": "public function outputOptionsPage()\n {\n ?>\n <div class=\"wrap\">\n <h2><?= $this->pageArguments['page_title']; ?></h2>\n <h2 class=\"nav-tab-wrapper\">\n <?php $this->tabLinks($_GET[\"tab\"] ?? NULL); ?>\n </h2>\n <form method=\"post\" action=\"options.php\">\n <?php\n if (!isset($_GET['tab'])) {\n reset($this->tabs);\n $firstTabKey = key($this->tabs);\n $firstTab = $this->tabs[$firstTabKey];\n settings_fields( $firstTab ); // Must be the option group defined with `register_setting()`\n do_settings_sections( $this->pageArguments['unique_page_slug'] );\n } else {\n foreach ($this->tabs as $tab) {\n if ( $_GET['tab'] == $tab ) {\n settings_fields( $tab ); // Must be the option group defined with `register_setting()`\n do_settings_sections( $this->pageArguments['unique_page_slug'] );\n }\n }\n }\n submit_button();\n ?>\n </form>\n </div> <?php\n }", "title": "" }, { "docid": "8b63ff79bb44022dbecca598e6b7feb8", "score": "0.6839088", "text": "function tmp_menu() {\r\n\t\r\n\tadd_options_page('twimp settings', 'Twimp', 8, __FILE__, 'tmp_options');\r\n\r\n}", "title": "" }, { "docid": "4b4a3809066e2ff783a47f3958438430", "score": "0.6830436", "text": "function dpoo_admin_add_page() {\n add_options_page('Ooyala/Inform replacer Plugin Page', 'Ooyala/Inform replacer', 'manage_options', 'dpoo_options', 'dpoo_options_page');\n}", "title": "" }, { "docid": "02fed2a27f763f1aa96ccedb4b14a325", "score": "0.6822786", "text": "function merchant_theme_options_add_page() {\n\n\t\t// add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function );\n\t\t// add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function );\n\t\t// add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );\n\t\t// $page_title - Name of page\n\t\t// $menu_title - Label in menu\n\t\t// $capability - Capability required\n\t\t// $menu_slug - Used to uniquely identify the page\n\t\t// $function - Function that renders the options page\n\t\t// $theme_page = add_theme_page( __( 'Theme Options', 'merchant' ), __( 'Theme Options', 'merchant' ), 'edit_theme_options', 'theme_options', 'merchant_theme_options_render_page' );\n\n\t\t// $theme_page = add_menu_page( __( 'Theme Options', 'merchant' ), __( 'Theme Options', 'merchant' ), 'edit_theme_options', 'theme_options', 'merchant_theme_options_render_page' );\n\t\t$theme_page = add_submenu_page( 'edit.php?post_type=merchant-prices', __( 'Options', 'merchant' ), __( 'Options', 'merchant' ), 'edit_theme_options', 'merchant_options', 'merchant_theme_options_render_page' );\n\t}", "title": "" }, { "docid": "11795a002b1a11d6eaa419fc07becbf8", "score": "0.6822411", "text": "public function add_admin_menu_page() {\n add_menu_page( __( 'HelpScout', 'helpscout-integration' ), __( 'HelpScout', 'helpscout-integration' ), 'manage_options', 'helpscout-integration', [\n $this,\n 'helpscout_page'\n ] );\n }", "title": "" }, { "docid": "8ac79bbb53a7ea42bc154eaf44f60ef5", "score": "0.68177974", "text": "function pdev_create_menu() {\n add_menu_page( 'Dean\\'s Movies Page', 'Dean\\'s Movies',\n 'manage_options', 'pdev-movies', 'pdev_movie_api_results',\n 'dashicons-smiley', 99 );\n \n}", "title": "" }, { "docid": "c179b5215ce96efacfcdea3fab9e01c3", "score": "0.6815161", "text": "function iframely_create_menu() {\n add_menu_page('Iframely Options', 'Iframely', 'install_plugins', 'iframely_settings_page', 'iframely_settings_page');\n}", "title": "" }, { "docid": "c627e7480d168f055d4d9da01f6b26ef", "score": "0.68127507", "text": "public function add_admin_menu_page() {\n\t\tadd_menu_page('Passport to Paradise', 'Passport', 'manage_options', 'passport-to-paradise', array( $this, 'ptp_render' ), 'dashicons-palmtree');\n\t}", "title": "" }, { "docid": "092fae2c7343298eadabf865aee0c906", "score": "0.68124974", "text": "function create_menu() {\n \n add_options_page('Marque Analytics Settings', 'Marque Google Analytics', 'manage_options', 'marque_analytics', 'marque_analytics_page');\n//\tadd_menu_page('Marque Analytics Settings', 'Marque Google Analytics', 'administrator', __FILE__, 'marque_analytics_page' , plugins_url('/images/icon.png', __FILE__) );\n\n\t//call register settings function\n\tadd_action( 'admin_init', 'register_marque_analytics_tag_settings' );\n}", "title": "" }, { "docid": "06bc8a1010d45737907580656ee70b34", "score": "0.680947", "text": "function _s_theme_options_add_page() {\n\t$theme_page = add_theme_page(\n\t\t__( 'Theme Options', '_s' ), // Name of page\n\t\t__( 'Theme Options', '_s' ), // Label in menu\n\t\t'edit_theme_options', // Capability required\n\t\t'theme_options', // Menu slug, used to uniquely identify the page\n\t\t'_s_theme_options_render_page' // Function that renders the options page\n\t);\n}", "title": "" }, { "docid": "1707099592ea90f721ccb43ef056405c", "score": "0.6808914", "text": "public function add_menu()\n {\n // Add a page to manage this plugin's settings\n // add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function);\n add_options_page(\n 'FitPress Settings', \n 'FitPress Settings', \n 'manage_options', \n 'fitpress_settings', \n array(&$this, 'plugin_settings_page')\n );\n\n // http://www.billrobbinsdesign.com/custom-post-type-admin-page/\n // add_submenu_page(\n // \t'edit.php?post_type=friend', \n // \t__('Friend Admin', 'fitpress'), \n // \t__('Friend Settings', 'fitpress'), \n // \t'edit_posts', \n // \tbasename(__FILE__), \n // \tarray(&$this, 'plugin_settings_page')\n // \t);\n\n }", "title": "" }, { "docid": "d803c24aac8c2b01981f78549d7d778a", "score": "0.68047065", "text": "function pmpromc_admin_add_page() \n{\n\tadd_options_page('PMPro MailChimp Options', 'PMPro MailChimp', 'manage_options', 'pmpromc_options', 'pmpromc_options_page');\n}", "title": "" }, { "docid": "bddbfa16b68508fa4cab726e1606874f", "score": "0.68007416", "text": "public function add_menu_page() {\n add_submenu_page(\n 'edit.php?post_type=artwork',\n apply_filters($this->plugin_name . '-settings-page-title', esc_html__('Import Artwork', 'chicago-art-importer')),\n apply_filters($this->plugin_name . '-settings-menu-title', esc_html__('Import Artwork', 'chicago-art-importer')),\n 'manage_options',\n $this->plugin_name . '-settings',\n array($this, 'page_options')\n );\n }", "title": "" }, { "docid": "8f8ac5f0da240efb11a13c62f90024e7", "score": "0.6796783", "text": "function SPTK_menu_MainMenu()\n{\n\t// ### Settings for Squeeze Pages\n\tadd_submenu_page('edit.php?post_type=squeeze_page', \n\t\t__('Squeeze Page Toolkit for WordPress - Settings Page', 'sptk_for_wp'),\n\t\t__('Settings', 'sptk_for_wp'),\n\t\t\t\t\t'manage_options', 'SPTK_showPage_Settings', 'SPTK_showPage_Settings');\n}", "title": "" }, { "docid": "949f849ea71dc3826320c10229f41fc4", "score": "0.6791428", "text": "public static function add_setting_menu()\n\t{\n\t\tadd_options_page( self::$plugin_name. ' Options', 'Hacklog RIA', 'manage_options', md5(HACKLOG_RIA_LOADER), array(__CLASS__,'option_page') );\n\t}", "title": "" } ]
71b50af9198c5c096c6359810e93eb1d
paginate roles received from database
[ { "docid": "c53d87b30834538996da159fa7a8504e", "score": "0.6537884", "text": "public function paginateRoles($number)\n {\n $roles = Role::paginate($number);\n \n return $roles;\n }", "title": "" } ]
[ { "docid": "64edab5ea20f15223cb6e57defac2ed9", "score": "0.72607017", "text": "public function index()\n {\n $limit = Input::get('limit') ?: 5; \n \n $uid = Auth::user()->id;\n $roles = Roles::where('user_id','=',$uid)->paginate($limit);\n\n return $this->respondWithPagination($roles, [\n 'data' => $this->rolesTransformer->transformCollection($roles->all())\n ]);\n }", "title": "" }, { "docid": "58292d839147883f7f3a3fac25350faf", "score": "0.70594907", "text": "public function index()\n {\n return User::with(\"roles.perms\")->paginate();\n }", "title": "" }, { "docid": "77616966e2a6ec7c99b8eb2682e28c45", "score": "0.690019", "text": "public function roles()\n {\n $this->_acl->acceso('listar_usuarios');\n $this->validarUrlIdioma();\n $this->_view->getLenguaje(\"index_inicio\");\n $this->_view->setJs(array('index'));\n $nombre = $this->getSql('nombre');\n $pagina = $this->getInt('pagina');\n \n $paginador = new Paginador();\n if ($this->botonPress(\"bt_guardarRol\")) \n {\n $this->nuevo_role(); \n }\n\n //Filtro por Activos/Eliminados\n $condicion = \" ORDER BY r.Row_Estado DESC \";\n $soloActivos = 0;\n if (!$this->_acl->permiso('ver_eliminados')) {\n $soloActivos = 1;\n $condicion = \" WHERE r.Row_Estado = $soloActivos \";\n }\n //Filtro por Activos/Eliminados\n\n $arrayRowCount = $this->_aclm->getRolesRowCount($condicion);\n $totalRegistros = $arrayRowCount['CantidadRegistros'];\n\n // $this->_view->assign('roles', $paginador->paginar($this->_aclm->getRoles(), \"listarRoles\", \"$nombre\", $pagina, 25));\n\n if ($this->botonPress(\"export_data_excel\")) {\n $this->_exportarDatosRoles(\"excel\");\n }\n\n if ($this->botonPress(\"export_data_pdf\")) {\n $this->_exportarDatosRoles(\"pdf\");\n }\n\n if ($this->botonPress(\"export_data_csv\")) {\n $this->_exportarDatosRoles(\"csv\");\n }\n\n $this->_view->assign('modulos', $this->_aclm->getModulos(0,0));\n $this->_view->assign('roles', $this->_aclm->getRolesPaginado($pagina,CANT_REG_PAG,$soloActivos));\n\n $paginador->paginar( $totalRegistros,\"listarRoles\", \"\", $pagina, CANT_REG_PAG, true);\n\n $this->_view->assign('numeropagina', $paginador->getNumeroPagina());\n $this->_view->assign('paginacion', $paginador->getView('paginacion_ajax_s_filas'));\n $this->_view->assign('titulo', 'Administración de roles');\n $this->_view->renderizar('roles');\n }", "title": "" }, { "docid": "b33e41aaf4b6ff124ed71847572f7c22", "score": "0.67925185", "text": "public function filtrarroles(){\n\n $this->request->allowMethod(['get']);\n \n $keyword = $this->request->query('keyword');\n $activo = $this->request->query('activo');\n\n $condiciones = array();\n\n $condiciones['name like '] = '%'.$keyword.'%';\n\n if($activo){\n $condiciones['borrado = '] = false;\n }\n \n $query = $this->Roles->find('all', [\n 'conditions' => $condiciones,\n 'order' => [\n 'Roles.name' => 'ASC'\n ],\n 'limit' => 100\n ]);\n \n $roles = $this->paginate($query);\n $this->set(compact('roles'));\n $this->set('_serialize', 'roles');\n }", "title": "" }, { "docid": "dc5a36dd1a8eb840b4f399f8cc7b330b", "score": "0.67636687", "text": "public function index()\r\n {\r\n return RoleResource::collection(Role::paginate());\r\n }", "title": "" }, { "docid": "fb698ba8d5ac62e66a077af2caca62c3", "score": "0.6672684", "text": "public function index()\n {\n return RolesResource::collection(roles::orderBy('authLevel', 'asc')->paginate(5));\n }", "title": "" }, { "docid": "60346cd0564111088de29c5ae91ce046", "score": "0.6613413", "text": "public function getRolesList($page, $search = \"\", $sortCol = \"id\", $sortVal = \"DESC\"){\r\n \r\n $columns = array( \r\n \"id\",\r\n \"role\",\r\n \"status\",\r\n \"dateCreated\",\r\n );\r\n \r\n $limit = $this->_rolesConfig['limit_per_page']; \r\n $offset = ($page-1) * $limit; \r\n \r\n //$search = 639271060231;\r\n \r\n $where = new Where();\r\n if(!empty($search)){\r\n $where->like(\"role\", \"%$search%\");\r\n }\r\n \r\n $params = array(\r\n 'limit' => $limit,\r\n 'offset' => $offset,\r\n 'columns' => $columns,\r\n// 'order' => 'orderDate ' . $sort,\r\n 'order' => $sortCol.' '.$sortVal,\r\n 'where' => $where,\r\n ); \r\n \r\n $records = $this->_rolesTable->fetch($params)->toArray(); \r\n \r\n // query the count of all matching records. unset limiters first\r\n unset($params['columns']);\r\n unset($params['limit']);\r\n unset($params['offset']);\r\n unset($params['order']);\r\n $count = $this->_rolesTable->getCount($params); \r\n \r\n// echo \"<pre>\";\r\n// print_r($records);\r\n// die();\r\n \r\n // Get headers\r\n// $headers = $this->getHeaders(array_keys(reset($records))); \r\n \r\n $pageCount = intval($count/$limit);\r\n if($count % $limit > 0) $pageCount++; \r\n \r\n return array(\r\n //'headers' => $headers,\r\n 'records' => $records,\r\n 'count' => $count,\r\n 'pageCount' => $pageCount,\r\n 'currPage' => $page, \r\n 'limit' => $limit,\r\n// 'headers' => $headers,\r\n );\r\n }", "title": "" }, { "docid": "7b3adc7367d42a6a92aece93f73098bc", "score": "0.661093", "text": "public function index()\n {\n if(!Auth::user()->hasPermission('read-roles')) abort(404);\n $roles = Role::paginate(15);\n return view('pages.roles.index')->withRoles($roles);\n }", "title": "" }, { "docid": "f0417a607ed36dcf9ed57d1d7358d04b", "score": "0.65407187", "text": "public function index()\n {\n //\n $roles = Role::paginate(5);\n $dataCounts = Role::count(); \n $permissions = Permission::all()->sortBy('id');\n \n return view('roles/index')->with(['roles'=>$roles,'dataCounts'=>$dataCounts,'permissions'=>$permissions]);\n }", "title": "" }, { "docid": "dd58849933c40b4acfbdffae45b89d61", "score": "0.65209836", "text": "public function getRolesMembers($role,$page) {\n\t$roles = $this->getAdapter();\n\t$select = $roles->select()\n\t->from($this->_name, array('username', 'createdBy', 'updatedBy', 'id', 'fullname'))\n\t->joinLeft('roles',$this->_name.'.role = roles.role', array())\n\t->where('roles.id = ?',(int)$role);\n\t$paginator = Zend_Paginator::factory($select);\n\tif(isset($page) && ($page != \"\")) {\n\t$paginator->setCurrentPageNumber((int)$page); \n\t}\n\t$paginator->setItemCountPerPage(50) \n\t->setPageRange(10); \n\treturn $paginator;\n\t}", "title": "" }, { "docid": "37e4d388022a99cd5a76e6486414ab98", "score": "0.6465445", "text": "public function _paginacion_listarRoles($txtBuscar = false) \n {\n //$this->validarUrlIdioma();\n // $pagina = $this->getInt('pagina');\n //$registros = $this->getInt('registros');\n\n // $nombre = $this->getSql('nombre');\n // if ($nombre) {\n // $condicion .= \" where Rol_Nombre liKe '%$nombre%' \";\n // }\n\n //Variables de Ajax_JavaScript\n $pagina = $this->getInt('pagina');\n $filas=$this->getInt('filas'); \n $totalRegistros = $this->getInt('total_registros');\n\n $soloActivos = 0;\n $condicion = \"\";\n if ($txtBuscar) \n {\n $condicion = \" WHERE Rol_Nombre liKe '%$txtBuscar%' \";\n //Filtro por Activos/Eliminados\n if (!$this->_acl->permiso('ver_eliminados')) {\n $soloActivos = 1;\n $condicion .= \" AND r.Row_Estado = $soloActivos \";\n } else {\n $condicion .= \" ORDER BY r.Row_Estado DESC \";\n }\n \n } else {\n $condicion = \" ORDER BY r.Row_Estado DESC \";\n //Filtro por Activos/Eliminados \n if (!$this->_acl->permiso('ver_eliminados')) {\n $soloActivos = 1;\n $condicion = \" WHERE r.Row_Estado = $soloActivos \";\n }\n } \n\n $paginador = new Paginador();\n\n // $this->_view->assign('roles', $paginador->paginar($this->_aclm->getRoles($condicion), \"listarRoles\", \"$nombre\", $pagina, 25));\n\n $paginador->paginar( $totalRegistros,\"listarRoles\", \"$txtBuscar\", $pagina, $filas, true);\n\n $this->_view->assign('roles', $this->_aclm->getRolesCondicion($pagina,$filas, $condicion));\n\n $this->_view->assign('numeropagina', $paginador->getNumeroPagina());\n //$this->_view->assign('cantidadporpagina',$registros);\n $this->_view->assign('paginacion', $paginador->getView('paginacion_ajax_s_filas'));\n $this->_view->renderizar('ajax/listarRoles', false, true);\n }", "title": "" }, { "docid": "3ea78c9459a396a5b6d3d8b981ccccbd", "score": "0.6424555", "text": "public function index()\n {\n $roles = Role::orderBy('id','DESC')->paginate(5);\n\n return RoleResource::collection($roles);\n }", "title": "" }, { "docid": "f9bad5cd63793d29e94522fd9b533d60", "score": "0.64226586", "text": "public function getRolesMembers($role,$page) {\n $select = $this->select()\n ->from($this->_name,\n array(\n 'username', 'createdBy', 'updatedBy',\n 'id', 'fullname'\n ))\n ->joinLeft('roles',$this->_name . '.role = roles.role', array())\n ->where('roles.id = ?',(int)$role);\n $data = $this->getAdapter()->fetchAll($select);\n $paginator = Zend_Paginator::factory($data);\n if(isset($page) && ($page != \"\")) {\n $paginator->setCurrentPageNumber((int)$page);\n }\n $paginator->setItemCountPerPage(50)->setPageRange(10);\n return $paginator;\n }", "title": "" }, { "docid": "3bada78593a98335361b6fb272216fcf", "score": "0.6373779", "text": "public function index()\n {\n return [\n 'data' => User::with('role')->orderBy('role_id','DESC')->orderBy('name')->paginate(5),\n 'role' => Role::all()\n ];\n }", "title": "" }, { "docid": "bd1c4ba729b66f47c2a4fada887c1bb5", "score": "0.63690287", "text": "public function index()\n {\n return view('admin.roles.index', ['roles' => Role::paginate(5)]);\n }", "title": "" }, { "docid": "0198f586c5370ea331ca11c9ca03dbef", "score": "0.6360623", "text": "public function rolePaginate(Request $request, $pageNumber = null)\n {\n if (!\\Request::isMethod('post') && !\\Request::ajax()) { //\n return lang('messages.server_error');\n }\n\n $inputs = $request->all();\n $page = 1;\n if (isset($inputs['page']) && (int)$inputs['page'] > 0) {\n $page = $inputs['page'];\n }\n\n $perPage = 20;\n if (isset($inputs['perpage']) && (int)$inputs['perpage'] > 0) {\n $perPage = $inputs['perpage'];\n }\n\n $start = ($page - 1) * $perPage;\n if (isset($inputs['form-search']) && $inputs['form-search'] != '') {\n $inputs = array_filter($inputs);\n unset($inputs['_token']);\n\n $data = (new Role)->getRoles($inputs, $start, $perPage);\n $totalRole = (new Role)->totalRoles($inputs);\n $total = $totalRole->total;\n } else {\n\n $data = (new Role)->getRoles($inputs, $start, $perPage);\n $totalRole = (new Role)->totalRoles($inputs);\n $total = $totalRole->total;\n }\n return view('admin.role.load_data', compact('data', 'total', 'page', 'perPage'));\n }", "title": "" }, { "docid": "6209ac75b4f023480ed256dc7c44ca57", "score": "0.63534117", "text": "public function index()\n {\n //\n $roles = Role::where('id','>=',1)->paginate(10);\n return view('roles.allRole',['roles'=> $roles]);\n }", "title": "" }, { "docid": "e6579926a5a2465f8eb87f02ce415fc2", "score": "0.6351358", "text": "public function index()\n {\n $roles = Role::paginate(15);\n return view('admin.roles.index', compact('roles'));\n }", "title": "" }, { "docid": "18467c443acafe9f1fddda02d60c5aaa", "score": "0.6332241", "text": "public function index()\n {\n $roles = Role::paginate( 5 );\n return view( 'mantenedores.roles.listar', [\n 'roles' => $roles,\n 'buscar' => 'false',\n ] );\n }", "title": "" }, { "docid": "348d9f08e72c52104a7aa8c1f40112d2", "score": "0.63143086", "text": "private function pagination($role, $class)\r\n {\r\n $cnt['returnType'] = 'count';\r\n $cnt['conditions'] = array(\r\n 'role' => $role,\r\n // 'status' => 1\r\n );\r\n if (!empty($class) && $role == 'murid') {\r\n $cnt['conditions'] = array(\r\n 'Students.class' => $class,\r\n );\r\n }\r\n $role == 'murid' ? $cnt['joinData'] = 'murid' : false;\r\n $role == 'guru' ? $cnt['joinData'] = 'guru' : false;\r\n\r\n $config = array();\r\n $config[\"base_url\"] = base_url() . \"profile/\" . $role;\r\n $config[\"total_rows\"] = $this->authModel->getRows($cnt);\r\n $config[\"per_page\"] = 5;\r\n $config[\"uri_segment\"] = 3;\r\n $config['attributes'] = array('class' => 'page-link');\r\n $config[\"use_page_numbers\"] = TRUE;\r\n $config[\"full_tag_open\"] = '<ul class=\"pagination\">';\r\n $config[\"full_tag_close\"] = '</ul>';\r\n $config[\"first_tag_open\"] = '<li class=\"page-item\">';\r\n $config[\"first_tag_close\"] = '</li>';\r\n $config[\"last_tag_open\"] = '<li class=\"page-item\">';\r\n $config[\"last_tag_close\"] = '</li>';\r\n $config['next_link'] = 'Next';\r\n $config[\"next_tag_open\"] = '<li class=\"page-item\">';\r\n $config[\"next_tag_close\"] = '</li>';\r\n $config['prev_link'] = 'Previous';\r\n $config[\"prev_tag_open\"] = '<li>';\r\n $config[\"prev_tag_close\"] = '</li>';\r\n $config[\"cur_tag_open\"] = '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">';\r\n $config['cur_tag_close'] = '</a></li>';\r\n $config['num_tag_open'] = '<li>';\r\n $config['num_tag_close'] = '</li>';\r\n //$config['display_pages'] = FALSE;\r\n $config[\"last_link\"] = \"Last\";\r\n $config[\"first_link\"] = \"First\";\r\n $choice = $config[\"total_rows\"] / $config[\"per_page\"];\r\n $config[\"num_links\"] = round($choice);\r\n\r\n $page = $this->uri->segment(3);\r\n\r\n $this->pagination->initialize($config);\r\n $start = ($page - 1) * $config[\"per_page\"];\r\n\r\n return array(\r\n 'start' => $start,\r\n 'per_page' => $config[\"per_page\"]\r\n );\r\n }", "title": "" }, { "docid": "eb1cf0de438f73ad8d95c812bd5bdc0b", "score": "0.63042974", "text": "public function index(Request $request)\n {\n $roles = Role::orderBy('id','DESC')->paginate(10);\n return view('role_permission.roles.index', compact('roles'))\n ->with('i', ($request->input('page', 1) - 1) * 10);\n }", "title": "" }, { "docid": "78c72466534278f6e3573a161a235886", "score": "0.629107", "text": "public function loadListOfRoles();", "title": "" }, { "docid": "25f4d9bec437db975ba6ee5c503b9f8d", "score": "0.62803596", "text": "public function index()\n {\n// If there are too many role, considering using pagination https://laravel.com/docs/master/pagination\n return response()->json(Roles::all());\n }", "title": "" }, { "docid": "597da0f61db4d662043ad6cc28f23957", "score": "0.6263404", "text": "public function showRoleAction()\n\t{\n\t\t$per_page = Config::get('nhc/site.perpage') ;\n\t\t$roles = $this->roleObj->getAllRole($per_page);\n return View::make('role.role')->with('paginator',$roles);\n\t}", "title": "" }, { "docid": "4354e44f74387e28e52e32d97c4c784f", "score": "0.6262145", "text": "public function index()\n {\n /*$data = DB::table('role')->paginate();*/\n\n $data = Role::paginate();\n return view('admin.user_role.role',[\n 'title'=>'角色列表页面',\n 'data'=>$data\n\n ]);\n\n\n }", "title": "" }, { "docid": "1098c51c23454f87a1ad4aafbd51e66c", "score": "0.62342095", "text": "public function get_all_roles();", "title": "" }, { "docid": "757ccab792feb84ee9666441f94361e0", "score": "0.62260115", "text": "public function index()\n {\n $roles =Role::all();\n return view('admin-panel.roles.index')->with('roles', Role::paginate(10));\n }", "title": "" }, { "docid": "5faebb47802d2d4137ef50c76604a425", "score": "0.6212586", "text": "function lists()\n\t{\n\t\t$this->load->library('pagination');\n\t\t$url_to_paging = $this->config->item('base_url');\n\t\t\n\t\t$config['base_url'] = $url_to_paging.'role/lists/';\n\t\t$config['per_page'] = '10';\n\t\t$config['first_url']='0';\n\t\t$data = array();\n\t\t//using for searching data...\n\t\t$data['role_name'] = $this->input->post('role_name');\n\t\t$per_page = '1';\n\t\t$perpage = '3';\n\t\t//below is used in all perpose\n\t\t$return = $this->role_model->lists($config['per_page'],$this->uri->segment(3), $data);\n\t\t$data['result'] = $return['result'];\n\t\t$config['total_rows'] = $return['count'];\n\t\t//echo \"<pre>\";print_r($data);break;\n\t\t$this->pagination->initialize($config);\n\t\t$this->load->view('list_role', $data);\n\t}", "title": "" }, { "docid": "5ebca37e8f560b813b50a7e7f07158a8", "score": "0.6187847", "text": "public function index()\n {\n return Inertia::render(\"Role/Index\", [\n 'roles' => Role::query()->paginate(20)\n ]);\n }", "title": "" }, { "docid": "4892fd8a9a0c1c7541469cc351993e46", "score": "0.6176263", "text": "public function index()\n {\n $name = \"Dashboard\";\n $roles = role::simplepaginate(5);\n \n /*// Many to Many Eloquent Relationships Reverse\n $roles = role::find(1)->user;\n return $roles; */\n\n return view('role.index',compact('roles','name'));\n }", "title": "" }, { "docid": "3cf9640c4449325bbd801fb57840c76e", "score": "0.6175926", "text": "public function actionIndex()\n {\n\n $query = Roles::find()->where(['status' => 1]);\n $countQuery = clone $query;\n $pages = new \\yii\\data\\Pagination(['totalCount' => $countQuery->count()]);\n $models = $query->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n return $this->render('index', [\n 'pages' => $pages,\n 'dataProvider' => $models,\n ]);\n }", "title": "" }, { "docid": "5e4fd8982ddf8cace684f102b42a9fd3", "score": "0.6173892", "text": "public function index()\n {\n $roles = Role::paginate(10);\n return view('dashboard.roles.index', compact('roles'));\n }", "title": "" }, { "docid": "99ebe7f915c5e360c279d0f56c3f64f9", "score": "0.6118445", "text": "public function index()\n {\n $roles = Role::paginate(5);\n $title = \"list of roles\";\n $btn = \" \";\n return view(\"master.roles.index\", compact(\"roles\", \"title\", \"btn\"));\n }", "title": "" }, { "docid": "444475e81688433b8b4987af6f187b10", "score": "0.61171466", "text": "public function index()\n {\n return Inertia::render('Admin/Role/Index', [\n 'roles' => Role::paginate(15)\n ]);\n }", "title": "" }, { "docid": "3e806d4aef0b7c468b70ea1e7352bbcb", "score": "0.6107566", "text": "public function index()\n {\n $roles=Role::latest()->paginate(20);\n return view('admin.role.index',compact('roles'));\n }", "title": "" }, { "docid": "c443d4bc7117e277fad3b9835feeaf08", "score": "0.6093724", "text": "function roleListing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n\n $data['userRecords'] = $this->admin_model->roleListing();\n $data['permission'] = $this->admin_model->getPermission();\n $this->global['pageTitle'] = '角色管理';\n $this->global['pageType'] = 'user';\n\n $this->loadViews(\"systemrolemanage\", $this->global, $data, NULL);\n }\n }", "title": "" }, { "docid": "84ba98fa957a84eaf38ec8c992c3bc5b", "score": "0.60745686", "text": "public function index(Request $request)\n\n {\t\n\t\t$roles = Role::orderBy('id','DESC')->paginate(5);\n\t\t$permission = Permission::get();\n\t\t$rolePermissions = Permission::join(\"role_has_permissions\",\"role_has_permissions.permission_id\",\"=\",\"permissions.id\")->get();\n\t\t\n\t\t\t\n return view('admin.roles.index',compact('roles','permission','rolePermissions'))\n\n ->with('i', ($request->input('page', 1) - 1) * 5);\n\n }", "title": "" }, { "docid": "0f969e857d40c30fd0df00355b4280cc", "score": "0.6073362", "text": "public function index()\n {\n // Capture any provided search criteria.\n //\n $criteria = Input::get( 'criteria' , false );\n\n // Fetch a paginated listing of all roles in the system.\n //\n $roles = $criteria\n ? $this->roleRepository->getPaginatedResourceListingByCriteria( $criteria )\n : $this->roleRepository->getPaginatedResourceListing();\n\n // Show the page.\n //\n return routeView()->withRoles( $roles );\n }", "title": "" }, { "docid": "b37f6e3f604d47278a6bc3b45422f1c9", "score": "0.6051649", "text": "public function index()\n {\n $data = RoleRepository::paginate(config('repository.page-limit'));\n\n return view('backend.role.index', compact(\"data\"));\n }", "title": "" }, { "docid": "e6d309db9fa131eb8dac067d6b78ee93", "score": "0.6039778", "text": "public function index()\n {\n $data = Role::orderBy('id','desc')->paginate(5);\n return view('admin.roles.index',compact('data'));\n }", "title": "" }, { "docid": "69a8570369a951a25dd3064673190e18", "score": "0.6017629", "text": "public function serverPaginationFilteringFor(Request $request): LengthAwarePaginator\n {\n $roles = $this->allWithBuilder();\n\n if ($request->get('search') !== null) {\n $term = $request->get('search');\n $roles->where('name', 'LIKE', \"%{$term}%\")\n ->orWhere('slug', 'LIKE', \"%{$term}%\")\n ->orWhere('id', $term);\n }\n\n if ($request->get('order_by') !== null && $request->get('order') !== 'null') {\n $order = $request->get('order') === 'ascending' ? 'asc' : 'desc';\n\n $roles->orderBy($request->get('order_by'), $order);\n } else {\n $roles->orderBy('created_at', 'desc');\n }\n\n return $roles->paginate($request->get('per_page', 10));\n }", "title": "" }, { "docid": "56d4664dba489e9202eabb13f46285c9", "score": "0.5995187", "text": "function listOrdersByRole($role_id, $paginate)\n {\n return User::role($role_id)\n ->join('orders', 'orders.user_id', 'users.id')\n ->join('order_details', 'order_details.order_id', 'orders.id') \n ->join('status_orders', 'orders.status_id', 'status_orders.id')\n ->join('plans', 'order_details.plan_id', 'plans.id') \n ->join('products', 'plans.product_id', 'products.id') \n ->select(\n 'products.name as name_product', 'products.presentation',\n 'order_details.quantity', 'users.name as name_user',\n 'orders.total_order',\n 'status_orders.status',\n )\n ->paginate($paginate);\n }", "title": "" }, { "docid": "e3c5dcdd1ce8d237b9b82e8b04ae6fef", "score": "0.5988634", "text": "public function index()\n {\n //\n $roles = Rol::paginate(10);\n\n return View('Rol.index', compact(['roles']));\n }", "title": "" }, { "docid": "cb67d81c085719d66bf1e78137c5762b", "score": "0.5987943", "text": "public function index(RoleFilter $request)\n {\n return RoleResource::collection(Role::filter($request)->paginate());\n }", "title": "" }, { "docid": "3ccc3e2dcd09e2a49eab65599ddd4823", "score": "0.59822667", "text": "public function paginate();", "title": "" }, { "docid": "e27061ff012fcf11675c3af27121b4b7", "score": "0.59583384", "text": "public function index()\n {\n $page_title = 'All Roles';\n\n $count = Role::where('user_id', Auth::user()->id)->count();\n\n $roles = Role::where('user_id', Auth::user()->id)\n ->orderBy('created_at', 'DESC')->simplePaginate(10);\n \n\n return view('junecity::roles.index', compact('roles', 'count', 'page_title'));\n }", "title": "" }, { "docid": "c3ff213449568cf5ed68e575c59a66a9", "score": "0.59431875", "text": "public function getManageableRolesForPages()\n {\n $roles = $this->em->getRepository(Role::class)->findAll();\n\n if (($token = $this->tokenStorage->getToken()) && ($user = $token->getUser())) {\n if ($user && !$user->isSuperAdmin() && ($superAdminRole = array_keys($roles, 'ROLE_SUPER_ADMIN'))) {\n $superAdminRole = current($superAdminRole);\n unset($roles[$superAdminRole]);\n }\n }\n\n return $roles;\n }", "title": "" }, { "docid": "01a0081223b7f40df9222f8f719d6f2f", "score": "0.5929249", "text": "public function ListarRoles(){\n try{ \n $commd = $this->DB->prepare(\"SELECT * FROM roles_usuario\");\n $commd->execute();\n return $commd->fetchAll(PDO::FETCH_OBJ);\n }catch(Throwable $t){\n die($t->getMessage());\n }\n }", "title": "" }, { "docid": "cb5addcc5b225e385ee94cfca76a6f56", "score": "0.59164274", "text": "function persona_roles(){\n $this->_viewOutPut('persona_rolesCrud');\n }", "title": "" }, { "docid": "24098d722d952cd68d6026ee8976013c", "score": "0.59077597", "text": "public function index()\n {\n $users = User::with('role')->paginate(15);\n\n return response()->json([\n 'ok' => true,\n 'data' => $users\n ], 200);\n }", "title": "" }, { "docid": "ea701fd3b611eaccb599f634066b1027", "score": "0.5894779", "text": "function roles(){\n $this->_viewOutPut('rolesCrud');\n }", "title": "" }, { "docid": "df415bb1c41ba10588cdd1d076d678fd", "score": "0.58897287", "text": "function fetch_data()\n\t{;\n\n\t\tsleep(1);\n\t\t$role_name = $this->input->post('role_name');\n\t\t$this->load->library('pagination');\n\t\t$config = array();\n\t\t$config['base_url'] = '#';\n\t\t$config['total_rows'] = $this->Role_model->count_all($role_name);\n\t\t$config['per_page'] = 8;\n\t\t$config['uri_segment'] = 3;\n\t\t$config['use_page_numbers'] = TRUE;\n\t\t$config['full_tag_open'] = '<ul class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t$config['first_tag_open'] = '<li>';\n\t\t$config['first_tag_close'] = '</li>';\n\t\t$config['last_tag_open'] = '<li>';\n\t\t$config['last_tag_close'] = '</li>';\n\t\t$config['next_link'] = '&gt;';\n\t\t$config['next_tag_open'] = '<li>';\n\t\t$config['next_tag_close'] = '</li>';\n\t\t$config['prev_link'] = '&lt;';\n\t\t$config['prev_tag_open'] = '<li>';\n\t\t$config['prev_tag_close'] = '</li>';\n\t\t$config['cur_tag_open'] = \"<li class='active'><a href='#'>\";\n\t\t$config['cur_tag_close'] = '</a></li>';\n\t\t$config['num_tag_open'] = '<li>';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t$config['num_links'] = 3;\n\t\t$this->pagination->initialize($config);\n\t\t$page = $this->uri->segment(3);\n\t\t$start = ($page - 1) * $config['per_page'];\n\t\t$output = array(\n\t\t'pagination_link' => $this->pagination->create_links(),\n\t\t'admissions_list' => $this->Role_model->fetch_data($config[\"per_page\"], $start, $role_name)\n\t\t);\n\t\techo json_encode($output);\n\t}", "title": "" }, { "docid": "a38015434c5f0fe4c759427126b0b5e9", "score": "0.5887323", "text": "public function getManageRoles()\n {\n $roles = Role::orderBy('id', 'asc')->paginate(10);\n return view('adminlte.pages.admin.manage-roles', compact('roles'));\n }", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5875559", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5875559", "text": "public function roles();", "title": "" }, { "docid": "cd5e95b5ec6bb6e91af0d60770b5a8da", "score": "0.5874885", "text": "public function index(Request $request)\n {\n // die(\"test11\");\n $roles = Role::orderBy('id', 'DESC')->paginate(5);\n\n return view('admin.roles.index')->with('roles',$roles);\n }", "title": "" }, { "docid": "0836db8b60207bc4443af5a5df10b51c", "score": "0.5843802", "text": "public function index()\n {\n $roles = Speedy::getModelInstance('role')->paginate(20);\n\n return view('vendor.speedy.admin.role.index', compact('roles'));\n }", "title": "" }, { "docid": "08a5db356d055f733c05ccc5b2b4710c", "score": "0.5827904", "text": "public function getRoleObjects();", "title": "" }, { "docid": "7df5c00c92cf35be2269d5ce00a4f8f1", "score": "0.5825695", "text": "public function roles($pagina)\r\n\t{\r\n\r\n\t\t$condicion = array('ROL_ESTADO' => '1');\r\n\t\t$this->_view->ddlRoles = $this->_master->masterSelect('*', 'T_ROLES', $condicion);\r\n\r\n\t\t$this->_view->titulo = 'Gestionar Permisos';\r\n\t\t$this->_view->setPlugins($plugins = array('pagPost', 'chk_switch'));\r\n\r\n\t\tif ($this->getInt('enviar') == 1)\r\n\t\t{\r\n\t\t\t$this->_view->datos = $_POST;\r\n\r\n\t\t\t$parametros['ddlRoles'] = array(\r\n\t\t\t\t'requerido' => true,\r\n\t\t\t\t'valCode' => array(\r\n\t\t\t\t\t'V001',\r\n\t\t\t\t\t'V108'\r\n\t\t\t\t),\r\n\t\t\t\t'mensaje' => 'Roles: '\r\n\t\t\t);\r\n\r\n\t\t\t$val = $this->validar($parametros);\r\n\t\t\tif ($val != 1)\r\n\t\t\t{\r\n\t\t\t\t$this->_view->_error = $val;\r\n\t\t\t\t$this->_view->renderizar('roles', 'permisos', 'login');\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t$this->cargar($this->getPostParam('ddlRoles'), $pagina);\r\n\t\t}\r\n\t\telse if ($this->getInt('enviar') == '2' && $this->getPostParam('btnGuardar') == 'Guardar')\r\n\t\t{\r\n\t\t\t$this->modificar();\r\n\t\t\t$this->cargar($this->getPostParam('hidRol'), $pagina);\r\n\t\t}\r\n\t\telse if ($this->getInt('enviar') == '2')\r\n\t\t{\r\n\t\t\t$this->cargar($this->getPostParam('hidRol'), $pagina);\r\n\t\t}\r\n\r\n\t\t$this->_view->renderizar('roles', 'permisos', 'login');\r\n\t}", "title": "" }, { "docid": "3d95d9bc293dab87f037ad9eddd25d90", "score": "0.5816704", "text": "public function index()\n\t{\n\t\t$input = Input::only('q', 'page', 'limit', 'sort');\n\n\t\t$role = new Role;\n\n\t\ttry {\n\t\t\tif (isset($input['q'])) {\n\t\t\t\t$q = explode(',', $input['q']);\n\n\t\t\t\tif (count($q)) {\n\t\t\t\t\tforeach ($q as $key => $value) {\n\t\t\t\t\t\t$field = explode(':', $value);\n\t\t\t\t\t\t$role = $role->where($field['0'], $field['1']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$role = $role->where('status', 'A');\n\n\t\t\tif (isset($input['page'])) {\n\t\t\t\t$role = $role->skip($input['page']);\n\t\t\t}\n\n\t\t\tif (isset($input['limit'])) {\n\t\t\t\t$role = $role->take($input['limit']);\n\t\t\t}\n\n\t\t\tif (isset($input['sort'])) {\n\t\t\t\t$sort = explode(',', $input['sort']);\n\n\t\t\t\tif (is_array($sort) && count($sort) > 0) {\n\t\t\t\t\tforeach ($sort as $key => $value) {\n\t\t\t\t\t\t$str = trim($value, '+-');\n\n\t\t\t\t\t\tif (strpos($value, '-') === 0) {\n\t\t\t\t\t\t\t$role = $role->orderBy(trim($str), 'desc');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$role = $role->orderBy(trim($str), 'asc');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (strpos($sort, '-') === 0) {\n\t\t\t\t\t\t$role = $role->orderBy(trim($sort, '-'), 'desc');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$role = $role->orderBy(trim($sort, '+'), 'asc');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$result = $role->get();\n\n\t\t\tif ( ! $result->count()) {\n\t\t\t\treturn response()->json(['error' => 'no_result_found']);\n\t\t\t}\n\n\t\t\treturn response()->json($result);\n\t\t} catch (\\Exception $error) {\n\t\t\treturn response()->json(['error' => 'bad_request'], Response::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "title": "" }, { "docid": "00e6c53ffdad9b8ee0c6767181b7488d", "score": "0.58012635", "text": "public function getAllRows() {\n $roles = Role::all();\n return view('pages.cart.roles', ['roles' => $roles]);\n }", "title": "" }, { "docid": "f2a7ecd020bc96079450044b2f39deb7", "score": "0.5801072", "text": "public function index()\n {\n $result = Privilege::paginate(5);\n return $result;\n }", "title": "" }, { "docid": "45e6eeb5b17b32f3a357da427d56bb3e", "score": "0.5797541", "text": "public function index()\n {\n\n\n $list = users::where('status', '!=', '2')\n ->paginate(10);\n // dd($list);\n // ->get();\n $data = [\n 'pagename' => $this->pagename,\n 'route' => $this->route,\n 'list' => $list\n ];\n return view('backend.role.list', $data);\n }", "title": "" }, { "docid": "1d96f2d1eac2dc9e3e3ace5593c2cc68", "score": "0.57942283", "text": "public function filter(Request $request,$prefix){\n\n $data = Role::paginate(100);\n if($request->search != \"\"){\n $data = Role::where('name','like','%'.$request->search.'%')->paginate(100);\n }\n\n return view('core::auth.roles.index',[\n 'prefix'=>$prefix,\n 'datas'=>$data,\n 'modules'=>$this->module->getAllActiveWithoutPaginate(),\n 'submodules'=>$this->submodule->getAllActiveWithoutPaginate(),\n ]);\n }", "title": "" }, { "docid": "aa383f786d07a6586489a97c623f74c3", "score": "0.57914865", "text": "public function index()\n {\n $menus = DB::table('menus')->get();\n $rolesDetails = Roles::paginate(10);\n return view('Admin.roles.index', compact('rolesDetails','menus'));\n }", "title": "" }, { "docid": "16ff430d72632082e4bb642c6579d91a", "score": "0.5787938", "text": "public function index()\n {\n $currentUser = getApiCurrentUser();\n $roles = Roles::where('created_by', $currentUser->user_id)->paginate(dataPerPage());\n\t\treturn Response()->json(['status'=>true, 'message' => 'Get all roles.', 'response' => compact('roles')], 200);\n }", "title": "" }, { "docid": "ff8e402ca63cc724cb9df30a37cee75f", "score": "0.57815397", "text": "public function index()\n {\n $roles = Role::orderBy('name')->paginate(setting('records_per_page', '15'));\n\n return view('roles/index', compact('roles'));\n }", "title": "" }, { "docid": "f114a6b364f43fe9d76ee03c660784e7", "score": "0.5775272", "text": "public function index()\n {\n $users = User::with('roles')->paginate(10);\n foreach ($users as $user) {\n $hasRoles = $user->roles;\n $roleDisplayNames = [];\n foreach ($hasRoles as $role) {\n $roleDisplayNames[] = $role->display_name;\n }\n $user->roleDisplayNames = implode(',', $roleDisplayNames);\n }\n return view('admin.user.list', compact('users'));\n }", "title": "" }, { "docid": "b767560502ad56f77372daa617613022", "score": "0.57723224", "text": "public function get_users($offset,$limit,$sort) {\n $this->db->select('roles.role_id,user.firstname,user.lastname,user.email,GROUP_CONCAT(roles.role_name) AS role,user.status,user.user_id');\n $this->db->from('user');\n $this->db->join('user_role', 'user.user_id = user_role.user_id');\n $this->db->join('roles','roles.role_id=user_role.role_id');\n $this->db->where('user_role.role_id', 5);\n $this->db->group_by('user.user_id');\n $this->db->order_by('user.user_id',$sort);\n $this->db->limit($limit,$offset);\n $query = $this->db->get(); \n return $query->result_array();\n }", "title": "" }, { "docid": "714d810f5c6d59a11ab91bbc7673ca77", "score": "0.57694435", "text": "public function index()\n {\n $i=0;\n\n foreach (Rol::orderBy('nombre')->get() as $rol)\n {\n $vtOpciones = VTModuloOpcion::select('modulo', 'modulo_nombre', 'opcion', 'opcion_nombre')\n ->orderBy('modulo_nombre')\n ->orderBy('opcion_nombre')\n ->get();\n\n if (!empty($vtOpciones))\n {\n $roles[$i]['rol'] = $rol->rol;\n $roles[$i]['nombre'] = $rol->nombre;\n $roles[$i]['descripcion'] = $rol->descripcion;\n $roles[$i]['tiene_rol'] = false;\n\n $j=0;\n\n foreach ($vtOpciones as $opcion)\n {\n $roles[$i]['opciones'][$j]['modulo'] = $opcion->modulo;\n $roles[$i]['opciones'][$j]['modulo_nombre'] = $opcion->modulo_nombre;\n $roles[$i]['opciones'][$j]['opcion'] = $opcion->opcion;\n $roles[$i]['opciones'][$j]['opcion_nombre'] = $opcion->opcion_nombre;\n\n $vtRolOpcion = VTRolOpcion::where('rol', $rol->rol)\n ->where('opcion', $opcion->opcion)\n ->select('consulta', 'adiciona', 'edita', 'elimina', 'ejecuta')\n ->get()\n ->first();\n\n if (!empty($vtRolOpcion))\n {\n $roles[$i]['opciones'][$j]['consulta'] = $vtRolOpcion->consulta == 1 ? true : false;\n $roles[$i]['opciones'][$j]['adiciona'] = $vtRolOpcion->adiciona == 1 ? true : false;\n $roles[$i]['opciones'][$j]['edita'] = $vtRolOpcion->edita == 1 ? true : false;\n $roles[$i]['opciones'][$j]['elimina'] = $vtRolOpcion->elimina == 1 ? true : false;\n $roles[$i]['opciones'][$j]['ejecuta'] = $vtRolOpcion->ejecuta == 1 ? true : false;\n }\n else\n {\n $roles[$i]['opciones'][$j]['consulta'] = false;\n $roles[$i]['opciones'][$j]['adiciona'] = false;\n $roles[$i]['opciones'][$j]['edita'] = false;\n $roles[$i]['opciones'][$j]['elimina'] = false;\n $roles[$i]['opciones'][$j]['ejecuta'] = false;\n }\n\n $j++;\n }\n\n $i++;\n }\n }\n\n return response()->json(['roles' => $roles]);\n }", "title": "" }, { "docid": "88aef07e95abbb53e06521d687f3ffcc", "score": "0.57656497", "text": "public function index()\n {\n $result = Role::all();\n return [\n 'items'=> $result,\n 'total'=> count($result)\n ];\n }", "title": "" }, { "docid": "031c7bb7418f47bd5e12992eff95a678", "score": "0.5764218", "text": "public function index_role()\n {\n return Role::all();\n }", "title": "" }, { "docid": "0f0f39833795cf356c77a76c76f75fad", "score": "0.57628083", "text": "public function getRoles(): Collection;", "title": "" }, { "docid": "c3257879dfcc6d15bf103a3bc073050b", "score": "0.5754526", "text": "public function index()\n {\n $categories = role::latest()->paginate(8);\n return view('bioProduct.role.index',compact('categories'));\n }", "title": "" }, { "docid": "518bfdbbe962e3df30e7b8b9dc024120", "score": "0.57452756", "text": "public function roleuserlist(){\n $data=[];\n //$users=User::all();\n $roles=Role::all();\n $users = User::role($roles)->get();\n\n foreach ($users as $user){\n $userrole =[$user->name,$user->id,$user->getRoleNames()];\n array_push($data,$userrole);\n }\n\n return view('acl.role.roleuserlist')->with('userroles',$data);\n }", "title": "" }, { "docid": "9ae25e709e36670c9b4a16e6c824646b", "score": "0.5742676", "text": "public function fetchRoles() {\n\t\tif( ! is_null( $this->roles ) ) return $this->roles;\n\t\treturn $this->roles = $this->dbh->fetchGroup( \"roleId\", \"rolename\", \"select distinct( roleId ), rolename from roles\" );\n\t}", "title": "" }, { "docid": "f117d0efbe87dfdf2acfcda7c5812d6e", "score": "0.5734561", "text": "public function index(Request $request){\n //only for admin and manager\n if(!$request->user()->hasAnyRole(['admin','manager','client'])){\n return response()->json(array_merge([\n 'success'=>false],__('messages.role_error')),403);\n }\n $page = $request->get('page')?:0;\n $limit = $request->get('limit')?:100;\n $usersQuery = User::query()\n ->with(['role'=>function($query){\n return $query->select(['id','name','description']);\n },'parent'=>function($query){\n $query->select(['id','first_name','last_name','father_name','role_id'])\n ->with(['role'=>function($rq){\n $rq->select(['id','name']);\n }]);\n }]);\n if($request->user()->hasRole('client')){\n $usersQuery->where(['parent_id'=>$request->user()->id])->orWhere(['id'=>$request->user()->id]);\n }\n $totalRows = $usersQuery->count();\n $users = $usersQuery\n ->offset($page*$limit)\n ->limit($limit)\n ->get();\n return response()->json([\n 'Users'=>$users,\n 'totalRows'=>$totalRows,\n 'success'=>true\n ],200);\n }", "title": "" }, { "docid": "b7b97d09d7bb341661844a03ea5df13e", "score": "0.57330996", "text": "public function roles(){\n\n $roles = array();\n $role = Role::find(auth()->user()->role_id);\n\n switch ($role->name) {\n case config('commanConfig.ee_branch_head'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.ee_branch_head'),\n config('commanConfig.ee_deputy_engineer'),\n config('commanConfig.ee_junior_engineer'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.vp_engineer'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.vp_engineer'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.estate_manager'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.estate_manager'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.legal_advisor'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.legal_advisor'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.senior_architect_planner'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.senior_architect_planner'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.architect'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.architect'),\n config('commanConfig.junior_architect'),\n config('commanConfig.senior_architect'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.cap_engineer'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.cap_engineer'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.land_manager'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.land_manager'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.ree_branch_head'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.ree_junior'),\n config('commanConfig.ree_deputy_engineer'),\n config('commanConfig.ree_assistant_engineer'),\n config('commanConfig.ree_branch_head'),\n config('commanConfig.co_engineer'),\n ))->pluck('id')->toArray();\n break;\n case config('commanConfig.co_engineer'):\n $roles = Role::whereIn('name', array(\n config('commanConfig.ee_branch_head'),\n config('commanConfig.ee_deputy_engineer'),\n config('commanConfig.ee_junior_engineer'),\n config('commanConfig.co_engineer'),\n config('commanConfig.vp_engineer'),\n config('commanConfig.cap_engineer'),\n config('commanConfig.la_engineer'),\n config('commanConfig.land_manager'),\n config('commanConfig.estate_manager'),\n config('commanConfig.architect'),\n config('commanConfig.junior_architect'),\n config('commanConfig.senior_architect'),\n config('commanConfig.ree_junior'),\n config('commanConfig.ree_deputy_engineer'),\n config('commanConfig.ree_assistant_engineer'),\n config('commanConfig.ree_branch_head'),\n config('commanConfig.senior_architect_planner'),\n ))->pluck('id')->toArray();\n break;\n default:\n return back()->with('error', 'Invalid Request');\n break;\n }\n return $roles;\n }", "title": "" }, { "docid": "33d6f440e1ee49530f6555ebe2c90598", "score": "0.5732829", "text": "public function search(Request $request)\n {\n $roleQuery = Role::stored();\n\n $query = $request->input('query');\n $pagination = $request->input('pagination');\n\n $search = isset($query['search']) ? $query['search'] : '';\n $status = isset($query['status']) ? $query['status'] : '';\n\n $page = (int) $pagination['page'];\n $count = (int) $pagination['perpage'];\n $startIndex = ($page - 1) * $count;\n\n $sort = $request->input('sort');\n $sortBy = isset($sort['field']) ? $sort['field'] : 'autoId';\n $sortDir = isset($sort['sort']) ? $sort['sort'] : 'desc';\n\n if(isset($sort)) {\n $roleQuery->orderBy($sortBy, $sortDir);\n }\n\n if(!empty($search)) {\n $roleQuery->search($search);\n }\n\n if(!empty($status)) {\n $roleQuery->status($status);\n }\n\n $rolesCount = $roleQuery->count();\n if($startIndex != -1) {\n $roleQuery->offset($startIndex)->limit($count);\n }\n\n $roles = $roleQuery->get();\n\n $meta = [\n 'page' => $page,\n 'pages' => ceil($rolesCount / $count),\n 'perpage' => $count,\n 'total' => $rolesCount,\n 'sort' => $sortDir,\n 'field' => $sortBy,\n 'startIndex' => $startIndex\n ];\n\n return response()->json(['status' => true , 'message' => 'Role retrieved successfully' , 'result' => $roles , 'meta' => $meta]);\n }", "title": "" }, { "docid": "0cd8d24ea98028820988963976ae3b61", "score": "0.5714056", "text": "public function index()\n {\n $roles = Role::with('permissions','modules')->orderBy('id','ASC')->where('activo',true)->get();\n return $roles; \n }", "title": "" }, { "docid": "314628f29f0b533846db794fcc5082cc", "score": "0.57107675", "text": "public function index()\n {\n $keyword = request()->get('keyword');\n $data = Roles::when('keyword',function($query)use($keyword){\n $query->where('name','like','%'.$keyword.'%');\n })->paginate($this->paginate);\n return view('admin/Role/index',compact('data'));\n }", "title": "" }, { "docid": "dbbd9cc720f13a52a8110c0802508370", "score": "0.5709431", "text": "public function findAllCourseAdminRoles() {\n $this->roleArray = array();\n\n $set = $this->db->query('SELECT * FROM object_data WHERE type=\"role\" AND title LIKE \"il_crs_admin_%\"');\n\n while ($rec = $this->db->fetchAssoc($set)) {\n $this->roleArray[] = array('role_id' => (int)$rec['obj_id'], 'type' => $rec['type'], 'title' => $rec['title'], 'description' => $rec['description']);\n }\n }", "title": "" }, { "docid": "a13019845398f29c9dbed18d2851133f", "score": "0.5701997", "text": "public function getRoles();", "title": "" }, { "docid": "a13019845398f29c9dbed18d2851133f", "score": "0.5701997", "text": "public function getRoles();", "title": "" }, { "docid": "a13019845398f29c9dbed18d2851133f", "score": "0.5701997", "text": "public function getRoles();", "title": "" }, { "docid": "a13019845398f29c9dbed18d2851133f", "score": "0.5701997", "text": "public function getRoles();", "title": "" }, { "docid": "a13019845398f29c9dbed18d2851133f", "score": "0.5701997", "text": "public function getRoles();", "title": "" }, { "docid": "a13019845398f29c9dbed18d2851133f", "score": "0.5701997", "text": "public function getRoles();", "title": "" }, { "docid": "8ba6925cf33634a6295906ae28463a15", "score": "0.56924593", "text": "public function index(Request $request)\n {\n $roles = $this->my_query($request, ['id', 'name', 'description', 'status'])->paginate($request->get('paginate', 25));//echo '<pre>';print_r($users);exit;\n $roles->appends($request->except(['page']));\n $search_values = $this->my_search_values($request, ['id', 'name', 'description', 'status']);\n return view('role.index',compact('roles', 'search_values'));\n }", "title": "" }, { "docid": "86de4d548efe847b067bf2eac3b49eac", "score": "0.569145", "text": "public function index(Request $request)\n {\n $list = Role::orderBy('id', 'DESC');\n if ($request->has('keyword')) {\n $keyword = $request->get('keyword');\n $list = $list->where('name', 'like', \"%$keyword%\");\n }\n $list = $list->paginate(5);\n return view('admin.role.list', ['list' => $list])\n ->with('i', ($request->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "adacc2cf9d5a05103c375eaeee7d4392", "score": "0.56877583", "text": "public function index($n, $role)\n {\n if($role != 'total')\n {\n return $this->model\n ->with('role')\n ->whereHas('role', function($q) use($role) {\n $q->whereSlug($role);\n })\n ->oldest('seen')\n ->latest()\n ->paginate($n);\n }\n return $this->model\n ->with('role')\n ->oldest('seen')\n ->latest()\n ->paginate($n);\n }", "title": "" }, { "docid": "2547e3002560ef59b104cb6dd71a6da6", "score": "0.5682724", "text": "public function index(Request $request)\n {\n $this->authorize('view', Role::class);\n\n return new RoleCollection(\n Role::filterOn($request)->paginate($request->itemsPerPage)\n );\n }", "title": "" }, { "docid": "cc8b59049a0ea013826ac47c3dbaeecc", "score": "0.56813616", "text": "function listDistriClient($paginate)\n {\n return User::role([2,3])->with(['scores'])\n ->paginate($paginate);\n }", "title": "" }, { "docid": "71c7dd6a142d7f8965f6ad4143ca416e", "score": "0.5677402", "text": "public function index()\n {\n $authPermission=$this->authorize('view-any',Role::class);\n if($authPermission){\n try{\n $roles=Role::with([\"usersRole\",\"permissionsRole\"])->paginate(10);\n if(!empty($roles)){\n return response()->json([\n 'status'=>200,\n 'message'=>$roles\n ]); \n }else{\n return response()->json([\n 'status'=>404,\n 'message'=>'there is no data'\n ]);\n }\n }catch(\\Exception $ex){\n return response()->json([\n 'status'=>500,\n 'message'=>'There is something wrong, please try again'\n ]); \n }\n }\n \n }", "title": "" }, { "docid": "30ba468f58ac942ec2b3984e2acb00a0", "score": "0.5676905", "text": "public function index()\n {\n $data = [\n 'roles'=>Role::all()\n ];\n return $data['roles'];\n }", "title": "" }, { "docid": "393abee0473f183a6f6f7eb11af729cc", "score": "0.56752485", "text": "public function index()\n {\n $tree_ids = Models\\RbacRole::treeIds();\n\n if (!empty($tree_ids)) {\n $ids_ordered = implode(',', $tree_ids);\n $this->crud->addClause('orderByRaw', DB::raw(\"FIELD(id, $ids_ordered)\"));\n }\n\n return parent::index();\n }", "title": "" }, { "docid": "a2cd96ae5952d53ee3455a810809b372", "score": "0.56708723", "text": "public function index()\n {\n $roles=Role::withCount('users')->orderBy('users_count')->get();\n return view('role.list', compact('roles'));\n }", "title": "" }, { "docid": "a03da53a5f105c3ec4c399613152b1df", "score": "0.5656719", "text": "function fetchUserRoles()\n{\n return Authitem::model()->findAllByAttributes(array(\"type\" => \"2\"));\n}", "title": "" }, { "docid": "ebd49bd184f2a8950ecb9421d1d365f2", "score": "0.5635223", "text": "function findAll() {\n return Roles::find(array(\n 'order' => 'name'\n ));\n }", "title": "" }, { "docid": "cc7cb12586b21e0fd559178329f2cc9d", "score": "0.56329125", "text": "public function index()\n {\n return RolesIndexResource::collection(Role::all());\n }", "title": "" } ]
8da5764ec0afb15bdf880e6dba5a7f0d
Cache's The Parsed Settings Config
[ { "docid": "87847a96a85ff12b9ac3151a85a85c67", "score": "0.0", "text": "protected function cacheConfig($index, array $config)\n {\n if ($this->cache instanceof CacheInterface && !empty($config)) {\n // Cache Event\n $this->cache->setCache(__CLASS__ . ':' . $index, $config, false, self::CACHE_EXPIRES);\n }\n }", "title": "" } ]
[ { "docid": "bff664a6f19a5182c5b998162104e18a", "score": "0.71320105", "text": "public function cacheConfig(): void;", "title": "" }, { "docid": "7fe73b7bfd922ac8f0ac62eac8746747", "score": "0.67297244", "text": "public static function configCache() {\n\t\tif ($duration = self::getConfig('cache')) {\n\t\t\tCache::config('queue', array(\n\t\t\t\t'engine' => 'File',\n\t\t\t\t'duration' => $duration,\n\t\t\t\t'path' => CACHE,\n\t\t\t\t'prefix' => 'queue_'\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "1295ec6154b51e19d751bbf6b8f3ba62", "score": "0.65525526", "text": "public static function GetCacheSettings(){\n return ['file'=>static::$cacheFile,'expr'=>static::$cacheExpr];\n }", "title": "" }, { "docid": "de27da51cbf9a26832600a792bf8a6f0", "score": "0.65296197", "text": "public function getCacheConfig()\n {\n \t $iniArray = parse_ini_file ($this->_iniFilePath, true);\n \t $cache = array();\n if (isset($iniArray['Cache'])) {\n \t \t$cache = $iniArray['Cache'];\n }\n\n return $cache;\n }", "title": "" }, { "docid": "d8552f62493022af021909dc6ef156ae", "score": "0.6517426", "text": "protected function _loadConfig() {\n $this->config= $this->_config;\n\n $this->getCacheManager();\n if (!$config = $this->cacheManager->get('config')) {\n $config = $this->cacheManager->generateConfig();\n }\n if (empty($config)) {\n $config = array();\n if (!$settings= $this->getCollection('modSystemSetting')) {\n return false;\n }\n foreach ($settings as $setting) {\n $config[$setting->get('key')]= $setting->get('value');\n }\n }\n $this->config = array_merge($this->config, $config);\n $this->_systemConfig= $this->config;\n return true;\n }", "title": "" }, { "docid": "94d4f63a2bc70abf2089ed3a0cac048a", "score": "0.64996815", "text": "public function getSettings()\n {\n $settings = Cache::read('settings');\n if (!$settings) {\n $settings = $this->Setting->find('first', array(\n 'joins' => array(\n array(\n 'table' => 'company',\n 'alias' => 'Company',\n 'type' => 'left',\n 'conditions' => array(\n 'Company.name !=' => null\n )\n )\n ),\n 'fields' => array('Setting.*', 'Company.*')\n ));\n Cache::write('settings', $settings);\n }\n\n $this->set(array(\n 'title_for_layout' => Router::fullBaseUrl(),\n 'description' => Router::fullBaseUrl(),\n 'keyword' => Router::fullBaseUrl(),\n 'google_analytics' => null\n ));\n if ($settings) {\n $this->set(array(\n 'settings' => $settings,\n 'title_for_layout' => $settings['Setting']['title'],\n 'description' => $settings['Setting']['description'],\n 'keyword' => $settings['Setting']['keyword'],\n 'google_analytics' => $settings['Setting']['google_analytics'],\n ));\n };\n }", "title": "" }, { "docid": "d11136d8457be53822cba98baddbc472", "score": "0.6499177", "text": "public static function config($config = array()) {\r\n\t\tif (!$config && MiCache::$setting) {\r\n\t\t\treturn array(MiCache::$setting => MiCache::$settings[MiCache::$setting]);\r\n\t\t}\r\n\t\t$_defaults = MiCache::$defaultSettings;\r\n\t\tif (Configure::read()) {\r\n\t\t\t$_defaults['duration'] = 100;\r\n\t\t}\r\n\t\t$name = isset($config['name'])?$config['name']:'mi_cache';\r\n\t\tif (!MiCache::$setting) {\r\n\t\t\tMiCache::$setting = $name;\r\n\t\t}\r\n\t\tMiCache::$settings[$name] = am($_defaults, $config);\r\n\t\tif (MiCache::$settings[$name]['path'][0] != '/') {\r\n\t\t\tMiCache::$settings[$name]['path'] = CACHE . MiCache::$settings[$name]['path'];\r\n\t\t}\r\n\t\tif (in_array(MiCache::$settings[$name]['engine'], array('File', 'MiFile')) && !is_dir(MiCache::$settings[$name]['path'])) {\r\n\t\t\tnew Folder(MiCache::$settings[$name]['path'], true);\r\n\t\t}\r\n\t\tCache::config($name, MiCache::$settings[$name]);\r\n\t\treturn array($name => MiCache::$settings[$name]);\r\n\t}", "title": "" }, { "docid": "499b0c57de44c7d5fc2d389b7580843c", "score": "0.6456176", "text": "private static function loadConfigToCache() : void {\n self::$configCache = collect();\n $data = DB::table('cis_config')->get();\n foreach($data as $dataSet) {\n self::$configCache->add($dataSet);\n }\n }", "title": "" }, { "docid": "927ba9fe6c3f6480e425daaa6b10bd91", "score": "0.64534515", "text": "function get_settings()\n\t{\n\t\t// if settings are already in session cache, use those\n\t\tif ( ! isset($this->cache['settings']))\n\t\t{\n\t\t\t$this->EE->db\n\t\t\t\t\t\t->select('settings')\n\t\t\t\t\t\t->from('extensions')\n\t\t\t\t\t\t->where(array('enabled' => 'y', 'class' => __CLASS__ ))\n\t\t\t\t\t\t->limit(1);\n\t\t\t$query = $this->EE->db->get();\n\t\t\t\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$settings = unserialize($query->row()->settings);\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$settings = array();\n\t\t\t}\n\t\t\t\n\t\t\t$query->free_result();\n\n\t\t\t// set our cache, merged with defaults, so we always have a consistent array\n\t\t\t$default = array(\n\t\t\t\t'enable' => 'yes',\n\t\t\t\t'import_dirs' => ''\n\t\t\t);\n\n\t\t\t$this->cache['settings'] = array_merge($default, $settings);\n\t\t}\n\t\t\n\t\treturn $this->cache['settings'];\n\t}", "title": "" }, { "docid": "6cf6d2cf65d3daff936a784f5c704ce7", "score": "0.641148", "text": "public function settings() {\n\t\t$this->cache ['enabled'] = false;\n\t\t$this->cache ['ttl'] = 3600;\n\t\t$this->logs ['enabled'] = false;\n\t\t$this->logs ['detailed'] = false;\n\t}", "title": "" }, { "docid": "f041199525ea2186ccf52c4c64e15ff9", "score": "0.6399766", "text": "public static function GetSettings()\n\t{\n\t\t$obCache = new CPHPCache();\n\t\tif ($obCache->InitCache(self::CACHE_TIME, self::CACHE_ID, self::CACHE_DIR)) {\n\t\t\t$arResult = $obCache->GetVars();\n\t\t} else {\n\t\t\tglobal $DB;\n\t\t\t$arResult = array();\n\t\t\t$strSql = 'SELECT * FROM yen_resizer2_settings';\n\t\t\t$res = $DB->Query($strSql, false, $err_mess.__LINE__);\n\n\t\t\twhile ($setting = $res->GetNext()) {\n\t\t\t\t$arResult[$setting['NAME']] = $setting['VALUE'];\n\t\t\t}\n\t\t\tif ($obCache->StartDataCache()) {\n\t\t\t\tif (defined(\"BX_COMP_MANAGED_CACHE\")) {\n\t\t\t\t\tglobal $CACHE_MANAGER;\n\t\t\t\t\t$CACHE_MANAGER->StartTagCache(self::CACHE_DIR);\n\t\t\t\t\t$CACHE_MANAGER->RegisterTag(self::CACHE_ID);\n\t\t\t\t\t$CACHE_MANAGER->EndTagCache();\n\t\t\t\t}\n\t\t\t\t$obCache->EndDataCache($arResult);\n\t\t\t}\n\t\t}\n\t\treturn $arResult;\n\t}", "title": "" }, { "docid": "c6c56b023ec1bdfbc77601ffe28fea16", "score": "0.63967645", "text": "public function getCacheSettings() {\n $cache_settings['grace'] = $this->varnishHandler->getSettings('general.grace');\n // Load $cacheable data from response.\n $cacheable = $this->response->getCacheableMetadata();\n // Define tags.\n $cache_settings['tags'] = $cacheable->getCacheTags();\n // Set ttl.\n $cache_settings['ttl'] = $this->varnishHandler->getSettings('general.page_cache_maximum_age');\n // Get cache control header.\n $cache_settings['cache_control'] = $this->varnishHandler->getSettings('cache_control');\n // Return settings.\n return $cache_settings;\n }", "title": "" }, { "docid": "1d3726423af224f9fc68ce8389d34bd5", "score": "0.6295701", "text": "public function cacheConfig(): void\n {\n $configFileName = APPLICATION_ROOT . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'config.cache';\n file_put_contents($configFileName, serialize($this));\n }", "title": "" }, { "docid": "b5b0043bc5d8d744ade54f6bf1e63aad", "score": "0.6237299", "text": "public function load()\n {\n $location = $this->location;\n\n // no location given from commandline -> use config values or fallback to default location\n if (empty($location)) {\n $location = $this->parameters->get(\n 'read_location',\n $this->parameters->get(\n 'location',\n $this->getDefaultLocation()\n )\n );\n }\n\n $this->location = $location;\n\n if (!is_readable($location) || !is_file($location)) {\n return false;\n }\n\n $content = file_get_contents($location);\n\n if (false === $content) {\n return false;\n }\n\n $result = json_decode($content, true);\n\n if (null === $result) {\n throw new \\InvalidArgumentException('Cache could not be decoded from file: ' . $location);\n }\n\n $items = array();\n foreach ($result as $setting) {\n $items[] = new Setting($setting['name'], $setting['value'], $setting['group'], $setting['flag']);\n }\n\n $this->settings = $items;\n\n return true;\n }", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.6235943", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.6235943", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.6235943", "text": "public function getSettings();", "title": "" }, { "docid": "980c8212e3c0e636857057e5aca4a9ac", "score": "0.6202135", "text": "public function load()\n {\n $settings = $this->settingsRepository->all();\n config()->set(config('app.settings_key'), $settings->pluck('value', 'key'));\n }", "title": "" }, { "docid": "4a5a7c444ec62d3d30491ac30b4f6c11", "score": "0.61833024", "text": "protected function config()\n {\n return [\n 'default' => 'array',\n 'life_time' => 1800,\n 'drivers' => [\n 'file' => [\n 'path' => sys_get_temp_dir() . '/cache/',\n ]\n ]\n ];\n }", "title": "" }, { "docid": "bd0bbb6960f62fa12e977404b3df7f44", "score": "0.61765933", "text": "protected function getSettings()\n {\n return parse_ini_file(\"settings.ini\");\n }", "title": "" }, { "docid": "a03c9a981b36b123a6176add42c7d43a", "score": "0.61752695", "text": "protected function _config(){}", "title": "" }, { "docid": "1f5896906c964412dc611c4303c749b4", "score": "0.6162708", "text": "function site($name)\n{\n try {\n $site = App\\Core\\Cache::grab('settings');\n foreach ($site as $config) {\n if ($config->name == $name) {\n return $config->value;\n }\n }\n } catch (\\Exception $ex) {\n // Do Nothing\n }\n}", "title": "" }, { "docid": "15619becbf5da45c2a17e8d055eb4018", "score": "0.6145063", "text": "function get_settings()\n\t{\n\t\tif ( ! $this->db->table_exists('settings'))\n\t\t{\n\t\t\tredirect('setup');\n\t\t}\n\t\t$this->db->select('short_name,value')->from('settings')->where('auto_load', 'yes');\n\t\t$query = $this->db->get();\n\t\tforeach ($query->result() as $k=>$row)\n\t\t{\n\t\t\t$this->settings[$row->short_name] = $row->value;\n\t\t}\n\t\t//check cron\n\t\t$this->_cron();\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "83f6b6f0d20db359e8467ce3155fe8a3", "score": "0.6142711", "text": "function generate_config_cache()\n{\n\tglobal $db;\n\t$result = $db->query('SELECT * FROM '.$db->prefix.'config', true) or error('Unable to fetch forum config', __FILE__, __LINE__, $db->error());\n\twhile ($cur_config_item = $db->fetch_row($result)) $output[$cur_config_item[0]] = $cur_config_item[1];\n\t$fh = @fopen(FORUM_ROOT.'cache/cache_config.php', 'wb');\n\tif (!$fh) error('Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory \\'cache\\'', __FILE__, __LINE__);\n\tfwrite($fh, '<?php'.\"\\n\\n\".'define(\\'CONFIG_LOADED\\', 1);'.\"\\n\\n\".'$configuration = '.var_export($output, true).';'.\"\\n\\n\".'?>');\n\tfclose($fh);\n}", "title": "" }, { "docid": "94ec7320d5191d221cfaa0e0a6161bb4", "score": "0.6138276", "text": "function generate_config_cache()\n{\n\tglobal $forum_db;\n\n\t$return = ($hook = get_hook('ch_fn_generate_config_cache_start')) ? eval($hook) : null;\n\tif ($return != null)\n\t\treturn;\n\n\t// Get the forum config from the DB\n\t$query = array(\n\t\t'SELECT'\t=> 'c.*',\n\t\t'FROM'\t\t=> 'config AS c'\n\t);\n\n\t($hook = get_hook('ch_fn_generate_config_cache_qr_get_config')) ? eval($hook) : null;\n\t$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);\n\n\t$output = array();\n\twhile ($cur_config_item = $forum_db->fetch_assoc($result))\n\t\t$output[$cur_config_item['conf_name']] = $cur_config_item['conf_value'];\n\n\t// Output config as PHP code\n\tif (!write_cache_file(FORUM_CACHE_DIR.'cache_config.php', '<?php'.\"\\n\\n\".'define(\\'FORUM_CONFIG_LOADED\\', 1);'.\"\\n\\n\".'$forum_config = '.var_export($output, true).';'.\"\\n\\n\".'?>'))\n\t{\n\t\terror('Unable to write configuration cache file to cache directory.<br />Please make sure PHP has write access to the directory \\'cache\\'.', __FILE__, __LINE__);\n\t}\n}", "title": "" }, { "docid": "8f10e40427fd75dc2e305138017f9863", "score": "0.6134788", "text": "abstract protected function _config();", "title": "" }, { "docid": "842365934be1b6d2b2d55cc2f0712111", "score": "0.6100857", "text": "private function __construct() {\n\t\t\tself::$cache = wp_parse_args( get_site_option( self::SETTINGS_KEY, array(), false ), self::$defaults );\n\t\t}", "title": "" }, { "docid": "0609eca5c6c6feb5b38b8d1ff768b89d", "score": "0.6098122", "text": "public function settings();", "title": "" }, { "docid": "55d1051ba8dd8ab92aec79871377e6cc", "score": "0.6073955", "text": "private function _getSettings($refresh = FALSE) {\n\n\t\t$EE =& get_instance();\n\t\t$settings = FALSE;\n\n\t\tif (\n\t\t\t// if there are settings in the settings cache\n\t\t\tisset($this->cache[SITE_ID]['settings']) === TRUE \n\t\t\t// and we are not forcing a refresh\n\t\t\tAND $refresh != TRUE\n\t\t) {\n\t\t\t// get the settings from the session cache\n\t\t\t$settings = $this->cache[SITE_ID]['settings'];\n\t\t} else {\n\t\t\t$settings_query = $EE->db->get_where(\n\t\t\t\t\t\t\t\t\tself::$settings_table,\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'addon_id' => $this->addon_id,\n\t\t\t\t\t\t\t\t\t\t'site_id' => SITE_ID\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t// there are settings in the DB\n\t\t\tif ($settings_query->num_rows()) {\n\n\t\t\t\tif ( ! function_exists('json_decode')) {\n\t\t\t\t\t$$EE->load->library('Services_json');\n\t\t\t\t}\n\n\t\t\t\t$settings = json_decode($settings_query->row()->settings, TRUE);\n\t\t\t\t$this->_saveSettingsToSession($settings);\n\t\t\t\tlog_message('info', __CLASS__ . \" : \" . __METHOD__ . ' getting settings from session');\n\t\t\t}\n\t\t\t// no settings for the site\n\t\t\telse {\n\t\t\t\t$settings = $this->_buildDefaultSiteSettings(SITE_ID);\n\t\t\t\t$this->_saveSettings($settings);\n\t\t\t\tlog_message('info', __CLASS__ . \" : \" . __METHOD__ . ' creating new site settings');\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// Merge config settings\n\t\tforeach ($settings as $key => $value) {\n\t\t\tif($EE->config->item($this->addon_id . \"_\" . $key)) {\n\t\t\t\t$settings[$key] = $EE->config->item($this->addon_id . \"_\" . $key);\n\t\t\t}\n\t\t}\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "ce035c4326b8c881f2276637138f1126", "score": "0.60662895", "text": "protected function parseRedis()\n {\n if (empty($config = getenv($this->redis))) {\n return;\n }\n\n if ($url = parse_url($config)) {\n if (isset($url['host'])) {\n config(['database.redis.default.host' => $url['host']]);\n config(['database.redis.cache.host' => $url['host']]);\n }\n\n if (isset($url['path'])) {\n config(['database.redis.default.database' => substr($url['path'], 1)]);\n config(['database.redis.cache.database' => substr($url['path'], 1)]);\n }\n\n if (isset($url['port'])) {\n config(['database.redis.default.port' => $url['port']]);\n config(['database.redis.cache.port' => $url['port']]);\n }\n\n if (isset($url['pass'])) {\n config(['database.redis.default.password' => $url['pass']]);\n config(['database.redis.cache.password' => $url['pass']]);\n }\n }\n }", "title": "" }, { "docid": "1a2762cc8814c89e75a227f7c16959c8", "score": "0.6058459", "text": "function getSettings() {\n\n if (!is_array($this->config) || !sizeof($this->config)) {\n \n // System settings\n $rs = $this->db->select('setting_name, setting_value', $this->getFullTableName('system_settings'));\n while ($row = $this->db->getRow($rs)) {\n $this->config[$row['setting_name']] = $row['setting_value'];\n }\n\n $this->getUserSettings(); \n \n }\n }", "title": "" }, { "docid": "3181abb281f0b8a3f56e1db4b97647a2", "score": "0.605317", "text": "public function settings() {\n\t\t\t$this->amz_settings = maybe_unserialize( get_option( $this->alias . '_amazon' ) );\n\t\t\t$this->amz_settings = !empty($this->amz_settings) && is_array($this->amz_settings) ? $this->amz_settings : array();\n\t\t\t$this->build_amz_settings();\n\n\t\t\t$settings = $this->amz_settings;\n\t\t\treturn $settings;\n\t\t}", "title": "" }, { "docid": "e0e392a27db0505c1b4cd1b7263794d3", "score": "0.6051857", "text": "static function config (){\r\n\t\treturn self::$instance->config;\r\n\t}", "title": "" }, { "docid": "66c21c64573921ba95fdf23919ee1472", "score": "0.60496396", "text": "protected function getCached($name)\n {\n if ($values = $this->readCache($name)) {\n return $this->configs[$name] = new Config($values);\n }\n }", "title": "" }, { "docid": "b8f9859e52924d76559e3919cff123bf", "score": "0.6043001", "text": "private function initConfig()\n {\n $configStr = \\file_get_contents(SITE_BASE . '/config.json');\n self::$config = \\json_decode($configStr);\n\n if (!isset($this->config->cookieTimeout)) {\n self::$config->cookieTimeout = 3600;\n }\n\n if (!empty(self::$config->username)) {\n self::$config->username = \\trim(self::$config->username);\n }\n\n if (!empty(self::$config->location)) {\n self::$config->location = \\rtrim(\\trim(self::$config->location), '/');\n }\n }", "title": "" }, { "docid": "9a133b864fc93f84d8ff1570cb4cb0b4", "score": "0.6015143", "text": "function generate_advertising_config_cache()\n{\n\tglobal $db;\n\t$result = $db->query('SELECT * FROM '.$db->prefix.'advertising_config', true) or error('Unable to fetch advertising config', __FILE__, __LINE__, $db->error());\n\twhile ($cur_config_item = $db->fetch_row($result)) $output[$cur_config_item[0]] = $cur_config_item[1];\n\t$fh = @fopen(FORUM_ROOT.'cache/cache_ads_config.php', 'wb');\n\tif (!$fh) error('Unable to write advertising configuration cache file to cache directory. Please make sure PHP has write access to the directory \\'cache\\'', __FILE__, __LINE__);\n\tfwrite($fh, '<?php'.\"\\n\\n\".'define(\\'ADS_CONFIG_LOADED\\', 1);'.\"\\n\\n\".'$ads_config = '.var_export($output, true).';'.\"\\n\\n\".'?>');\n\tfclose($fh);\n}", "title": "" }, { "docid": "9e593c2080a3254fbac4c3eee2dcc212", "score": "0.60131407", "text": "public static function setConfigOptions() {\n $registry = Zend_Registry::getInstance();\n $objCacheManager = new GTL_CacheManager();\n $siteOptions = $objCacheManager->getCacheData('siteOptions');\n /* By Dharmand Andhariya\n if (!$result = $registry->cacheDbObj->load('setOptionsResult') )\n {\n $model = new Model_Siteoptions();\n $options = $model->getTable()->fetchAll();\n $siteOptions = array();\n foreach ($options as $option)\n {\n $siteOptions[$option['opt_key']] = $option['opt_value'];\n }\n $registry->cacheDbObj->save($siteOptions, 'setOptionsResult');\n }\n else\n {\n $siteOptions = $registry->cacheDbObj->load('setOptionsResult');\n }\n */\n $registry->siteOptions = unserialize($siteOptions);\n }", "title": "" }, { "docid": "d87f2f7fbee7c3c211d0b9c9326845c3", "score": "0.60101706", "text": "function generate_config_cache()\n{\n\tglobal $forum_db;\n\n\t$return = ($hook = get_hook('ch_fn_generate_config_cache_start')) ? eval($hook) : null;\n\tif ($return != null)\n\t\treturn;\n\n\t// Get the forum config from the DB\n\t$query = array(\n\t\t'SELECT'\t=> 'c.*',\n\t\t'FROM'\t\t=> 'config AS c'\n\t);\n\n\t($hook = get_hook('ch_qr_get_config')) ? eval($hook) : null;\n\t$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);\n\n\t$output = array();\n\twhile ($cur_config_item = $forum_db->fetch_row($result))\n\t\t$output[$cur_config_item[0]] = $cur_config_item[1];\n\n\t// Output config as PHP code\n\t$fh = @fopen(FORUM_CACHE_DIR.'cache_config.php', 'wb');\n\tif (!$fh)\n\t\terror('Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory \\'cache\\'.', __FILE__, __LINE__);\n\n\tfwrite($fh, '<?php'.\"\\n\\n\".'define(\\'FORUM_CONFIG_LOADED\\', 1);'.\"\\n\\n\".'$forum_config = '.var_export($output, true).';'.\"\\n\\n\".'?>');\n\n\tfclose($fh);\n}", "title": "" }, { "docid": "507c3ea43134c3c5b6bd85942a64dfe9", "score": "0.6009556", "text": "public static function configurationIsCached()\n {\n }", "title": "" }, { "docid": "032671d8863e8a080e426e610c4b8328", "score": "0.5999037", "text": "private function _load_settings()\n\t{\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$row = $this->EE->db->get('extensions')->row();\n\t\tif (empty($row->settings)) $settings = array();\n\t\telse $settings = unserialize($row->settings);\n\n\t\tif (empty($settings['hidden_channels']) OR ! is_array($settings['hidden_channels']))\n\t\t{\n\t\t\t$settings['hidden_channels'] = array();\n\t\t}\n\n\t\tif (empty($settings['hidden_edit']) OR ! is_array($settings['hidden_edit']))\n\t\t{\n\t\t\t$settings['hidden_edit'] = array();\n\t\t}\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "333ff8b1d94fb819ae7192a9c65d2bee", "score": "0.5995439", "text": "private function readConfig() {\n foreach ($this->configArray as $key => $config) {\n if (strpos($key, 'twitter') == 0) {\n $this->twitterConfigArray[] = unserialize($config);\n }\n elseif (strpos($key, 'linkedin') == 0) {\n $this->linkedinConfigArray[] = unserialize($config);\n }\n elseif (strpos($key, 'facebook') == 0) {\n $this->facebookConfigArray[] = unserialize($config);\n }\n elseif (strpos($key, 'instagram') == 0) {\n $this->instagramConfigArray[] = unserialize($config);\n }\n }\n }", "title": "" }, { "docid": "db4f6466703865971f2fa116af514892", "score": "0.59903663", "text": "function getSettings()\n {\n $config = json_decode(file_get_contents(__DIR__ . \"/settings.txt\"));\n if ($config == null) {\n return false;\n }\n return $config;\n }", "title": "" }, { "docid": "9441ff693f17030909a63856fe00c230", "score": "0.59686893", "text": "function cacheing_environment()\n\t{\n\t\t$info=array();\n\t\t$info['cache_on']=array('block_side_rss__cache_on');\n\t\t$info['ttl']=intval(get_option('rss_update_time'));\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "173cde0f6125174fbe13444b413ebe37", "score": "0.596504", "text": "public static function all() {\n\n\t\tif( empty( self::$settings ) ) {\n\t\t\t$configIncFound = false;\n\n\t\t\t# Include default configuration settings\n\t\t\trequire_once( LITHIUM_APP_PATH . '/config/config_defaults_inc.php' );\n\n\t\t\t# config_inc may not be present if this is a new install\n\t\t\tif ( file_exists( LITHIUM_APP_PATH . '/config/config_inc.php' ) ) {\n\t\t\t\trequire_once( LITHIUM_APP_PATH . '/config/config_inc.php' );\n\t\t\t\t$configIncFound = true;\n\t\t\t}\n\n\t\t\t# Allow an environment variable (defined in an Apache vhost for example)\n\t\t\t# to specify a config file to load to override other local settings\n\t\t\t$localConfig = getenv( 'MANTIS_CONFIG' );\n\t\t\tif ( $localConfig && file_exists( $localConfig ) ){\n\t\t\t\trequire_once( $localConfig );\n\t\t\t\t$configIncFound = true;\n\t\t\t}\n\n\t\t\tif( $configIncFound ) {\n\t\t\t\t$vars = get_defined_vars();\n\t\t\t\tself::$settings = new stdClass();\n\t\t\t\tforeach( $vars AS $key=>$val ) {\n\t\t\t\t\tif( strpos( $key, 'g_' ) === 0 ) {\n\t\t\t\t\t\t$key = substr( $key, 2 );\n\t\t\t\t\t\tself::$settings->$key = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn self::$settings;\n\t}", "title": "" }, { "docid": "4ff3cd736e739da3793c0c2335389e54", "score": "0.59646225", "text": "private function extractConfig()\n {\n $connByConfig = Config::getInstance()->get(\"connections\");\n $config = [];\n\n foreach ($connByConfig as $name => $con) {\n $config[$name] = $this->parseConfig($con);\n }\n\n $this->configuration = $config;\n }", "title": "" }, { "docid": "977606197d8c9237e736a462ebd99a75", "score": "0.5957906", "text": "protected function settings()\n\t{\n\t\tif (is_null(self::$settings))\n\t\t{\n\t\t\tself::$settings = array(\n\t\t\t\t'manifestPath' => craft()->config->get('manifestPath', 'assetrev'),\n\t\t\t\t'assetsBasePath' => craft()->config->get('assetsBasePath', 'assetrev'),\n\t\t\t);\n\t\t}\n\n\t\treturn self::$settings;\n\t}", "title": "" }, { "docid": "13e41d707266ce97f69dfabfaaa9269b", "score": "0.5949673", "text": "public function processDebugSettings()\n {\n $settings = $this->controller->getSettings();\n if (isset($settings['mediacache']['cleareverytime']) && $settings['mediacache']['cleareverytime']) {\n // scrub cache directory\n self::scrubDirectoryContents($this->cachedir);\n }\n }", "title": "" }, { "docid": "69ba9d59b9f8c48d9b0758dd4c35a461", "score": "0.59294224", "text": "public function getCache()\n {\n return $this->_dataHelper->getConfig('megamenu/general/cache',$store=null);\n }", "title": "" }, { "docid": "0b955ef47b8ad5cff15206603b8c2fd8", "score": "0.5918851", "text": "private function load_settings()\n {\n $this->settings = DiviRoids_Settings()->settings;\n }", "title": "" }, { "docid": "d189369a027ce769158dd3230a75c138", "score": "0.5915757", "text": "private function config_loaded() {\n // Note: this->config takes precedence\n $this->config = array_merge($this->settings, $this->config);\n\n if (isset ($this->config['disqus_id'])) {\n $this->disqus_id = $this->config['disqus_id'];\n }\n }", "title": "" }, { "docid": "45f8b86fb84586809426061c4c83aeea", "score": "0.59139776", "text": "private function getSettings() {\n if ($this->settings === null) {\n $this->settings = GlobalAutoLinkSettings::get_current();\n if (!$this->settings) return $this->addLinks = false;\n\n $this->excludeTags = (array) $this->settings->ExcludeTags();\n $this->maxLinks = (int) ($this->settings->MaxLinksPerPage) ? $this->settings->MaxLinksPerPage : PHP_INT_MAX;\n\n if (!in_array($this->owner->ClassName, $this->settings->AllowedIn())) $this->addLinks = false;\n }\n\n return $this->settings;\n }", "title": "" }, { "docid": "f9f0e26fa547e520b900ef0fc4e35d49", "score": "0.589639", "text": "private function _initSettings()\r\n {\r\n if ($this->settings_enabled && isset($this->db_conn->tables[$this->settings_table])) {\r\n $query = new QueryBuilder($this->db_conn->tables[$this->settings_table]);\r\n $arr = $query->select()->execute();\r\n $return = array();\r\n foreach ($arr as $k => $v) {\r\n if ($v['type'] == \"id\") {\r\n $query = \"select `\" . $v['from_field'] . \"` from `\" . $v['from_table'] . \"` where id=\" . $v['value'];\r\n $return[$v['name']] = array(\r\n \"value\" => $this->db_conn->getOne($query),\r\n \"id\" => $v['value']\r\n );\r\n } else {\r\n $return[$v['name']] = array(\"value\" => $v['value']);\r\n }\r\n }\r\n $this->settings = $return;\r\n }\r\n }", "title": "" }, { "docid": "3d6386e3b017fb3f92aaa1baa4de1407", "score": "0.5892833", "text": "public function initConfig() {\n\t\t$sql = \"SELECT * FROM ZZConfig;\";\n\t\t$rs = $this->db->Execute($sql);\n\t\twhile ($rs != null && !$rs->EOF) {\n\t\t\tdefine(\"Security\\\\\".$rs->Fields['setting_name']->Value, $rs->Fields['setting_value']->Value);\n\t\t\t$rs->MoveNext();\n\t\t}\n\t}", "title": "" }, { "docid": "b9ef3333f83174a46bd5044b8ae5ef1b", "score": "0.588996", "text": "private function loadConfigData()\n {\n //Load config data\n $config = laravelodooConfig();\n\n\n $this->suffix = array_key_exists('api-suffix', $config) ? $config['api-suffix'] : $this->suffix;\n $this->suffix = laravelodooAddCharacter($this->suffix, '/');\n\n $this->host = array_key_exists('host', $config) ? $config['host'] : $this->host;\n $this->host = laravelodooRemoveCharacter($this->host, '/');\n\n $this->db = array_key_exists('db', $config) ? $config['db'] : $this->db;\n $this->username = array_key_exists('username', $config) ? $config['username'] : $this->username;\n $this->password = array_key_exists('password', $config) ? $config['password'] : $this->password;\n }", "title": "" }, { "docid": "fe3c8724c0dae9b8659929a28fafae42", "score": "0.58887124", "text": "protected function configure($params = array()) {\n\n // load custom config files\n f::load(KIRBY_SITE_ROOT_CONFIG . DS . 'config.php');\n f::load(KIRBY_SITE_ROOT_CONFIG . DS . 'config.' . server::get('server_addr') . '.php');\n f::load(KIRBY_SITE_ROOT_CONFIG . DS . 'config.' . server::get('server_name') . '.php');\n\n // merge the late options\n c::set($params);\n\n // connect the cache \n try {\n cache::connect('file', array('root' => KIRBY_SITE_ROOT_CACHE));\n } catch(Exception $e) {\n // do nothing. Caching will just fail silently\n }\n\n // check for multilang support\n static::$multilang = c::get('lang.support');\n\n // store all important roots in the config array\n c::set(array(\n 'root' => KIRBY_INDEX_ROOT,\n 'root.content' => KIRBY_CONTENT_ROOT,\n 'root.kirby' => KIRBY_CMS_ROOT,\n 'root.site' => KIRBY_SITE_ROOT, \n 'root.templates' => KIRBY_SITE_ROOT_TEMPLATES,\n 'root.snippets' => KIRBY_SITE_ROOT_SNIPPETS, \n 'root.plugins' => KIRBY_SITE_ROOT_PLUGINS, \n 'root.cache' => KIRBY_SITE_ROOT_CACHE, \n ));\n\n }", "title": "" }, { "docid": "9496e22fb0f173bc7da0a322f1d3623b", "score": "0.58795583", "text": "abstract public function initCache($cfg);", "title": "" }, { "docid": "c17587687de191f8236bf61e3f5d066a", "score": "0.5877314", "text": "public function init()\n {\n $cache = Core::getLib('cache');\n \n $id = $cache->set('setting');\n \n if ( ! ($rows = $cache->get($id)))\n {\n $rows = Core::getLib('database')->select('s.type_id, s.var_name, s.value_actual, s.module_id AS module_name')\n ->from('setting', 's')\n ->join('module', 'm', 'm.module_id = s.module_id = 1 AND m.is_active = 1')\n ->exec('rows');\n \n foreach($rows as $key => $row)\n {\n // Definimos el tipo de variable\n switch($row['type_id'])\n {\n case 'boolean':\n\t\t\t\t\t\tif (strtolower($rows[$key]['value_actual']) == 'true' || strtolower($rows[$key]['value_actual']) == 'false')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rows[$key]['value_actual'] = (strtolower($rows[$key]['value_actual']) == 'true' ? '1' : '0');\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tsettype($rows[$key]['value_actual'], 'bool');\n break;\n case 'integer':\n settype($rows[$key]['value_actual'], 'int');\n break;\n }\n }\n \n $cache->save($id, $rows);\n }\n \n // Asignamos\n foreach ($rows as $row)\n {\n $this->_params[$row['module_name'] . '.' . $row['var_name']] = $row['value_actual'];\n }\n }", "title": "" }, { "docid": "41468e40a2ba394bd0e1b2ec8f71a8b6", "score": "0.5865634", "text": "private function getConfig()\n {\n if (ENV === 'Cms'){\n include_once 'config.php';\n }\n else{\n include_once '../config.php';\n }\n\n $this->host = $conf['host'];\n $this->dbname = $conf['dbname'];\n $this->dbuser = $conf['dbuser'];\n $this->dbpass = $conf['dbpass'];\n }", "title": "" }, { "docid": "aaf4514ba89c7ef37c50b71b12f2f662", "score": "0.5860975", "text": "protected function config() {\n if (!$this->config) {\n $this->config = \\Drupal::service('config.factory')->get(SettingsForm::$configName);\n }\n\n return $this->config;\n }", "title": "" }, { "docid": "1a106c990e9a03963ac9960a7b0afcd5", "score": "0.58439827", "text": "public static function loaddata() {\n\t\treturn Cache::remember('siteconfig', 60*60*30, function () {\n\t\t\t$data = SiteConfig::where('use_yn','Y')->get();\n\t\t\t$res = array();\n\t\t\tforeach ($data as $row){\n\t\t\t\t$res[ $row['code'] ] = $row;\n\t\t\t}\n\t\t\treturn $res;\n\t\t});\n\n\t}", "title": "" }, { "docid": "dc25fe8d3e153c470639da5f295c312e", "score": "0.58093077", "text": "private function get_settings_json() {\n $url = dirname( __FILE__ ) . '/' . $this->settings_file;\n $json = file_get_contents( $url );\n $json = preg_replace( \"/\\/\\*(?s).*?\\*\\//\", \"\", $json );\n $json = json_decode( $json );\n\n return $json;\n }", "title": "" }, { "docid": "f6c0478c09498f5760e95bd450fbd187", "score": "0.5807963", "text": "private function assign_config_infos(){\n\t\t$this->assign(Configuration::ROOT_URL, Request::get_root_url());\n\t\t$this->assign(Configuration::CURRENT_APP_URL, Request::get_application_root());\n\t\t// TODO : deal with single app (if monoapp -> current_app_url = root_url (+ htacess biz))\n\t\t$this->assign(Configuration::CURRENT_APP_VIRTUAL_URL, Request::get_application_virtual_root());\n\t\t$this->assign('full_url',Request::get_full_url());\n\t}", "title": "" }, { "docid": "0c0a01fbdb05fa1632721d3ca5143bf6", "score": "0.580782", "text": "private function getSettings() {\n return craft()->plugins->getPlugin('GoLive')->getSettings();\n }", "title": "" }, { "docid": "c46c9efa5bc3d18b8190e67ba106f893", "score": "0.5806305", "text": "public static function getAvailableSettings($render_view=false){\n \t\n\t\t\t$cache_id= $render_view ? 'gxchelpers-available-settings' : 'gxchelpers-available-settings-false';\n \t\t$settings=Yii::app()->cache->get($cache_id);\t \t\t \t\t\n\t\t\t\n\t\t\tif($settings===false)\n\t\t\t{\n\t\t\t \n\t $layouts = array(); \n\t $folders = get_subfolders_name(Yii::getPathOfAlias('common.settings')) ; \n\t foreach($folders as $folder){\n\t $temp=parse_ini_file(Yii::getPathOfAlias('common.settings.'.$folder.'').DIRECTORY_SEPARATOR.'info.ini');\n\t if($render_view)\n\t $settings[$temp['id']]=$temp['name'];\n\t else \n\t $settings[$temp['id']]=$temp;\n\t } \n\t\t\t Yii::app()->cache->set($cache_id,$settings,7200);\n\t\t\t}\n\t\t\t \n return $settings; \n }", "title": "" }, { "docid": "71286b4b8874460b0aa8381e42e3ce63", "score": "0.5805053", "text": "protected function getSettings()\n\t{\n\t\t// Retrieve engine configuration data\n\t\t$config = Factory::getConfiguration();\n\n\t\t$username = trim($config->get('engine.postproc.' . $this->settingsKey . '.username', ''));\n\t\t$password = trim($config->get('engine.postproc.' . $this->settingsKey . '.password', ''));\n\t\t$url = trim($config->get('engine.postproc.' . $this->settingsKey . '.url', ''));\n\n\t\t$defaultDirectory = $config->get('engine.postproc.' . $this->settingsKey . '.directory', '');\n\t\t$this->directory = $config->get('volatile.postproc.directory', $defaultDirectory);\n\n\t\t// Sanity checks\n\t\tif (empty($username) || empty($password))\n\t\t{\n\t\t\tthrow new BadConfiguration('You have not linked Akeeba Backup with your WebDav account');\n\t\t}\n\n\t\tif (!function_exists('curl_init'))\n\t\t{\n\t\t\tthrow new BadConfiguration('cURL is not enabled, please enable it in order to post-process your archives');\n\t\t}\n\n\t\t// Fix the directory name, if required\n\t\t$this->directory = empty($this->directory) ? '' : $this->directory;\n\t\t$this->directory = trim($this->directory);\n\t\t$this->directory = ltrim(Factory::getFilesystemTools()->TranslateWinPath($this->directory), '/');\n\t\t$this->directory = Factory::getFilesystemTools()->replace_archive_name_variables($this->directory);\n\t\t$config->set('volatile.postproc.directory', $this->directory);\n\n\t\t$settings = [\n\t\t\t'baseUri' => $url,\n\t\t\t'userName' => $username,\n\t\t\t'password' => $password,\n\t\t];\n\n\t\t// Last chance to modify the settings!\n\t\t$this->modifySettings($settings);\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "85eda88a7d8ef3632a4d30fb87ce8b35", "score": "0.5802303", "text": "private function getSettings() {\n\t\t// custom, to work with list IDs and interest group IDs\n\t\t$code = (version_compare(VERSION, '3.0', '<')) ? $this->name : $this->type . '_' . $this->name;\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$settings[str_replace($code . '_', '', $setting['key'])] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "4353572c04bddda5b5aeceb1464ecd3e", "score": "0.5795523", "text": "protected function load_settings() {\n global $DB;\n\n $this->settings = new stdClass();\n\n $saved = $DB->get_record('workshopeval_credit_settings', array('workshopid' => $this->workshop->id));\n\n if (isset($saved->lastmode)) {\n $this->settings->mode = $saved->lastmode;\n }\n\n return $this->settings;\n }", "title": "" }, { "docid": "e7228dc1d190dff3dd38ff0a8d41b804", "score": "0.5787252", "text": "public function config($configs = array()) {\n \t// default path modified to work with cache\n $default = array('path' => DIR_CACHE, 'prefix' => 'qscache.','suffix'=>'.cache', 'expire' => 3600, 'gc'=>4800);\n $this->_configs = array_merge($default, $configs);\n return $this;\n }", "title": "" }, { "docid": "d9cf23f71932dcd4ae5633e9cd67d506", "score": "0.577848", "text": "public static function loadSettings(){\n self::$_SETTINGS = array();\n\n $db = JFactory::getDBO();\n\n $query = \"SELECT setting.\" . $db->quoteName('name') . \", setting.\" . $db->quoteName('value') . \" FROM \" . $db->quoteName('#__jeproshop_setting') . \" AS setting\";\n\n $db->setQuery($query);\n if(!$settings = $db->loadObjectList()){ return; }\n\n foreach($settings as $setting){\n if(!isset(self::$_SETTINGS)){\n self::$_SETTINGS = array('global' => array(), 'group' => array(), 'shop' => array());\n }\n\n if(isset($setting->shop_id)){\n self::$_SETTINGS['shop'][$setting->shop_id][$setting->name] = $setting->value;\n }elseif(isset($setting->shop_group_id)){\n self::$_SETTINGS['group'][$setting->shop_group_id][$setting->name] = $setting->value;\n }else{\n self::$_SETTINGS['global'][$setting->name] = $setting->value ;\n }\n }\n }", "title": "" }, { "docid": "30e1c48399a2b0d6743ec3e183557f16", "score": "0.57626545", "text": "public static function getSettingsJson(){\n return file_get_contents('/config/adminsetcatalog.json');\n }", "title": "" }, { "docid": "f2806d6bbac0afa49aad31d107cba99b", "score": "0.5759469", "text": "function settingsData(){\n\t\treturn array(\n\t\t\t'base' \t\t\t\t => $this->base,\n\t\t\t'upload_folder'\t\t => $this->upload_folder,\n\t\t\t'support_file_types' => $this->support_file_types,\n\t\t\t'max_file_size' \t => $this->max_file_size\n\t\t);\n\t}", "title": "" }, { "docid": "e72b102c2dab28484f99109b290b730a", "score": "0.57589483", "text": "abstract public function getConfig();", "title": "" }, { "docid": "d716868d6ec126fb77afdd515bfc9f4e", "score": "0.5752907", "text": "public function getConfig() {\n if (!$this->_initialized || !is_array($this->config) || empty ($this->config)) {\n if (!isset ($this->config['base_url']))\n $this->config['base_url']= MODX_BASE_URL;\n if (!isset ($this->config['base_path']))\n $this->config['base_path']= MODX_BASE_PATH;\n if (!isset ($this->config['core_path']))\n $this->config['core_path']= MODX_CORE_PATH;\n if (!isset ($this->config['url_scheme']))\n $this->config['url_scheme']= MODX_URL_SCHEME;\n if (!isset ($this->config['http_host']))\n $this->config['http_host']= MODX_HTTP_HOST;\n if (!isset ($this->config['site_url']))\n $this->config['site_url']= MODX_SITE_URL;\n if (!isset ($this->config['manager_path']))\n $this->config['manager_path']= MODX_MANAGER_PATH;\n if (!isset ($this->config['manager_url']))\n $this->config['manager_url']= MODX_MANAGER_URL;\n if (!isset ($this->config['assets_path']))\n $this->config['assets_path']= MODX_ASSETS_PATH;\n if (!isset ($this->config['assets_url']))\n $this->config['assets_url']= MODX_ASSETS_URL;\n if (!isset ($this->config['connectors_path']))\n $this->config['connectors_path']= MODX_CONNECTORS_PATH;\n if (!isset ($this->config['connectors_url']))\n $this->config['connectors_url']= MODX_CONNECTORS_URL;\n if (!isset ($this->config['processors_path']))\n $this->config['processors_path']= MODX_PROCESSORS_PATH;\n if (!isset ($this->config['request_param_id']))\n $this->config['request_param_id']= 'id';\n if (!isset ($this->config['request_param_alias']))\n $this->config['request_param_alias']= 'q';\n if (!isset ($this->config['https_port']))\n $this->config['https_port']= isset($GLOBALS['https_port']) ? $GLOBALS['https_port'] : 443;\n if (!isset ($this->config['error_handler_class']))\n $this->config['error_handler_class']= 'error.modErrorHandler';\n\n $this->_config= $this->config;\n if (!$this->_loadConfig()) {\n $this->log(modX::LOG_LEVEL_FATAL, \"Could not load core MODx configuration!\");\n return null;\n }\n }\n return $this->config;\n }", "title": "" }, { "docid": "12fcbc99e10d5b91c37aa801e8971d48", "score": "0.57502806", "text": "private function _loadSettingsIfNeeded() {\r\n\t\tif ($this->_data === null) {\r\n\t\t\t$this->_data = get_option(self::OPT_SETTINGS_KEY, array());\r\n\t\t\tif (!is_array($this->_data)) {\r\n\t\t\t\t$this->_data = array();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5ca28cd8aac7089275d6fbbd8019cadd", "score": "0.5749824", "text": "private function LoadConfigSmarty() {\n\t\t$this->plugins_dir [] = $this->cfg ['plugin_dir'];\n\t\t$this->allow_php_templates = $this->cfg ['allow_php_templates'];\n\t\t$this->force_compile = $this->cfg ['force_compile'];\n\t\t$this->caching = $this->cfg ['caching'];\n\t\t$this->cache_lifetime = $this->cfg ['cache_lifetime'];\n\t\t$this->debugging = $this->cfg ['debugging'];\n\t}", "title": "" }, { "docid": "763e935c9d3a74e86fcd8d35db56b130", "score": "0.5747658", "text": "function readSettings() {\n $query = 'SELECT *'\n . ' FROM '.sql_table('blog')\n . ' WHERE bnumber=' . $this->blogid;\n $res = sql_query($query);\n\n $this->isValid = ($res && ($this->settings = sql_fetch_assoc($res)) && !empty($this->settings));\n if (!$this->isValid)\n $this->settings = array();\n }", "title": "" }, { "docid": "c2dce7ad62c94e31e40f456fc7cdb0b7", "score": "0.5746632", "text": "function St_ConfigManager(){\n\t\t\t//load configuration in path-config.xml.php\n\t\t\tdefine('CONFIG_DIR', (dirname(__FILE__) . \"/../config/\"));\n\t\t\t\n\t\t\t$this->configParser = new St_XmlParser();\n\t\t\t$this->pathConfig = $this->configParser->parseMainConfigToArray(CONFIG_DIR.'path-config.xml');\n\t\t\t\n\t\t\t//load configuration in smiletag-config.xml.php\n\t\t\t$this->smiletagConfig = $this->configParser->parseMainConfigToArray($this->getDataDir().'/smiletag-config.xml');\n\t\t\t\n\t\t\t//load banned ip address and nickname list\n\t\t\t$banList = $this->configParser->parseBanListToArray($this->getDataDir().'/ban-list.xml');\n\t\t\t\n\t\t\tif(!empty($banList['ipaddress'])){\n\t\t\t\t$this->bannedIpAddress = $banList['ipaddress'];\n\t\t\t}\n\t\t\tif(!empty($banList['name'])){\n\t\t\t\t$this->bannedNickname = $banList['name'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e66c9b52165e4e6986a5decd085ee805", "score": "0.5744003", "text": "private function build_cache() {\n\t\tif(!$this->cache_once) {\n\t\t\t$old_result = $this->result;\n\t\t\t$this->debugme(\"Trying to build a local Cache for DapNet Core Servers...\");\n\t\t\t$this->makecurl(\"nodes\");\n\t\t\t$nodes_fetch = json_decode($this->result, true);\n\t\t\t$nodes_cache = array();\n\t\t\tforeach($nodes_fetch as $node) {\n\t\t\t\t$nodes_cache[$node[\"name\"]] = $node[\"address\"][\"ip_addr\"];\n\t\t\t}\n\t\t\t$this->debugme(\"Cache build, write down ini file..\");\n\t\t\t$this->file_ini_write(\"nodes\", $nodes_cache);\n\t\t\t$this->debugme(\"Disable further caching in this script!\");\n\t\t\t$this->cache_once = true;\n\t\t\t$this->result = $old_result;\n\t\t}\n\t}", "title": "" }, { "docid": "03348e1b79d1ef19375c6a96005b9499", "score": "0.5730307", "text": "public static function getCachedConfigPath()\n {\n }", "title": "" }, { "docid": "71199ee8e1d34f69e0d7adfbddd4e7fa", "score": "0.5729866", "text": "protected function settings() {\n return array();\n }", "title": "" }, { "docid": "271d0ed9a4147d5be05b88b4a688a70f", "score": "0.57290655", "text": "static public function render_settings_config() {\n\t\tif ( FLBuilderModel::is_builder_active() && isset( $_GET['fl_builder_load_settings_config'] ) ) {\n\n\t\t\t// Increase available memory.\n\t\t\tif ( function_exists( 'wp_raise_memory_limit' ) ) {\n\t\t\t\twp_raise_memory_limit( 'bb-plugin' );\n\t\t\t}\n\n\t\t\t$type = sanitize_key( $_GET['fl_builder_load_settings_config'] );\n\t\t\t$handler = 'FLBuilderUISettingsForms::compress_settings_config';\n\n\t\t\tif ( 'modules' === $type ) {\n\t\t\t\t$settings = FLBuilderUISettingsForms::get_modules_js_config();\n\t\t\t} else {\n\t\t\t\t$settings = FLBuilderUISettingsForms::get_js_config();\n\t\t\t}\n\n\t\t\tif ( @ini_get( 'zlib.output_compression' ) ) { // @codingStandardsIgnoreLine\n\t\t\t\t@ini_set( 'zlib.output_compression', 'Off' ); // @codingStandardsIgnoreLine\n\t\t\t\t$handler = null;\n\t\t\t}\n\t\t\theader( 'Content-Type: application/javascript' );\n\n\t\t\tob_start( $handler );\n\t\t\tinclude FL_BUILDER_DIR . 'includes/ui-settings-config.php';\n\t\t\tob_end_flush();\n\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "0a92ad1dd7e40ca8174d5176a6bc5605", "score": "0.5723568", "text": "public static function getSettings()\n {\n $configuration = self::parseSettings();\n require_once(ExtensionManagementUtility::extPath('news') . 'Classes/Domain/Model/Dto/EmConfiguration.php');\n $settings = new \\GeorgRinger\\News\\Domain\\Model\\Dto\\EmConfiguration($configuration);\n return $settings;\n }", "title": "" }, { "docid": "974a3e908e92d9abd901df1a78dfe7f8", "score": "0.57234806", "text": "private function getSavedSettings()\n {\n $creditCardSettings = new CreditCardSettings($this);\n $boletoSettings = new BoletoSettings($this);\n $boletoCreditCardSettings = new BoletoCreditCardSettings($this);\n $recurrenceSettings = new RecurrenceSettings($this);\n\n $this->data['settings'] = array(\n 'general_status' => $this->config->get('payment_mundipagg_status'),\n 'general_mapping_number' => $this->config->get('payment_mundipagg_mapping_number'),\n 'general_mapping_complement' => $this->config->get('payment_mundipagg_mapping_complement'),\n 'general_prod_secret_key' => $this->config->get('payment_mundipagg_prod_secret_key'),\n 'general_test_secret_key' => $this->config->get('payment_mundipagg_test_secret_key'),\n 'general_prod_pub_key' => $this->config->get('payment_mundipagg_prod_public_key'),\n 'general_test_pub_key' => $this->config->get('payment_mundipagg_test_public_key'),\n 'general_test_mode' => $this->config->get('payment_mundipagg_test_mode'),\n 'general_log_enabled' => $this->config->get('payment_mundipagg_log_enabled'),\n 'general_payment_title' => $this->config->get('payment_mundipagg_title'),\n 'extra_multibuyer_enabled' => $this->config->get('payment_mundipagg_multibuyer_enabled'),\n 'antifraud_status' => $this->config->get('payment_mundipagg_antifraud_status'),\n 'antifraud_minval' => $this->config->get('payment_mundipagg_antifraud_minval'),\n );\n\n $this->data['settings'] = array_merge(\n $this->data['settings'],\n $creditCardSettings->getAllSettings(),\n $boletoSettings->getAllSettings(),\n $boletoCreditCardSettings->getAllSettings(),\n $recurrenceSettings->getAllSettings()\n );\n\n $this->load->model('extension/payment/mundipagg');\n $this->data['creditCard'] = $this->model_extension_payment_mundipagg->getCreditCardInformation();\n $this->data['boletoInfo'] = $this->model_extension_payment_mundipagg->getBoletoInformation();\n $this->data['logs_files'] = $this->getLogFiles();\n }", "title": "" }, { "docid": "33d02ed115d520d83b51e16c5bc4bdd4", "score": "0.5716078", "text": "public function getSettings() {\n\n return $this->settings;\n }", "title": "" }, { "docid": "d4d9439f4e68a9ce0f617afbd16488a0", "score": "0.5709693", "text": "public function cacheProperties()\n\t{\n\t\t$code = $this->getInit();\n\t\t$code.= $this->getConfig();\n\t\t$code.= $this->getProperties();\n\t\t$code.= $this->getPaths();\n\n\t\t$cache_file = $this->getFile('properties');\n\t\t$this->store($cache_file, $code);\n\t}", "title": "" }, { "docid": "02ad83666f627a47b8d7fbd2ab1e6d90", "score": "0.5709414", "text": "function load_settings()\n\t{\n\t\tglobal $userId,$now,$mplayer,$mencoder,$rootPath,$adminName,$adminEmail,$siteName,$siteTitle;\n\t\t$this->load->model('common');\n\t\t\n\t\t$userId\t\t= $this->config->item('userId');\n\t\t$now\t\t= $this->config->item('now');\n\t\t$mencoder\t= $this->config->item('mencoder');\n\t\t$mplayer\t= $this->config->item('mplayer');\n\t\t$rootPath\t= $this->config->item('rootPath');\n\t\t\n\t\t$siteVars\t= $this->common->getSiteVars();\n\t\t$adminName\t= $siteVars['adminName'];\n\t\t$adminEmail\t= $siteVars['adminEmail'];\n\t\t$siteName\t= $siteVars['siteName'];\n\t\t$siteTitle\t= $siteVars['siteTitle'];\t\t\n\t}", "title": "" }, { "docid": "49767f517d23c9a44de4e1f4fba41370", "score": "0.570827", "text": "public function init_settings() {\n $this->iterate( static::CONFIG_KEY_SETTINGS );\n }", "title": "" }, { "docid": "fbf02b3a15c58e77f686c553c4c28b64", "score": "0.57068855", "text": "private function get_settings($refresh = FALSE)\n\t{\n\t\tglobal $DB, $PREFS, $REGX;\n\t\t$settings = FALSE;\n\t\t$site_id = $PREFS->ini(\"site_id\");\n\t\tif(isset($SESS->cache['lg_htaccess_generator'][__CLASS__]['settings']) === FALSE || $refresh === TRUE)\n\t\t{\n\t\t\t$settings_query = $DB->query(\"SELECT `settings` FROM `exp_extensions` WHERE `enabled` = 'y' AND `class` = '\".__CLASS__.\"' LIMIT 1\");\n\t\t\t// if there is a row and the row has settings\n\t\t\tif ($settings_query->num_rows > 0 && $settings_query->row['settings'] != '')\n\t\t\t{\n\t\t\t\t// save them to the cache\n\t\t\t\t$settings = $REGX->array_stripslashes(unserialize($settings_query->row['settings']));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$settings = $SESS->cache['lg_htaccess_generator'][__CLASS__]['settings'];\n\t\t}\n\t\tif(isset($settings[$site_id]) == FALSE)\n\t\t{\n\t\t\t$settings[$site_id] = $this->build_default_settings();\n\t\t\t$this->save_settings_to_db($settings);\n\t\t}\n\t\t$this->save_settings_to_session($settings);\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "802f46f772ab8d543fcbeb9ea341f0f0", "score": "0.5706557", "text": "function get_configuration_data()\n\t{\n\t\t$catId = (int)$this->site_category;\n\t\t//gotta get the group\n\t\t$groupId = 0;\n\t\tif ($this->userid) {\n\t\t\t$user = geoUser::getUser($this->userid);\n\t\t\tif ($user) {\n\t\t\t\t$groupId = (int)$user->group_id;\n\t\t\t}\n\t\t}\n\t\ttrigger_error('DEBUG STATS: Before get fields instance');\n\t\t$this->fields = geoFields::getInstance($groupId, $catId);\n\t\ttrigger_error('DEBUG STATS: After get fields instance');\n\t\t\n\t\tif (isset($this->configuration_data)) return true;\n\t \t$this->configuration_data = $this->db->get_site_settings(true);\n\t \treturn true;\n\t}", "title": "" }, { "docid": "37e58864020d4c9f5f7597d340aa887a", "score": "0.57024", "text": "public function fetchSettings(){\n $rows = static::queryBuilder()->get();\n \n $results = [];\n $results['settings'] = [];\n $results['descriptions'] = [];\n foreach ($rows as $row) {\n $name = $row['name'];\n $value = $row['value'];\n $plugin = $row['plugin'];\n $description = $row['description'];\n if (!isset($results['settings'][$plugin])) {\n $results['settings'][$plugin] = [];\n $results['descriptions'][$plugin] = [];\n }\n \n $results['settings'][$plugin][$name] = $value;\n $results['descriptions'][$plugin][$name] = $description; \n }\n return $results;\n }", "title": "" }, { "docid": "0a94dcbe4c16db0ac8657df4785fb48a", "score": "0.5700288", "text": "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "title": "" }, { "docid": "9cb0ff677dec87d86b84a4d530124cd1", "score": "0.5697758", "text": "function _get_settings($force_refresh = FALSE, $return_all = FALSE, $class = '')\n\t{\n\t\t// assume there are no settings\n\t\t$settings = FALSE;\n\n\t\t// What is the current ext class (we love ucfirst OK!)\n\t\t$class = ($class=='' ? get_class($this) : $class );\n\n\t\t// Get the settings for the extension\n\t\tif(isset($this->cache['settings']) === FALSE || $force_refresh === TRUE)\n\t\t{\n\t\t\t// check the db for extension settings\n\t\t\t$query = ee()->db->query(\"SELECT settings FROM exp_extensions WHERE enabled = 'y' AND class = '\" . $class . \"' LIMIT 1\");\n\n\t\t\t// if there is a row and the row has settings\n\t\t\tif ($query->num_rows() > 0 && $query->row('settings') != '')\n\t\t\t{\n\t\t\t\tee()->load->helper('string');\n\n\n\t\t\t\t$this->cache['settings'] = strip_slashes(unserialize($query->row('settings')));\n\t\t\t}\n\t\t}\n\n\t\t// check to see if the session has been set\n\t\t// if it has return the session\n\t\t// if not return false\n\n\t\tif(empty($this->cache['settings']) !== TRUE)\n\t\t{\n\t\t\t$settings = ($return_all === TRUE) ? $this->cache['settings'] : $this->cache['settings'][ee()->config->item('site_id')];\n\t\t}\n\n\t\treturn $settings;\n\n\t}", "title": "" }, { "docid": "f966a4d9a8e7f4a4da7f7aea23649d80", "score": "0.5697525", "text": "public function use_cache() {\n\n\t\t// get the settings that we need\n\t\t$settings = apply_filters( 'toolbox_customizer_css_' . $this->file_prefix , array() );\n\t\t\n\t\t// build the cache file path\n\t\t$cache_path = $this->dir_settings( $this->directory )['cache_dir'] . '/' . $this->file_prefix . '.cache';\n\n\t\t// check if cache already exists\n\t\tif ( \\file_exists( $cache_path ) ) {\n\n\t\t\t$cache = \\file_get_contents( $cache_path );\n\t\t\t\n\t\t\t$cache_data = \\json_decode( $cache , true );\n\t\t\t// return if the data is identical. Of so, we don't need to recompile, return false\n\t\t\treturn ( $this->arrayRecursiveDiff( $settings , $cache_data ) == [] );\n\n\t\t}\n\t\t// don't use cache\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1f9f5d68460d08089b29bedb6734e16b", "score": "0.56950426", "text": "public static function getConfigArray()\n {\n// return \\Cache::remember('site_config', 15, function () {\n $dotted = static::select('key', 'value', 'type')->get()\n ->mapWithKeys(function (SiteConfigItem $item) {\n return [$item->key => $item->getCastedValue()];\n })\n ->toArray();\n\n return Arr::fromDot($dotted);\n// });\n }", "title": "" }, { "docid": "2d2375083fe9f22555f869373113b9c7", "score": "0.56899846", "text": "public function loadSettings()\n {\n $settings = array();\n $items = array();\n $items = Mage::getStoreConfig('onestepcheckout');\n foreach ($items as $config) {\n foreach ($config as $key => $value) {\n $settings[$key] = $value;\n }\n }\n if(empty($settings['default_country_id']))\n {\n $settings['default_country_id'] = 'US';\n }\n return $settings;\n }", "title": "" }, { "docid": "280ac8b2940ef40c6169c32044d2e60f", "score": "0.5678913", "text": "function load_settings()\n\t{\n\t\tglobal $userId,$now,$mplayer,$mencoder,$rootPath,$adminName,$adminEmail,$siteName,$siteTitle;\n\t\t$this->load->model('common');\n\t\t\t\n\t\t$userId\t\t= $this->config->item('userId');\n\t\t$now\t\t= $this->config->item('now');\n\t\t$mencoder\t= $this->config->item('mencoder');\n\t\t$mplayer\t= $this->config->item('mplayer');\n\t\t$rootPath\t= $this->config->item('rootPath');\n\t\t\t\n\t\t$siteVars\t= $this->common->getSiteVars();\n\t\t$adminName\t= $siteVars['adminName'];\n\t\t$adminEmail\t= $siteVars['adminEmail'];\n\t\t$siteName\t= $siteVars['siteName'];\n\t\t$siteTitle\t= $siteVars['siteTitle'];\n\t}", "title": "" }, { "docid": "2b95513082fcf4619e3aaa4161eae76e", "score": "0.5676557", "text": "protected function readSettings() {\n if ($this->platform == Model::PLATFORM_PC) {\n if ($this->format == Model::FORMAT_UAB) {\n $this->readLicense();\n // simple complexity check\n if ($this->complexity == 'simple') {\n $this->setTags();\n $this->setDescription();\n $this->model['model']['hash'] = md5_file($this->file['tmp_name']);\n $this->model['model']['file'] = $this->file['tmp_name'];\n }\n \n }\n } else {\n //todo\n }\n $this->model['upload']['platform'] = $this->platform;\n $this->model['upload']['format'] = $this->format;\n $this->model['model']['id'] = $this->id;\n //is used to read in all of the functions relating to settings\n }", "title": "" }, { "docid": "e89cbcd9593eda5bb9be5f5685caf5d4", "score": "0.56723547", "text": "function getCfg()\r\n{\r\n $cfg = new stdClass();\r\n $cfg->exec_cfg = config_get('exec_cfg');\r\n $cfg->gui_cfg = config_get('gui');\r\n // $cfg->bts_type = config_get('interface_bugs');\r\n \r\n $results = config_get('results');\r\n $cfg->tc_status = $results['status_code'];\r\n $cfg->testcase_cfg = config_get('testcase_cfg'); \r\n $cfg->editorCfg = getWebEditorCfg('execution');\r\n \r\n return $cfg;\r\n}", "title": "" }, { "docid": "5371ee6b2f4ff1bb0b7830a6d08ba025", "score": "0.5664038", "text": "public static function config($config = null)\n\t{\n\t\tif(is_array($config)) {\n\n # Setting Configurations\n\t\t\tstatic::$config = $config + static::$config;\n\t\t\t$pathWithoutTrailingSlash = rtrim(static::$config['directory'], '/');\n\t\t\tstatic::$config['directory'] = $pathWithoutTrailingSlash.'/';\n\n\t\t} elseif(is_string($config)) {\n\n # Getting Single Config item\n\t\t\treturn isset(static::$config[$config]) ? static::$config[$config] : null;\n\n\t\t} elseif(!$config) {\n\n # Getting All configurations\n\t\t\treturn static::$config;\n\t\t} else {\n\t\t\tthrow new CacheException('Invalid parameter provided for Cache::config()');\n\t\t}\n\t}", "title": "" }, { "docid": "3366dbb4f54f9c51bf8e095f1677f0ae", "score": "0.56559134", "text": "public function getConfig(){\n\t\t\t$this->config = parse_ini_file('config/database.ini');\n\t\t}", "title": "" }, { "docid": "b5acfe46ec91acfc96969e0807cef334", "score": "0.5652078", "text": "public function buildCache()\n\t{\n\t\t$this->cacheMain();\n\t\t$this->cacheProperties();\n\t\t$this->cacheLanguages();\n\t\t$this->cacheThemes();\n\t\t$this->cacheInline();\n\t}", "title": "" } ]
e4ec68cbf4b69a7d440480df09fbc401
/ NOTE: for stripe $sum = $this>get('buggl_main.entity_repository') >getRepository('BugglMainBundle:PurchaseInfo') >sumNetAmountForBuggl();
[ { "docid": "5f8fc2a0dbbe63e9b0a3720cea4de4b3", "score": "0.0", "text": "public function indexAction(Request $request)\n {\n\t\t\n $sum = $this->get('buggl_main.entity_repository')\n ->getRepository('BugglMainBundle:PaypalPurchaseInfo')\n ->sumNetAmountForBuggl();\n\t\t\n\t\t$currentPage = $request->get('page',1);\n\t\t\n\t\t// NOTE: for stripe divide amounts by 100\n // $repository = $this->get('buggl_main.entity_repository')->getRepository('BugglMainBundle:PurchaseInfo');\n\t\t$repository = $this->get('buggl_main.entity_repository')->getRepository('BugglMainBundle:PaypalPurchaseInfo');\n $objects = $repository->findRecent(self::LIMIT,$currentPage);\n\t\tif(count($objects->getIterator()) == 0){\n\t\t\treturn new RedirectResponse($this->generateUrl('admin_billing'));\n\t\t}\n\t\t\n\t\t$softPageLimit = 8;\n\t\t$hardPageLimit = 12;\n\t\t\n $data = array(\n 'sum' => number_format($sum,2),\n 'limit' => self::LIMIT,\n 'lists' => $objects,\n 'totalCount' => count($objects),\n\t\t\t'currentPage' => $currentPage,\n\t\t\t'softPageLimit' => $softPageLimit,\n\t\t\t'hardPageLimit' => $hardPageLimit,\n );\n\n return $this->render('BugglMainBundle:Admin/Billing:index.html.twig',$data);\n }", "title": "" } ]
[ { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.6760432", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.6760432", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.6760432", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.6760432", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.6760432", "text": "public function getAmount();", "title": "" }, { "docid": "360b8ee82f434cf1122f4cbddd0db5e0", "score": "0.6729765", "text": "abstract public function getAmount();", "title": "" }, { "docid": "a680d52c679e45c099a941d8d9e33aea", "score": "0.6579125", "text": "public function GetTransactionAmount();", "title": "" }, { "docid": "ea9335beeafa54495860129e677affe6", "score": "0.6305728", "text": "public function getPaymentAmount();", "title": "" }, { "docid": "ea9335beeafa54495860129e677affe6", "score": "0.6305728", "text": "public function getPaymentAmount();", "title": "" }, { "docid": "e6eee264856da74a1334cfedc394ba0e", "score": "0.6256589", "text": "public function getInvoiceServicesSumAmt()\n {\n }", "title": "" }, { "docid": "f13eaa5367a1a3f7437532f8458669ed", "score": "0.6232809", "text": "public function subTotalPurchaseAmount()\n {\n //return PurchaseDetail::where('purchase_final_id',$this->id)->sum('purchase_sub_total_inc_tax_amount');\n $data = PurchaseDetail::select(DB::raw('sum(quanity*purchase_unit_price_inc_tax) as sub_total'))\n ->where('purchase_final_id',$this->id)\n ->get();\n return $data->sum('sub_total');\n }", "title": "" }, { "docid": "81e141381aa4b710d1bb9fe9f65a2da3", "score": "0.6224577", "text": "private function amount_price(){\r\n $count = 0;\r\n $amount = 0;\r\n foreach($this->stores as $key => $store){\r\n $subtotal = 0;\r\n foreach($store['products'] as $product){\r\n $subtotal += $product['subtotal'];\r\n $count += $product['qtd'];\r\n }\r\n $this->stores[ $key ]['subtotal'] = $subtotal;\r\n $this->stores[ $key ]['amount'] = $subtotal + $this->stores[ $key ]['price_freight'];\r\n $amount += $this->stores[ $key ]['amount'];\r\n $this->count = $count;\r\n }\r\n $this->amount = $amount;\r\n }", "title": "" }, { "docid": "11d524528ad8aaa08efb057c20a4a990", "score": "0.61934537", "text": "function getTotalPurchasePrice(): float {\n }", "title": "" }, { "docid": "c6ce7f37ff02c08fae1dd4e5470c8323", "score": "0.61803436", "text": "function getTotalAmount(){\r\n return $this->totalAmount;\r\n }", "title": "" }, { "docid": "acdb32a9249161c34dbfc40be152789d", "score": "0.61353236", "text": "public function getTotalAmount()\n {\n return Mage::helper('afterpay')->calculateTotal();\n }", "title": "" }, { "docid": "4faf2bc46d34604dfbb957cf7ae4ed8d", "score": "0.6134676", "text": "public function getRefundedTotalAmount();", "title": "" }, { "docid": "a1d539602e55477e0a35c516891fa647", "score": "0.6103739", "text": "public function getBonusAmountForDebit(): float;", "title": "" }, { "docid": "529666e3019eff20518c80c4a2895ce2", "score": "0.6076734", "text": "public function getShippingAmount();", "title": "" }, { "docid": "529666e3019eff20518c80c4a2895ce2", "score": "0.6076734", "text": "public function getShippingAmount();", "title": "" }, { "docid": "531a4561075809ab8dbbf5c081d4695c", "score": "0.60385436", "text": "public function getPaymentTotal(): float;", "title": "" }, { "docid": "8b5f7e248a4766de486e8721546889a1", "score": "0.60039425", "text": "public function total_amount_invoice_vendor()\n {\n $result = 0;\n //check if project has already invoice vendor\n if($this->invoice_vendors->count())\n {\n $result = floatval(\\DB::table('invoice_vendors')\n ->where('project_id', $this->id)\n ->sum('amount'));\n \n }\n return $result;\n }", "title": "" }, { "docid": "dbf95d0a1302a9dae89be5f8fc5e5882", "score": "0.5979637", "text": "private function getAmount() {\n return $this->amount;\n }", "title": "" }, { "docid": "d06d69555f61aac3a40ed2a97ffb24f9", "score": "0.5972131", "text": "public function getBasketSum($type = 'WEB')\n {\n $basket = $this->getBasket();\n\n $template = $this->cObj->getSubpart($this->templateCode, '###LISTING_BASKET_' . strtoupper($type) . '###');\n\n $sumNet = $basket->getSumNet();\n $sumGross = $basket->getSumGross();\n $sumTax = $sumGross - $sumNet;\n\n $deliveryArticleArray = $basket->getArticlesByArticleTypeUidAsUidlist(DELIVERYARTICLETYPE);\n\n $sumShippingNet = 0;\n $sumShippingGross = 0;\n\n foreach ($deliveryArticleArray as $oneDeliveryArticle) {\n /**\n * Basket item.\n *\n * @var \\CommerceTeam\\Commerce\\Domain\\Model\\BasketItem $basketItem\n */\n $basketItem = $basket->getBasketItem($oneDeliveryArticle);\n $sumShippingNet += $basketItem->getPriceNet();\n $sumShippingGross += $basketItem->getPriceGross();\n }\n\n $paymentArticleArray = $basket->getArticlesByArticleTypeUidAsUidlist(PAYMENTARTICLETYPE);\n\n $sumPaymentNet = 0;\n $sumPaymentGross = 0;\n\n foreach ($paymentArticleArray as $onePaymentArticle) {\n /**\n * Basket item.\n *\n * @var \\CommerceTeam\\Commerce\\Domain\\Model\\BasketItem $basketItem\n */\n $basketItem = $basket->getBasketItem($onePaymentArticle);\n $sumPaymentNet += $basketItem->getPriceNet();\n $sumPaymentGross += $basketItem->getPriceGross();\n }\n\n $paymentTitle = $basket->getFirstArticleTypeTitle(PAYMENTARTICLETYPE);\n\n $markerArray = array();\n $markerArray['###LABEL_SUM_ARTICLE_NET###'] = $this->pi_getLL('listing_article_net');\n $markerArray['###LABEL_SUM_ARTICLE_GROSS###'] = $this->pi_getLL('listing_article_gross');\n $markerArray['###SUM_ARTICLE_NET###'] = Money::format($sumNet, $this->currency);\n $markerArray['###SUM_ARTICLE_GROSS###'] = Money::format($sumGross, $this->currency);\n $markerArray['###LABEL_SUM_SHIPPING_NET###'] = $this->pi_getLL('listing_shipping_net');\n $markerArray['###LABEL_SUM_SHIPPING_GROSS##'] = $this->pi_getLL('listing_shipping_gross');\n $markerArray['###SUM_SHIPPING_NET###'] = Money::format($sumShippingNet, $this->currency);\n $markerArray['###SUM_SHIPPING_GROSS###'] = Money::format($sumShippingGross, $this->currency);\n $markerArray['###LABEL_SUM_NET###'] = $this->pi_getLL('listing_sum_net');\n $markerArray['###SUM_NET###'] = Money::format($sumNet, $this->currency);\n $markerArray['###LABEL_SUM_TAX###'] = $this->pi_getLL('listing_tax');\n $markerArray['###SUM_TAX###'] = Money::format($sumTax, $this->currency);\n\n $markerArray['###LABEL_SUM_GROSS###'] = $this->pi_getLL('listing_sum_gross');\n $markerArray['###SUM_GROSS###'] = Money::format($sumGross, $this->currency);\n $markerArray['###SUM_PAYMENT_NET###'] = Money::format($sumPaymentNet, $this->currency);\n $markerArray['###SUM_PAYMENT_GROSS###'] = Money::format($sumPaymentGross, $this->currency);\n $markerArray['###LABEL_SUM_PAYMENT_GROSS###'] = $this->pi_getLL('label_sum_payment_gross');\n $markerArray['###LABEL_SUM_PAYMENT_NET###'] = $this->pi_getLL('label_sum_payment_net');\n $markerArray['###PAYMENT_TITLE###'] = $paymentTitle;\n\n $hooks = HookFactory::getHooks('Controller/CheckoutController', 'getBasketSum');\n foreach ($hooks as $hook) {\n if (method_exists($hook, 'processMarker')) {\n $markerArray = $hook->processMarker($markerArray, $this);\n }\n }\n\n return $this->cObj->substituteMarkerArray($template, $markerArray);\n }", "title": "" }, { "docid": "cea2e14771002585ae9ab536c734b533", "score": "0.5964669", "text": "public function getDiscountAmount();", "title": "" }, { "docid": "cea2e14771002585ae9ab536c734b533", "score": "0.5964669", "text": "public function getDiscountAmount();", "title": "" }, { "docid": "1081a89dc7d63e001910a7dec2e1b032", "score": "0.5953412", "text": "public function getPayableAmount()\n {\n return ($this->package->cost) ?: null;\n }", "title": "" }, { "docid": "f42865905324619116caebed7ca9c067", "score": "0.5948224", "text": "public function getRefundableAmount();", "title": "" }, { "docid": "d5b1da2acd5e83ad91f838f0f2245e06", "score": "0.594279", "text": "public function testPurchaseCalculatorAmount()\n {\n }", "title": "" }, { "docid": "4f7afd6d3f37d942f6739d42cca9a23a", "score": "0.5938325", "text": "public function getTotalCost(){\n\t\t$cost = 0;\n\t\t\tforeach($this->items as $item => $amount)\n\t\t\t{\n\t\t\t\t$product = Product::getProductById($item);\n\t\t\t\t$cost += $product->getPrice()*$amount;\n\t\t\t}\n\t\treturn $cost;\n\t}", "title": "" }, { "docid": "125242d9702ccc5dca172424b8cfb7db", "score": "0.59116715", "text": "public function updateTotalNetPrice();", "title": "" }, { "docid": "6f4ff0ec797979b4733537fefb646c2e", "score": "0.59044033", "text": "function getPurchasePrice(): float {\n\t}", "title": "" }, { "docid": "f4c83882992b61dabf1cc04feb4b6cb3", "score": "0.5902952", "text": "public function getAmount() {\n return $this->amount;\n }", "title": "" }, { "docid": "2ed37188820e11358d77fa31f51937fa", "score": "0.58948946", "text": "public function sum() {\n \t}", "title": "" }, { "docid": "2b4f7613ddf6ca0c9297f30ffd469a65", "score": "0.58899415", "text": "public function getBalanceAttribute(){\n return $this->credits()->sum('amount');\n }", "title": "" }, { "docid": "e6cfbdf588403d21f1debba2ae0da34f", "score": "0.5884345", "text": "public function buyTotal() {\n $total = 0;\n $dadosProduto = $this->getBuyProducts();\n\n foreach ($dadosProduto as $value) {\n foreach ($value as $val) {\n $total += $val['preco'];\n }\n }\n\n echo 'R$ ' . $total . ',00';\n }", "title": "" }, { "docid": "eea3f5026abbe7a548b7310c122ff210", "score": "0.5829744", "text": "public function get_total_credit() {\n\t\t$this->db->select('SUM((product_price * product_qty)-((product_price * product_qty)*((diskon_price)/100))) AS total_amount');\n\t\t$this->db->where('accepted != 1 OR shipped != 1 OR paid != 1 OR recived != 1');\n\t\t$this->db->join('sale_detail', 'sale_detail.sale_id = sale.id', 'left');\n\t\t$query = $this->db->get('sale');\n\t\treturn $query->row()->total_amount;\n\t}", "title": "" }, { "docid": "0699dd7c681069dcb2ab029b7da8d365", "score": "0.5828643", "text": "function total_price($price_summary,$module='b2c') {\r\n\t\t\r\n\t\treturn $price_summary ['NetFare'];\r\n\t\t\r\n\t}", "title": "" }, { "docid": "cbbad1b1fe112fbab70b3aab9c88eb0b", "score": "0.5818335", "text": "public function getItemsAmount(): float\n {\n return collect($this->invoices_list)->sum('amount');\n }", "title": "" }, { "docid": "d0bc0b714856d6f6ac1e41655715e1a1", "score": "0.5808719", "text": "public function getAmount()\n {\n return $this->get('amount');\n }", "title": "" }, { "docid": "d1fb050efca2ba19fd16d9551e00065f", "score": "0.57975775", "text": "public function getCommissionSum() {\n $sum = Doctrine_Query::create()\n ->limit(0)\n ->select('sum(price)')\n ->from('commission')\n ->where('domain_profile_id = ?', $this->getId())\n ->fetchArray();\n\n return floatval(round($sum[0]['sum'], 2, PHP_ROUND_HALF_UP));\n }", "title": "" }, { "docid": "f3450e460dec64df448f490c76a39c3a", "score": "0.57851815", "text": "function budgetSum()\n {\n return $this->hasOne(BudgetDetail::class, 'budget_id', 'budget_id')\n ->select(array('budget_id', DB::raw(\"SUM(budget_amount) as budget_amount\")))\n ->groupBy(\"budget_id\");\n }", "title": "" }, { "docid": "0b024f438f14a1efd31cd604e2f04af6", "score": "0.5781579", "text": "public function getDiscountTotal(): float;", "title": "" }, { "docid": "4e62f9f7b4d8507c8ae715a8fe980466", "score": "0.57702863", "text": "public function get_total_amount(){\n\n \nreturn $this->principal_amount+((($this->interest_rate/100)*$this->principal_amount)*$this->time_period);\n\n\n\n}", "title": "" }, { "docid": "bd42a24e36c1c6b335a476b236cf4790", "score": "0.57699126", "text": "public function get_production_income(){\n\t\t// apply tax rate here\n\t\t$output = 0;\n\t\tforeach($this->planets as $planet){\n\t\t\tif ($planet->terraformed){\n\t\t\t\t$output += $planet->get_production_output() * $this->population * $planet->development;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->influenced_sectors){\n\t\t\tforeach($this->influenced_sectors as $sector){\n\t\t\t\tif ($sector->upgrade && $sector->owner->id == $this->owner->id){\n\t\t\t\t\t$modifier = $sector->upgrade->get_modifier(\"production\");\n\t\t\t\t\t$output += $modifier;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tif ($this->structures){\n\t\t\tforeach($this->structures as $structure){\n\t\t\t\t$modifier = $structure->class->get_modifier(\"production\");\n\t\t\t\tif ($modifier){\n\t\t\t\t\t$output += $modifier;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "2a18c91ab1d518c7cd8fd7f57fd6c3ec", "score": "0.57564515", "text": "function get_bg_amount($distributor_id,$transaction_date)\n{\n\t$ci = & get_instance();\n\t$ci->db->select('sum(bg_amount) as bg_amount_total');\n\t$ci->db->from('bank_guarantee');\n\t$ci->db->where('distributor_id',$distributor_id);\n\t$ci->db->where('end_date>=',$transaction_date);\n\t$res = $ci->db->get();\n\tif($res->num_rows()>0)\n\t{\n\t\t$row = $res->row_array();\n\t\treturn ($row['bg_amount_total']!='')?$row['bg_amount_total']:0;\n\t}\n\treturn 0;\n}", "title": "" }, { "docid": "d1fd203f11b7fd18e7bd713dddf33ef3", "score": "0.5755332", "text": "public function getTotalAmountByCoins(): array;", "title": "" }, { "docid": "d1fd203f11b7fd18e7bd713dddf33ef3", "score": "0.5755332", "text": "public function getTotalAmountByCoins(): array;", "title": "" }, { "docid": "18e3c7a9068bb0db61a78ce238e48d0c", "score": "0.57448375", "text": "function product_sum($product, $amount){\n include 'products.php';\n $sum = 0;\n \n return change_price(check_price($product)) * $amount;\n}", "title": "" }, { "docid": "4753a85beafd86677349374eff5c9d44", "score": "0.5742615", "text": "public function testPurchaseCalculatorDepositAmount()\n {\n }", "title": "" }, { "docid": "c7a6ab68750de7d7a65e98b4163fc0a3", "score": "0.57425517", "text": "public function getTaxAmount();", "title": "" }, { "docid": "c7a6ab68750de7d7a65e98b4163fc0a3", "score": "0.57425517", "text": "public function getTaxAmount();", "title": "" }, { "docid": "99d8b71eca4477f236e23a6415e9e2c5", "score": "0.5721839", "text": "public function getCostTotals();", "title": "" }, { "docid": "843fa69d88d6726bf62404c5da48ebb2", "score": "0.5720504", "text": "public function proratedAmount(Request $request){\n $shop = Auth::user();\n $this->fetchInitialData();\n $mainSubscription = $shop->mainSubscription;\n if($mainSubscription->payment_platform == MainSubscription::PAYMENT_PLATFORM_STRIPE){\n $subscription = SubscriptionStripe::where('user_id',$shop->id)->orderBy('id', 'desc')->first();\n \\Stripe\\Stripe::setApiKey(config('services.stripe.secret'));\n $proration_date = time();\n logger($subscription->stripe_id);\n $subscription_stripe = \\Stripe\\Subscription::retrieve($subscription->stripe_id);\n // and proration set:\n $items = [\n [\n 'id' => $subscription_stripe->items->data[0]->id,\n 'price' => $request->get('plan_id'), # Switch to new plan\n ],\n ];\n\n $invoice = \\Stripe\\Invoice::upcoming([\n 'customer' => $subscription_stripe->customer,\n 'subscription' => $subscription->stripe_id,\n 'subscription_items' => $items,\n 'subscription_proration_date' => $proration_date,\n ]);\n\n logger('invoice='.json_encode($invoice));\n // Calculate the proration cost:\n $cost = 0;\n $current_prorations = [];\n $cost = $invoice->lines->data[0]->amount;\n // foreach ($invoice->lines->data as $line) {\n // //logger($line->period->start);\n // //logger($proration_date);\n // if ($line->period->start - $proration_date <= 1) {\n // array_push($current_prorations, $line);\n // $cost += $line->amount;\n // }\n // }\n logger('prorated amount='.json_encode($cost));\n $amount = $cost/100;\n return response()->json([\n 'status' => 'success',\n 'prorated_amount' => $amount\n ]);\n }\n if($mainSubscription->payment_platform == MainSubscription::PAYMENT_PLATFORM_PAYPAL){\n return response()->json([\n 'status' => 'success',\n 'prorated_amount' => 0\n ]);\n }\n return response()->json([\n 'status' => 'success',\n 'prorated_amount' => 0\n ]);\n //die;\n }", "title": "" }, { "docid": "72ad4b3d529b495bfd9430a97cb4c26f", "score": "0.5717753", "text": "public function getTotalDebit($accountId)\n {\n $accountId1 = StoreHelper::getStoreId();\n $myStoreId = \\App\\Helpers\\StoreHelper::getStoreId(); \n $zoneIds = StoreZone::where('store_id',$myStoreId)->pluck('zone_id')->toArray();\n $zoneCities = ZoneCity::whereIn('zone_id',$zoneIds)->pluck('city_id')->toArray(); \n $accountId2 = UserStore::whereHas('addresses',function($q) use ($zoneCities){\n $q->where('address_type_id',1)->whereIn('city_id',$zoneCities);\n })->where('type','org')->orWhere('type','lab')\n ->get()\n ->reject(function($q) use ($accountId1){\n return $q->id == $accountId1;\n })\n ->pluck('id')->toArray();\n \n $store1Accounts = UserStore::where(['org_id'=>$accountId1,'type'=>'user'])->pluck('id')->toArray();\n $store2Accounts = UserStore::whereIn('org_id',$accountId2)->where('type','user')->pluck('id')->toArray();\n $store1Accounts = array_merge($store1Accounts,[$accountId1]); \n $store2Accounts = array_merge($store2Accounts,$accountId2); \n \n $ids1 = PaymentDaybookAll::whereIn('from',$store1Accounts)->whereIn('to',$store2Accounts)->pluck('id')->toArray(); \n $countCarat = PaymentDaybookAll::whereIn('id',$ids1)->get()\n // ->where('updated_at','<=',$ledger->updated_at)\n ->reject(function($ledger){\n return $ledger->voucher_type != '5'; \n })->pluck(\"total_amount\")->all(); \n \n // $countCarat = PaymentDaybookAll::where('voucher_type','5')->whereIn('from',$store1Accounts)->whereIn('to',$store2Accounts)->get()->pluck('total_amount');\n $countCarat = collect($countCarat);\n $countCarat = $countCarat->reduce(function ($carry, $item) {\n return $carry + $item;\n }); \n return $countCarat;\n }", "title": "" }, { "docid": "b5c9b6d4ac3cac035f8c066fd439bf28", "score": "0.57114017", "text": "public function getAmount()\n {\n return $this->Amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "16dd91db37d6c8bb3fdd1640b0d42c64", "score": "0.57082874", "text": "public function getAmount()\n {\n return $this->amount;\n }", "title": "" }, { "docid": "b0ae01e565651c3474df4433e2630525", "score": "0.56837016", "text": "public function getAmount()\n {\n return $this->__get(\"amount\");\n }", "title": "" }, { "docid": "e042ff7b596ddb6383d129cf10aaf8a1", "score": "0.5682556", "text": "public function get_total(){\n\t\t$total = 0;\n\t\t$price_col = $this->config['price'];\n\t\tforeach($this->items as $item){\n\t\t\t$total += $item['qty'] * $item['object']->$price_col; \n\t\t}\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "d593d71551d406a25ad3fc6b21dc2014", "score": "0.56759274", "text": "public function calc()\r\n {\r\n //get topup as income\r\n $this->topup = DB::table(\"paystack\")\r\n ->where(['phone' => $this->phone, 'status' => 1])\r\n ->sum('amount')\r\n ;\r\n\r\n //reward\r\n $this->reward = DB::table(\"reward\")\r\n ->where(['phone' => $this->phone])\r\n ->sum('amount')\r\n ;\r\n\r\n //get purchase as expenditure\r\n $this->purchase = DB::table(\"purchase\")\r\n ->where(['phone' => $this->phone])\r\n ->sum('amount')\r\n ;\r\n //get withdrawal as money is being sent away from the user wallet\r\n $this->withdrawal = DB::table(\"withdrawals\")\r\n ->where(['phone' => $this->phone])\r\n ->sum('amount')\r\n ;\r\n\r\n //evaluate the total income\r\n $this->income = $this->topup + $this->reward;\r\n\r\n //evaluate the total expenditure\r\n $this->expenditure = $this->purchase + $this->withdrawal ;\r\n\r\n //get the balance\r\n $this->balance = $this->income - $this->expenditure;\r\n\r\n\r\n// return $this->balance;\r\n }", "title": "" }, { "docid": "1d8e664d580c7cfbfa413f278b952700", "score": "0.5673982", "text": "public function getDisplayAmount();", "title": "" }, { "docid": "4f231fdfbbcddd2902e1fdace564fb7a", "score": "0.56706935", "text": "public function getamount()\n\t\t{\n\t\treturn $this->amount;\n\t\t}", "title": "" }, { "docid": "23eab3ffe9c1ec2fb9c3a4c9b58e683f", "score": "0.5669352", "text": "public function getBaseShippingAmount();", "title": "" }, { "docid": "0478860d1082b41305296e1c99339d9b", "score": "0.5669009", "text": "public function getPurchaseGrandTotal(){\n return $this->Purchase_GrandTotal;\n }", "title": "" }, { "docid": "ae22cba6ec12f8a7e832d90e389e9397", "score": "0.5664928", "text": "public function getQtyToShip();", "title": "" }, { "docid": "d987fba1786defb4e037fc054366491e", "score": "0.56615615", "text": "public function get_credits_income(){\n\t\t// apply tax rate here\n\t\t$output = 0;\n\t\tforeach($this->planets as $planet){\n\t\t\tif ($planet->terraformed){\n\t\t\t\t$output += $planet->get_credits_output() * $this->population * $planet->development;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->influenced_sectors){\n\t\t\tforeach($this->influenced_sectors as $sector){\n\t\t\t\tif ($sector->upgrade && $sector->owner->id == $this->owner->id){\n\t\t\t\t\t$modifier = $sector->upgrade->get_modifier(\"credits\");\n\t\t\t\t\t$output += $modifier;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tif ($this->structures){\n\t\t\tforeach($this->structures as $structure){\n\t\t\t\t$modifier = $structure->class->get_modifier(\"credits\");\n\t\t\t\tif ($modifier){\n\t\t\t\t\t$output += $modifier;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "8a44deac2d26f0b5dafdb973bed973a5", "score": "0.5658303", "text": "private function getDiscountSum($orderLine) {\n $this->logger->mlog('Begin getDiscountSum()', Zend_Log::INFO, $this);\n \t\n \t// add to filters array\n $filters['orderLineId']= $orderLine->getOrderLineId();\n $discounts = $this->orderLineVendorDiscountDao->get($filters);\n\n $discountSum = 0;\n if ($discounts) {\n $today = Merc_Util_Date::unixToday();\n\n \n foreach ($discounts as $discount) {\n /* @var $discount Merc_Model_Davis_OrderLineVendorDiscount */\n if (!$discount->getEffectiveDate() && !$discount->getTerminationDate()) { \n $discountSum = $discountSum + $discount->getAmount();\n $orderLine->addDiscount($discount);\n $this->logger->mlog('Adding amount: ' . $discount->getAmount() . ' No Effective or Termination dates!', Zend_Log::DEBUG, $this);\n } else {\n \n $effectiveDate = Merc_Util_Date::getNextBusinessDayIfWeekend($discount->getEffectiveDate());\n $terminationDate = Merc_Util_Date::getNextBusinessDayIfWeekend($discount->getTerminationDate());\n if ($today >= $effectiveDate && $today <= $terminationDate) { \n $this->logger->mlog('Adding amount: ' . $discount->getAmount() . ' Effective date: ' . date('m-d-Y', $effectiveDate) . ' <= Today: ' . date('m-d-Y', $today) . ' <= Termination Business Day: '. date('m-d-Y', $terminationDate), Zend_Log::DEBUG, $this);\n $discountSum = $discountSum + $discount->getAmount();\n $orderLine->addDiscount($discount);\n }\n }\n }\n }\n \n $this->logger->mlog('End getDiscountSum() discountSum: ' . $discountSum, Zend_Log::INFO, $this);\n return $discountSum;\n }", "title": "" }, { "docid": "c538f3c6f4e1e32f84df8b54141b8775", "score": "0.5657697", "text": "public function getSepaAmount();", "title": "" }, { "docid": "e64b9852283f4c4d7744f298f075da97", "score": "0.5654017", "text": "public function getAmount()\n {\n return $this->order[\"Monto\"];\n }", "title": "" }, { "docid": "25e1a58aa177e35725b89c454e10051a", "score": "0.5652564", "text": "public function getBaseDiscountAmount();", "title": "" }, { "docid": "f576774eb6bbef70315abc9913316a9e", "score": "0.56471866", "text": "function get_transaction_amount()\n {\n return $this->paypal_post_vars['mc_gross'];\n }", "title": "" }, { "docid": "f09d6633c51737d5e98394bc1ad30c33", "score": "0.5643383", "text": "public function get_total_income() {\n\t\t$this->db->select('SUM((product_price * product_qty)-((product_price * product_qty)*((diskon_price)/100))) AS total_amount');\n\t\t$this->db->where('accepted = 1 AND shipped = 1 AND paid = 1 AND recived = 1');\n\t\t$this->db->join('sale_detail', 'sale_detail.sale_id = sale.id', 'left');\n\t\t$query = $this->db->get('sale');\n\t\treturn $query->row()->total_amount;\n\t}", "title": "" }, { "docid": "304d88add2c6c2f28dd5fce4a47f0c1e", "score": "0.563571", "text": "function totalExpense()\n {\n return $this->hasOne(ExpensiveDetail::class, 'budget_id', 'budget_id')\n ->select(array('budget_id', DB::raw(\"SUM(expensive_amount) as expensive_amount\")))\n ->groupBy(\"budget_id\");\n }", "title": "" }, { "docid": "92429fb80a3ae91e41e3142da45d3aaa", "score": "0.5626671", "text": "function getCartTotal() {\r\n $items = getCart();\r\n $total = 0;\r\n foreach ($items as $product) {\r\n $total += $product['price'];\r\n }\r\n return $total;\r\n}", "title": "" }, { "docid": "c6dfa3d8fb14d910cac5a814190817ea", "score": "0.56164235", "text": "public function getAmount(): string\n {\n return $this->money->getAmount();\n }", "title": "" }, { "docid": "ddb448570de1f03e60f81a7de59cd77e", "score": "0.5615673", "text": "function SummaryOfTotal() {\n\t return $this->dbObject('Total')->Nice();\n\t}", "title": "" }, { "docid": "cd5feb4cb6f6d4a46137b9ddf77ba9f0", "score": "0.5605461", "text": "public function getAmount(){\n\t\treturn $this->amount / 100;\n\t}", "title": "" }, { "docid": "43faeb054e40ef26f4c35faef1f3f4ff", "score": "0.56006134", "text": "public function getAmount(): int\n {\n return $this->amount;\n }", "title": "" }, { "docid": "7fea1e6d9b7a701b1114b336af5299c3", "score": "0.5591313", "text": "public function getAmount() {\n\t\treturn($this->amount);\n\t}", "title": "" } ]
5acb4bebc3df84b8232f41dd9c14f0b1
Use with array_map to get the AbuseIpDB deny list.
[ { "docid": "e79cdb6928052f54d52521ba87b2b4c4", "score": "0.70063263", "text": "private function getAbuseIpDbDenyList($ipObject)\n {\n if (!property_exists($ipObject, 'abuseConfidenceScore')\n || !property_exists($ipObject, 'ipAddress')\n ) {\n return;\n }\n if ($ipObject -> abuseConfidenceScore >= ABUSE_CONFIDENCE_SCORE\n && !in_array($ipObject -> ipAddress, $this -> allIps)\n ) {\n $this -> denyListOutput .= \"deny \".$ipObject -> ipAddress.\";\".PHP_EOL;\n $this -> count++;\n }\n }", "title": "" } ]
[ { "docid": "dfd80979d4da7b7d523825619ebbfce6", "score": "0.57860863", "text": "public function getDeny()\n {\n return $this->deny;\n }", "title": "" }, { "docid": "c6ea22f8414b674dd045c6e723c3516c", "score": "0.5659459", "text": "private function getCustomDenyList($line)\n {\n if (substr(trim($line), 0, 1) === \"#\" || strlen(trim($line)) === 0) {\n return;\n }\n // Get just the IP address from the line.\n $justIpAddress = $this -> filterJustIp($line);\n // Add the ip to the all IPs array.\n if (!array_key_exists($justIpAddress, $this -> allIps)) {\n // Add the ip to the response string.\n $this -> denyListOutput .= \"deny \".$justIpAddress.\";\".PHP_EOL;\n $this -> count++;\n }\n $this -> allIps[$justIpAddress] = $justIpAddress;\n }", "title": "" }, { "docid": "94549a93b572ee14fba7b00b12cd89a2", "score": "0.557808", "text": "public function blacklist_list() {\n return $this->blacklist;\n }", "title": "" }, { "docid": "d89f3370307ce63e3cc3fe686b6f7489", "score": "0.5421088", "text": "function getInstancePrivateIPs() {\n\t\t$addrs = array();\n\t\t$addresses = OpenStackNovaController::_get_property( $this->instance, 'addresses' );\n\t\tif ( $addresses ) {\n\t\t\tforeach ( $addresses as $addresslist ) {\n\t\t\t\tforeach ( $addresslist as $address ) {\n\t\t\t\t\t$addr = OpenStackNovaController::_get_property( $address, 'addr' );\n\t\t\t\t\tif ( $addr && !filter_var( $addr, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ) ) {\n\t\t\t\t\t\t$addrs[] = $addr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $addrs;\n\t}", "title": "" }, { "docid": "7eedaf6e469ef0b42945c650bc4949ec", "score": "0.53807163", "text": "function setBanned_Array($array) {$this->banned_array = $array;}", "title": "" }, { "docid": "8468f53309289661e6ec4dcf6be18c4c", "score": "0.53600526", "text": "public function __addDenyMethods($_denyMethods){\n\t\t$this->__denyMethods[] = $_denyMethods;\n\t}", "title": "" }, { "docid": "688b84e868370b7b2d5234b969332504", "score": "0.53280264", "text": "private function msgDenied() {\n\t\t$array['state'] = -1;\n\t\t$array['msg'] = \"Access Denied\";\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "ed4ceef25f5027d5acb11b2d54d67fa2", "score": "0.5323023", "text": "private function get_prohibited_dashboard_blocks(objects\\exammode_user $emu) {\n global $DB, $CFG;\n\n $sql = \"SELECT id \"\n . \"FROM {block_instances} bi \"\n . \"WHERE parentcontextid = :contextid \"\n . \"AND blockname = :privatefiles\";\n\n $blockinstances = $DB->get_records_sql(\n $sql,\n array(\n 'contextid' => \\context_user::instance($emu->get_userid())->id,\n 'privatefiles' => 'private_files'\n )\n );\n\n return array_map(function($bi) {\n return $bi->id;\n }, $blockinstances);\n }", "title": "" }, { "docid": "b4b631b7947b1ea4595a58c577ca7151", "score": "0.52965474", "text": "function listFixedIPs(){\n $result = array();\n if ($this->handle != null ) {\n $resultset = $this->handle->query(\"select ip,pipeno_in,pipeno_out,last_checked from captiveportal_ip\");\n $resultset->setFetchMode(\\Phalcon\\Db::FETCH_OBJ);\n\n foreach ($resultset->fetchAll() as $record) {\n $result[$record->ip] = $record;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "15b6b94e0cafde0a97f8af24807816c8", "score": "0.5285991", "text": "public function getPrivList()\n {\n // convert json priv map to array\n $priv_list = array();\n foreach ($this->ACLtags as $aclKey => $aclItem) {\n $priv_list[$aclKey] = array();\n foreach ($aclItem as $propName => $propValue) {\n if ($propName == 'name') {\n // translate name tag\n $priv_list[$aclKey][$propName] = gettext($propValue);\n } else {\n $priv_list[$aclKey][$propName] = $propValue;\n }\n }\n }\n\n // sort by name ( case insensitive )\n uasort($priv_list, function ($a, $b) {\n return strcasecmp($a[\"name\"], $b[\"name\"]);\n });\n\n return $priv_list;\n }", "title": "" }, { "docid": "b1c6f344c7287e8bb50357d6d8f8a9f9", "score": "0.5254922", "text": "public function getBypassRoles();", "title": "" }, { "docid": "1aaf2ee93ea825e624ea886d5d076ae8", "score": "0.524348", "text": "public function testIpBlacklist(): void\n {\n $this->expectException(BlacklistValidationException::class);\n $request = $this->createRequest(['REQUEST_METHOD' => 'GET', 'REMOTE_ADDR' => '1.2.3.4']);\n $arrayBlacklist1 = new ArrayLookupStrategy(['4.3.2.1']);\n $ipBlacklistValidator1 = new IpBlacklistValidator($arrayBlacklist1);\n $this->assertTrue($ipBlacklistValidator1->validate($request, $this->createAntibot()));\n\n $arrayBlacklist2 = new ArrayLookupStrategy(['1.2.3.4']);\n $ipBlacklistValidator2 = new IpBlacklistValidator($arrayBlacklist2);\n $ipBlacklistValidator2->validate($request, $this->createAntibot());\n }", "title": "" }, { "docid": "ada458d986bfa8f880414d53c8c9824e", "score": "0.5241935", "text": "function _getRightsArray(){\nreturn array(\n\"level\",\n\"administration\",\n\"adminsettings\",\n\"adminusers\",\n\"admingroups\",\n\"admincontent\",\n\"adminsection\",\n\"admincategory\",\n\"adminbook\",\n\"adminseparator\",\n\"admingallery\",\n\"adminlink\",\n\"adminintersection\",\n\"adminforum\",\n\"adminart\",\n\"adminallart\",\n\"adminchangeartauthor\",\n\"adminpoll\",\n\"adminpollall\",\n\"adminsbox\",\n\"adminbox\",\n\"admindownload\",\n\"adminnewsletter\",\n\"adminsitemap\",\n\"adminconfirm\",\n\"adminneedconfirm\",\n\"adminfman\",\n\"adminfmanlimit\",\n\"adminfmanplus\",\n\"adminhcmphp\",\n\"adminbackup\",\n\"adminmassemail\",\n\"adminstatsword\",\n\"adminbans\",\n\"adminposts\",\n\"changeusername\",\n\"unlimitedpostaccess\",\n\"locktopics\",\n\"postcomments\",\n\"artrate\",\n\"pollvote\",\n\"selfdestruction\"\n);\n}", "title": "" }, { "docid": "ebefff807853b10e84ea8383e359df80", "score": "0.5229578", "text": "public function createBlacklist($abuseIpDbJsonFilePath, $localCustomBlacklistPath = null)\n {\n $responseString = null;\n $fileOutputPath = $this->rootPath.\"/nginx-abuseipdb-blacklist.conf\";\n\n $this -> checkLocalBlacklistPath($localCustomBlacklistPath);\n $this -> checkAbuseIpDbJsonFilePath($abuseIpDbJsonFilePath);\n\n $fileContents = file_get_contents($abuseIpDbJsonFilePath);\n // Decode the contents of the JSON file.\n $object = json_decode($fileContents);\n if (is_null($object)) {\n throw new Exception(\"The json response from AbuseIPDB could not be decoded.\".PHP_EOL, 1);\n }\n\n // Print errors and exit the script if there was are errors in the response.\n if (isset($object -> errors) || !$object || empty($object)) {\n throw new Exception(PHP_EOL.$object -> errors[0] -> detail.PHP_EOL.PHP_EOL, 1);\n }\n\n if (!is_null($localCustomBlacklistPath)) {\n // Load the local blacklist if it is available.\n $this -> loadLocalCustomBlacklist($localCustomBlacklistPath);\n }\n\n // Handle the AbuseIpDb $object -> data.\n array_map([$this, 'getAbuseIpDbDenyList'], $object -> data);\n\n $filePutResult = @file_put_contents($fileOutputPath, $this -> denyListOutput);\n\n // Check for an instance where file_get_contents fails.\n if (false === $filePutResult) {\n throw new Exception(PHP_EOL.\"Unable to create the file: \".$fileOutputPath.\".\");\n }\n\n $this -> unlinkAbuseIpDbResponseFile();\n\n $responseString .= PHP_EOL;\n $responseString .= PHP_EOL;\n $responseString .= \"Added \".$this -> count.\" ip addresses to your blacklist.\".PHP_EOL;\n $responseString .= \"You can now test the configuration: nginx -t\".PHP_EOL;\n $responseString .= \"You will also want to reload nginx. For example, sudo service nginx reload on Ubuntu.\".PHP_EOL;\n\n return $responseString;\n }", "title": "" }, { "docid": "6bd1359125d048166918e6f1ac77f94b", "score": "0.5218523", "text": "public function getBlacklistedPins(){\n\t \n\t $_blacklisted_pins = array();\n\t \n\t $db = $this->registry->db;\n\t \n\t $conn = $db::getInstance();\n\t\t\n $sql_select = \"SELECT * FROM pingen.pingen_pinblacklist\";\n \n $result = $conn->Execute($sql_select,'');\n\t\t\n\t while (!$result->EOF){\n\t \n\t array_push($_blacklisted_pins,$result->fields['pid']);\n\t\t \n\t\t $result->moveNext();\n }\n return $_blacklisted_pins;\n }", "title": "" }, { "docid": "cc83bd288a7393270a47d495555a9955", "score": "0.5188975", "text": "public static function banned(){\n $db = Database::getInstance();\n $conn = $db->getConnection();\n\n $sql =\"SELECT * FROM user WHERE banned=1\";\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\n return $result;\n }", "title": "" }, { "docid": "738900f17231ca4d52665d4da5033bee", "score": "0.5152201", "text": "public function getAllUnbanRequests()\n {\n $sql = \"SELECT * FROM `panel_unbans`\";\n $this->db->prepareQuery($sql);\n $results = $this->db->getResults();\n $final_results = array();\n if (!empty($results)) {\n foreach ($results as $result) {\n $result['author_name'] = $this->getUser($result['author_id'])['NickName'];\n $result['admin_name'] = $this->getUser($result['banned_by'])['NickName'];\n array_push($final_results, $result);\n }\n }\n return $final_results;\n }", "title": "" }, { "docid": "352aa00ec5fe4bca5932f2e4f19bf703", "score": "0.5139645", "text": "public static function checkipban($ip)\n {\n $res = DB::run('SELECT * FROM bans');\n while ($row = $res->fetch(PDO::FETCH_ASSOC)) {\n $banned = false;\n if (self::is_ipv6($row[\"first\"]) && self::is_ipv6($row[\"last\"]) && self::is_ipv6($ip)) {\n $row[\"first\"] = self::ip2long6($row[\"first\"]);\n $row[\"last\"] = self::ip2long6($row[\"last\"]);\n $banned = bccomp($row[\"first\"], $nip) != -1 && bccomp($row[\"last\"], $nip) != -1;\n } else {\n $row[\"first\"] = ip2long($row[\"first\"]);\n $row[\"last\"] = ip2long($row[\"last\"]);\n $banned = $nip >= $row[\"first\"] && $nip <= $row[\"last\"];\n }\n if ($banned) {\n header(\"HTTP/1.0 403 Forbidden\");\n echo '<html><head><title>Forbidden</title> </head><body> <h1>Forbidden</h1>Unauthorized IP address.<br> </body></html>';\n die;\n }\n }\n }", "title": "" }, { "docid": "45f379d920e85b689a0e4bcbafdef49d", "score": "0.5133583", "text": "public function getBlacklist()\n {\n return $this->blacklist;\n }", "title": "" }, { "docid": "45f379d920e85b689a0e4bcbafdef49d", "score": "0.5133583", "text": "public function getBlacklist()\n {\n return $this->blacklist;\n }", "title": "" }, { "docid": "5e8dc0a357e3bcd7437c2d520d15bfc6", "score": "0.5124089", "text": "public function accessRules()\n {\n return [\n [\n 'deny', // deny guest\n 'users' => ['guest'],\n ],\n ];\n }", "title": "" }, { "docid": "9a02fb2a34e7e99362c2ed1697f3a4e1", "score": "0.5113585", "text": "public function getBusinessAreaAllowableValues()\n {\n return [\n self::BUSINESS_AREA_IT_,\nself::BUSINESS_AREA_,\nself::BUSINESS_AREA__2,\nself::BUSINESS_AREA__3,\nself::BUSINESS_AREA__4,\nself::BUSINESS_AREA__5,\nself::BUSINESS_AREA__6,\nself::BUSINESS_AREA__7,\nself::BUSINESS_AREA__8,\nself::BUSINESS_AREA__9,\nself::BUSINESS_AREA__10,\nself::BUSINESS_AREA__11,\nself::BUSINESS_AREA__PR,\nself::BUSINESS_AREA__13,\nself::BUSINESS_AREA__14,\nself::BUSINESS_AREA__15,\nself::BUSINESS_AREA__16,\nself::BUSINESS_AREA__17,\nself::BUSINESS_AREA__18,\nself::BUSINESS_AREA__19,\nself::BUSINESS_AREA__20,\nself::BUSINESS_AREA__21,\nself::BUSINESS_AREA__22,\nself::BUSINESS_AREA__23,\nself::BUSINESS_AREA__24, ];\n }", "title": "" }, { "docid": "060c85d2c6a6313a8a239ce3fb9fe6de", "score": "0.510005", "text": "public function get_proxy_bypass_list()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $list = array();\n\n $rules = $this->_get_rules();\n\n foreach ($rules as $rule) {\n if (!($rule->get_flags() & (Rule::PROXY_BYPASS)))\n continue;\n\n $info = array();\n $info['name'] = $rule->get_name();\n $info['address'] = $rule->get_address();\n $info['enabled'] = $rule->is_enabled();\n $list[] = $info;\n }\n\n return $list;\n }", "title": "" }, { "docid": "a5b4888997b3f8e205efcc597e491953", "score": "0.50921494", "text": "public function providerTestBlockAccessNotAllowed() {\n $data = [];\n $data['entity_forbidden'] = [\n FALSE,\n AccessResult::forbidden(),\n ];\n $data['entity_neutral'] = [\n FALSE,\n AccessResult::neutral(),\n ];\n return $data;\n }", "title": "" }, { "docid": "ed9031313f0089387a87878a06cf2535", "score": "0.50651705", "text": "function loadBlacklistedEmails() {\n global $blacklisted_emails;\n global $conn;\n\n $sql = \"SELECT * FROM email_blacklist;\";\n\n if ($stmt = $conn->prepare($sql)) {\n if ($stmt->execute()) {\n $results = $stmt->get_result();\n\n if ($results->num_rows > 0) {\n while ($row = $results->fetch_assoc()) {\n $blacklisted_emails[] = $row['email'];\n }\n }\n } else {\n doSQLError($stmt->error);\n }\n\n $stmt->close();\n } else {\n doSQLError($conn->error);\n }\n }", "title": "" }, { "docid": "d397623a2ff1e0cef65286cd1e8af616", "score": "0.5055408", "text": "public function getAllowedIps() {\n if (file_exists($v = $this->getIpPath()))\n return file($v, \\FILE_IGNORE_NEW_LINES);\n return array();\n }", "title": "" }, { "docid": "d4a02891e8a6f2fcd59b5fea0abc8afe", "score": "0.50179154", "text": "function ip_blocked(){\n $ip_restriction = $GLOBALS['company']['ip_restriction'];\n $realIP = get_client_ip_server();\n\n if (!$ip_restriction){\n return FALSE;\n }\n else {\n $blocked= TRUE;\n foreach ($ip_restriction as $ip_range) {\n if (ip_in_range($realIP, $ip_range)){\n $blocked = FALSE;\n }\n }\n if (!$blocked){\n return FALSE;\n } else {\n return $realIP;\n }\n }\n}", "title": "" }, { "docid": "df450e94035c2e886520a4c74e70ff60", "score": "0.5015797", "text": "public function listIndiceAllowed()\n {\n return $this->allowed;\n }", "title": "" }, { "docid": "ca7923d295e62eac908fdd100fb01c1c", "score": "0.5001132", "text": "public function getUnlockareaList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "e3a34cb80d614db5a5eda984011c2aa8", "score": "0.4995525", "text": "protected function resourceAbilityMap()\n {\n return [\n 'index' => 'index',\n 'edit' => 'update',\n 'update' => 'update',\n ];\n }", "title": "" }, { "docid": "c06396c59e7a6ecf254953e52bb72ae8", "score": "0.49908578", "text": "public function getDeniedRoutes() {\n $model = $this->getSecurityModel(true);\n return $model->getDeniedRoutes();\n }", "title": "" }, { "docid": "bf5db687141e0e3f3807715a662a6745", "score": "0.49449858", "text": "public function getAccessLevel(\n\t\tstring $nameTable = \"\", \n\t\tstring $login = \"\", \n\t\tstring $pass = \"\", \n\t\tstring $ip = \"\", \n\t\tstring $nameColumnLogin = \"login\", \n\t\tstring $nameColumnPass = \"pass\",\n\t\tstring $nameColumnIp = \"ip\",\n\t\tstring $nameColumnModuleName = \"module_name\",\n\t\tstring $nameColumnAccessLevel = \"access_level\"\n\t\t): array\n\t\t{\n\t\t\tif ($nameTable != \"\"){\n\t\t\t\t$sql = \"SELECT \" . $nameColumnModuleName . \", \" . $nameColumnAccessLevel . \" FROM \" . $nameTable . \" WHERE \";\n\t\t\t\tif ($login != \"\"){\n\t\t\t\t\t$sql .= ($nameColumnLogin . \" = :login\");\n\t\t\t\t}else{\n\t\t\t\t\treturn [];\n\t\t\t\t};\n\t\t\t\tif ($pass != \"\"){\n\t\t\t\t\t$sql .= (\" AND \" . $nameColumnPass . \" = :pass\");\n\t\t\t\t}else{\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t\tif ($ip != \"\"){\n\t\t\t\t\t$sql .= \" AND \" . $nameColumnIp . \" = :ip\";\n\t\t\t\t}\n\t\t\t\t$stmt = $this->database->prepare($sql);\n\t\t\t\t$stmt->bindValue(\":login\", $login);\n\t\t\t\t$stmt->bindValue(\":pass\", $pass);\n\t\t\t\tif ($ip != \"\"){\n\t\t\t\t\t$stmt->bindValue(\":ip\", $ip);\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t$accessLevel = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\tif (count($accessLevel) > 0){\n\t\t\t\t\t\treturn $accessLevel;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(PDOException $e){\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [];\n\t\t}", "title": "" }, { "docid": "d3cc3bcd4d619e91fcf1e2fcce82ce64", "score": "0.49423522", "text": "public static function getBotIpRanges()\r\n {\r\n return array(\r\n // Google\r\n '216.239.32.0/19',\r\n '64.233.160.0/19',\r\n '66.249.80.0/20',\r\n '72.14.192.0/18',\r\n '209.85.128.0/17',\r\n '66.102.0.0/20',\r\n '74.125.0.0/16',\r\n '64.18.0.0/20',\r\n '207.126.144.0/20',\r\n '173.194.0.0/16',\r\n\r\n // Live/Bing/MSN\r\n '64.4.0.0/18',\r\n '65.52.0.0/14',\r\n '157.54.0.0/15',\r\n '157.56.0.0/14',\r\n '157.60.0.0/16',\r\n '207.46.0.0/16',\r\n '207.68.128.0/18',\r\n '207.68.192.0/20',\r\n '131.253.26.0/20',\r\n '131.253.24.0/20',\r\n\r\n // Yahoo\r\n '72.30.198.0/20',\r\n '72.30.196.0/20',\r\n '98.137.207.0/20',\r\n\r\n // Chinese bot hammering websites\r\n '1.202.218.8'\r\n );\r\n }", "title": "" }, { "docid": "62cea9550d9f1974af03c28ee30a6579", "score": "0.4933756", "text": "function whitelistGetIPAddy() {\n\t\treturn array_merge(whitelistGetNetBIOSIP(), file(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'whitelist.txt'));\n\t}", "title": "" }, { "docid": "d1b3cbb6177086a05eb61c998f64121a", "score": "0.49328524", "text": "public function getProtections();", "title": "" }, { "docid": "e2fdb07996b5d855527fb21627ea28db", "score": "0.49287125", "text": "public function getAccountBlacklist()\n\t{\n\t\t$response = $this->execute('get_account_blacklist');\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "c2a4b2eda92e3fba62d061bd1e32b79c", "score": "0.4922925", "text": "public function accessRules() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t// deny from admin\n\t\t\t\t'deny',\n\t\t\t\t'roles' => array('admin'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "9458fa5f91b3e5eeaf43816aaf6f2d8b", "score": "0.4920713", "text": "private function save_allowlist_meta( $body, $allowlist_ips ) {\n\t\t$ip_address = filter_var( json_decode( $body, true )['output'][0], FILTER_VALIDATE_IP );\n\t\tif ( ! $ip_address ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$allowlist_ips[] = $ip_address;\n\t\tupdate_option( $this->allowlist_option_name, $allowlist_ips );\n\t}", "title": "" }, { "docid": "6d6cf0befde322eeeffffee6977d2ed4", "score": "0.4910621", "text": "public function list()\n {\n $response = $this->adapter->get(\\sprintf('%s/reservedip/list', $this->endpoint));\n\n $ips = \\json_decode($response);\n\n $this->extractMeta($ips);\n\n return \\array_map(function ($ip) {\n return new ReservedIpEntity($ip);\n }, $ips);\n }", "title": "" }, { "docid": "8598be3327d097848af40fa4219921ac", "score": "0.48988795", "text": "function getPrivilegies($filter) {\n $sentence = \"SELECT\n menus.`description` AS menus_description,\n users.`userName` AS users_userName,\n users.`lastName` AS users_lastName,\n users.`secondLastName` AS users_secondLastName,\n users.`email` AS users_email,\n users.`idDepartment` AS users_idDepartment,\n accessmenu.idUser AS accessmenu_idUser,\n accessmenu.idMenu AS accessmenu_idMenu,\n deparments.`description` AS deparments_description\nFROM\n `menus` menus INNER JOIN `accessmenu` accessmenu ON menus.`idMenu` = accessmenu.`idMenu`\n INNER JOIN `users` users ON accessmenu.`idUser` = users.`idUser`\n INNER JOIN `deparments` deparments ON users.`idDepartment` = deparments.`idDepartments`\n WHERE accessmenu.idUser = '\" . $filter . \"' OR users.email = '\" . $filter . \"'\";\n $this->privilegies = $this->cnn->excecuteSelect($sentence);\n return $this->privilegies;\n }", "title": "" }, { "docid": "96b70746007cf8a0faa259a1dc798b68", "score": "0.48973736", "text": "protected function allowWithoutModuleAccess(){\n\t\treturn array();\n\t}", "title": "" }, { "docid": "15c29c3128a969d03e845e8518848a3b", "score": "0.48891848", "text": "public function accessRules() {\n return [['allow', 'users' => ['@']],['deny']];\n }", "title": "" }, { "docid": "616f6d7bde7f1dd37bef3cf90983a644", "score": "0.48857847", "text": "public function setDeny($deny)\n {\n $this->deny = Text::Create($deny, Text::TYPE_PLAIN);\n\n return $this;\n }", "title": "" }, { "docid": "78a33ed80dbeb4b864f251217f330223", "score": "0.48856986", "text": "public function accessControls()\n {\n return [\n [\n 'allow' => true,\n 'roles' => ['?'],\n ],\n\n [\n 'allow' => true,\n 'actions' => ['options'],\n 'roles' => ['?'],\n ],\n ];\n }", "title": "" }, { "docid": "0715c8858c74cfb232711290160a378c", "score": "0.4885649", "text": "public function accessRules()\n\t{ $data= Model_Email::model()->findAll(\"user_type='Admin'\");\n $admins= CHtml::listData($data, 'email', 'email');\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('downloadpaper','downloadindex','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','secured_download_paper','downloadpaper','downloadindex','feedback_paper_download'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete','downloadpaper','downloadindex','downloadpaperaspdf','downloadbyeditor','reviewer_upload_form','first_review','feedback_paper_download','primary_paper_rejection_by_admin'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n \n // array('allow',array('actions'=>array('downloadbyeditor'),'users'=>array('editor'))),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "a070a8362b0a122fb49c253c4a1cd854", "score": "0.48718524", "text": "function getIPBanList($id)\n{\n try {\n $dbh = db_connect();\n $params = array(\n 'userIP' => $id\n );\n $query = \"SELECT id \n\t\t\t\t FROM prochatrooms_users \n\t\t\t\t WHERE userIP = :userIP\n\t\t\t\t AND ban = '1'\n\t\t\t\t\";\n $action = $dbh->prepare($query);\n $action->execute($params);\n $count = $action->rowCount();\n\n $dbh = null;\n } catch (PDOException $e) {\n $error = \"Function: \" . __FUNCTION__ . \"\\n\";\n $error .= \"File: \" . basename(__FILE__) . \"\\n\";\n $error .= 'PDOException: ' . $e->getCode() . '-' . $e->getMessage() . \"\\n\\n\";\n\n debugError($error);\n }\n\n return $count;\n}", "title": "" }, { "docid": "a452acb6b90ae626c2fde89630f7bed0", "score": "0.4868672", "text": "public function GetUrlCategoriesDenied($gid)\r\n\t{\r\n\t $result = mysql_query(sprintf(\"select * from `url_categories_denied` where gid=%d\",$gid));\r\n\t $cats = array();\r\n\t while($row = mysql_fetch_assoc($result))\r\n\t \t$cats[] = $row['cid'];\r\n\t return $cats;\r\n\t}", "title": "" }, { "docid": "ec482080c4a7ffaa65492b3dae86c3f1", "score": "0.48649725", "text": "public function get_asmt_map_ids(){\n\t\t//$asmt_map = maybe_unserialize( get_option( 'assignment_map' ) );\n\t\t$map_id_list = array();\n\t\t$asmt_id = 0;\n\t\t\n\t\tforeach( $this->asmt_map as $certs){\n\t\t\tforeach( $certs as $cert_obj ){\n\t\t\t\tforeach( $cert_obj as $courses ){\n\t\t\t\t\tforeach( $courses as $course ){\n\t\t\t\t\t\tforeach( $course->units as $unit ){\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($unit->assignments as $asmt_id => $asmt_obj){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( $asmt_id !== 0 || $asmt_id !== 99999 ){\n\t\t\t\t\t\t\t\t\tif( !in_array( $asmt_id, $map_id_list ) )\n\t\t\t\t\t\t\t\t\t\t$map_id_list[] = $asmt_id;\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\t\t}\n\t\treturn $map_id_list;\n\t}", "title": "" }, { "docid": "22799104e74ce1cadf3fb72680402de0", "score": "0.4859352", "text": "static public function getListAccess()\n\t{\n\t\treturn self::$availableAccess;\n\t}", "title": "" }, { "docid": "bd2bb40eaf659b0f15a8849c175ade82", "score": "0.48554912", "text": "function list_access_pool_types(){\n\t\treturn generate_db_array(\"access_pool_type_id\", \"access_pool_type_name\", DB_TABLE_ACCESS_POOL_TYPE);\n\t}", "title": "" }, { "docid": "4894f541429cd1c093cda9e6efb1aeb0", "score": "0.4848898", "text": "function initializeBannedItemsArray() {\n\t\t\n\t\t//try to read the banlists from the news import table\n\t\t// query looks like 'select uid, banlist from tx_ccrdfnewsimport '\n\t\t\n\t\t$columns = 'uid, banlist';\n\t\t$table = 'tx_ccrdfnewsimport';\n\t\t$where = '';\n\t\t$bannedListRows = $GLOBALS[ 'TYPO3_DB' ]->exec_SELECTgetRows($columns, $table, $where );\n\t\t$bannedListRows = ( is_array( $bannedListRows ) )\n\t\t\t? $bannedListRows\n\t\t\t: array();\n\t\t//echo '$bannedListRows'; print_r( $bannedListRows ); //tmp debug\n\t\t$bannedItemsArray = array();\n\t\t//Add an array entry to the banned array for each row. The key is the uid.\n\t\t//The value is an array of banned words derived from the comma-separated value stored\n\t\t//in the field 'banlist'\n\t\tforeach( $bannedListRows as $bannedListRow ) {\n\t\t\t\n\t\t\t//echo \"\\$bannedListRows['banlist']\"; echo $bannedListRow['banlist']; //tmp debug\n\t\t\t//print_r($bannedListRow);\n\t\t\t$bannedItemsArray[$bannedListRow['uid']] = empty($bannedListRow['banlist'])\n\t\t\t\t? array()\n\t\t\t\t: explode(',',$bannedListRow['banlist'])\n\t\t\t\t;\n\t\t\t\n\t\t}\n\t\t//cache in the instance variable.\n\t\t$this->bannedItemsArray = $bannedItemsArray;\n\t\t//echo '$bannedItemsArray'; print_r($bannedItemsArray); //tmp debug\n\t}", "title": "" }, { "docid": "6dc5bf93b9e5037ecd3dacc6ca872ab8", "score": "0.4843823", "text": "public function getBlockedFriends(): array;", "title": "" }, { "docid": "9507e0bad46851a686390e6137b6b786", "score": "0.48347133", "text": "public function getUseOfLoanAllowableValues()\n {\n return [\n self::USE_OF_LOAN_0,\n self::USE_OF_LOAN_1,\n self::USE_OF_LOAN_2,\n self::USE_OF_LOAN_3,\n self::USE_OF_LOAN_4,\n self::USE_OF_LOAN_5,\n self::USE_OF_LOAN_6,\n self::USE_OF_LOAN_7,\n self::USE_OF_LOAN_8,\n self::USE_OF_LOAN_101,\n self::USE_OF_LOAN_102,\n self::USE_OF_LOAN_103,\n self::USE_OF_LOAN_104,\n self::USE_OF_LOAN_105,\n self::USE_OF_LOAN_106,\n self::USE_OF_LOAN_107,\n self::USE_OF_LOAN_108,\n self::USE_OF_LOAN_109,\n self::USE_OF_LOAN_110,\n self::USE_OF_LOAN_201,\n self::USE_OF_LOAN_202,\n self::USE_OF_LOAN_203,\n self::USE_OF_LOAN_204,\n self::USE_OF_LOAN_205,\n self::USE_OF_LOAN_206,\n self::USE_OF_LOAN_207,\n self::USE_OF_LOAN_208,\n self::USE_OF_LOAN_209,\n self::USE_OF_LOAN_210,\n self::USE_OF_LOAN_211,\n self::USE_OF_LOAN_MINUS_1,\n ];\n }", "title": "" }, { "docid": "0f9016e866db374a0304069c7bd27a7e", "score": "0.48335057", "text": "function getAllBannedUsers() {\n $users = [];\n $result = dbResultFromQuery(\"SELECT * FROM users WHERE banned=1;\");\n if ($result->num_rows > 0) {\n $users = mysqli_fetch_all($result, MYSQLI_ASSOC);\n }\n return $users;\n}", "title": "" }, { "docid": "a0eae0f7e4b412ba18f2e71d6259ff21", "score": "0.48278704", "text": "function ban_loginFailed()\n {\n $ip=$_SERVER[\"REMOTE_ADDR\"]; $gb=$GLOBALS['IPBANS'];\n if (!isset($gb['FAILURES'][$ip])) $gb['FAILURES'][$ip]=0;\n $gb['FAILURES'][$ip]++;\n if ($gb['FAILURES'][$ip]>(BAN_AFTER-1))\n {\n $gb['BANS'][$ip]=time()+BAN_DURATION;\n logm('IP address banned from login');\n }\n $GLOBALS['IPBANS'] = $gb;\n file_put_contents(IPBANS_FILENAME, \"<?php\\n\\$GLOBALS['IPBANS']=\".var_export($gb,true).\";\\n?>\");\n }", "title": "" }, { "docid": "9ca015ad849bcbd6cc4650db7127154c", "score": "0.48256508", "text": "public function denied() {\n return call_user_func_array(array($this, 'has'), func_get_args());\n }", "title": "" }, { "docid": "48990723c89839614b91f9b2fd7a4e3e", "score": "0.4821157", "text": "static function get_allowed_targets() {\n\t\tglobal $I2_USER;\n\t\t$ret=array('self');\n\t\tif($I2_USER->is_group_member('admin_calendar'))\n\t\t\t$ret[]='1';\n\t\t//$I2_SQL->query('SELECT * FROM calendar_permissions_groups')->fetch_all_rows();\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "6020e23c7955f3b8345b896690e7a9ca", "score": "0.48191276", "text": "public function getAllowedIds($ability, $objectIdentity);", "title": "" }, { "docid": "dba86b89c89483b02124d0462ea23559", "score": "0.48159507", "text": "public function getAllPrivs()\n {\n $all = $this->dao->select('*')->from(TABLE_SALESPRIV)->fetchAll();\n\n $privs = array();\n foreach($all as $key => $priv) $privs[$priv->account][$priv->salesgroup][$priv->priv] = true;\n\n return $privs;\n }", "title": "" }, { "docid": "70764180a18e8e4de1946c99e472e1b2", "score": "0.48132992", "text": "function get_cached_acl($page_id, $privilege, $use_defaults): array\n\t{\n\t\treturn $this->acl_cache[$page_id . '#' . $privilege . '#' . $use_defaults] ?? [];\n\t}", "title": "" }, { "docid": "b2ee0f2716f9e7d25c9638ca7f4dc6ae", "score": "0.48130524", "text": "function _getShippingMethodsToAllow( $PID ){\r\n\t\r\n\t$PID = (int)$PID;\r\n\t$res = array();\r\n\t$shipping_methods = shGetAllShippingMethods();\r\n\t$dbq = '\r\n\t\tSELECT COUNT(*) AS `cnt`, `SID` FROM `?#SHIPPING_METHODS_PAYMENT_TYPES_TABLE`\r\n\t\tWHERE `PID`=?\r\n\t\tGROUP BY `SID`\r\n\t';\r\n\t$q = db_phquery($dbq, $PID);\r\n\t$allowed_methods = array();\r\n\twhile($row = db_fetch_assoc($q)){\r\n\t\t$allowed_methods[$row['SID']] = $row['cnt'];\r\n\t}\r\n\tfor($i=0; $i<count($shipping_methods); $i++){\r\n\t\t\r\n\t\t$item['SID'] = $shipping_methods[$i]['SID'];\r\n\t\t$item['allow'] = isset($allowed_methods[$item['SID']])?$allowed_methods[$item['SID']]:0;\r\n\t\t$item['name'] = $shipping_methods[$i]['Name'];\r\n\t\t$res[] = $item;\r\n\t}\r\n\treturn $res;\r\n}", "title": "" }, { "docid": "f494644901ade2a1a728d0fae990e97d", "score": "0.48064277", "text": "function disabled_users_list() {\n $db = db_get_connection();\n $stmt = $db->query(\"SELECT users.name,roles.role_name \"\n . \" FROM users \"\n . \" JOIN roles \"\n . \" ON status = 0 \"\n . \" AND users.role_id=roles.id \"\n );\n $output = array();\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $output[] = array('name' => $row['name'] ,\n\t 'role' => $row['role_name']\n\t );\n }\n return $output; \n}", "title": "" }, { "docid": "11be29003d650f277b3acd41a1fc4e29", "score": "0.48010364", "text": "private function restrictedRoles()\n {\n return ['admin', 'developer', 'merchant', 'ambassador'];\n }", "title": "" }, { "docid": "da3f629864b57dc38450a7b8dde3e7dd", "score": "0.47922304", "text": "public function getAllowedSites($limit_ids=null){\n\t \n\t if($this->hasGlobalPermission('site_access')){\n $sql = \"SELECT * FROM Sites\";\n if(is_array($limit_ids) && count($limit_ids)){\n $sql .= \" WHERE Sites.site_id IN ('\".implode(\"','\", $limit_ids).\"')\";\n }\n }else{\n // site_access token is ALWAYS ID 21\n $sql = \"SELECT DISTINCT Sites.* FROM Users, UsersTokensLookup, Sites WHERE Users.user_id = '\".$this->getId().\"' AND (UsersTokensLookup.utlookup_token_id = '21' OR UsersTokensLookup.utlookup_token_id = '0') AND Users.user_id = UsersTokensLookup.utlookup_user_id AND Sites.site_id = UsersTokensLookup.utlookup_site_id\";\n if(is_array($limit_ids) && count($limit_ids)){\n $sql .= \" AND Sites.site_id IN ('\".implode(\"','\", $limit_ids).\"')\";\n }\n } \n \n $sql .= \" ORDER BY Sites.site_internal_label ASC\";\n \n $this->_site_ids = array();\n \n\t $result = $this->database->queryToArray($sql);\n\t $sites = array();\n\t \n\t foreach($result as $site_array){\n\t \n\t $site = new SmartestSite;\n\t $site->hydrate($site_array);\n\t $sites[] = $site;\n\t \n\t if($site->getId() && !$limit_ids){\n\t $this->_site_ids[] = $site->getId();\n }\n\t }\n\t \n\t $this->_num_allowed_sites = count($sites);\n\t \n\t return $sites;\n\t}", "title": "" }, { "docid": "25f46fdf75d1c6c48d14cf2455720ee3", "score": "0.47905377", "text": "public function RestrictedshowAllIds()\n {\n //return all item ids without keys (only the value)\n return DB::table('item')->select('id')->orderBy('id')->pluck('id');\n\n }", "title": "" }, { "docid": "714b65a55be5c03cc3e0eca992403eda", "score": "0.47880447", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('ipn'),\n 'users' => array('*'),\n ),\n array('allow',\n 'actions' => array('plan', 'success'),\n 'roles' => array('locksmith'),\n ),\n array('deny',\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "9c8ff2d5a0fcf26c8fec427f82051b6e", "score": "0.47859845", "text": "public static function invalidIpAddrProvider()\n {\n return array(\n array('x'),\n array(''),\n array(null),\n array(false),\n array(true),\n array(123),\n array('1.2.3'),\n array('www.example.com'),\n array('127.0.0.i'),\n array('192.168.0.1.2'),\n array('1.256.2.3'),\n array('100.200.300.400'),\n array('192.168.0.256')\n );\n }", "title": "" }, { "docid": "b945691aed5d2858316a6b0bc851e299", "score": "0.4782386", "text": "public function privilegios()\n {\n \n $privilegios = $this->permisos()->pluck('valor','codigo')->toArray();\n\n return $privilegios;\n }", "title": "" }, { "docid": "679657fbdf298e458d7377d6ab8c62be", "score": "0.47703436", "text": "public function get_ban_ids()\n {\n return json_decode( $this->_data['ban_ids'] );\n }", "title": "" }, { "docid": "1c29bc2e4fbb7241a5899f1a7fcd1764", "score": "0.47699526", "text": "function getListMap($only_id = false)\r\n{\r\n\t$sql = \"SELECT var as option_text , var_id as option_value\r\n\t\tFROM content\r\n\t\tWHERE var like 'menu_structure_%' and var not like '%jpg%'\r\n\t\tand val not like 'a:1:%' and val not like 'a:0%'\r\n\t\tORDER BY var\";\r\n\r\n\t$result = viewsql($sql);\r\n\twhile ($row = db_sql_fetch_array($result, MYSQL_NUM))\r\n\t{\r\n\t\tif($only_id == true)\r\n\t\t{\r\n\t\t\t$show_list[] = $row[1];\r\n\t\t}\r\n\t\telse\t\t\r\n\t\t{\r\n\t\t\t$show_list[] = array($row[0] => $row[1]);\r\n\t\t}\r\n\t}\r\n\treturn $show_list;\r\n}", "title": "" }, { "docid": "11a2f778f3df4b70496e5cba2566a2ff", "score": "0.47632208", "text": "function ban_loginOk()\n {\n $ip=$_SERVER[\"REMOTE_ADDR\"]; $gb=$GLOBALS['IPBANS'];\n unset($gb['FAILURES'][$ip]); unset($gb['BANS'][$ip]);\n $GLOBALS['IPBANS'] = $gb;\n file_put_contents(IPBANS_FILENAME, \"<?php\\n\\$GLOBALS['IPBANS']=\".var_export($gb,true).\";\\n?>\");\n logm('Login ok.');\n }", "title": "" }, { "docid": "1ef5e226b6bcde826974cdf3e0b2fced", "score": "0.4760404", "text": "public function getBannedFilesAllowableValues()\n {\n return [\n self::BANNED_FILES_DISABLED,\n self::BANNED_FILES_QUARANTINE,\n self::BANNED_FILES_DISCARD,\n self::BANNED_FILES_ACCEPT,\n ];\n }", "title": "" }, { "docid": "852faddf6741b8192d8054ac13d63188", "score": "0.47575894", "text": "public function accessRules()\n {\n $return = array();\n if(Yii::app()->user->checkAccess('readDashboard') || Yii::app()->user->id == 'smobiladmin')\n $return[] = array\n (\n 'allow',\n 'actions' => array('index','view'),\n 'users' => array('*')\n );\n else\n $return[] = array\n (\n 'deny',\n 'actions' => array('index','view'),\n 'users' => array('*')\n );\n return $return;\n }", "title": "" }, { "docid": "097a6214662c307ec8d9c1c2e943506e", "score": "0.47499204", "text": "function globalUrlAllowedMap($data)\n{\n return [\n 'index' => $data['index'], 'type' => $data['type'], 'name' => $data['url_name'], 'icon' => $data['url_icon'], 'link' => $data['url_link'], 'description' => $data['url_desc']\n ];\n}", "title": "" }, { "docid": "618d793375873a8623b43b5563b00516", "score": "0.47460237", "text": "function get_ban()\n{\n\tglobal $banss, $lang, $text, $plugin;\n\n\n\t#now .. loop for banned ips\n\tif (is_array($banss) && !empty($ip))\n\t{\n\t\tforeach ($banss as $ip2)\n\t\t{\n\t\t\t$ip2 = trim($ip2);\n\n\t\t\tif(empty($ip2))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//first .. replace all * with something good .\n\t\t\t$replace_it = str_replace(\"*\", '([0-9]{1,3})', $ip2);\n\t\t\t$replace_it = str_replace(\".\", '\\.', $replace_it);\n\n\t\t\tif ($ip == $ip2 || @preg_match('/' . preg_quote($replace_it, '/') . '/i', $user->data['ip']))\n\t\t\t{\n\t\t\t\t($hook = $plugin->run_hook('banned_get_ban_func')) ? eval($hook) : null; //run hook\n\t\t\t\tkleeja_info($lang['U_R_BANNED'], $lang['U_R_BANNED']);\n\t\t\t}\n\t\t}\n\t}\n\n\t($hook = $plugin->run_hook('get_ban_func')) ? eval($hook) : null; //run hook\n}", "title": "" }, { "docid": "c03c544294ff71d736989533c880b15d", "score": "0.47456405", "text": "function security_logger_adminGate($allow, $page) {\r\n\tlist($user,$name) = security_logger_populate_user();\r\n\tsecurity_logger_loginLogger(false, $user, $name, getUserIP(), 'Blocked access', '', $page);\r\n\treturn $allow;\r\n}", "title": "" }, { "docid": "99f4a92ed6f47cebb13013bab9b854d0", "score": "0.47385627", "text": "public function accessAreaPermissions() {\n $perms = [];\n\n foreach (LivingSpacesProtectedAreaAccessAreaType::loadMultiple() as $type) {\n $perms += $this->buildPermissions($type);\n }\n\n return $perms;\n }", "title": "" }, { "docid": "310c621e80265c6f9d83f48680db3ca5", "score": "0.47253886", "text": "function get_false_permissions()\n{\n\treturn array( array('GENERAL_SETTINGS','bypass_flood_control'),\n\t\t\t\t\t\tarray('_COMCODE','allow_html'),\n\t\t\t\t\t\tarray('GENERAL_SETTINGS','remove_page_split'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','access_closed_site'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','bypass_bandwidth_restriction'),\n\t\t\t\t\t\tarray('_COMCODE','comcode_dangerous'),\n\t\t\t\t\t\tarray('_COMCODE','comcode_nuisance'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','see_php_errors'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','see_stack_dump'),\n\t\t\t\t\t\tarray('GENERAL_SETTINGS','bypass_word_filter'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','view_profiling_modes'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','access_overrun_site'),\n\t\t\t\t\t\tarray('SUBMISSION','feature'),\n\t\t\t\t\t\tarray('SUBMISSION','bypass_validation_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','bypass_validation_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_own_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_own_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_own_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_own_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_own_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','can_submit_to_others_categories'),\n\t\t\t\t\t\tarray('SUBMISSION','search_engine_links'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','view_content_history'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','restore_content_history'),\n\t\t\t\t\t\tarray('STAFF_ACTIONS','delete_content_history'),\n\t\t\t\t\t\tarray('SUBMISSION','submit_cat_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','submit_cat_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','submit_cat_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_cat_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_cat_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_cat_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_cat_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_cat_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_cat_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_own_cat_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_own_cat_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','edit_own_cat_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_own_cat_highrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_own_cat_midrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','delete_own_cat_lowrange_content'),\n\t\t\t\t\t\tarray('SUBMISSION','mass_import'),\n\t\t\t\t\t\tarray('SUBMISSION','perform_keyword_check'),\n\n\t\t\t\t\t);\n}", "title": "" }, { "docid": "960024fe9816999fd6f782188114b68d", "score": "0.47244382", "text": "private function blacklist_init(){\r\n\t\tif(\"true\" == $this->opt['basic_settings']['enable_ip_blacklist']){\r\n\t\t\t$this->blacklist = new Simple_Security_IP_Blacklist;\r\n\t\t\t$this->blacklist->opt_name = $this->setting_name;\r\n\t\t\t\r\n\t\t\t$this->blacklist->init();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b6ea11d4c98885563de14c492c483b6b", "score": "0.47117972", "text": "protected function generateDisallowedCollections()\n {\n if ( ! is_null($this->disallowed_collections) ) {\n foreach ( $this->disallowed_collections as $collection ) {\n $this->iterateDisallowedCollection($collection);\n }\n }\n }", "title": "" }, { "docid": "9a71fddf458209118116ac5f937abfcb", "score": "0.47037005", "text": "private function init_accessByIP( )\r\n {\r\n // No access by default\r\n $this->bool_accessByIP = false;\r\n\r\n // Get list with allowed IPs\r\n $csvIP = $this->arr_extConf['allowedIPs'];\r\n $currentIP = t3lib_div :: getIndpEnv( 'REMOTE_ADDR' );\r\n\r\n // Current IP is an element in the list\r\n $pos = strpos( $csvIP, $currentIP );\r\n if( ! ( $pos === false ) )\r\n {\r\n $this->bool_accessByIP = true;\r\n }\r\n//var_dump( __METHOD__, __LINE__, $csvIP, $currentIP, $this->bool_accessByIP ); \r\n // Current IP is an element in the list\r\n }", "title": "" }, { "docid": "8aace85ba7334ae90f14a58cccda4e11", "score": "0.47006315", "text": "public function getExcludeRules(): array;", "title": "" }, { "docid": "86090564e111271873e139e979585a8d", "score": "0.46958295", "text": "private function getAllowedMapParams()\n {\n return [\n self::MAP_PARAM_SOURCE,\n self::MAP_PARAM_TYPE,\n self::MAP_PARAM_IS_IDENTIFIER,\n self::MAP_PARAM_IS_REQUIRED,\n ];\n }", "title": "" }, { "docid": "8601212f403a4bf9d7a2e0abad8aded4", "score": "0.46948448", "text": "function pclj_allow_read_private( $caps, $cap ) {\n\n\tif ( 'read_private_anys' == $cap ) {\n\t\t$caps[] = 'read_private_documents';\n\t\tunset( $caps[ array_search( 'read_private_anys', $caps ) ] );\n\t}\n\n\treturn $caps;\n}", "title": "" }, { "docid": "c8758b618ebcbbe9f0fb6c11a6783e08", "score": "0.4691576", "text": "protected function getAccessRules()\n {\n return [];\n }", "title": "" }, { "docid": "39fe90c410083ed4dd2a455b2de3ced0", "score": "0.4689582", "text": "function bpsToolsHtaccessIP() {\nif ( current_user_can('manage_options') ) {\n\t\n\t$bps_get_IP2 = $_SERVER['REMOTE_ADDR'];\n\t$denyall_htaccess_file_tools = WP_PLUGIN_DIR . '/bulletproof-security/admin/tools/.htaccess';\n\t$bps_denyall_content_tools = \"order deny,allow\\ndeny from all\\nallow from $bps_get_IP2\";\n\t\n\tif ( is_writable($denyall_htaccess_file_tools) ) {\n\tif ( !$handle = fopen($denyall_htaccess_file_tools, 'w+b') ) {\n exit;\n }\n if ( @fwrite($handle, $bps_denyall_content_tools) === FALSE ) {\n exit;\n }\n $text = '<font color=\"green\"><strong>'.__('Downloading of the B64.zip Archive file is enabled for your IP address only', 'bulletproof-security').' === '. $bps_get_IP2 .'</strong></font>';\n\techo $text;\n fclose($handle);\n\t} else {\n $text = '<div id=\"message\" class=\"updated fade\" style=\"border:1px solid #999999; margin-left:220px;background-color:#ffffe0;\"><p><br><strong>'.__('The Tools folder htaccess file', 'bulletproof-security').' >>> <font color=\"red\"> ' . $denyall_htaccess_file_tools . '</font>'.__(' does not exist.', 'bulletproof-security').'</strong></p></div>';\n\techo $text;\n\t}\n\t}\n}", "title": "" }, { "docid": "3d1d6d81330effb5e17dce8a82dcdce8", "score": "0.46815097", "text": "public function getAbilities(): array {\n return $this->abilities;\n }", "title": "" }, { "docid": "e4aff65498793060e3e9b79c1052d390", "score": "0.46792626", "text": "function getUserGroupPrivTypes() {\n\t$data = array();\n\t$query = \"SELECT id, name, help FROM usergroupprivtype ORDER BY name\";\n\t$qh = doQuery($query, 101);\n\twhile($row = mysqli_fetch_assoc($qh))\n\t\t$data[$row['id']] = $row;\n\treturn $data;\n}", "title": "" }, { "docid": "859af36091f1f863a6ab69a70c7128d3", "score": "0.46768403", "text": "public function checkBanlistContains()\n {\n $this->model->banlistContains($this->input->server('REMOTE_ADDR')) ?\n $this->jsonResponse(['result' => 'true']) :\n $this->jsonResponse(['result' => 'false']);\n }", "title": "" }, { "docid": "0db6be0c901efa99cfb5f726132e0e4f", "score": "0.46694717", "text": "public function get_priviliges($params)\n\t{\n\t\t$db_user_privileges = $this->config->item('db_user_privileges');\n\t\t$priv_details = $condition = array();\n\n\t\t$start = (isset($params->start) && !empty($params->start) ? $params->start : 0);\n\t\t$end = (isset($params->end) && !empty($params->end) ? $params->end : 20);\n\n\t\tif (isset($params->role))\n\t\t\t$condition[] = \"role = '\".@mysql_real_escape_string($params->role).\"'\";\n\n\t\tif (isset($params->module_name))\n\t\t\t$condition[] = \"module_name = '\".@mysql_real_escape_string($params->module_name).\"'\";\n\n\t\t$condition = ' WHERE '.implode(\" AND \", $condition);\n\n\t\t$query = \"SELECT * FROM $db_user_privileges $condition LIMIT $start,$end\";\n\t\t$priv_details = $this->db->query($query);\n\t\t\n\t\tif (count($priv_details))\n\t\t\treturn $priv_details->result();\n\t\telse\n\t\t\treturn $priv_details;\n\t\n\t}", "title": "" }, { "docid": "d0302c443301e4285af1808f67f64e17", "score": "0.46664074", "text": "public function ips()\r\n\t{\r\n\t\t// Require valid user\r\n\t\t$this->management_model->require_valid_user();\r\n\r\n\t\t// Data array to be used in views\r\n\t\t$data = array();\r\n\r\n\t\t// Set validation error delimiters\r\n\t\t$this->form_validation->set_error_delimiters('', '');\r\n\r\n\t\t// Set validation rules\r\n\t\t$this->form_validation->set_rules('ip_addresses', 'Blocked IP\\'s', 'trim|required|xss_clean');\r\n\r\n\t\t// Run validation\r\n\t\tif ($this->form_validation->run() == TRUE)\r\n\t\t{\r\n\t\t\t$data['success'] = TRUE;\r\n\r\n\t\t\t$this->management_model->save_blocked_ips();\r\n\t\t}\r\n\r\n\t\t// Data array to be used in views\r\n\t\t$data['blocked_ips'] = $this->management_model->get_blocked_ips();\r\n\r\n\t\t// Load views\r\n\t\t$this->load->view('templates/management/header', $data);\r\n\t\t$this->load->view('pages/management/manage/ips', $data);\r\n\t\t$this->load->view('templates/management/footer', $data);\r\n\t}", "title": "" }, { "docid": "34d89df5b559c5960d20e4f1d03a7794", "score": "0.46643803", "text": "function mm_content_get_blocks($allowed = FALSE) {\n static $cache;\n\n if (!is_array($cache) && ($result = db_query('SELECT * FROM {mm_block}'))) {\n while ($r = db_fetch_object($result)) {\n $cache[$r->bid] = array(\n 'info' => $r->name,\n 'title' => $r->title,\n 'title_is_cat' => $r->title_is_cat,\n 'show_node_contents' => $r->show_node_contents,\n 'help' => $r->help,\n 'allow_rss' => $r->allow_rss,\n 'admin_only' => $r->admin_only,\n 'cache' => BLOCK_NO_CACHE\n );\n }\n }\n\n if (!$allowed || user_access('administer all menus')) {\n return $cache;\n }\n\n return array_filter($cache, create_function('$elem', 'return !$elem[\"admin_only\"];'));\n}", "title": "" }, { "docid": "d62451a9e788f8ed7f8f798262037dc1", "score": "0.46619448", "text": "public function getAllow()\n {\n return $this->allow;\n }", "title": "" }, { "docid": "b782c02f9503ded70f8bba989b915bf6", "score": "0.46618044", "text": "protected function reduce(array $allow, array $deny)\n {\n return array_values(array_unique(array_diff( $allow, $deny )));\n }", "title": "" }, { "docid": "9c3e52a2a42ff514ff805f35bfd77e64", "score": "0.4660393", "text": "function GetBlockedBuilds()\n {\n $sites = array();\n $site = pdo_query(\"SELECT id,buildname,sitename,ipaddress FROM blockbuild\n WHERE projectid=\".qnum($this->Id));\n add_last_sql_error(\"Project GetBlockedBuilds\",$this->Id);\n while($site_array = pdo_fetch_array($site))\n {\n $sites[] = $site_array;\n }\n return $sites;\n }", "title": "" }, { "docid": "4d5ddbd086936d6f69f1e9d2f9e9a7fa", "score": "0.46576923", "text": "public function logDeniedAccess() {\n // Only log if logging is enabled\n if(!$this->getEnableLog()) {\n return;\n }\n // Log the access attempt\n Mage::log(\n sprintf(\n 'Leytech_RestrictAccess: Access denied to %s from address %s',\n Mage::helper('core/url')->getCurrentUrl(),\n $_SERVER[\"REMOTE_ADDR\"]\n ),\n null,\n $this->getLogFile()\n );\n }", "title": "" }, { "docid": "4c410cb698774489222c87d3080b651c", "score": "0.46496627", "text": "public function getIPs()\n {\n return $this->invokeApiGet('SHOW_RESELLER_IPS');\n }", "title": "" }, { "docid": "ee98fb5c91b0e7d49e70451d84a584d9", "score": "0.46342084", "text": "function getBlacklist(){\n\n\t//call SQL fxn to perform the query, store returned string\n\t$sql = SQLgetBlacklist();\n\n\t//Conncet to database\n\t$con = connectToDB();\n\n\t//On the open connection, create a prepared statement from $sql\n\t$stmt = $con->prepare($sql);\n\n\t//create a variable for the result of the query\n\t//execute the statment - returns a bool of whether successfull\n\t$blist=$stmt->execute();\n\n\t//Result is returned in a table format\n\t$temp=\"<table class='table table-condensed'>\";\n\t$temp.=\"<tr><th>Name</th><th>Comments</th></tr>\";\n\n\tif($blist){\n\t\twhile($bl=$stmt->fetch()){\n\t\t\t//Build the formatted string to be returned\n\t\t\t$fname=$bl['firstName'];\n\t\t\t$lname=$bl['lastName'];\n\t\t\t$comment=$bl['vol_comment'];\n\t\t\t$temp.=\"<tr><td>$fname $lname</td><td>$comment</td></tr>\";\n\t\t}\n\t}\n\t$temp.=\"</table>\";\n\n\n\treturn $temp;\n}", "title": "" }, { "docid": "a53546a723c1087242800cbb28ceb82a", "score": "0.46341336", "text": "public static function site_perms()\n\t{\n\t\t$perms = array();\n\n\t\t$cache = Cache::instance('roles');\n\t\t\n\t\tif( ! $perms = $cache->get('site_perms'))\n\t\t{\n\t\t\t$result = DB::select('rid', 'permission')\n\t\t\t\t\t\t->from('permissions')\n\t\t\t\t\t\t->as_object(TRUE)\n\t\t\t\t\t\t->execute();\n\n\t\t\tforeach ($result as $row)\n\t\t\t{\n\t\t\t\t$perms[$row->rid][$row->permission] = ACL::ALLOW;\n\t\t\t}\n\t\t\t\n\t\t\t//set the cache\n\t\t\t$cache->set('site_perms', $perms, DATE::DAY);\n\t\t}\n\n\t\treturn $perms;\n\t}", "title": "" }, { "docid": "c99245153dead5326a3977f93adfc21c", "score": "0.46331152", "text": "public function getAllowedOverrides()\n {\n $allowed = $this->getConfig('overrides.allowed');\n\n $overrides = $this->getCurrentUserPlanOverrides();\n\n // If we are allowing all overrides, then return all\n if ($allowed == ['*'])\n {\n return Arr::dot($overrides);\n }\n\n // Only return the overrides that are allowed\n return Arr::only(Arr::dot($overrides), $allowed);\n }", "title": "" } ]
aa5e19c37a88e9176181aa76534a8d24
Gets the status The current status of the site list. The possible values are: draft, published, pending, unknownFutureValue.
[ { "docid": "82680440661957abefa4a326f79e2131", "score": "0.75513744", "text": "public function getStatus()\n {\n if (array_key_exists(\"status\", $this->_propDict)) {\n if (is_a($this->_propDict[\"status\"], \"\\Microsoft\\Graph\\Model\\BrowserSiteListStatus\") || is_null($this->_propDict[\"status\"])) {\n return $this->_propDict[\"status\"];\n } else {\n $this->_propDict[\"status\"] = new BrowserSiteListStatus($this->_propDict[\"status\"]);\n return $this->_propDict[\"status\"];\n }\n }\n return null;\n }", "title": "" } ]
[ { "docid": "2d8d5ba828e2b94f91008278f75fd288", "score": "0.7145782", "text": "public function getStatus()\n\t{\n\t\tif( isset( $this->values['locale.site.status'] ) ) {\n\t\t\treturn (int) $this->values['locale.site.status'];\n\t\t}\n\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "dab62d8c84fa13a64e090c3866b07997", "score": "0.6946264", "text": "public static function getStatus() {\n\t\treturn $list_status = array('0'=>'Inactivo', '1'=>'Activo');\n\t}", "title": "" }, { "docid": "35b4cc2089a80c6871abfcff39112e37", "score": "0.68914455", "text": "public function get_status() {\n return $this->get_field( 'post_status' );\n }", "title": "" }, { "docid": "4dc520a20b08cba7e5efdc918a22dd04", "score": "0.68893665", "text": "public function getStatus()\r\n {\r\n return $this->fields['Status']['value'];\r\n }", "title": "" }, { "docid": "67f92c881fdab3a2cde039e718755c64", "score": "0.6881149", "text": "private function get_site_status_field() {\n\t\t$is_connected = $this->authentication->credentials()->has();\n\t\t$using_proxy = $this->authentication->credentials()->using_proxy();\n\t\t$status_map = array(\n\t\t\t'connected-site' => __( 'Connected through site credentials', 'google-site-kit' ),\n\t\t\t'connected-oauth' => __( 'Connected through OAuth client credentials', 'google-site-kit' ),\n\t\t\t'not-connected' => __( 'Not connected', 'google-site-kit' ),\n\t\t);\n\n\t\tif ( $is_connected && $using_proxy ) {\n\t\t\t$status = 'connected-site';\n\t\t} elseif ( $is_connected && ! $using_proxy ) {\n\t\t\t$status = 'connected-oauth';\n\t\t} else {\n\t\t\t$status = 'not-connected';\n\t\t}\n\n\t\treturn array(\n\t\t\t'label' => __( 'Site Status', 'google-site-kit' ),\n\t\t\t'value' => $status_map[ $status ],\n\t\t\t'debug' => $status,\n\t\t);\n\t}", "title": "" }, { "docid": "a4ccf3e4cf4a7e797d9895409a1e907b", "score": "0.6868556", "text": "public function getStatus()\n {\n return $this->get('Status');\n }", "title": "" }, { "docid": "914594f513384c9462635e246c8a609d", "score": "0.6851101", "text": "public function getStatus() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"status\");\n\t}", "title": "" }, { "docid": "914594f513384c9462635e246c8a609d", "score": "0.6851101", "text": "public function getStatus() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"status\");\n\t}", "title": "" }, { "docid": "a1346644119324723ff004640e238406", "score": "0.68408436", "text": "public function status(){\n return $this->getValue(\"status\");\n }", "title": "" }, { "docid": "e3e2cf30dfa231d1d5c6028e09e1e068", "score": "0.682219", "text": "public function getStatus()\n {\n return $this->getData('status');\n }", "title": "" }, { "docid": "c332cf25a60b8abf31634e9911dfbf5e", "score": "0.6815648", "text": "public function getStatus()\n {\n return isset($this->data['status']) ? $this->data['status'] : null;\n }", "title": "" }, { "docid": "741936e8291f22b5f993a8c6fc194631", "score": "0.6791343", "text": "public function getCurrentStatus()\n {\n return $this->currentStatus;\n }", "title": "" }, { "docid": "bbda00a0a26c8b86654df5aa2709279b", "score": "0.6781823", "text": "public function getStatus() \n {\n return $this->_fields['Status']['FieldValue'];\n }", "title": "" }, { "docid": "fa68dc75a617659e95359937fd5a7e11", "score": "0.67689306", "text": "public function getStatus()\n {\n return $this->get(self::STATUS);\n }", "title": "" }, { "docid": "f49dfc7b351e7d76a2761eab84e2c981", "score": "0.67651933", "text": "public function get_status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "d50c3a9c8bfcdfb8d1c562311302cfeb", "score": "0.67487764", "text": "public function getStatus() {\n return $this->get(self::STATUS);\n }", "title": "" }, { "docid": "6f8bb0ed222a033d949034e11cb7b550", "score": "0.6736877", "text": "public function GetStatus()\n\t\t{\n\t\t\treturn $this->status ;\n\t\t}", "title": "" }, { "docid": "78d8ab0c424a9f745e5456da82d2482f", "score": "0.67287546", "text": "public function status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "78d8ab0c424a9f745e5456da82d2482f", "score": "0.67287546", "text": "public function status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "3bbe7dfe51a2e01f8fe83c21b063b857", "score": "0.67211246", "text": "public function getStatus()\n\t\t{\n\t\t\tif(isset($this->_status)){\n\t\t\t\treturn $this->_status;\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "23ecf2c84a0859b208a3656f4a19dda6", "score": "0.6716422", "text": "public function getStatus()\n {\n return $this->getEntityValue('status', '');\n }", "title": "" }, { "docid": "829164f10e1f8a2f99dacdf08ba463ae", "score": "0.6715149", "text": "function getStatus() {\n\t\treturn Status::all ()->lists ( 'name', 'id' );\n\t}", "title": "" }, { "docid": "6e1656d5238419b041896f49c894129d", "score": "0.6714395", "text": "public function getStatus() {\n\t\treturn $this->_currentStatus;\n\t}", "title": "" }, { "docid": "5a3be35eed59d4f5229733f950d6e3d6", "score": "0.6695391", "text": "public function getStatus()\n {\n\n return $this->status;\n }", "title": "" }, { "docid": "5a3be35eed59d4f5229733f950d6e3d6", "score": "0.6695391", "text": "public function getStatus()\n {\n\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "6ab5ae583d7504328f02d8cc68963fca", "score": "0.669307", "text": "public function getStatus()\n {\n return $this->status;\n }", "title": "" }, { "docid": "ee6a99a2b87562a669e6f77750c1ddbc", "score": "0.6692903", "text": "public function getStatus()\r\n {\r\n return $this->status;\r\n }", "title": "" }, { "docid": "03b8ef26825e2b02b7b3994af34c25be", "score": "0.66887456", "text": "function get_status()\n\t{\n\t\treturn $this->get_default_property(self :: PROPERTY_STATUS);\n\t}", "title": "" }, { "docid": "12060e6bcb73c1037ca607744731364a", "score": "0.66724485", "text": "public function getStatus() {\n return $this->status;\n }", "title": "" }, { "docid": "12060e6bcb73c1037ca607744731364a", "score": "0.66724485", "text": "public function getStatus() {\n return $this->status;\n }", "title": "" } ]
57221293341cea7935cda7f5d4f48249
Updates the curl headers to include Authorization and xtenanttoken headers
[ { "docid": "230c83d00b89c1babb5bd827af41a63c", "score": "0.6625422", "text": "private function setApiClientHeaders(array $additionalHeaders = [])\n {\n curl_setopt($this->curl, CURLOPT_HTTPHEADER, array_merge([\n 'Authorization: Bearer ' . $this->accessToken,\n 'x-tenant-token: ' . $this->tenantToken\n ], $additionalHeaders));\n }", "title": "" } ]
[ { "docid": "0d21f303e2447b170df4459e77c98201", "score": "0.66814077", "text": "private function defineHeader($curl) {\n $header = array(\n 'Content-Type: application/json',\n \"Authorization: Bearer \" . $this->token\n );\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n }", "title": "" }, { "docid": "badf845fc43781ad983ed8adfaee0812", "score": "0.65860176", "text": "protected function set_request_headers() {\n\t\t$headers = array();\n\t\tforeach ($this->headers as $key => $value) {\n\t\t\t$headers[] = $key.': '.$value;\n\t\t}\n\t\tcurl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);\n\t}", "title": "" }, { "docid": "6ee1f58ee3d10cbe5df7a59c5c67dd83", "score": "0.65339494", "text": "private function setHeaders($curl): void {\n $headers = array();\n $headers[] = 'Accept: application/json';\n $headers[] = 'x-api-key: ' . $this->config->apiKey;\n $headers[] = 'Content-Type: application/json';\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n }", "title": "" }, { "docid": "ae0da38ec5e24783003d988ca5c398a6", "score": "0.6506568", "text": "private function setRequestHeaders(): void\r\n {\r\n curl_setopt($this->handle, CURLOPT_HTTPHEADER, array_map(function ($key, $value) {\r\n return \"$key: $value\";\r\n }, array_keys($this->headers), array_values($this->headers)));\r\n }", "title": "" }, { "docid": "44b0207dd06af4e07b062b57767351a2", "score": "0.6356149", "text": "public function iSetAccessTokenInHeader()\n {\n $value = \"Bearer \" . $this->token;\n var_dump($value);\n echo $value;\n $this->addHeader(\"Authorization:\", $value );\n }", "title": "" }, { "docid": "8fbd772bc2b13157b660228de12f77af", "score": "0.61961067", "text": "private function defineHeaderMethodGet($curl) {\n $header = array(\n 'Accept: application/json',\n 'Content-Type: application/x-www-form-urlencoded',\n \"Authorization: Bearer \" . $this->token\n );\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n }", "title": "" }, { "docid": "e1ebb2830bdf9043658b6b404b12345c", "score": "0.585573", "text": "private function setCommonCurlOptions()\n\t{\n\t\t$USERPWD = $this->user.':'.$this->password;\n\n\t\t$this->curl->options['CURLOPT_RETURNTRANSFER'] = 1;\n\t\t//This didn't work for POST/PUT - forced the correct value in curl->request()\n\t\t$this->curl->options['CURLOPT_HTTPHEADER'] = array('Content-type: application/xml; charset=utf-8');\n\t\t$this->curl->options['CURLOPT_HTTPAUTH'] = 'CURLAUTH_BASIC';\n\t\t$this->curl->options['CURLOPT_USERPWD'] = $USERPWD;\n\t}", "title": "" }, { "docid": "a1af8755d839c49eaae489d7a077f4b1", "score": "0.57447016", "text": "private function setHstsHeader()\n\t{\n\t\t$maxAge = (int) $this->params->get('hsts_maxage', 31536000);\n\t\t$hstsOptions = array();\n\t\t$hstsOptions[] = $maxAge < 300 ? 'max-age=300' : 'max-age=' . $maxAge;\n\n\t\tif ($this->params->get('hsts_subdomains', 0))\n\t\t{\n\t\t\t$hstsOptions[] = 'includeSubDomains';\n\t\t}\n\n\t\tif ($this->params->get('hsts_preload', 0))\n\t\t{\n\t\t\t$hstsOptions[] = 'preload';\n\t\t}\n\n\t\t$this->app->setHeader('Strict-Transport-Security', implode('; ', $hstsOptions));\n\t}", "title": "" }, { "docid": "9d664b559a25fc519b2e9bc85ad60db5", "score": "0.5696027", "text": "protected function setup_request()\n {\n $curl_headers = array();\n foreach ($this->headers as $key => $val) {\n $curl_headers[] = $key . ': ' . $val;\n }\n $this->opts[CURLOPT_HTTPHEADER] = $curl_headers;\n foreach ($this->opts as $key => $val) {\n curl_setopt($this->curl, $key, $val);\n }\n }", "title": "" }, { "docid": "1c35f3e62f6d60d321100524c131f9b4", "score": "0.56593627", "text": "protected function include_response_header() {\n $this->set_option(CURLOPT_HEADER, true);\n }", "title": "" }, { "docid": "9c570f5f8a3c6e3f93508d11dca11253", "score": "0.56514746", "text": "private function buildHeaders()\n {\n $headerLines = [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'User-agent' => 'LPA-ADMIN'\n ];\n\n $apiToken = $this->getTokenData('token');\n\n // If the logged in user has an auth token already then set that in the header\n if (!is_null($apiToken)) {\n $headerLines['token'] = $apiToken;\n }\n\n return $headerLines;\n }", "title": "" }, { "docid": "632e6ca031e8c9df339462d6ed356024", "score": "0.56481093", "text": "private function updateCommonHttpHeaders(): void\n {\n $this->headerLines = self::EOL;\n\n $endpoint = $this->options[ClientOptions::OPTION_ENDPOINT];\n if (1 !== preg_match('/^unix:\\/\\/.+/', $endpoint)) {\n $this->headerLines .= 'Host: '\n . preg_replace('/^(tcp|ssl):\\/\\/(.+?):(\\d+)\\/?$/', '\\\\2', $endpoint)\n . self::EOL;\n }\n // add basic auth header\n if (isset(\n $this->options[ClientOptions::OPTION_AUTH_TYPE],\n $this->options[ClientOptions::OPTION_AUTH_USER]\n )) {\n $this->headerLines .= sprintf(\n 'Authorization: %s %s%s',\n $this->options[ClientOptions::OPTION_AUTH_TYPE],\n base64_encode(\n $this->options[ClientOptions::OPTION_AUTH_USER] . ':' .\n $this->options[ClientOptions::OPTION_AUTH_PASSWD]\n ),\n self::EOL\n );\n }\n\n if (isset($this->options[ClientOptions::OPTION_CONNECTION])) {\n $this->headerLines .= 'Connection: ' . $this->options[ClientOptions::OPTION_CONNECTION] . self::EOL;\n }\n\n $this->database = $this->options[ClientOptions::OPTION_DATABASE];\n $this->baseUrl = '/_db/' . urlencode($this->database);\n }", "title": "" }, { "docid": "ea1094e3c0b09ce8d6afa7d3ae1e3797", "score": "0.5617125", "text": "public function setHeaders()\r\n {\r\n $array = [\r\n 'User-Agent' => 'php-api-dutchie027/' . self::LIBRARY_VERSION,\r\n 'Content-Type' => 'application/json',\r\n 'Authorization' => 'Basic ' . $this->getAPIToken()\r\n ];\r\n return $array;\r\n }", "title": "" }, { "docid": "7501aadf690e4b24a874d2619a2b0d4e", "score": "0.55704266", "text": "public function fillRequestHeaders()\n {\n $this->request->setHeaders(array (\n Protocol::HEADER_HOST => $this->mockRequestContext->getServerVar(ServerVars::HTTP_HOST),\n Protocol::HEADER_CONNECTION => 'keep-alive',\n Protocol::HEADER_USER_AGENT => $this->mockRequestContext->getServerVar(ServerVars::HTTP_USER_AGENT),\n Protocol::HEADER_ACCEPT => '*/*',\n Protocol::HEADER_REFERER => 'from.testland.com',\n Protocol::HEADER_ACCEPT_ENCODING => 'gzip, deflate, sdch, br',\n Protocol::HEADER_ACCEPT_LANGUAGE => 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4,it;q=0.2',\n ));\n }", "title": "" }, { "docid": "ea3fe4c012fc453246a07aaad858852d", "score": "0.5547281", "text": "public static function clickbank_api_headers()\n\t\t{\n\t\t\t$req['headers']['Accept'] = 'application/json';\n\t\t\t$req['headers']['Authorization'] = $GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_clickbank_developer_key'].':'.$GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_clickbank_clerk_key'];\n\n\t\t\treturn $req; // Return array with headers.\n\t\t}", "title": "" }, { "docid": "2cbb8762eb7ea14555693f2e7b453aa7", "score": "0.55282515", "text": "private function createHeaders()\n {\n return [\n// 'Access-Token' => // Add Access-Token,\n// 'Client-Secret' => // Add Client-Secret,\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json',\n ];\n }", "title": "" }, { "docid": "75bb6ea9fea56e3b96bfabefd19a128c", "score": "0.55186296", "text": "protected function _setHeaders()\n {\n $this->_httpClient->setHeaders(\n array(\n self::HEADER_HOSTNAME => $this->_getBaseUrl(),\n self::HEADER_SITE_ID => $this->_helper->resetStore()->getSiteId(),\n Zend_Http_Client::CONTENT_TYPE => $this->_getContentType(),\n )\n );\n return $this;\n }", "title": "" }, { "docid": "1be0c9882d63cd6f4c46129c1ada6878", "score": "0.55112755", "text": "protected function buildRequestHeader()\n {\n return array(\n 'Authorization: OAuth ' . $this->getOauthString(),\n 'Expect:'\n );\n }", "title": "" }, { "docid": "fc59887f4931647e4e25ea9448c23450", "score": "0.5506511", "text": "function authorize2($ch, $secret) \n\t{\n\t\t#CREATE HEADERS\n\t\t$NonceHeaderName = \"Nonce\";\n\t\t$TimestampHeaderName = \"Timestamp\";\n\t\t\n\t\t#copy the curl handle to a temporary handle\n\t\t$temp_curl = curl_copy_handle($ch);\n\t\n\t\t#set the necessary options to get the headers for the temporary curl handle\n\n\t\tcurl_setopt($temp_curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($temp_curl, CURLINFO_HEADER_OUT, True);\n\t\n\t\t#execute the temporary curl request (so we can check if timestamp and nonce headers exist yet)\n\t\t$resp = curl_exec($temp_curl);\n\t\n\t\t#set the curl request headers to a string so that info can be pulled when building the query string\n\t\t$headers = curl_getinfo($temp_curl,CURLINFO_HEADER_OUT);\n\t\t\t\n\t\t#close the curl request\n\t\tcurl_close($temp_curl);\n\t\n\t\t#check for timestamp, if not found, add one\n\t\tif (stripos($headers, 'Timestamp:') == false) {\n\t\t\t#ADD THE TIMESTAMP\n\t\t\t#set the timezone to UTC\n\t\t\tdate_default_timezone_set(\"UTC\");\n\t \n\t\t\t#format the date so that it can be sent correctly (y-m-d'T'h:i:s.d'Z')\n\t\t\t$formatedDate = udate('Y-m-d\\TH:i:s.u\\Z');\n\t\t\n\t\t\t#set timestamp variable to be used when generating query string\n\t\t\t$TimeStampHeaderName = \"timestamp=\".$formatedDate;\n\t\t\t\n\t\t\t#set global variable to generate timestamp with correct format\n\t\t\t$GLOBALS['time']= \"Timestamp: \".$formatedDate;\n\t\t}\n\t\n\t\t#check for nonce, if not found, add one\n\t\tif (stripos($headers, 'Nonce:') == false) {\n\t\t\t#ADD THE NONCE\n\t\t\t#generate a random nonce number\n\t\t\t$nonceGUID = sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n\t\t\n\t\t\t#set nonce variable to be used when generating query string\n\t\t\t$NonceHeaderName = \"nonce=\".$nonceGUID;\n\t\t\t\n\t\t\t#set global variable to generate nonce with correct format\n\t\t\t$GLOBALS['nonce']= \"Nonce: \".strtolower($nonceGUID);\n\t\t}\n\t\n\t\t#GET THE PARTS TO BUILD THE QUERY STRING\n\t\t#add the Request method\n\t\t$requestMethod = substr($headers,0, stripos($headers,\" \"));\n\t\n\t\t#remove the request method type from $headers string\n\t\t$headers = substr($headers,strlen($requestMethod)+1);\n\t\n\t\n\t\t#add the URL endpoint\n\t\t$requestEndpoint = strtolower(substr($headers, 0, stripos($headers,\"?\")));\n\t\t#remove the endpoint that was grabbed in previous line from $headers string\n\t\t$headers = substr($headers,strlen($requestEndpoint));\n\t\n\t\t#add the Query String\n\t\t$requestQuery = substr($headers, 0, stripos($headers, \" \"));\n\t\t#remove the api from the $headers string\n\t\t$headers = substr($headers, strlen($requestQuery));\n\t\n\t\t#add the timestamp and nonce\n\t\t$requestTN = strtolower($NonceHeaderName.\"&\".$TimeStampHeaderName);\n\t\n\t\n\t\t#BUILD THE QUERY STRING\n\t\t$requestString = $requestMethod.\"\\r\\n\";\n\t\t$requestString .= $requestEndpoint.\"\\r\\n\";\n\t\t$requestString .= $requestQuery.\"\\r\\n\";\n\t\t$requestString .= $requestTN.\"\\r\\n\";\n\t\t#append content \"doesn't work for non-GET requests yet\"\n\t\t#test if there's content. If there is, add it to requestString, if not, add carriage return\n\t\tif ($requestMethod != \"GET\") {\n\t\t\t$requestString .= $GLOBALS['body'].\"\\r\\n\";\n\t\t}\n\t\telse {\n\t\t\t$requestString .= \"\\r\\n\";\n\t\t}\n\t\t#append secret key\n\t\t$requestString .= $secret;\n\t\n\t\t#HASH THE STRING USING SHA256 ENCRYPTION\n\t\t$hash = hash(\"sha256\", $requestString, true);\n\t \n\t\t#hash base-64 conversion\n\t\t$hash2 = base64_encode($hash);\n\t \n\t\t#return the hash\n\t\treturn $hash2;\n\t}", "title": "" }, { "docid": "9167d4f69a5bf440906c8c080b723551", "score": "0.5469884", "text": "public function build_authenticationheader() {\n return \"Authorization: Bearer $this->accesstoken\";\n }", "title": "" }, { "docid": "e05962228eb352b0c9d9c70608f49b1c", "score": "0.5440673", "text": "public function headers() {\n\t\t$GLOBALS['HEADERS']['format'] = $this->format;\n\t\tif ($this->cache) $GLOBALS['HEADERS']['expire'] = $this->cache_expire;\n\t\tif ($this->cors) $GLOBALS['HEADERS']['cors'] = $this->cors_origin;\n\t}", "title": "" }, { "docid": "48fc0e18e2e8a7a2b3eb6250c79af7ef", "score": "0.5438612", "text": "function BuildHeaders($PrintHeaders = false)\n\t{\n\t\t$timestamp = intval(round(microtime(true) * 1000));\n\t\t$token = sha1($this->ClientSecret.$timestamp);\n\n\t\t$headers = array(\n\t\t\t\"AUTHORIZATION: FPA \".$this->AccessKey.\":\".$token.\":\".$timestamp,\n\t\t\t\"CONTENT-TYPE: application/json\", \n\t\t\t\"ACCEPT: application/json\"\n\t\t);\n\t\t\n\t\tif($PrintHeaders)\n\t\t{\n\t\t\techo '<pre />';\n\t\t\tprint_r($headers);\n\t\t}\n\t\t\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "b634b8a57218678fbe85ade8b6e72033", "score": "0.5428769", "text": "public function setHeader($header)\n {\n $return = curl_setopt($this->ch, CURLOPT_HTTPHEADER, $header);\n return $return;\n }", "title": "" }, { "docid": "3ab7c037ddc441a60f053e5c6a855f4a", "score": "0.542307", "text": "function setHeader($key, $value) {\n $this->_headers[$key] = $key . ': ' . $value;\n $this->setopt(CURLOPT_HTTPHEADER, array_values($this->_headers));\n }", "title": "" }, { "docid": "80baaafa74e6230e58dd11367c0e1fa3", "score": "0.54151577", "text": "public function reInitCurl() {\n $this->curl = new Curl();\n $this->curl->setHeader('Content-Type', 'application/json');\n $this->curl->setUserAgent('Backdrop CMS ZenCI API module');\n $this->curl->setHeader('Accept', '*/*');\n }", "title": "" }, { "docid": "3f2fa846469e7574a111ce158a2e53a8", "score": "0.5401459", "text": "public function setHeaders(array $headers)\n {\n curl_setopt($this->_ch, CURLOPT_HTTPHEADER, $headers);\n\n }", "title": "" }, { "docid": "f38a4fb8b9c15935854894a4c52228f8", "score": "0.53654045", "text": "private static function setUnauthHeaders(){\n\n header(\"HTTP/1.0 401 Unauthorized\");\n\n }", "title": "" }, { "docid": "620ef617c9512667c9096346fe54b8e4", "score": "0.534417", "text": "private function getHeaders($access_token = NULL) {\n $headers = [\n 'Accept' => 'application/json'\n ];\n if ($access_token) {\n $headers['Authorization'] = \"Bearer ${access_token}\";\n }\n return $headers;\n }", "title": "" }, { "docid": "27843740863948887bd1f2397ef7afaf", "score": "0.53433037", "text": "protected function buildHeadersWithAuthorization(array $headers = []) : array\n {\n $headers['Authorization'] = sprintf('Bearer %s', $this->parent->getKey());\n\n return $headers;\n }", "title": "" }, { "docid": "6e8dc3539aad92582f37c521f46d6459", "score": "0.5341478", "text": "protected function getHeaders() {\n return [\n \t'Accept-Language: en_US', \n\t\t\t'Content-Type: application/json',\n\t\t\t'Authorization: Bearer ' . $this->accessToken\n\t\t];\n }", "title": "" }, { "docid": "d1cc0b99f0f98b06c6201e7cb3050fae", "score": "0.5322791", "text": "function authorization_header( $full_url, $userAccessToken, $userAccessTokenSecret, $nonce = NULL, $timestamp = NULL){\n $consumerKey = $this->api_config['consumerKey'];;\n $consumerSecret = $this->api_config['consumerSecret'];\n \n $url_info = parse_url( $full_url );\n\n $get_params = array();\n if( isset( $url_info['query'] ) ){\n parse_str( $url_info['query'], $get_params );\n }\n\n $url = sprintf( '%s://%s%s', $url_info['scheme'], $url_info['host'], $url_info['path'] );\n\n if( $nonce == NULL ){\n $nonce = bin2hex(random_bytes( 16 ));\n }\n if( $timestamp == NULL ){\n $timestamp = (string)round(microtime(true) );\n }\n\n $method = 'GET';\n\n $signatureMethod = 'HMAC-SHA1';\n $version = '1.0';\n\n $oauth_params = array(\n 'oauth_consumer_key' => $consumerKey,\n 'oauth_token' => $userAccessToken,\n 'oauth_nonce' => $nonce,\n 'oauth_signature_method' => 'HMAC-SHA1',\n 'oauth_timestamp' => $timestamp,\n 'oauth_version' => $version\n );\n $all_params = array_merge( $oauth_params, $get_params );\n $params_order = array_keys( $all_params );\n sort($params_order);\n\n $base_params = array();\n\n foreach($params_order as $param) {\n array_push( $base_params, sprintf( '%s=%s', $param, $all_params[$param]) );\n }\n\n $base = sprintf( '%s&%s&%s', $method, rawurlencode($url), rawurlencode(implode('&',$base_params) ) );\n\n $key = rawurlencode($consumerSecret) . '&' . rawurlencode($userAccessTokenSecret);\n $oauth_params['oauth_signature'] = base64_encode(hash_hmac('sha1', $base, $key, true));\n\n $header_params = array_keys($oauth_params);\n sort($header_params);\n $headers = array();\n foreach( $header_params as $param) {\n array_push( $headers, sprintf( '%s=\"%s\"', $param, rawurlencode($oauth_params[$param] ) ) );\n }\n\n $header = sprintf( 'Authorization: OAuth %s', implode(', ', $headers) );\n\n return $header;\n }", "title": "" }, { "docid": "1f05e38c530679c1df7101759693985f", "score": "0.5315722", "text": "public function setHeaders($headers, $overwrite = false)\n {\n if(!$overwrite)\n {\n $this->headers = array_merge($this->headers, $headers);\n }\n else\n {\n $this->headers = $headers;\n }\n\n curl_setopt($this->handle, CURLOPT_HTTPHEADER, $this->getHeaders());\n }", "title": "" }, { "docid": "4cb80641bee682e68c3affe8c3586274", "score": "0.5311015", "text": "public function onRequestCreate(Event $event)\n {\n $client = $event['client'];\n $token = $client->getToken();\n \n $event['request']->setHeader('X-Auth-Token', $token);\n }", "title": "" }, { "docid": "dae2e5218a62d7c14bf746a8244f0e2d", "score": "0.52884823", "text": "private function setResponseHeaders(){\n\t\theader($this->responseHeader);\n\t}", "title": "" }, { "docid": "d00a708489f5b01b012a74da9666b478", "score": "0.5276048", "text": "public function do_curl($httpheader=false, $settings=false, $json=true, $printheaders=false, $host=\"developer.api.autodesk.com\") {\n\t\tif (!$httpheader) $httpheader = array();\n\t\tif (!$settings) $settings = array();\n\t\t$curl = curl_init();\n\n\t\t/* user supplied - use this in other calls:\n\n\t\t$postfield = \"client_id=$client_id&client_secret=$client_secret&grant_type=client_credentials&scope=code%3Aall\";\n\t\t$settings = array(\n\t\t\tCURLOPT_URL => \"https://developer.api.autodesk.com/authentication/v1/authenticate\",\n\t\t\tCURLOPT_CUSTOMREQUEST => \"POST\",\n\t\t\tCURLOPT_POSTFIELDS => $postfield,\n\t\t);\n\t\t$httpheader = array(\n\t\t\t\"Content-Type: application/x-www-form-urlencoded\", // Content-Type: application/json\n\t\t\t\"Host: developer.api.autodesk.com\",\n\t\t\t\"User-Agent: com.seanwittmeyer.builder/7.13.0\",\n\t\t\t\"Content-Length: \" . strlen($postfield)\n\t\t);\n\t\t\n\t\t$response = $this->do_curl($httpheader, $settings);\n\n\t\t/**/\n\t\t\n\t\t$httpheader = array_merge(array(\n\t\t\t\"Accept: */*\",\n\t\t\t\"Cache-Control: no-cache\",\n\t\t\t\"Connection: keep-alive\",\n\t\t\t\"accept-encoding: gzip, deflate\",\n\t\t\t\"cache-control: no-cache\",\n\t\t\t\"Host: $host\",\n\t\t\t\"User-Agent: com.seanwittmeyer.builder/19.5.0\",\n\t\t), $httpheader);\n\n\t\t$curlopt = $settings + array(\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_ENCODING => \"\",\n\t\t\tCURLOPT_MAXREDIRS => 10,\n\t\t\tCURLOPT_TIMEOUT => 30,\n\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\tCURLOPT_HTTPHEADER => $httpheader,\n\t\t);\n\t\t\n\t\tforeach ($curlopt as $k => $v) curl_setopt($curl, $k, $v);\n\t\t\n\t\t$response = curl_exec($curl);\n\t\t$err = curl_error($curl);\n\t\t\n\t\tif ($printheaders) {\n\t\t\techo \"\\n ====================================== print headers \\n\";\n\t\t\tvar_dump(curl_getinfo($curl));\n\t\t\techo \"\\n ====================================== end headers \\n\";\n\t\t}\n\t\t\t\n\t\tcurl_close($curl);\n\t\t\n\t\tif ($err) {\n\t\t echo \"cURL Error #:\" . $err;\n\t\t} else {\n\t\t return ($json) ? json_decode($response,true): $response;\n\t\t}\n }", "title": "" }, { "docid": "db96357143c0015f1b827ab918f2db7a", "score": "0.52587116", "text": "private function initializeResponseHeaders()\n {\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTLENGTH] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_ETAG] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_CACHECONTROL] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_LASTMODIFIED] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_LOCATION] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_CODE] = null;\n $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_DESC] = null;\n $this->dataServiceVersion = null;\n }", "title": "" }, { "docid": "89a2039861c7d63eced790d0edd9cf63", "score": "0.52503985", "text": "public function setToken(string $token): void\r\n {\r\n $this->setHeaders(['Authorization' => 'Bearer ' . $token]);\r\n }", "title": "" }, { "docid": "5290a34fd2ae4e145c406fbb2905c764", "score": "0.52387506", "text": "private function addAuthenticationHeaders(Request $request) {\n $client = $request->getClient();\n\n // Get a GMT/UTC timestamp\n $timestamp = gmdate('Y-m-d\\TH:i:s\\Z');\n\n // Build the data to base the hash on\n $data = $request->getMethod() . '|' .\n $request->getUrl() . '|' .\n $client->getConfig('publicKey') . '|' .\n $timestamp;\n\n // Generate signature\n $signature = hash_hmac('sha256', $data, $client->getConfig('privateKey'));\n\n // Add relevant request headers (overwriting once that might already exist)\n $request->setHeader('X-Imbo-Authenticate-Signature', $signature);\n $request->setHeader('X-Imbo-Authenticate-Timestamp', $timestamp);\n }", "title": "" }, { "docid": "f8a556c2842c0d071c8e78fdce91131e", "score": "0.523616", "text": "protected function buildHeaders($token = NULL) {\n $headers = [];\n $headers[] = 'Accept: application/json';\n $headers[] = 'Accept: application/vnd.github.v3+json';\n // $headers[] = 'Accept: application/vnd.github.swamp-thing-preview+json';\n // By default name.\n $default_app_name = 'GitHub Dashboard';\n $app_name = $default_app_name;\n $connector_config = $this->getConnectorConfig();\n if (!empty($connector_config) && isset($connector_config['app_name'])) {\n $app_name = $connector_config['app_name'];\n if (empty(trim($app_name))) {\n $app_name = $default_app_name;\n }\n }\n $headers[] = 'User-Agent: ' . $app_name;\n // If we have the security token.\n if (!is_null($token)) {\n $headers[] = 'Authorization: token ' . $token;\n }\n return $headers;\n }", "title": "" }, { "docid": "96bc46d78805e4292cb44a4f79ab63b7", "score": "0.5232446", "text": "protected function get_header()\n\t{\n\t\tif ($this->service == 'CustomerManagement')\n\t\t{\n\t\t\t$headers = '\n\t\t\t\t<ApiUserAuthHeader xmlns=\"http://adcenter.microsoft.com/syncapis\">\n\t\t\t\t\t<UserName>'.$this->api_user.'</UserName>\n\t\t\t\t\t<Password>'.$this->api_pass.'</Password>\n\t\t\t\t\t<UserAccessKey>'.$this->get_key('access_key').'</UserAccessKey>\n\t\t\t\t</ApiUserAuthHeader>\n\t\t\t';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$headers = '\n\t\t\t\t<ApplicationToken></ApplicationToken>\n\t\t\t\t<DeveloperToken>'.$this->get_key('access_key').'</DeveloperToken>\n\t\t\t\t<UserName>'.$this->api_user.'</UserName>\n\t\t\t\t<Password>'.$this->api_pass.'</Password>\n\t\t\t\t<CustomerAccountId>'.$this->ac_id.'</CustomerAccountId>\n\t\t\t';\n\t\t}\n\t\treturn ($headers);\n\t}", "title": "" }, { "docid": "d09e264916a4bb0af4fda1900c56f603", "score": "0.5229349", "text": "function makeHeader()\n {\n /* $cnonce should be an int between 0 and 99999. */\n $cnonce = rand(0, 99999);\n\n /* $timestamp should include milliseconds. */\n $timestamp = round(microtime(true) * 1000);\n\n $auth = array();\n $auth['Mauth realm'] = 'http://webrtc.intel.com';\n $auth['mauth_signature_method'] = 'HMAC_SHA256';\n $auth['mauth_serviceid'] = $this->config->owt->serviceId;\n $auth['mauth_cnonce'] = $cnonce;\n $auth['mauth_timestamp'] = $timestamp;\n\n /* Generate the signature and convert to base64. */\n $rawSignature = hash_hmac('sha256', $timestamp . ',' . $cnonce, $this->config->owt->serviceKey);\n $auth['mauth_signature'] = base64_encode($rawSignature);\n\n /* Implode the keys and values of the $auth array into a string connected by comma and linebreak along with contentType json. */\n return array('Authorization: ' . urldecode(http_build_query($auth, null, \",\")), 'Content-Type: application/json');\n }", "title": "" }, { "docid": "0cf5ab0d8c3d273e8bf2561c8826abb5", "score": "0.5225629", "text": "function requestOptions()\n {\n return [\n 'headers' => ['Authorization' => 'Bearer the-token'],\n 'allow_redirects' => false,\n ];\n }", "title": "" }, { "docid": "295f6c39e8977c8bf578ceb0200e1ebf", "score": "0.51776224", "text": "public function setHeaders($value = true) {\n curl_setopt($this->handler, CURLOPT_HEADER, $value);\n }", "title": "" }, { "docid": "fc5d7a61b92b5473e5c499c5e3f73a8a", "score": "0.5173538", "text": "private function getAuthHeaders(): array\n {\n $headers = $this->getHeaders();\n if ($this->token) {\n // if bearer token exists then include in headers for auth\n $headers['Authorization'] = 'Bearer '.$this->token;\n }\n\n return $headers;\n }", "title": "" }, { "docid": "f60b6142e7f82b83bdbef42b467ce2a0", "score": "0.51465064", "text": "function kcw_movies_get_header($token, $accept) {\n $header = \"Authorization: Bearer \" . $token . \"\\r\\n\";\n $header .= \"Content-Type: application/json\\r\\n\";\n $header .= \"Accept: \" . $accept . \"\\r\\n\";\n return $header;\n}", "title": "" }, { "docid": "66c0fa872cb34c3b9ed924ac4aede187", "score": "0.51219946", "text": "public function getHeaderName(): string\n {\n return 'Authorization';\n }", "title": "" }, { "docid": "ca6b0ec09386bbd6da645aafa0b5ec57", "score": "0.51164156", "text": "public function requestTokenHeaders()\n {\n $parameters = $this->baseProtocolParameters();\n\n $parameters['oauth_signature'] = $this->signer()->sign($this->requestTokenUrl(), $parameters);\n\n return [\n 'Authorization' => $this->authorizationHeaders($parameters),\n ];\n }", "title": "" }, { "docid": "d34513a8539c394d65161e53883ed2a5", "score": "0.51118773", "text": "public function getHttpHeaders() {\n $headers = [];\n\n $headers['Authorization'] = $this->authenticate();\n\n return $headers;\n }", "title": "" }, { "docid": "2767fc84052f8465869504b38c0498f9", "score": "0.51086193", "text": "public function getCurlHeaders () {\n return Array(\n 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12',\n 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Language: en-us,en;q=0.5',\n 'Accept-Encoding: gzip,deflate',\n 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n 'Keep-Alive: 115',\n 'Connection: keep-alive',\n 'Authentication: Basic '.base64_encode($this->user . \":\" . $this->password)\n );\n }", "title": "" }, { "docid": "4ec93210461e532f9ef1a94aabfd4cc9", "score": "0.5107866", "text": "public static function setBaseHeaders($token)\n {\n return Middleware::mapRequest(\n function (Request $request) use ($token) {\n return $request->withHeader('Accept', 'application/json')\n ->withHeader('Authorization', 'Bearer ' . $token);\n }\n );\n }", "title": "" }, { "docid": "a74c636bf5cf518866380dcd5ed4d0e9", "score": "0.51004297", "text": "private function getHeaders()\n {\n return ['apikey' => $this->apiKey];\n }", "title": "" }, { "docid": "e985c6bae3b3ad6df2c8e7350fce5d30", "score": "0.5080468", "text": "function getHeader()\n{\n $headers=array();\n $headers[] = 'Content-Type: application/json';\n $headers[] = HEADER_HOST_DEV;\n return $headers;\n}", "title": "" }, { "docid": "8f144a5c0a1d5193ea8c92086ec0fc11", "score": "0.507661", "text": "function get_where_call_headers($app_id, $token)\r\n{\r\n\t$auth_header = sprintf('Authorization: Atmosphere atmosphere_app_id=%s, Bearer %s', $app_id, $token);\r\n\r\n //Create necessary headers for REST call \r\n\t$headers = array();\r\n\t$headers[] = $auth_header; \r\n $headers[] = 'Accept: application/json'; //alternatively 'Accept: application/xml' \r\n\r\n return $headers;\r\n}", "title": "" }, { "docid": "3872ed268af64eb6d3ce97d0cc6491be", "score": "0.50633967", "text": "protected function setHeaders()\n {\n if($this->code) http_response_code($this->code);\n foreach($this->headers as $header){\n header($header);\n }\n }", "title": "" }, { "docid": "cddb3ad48eb169ed5d6dbccaf8cfe8cd", "score": "0.50467205", "text": "protected function _update_token() {\n $this->request_params['method'] = 'POST';\n $this->request_params['path'] = \"{$this->api_version}{$this->token_endpoint}\";\n $data = $this->do_request() ? $this->get_data() : null;\n $data = json_decode($data, true);\n $access_token = isset($data['access_token']) ? $data['access_token'] : null;\n $expiration = isset($data['expires_in']) ? $data['expires_in'] : null;\n $refresh_token = isset($data['refresh_token']) ? $data['refresh_token'] : null;\n $this->access_token = $access_token;\n $this->expiration = $expiration;\n $this->refresh_token = $refresh_token;\n $this->request_params['header_params'] = array('Authorization: OAuth ' . $this->access_token);\n }", "title": "" }, { "docid": "e479b8b398304981c393f809e3e2d1f9", "score": "0.50466144", "text": "public function setSecuredByHttpHeaders(): void\n {\n $this->isSecuredByHttpHeaders = true;\n }", "title": "" }, { "docid": "25f1debe7bb62755f4fded2eb6188a74", "score": "0.5045961", "text": "public function prepareHeaders()\n {\n $this->getResponse()->prepareHeaders();\n }", "title": "" }, { "docid": "7726decaf80f4f2ed884da009f67a7e4", "score": "0.50455725", "text": "function net2ftp_module_sendHttpHeaders() {\r\n\r\n// --------------\r\n// This function sends HTTP headers\r\n// --------------\r\n\r\n//\tglobal $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;\r\n\t\r\n}", "title": "" }, { "docid": "330f722607d800359bb2f2924a580a7a", "score": "0.50406307", "text": "private function getDefaultHeaders()\n {\n return [\n 'Authorization' => 'Bearer '.$this->accessToken,\n // Used the accept field is needed to fix the API version and avoid BC break from the API\n 'Accept' => 'application/vnd.wit.'.$this->apiVersion.'+json',\n ];\n }", "title": "" }, { "docid": "d9455ba161e5f2889c6f14ca09f495f0", "score": "0.50393975", "text": "protected function buildHeaders($url)\n {\n $header = $this->protocolHeader('GET', $url, $this->token);\n $authorizationHeader = array('Authorization' => $header);\n\n return $this->buildHttpClientHeaders($authorizationHeader);\n }", "title": "" }, { "docid": "150432cf0520539213381ff5f2f4e141", "score": "0.50389934", "text": "function setCustomHeaders(array $values);", "title": "" }, { "docid": "026b3c3b958c5d7f8293b08413879f13", "score": "0.5033464", "text": "protected function setIndexRequestOptions()\n {\n curl_setopt_array($this->session, [\n CURLOPT_URL => $this->indexUrl,\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\n \"Referer: {$this->searchUrl}\",\n \"X-CSRFToken: {$this->csrfMiddlewareToken}\",\n 'Content-Type: application/x-www-form-urlencoded',\n 'Accept: application/json'\n ]\n ]);\n }", "title": "" }, { "docid": "4916181d6d1f1bc87746ac580c5d8777", "score": "0.502461", "text": "protected function updateHeaders()\n {\n return $this->headers();\n }", "title": "" }, { "docid": "1e70178c61c5ad33e77486c8babd39f0", "score": "0.5010372", "text": "public function setHttpHeader()\n {\n $this->header = true;\n }", "title": "" }, { "docid": "eb4b532c114e53520a877b94056e1963", "score": "0.5006982", "text": "public function testExtractRequestHeadersBasicAuth()\n {\n $request = [\n 'HTTP_AUTHORIZATION' => 'Basic YWRtaW46cGFzc3dvcmQ=',\n ];\n $headers = [\n 'PHP_AUTH_USER' => 'admin',\n 'PHP_AUTH_PW' => 'password',\n 'Authorization' => 'Basic YWRtaW46cGFzc3dvcmQ=',\n ];\n $this->assertEquals($headers, HTTPRequestBuilder::extractRequestHeaders($request));\n\n $request = [\n 'PHP_AUTH_USER' => 'admin',\n 'PHP_AUTH_PW' => 'password',\n ];\n $headers = [\n 'PHP_AUTH_USER' => 'admin',\n 'PHP_AUTH_PW' => 'password',\n ];\n $this->assertEquals($headers, HTTPRequestBuilder::extractRequestHeaders($request));\n\n $request = [\n 'REDIRECT_HTTP_AUTHORIZATION' => 'Basic YWRtaW46cGFzc3dvcmQ=',\n ];\n $headers = [\n 'PHP_AUTH_USER' => 'admin',\n 'PHP_AUTH_PW' => 'password',\n ];\n $this->assertEquals($headers, HTTPRequestBuilder::extractRequestHeaders($request));\n\n $request = [\n 'HTTP_AUTHORIZATION' => 'Basic YWRtaW46cGFzc3dvcmQ=',\n 'REDIRECT_HTTP_AUTHORIZATION' => 'Basic dXNlcjphdXRo=',\n ];\n $headers = [\n 'PHP_AUTH_USER' => 'admin',\n 'PHP_AUTH_PW' => 'password',\n 'Authorization' => 'Basic YWRtaW46cGFzc3dvcmQ=',\n ];\n $this->assertEquals(\n $headers,\n HTTPRequestBuilder::extractRequestHeaders($request),\n 'Prefer HTTP_AUTHORIZATION over REDIRECT_HTTP_AUTHORIZATION'\n );\n }", "title": "" }, { "docid": "6573b97e142ff35128537c52f88af95e", "score": "0.50040704", "text": "public abstract function setHeaders($headers);", "title": "" }, { "docid": "be147d508c07614770cb54b76aa13b70", "score": "0.50014424", "text": "protected function setSharedCurlOptions($curl, $headers = array())\n {\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\n # return the transfer as a string\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n # SSL-verify peers\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verifyPeers);\n }", "title": "" }, { "docid": "c05bc8cfdf4220c5d6e2529dff60cfd4", "score": "0.4995354", "text": "protected function setHttpHeaders()\n {\n Yii::$app->getResponse()->getHeaders()\n ->set('Pragma', 'public')\n ->set('Expires', '0')\n ->set('Cache-Control', 'must-revalidate, post-check=0, pre-check=0')\n ->set('Content-Transfer-Encoding', 'binary')\n ->set('Content-type', 'image/jpeg');\n }", "title": "" }, { "docid": "b0a67cb03599e6d23ae07854c11ead59", "score": "0.49942687", "text": "public function header($credentials, $artifacts, $options = []);", "title": "" }, { "docid": "efe66045c9fd2e6d8b8158708921ab9b", "score": "0.4990574", "text": "public function setContentHeaders(): void\n {\n $this->headers['Content-Type'] = 'application/json';\n }", "title": "" }, { "docid": "6c3cb05ef5eb36397511dabd7fba41e2", "score": "0.4983378", "text": "protected function generateAuthHeader()\n {\n if ($this->resolver->isDefined('token')) {\n return $this->generateBillingoTokenHeader();\n } else {\n return $this->generateJWTHeader();\n }\n }", "title": "" }, { "docid": "810167bda544c4da7d7138f98cebccf8", "score": "0.4982507", "text": "public function resetHeaders() : HTTPOutputResponse;", "title": "" }, { "docid": "22085e8f5a5c29f8e0900396ec6025c2", "score": "0.49779317", "text": "public function sendHeaders() {\n\t\tif(($httpStatusCode = $this->getHttpStatusCode()) != null) {\n\t\t\theader($this->http11StatusCodes[$httpStatusCode]);\n\t\t}\n\n\t\t$this->setHttpHeader('X-Powered-By', 'Chainr');\n\n\t\tforeach ($this->getHttpHeaders() as $name => $value) {\n\t\t\tif (!is_null($value)) {\n\t\t\t\theader($name . ': ' . $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0e5cea86bfe1146ef07ddf0296cfa186", "score": "0.4968713", "text": "public function injectHeaders()\n\t{\n\t\t$cookies = $this->cookie_manager->getAllCookies();\n\t\tforeach($cookies as $cookie)\n\t\t{\n\t\t\t$this->manager->setHeader('Set-Cookie', $cookie->getFullCookieString());\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "303c9d82c580ad1ea1702d2d8bc83dd7", "score": "0.49678662", "text": "private function setHeaders() {\n if ($this->headers) {\n foreach ($this->headers as $header) {\n header($header);\n }\n }\n }", "title": "" }, { "docid": "9fbb454f3a6370687e99e8c6f63dafb5", "score": "0.49645197", "text": "public function getAuthorizationHeaders(string $token): array\n {\n return [\n ...$this->getContentTypeHeader(),\n ...[\n 'HTTP_AUTHORIZATION' => 'Bearer ' . $token,\n ],\n ];\n }", "title": "" }, { "docid": "08a020c5af4892ff1ba6e9e2755c7b1d", "score": "0.49553958", "text": "public function setCommonHeaders($headers = []) {\n\t\t$this->commonHeaders = array_merge($this->requiredHeaders, $headers); // order does matter\n\t}", "title": "" }, { "docid": "56da83c75aa3ce1a9cc878f1249b897e", "score": "0.4952483", "text": "protected function set_headers(){\n header(\"HTTP/1.1 \".$this->_code.\" \".$this->get_status_message());\n header(\"Content-Type:application/json\");\n }", "title": "" }, { "docid": "ace72595749b59eec2bf62b2c91ea714", "score": "0.49506268", "text": "public function onAfterInitialise()\n\t{\n\t\t// Set the default header when they are enabled\n\t\t$this->setDefaultHeader();\n\n\t\t// Handle CSP Header configuration\n\t\t$cspOptions = (int) $this->params->get('contentsecuritypolicy', 0);\n\n\t\tif ($cspOptions)\n\t\t{\n\t\t\t$this->setCspHeader();\n\t\t}\n\n\t\t// Handle HSTS Header configuration\n\t\t$hstsOptions = (int) $this->params->get('hsts', 0);\n\n\t\tif ($hstsOptions)\n\t\t{\n\t\t\t$this->setHstsHeader();\n\t\t}\n\n\t\t// Handle the additional httpheader\n\t\t$httpHeaders = $this->params->get('additional_httpheader', array());\n\n\t\tforeach ($httpHeaders as $httpHeader)\n\t\t{\n\t\t\t// Handle the client settings for each header\n\t\t\tif (!$this->app->isClient($httpHeader->client) && $httpHeader->client != 'both')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (empty($httpHeader->key) || empty($httpHeader->value))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!in_array(strtolower($httpHeader->key), $this->supportedHttpHeaders))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->app->setHeader($httpHeader->key, $httpHeader->value, true);\n\t\t}\n\t}", "title": "" }, { "docid": "654adcd3d43542f4a813bb53342ba75d", "score": "0.49466014", "text": "public function resolveAuthorization(&$queryParams, &$formParams, &$headers)\n {\n $accessToken = $this->resolveAccessToken();\n\n $headers['Authorization'] = $accessToken;\n }", "title": "" }, { "docid": "47fce6f440d2db77054acc569e35427b", "score": "0.49433634", "text": "protected function _setHeaders() {\n\t\tstatic $map = array(\n\t\t\t'contentLength' => WebHeaders::ContentLength,\n\t\t\t'contentType' => WebHeaders::ContentType\n\t\t);\n\t\t\n\t\tforeach ($map as $property => $header) {\n\t\t\tif (!empty($this->{$property})) {\n\t\t\t\t$this->headers[$header] = $this->{$property};\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c44eec1e3e04cf9ce43d6cc9a74edf0a", "score": "0.4936293", "text": "public function setCorsHeaders(SymfonyResponse $response)\n {\n foreach ($this->getCorsHeaders() as $key => $value) {\n $response->headers->set($key, $value);\n }\n\n return $response;\n }", "title": "" }, { "docid": "39f6e5cdc45c0fb21aced7b520acb987", "score": "0.49349615", "text": "public function sendHeaders();", "title": "" }, { "docid": "33213675ac549b3a82f5a1c5630bc463", "score": "0.49296862", "text": "public function createAuthorizationHeader() //:string\n {\n return self::OAUTH2_AUTHORIZATION_HEADER . $this->accessToken;\n }", "title": "" }, { "docid": "811cb25ebbb71b92b4e9e723f6a3bcdc", "score": "0.49218422", "text": "public function getHeaders()\n {\n return ['x-api-key' => $this->appId];\n }", "title": "" }, { "docid": "fcd415bc6c73c7a2b8194832dc8ebd92", "score": "0.49128428", "text": "public static function appendCustomAuthParams($request)\r\n {\r\n $arrHeaders = $request->__get('headers');\r\n $arrAuthHeader = array(\"X-WSSE\" => self::generateWSSEHeader(Configuration::$USERNAME, Configuration::$APITOKEN));\r\n \r\n $arrHeaders = array_merge($arrHeaders, $arrAuthHeader);\r\n \r\n \t$request->__set('headers', $arrHeaders);\r\n }", "title": "" }, { "docid": "ba3ce5a4d3b502e9f8c582e5e6200f9f", "score": "0.49078405", "text": "public function withToken() {\n $f3 = \\Base::instance();\n $token = $f3->get(\"SESSION.das.login_token\");\n\n if($token) {\n $this->request = $this->request->withHeader(\"X-OGToken\", $token); \n }\n\n return $this;\n }", "title": "" }, { "docid": "f541733f21ac178e58a70ea04adfd514", "score": "0.490669", "text": "public function auth($request)\n {\n $this->login();\n $request->setHeader('Authorization', \"token {$this->token}\");\n return $request;\n }", "title": "" }, { "docid": "7f1597b8e01f36bf0d105a0cef69eba9", "score": "0.4901173", "text": "private function getTokenHeader(string $token): array\n {\n return [\n 'Authorization' => \"Bearer $token\",\n 'Content-Type' => 'application/json'\n ];\n }", "title": "" }, { "docid": "8c74f624f116df8d5ce9250e57a0b05e", "score": "0.49000686", "text": "public function clearHttpHeaders()\n {\n $this->headers = array();\n }", "title": "" }, { "docid": "82bbc424469bcaa8fcde45a76309a424", "score": "0.48971164", "text": "function send_curl($uri,$cachet_token,$data_string,$method) {\n\t$ch = curl_init($uri);\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch,CURLOPT_HTTPHEADER, array(\"Content-Type: application/json\", \"X-Cachet-Token: $cachet_token\"));\n\treturn curl_exec($ch);\n}", "title": "" }, { "docid": "3c62e822ea0e1b55d6d01b335179f0b4", "score": "0.48939633", "text": "public function getRequestHeaders();", "title": "" }, { "docid": "cafd8922521174e457e80569f315efa4", "score": "0.4892202", "text": "function setHeaders()\n{\n $generalHeaders = [\n \"X-Content-Type-Options: nosniff\",\n \"Strict-Transport-Security: max-age=63072000; includeSubDomains; preload\",\n \"X-Frame-Options: DENY\",\n \"X-XSS-Protection: 1; mode=block\",\n ];\n\n foreach ($generalHeaders as $header) {\n header($header);\n }\n}", "title": "" }, { "docid": "94cb6af7e164b80f5ab630dbd7ba87e0", "score": "0.48914096", "text": "public function addHeaders(Response $response);", "title": "" }, { "docid": "1e0ff650dae161858d21d2b25d8e2348", "score": "0.48894906", "text": "private static function header($header)\n {\n $header['Content-Language'] = app()->getLocale();\n $header['X-Powered-By'] = config('main.api_auth');\n $header['X-Version'] = config('main.api_version');\n\n return $header;\n }", "title": "" }, { "docid": "654e7b3cffc15f7a3164e24d4e47476e", "score": "0.4888995", "text": "public function test_003_callAPI_authHeader_returnAccessToken()\r\n\t{\r\n\t\t$this->setMethodHeader(\"auth\");\r\n\t\t$this->setAuthorizationHeader();\r\n\t\t\r\n\t\t$actual = $this->exec();\r\n\t\t$this->assertNotEmpty($actual->accessToken);\r\n\t\tself::$accessToken = $actual->accessToken;\r\n\t}", "title": "" }, { "docid": "bb560072302b71129431392d58684ea1", "score": "0.4869439", "text": "public function getHeaders() {\n return [\n 'Authorization' => trim($this->getAuthorizationHeader()),\n 'Accept-Language' => trim($this->locale),\n 'X-APP-TOKEN' => $this->app_token,\n 'Content-Type' => 'application/json',\n ];\n }", "title": "" }, { "docid": "f27e701380435b2a63f87c082ade0c00", "score": "0.48578727", "text": "public function onBefore(BeforeEvent $event)\n {\n // Requests using \"auth\"=\"scoped\" will be authorized.\n $request = $event->getRequest();\n if ($request->getConfig()['auth'] != 'scoped') {\n return;\n }\n $auth_header = 'Bearer ' . $this->fetchToken();\n $request->setHeader('Authorization', $auth_header);\n }", "title": "" }, { "docid": "84cfd2d29eda8e8c94ee24cabf537c63", "score": "0.48556423", "text": "public function setReturnHeader()\n {\n $this->setOpt(CURLOPT_HEADER, 1);\n $this->rHeader = true;\n\n return $this;\n }", "title": "" }, { "docid": "13e42cd9f35dca68333ddc1e1645b964", "score": "0.48534065", "text": "protected function setAgreementRequestOptions()\n {\n // handhsake\n curl_setopt_array($this->session, [\n CURLOPT_URL => $this->loginUrl,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_COOKIEJAR => $this->cookieUri,\n CURLOPT_COOKIEFILE => $this->cookieUri,\n CURLOPT_HEADER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => \"csrfmiddlewaretoken={$this->csrfMiddlewareToken}&prohibition_agreement=1\",\n CURLOPT_HTTPHEADER => [\n \"Referer: {$this->loginUrl}\",\n 'Content-Type: application/x-www-form-urlencoded'\n ]\n ]);\n }", "title": "" } ]
2d381e8e95f82a260ab0a72a754cdc44
public $layout = "template_report";
[ { "docid": "9f15d6081e32a985745c674bdf4e2ecd", "score": "0.0", "text": "public function actionTemplatepopulation() {\n $report_id = $_GET['report_id'];\n //$info = $_GET['info'];\n $report = new SysReportlist();\n $rs = $report->get_link_report($report_id);\n $dateNow = date(\"Y\");\n $filter = new Filter();\n $data['year'] = $filter->yearComboBox(\"year\", \"\", \"\", \"year\", $this->comboboxclass, (($dateNow - 2) + 543)); // 5 ปีย้อนหลัง\n\n $data['controller'] = $rs['controller'];\n $data['note'] = $rs['note' . Language::GetLanguageDefault()];\n $data['info'] = $rs['source' . Language::GetLanguageDefault()];\n $this->renderPartial('//reports/report_template', $data);\n }", "title": "" } ]
[ { "docid": "a42fe5984521b76daba45b364e6f3688", "score": "0.6709744", "text": "private function __layoutContent()\n {\n return VIEWS . DS . 'Layout' . DS . 'base.php';\n }", "title": "" }, { "docid": "6cd37c385af5148c4dd6b4638b39c4c3", "score": "0.66388446", "text": "public function getLayout(): string;", "title": "" }, { "docid": "740c5be1405ea8d1f0aaf4f3f21c4a7f", "score": "0.6583328", "text": "public function __construct()\n {\n parent::__construct();\n /// Assign template view object to the template variable\n /// print'<pre>';print_r(\"QWE! \".$this->layout);print'</pre>';\n $this->template = new View('Layouts/'.$this->layout);\n }", "title": "" }, { "docid": "138e0885b4f3a7d748da48ba7abf541b", "score": "0.65416884", "text": "public function getLayoutTemplate();", "title": "" }, { "docid": "a37d09a9d7312add8d0978ec8217b254", "score": "0.65266407", "text": "public function layout() {\n return $this->layout;\n }", "title": "" }, { "docid": "0e95ac7392ca9418ac2e4d130bd7a236", "score": "0.6502677", "text": "public function getLayout() {}", "title": "" }, { "docid": "626b3f132b2374195d56c9eb9f3699cf", "score": "0.6471207", "text": "public function __construct()\r\n\t{\r\n\t\t$this->layoutPropio = 'layouts.profesor';\r\n\t}", "title": "" }, { "docid": "e331392fd7a10e5b7044305dc5e14bb8", "score": "0.64447653", "text": "public function dashboard_layout()\n {\n require_once(OOMETRICS_PATH.'/templates/dashboard/dashboard.php');\n }", "title": "" }, { "docid": "77c037674ebcc3992e8e2a5705d410cb", "score": "0.64052963", "text": "function the_layout(string $layout)\n {\n return app('armin.layout')->layout($layout);\n }", "title": "" }, { "docid": "40bb2aba1c3ef18f329ce176749c7b79", "score": "0.6392386", "text": "public function layoutAction(){\n \t$far = 100;\n \t$sxnById = array();\n \t$request = $this->getRequest();\n \t$template_id = $request->getParam('template_id');\n \t$page_id = $request->getParam('page_id');\n \t$title = $request->getParam('title');\n \t$task = $request->getParam('task', null);\n \t$table = $this->_getParam('table');\n\n \tif($template_id){\n\t \tswitch($task){\n\t \t\tcase 'savelayout':{\n\t \t\t\t$this->saveLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\n\t \t\tcase 'resetlayout':{\n\t \t\t\t$this->resetLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\t \t}\n \t}\n\t\t \n\t\t$pageLayout = Rhema_Model_Service::factory('page_layout');\t\t\n \t$res = $pageLayout->getPageLayout($page_id, $template_id, $table); \n \t\n \t$items \t = $this->_editor->getCached()->getItems(); \t\n \t$templateData = $this->_editor->getCached()->getTemplateDetails($template_id);\n \t$items = array_merge($items, $templateData);\n \t \n \t$this->view->title = $title;\n \t//$this->view->sections \t= $templateData['sections'];\n \t$this->view->layout \t= $res['layout']; \n \t \n \t$formUrl['action']\t\t= 'layout';\n \t$formUrl['controller'] = 'design';\n \t$formUrl['module'] = 'cms';\n\n \t$formUrl['page_id'] = $page_id ;\n \t$formUrl['template_id'] = $template_id;\n \t$formUrl['title'] = $title;\n \t$formUrl['table'] = $table ;\n\n \t$this->view->formAction = $this->view->url($formUrl, ADMIN_ROUTE); \n\t\t$this->view->items = $items;\n\n \t$output['form'] = $this->view->render('design/layout.phtml');\n \t\n \t$this->_utility->setAjaxData(Zend_Json::encode($output));\n }", "title": "" }, { "docid": "f4380ee8efbd4461b685f61a9727f3c3", "score": "0.63890344", "text": "public function report_page() {\n require_once dirname( __FILE__ ) . '/templates/report-template.php';\n }", "title": "" }, { "docid": "068cc1ac73d7a2f4c8470713b3bea329", "score": "0.6305238", "text": "public function layout()\n {\n return $this->layout;\n }", "title": "" }, { "docid": "bceb711157bc2c2db9ef7e97c53871a1", "score": "0.62981176", "text": "private static function getLayoutPath(){\n\t\treturn APPLICATION_PATH . \"/view/layout/\" . self::$layoutPath;\n\t}", "title": "" }, { "docid": "e0009eb89264f594cf5e2f485f4cf8a4", "score": "0.6297189", "text": "function set_layout($layout) {\n $this->layout = $layout;\n }", "title": "" }, { "docid": "7718ec8c55f897a6e171de575f84395d", "score": "0.6286371", "text": "function getLayout() {return $this->readLayout();}", "title": "" }, { "docid": "8fa6cc7f2225a57324b2c96732e33cff", "score": "0.6284374", "text": "public function getLayout() {\n return $this->layoutFile;\n }", "title": "" }, { "docid": "507837770bf4c7c43a6b0e4e65f66c50", "score": "0.62316823", "text": "public function getLayout(){\n return $this->_layout;\n }", "title": "" }, { "docid": "74dce07dc36db252f52b81a9081553fa", "score": "0.6206708", "text": "public function layout()\n {\n return $this->data->get('layout');\n }", "title": "" }, { "docid": "7386be353f782dbb16f3429b710aa1de", "score": "0.6199273", "text": "function load_layout() {\n $CI = & get_instance();\n $CI->load->library('sistema');\n $CI->parser->parse('template/' . $CI->sistema->layout['template'], get_layout());\n}", "title": "" }, { "docid": "70a531267bee6b71dcb77c89aa7fee41", "score": "0.61568034", "text": "public function layout()\r\n\t{\r\n\t\t\r\n\t\t$current_layout = $this->layout_model->get_current_layout();\r\n\t\r\n\t\tforeach ($current_layout as $current_layouts)\r\n\t\t{\r\n\t\t\t//$view->current_layout_id = $current_layouts->layout_id;\r\n\t\t\t$layout_id = $current_layouts->layout_id;\r\n\t\t}\r\n\t\t\r\n\t\t//$view->render(TRUE);\r\n\t\t\r\n\t\turl::redirect('xml/layout/'.$layout_id);\r\n\t}", "title": "" }, { "docid": "bfb0ca8f754abc3353196161227cb8fc", "score": "0.61323345", "text": "public function getLayout()\n {\n return 'layouts/layout-full-width.tpl';\n }", "title": "" }, { "docid": "887f133f1b52e72a34d4fa60cde688f7", "score": "0.61092895", "text": "public function report()\n { \n return view('back.order.report');\n }", "title": "" }, { "docid": "93f2f1e5082ed2ddfc03cabba063429a", "score": "0.61050206", "text": "public function init()\n {\n \t$this->view->layout = array();\n }", "title": "" }, { "docid": "93f2f1e5082ed2ddfc03cabba063429a", "score": "0.61050206", "text": "public function init()\n {\n \t$this->view->layout = array();\n }", "title": "" }, { "docid": "441feba6be7f44dbff9459dac928fdee", "score": "0.6090621", "text": "function layout(string $layout)\n {\n return the_layout($layout);\n }", "title": "" }, { "docid": "5eb68bed7156a2ce7cc19a2fcee2ea82", "score": "0.607883", "text": "public function makeReport()\n {\n }", "title": "" }, { "docid": "5064e637c22d1ee1f69e9640814234d4", "score": "0.6077377", "text": "public function actionIndex()\n {\n \n $content = $this->renderPartial('_report');\n \n // setup kartik\\mpdf\\Pdf component\n $pdf = new Pdf([\n \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 // any css to be embedded if required\n 'cssInline' => '.kv-heading-1{font-size:18px}', \n // set mPDF properties on the fly\n 'options' => ['title' => 'Krajee Report Title'],\n // call mPDF methods on the fly\n 'methods' => [ \n 'SetHeader'=>[''], \n 'SetFooter'=>['{PAGENO}'],\n ]\n ]);\n \n // return the pdf output as per the destination setting\n //return $content; \n return $pdf->render();\n }", "title": "" }, { "docid": "6f4ae6f12cb2dfd1faec926f90c7ba8f", "score": "0.6074382", "text": "protected function applyPageLayout()\n {\n $this->content = \"\n @extends('generated/layout')\n \";\n }", "title": "" }, { "docid": "6f727c7da8ca7b7732c278084b3e4d08", "score": "0.606199", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\treturn $this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "4f2e0207e03f7012ae3bd6b2124c3eac", "score": "0.6059313", "text": "public function getLayout();", "title": "" }, { "docid": "b3e521608d45d823cd4e59df941c4d5d", "score": "0.60399735", "text": "public function render($layout = null);", "title": "" }, { "docid": "7c9b96d74b570d90c6f0219bea6db99d", "score": "0.6038867", "text": "function get_layout(){\n\treturn $GLOBALS['body_layout'];\n}", "title": "" }, { "docid": "15f4775671ee531471f9fbc8d536cde8", "score": "0.6030741", "text": "function admin_dashboard() { \n $this->layout = 'Admin/default'; \n \n\t }", "title": "" }, { "docid": "42ba5eb8af7c74f46c6cac4e52243441", "score": "0.60233366", "text": "public function setLayout($layout);", "title": "" }, { "docid": "2653c62404450fc6ef61b14f62bf0b69", "score": "0.60163975", "text": "function get_layout() {\n $CI = & get_instance();\n $CI->load->library('sistema');\n return $CI->sistema->layout;\n}", "title": "" }, { "docid": "e473b410c5c8c31cfa93fe8a34945bb7", "score": "0.6008652", "text": "public function regular() {\n $data['header'] = $this->header;\n $this->load->view('report_regular_v', $data);\n }", "title": "" }, { "docid": "e1c6380c24ab7258fbdc23b4b85f440a", "score": "0.6004559", "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": "43c3da01061381d3633d9a0d7cf414f3", "score": "0.5987593", "text": "function render($template = 'layout') {\n\t\tinclude 'view/'.$template.'.phtml';\n\t}", "title": "" }, { "docid": "cae994ca9085b7842a6543190619fb9c", "score": "0.5981283", "text": "public function getLayout ()\n {\n\n return $this->layout;\n\n }", "title": "" }, { "docid": "8f470c3b86adba21340384cdb0a3783c", "score": "0.5969455", "text": "protected function setupLayout()\n {\n\t if ( ! is_null($this->layout))\n\t {\n\t\t $this->layout = View::make($this->layout);\n\t }\n }", "title": "" }, { "docid": "55bf8e830265a781e3521180418ccf6d", "score": "0.5962609", "text": "private function makeViewLayout()\n {\n new MakeLayout($this, $this->files);\n }", "title": "" }, { "docid": "934e2ac48cca0415be15deb36a1a0011", "score": "0.5938321", "text": "public function render()\n {\n return view('cash.layout-manager');\n }", "title": "" }, { "docid": "c2c65abf6506f81df8a0208e20557c9e", "score": "0.5917819", "text": "public function getLayout() {\n\t\treturn $this->getResource('layout');\n\t}", "title": "" }, { "docid": "dfee6560b52cc2cd37937432a9ca7905", "score": "0.5916153", "text": "public function layout() {\r\n $this->template['header'] = $this->load->view('common/header', $this->data, true);\r\n $this->template['content'] = $this->load->view($this->content, $this->data, true);\r\n $this->template['footer'] = $this->load->view('common/footer', $this->data, true);\r\n $this->load->view('common/layout', $this->template);\r\n }", "title": "" }, { "docid": "aba29dd0028c3ccdf8c1062020df6249", "score": "0.5910249", "text": "protected function setupLayout()\n {\n if( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "9fb4ee2441ecb8c1d2cd26a29576ab98", "score": "0.59100366", "text": "public function index()\n {\n return view('admin.report.index');\n }", "title": "" }, { "docid": "d229f2bab1742de573695c53c15a9186", "score": "0.5897871", "text": "public function actionReport()\n{\n // $content = $this->renderPartial('view');\n //set up the kartik\\mpdf\\Pdf component\n $pdf = new Pdf([\n 'content'=>$this->renderPartial('_reportView'),\n 'mode'=> Pdf::MODE_UTF8,\n 'format'=> Pdf::FORMAT_A4,\n 'orientation'=>Pdf::ORIENT_POTRAIT,\n 'destination'=> Pdf::DEST_BROWSER,\n 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css',\n 'cssInline'=> '.kv-heading-1{font-size:18px}',\n 'options'=> ['title'=> 'Article Card Reports'],\n 'methods'=> [\n 'setHeader'=>['Generated on: '.date(\"r\")],\n 'setFooter'=>['|page {PAGENO}|'],\n ]\n ]);\n return $pdf->render();\n}", "title": "" }, { "docid": "2864446f06a05e06002803fbf49b2573", "score": "0.58867145", "text": "public function reports()\n {\n //\n }", "title": "" }, { "docid": "298cabb9bec4461157292118693c5cdf", "score": "0.588429", "text": "function admin_sales_report()\n\t{\n\t\t$this->set('title_for_layout','Sales Report');\n\t\t$admin_u_type = $this->Session->read('Admin.userType');\n\t\t$admin_lab_type = $this->Session->read('Admin.labId');\n\t\t//print_R($this->Session->read('Admin'));die;\n\t\t$this->PaymentType = ClassRegistry::init('PaymentType');\n\t\t$p_type = $this->PaymentType->find('list',array('fields'=>array('PaymentType.id','PaymentType.type')));\n\t\t$this->set('p_type',$p_type);\n\t\tif(($admin_u_type != 'A') && ($admin_u_type != 'BM') && ($admin_u_type != 'Agent'))\n\t\t{\n\t\t\t//echo \"<pre>\"; print_r($this->Session->read('Admin')); exit;\n\t\t\t$pcc = $this->Lab->find('all',array('conditions'=>array('Lab.id'=>$admin_lab_type)));\n\t\t\t$s_pcc = $this->Lab->find('all',array('conditions'=>array('Lab.status'=>1)));\n\t\t\t\n\t\t\t$this->set('pcc',$pcc);\n\t\t\t$this->set('s_pcc',$s_pcc);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$pcc = $this->Lab->find('all',array('conditions'=>array('Lab.status'=>1)));\n\t\t\t$s_pcc = $this->Lab->find('all',array('conditions'=>array('Lab.status'=>1)));\n\t\t\t\n\t\t\t$this->set('pcc',$pcc);\n\t\t\t$this->set('s_pcc',$s_pcc);\n\t\t}\n\t\t\n\t\t$login_agent_type = $this->Session->read('Admin.login_agent_type');\n\t\t$login_agent_id = $this->Session->read('Admin.id');\n\t\tif($login_agent_type == 'Agent')\n\t\t{\n\t\t\t$agents = $this->Agent->find('all',array('conditions'=>array('Agent.id'=>$login_agent_id)));\n\t\t\t$this->set('agents',$agents);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$agents = $this->Agent->find('all',array('conditions'=>array('Agent.status'=>1)));\n\t\t\t$this->set('agents',$agents);\n\t\t}\n\t\t\n\t\t$this->set('login_agent_type',$login_agent_type);\n\t\t\n\t\tif(!empty($this->params['named']['from_date']) && $this->params['named']['from_date'] != '')\n\t\t{\n\t\t\t$this->data['SalesReport']['from_date'] = $this->params['named']['from_date'];\n\t\t\t$options['from_date'] = $this->params['named']['from_date'];\n\t\t}\n\t\tif(!empty($this->params['named']['to_date']) && $this->params['named']['to_date'] != '')\n\t\t{\n\t\t\t$this->data['SalesReport']['to_date'] = $this->params['named']['to_date'];\n\t\t\t$options['to_date'] = $this->params['named']['to_date'];\n\t\t}\n\t\tif(!empty($this->params['named']['lab']) && $this->params['named']['lab'] != '')\n\t\t{\n\t\t\t$this->data['SalesReport']['pcc_list_id'] = $this->params['named']['lab'];\n\t\t\t$options['lab'] = $this->params['named']['lab'];\n\t\t}\n\t\tif(!empty($this->params['named']['agent']) && $this->params['named']['agent'] != '')\n\t\t{\n\t\t\t$this->data['SalesReport']['agent'] = $this->params['named']['agent'];\n\t\t\t$options['agent'] = $this->params['named']['agent'];\n\t\t}\n\t\tif(!empty($this->params['named']['set_option']) && $this->params['named']['set_option'] != '')\n\t\t{\n\t\t\t$this->data['SalesReport']['set_option'] = $this->params['named']['set_option'];\n\t\t\t$options['set_option'] = $this->params['named']['set_option'];\n\t\t}\n\t\t\n\t\tif(!empty($this->data))\n\t\t{\n\t\t\tif($this->data['SalesReport']['set_option'] == 'filter')\n\t\t\t{\n\t\t\t\t$from_date = $this->data['SalesReport']['from_date']; \n\t\t\t\t$to_date = $this->data['SalesReport']['to_date'];\n\t\t\t\t$lab_id = $this->data['SalesReport']['pcc_list_id'];\n $lab_id1 = $this->data['SalesReport']['pcc_list_id1'];\n\t\t\t\t$agent_id = $this->data['SalesReport']['agent_list_id'];\n\t\t\t\t$select_option = $this->data['SalesReport']['set_option'];\n\t\t\t\t$filter_class=\"Result For \";\n\t\t\t\tif(!empty($from_date) && $from_date != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.s_date >='] = date('Y-m-d',strtotime($from_date));\n\t\t\t\t\t$options['from_date'] = $from_date;\n\t\t\t\t\t$filter_class.= \"<font color='green'>From <strong>\".$from_date.\"</strong></font>\";\n\t\t\t\t}\n\t\t\t\tif(!empty($to_date) && $to_date != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.s_date <='] = date('Y-m-d',strtotime($to_date));\n\t\t\t\t\t$options['to_date'] = $to_date;\n\t\t\t\t\t$filter_class.= \"<font color='green'> till <strong>\".$to_date.\"</strong></font>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$lab_list_filter = $this->Lab->find('list',array('fields'=>array('id','pcc_name')));\n\t\t\t\t\n\t\t\t\tif(!empty($lab_id) && $lab_id != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.assigned_lab'] = $lab_id;\n\t\t\t\t\t$options['lab'] = $lab_id;\n\t\t\t\t\t$filter_class.= \"<font color='orange'> Serviced By : <strong>\".$lab_list_filter[$lab_id].\"</strong></font>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$filter_class.= \"<font color='orange'> Serviced By :<strong>All</strong></font>\";\n\t\t\t\t}\n if(!empty($lab_id1) && $lab_id1 != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.created_by'] = $lab_id1;\n\t\t\t\t\t$options['lab1'] = $lab_id1;\n\t\t\t\t\t$filter_class.= \"<font color='red'> Booked By : <strong>\".$lab_list_filter[$lab_id1].\"</strong></font>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$filter_class.= \"<font color='red'> Booked By : <strong>All</strong></font>\";\n\t\t\t\t}\n\t\t\t\t/*if not service by same lab*/\n\t\t\t\tif($lab_id == $lab_id1 && !empty($lab_id) && !empty($lab_id1))\n\t\t\t\t{\n\t\t\t\t\tunset($conditions['Health.assigned_lab']);\n\t\t\t\t\tunset($conditions['Health.created_by']);\n\t\t\t\t\t$conditions['OR']['Health.assigned_lab'] = $lab_id;\n\t\t\t\t\t$conditions['OR']['Health.created_by'] = $lab_id1;\n\t\t\t\t\t//$filter_class.= \"<font color='red'> Booked By <strong>\".$lab_list_filter[$lab_id1].\"</strong></font> and <font color='orange'> Serviced By <strong>\".$lab_list_filter[$lab_id].\"</strong></font>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$agent_list_filter = $this->Agent->find('list',array('fields'=>array('id','name')));\n\t\t\t\tif(!empty($agent_id) && $agent_id != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.agent_id'] = $agent_id;\n\t\t\t\t\t$options['agent'] = $agent_id;\n\t\t\t\t\t$filter_class.= \" <font color='brown'> Phlebo Name : <strong>\".$agent_list_filter[$agent_id].\"</strong></font>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$filter_class.= \" <font color='brown'> Phlebo : <strong>All</strong></font>\";\n\t\t\t\t}\n\t\t\t\t$conditions['Health.status'] = 1;\n\t\t\t\t$options['set_option'] = $select_option;\n\t\t\t\t$this->paginate = array('Health' => array('limit' =>'50','conditions'=>$conditions));\n\t\t\t\t$find_request=$this->paginate('Health');\n\t\t\t\t\n\t\t\t\t$this->set('filter_class',$filter_class);\n\t\t\t\t\n\t\t\t\t$reports = array();\n\t\t\t\t$k = 0;\n\t\t\t\tforeach($find_request as $sl_ky => $sl_vl)\n\t\t\t\t{\n\t\t\t\t\t$parameter_count = 0;\n\t\t\t\t\t$count_expl_test = 0;\n\t\t\t\t\t$count_expl_profile = 0;\n\t\t\t\t\t$count_expl_offer = 0;\n\t\t\t\t\t$count_expl_package= 0;\n\t\t\t\t\t\n\t\t\t\t\t$pcc_name = $this->Lab->find('first',array('conditions'=>array('Lab.id'=>$sl_vl['Health']['assigned_lab'])));\n $pcc_name1 = $this->Lab->find('first',array('conditions'=>array('Lab.id'=>$sl_vl['Health']['created_by'])));\n\t\t\t\t\t$agent_name = $this->Agent->find('first',array('conditions'=>array('Agent.id'=>$sl_vl['Health']['agent_id'])));\n\t\t\t\t\t$requestNum = $this->Billing->find('first',array('conditions'=>array('Billing.request_id'=>$sl_vl['Health']['id'])));\n\t\t\t\t\t$test_amt = 0;\n\t\t\t\t\t$test_code_arr = array();\n\t\t\t\t\t$test_name_arr = array();\n\t\t\t\t\tif(!empty($sl_vl['Health']['test_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_test = explode(',',$sl_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_test = 0; \n\t\t\t\t\t\tforeach($expl_test as $test_key => $test_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($test_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_test++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$test_code = $this->RequestTest->find('first',array('conditions'=>array('RequestTest.health_id'=>$sl_vl['Health']['id'],'RequestTest.test_id'=>$test_val)));\n\t\t\t\t\t\t\t$test_detail = $this->Test->find('first',array('conditions'=>array('Test.id'=>$test_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $test_detail['Test']['testcode'];\n\t\t\t\t\t\t\t$test_name_arr[] = $test_detail['Test']['test_parameter'];\n\t\t\t\t\t\t\t$test_amt = ($test_code['RequestTest']['mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_test = $cnt_test;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($sl_vl['Health']['profile_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_test = explode(',',$sl_vl['Health']['profile_id']);\n\t\t\t\t\t\t$cnt_test = 0; \n\t\t\t\t\t\tforeach($expl_test as $test_key => $test_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($test_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_test++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$test_code = $this->RequestTest->find('first',array('conditions'=>array('RequestTest.health_id'=>$sl_vl['Health']['id'],'RequestTest.test_id'=>$test_val)));\n\t\t\t\t\t\t\t$test_detail = $this->Test->find('first',array('conditions'=>array('Test.id'=>$test_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $test_detail['Test']['testcode'];\n\t\t\t\t\t\t\t$test_name_arr[] = $test_detail['Test']['test_parameter'];\n\t\t\t\t\t\t\t$test_amt = ($test_code['RequestTest']['mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_test = $cnt_test;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($sl_vl['Health']['offer_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_offer = explode(',',$sl_vl['Health']['offer_id']);\n\t\t\t\t\t\t$cnt_offr = 0;\n\t\t\t\t\t\tforeach($expl_offer as $offer_key => $offer_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($offer_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_offr++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$offer_code = $this->RequestTest->find('first',array('conditions'=>array('RequestTest.health_id'=>$sl_vl['Health']['id'],'RequestTest.test_id'=>$offer_val,'RequestTest.type'=>'OF')));\n\t\t\t\t\t\t\t$offer_detail = $this->Banner->find('first',array('conditions'=>array('Banner.id'=>$offer_val)));\n\t\t\t\t\t\t\t//$offer_code = $this->Banner->find('first',array('conditions'=>array('Banner.id'=>$offer_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $offer_detail['Banner']['banner_code'];\n\t\t\t\t\t\t\t$test_name_arr[] = $offer_detail['Banner']['banner_name'];\n\t\t\t\t\t\t\t$test_amt = ($offer_code['RequestTest']['mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_offer = count($cnt_offr);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($sl_vl['Health']['package_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_package = explode(',',$sl_vl['Health']['package_id']);\n\t\t\t\t\t\t$cnt_pck = 0;\n\t\t\t\t\t\tforeach($expl_package as $package_key => $package_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($package_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_pck++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$package_code = $this->RequestTest->find('first',array('conditions'=>array('RequestTest.health_id'=>$sl_vl['Health']['id'],'RequestTest.test_id'=>$package_val,'RequestTest.type'=>'PA')));\n\t\t\t\t\t\t\t$package_detail = $this->Package->find('first',array('conditions'=>array('Package.id'=>$package_val)));\n\t\t\t\t\t\t\t//$package_code = $this->Package->find('first',array('conditions'=>array('Package.id'=>$package_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $package_detail['Package']['package_code'];\n\t\t\t\t\t\t\t$test_name_arr[] = $package_detail['Package']['package_name'];\n\t\t\t\t\t\t\t$test_amt = ($package_code['RequestTest']['mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_package = $cnt_pck;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$parameter_count = ($count_expl_test+$count_expl_profile+$count_expl_offer+$count_expl_package);\n\t\t\t\t\t$implode_parameter_code = implode(', ',$test_code_arr);\n\t\t\t\t\t$implode_parameter_name = implode(', ',$test_name_arr);\n\t\t\t\t\t\n\t\t\t\t\tif($sl_vl['Health']['gender'] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$gender = 'M';\n\t\t\t\t\t}\n\t\t\t\t\tif($sl_vl['Health']['gender'] == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$gender = 'F';\n\t\t\t\t\t}\n\t\t\t\t\tif($sl_vl['Health']['discount_id'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$fix_dicount = $this->Discount->find('first',array('conditions'=>array('Discount.id'=>$sl_vl['Health']['discount_id'])));\n\t\t\t\t\t\tif($fix_dicount['Discount']['type'] == 'Percent')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fix_discount = $fix_dicount['Discount']['amount'].'%';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($fix_dicount['Discount']['type'] == 'Rupees')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fix_discount = 'Rs. '.$fix_dicount['Discount']['amount'];\n\t\t\t\t\t\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\t$fix_discount = 'N/A';\n\t\t\t\t\t}\n\t\t\t\t\tif($sl_vl['Health']['discount_amount'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_amt = 'Rs. '.$sl_vl['Health']['discount_amount'];\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$disc_amt = 'N/A';\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($sl_vl['Health']['remark']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$refer_by = $sl_vl['Health']['remark'];\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$refer_by = 'N/A';\n\t\t\t\t\t}\n\t\t\t\t\t$booking_from = substr($sl_vl['Health']['flags'], 0, 1);\n\t\t\t\t\t$booking_mode = '';\n\t\t\t\t\t\n\t\t\t\t\tif($booking_from == \"1\")\n\t\t\t\t\t\t$booking_mode = 'Online';\n\t\t\t\t\tif($booking_from == \"2\")\n\t\t\t\t\t\t$booking_mode = 'Manual';\n\t\t\t\t\tif($booking_from == \"3\")\n\t\t\t\t\t\t$booking_mode = 'Excel';\n\t\t\t\t\tif($booking_from == \"4\")\n\t\t\t\t\t\t$booking_mode = 'API';\t\t\t\t\t\n\t\t\t\t\t$reports[$k]['SalesReport']['booking_mode'] = $booking_mode;\n\t\t\t\t\t$reports[$k]['SalesReport']['book_date'] = date('d-M-Y',strtotime($sl_vl['Health']['s_date']));\n\t\t\t\t\t$reports[$k]['SalesReport']['pcc_name'] = $pcc_name['Lab']['pcc_name'];\n $reports[$k]['SalesReport']['pcc_name1'] = $pcc_name1['Lab']['pcc_name'];\n\t\t\t\t\t$reports[$k]['SalesReport']['agent_name'] = $agent_name['Agent']['name'];\n\t\t\t\t\t$reports[$k]['SalesReport']['req_num'] = $requestNum['Billing']['order_id'];\n\t\t\t\t\t$reports[$k]['SalesReport']['test_ref_num'] = $sl_vl['Health']['ref_num'];\n\t\t\t\t\t$reports[$k]['SalesReport']['reference'] = $sl_vl['Health']['reference'];\n\t\t\t\t\t$reports[$k]['SalesReport']['payment_type'] = $sl_vl['Health']['payment_type'];\t\t\t\t\t\n\t\t\t\t\t$reports[$k]['SalesReport']['refer_by'] = $refer_by;\n\t\t\t\t\t$reports[$k]['SalesReport']['parameter_count'] = $parameter_count;\n\t\t\t\t\t$reports[$k]['SalesReport']['parameter_code'] = $implode_parameter_code;\n\t\t\t\t\t$reports[$k]['SalesReport']['parameter_name'] = $implode_parameter_name;\n\t\t\t\t\t$reports[$k]['SalesReport']['patient_name'] = strtoupper($sl_vl['Health']['name']);\n\t\t\t\t\t$reports[$k]['SalesReport']['patient_gender'] = $gender;\n\t\t\t\t\t$reports[$k]['SalesReport']['patient_age'] = $sl_vl['Health']['age'];\n\t\t\t\t\t//$yesterday = date(\"Y-m-d\");\n\t\t//$yesterday1 = date('Y-m-d', strtotime('-7 days')); \n\t\t//date(\"d-M-Y\", mktime(0, 0, 0, date(\"d\")-7, date(\"M\") , date(\"Y\")));\n\t\t//echo \"<pre>\"; print_r($yesterday); exit;\n\t\t//echo \"<pre>\"; print_r($yesterday1); exit;\n\t\t//$reports[$k]['SalesReport']['book_date'] = date('d-M-Y',strtotime($sl_vl['Health']['s_date']));\n\t\t//echo \"<pre>\"; print_r($reports[$k]['SalesReport']['book_date']); exit;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//if($admin_u_type == 'A')\n\t\t\t\t\t//{\n\t\t\t\t\t$reports[$k]['SalesReport']['patient_contact'] = $sl_vl['Health']['landline'];\n\t\t\t\t\t\n\t\t\t\t//\t} else {\n\t\t\t\t\t//\tif(($sl_vl['Health']['s_date']) > ($yesterday1))\n\t\t\t\t\t//\t{ \n\t\t\t\t\t//\t\t$reports[$k]['SalesReport']['patient_contact'] = $sl_vl['Health']['landline'];\n\t\t\t\t\t//\t}\n\t\t\t\t\t//\telse{\n\t\t\t\t\t\t//\t$reports[$k]['SalesReport']['patient_contact'] = '##########';\n\t\t\t\t\t//\t}\n\t\t\t\t\t\n\t\t\t\t\t//}\n\t\t\t\t\t\n\t\t\t\t\t$reports[$k]['SalesReport']['patient_email'] = $sl_vl['Health']['email'];\n\t\t\t\t\t$reports[$k]['SalesReport']['test_amount'] = 'Rs. '.$test_amt;\n\t\t\t\t\t$reports[$k]['SalesReport']['fix_discount'] = $fix_discount;\n\t\t\t\t\t$reports[$k]['SalesReport']['disc_amt'] = $disc_amt;\n $reports[$k]['SalesReport']['booked_by_user'] = $sl_vl['Health']['created_by_agent'];\n\t\t\t\t\tif($sl_vl['Health']['cancelled_status'] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t$reports[$k]['SalesReport']['net_payble'] = 'Rs. '.($sl_vl['Health']['received_amount']+$sl_vl['Health']['balance_amount']);\n\t\t\t\t\t$reports[$k]['SalesReport']['receive_payment'] = 'Rs. '.$sl_vl['Health']['received_amount'];\n\t\t\t\t\t$reports[$k]['SalesReport']['balance_payment'] = 'Rs. '.$sl_vl['Health']['balance_amount'];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$reports[$k]['SalesReport']['net_payble'] = ($sl_vl['Health']['received_amount']+$sl_vl['Health']['balance_amount']);\n\t\t\t\t\tif($sl_vl['Health']['received_amount']+$sl_vl['Health']['balance_amount'] == 0)\n\t\t\t\t\t\t$reports[$k]['SalesReport']['net_payble']=$sl_vl['Health']['total_amount'];\n\t\t\t\t\t$reports[$k]['SalesReport']['receive_payment'] = 'Rs. '.$sl_vl['Health']['received_amount'];\n\t\t\t\t\t$reports[$k]['SalesReport']['balance_payment'] = 'Rs. '.($reports[$k]['SalesReport']['net_payble']-$sl_vl['Health']['received_amount']);\n\t\t\t\t\t$reports[$k]['SalesReport']['net_payble'] = 'Rs. '.$reports[$k]['SalesReport']['net_payble'];\n\t\t\t\t\t}\n\t\t\t\t\t$k++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//echo \"<pre>\"; print_r($reports); exit;\n\t\t\t\t\n\t\t\t\t$total_records = $this->Health->find('all',array('conditions'=>$conditions));\n\t\t\t\t\n\t\t\t\t$net_pay = 0;\n\t\t\t\t$net_rec = 0;\n\t\t\t\t$net_bal = 0;\n\t\t\t\t$total_test = 0;\n\t\t\t\t\n\t\t\t\t$booked_by_total_req = array();\n\t\t\t\t\n\t\t\t\t$total_payable_req = array();\n\t\t\t\t\n\t\t\t\tforeach($total_records as $tr_ky => $tr_vl)\n\t\t\t\t{\n\t\t\t\t\t$tot_payable_amt=0;\n\t\t\t\t\tif(!is_array($booked_by_total_req[$tr_vl['Health']['created_by']]))\n\t\t\t\t\t\t$booked_by_total_req[$tr_vl['Health']['created_by']] = array();\n\t\t\t\t\t\n\t\t\t\t\tarray_push($booked_by_total_req[$tr_vl['Health']['created_by']],$tr_vl['Health']['id']);\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($tr_vl['Health']['test_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_test = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_1 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_1 => $v_1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_1))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_1++;\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\tif(!empty($tr_vl['Health']['profile_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_prf = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_2 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_2 => $v_2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_2))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_2++;\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\tif(!empty($tr_vl['Health']['offer_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_offer = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_3 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_3 => $v_3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_3))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_3++;\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\tif(!empty($tr_vl['Health']['package_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_pck = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_4 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_4 => $v_4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_4))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_4++;\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$total_test_now = ($cnt_1+$cnt_2+$cnt_3+$cnt_4);\n\t\t\t\t\t\n\t\t\t\t\t$total_test = ($total_test_now+$total_test);\n\t\t\t\t\t$net_rec = ($tr_vl['Health']['received_amount']+$net_rec);\n\t\t\t\t\t$net_bal_amt=0;\n\t\t\t\t\tif($tr_vl['Health']['cancelled_status'] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$net_bal = ($tr_vl['Health']['balance_amount']+$net_bal);\n\t\t\t\t\t\t$net_bal_amt=$tr_vl['Health']['balance_amount'];\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$net_pay_amt= ($tr_vl['Health']['received_amount']+$tr_vl['Health']['balance_amount']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($net_pay_amt == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$net_pay_amt=$tr_vl['Health']['total_amount'];\n\t\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$net_bal_amt=$net_pay_amt-$tr_vl['Health']['received_amount'];\n\t\t\t\t\t\t$net_bal = ($net_bal_amt+$net_bal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!is_array($total_payable_req[$tr_vl['Health']['created_by']]))\n\t\t\t\t\t\t$total_payable_req[$tr_vl['Health']['created_by']] = array();\n\t\t\t\t\t\n\t\t\t\t\tarray_push($total_payable_req[$tr_vl['Health']['created_by']],$tr_vl['Health']['received_amount']+$net_bal_amt);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$net_pay = ($net_rec+$net_bal);\n\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\t$booked_by_total = array();\n\t\t\t\t$total_payable_amount = array();\n\t\t\t\t$agent_total = array();\n\t\t\t\t$lab_list = $this->Lab->find('list',array('fields'=>array('id','pcc_name')));\n\t\t\t\t$agent_list = $this->Agent->find('list',array('fields'=>array('id','name')));\n\t\t\t\t\n\t\t\t\tarray_push($booked_by_total,array('Booked by','count'));\n\t\t\t\tarray_push($total_payable_amount,array('Assigned Lab','count'));\n\t\t\t\tarray_push($agent_total,array('Agent','count'));\n\t\t\t\t\n\t\t\t\tforeach($booked_by_total_req as $key=>$val)\n\t\t\t\t{\n\t\t\t\t\tarray_push($booked_by_total,array($lab_list[$key].\" - \".count($booked_by_total_req[$key]),count($booked_by_total_req[$key])));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($total_payable_req as $key=>$val)\n\t\t\t\t{\n\t\t\t\t\tarray_push($total_payable_amount,array($lab_list[$key].\" - Rs. \".array_sum($total_payable_req[$key]),array_sum($total_payable_req[$key])));\n\t\t\t\t}\n\t\t\t\t//print_R($total_payable_req);\n\t\t\t\t//print_R($total_payable_amount);\n\t\t\t\t//die;\n\t\t\t\t$this->set('booked_by_total',json_encode($booked_by_total));\n\t\t\t\t\n\t\t\t\t$this->set('total_payable_amount',json_encode($total_payable_amount));\n\t\t\t\t\n\t\t\t\t$this->set('total_records',count($total_records));\n\t\t\t\t$this->set('total_test',$total_test);\n\t\t\t\t$this->set('net_pay',$net_pay);\n\t\t\t\t$this->set('net_rec',$net_rec);\n\t\t\t\t$this->set('net_bal',$net_bal);\n\t\t\t\t$this->set('reports',$reports);\n\t\t\t\t$this->set('lab_id',$lab_id);\n $this->set('lab_id1',$lab_id1);\n\t\t\t\t$this->set('agent_id',$agent_id);\n\t\t\t\t$this->set('options',$options);\n //fetching user list\n $user_list = $this->Admin->find('list',array('fields'=>array('id','name')));\n $this->set('user_list',$user_list);\n\t\t\t}\n\t\t\t\n\t\t\tif($this->data['SalesReport']['set_option'] == 'export_excel')\n\t\t\t{\n\t\t\t\t$export_from_date = $this->data['SalesReport']['from_date']; \n\t\t\t\t$export_to_date = $this->data['SalesReport']['to_date'];\n\t\t\t\t$export_lab_id = $this->data['SalesReport']['pcc_list_id'];\n $export_lab_id1 = $this->data['SalesReport']['pcc_list_id1'];\n\t\t\t\t\n\t\t\t\t$export_agent_id = $this->data['SalesReport']['agent_list_id'];\n\t\t\t\t//fetching user list\n $user_list = $this->Admin->find('list',array('fields'=>array('id','name')));\n $this->set('user_list',$user_list);\n\t\t\t\t\n\t\t\t\tif(!empty($export_from_date) && $export_from_date != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.s_date >='] = date('Y-m-d',strtotime($export_from_date));\n\t\t\t\t}\n\t\t\t\tif(!empty($export_to_date) && $export_to_date != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.s_date <='] = date('Y-m-d',strtotime($export_to_date));\n\t\t\t\t}\n\t\t\t\tif(!empty($export_lab_id) && $export_lab_id != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.assigned_lab'] = $export_lab_id;\n\t\t\t\t}\n if(!empty($export_lab_id1) && $export_lab_id1 != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.created_by'] = $export_lab_id1;\n\t\t\t\t}\n\t\t\t\t/*if not service by same lab*/\n\t\t\t\t\n\t\t\t\tif($export_lab_id == $export_lab_id1 && !empty($export_lab_id) && !empty($export_lab_id1))\n\t\t\t\t{\n\t\t\t\t\tunset($conditions['Health.assigned_lab']);\n\t\t\t\t\tunset($conditions['Health.created_by']);\n\t\t\t\t\t$conditions['OR']['Health.assigned_lab'] = $export_lab_id;\n\t\t\t\t\t$conditions['OR']['Health.created_by'] = $export_lab_id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!empty($export_agent_id) && $export_agent_id != '')\n\t\t\t\t{\n\t\t\t\t\t$conditions['Health.agent_id'] = $export_agent_id;\n\t\t\t\t}\n\t\t\t\t$conditions['Health.status'] = 1;\n\t\t\t\t$find_request = $this->Health->find('all',array('conditions'=>$conditions));\n\t\t\t\t\n\t\t\t\t$reports = array();\n\t\t\t\t$k = 0;\n\t\t\t\t$s_no = 1;\n\t\t\t\tforeach($find_request as $sl_ky => $sl_vl)\n\t\t\t\t{\n\t\t\t\t\t$parameter_count = 0;\n\t\t\t\t\t$count_expl_test = 0;\n\t\t\t\t\t$count_expl_profile = 0;\n\t\t\t\t\t$count_expl_offer = 0;\n\t\t\t\t\t$count_expl_package= 0;\n\t\t\t\t\t\n\t\t\t\t\t$pcc_name = $this->Lab->find('first',array('conditions'=>array('Lab.id'=>$sl_vl['Health']['assigned_lab'])));\n $pcc_name1 = $this->Lab->find('first',array('conditions'=>array('Lab.id'=>$sl_vl['Health']['created_by'])));\n\t\t\t\t\t$agent_name = $this->Agent->find('first',array('conditions'=>array('Agent.id'=>$sl_vl['Health']['agent_id'])));\n\t\t\t\t\t$requestNum = $this->Billing->find('first',array('conditions'=>array('Billing.request_id'=>$sl_vl['Health']['id'])));\n\t\t\t\t\t$test_amt = 0;\n\t\t\t\t\t$test_code_arr = array();\n\t\t\t\t\t$test_name_arr = array();\n\t\t\t\t\tif(!empty($sl_vl['Health']['test_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_test = explode(',',$sl_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_test = 0; \n\t\t\t\t\t\tforeach($expl_test as $test_key => $test_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($test_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_test++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$test_code = $this->Test->find('first',array('conditions'=>array('Test.id'=>$test_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $test_code['Test']['testcode'];\n\t\t\t\t\t\t\t$test_name_arr[] = $test_code['Test']['test_parameter'];\n\t\t\t\t\t\t\t$test_amt = ($test_code['Test']['mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_test = $cnt_test;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif(!empty($sl_vl['Health']['profile_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_test = explode(',',$sl_vl['Health']['profile_id']);\n\t\t\t\t\t\t$cnt_test = 0; \n\t\t\t\t\t\tforeach($expl_test as $test_key => $test_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($test_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_test++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$test_code = $this->RequestTest->find('first',array('conditions'=>array('RequestTest.health_id'=>$sl_vl['Health']['id'],'RequestTest.test_id'=>$test_val)));\n\t\t\t\t\t\t\t$test_detail = $this->Test->find('first',array('conditions'=>array('Test.id'=>$test_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $test_detail['Test']['testcode'];\n\t\t\t\t\t\t\t$test_name_arr[] = $test_detail['Test']['test_parameter'];\n\t\t\t\t\t\t\t$test_amt = ($test_code['RequestTest']['mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_test = $cnt_test;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($sl_vl['Health']['offer_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_offer = explode(',',$sl_vl['Health']['offer_id']);\n\t\t\t\t\t\t$cnt_offr = 0;\n\t\t\t\t\t\tforeach($expl_offer as $offer_key => $offer_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($offer_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_offr++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$offer_code = $this->Banner->find('first',array('conditions'=>array('Banner.id'=>$offer_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $offer_code['Banner']['banner_code'];\n\t\t\t\t\t\t\t$test_name_arr[] = $offer_code['Banner']['banner_name'];\n\t\t\t\t\t\t\t$test_amt = ($offer_code['Banner']['banner_mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_offer = count($cnt_offr);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($sl_vl['Health']['package_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_package = explode(',',$sl_vl['Health']['package_id']);\n\t\t\t\t\t\t$cnt_pck = 0;\n\t\t\t\t\t\tforeach($expl_package as $package_key => $package_val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($package_val))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_pck++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$package_code = $this->Package->find('first',array('conditions'=>array('Package.id'=>$package_val)));\n\t\t\t\t\t\t\t$test_code_arr[] = $package_code['Package']['package_code'];\n\t\t\t\t\t\t\t$test_name_arr[] = $package_code['Package']['package_name'];\n\t\t\t\t\t\t\t$test_amt = ($package_code['Package']['package_mrp']+$test_amt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count_expl_package = $cnt_pck;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$parameter_count = ($count_expl_test+$count_expl_profile+$count_expl_offer+$count_expl_package);\n\t\t\t\t\t$implode_parameter_code = implode(', ',$test_code_arr);\n\t\t\t\t\t$implode_parameter_name = implode(', ',$test_name_arr);\n\t\t\t\n\t\t\t\t\tif($sl_vl['Health']['gender'] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$gender = 'M';\n\t\t\t\t\t}\n\t\t\t\t\tif($sl_vl['Health']['gender'] == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$gender = 'F';\n\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif($sl_vl['Health']['discount_id'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$fix_dicount = $this->Discount->find('first',array('conditions'=>array('Discount.id'=>$sl_vl['Health']['discount_id'])));\n\t\t\t\t\t\tif($fix_dicount['Discount']['type'] == 'Percent')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fix_discount = $fix_dicount['Discount']['amount'].'%';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($fix_dicount['Discount']['type'] == 'Rupees')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fix_discount = 'Rs. '.$fix_dicount['Discount']['amount'];\n\t\t\t\t\t\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\t$fix_discount = 'N/A';\n\t\t\t\t\t}\n\t\t\t\t\tif($sl_vl['Health']['discount_amount'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_amt = $sl_vl['Health']['discount_amount'];\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$disc_amt = 'N/A';\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($sl_vl['Health']['remark']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$refer_by = $sl_vl['Health']['remark'];\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$refer_by = 'N/A';\n\t\t\t\t\t}\n\t\t\t\t\t$booking_from = substr($sl_vl['Health']['flags'], 0, 1);\n\t\t\t\t\t$booking_mode = '';\n\t\t\t\t\t\n\t\t\t\t\tif($booking_from == \"1\")\n\t\t\t\t\t\t$booking_mode = 'Online';\n\t\t\t\t\tif($booking_from == \"2\")\n\t\t\t\t\t\t$booking_mode = 'Manual';\n\t\t\t\t\tif($booking_from == \"3\")\n\t\t\t\t\t\t$booking_mode = 'Excel';\n\t\t\t\t\tif($booking_from == \"4\")\n\t\t\t\t\t\t$booking_mode = 'API';\t\t\t\t\t\n\t\t\t\t\t$reports[$k]['s_no'] = $s_no;\n\t\t\t\t\t$reports[$k]['book_date'] = date('d-M-Y',strtotime($sl_vl['Health']['s_date']));\n\t\t\t\t\t$reports[$k]['req_num'] = $requestNum['Billing']['order_id'];\n\t\t\t\t\t$reports[$k]['booking_mode'] = $booking_mode;\n $reports[$k]['pcc_name1'] = !empty($pcc_name1['Lab']['pcc_name']) ? $pcc_name1['Lab']['pcc_name'] : 'NPL';\n $reports[$k]['pcc_name'] = !empty($pcc_name['Lab']['pcc_name']) ? $pcc_name['Lab']['pcc_name'] : 'NPL';\n $reports[$k]['medical_reference_number'] = $sl_vl['Health']['medical_reference_number'];\n\t\t\t\t\t$reports[$k]['booked_by_user'] = isset($user_list[$sl_vl['Health']['created_by_agent']])?$user_list[$sl_vl['Health']['created_by_agent']]:'-';\n $reports[$k]['patient_name'] = strtoupper($sl_vl['Health']['name']);\n\t\t\t\t\t$reports[$k]['patient_gender'] = $gender.'/'.$sl_vl['Health']['age'];\n\t\t\t\t\t//$reports[$k]['patient_contact'] = $sl_vl['Health']['landline'];\n\t\t\t\t\t$reports[$k]['patient_contact'] = $this->Utility->show_mobile_hide($sl_vl['Health']['landline'],$sl_vl['Health']['s_date']);\n\t\t\t\t\t$reports[$k]['patient_email'] = $this->Utility->show_mobile_hide($sl_vl['Health']['email'],$sl_vl['Health']['s_date']);\n\t\t\t\t\t$reports[$k]['refer_by'] = $refer_by;\n\t\t\t\t\t$reports[$k]['agent_name'] = $agent_name['Agent']['name'];\n\t\t\t\t\t$reports[$k]['parameter_count'] = $parameter_count;\n\t\t\t\t\t$reports[$k]['parameter_name'] = $implode_parameter_name;\n\t\t\t\t\t$reports[$k]['parameter_code'] = $implode_parameter_code;\n\t\t\t\t\t$reports[$k]['test_amount'] = $test_amt;\n\t\t\t\t\t$reports[$k]['fix_discount'] = $fix_discount;\n\t\t\t\t\t$reports[$k]['disc_amt'] = $disc_amt;\n\t\t\t\t\t\n\t\t\t\t\tif($sl_vl['Health']['cancelled_status'] == 1)\n\t\t\t\t\t{ \n\t\t\t\t\t$reports[$k]['net_payble'] = ($sl_vl['Health']['received_amount']+$sl_vl['Health']['balance_amount']);\n\t\t\t\t\t$reports[$k]['receive_payment'] = $sl_vl['Health']['received_amount'];\n\t\t\t\t\t$reports[$k]['balance_payment'] = $sl_vl['Health']['balance_amount'];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$reports[$k]['net_payble'] = ($sl_vl['Health']['received_amount']+$sl_vl['Health']['balance_amount']);\n\t\t\t\t\tif($sl_vl['Health']['received_amount']+$sl_vl['Health']['balance_amount'] == 0)\n\t\t\t\t\t\t$reports[$k]['net_payble']=$sl_vl['Health']['total_amount'];\n\t\t\t\t\t$reports[$k]['receive_payment'] = $sl_vl['Health']['received_amount'];\n\t\t\t\t\t$reports[$k]['balance_payment'] = $reports[$k]['net_payble']-$sl_vl['Health']['received_amount'];\n\t\t\t\t\t}\n\t\t\t\t\t$reports[$k]['payment_type'] = $p_type[$sl_vl['Health']['payment_type']];\n\t\t\t\t\t$reports[$k]['test_ref_num'] = $sl_vl['Health']['ref_num'];\n\t\t\t\t\t$reports[$k]['reference'] = $sl_vl['Health']['reference'];\n\t\t\t\t\t$reports[$k]['request_status']=\"\";\n\t\t\t\t\tif($sl_vl['Health']['requ_status'] == 4)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Phlebo Assigned\";\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 5)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Sent to Lab\";\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 6)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Report\";\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 7)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Partial Report\";\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 8)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Test Cancelled\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 10)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Sample Collected\";\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 12)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Partial Sent to Lab\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 14)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Reg. in LIS\";\t\n\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 11)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Sample Rejected\";\t\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 13)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Rescheduled\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 15)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Api New Booking\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 16)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Specimen Drawn\";\n\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 9)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Closed\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 0)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"New Booking\";\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 1)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Slot Not Available\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 2)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Slot Blocked\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 3)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Follow Up\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 17)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Partial Closed\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 18)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Booking Confirmed\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 19)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Phlebo Confirmed\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 20)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Phlebo Tracking\";\n\t\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 21)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Specimen On Hold\";\n\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 22)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Cancellation Requested\";\n\t\t\t\t\t\n\t\t\t\t\telse if($sl_vl['Health']['requ_status'] == 23)\n\t\t\t\t\t\t$reports[$k]['request_status']=\"Rejection Requested\";\n\t\t\t\t\t\n\t\t\t\t\telse \n\t\t\t\t\t\t$reports[$k]['request_status']=\"Pending\";\n\t\t\t\t\t$s_no++;\n\t\t\t\t\t$k++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$total_records = $this->Health->find('all',array('conditions'=>$conditions));\n\t\t\t\t$net_pay = 0;\n\t\t\t\t$net_rec = 0;\n\t\t\t\t$net_bal = 0;\n\t\t\t\t$total_test = 0;\n\t\t\t\tforeach($total_records as $tr_ky => $tr_vl)\n\t\t\t\t{\n\t\t\t\t\tif(!empty($tr_vl['Health']['test_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_test = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_1 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_1 => $v_1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_1))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_1++;\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\tif(!empty($tr_vl['Health']['profile_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_prf = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_2 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_2 => $v_2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_2))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_2++;\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\tif(!empty($tr_vl['Health']['offer_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_offer = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_3 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_3 => $v_3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_3))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_3++;\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\tif(!empty($tr_vl['Health']['package_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$expl_pck = explode(',',$tr_vl['Health']['test_id']);\n\t\t\t\t\t\t$cnt_4 = 0;\n\t\t\t\t\t\tforeach($expl_test as $k_4 => $v_4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!empty($v_4))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt_4++;\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$total_test_now = ($cnt_1+$cnt_2+$cnt_3+$cnt_4);\n\t\t\t\t\t\n\t\t\t\t\t$total_test = ($total_test_now+$total_test);\n\t\t\t\t\t\n\t\t\t\t\t$net_rec = ($tr_vl['Health']['received_amount']+$net_rec);\n\t\t\t\t\t//$net_bal = ($tr_vl['Health']['balance_amount']+$net_bal);\n\t\t\t\t\tif($tr_vl['Health']['cancelled_status'] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$net_bal = ($tr_vl['Health']['balance_amount']+$net_bal);\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$net_pay_amt= ($tr_vl['Health']['received_amount']+$tr_vl['Health']['balance_amount']);\n\t\t\t\t\t\tif($net_pay_amt == 0)\n\t\t\t\t\t\t\t$net_pay_amt=$tr_vl['Health']['total_amount'];\n\t\t\t\t\t\t$net_bal_amt=$net_pay_amt-$tr_vl['Health']['received_amount'];\n\t\t\t\t\t\t$net_bal = ($net_bal_amt+$net_bal);\n\t\t\t\t\t}\n\t\t\t\t\t$net_pay = ($net_rec+$net_bal);\n\t\t\t\t}\n\t\t\t\t$total_no_records = count($total_records);\n\t\t\t\t$total_no_test = $total_test;\n\t\t\t\t$total_net_pay = $net_pay;\n\t\t\t\t$total_net_rec = $net_rec;\n\t\t\t\t$total_net_bal = $net_bal;\n\t\t\t\theader('Content-Type: text/csv; charset=utf-8');\n\t\t\t\theader('Content-Disposition: attachment; filename=sales_report.csv');\n\t\t\t\t$output = fopen('php://output', 'w');\n\t\t\t\tfputcsv($output, array('Total No. of Requests', 'Total No. of Tests', 'Total Net Payable','Total Received Amount', 'Total Balance Due'));\n\t\t\t\tfputcsv($output, array($total_no_records,$total_no_test,$total_net_pay,$total_net_rec,$total_net_bal));\n\t\t\t\tfputcsv($output, array());\n\t\t\t\t\n\t\t\t\tfputcsv($output, array('S.No.', 'Date', 'ReqNo','Booking From','Booked By PCC','Service By PCC','Medical Reference Number','Booked By User' ,'Patient Name' ,'Gender/Age', 'Phone No.', 'Email','Reffered By','Agent Name','No. of Test', 'Test Names','Test Codes','Test Amount(Rs)', 'Discount%','Discount Amount(Rs)','Net Payble(Rs)','Payment Received(Rs)','Balance Due(Rs)','Payment Type','Lab Refrence No.','Reference','Request Status'));\n\t\t\t\tforeach ($reports as $keys => $values) \n\t\t\t\t{\n\t\t\t\t\tif(($values['fix_discount'] != 'N/A') && ($values['fix_discount'] == '100%'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$values['test_amount'] = $values['test_amount'];\n\t\t\t\t\t\t$values['fix_discount'] = $values['fix_discount'];\n\t\t\t\t\t\t$values['disc_amt'] = $values['test_amount'];\n\t\t\t\t\t\t$values['net_payble'] = $values['net_payble'];\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$values['test_amount'] = $values['test_amount'];\n\t\t\t\t\t\t$values['fix_discount'] = $values['fix_discount'];\n\t\t\t\t\t\t$values['disc_amt'] = $values['disc_amt'];\n\t\t\t\t\t\t$values['net_payble'] = $values['net_payble'];\n\t\t\t\t\t}\n\t\t\t\t\tfputcsv($output, $values);\n\t\t\t\t}\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "40fad8224f68413feb61db1634681312", "score": "0.58693546", "text": "protected function setupLayout()\r\n\t{\r\n\t\tif ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e1ccf785b3ee86e1286b9e0dd561f798", "score": "0.58560836", "text": "public function showAction()\n { \n $report = $this->_helper->db->findById();\n $reportFiles = $report->getFiles();\n $formats = reports_get_output_formats();\n $this->view->formats = $formats;\n $this->view->report = $report;\n $this->view->reportFiles = $reportFiles;\n }", "title": "" }, { "docid": "f905b9f6d6901ba35b1d4e9c9453591f", "score": "0.5855967", "text": "public function getLayout()\n {\n return $this->layout;\n }", "title": "" }, { "docid": "24b6a69d85fdbe1fcff3bfa6ca410316", "score": "0.5848397", "text": "public function indexAction()\n\t{\n\t\t$this->view->title = \"Survey Reports\";\n\t}", "title": "" }, { "docid": "b3b86a12bfe209d999366b0d234c1808", "score": "0.5848329", "text": "public function setLayout($layout) {\n\t\tif (file_exists(__APP_PATH.DS.'layout'.DS.$layout.'.phtml')) {\n\t\t\t$this->cache->layout = $layout;\n\t\t\treturn $this;\n\t\t}\n // Affiche le template par defaut\n if ($layout == 'default') {\n\t\t throw new Exception(\"Layout not found\", 1);\n }\n $this->setLayout('default');\n\t}", "title": "" }, { "docid": "4c2492a60425f98799e9fbd08962a818", "score": "0.5844593", "text": "public function index()\n\t{\n\t\treturn view('report/main');\n\t}", "title": "" }, { "docid": "9f90ad3af4cab34f9bcef899dda27887", "score": "0.5842797", "text": "public function getLayoutTemplate()\n {\n return $this->layoutTemplate;\n }", "title": "" }, { "docid": "f12b375fcc7f6357c66e35f4d883ea1e", "score": "0.58364326", "text": "public function index()\n {\n $report = null;\n return view('prevMain.report', compact('report'));\n }", "title": "" }, { "docid": "e5f5ff86ab3b5132041d6586117e505f", "score": "0.58254564", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.5808986", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "89dc06a1830e939e2a2b5d50b11925cb", "score": "0.57974315", "text": "protected function makeViewLayout()\n {\n new MakeLayout($this, $this->files);\n }", "title": "" }, { "docid": "bbdc69001447e94c22f484d6e7de5a85", "score": "0.579052", "text": "function admin_index(){\r\r\n\t\t$this->layout='backend/backend';\r\r\n\t\t$this->set(\"title_for_layout\",SETTING);\r\r\n\t}", "title": "" }, { "docid": "9d6c6ce1d8dd486f584abb0765b1db44", "score": "0.578984", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout, $this->data)->nest(\"authArea\", \"layouts.Barometer.Elements.authArea\", $this->data)->nest(\"scripts\", \"Barometer.Elements.scripts\");\n\t\t}\n\t}", "title": "" }, { "docid": "1118aff1362b94fb0287d34771210fb2", "score": "0.5786129", "text": "public function generate()\r\n {\r\n $loader = new ContentLoader($this->_viewVariables);\r\n $loader->initContent($this->_contentViewPath);\r\n $this->_layout = $loader->initLayout($this->_layoutPath);\r\n echo $this->_layout;\r\n }", "title": "" }, { "docid": "1bb23ae1ca577478207803aca2bf778e", "score": "0.57821226", "text": "public function getView()\n {\n $data = $this->getDataView();\n return Utils::view('report/main')->with($data);\n }", "title": "" }, { "docid": "5fbe4cd8c329b1f826ae79a7a2dccbc6", "score": "0.5776892", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n $this->layout->title = Config::get('blog.name');\n $this->layout->tagline = Config::get('blog.tagline');\n\n if(\\Auth::check()) {\n $this->layout->user = \\Auth::getUser();\n }\n }\n }", "title": "" }, { "docid": "ffce370720781695d67a7b18f1e4e101", "score": "0.57754827", "text": "public function setLayout($layout=\"\"){\n\t\t$this->layout = $layout;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2007756ec7944df148bda31f61a761ab", "score": "0.57710975", "text": "public function getLayout() {\n\t\treturn $this->_layout;\n\t}", "title": "" }, { "docid": "e64a5f78e7fe84ad7993f7a20cea1126", "score": "0.57705784", "text": "public function prepare_layout($layout_script = NULL)\n {\n $layout = parent::prepare_layout($layout_script);\n return $layout;\n }", "title": "" }, { "docid": "0d9b9e4cf155adee16ba6c5b7bc69860", "score": "0.5760612", "text": "function render() {\n\t\t$this->setJs('owa.base', 'base/js/includes/jquery/flot_v0.7/flot.min.js'); \n\t\t\n\t\t// Sets the template php file you want to control the appearance of your report\n\t\t// Template path should be: example/templates/exampleDashboard.php\n\t\t$this->body->setTemplateFile('example','exampleDashboard.php');\n\t\t\n\t\t// $this->get gets the variables set by the report controller class\n\t\t// $this->body->set sets the variables you want your template to be able to access\n\t\t$this->body->set('users', $this->get('users'));\n\t\t$this->body->set('currentUser', $this->get('currentUser'));\n\t\t$this->body->set('actions', $this->get('actions'));\n\t\t$this->body->set('actionsByUser',$this->get('actionsByUser'));\n\t\t\n\t}", "title": "" }, { "docid": "8d1df9e796776745f1a03ea5afc6ee72", "score": "0.57598996", "text": "function defaultTemplate() {\n//\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n//\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n//\t\t$this->api->pathfinder->addLocation($addon_location,array(\n//\t\t\t'js'=>'templates/js',\n//\t\t\t'css'=>'templates/css',\n// 'template'=>'templates',\n//\t\t))->setParent($l);\n\n return array('view/draw');\n }", "title": "" }, { "docid": "2f83deaa9244da062b16288a55cd30ab", "score": "0.57594144", "text": "protected function setupLayout()\n {\n $type_page=Post::where('status',1)->where('type_id',4)->where('parent',0)->lists('name', 'slug');\n $settings = Setting::lists('value', 'name');\n\n View::share([\n 'settings'=>$settings,\n 'type_page'=>$type_page,\n ]);\n }", "title": "" }, { "docid": "b0a042adc6e028aab4d40a62601e2af3", "score": "0.5746521", "text": "protected function getLayout()\n {\n return $this->layout;\n }", "title": "" }, { "docid": "f1be08c31aa55a21d07f6c3a4b52fb00", "score": "0.57463044", "text": "protected function getLayout() {\n\t\treturn $this->getFrontcontroller()->getResource('layout');\n\t}", "title": "" } ]
5c448b5e047f81728bf872dc91b0c5b5
function to change value of limit and page
[ { "docid": "ab2b5308bba935bf47614b42197f0e1d", "score": "0.0", "text": "public function changeData($l = 10,$p = 1)\r\n\t {\r\n\t\t$this->page = $p;\r\n\t\t$this->limit = $l;\r\n\t\t$this->offset = ($this->page - 1) * ($this->limit);\r\n\t }", "title": "" } ]
[ { "docid": "3f022bd1307d5fdcec0b50e11a49f100", "score": "0.76847184", "text": "function test($pageNum,$limit) {\n\n }", "title": "" }, { "docid": "03df06aadee2bf1df367efa702002c12", "score": "0.76737607", "text": "function set_limit(){\n\t\t$this->once_page_limit('pages');\n\t\treturn $this->once_response();\n\t}", "title": "" }, { "docid": "2c0668f605d8c47872abd984c3bdbe5b", "score": "0.76182103", "text": "public function paginate($page, $limit);", "title": "" }, { "docid": "e5d87b1c09b6ed66439734a268e8098d", "score": "0.7575449", "text": "public function paginate($limit = 15);", "title": "" }, { "docid": "b97d4ddddc725c77b0281a72b93559d5", "score": "0.7501268", "text": "function setResultsPerPage($results_per_page) {}", "title": "" }, { "docid": "c62c72cd5a080b4a2f29a2ec4f8a8013", "score": "0.7489644", "text": "function limits($page) {\n // set up the paging buttons \n\t$page = isset($_GET['p']) ? $_GET['p'] : 1;\n\t$perPage = 50; \n\t$start = (($page-1)*$perPage);\n\t$display_start = (($page-1)*$perPage)+1;\n\t$end = $perPage * $page;\n\t$limit_clause = \" LIMIT $start,$end \";\n\treturn (\" LIMIT $start,$end \");\n}", "title": "" }, { "docid": "c10f8562b192de5c4f9a5968434ec63b", "score": "0.74680644", "text": "function setPageLimit($tsLimit, $start = false, $tsMax = 0){\n\t\tif($start == false)\n\t\t$tsStart = empty($_GET['page']) ? 0 : (int) (($_GET['pagina'] - 1) * $tsLimit);\n\t\telse {\n \t\t$tsStart = (int) $_GET['s'];\n $continue = $this->setMaximos($tsLimit, $tsMax);\n if($continue == true) $tsStart = 0;\n }\n\t\t//\n\t\treturn $tsStart.','.$tsLimit;\n\t}", "title": "" }, { "docid": "dc2fdc27e7aae26eec175faaae9f1645", "score": "0.7423522", "text": "function _setPaging()\n\t{\n\t\tif (!is_numeric($this->selectedPageIndex))\n\t\t\t$this->selectedPageIndex = 1;\n\t\t\t\n\t\t// if try to access a page greater that pagesCount, set the last page\n\t\tif ($this->selectedPageIndex >= $this->pagesCount)\n\t\t\t$this->selectedPageIndex = ($this->pagesCount > 1)?$this->pagesCount:1;\n\t\t\n\t\t$this->startLimit = ($this->selectedPageIndex - 1)* $this->itemsPerPage;\n\t\t$this->limit = $this->startLimit.','.$this->itemsPerPage;\n\t}", "title": "" }, { "docid": "36f31408963e851457d66a37bfe2353b", "score": "0.73766196", "text": "public function setLimit($limit = 0, $offset = 0);", "title": "" }, { "docid": "fd542610515d8f3fdbb5eef7979aa50f", "score": "0.73523825", "text": "function setLimit($limit){\r\n\t\t$this->limit = $limit;\r\n\t}", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.73396695", "text": "public function setLimit($limit);", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.73396695", "text": "public function setLimit($limit);", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.73396695", "text": "public function setLimit($limit);", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.73396695", "text": "public function setLimit($limit);", "title": "" }, { "docid": "c771032b0e448791b5f3d49ffd551300", "score": "0.72992015", "text": "function limit($val){\n $this->_limit=$val;\n }", "title": "" }, { "docid": "40673ff8730b60a6342d0e6c73a39855", "score": "0.726656", "text": "function curPage($val){\n $val=$val-1;\n\n /* memastikan bahwa nilai val paling\n kecil adalah 0 */\n if($val<0){\n $val=0;\n }\n $this->_offset=\n ($val) * $this->_limit;\n }", "title": "" }, { "docid": "33f7508f54981db234092d9646f00bc9", "score": "0.72147214", "text": "function limit($value){$this->limit = intval($value);}", "title": "" }, { "docid": "7021be9c2bc13397425f7ff779c69947", "score": "0.72051483", "text": "public function perPage();", "title": "" }, { "docid": "e4ce860a3c1fb2aadc44889eea1fe137", "score": "0.7198778", "text": "public function setLimit($limit) {\n$this->limit = $limit;\n}", "title": "" }, { "docid": "d74820abd4a53514e266924b86431a2a", "score": "0.7190374", "text": "public function pager($limit = 10, $element = NULL);", "title": "" }, { "docid": "0b329f9203feeb801b029f3d023c54c4", "score": "0.7123863", "text": "public function setLimit($limit){\n $this -> addParam('rows', $limit);\n }", "title": "" }, { "docid": "a7d25cebb0617a1d7fadfc13e7c3e43b", "score": "0.7078352", "text": "protected function getPerPage(): int\n {\n return 10;\n }", "title": "" }, { "docid": "aed2e6150e3c523fe2115fbfe2b78b82", "score": "0.7072784", "text": "public function setLimit($int){\n $this->LIMIT = $int;\n }", "title": "" }, { "docid": "2d88fa62b0e0f73235aedea85b1d67b0", "score": "0.7060974", "text": "public function setPageLimit($limit)\n {\n $this->settings['page_limit'] = $limit;\n }", "title": "" }, { "docid": "f81feeb3c683f09c236fbc07a942d4eb", "score": "0.70527065", "text": "public function changeLimit($limit) {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "f81feeb3c683f09c236fbc07a942d4eb", "score": "0.70527065", "text": "public function changeLimit($limit) {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "1038788dee1bd8477526fe3169da1542", "score": "0.70477724", "text": "public function setLimit(?int $limit): self ;", "title": "" }, { "docid": "0664a0f480bcfd97e6b8b2b56b4f8e6b", "score": "0.7017094", "text": "public function setPageOffset()\n {\n if( isset($_GET['page'] ) ) {\n $this->page = $_GET['page'] - 1;\n $this->offset = $this->limit * $this->page ;\n if($_GET['page']==$this->total_pages){\n $this->next_page=$_GET['page'];\n }else{\n $this->next_page=$_GET['page']+1;\n }\n if($_GET['page']==1){\n $this->previous_page=$_GET['page'];\n }else{\n $this->previous_page=$_GET['page']-1;\n }\n }else {\n $this->page = 0;\n $this->offset = 0;\n }\n }", "title": "" }, { "docid": "6910d2fc173983110cf87d20ef4508ef", "score": "0.7006731", "text": "public function setLimit($v);", "title": "" }, { "docid": "2248581373d5f8eef88bfe7f8931b1ce", "score": "0.7002318", "text": "public function getPerPage(): int;", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.69999844", "text": "public function limit($limit);", "title": "" }, { "docid": "6a02bdfbed76b1c40545fad7f644cff6", "score": "0.69994754", "text": "public function limitByPage(int $limit, int $page = 1): self;", "title": "" }, { "docid": "f6d832dbbf2c6dea160fe3b005aad1b7", "score": "0.6981179", "text": "public function limit($limit)\n {\n }", "title": "" }, { "docid": "2c77695360492159ba72c106632b3eb9", "score": "0.69807476", "text": "public function set_page($n_page = 1, $n_limit = 20) {\n //Check Parameter Type correct or not\n if ( ! is_numeric($n_page) OR ! is_numeric($n_limit))\n return FALSE;\n \n //Modify Type to integer\n $n_page = intval($n_page);\n $n_limit = intval($n_limit);\n \n $this->cimongo->limit($n_limit, ($n_page - 1) * $n_limit);\n }", "title": "" }, { "docid": "0b1c4870535c5e161e6ca689238bdbe0", "score": "0.6974361", "text": "public function setLimit($limit)\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "1ca98670252e24ae3dd9e9b5c6ff6470", "score": "0.69518614", "text": "public function pagination($itemCountPerPage,$data)\n {\n \n }", "title": "" }, { "docid": "2f47ea62582077c20ce1b364e81fd435", "score": "0.69367015", "text": "private function setPagination()\n {\n $this->setFirst();\n $this->setLast();\n $this->setNext();\n $this->setPrev();\n $this->setLinks();\n }", "title": "" }, { "docid": "107aa761b6e6698769fa60659dc2b0cc", "score": "0.6899957", "text": "public function getPerPage();", "title": "" }, { "docid": "c5d4d210ba24e42f4b93fb8199088c8d", "score": "0.6896073", "text": "protected function setPaginate()\n {\n $paginate = $this->findQueryByMethod('limit');\n if ($paginate) {\n return;\n }\n\n $this->queries = $this->queries->reject(function ($query) {\n return $query['method'] == 'limit';\n });\n\n if (!$this->usePaginate) {\n return;\n }\n $query = [\n 'method' => 'limit',\n 'arguments' => $this->resolvePerPage(),\n ];\n\n $this->queries->push($query);\n\n }", "title": "" }, { "docid": "cf69040b1f9e5073394019bfb7742ab7", "score": "0.68906045", "text": "function limit($limit = null);", "title": "" }, { "docid": "026e9e124c95f0187133602bbdbfa1d3", "score": "0.6883112", "text": "function getPaginas($num){\n $this->rows_per_page = $num;\n }", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.68789005", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.68789005", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.68789005", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.68789005", "text": "public function getLimit();", "title": "" }, { "docid": "72aa198ae46f789e8d7fa7c5f0aaf91f", "score": "0.6878127", "text": "function paginateNew ($table, $limit, $href, $where, $page, $query,$paginate) {\n\n\n\tif(empty($page)){ // Checks if the $page variable is empty (not set)\n\t\t$page = 1; // If it is empty, we're on page 1\n\t}\n\t$limitvalue = $page * $limit - ($limit);\n\n\t// Ex: (2 * 25) - 25 = 25 <- data starts at 25\n\n\t$query_count = \"SELECT count($query) as a FROM $table\";\n\t\n\n\t//echo $query_count.\"<br>\";\n\n\t$result_count = mysql_query($query_count);\n\t$numofrows=mysql_num_rows($result_count);\n\tif ($numofrows && $numofrows>0) {\n\t$totalrows = mysql_result($result_count,0,\"a\");\n\n\t$numofpages = $totalrows / $limit;\n\n\n\n\t$totalpages=$numofpages;\n\t$newvalue=intval($totalpages);\n\t$newvalue++;\n\n\t/* We divide our total amount of rows (for example 102) by the limit (25). This\n\n\twill yield 4.08, which we can round down to 4. In the next few lines, we'll\n\tcreate 4 pages, and then check to see if we have extra rows remaining for a 5th\n\tpage. */\n\tif ($paginate!=\"\")\n\t$querystring=$paginate.\"&Submit=Search\";\n\t\n\t\n\t$page1=$page+1;\n\tif ($page!=0 && $page!=1) {\n\t\techo(\"<a href=\\\"$href&page=1&$querystring\\\">« </a> \");\n\t} else {\n\t\techo(\"<a href='#'>«</a>\");\n\t}\n\t//echo \"page:$page :$numofpages:\";\n\tif ($page<=($numofpages-10)) {\n\t\t//\techo $numofpages.\"<br>\";\n\t\tif ($numofpages>10) {\n\t\t\t$numofpages=10+$page;\n\t\t}\n\n\n\t\tfor($i = $page1; $i <= $numofpages; $i++) {\n\t\t\t/* This for loop will add 1 to $i at the end of each pass until $i is greater\n\t\t\tthan $numofpages (4.08). */\n\n\t\t\tif($i == $page){\n\t\t\t\techo($i.\" \");\n\t\t\t}else{\n\t\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t\t}\n\t\t\t/* This if statement will not make the current page number available in\n\t\t\tlink form. It will, however, make all other pages available in link form. */\n\t\t} // This ends the for loop\n\t}else {\n\t\tif (($numofpages-10)>10) {\n\t\t\tfor($i = ($newvalue-10); $i <= $numofpages; $i++) {\n\t\t\t\t/* This for loop will add 1 to $i at the end of each pass until $i is greater\n\t\t\t\tthan $numofpages (4.08). */\n\n\t\t\t\tif($i == $page){\n\t\t\t\t\techo($i.\" \");\n\t\t\t\t}else{\n\t\t\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t\t\t}\n\t\t\t\t/* This if statement will not make the current page number available in\n\t\t\t\tlink form. It will, however, make all other pages available in link form. */\n\t\t\t} // This ends the for loop\n\t\t} else {\n\t\t\tfor($i = 1; $i <= $numofpages; $i++) {\n\t\t\t\t/* This for loop will add 1 to $i at the end of each pass until $i is greater\n\t\t\t\tthan $numofpages (4.08). */\n\n\t\t\t\tif($i == $page){\n\t\t\t\t\techo($i.\" \");\n\t\t\t\t}else{\n\t\t\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t\t\t}\n\t\t\t\t/* This if statement will not make the current page number available in\n\t\t\t\tlink form. It will, however, make all other pages available in link form. */\n\t\t\t}\n\t\t}\n\t}\n\tif(($totalrows % $limit) != 0){\n\t\t//echo $totalpages;\n\n\n\t\t/* The above statement is the key to knowing if there are remainders, and it's\n\t\tall because of the %. In PHP, C++, and other languages, the % is known as a\n\t\tModulus. It returns the remainder after dividing two numbers. If there is no\n\t\tremainder, it returns zero. In our example, it will return 0.8 */\n\n\t\tif($i == $page){\n\t\t\techo($i.\" \");\n\t\t}else{\n\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t}\n\n\t\tif ($page!=$newvalue) {\n\t\t\techo(\"<a href=\\\"$href&page=$newvalue&$querystring\\\"> >> Last </a> \");\n\t\t} else {\n\t\t\techo(\">> Last \");\n\t\t}\n\n\t\t/* This is the exact statement that turns pages into link form that is used\n\n\t\tabove */\n\t} else {\n\t\tif ($page!=$newvalue) {\n\t\t\techo(\"<a href=\\\"$href&page=$totalpages&$querystring\\\"> >> Last </a> \");\n\t\t} else {\n\t\t\techo(\">> Last \");\n\t\t}\n\t}\n\treturn $limitvalue;\n\t} else {\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "d58c9016b92a8e07464582a4409edda3", "score": "0.68735105", "text": "public function setLimit($limit)\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "d58c9016b92a8e07464582a4409edda3", "score": "0.68735105", "text": "public function setLimit($limit)\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "d58c9016b92a8e07464582a4409edda3", "score": "0.68735105", "text": "public function setLimit($limit)\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "5697ff05da6dfa1982e13161eda767d7", "score": "0.6862267", "text": "public function setPage($page, $rowLimit)\n {\n $this->page = $page;\n $this->rowLimit = $rowLimit;\n }", "title": "" }, { "docid": "ce7fec277ecf973aff1d4e5d0c592073", "score": "0.6852264", "text": "public function paginationLimit($limit) {\n\t\t$this->paginationLimit = $limit;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c164d5ef9212022dff1017172272d73b", "score": "0.68466413", "text": "public function setResultsPerPage($num);", "title": "" }, { "docid": "06db47363855c662274011e1094355ce", "score": "0.68449664", "text": "function records_limit() {\n\n\t// pracuje spolecne se strankovanim, urcuje pocet zobrazenych zaznamu\n\t\n\tif(empty($_GET['p'])) $p = 1;\n\telse $p = $_GET['p'];\n\t\n\t$limit = \"LIMIT \".($p - 1) * $_SESSION['products_on_page'].\",\".$_SESSION['products_on_page'].\"\";\n\t\n\treturn $limit;\n\n}", "title": "" }, { "docid": "7d97252c13c898cfa880a101d5685ad8", "score": "0.6825299", "text": "function paginatewhere ($table, $limit, $href, $where, $page, $nextpre = False,$paginate='', $sel='*') {\n\n\t$querystring=\"\";\n\n\tif(empty($page)){ // Checks if the $page variable is empty (not set)\n\t\t$page = 1; // If it is empty, we're on page 1\n\t}\n\t$limitvalue = $page * $limit - ($limit);\n\n\t// Ex: (2 * 25) - 25 = 25 <- data starts at 25\n\n\t$query_count = \"SELECT count($sel) as a FROM $table\";\n\tif ($where) $query_count.= \" where $where\";\n\n\t//echo $query_count.\"<br>\";\n\n\t$result_count = mysql_query($query_count);\n\t$numofrows=mysql_num_rows($result_count);\n\tif ($numofrows && $numofrows>0) {\n\t$totalrows = mysql_result($result_count,0,\"a\");\n\n\t$numofpages = $totalrows / $limit;\n\n\n\n\t$totalpages=$numofpages;\n\t$newvalue=intval($totalpages);\n\t$newvalue++;\n\n\t/* We divide our total amount of rows (for example 102) by the limit (25). This\n\n\twill yield 4.08, which we can round down to 4. In the next few lines, we'll\n\tcreate 4 pages, and then check to see if we have extra rows remaining for a 5th\n\tpage. */\n\tif ($paginate!=\"\")\n\t$querystring=$paginate.\"&Submit=Search\";\n\t\n\t\n\t$page1=$page+1;\n\tif ($page!=0 && $page!=1) {\n\t\techo(\"<a href=\\\"$href&page=1&$querystring\\\">«</a> \");\n\t} else {\n\t\techo(\"<a href='#'>«</a>\");\n\t}\n\t//echo \"page:$page :$numofpages:\";\n\tif ($page<=($numofpages-10)) {\n\t\t//\techo $numofpages.\"<br>\";\n\t\tif ($numofpages>10) {\n\t\t\t$numofpages=10+$page;\n\t\t}\n\n\n\t\tfor($i = $page1; $i <= $numofpages; $i++) {\n\t\t\t/* This for loop will add 1 to $i at the end of each pass until $i is greater\n\t\t\tthan $numofpages (4.08). */\n\n\t\t\tif($i == $page){\n\t\t\t\techo($i.\" \");\n\t\t\t}else{\n\t\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t\t}\n\t\t\t/* This if statement will not make the current page number available in\n\t\t\tlink form. It will, however, make all other pages available in link form. */\n\t\t} // This ends the for loop\n\t}else {\n\t\tif (($numofpages-10)>10) {\n\t\t\tfor($i = ($newvalue-10); $i <= $numofpages; $i++) {\n\t\t\t\t/* This for loop will add 1 to $i at the end of each pass until $i is greater\n\t\t\t\tthan $numofpages (4.08). */\n\n\t\t\t\tif($i == $page){\n\t\t\t\t\techo($i.\" \");\n\t\t\t\t}else{\n\t\t\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t\t\t}\n\t\t\t\t/* This if statement will not make the current page number available in\n\t\t\t\tlink form. It will, however, make all other pages available in link form. */\n\t\t\t} // This ends the for loop\n\t\t} else {\n\t\t\tfor($i = 1; $i <= $numofpages; $i++) {\n\t\t\t\t/* This for loop will add 1 to $i at the end of each pass until $i is greater\n\t\t\t\tthan $numofpages (4.08). */\n\n\t\t\t\tif($i == $page){\n\t\t\t\t\techo(\"<a href='#' class='active'>$i</a>\");\n\t\t\t\t}else{\n\t\t\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t\t\t}\n\t\t\t\t/* This if statement will not make the current page number available in\n\t\t\t\tlink form. It will, however, make all other pages available in link form. */\n\t\t\t}\n\t\t}\n\t}\n\tif(($totalrows % $limit) != 0){\n\t\t//echo $totalpages;\n\n\n\t\t/* The above statement is the key to knowing if there are remainders, and it's\n\t\tall because of the %. In PHP, C++, and other languages, the % is known as a\n\t\tModulus. It returns the remainder after dividing two numbers. If there is no\n\t\tremainder, it returns zero. In our example, it will return 0.8 */\n\n\t\tif($i == $page){\n\t\t\techo($i.\" \");\n\t\t}else{\n\t\t\techo(\"<a href=\\\"$href&page=$i&$querystring\\\">$i</a> \");\n\t\t}\n\n\t\tif ($page!=$newvalue) {\n\t\t\techo(\"<a href=\\\"$href&page=$newvalue&$querystring\\\"> >> Last </a> \");\n\t\t} else {\n\t\t\techo(\">> Last \");\n\t\t}\n\n\t\t/* This is the exact statement that turns pages into link form that is used\n\n\t\tabove */\n\t} else {\n\t\tif ($page!=$newvalue) {\n\t\t\techo(\"<a href=\\\"$href&page=$totalpages&$querystring\\\">»</a> \");\n\t\t} else {\n\t\t\techo(\"<a href='#'>»</a>\");\n\t\t}\n\t}\n\treturn $limitvalue;\n\t} else return 0;\n}", "title": "" }, { "docid": "ee30961f0610e3e8f6c141f31f3366b0", "score": "0.6793324", "text": "public static function set_limit($limit)\n\t{\n\t\tself::get_query()->take($limit);\n\t}", "title": "" }, { "docid": "bbb0366722e032aacc694bc1a71d66a9", "score": "0.67625237", "text": "function sql_paging_limit($page, $recordsperpage) {\n global $CFG;\n\n debugging('Function sql_paging_limit() is deprecated. Replace it with the correct use of limitfrom, limitnum parameters', DEBUG_DEVELOPER);\n\n switch ($CFG->dbfamily) {\n case 'postgres':\n return 'LIMIT '. $recordsperpage .' OFFSET '. $page;\n default:\n return 'LIMIT '. $page .','. $recordsperpage;\n }\n}", "title": "" }, { "docid": "30cd5e79da7fc824ec02cfd328aa2d53", "score": "0.67586297", "text": "protected function change_pagesize($e){\n $this->pageSize = (int)$e->value;\n if ($this->pageSize <= 0) $this->pageSize = 20;\n }", "title": "" }, { "docid": "37d75cc7603154fbaa2f78ca1db83695", "score": "0.6735739", "text": "public function setItemLimit($limit) {\r\n if ($limit > 0) {\r\n $this->limit = $limit;\r\n }\r\n }", "title": "" }, { "docid": "f8e9165339b8a2f5b6732b6a0221f9da", "score": "0.67312783", "text": "function pagination($table = null, $limit = 30, $param = 'no')\n{\n global $DB, $pagesnum;\n \n if (!isset($_GET[$param]) || empty($_GET[$param])) {\n $start = 0;\n $page = 1;\n } else {\n $start = ($_GET[$param] - 1) * $limit;\n $page = $_GET[$param];\n }\n \n // membuat databaru / registrasi global variable\n $GLOBALS['start'] = $start;\n $GLOBALS['limit'] = $limit;\n\n $result = $DB->query(\"SELECT * FROM {$table}\");\n if (!$result) {\n return false;\n }\n\n $num = $result->num_rows;\n\n $pages = ceil($num/$limit);\n \n $pagination = '<nav class=\"text-right\"><ul class=\"pagination\">';\n // jika terdapat halaman maka navigasi akan ditampilkan\n if ($pages > 1) {\n // prev\n if ($page > 1) {\n $pagination .= '<li><a href=\"?'.$param.'='.($page-1).'\" aria-label=\"Previous\">\n <span aria-hidden=\"true\">&laquo;</span></a></li>';\n }\n $pagination .= '<li><a>Page '.$page.' of '.$pages.'</a></li>';\n //next\n if ($page < $pages) {\n $pagination .= '<li><a href=\"?'.$param.'='.($page+1).'\" aria-label=\"Next\">\n <span aria-hidden=\"true\">&raquo;</span></a></li>';\n }\n\n }\n $pagination .= '</ul></nav>';\n $pagesnum = $pagination;\n}", "title": "" }, { "docid": "356f002b7f3ce925426e988a0134460a", "score": "0.6728776", "text": "public function getPageSize();", "title": "" }, { "docid": "25990a64d64b04f4e441b6a59a806e84", "score": "0.6725328", "text": "public function limit($limit = null);", "title": "" }, { "docid": "9ecbb194e7cffb78caa125ac273306d3", "score": "0.67165655", "text": "function getPaginas($num){\n\t\t\t$this->rows_per_page = $num;\n\t\t}", "title": "" }, { "docid": "a1c751f3f2a9ab69488e68a26b4b60ab", "score": "0.6686813", "text": "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "a1c751f3f2a9ab69488e68a26b4b60ab", "score": "0.6686813", "text": "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "a1c751f3f2a9ab69488e68a26b4b60ab", "score": "0.6686813", "text": "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "497cc197a3bb9e77a3828c81b4eb17bf", "score": "0.66846", "text": "public function setLimit(?int $limit): void\n {\n $this->limit['value'] = $limit;\n }", "title": "" }, { "docid": "81a7437924791b0fa9a46c093cce3ab6", "score": "0.6681738", "text": "public function paginate($perPage = 10);", "title": "" }, { "docid": "32159eee4fbd4acd8ca3512829f27dec", "score": "0.6678973", "text": "function _pager($CI,$page = 0,$count = FALSE,$config = FALSE){\n\t\t\t$page = str_replace($CI->gears->pager->prefix,'',$page);\n\t\t\tif($page < 0) $page = 0;\n\t\t\t$CI->page_num = $page;\n\t\t\t$CI->total_rows = $count;\n\t\t\tif(isset($config['per_page'])){\n\t\t\t\t$per_page = $config['per_page'];\n\t\t\t} \n\t\t\telse {\n\t\t\t\t$per_page = isset($CI->gear->per_page) ? $CI->gear->per_page : $CI->site->per_page;\n\t\t\t}\n\t\t\t$num_pages = ceil($count/$per_page);\n\t\t\t$real_page = $page == 0 ? 0 : $num_pages - $page;\n/*\n\t\t\tif($page != 0 && $page != $num_pages) $start = $count - ($per_page*$page);\n\t\t\telse \n*/\n\t\t\t$start = $real_page*$per_page;\n\t\t\tif($start < 0) $start = 0;\n\t\t\tif($config) $CI->pager_config = $config;\n\t\t\t$data = array('start'=>$start,'limit'=>(int)$per_page);\n\t\t\t//->order_by('id','desc')\n\t\t\t$CI->db->limit($data['limit'],$data['start']);\n\t\t\treturn $data;\n\t}", "title": "" }, { "docid": "54f63feeb538a8ae7703810fa655bf76", "score": "0.6678775", "text": "function setLimit($currentPage, $rowsPerPage, $totalRowNum) {\n $this->_page = $currentPage;\n $this->_pageLimit = $rowsPerPage;\n $this->_totalRecordsNum = $totalRowNum;\n $this->_pagesNum = (is_null($rowsPerPage) or $totalRowNum == 0) ?\n 1 : ceil($totalRowNum / $rowsPerPage);\n $this->_firstRecord = ($currentPage - 1) * $rowsPerPage + 1;\n $this->_lastRecord = (is_null($rowsPerPage))\n ? $totalRowNum\n : min($this->_firstRecord + $rowsPerPage - 1,\n $totalRowNum);\n if ($this->_lastRecord > $totalRowNum) {\n $this->_lastRecord = $totalRowNum;\n }\n }", "title": "" }, { "docid": "a2acac560c38786386bacea092f57470", "score": "0.66761154", "text": "private function setPaginationLimit($limit): mixed\n {\n // it from the request if available and if not keep it null.\n return $limit ?? Request::get('limit');\n }", "title": "" }, { "docid": "4ba957dcdbcdb5407861cd56f65af56c", "score": "0.6660733", "text": "function setItemsPerPage($value) {\n $value = (integer) $value;\n if($value < 1) {\n return false;\n } // if\n $this->items_per_page = $value;\n $this->last_page = null;\n return true;\n }", "title": "" }, { "docid": "a7aa178076cff809a07f6b4f74cb6846", "score": "0.6660305", "text": "abstract public function apply_limit($query, $offset = 0, $limit = 0);", "title": "" }, { "docid": "a28b37edb9cb780b96eb547b59b4303a", "score": "0.66599315", "text": "public function limit()\n\t{\n\t}", "title": "" }, { "docid": "6f21c4c4568956e7dab5c50cf5e24dd7", "score": "0.6659452", "text": "public function paginate()\r\n {\r\n $offset = (($this->page - 1) * $this->per_page) ?: 0;\r\n $this->db->limit($this->per_page, $offset);\r\n }", "title": "" }, { "docid": "5fa71d4311b81d4be72ed79caebb619a", "score": "0.66517687", "text": "public function limit()\n {\n $this->limit;\n }", "title": "" }, { "docid": "a70dbdc4eb25287c671a881a1b1af8b6", "score": "0.6644351", "text": "public function addLimit($limit);", "title": "" }, { "docid": "332a80baa143d621e816a2458de14ae6", "score": "0.66366494", "text": "public function limit()\n {\n if(empty($this->currentPage)) $this->start();\n else if(($this->totalPage >= 1) && $this->currentPage > $this->totalPage) {\n $this->currentPage = $this->totalPage ; \n }\n return (($this->currentPage - 1) * $this->perPage).\",\".$this->perPage;\n }", "title": "" }, { "docid": "042194c727e78f280a855b62b87604cb", "score": "0.66133505", "text": "public function getPagination();", "title": "" }, { "docid": "042194c727e78f280a855b62b87604cb", "score": "0.66133505", "text": "public function getPagination();", "title": "" }, { "docid": "590b02df7b97e17e749db18240de6ba3", "score": "0.66066116", "text": "public function limit($limit = null, $offset = null);", "title": "" }, { "docid": "5334ba59d02e0ec1e0883a42f57da5e7", "score": "0.6589937", "text": "function paginate(int $limit = 0, array $columns = ['*']);", "title": "" }, { "docid": "ba6b6a6b11d4d45cb7fd23df5da274b1", "score": "0.6588171", "text": "function pagination($requete1, $limit)\n {\n \n //var_dump($requete1);\n ///////////////////////////////////////////////////////////////\n // ETAPE petit beurre: RECUPERER LES CHAMPS DE L'URL POUR REECRITURE DE L'URL\n $azerty = \"frontoffice/\".$_GET['a']; // à changé, voir htacess\n\n if(isset($_GET['b']))\n {\n $azerty = \"frontoffice/\".$_GET['a']. \"/\". $_GET['b'];\n }\n if(isset($_GET['c']))\n {\n $azerty = \"frontoffice/\".$_GET['a']. \"/\". $_GET['b']. \"/\". $_GET['c'];\n }\n\n ///////////////////////////////////////////////////////////////\n // ETAPE 1: RECUPERER LE NBRE TOTAL \n \n $limite = $limit; //Nombre par page\n\n $total = count($requete1); // count de la requete COMPLETE sans limites\n\n ///////////////////////////////////////////////////////////////\n // ETAPE 2: COMPTER LE NOMBRE DE PAGE\n \n $nb_pages = ceil($total / $limite); // ceil = arrondis au superieur\n \n //echo $_GET['page']; \n if(isset($_GET['page'])) // isset, vérifie l'existance de ()\n {\n $page = intval($_GET['page']);\n \n if($page>$nb_pages) // Si la valeur de $pageActuelle (le numéro de la page) est plus grande que $nb_pages...\n {\n $page = $nb_pages;\n }\n }\n else\n {\n $page = 1; // La page actuelle est la n°1 \n }\n \n // echo $page;\n ///////////////////////////////////////////////////////////////\n // ETAPE 3: SAVOIR OU L'ON EST DANS LES PAGES\n\n $debut = ($page -1) * $limite; // On calcul la première entrée à lire\n\n if($nb_pages >1){\n\n $a = $page-1;\n $b = $page+1;\n $i = $page;\n \n /*if($a<1)\n {\n echo '<a><span class=\"pagina_prec_stop\">&laquo;'. _('précédent') . '</span></a>';\n }\n else\n {\n echo '<a href=\"' . url_mmv($azerty, $a) .'\"><span class=\"pagina_prec\">&laquo; '. _('précédent') . ' </span></a>';\n }*/\n \n \n // 1ere partie \n $c = $page-4;\n if($c < 0) $c = 0;\n\n //echo $page;\n while($c <= $page-1)\n {\n if($c >= 1)\n echo '<a href=\"' . url_mmv($azerty, $c) .'\" class=\"btn\" >' . $c . '</a>';\n if($c<0)\n break;\n $c++;\n }\n \n \n echo '<a class=\"btn current\">' . $page . '</a>'; \n \n // 3ere partie \n $i = $page+1;\n \n while($i <= ($page+4))\n {\n if($i<=$nb_pages)\n echo '<a href=\"' . url_mmv($azerty, $i) .'\" class=\"btn\">' . $i . '</a>';\n \n if($i>$nb_pages)\n break;\n $i++;\n }\n \n /*if($b>$nb_pages)\n {\n echo '<a><span class=\"pagina_stop\">'. _('suivant') . ' &raquo </span></a>';\n }\n else\n {\n echo '<a href=\"' . url_mmv($azerty, $b) .'\" class=\"pagina_suiv\">'. _('suivant') . '&raquo </a>';\n }*/\n\n return $debut; \n\n }\n else{\n return $debut;\n }\n }", "title": "" }, { "docid": "cecb850bc45c6303f76ca7a2eaf6dc0f", "score": "0.6585531", "text": "private function calculate()\n {\n $this->pages = $this->results > 0 ? ceil($this->results / $this->limit) : 1;\n $this->currentPage = $this->currentPage <= $this->pages ? $this->currentPage : $this->pages;\n }", "title": "" }, { "docid": "e2d90b176791fbfe896c0368068c080f", "score": "0.65781033", "text": "protected function _updatePageSize() {\n $url = $this->url;\n if (array_key_exists('next_collection_link', $this->data)) {\n $url = $this->data['next_collection_link'];\n\n } elseif (array_key_exists('prev_collection_link', $this->data)) {\n $url = $this->data['prev_collection_link'];\n }\n\n # scan querystring for ws_size\n $url_parts = parse_url($url);\n\n # we have a query string\n if (array_key_exists('query', $url_parts)) {\n parse_str($url_parts['query'], $params);\n\n # we have a ws_size\n if (array_key_exists('ws_size', $params)) {\n\n # set pageSize\n $this->pageSize = $params['ws_size'];\n return;\n }\n }\n\n # we dont have one, just count the # of entries\n $this->pageSize = count($this->data['entries']);\n }", "title": "" }, { "docid": "eb056e12fd79a3d5c1d350236845f102", "score": "0.6577615", "text": "function _sidora_pager_init($total, $limit = 10, $element = 0) {\n // set global variables\n global $pager_page_array;\n global $pager_total;\n global $pager_total_items;\n\n // get value from page parameter\n $page = isset($_GET['page']) ? $_GET['page'] : '';\n\n // Convert comma-separated $page to an array, used by other functions.\n $pager_page_array = explode(',', $page);\n\n // We calculate the total of pages as ceil(items / limit).\n $pager_total_items[$element] = $total;\n $pager_total[$element] = ceil($pager_total_items[$element] / $limit);\n $pager_page_array[$element] = max(0, min((int) $pager_page_array[$element], ((int) $pager_total[$element]) - 1));\n\n // return the current position\n return $pager_page_array[$element];\n}", "title": "" }, { "docid": "3d9e14e7cec3c288bf89392ba65349a8", "score": "0.65525085", "text": "function param_paging()\n {\n $this->load_lib('Param_report', 'list_report_sproc', $this->my_tag);\n $this->param_report->param_paging();\n }", "title": "" }, { "docid": "d1c5570ef33531bb1dd82dc740853f02", "score": "0.6519864", "text": "public function modifyLimitQuery($query, $limit, $offset);", "title": "" }, { "docid": "2d8d98b113844f06ae665006040b3ac8", "score": "0.6518064", "text": "function limit_query_generate($page, $query, $perpage) {\n $query .= \"LIMIT \" . $page . \",\" . $perpage;\n return $query;\n}", "title": "" }, { "docid": "838a4049ee21e79eabf702d6ffc64878", "score": "0.6513538", "text": "function makePages ($SQL,$PageSize,$p, $orderBy = ''){\n if (!is_numeric($p) || $p==0) $p=1; else $p=intval(abs($p));\n $PageStart=($p-1)*($PageSize);\n \n $orderBy = ($orderBy) ? \" ORDER BY $orderBy \" : '';\n \n $SQL=$SQL.\" $orderBy LIMIT $PageStart,$PageSize\";\n return $SQL;\n}", "title": "" }, { "docid": "50a3857118b5082b8612cb238e3d0e83", "score": "0.65134656", "text": "public function setLimit(int $limit): void\n {\n $this->limit = $limit;\n }", "title": "" }, { "docid": "d08f3510155c93444985099bbbf51547", "score": "0.6513012", "text": "function calcule_page($count,$num,$page)\n{\n //et on arrondi avec ceil pour avoir un nombre entier\n $nb_page = ceil($count/$num);\n $result['nb_page'] = $nb_page;\n //on declare page et offset\n if(!empty($page) && is_numeric($page) && ctype_digit($page) && ($page <= $nb_page) && ($page > 0)){\n $result['page'] = $page;\n $result['offset'] = (($page-1)*$num);\n }else {\n $result['page'] = 1;\n $result['offset'] = 0;\n }\n return $result;\n}", "title": "" }, { "docid": "3e9fe5f556b54c2478f9cbd5b60acfd7", "score": "0.6511897", "text": "public abstract function limit($start, $rows);", "title": "" }, { "docid": "8c048365ed5582b49ca3f4afe4761985", "score": "0.6504565", "text": "public function processLimit($query, $limit, $offset = 0);", "title": "" }, { "docid": "3cd5b6def5110cb4e022a977822d73bc", "score": "0.64997935", "text": "protected function updateNumPages() {\n $this->num_pages = ( $this->items_per_page == 0 ? 0 : (int) ceil( $this->total_items / $this->items_per_page ) );\n }", "title": "" }, { "docid": "c6baec57dc11d1da81da72e1d606ccae", "score": "0.6485248", "text": "public function setRange($limit,$offset)\r\n {\r\n $this->limit=$limit;\r\n $this->offset=$offset;\r\n }", "title": "" }, { "docid": "72c6152e364264ff1b0c8f3b14975e17", "score": "0.6483689", "text": "function setPerPage($perPage){\r\n\t\t$this->perPage = $perPage;\r\n\t}", "title": "" }, { "docid": "6be6ae0f2f7303bd4f985d0571ff89f4", "score": "0.64772075", "text": "public function setPageSize( $size );", "title": "" }, { "docid": "c35e8ced71a8f08676dde9565d28cec8", "score": "0.64681834", "text": "public static function perPage(): int\n {\n return 3;\n }", "title": "" }, { "docid": "cd4554039774915a91b7d5218620531d", "score": "0.6468178", "text": "public function setMaxPerPage($maxPerPage);", "title": "" }, { "docid": "55535d85def94019a482bfe34c36502a", "score": "0.6463318", "text": "public abstract function limit();", "title": "" }, { "docid": "ccee58a5d526697c5adcb734514b005d", "score": "0.64611274", "text": "function pagingChat($page,$limit,$offset,$num,$totalrecords){\r\n $pageslink=$intTotalNumPage='';\r\n $intLoopStartPoint = 1;\r\n $intLoopEndPoint= $totalrecords;\r\n $strURL='';\r\n \r\n if(($page) > ($totalrecords)){\r\n $intLoopStartPoint = $page - $num + 1;\r\n if (($intLoopStartPoint + $limit) <= ($num)) {\r\n $intLoopEndPoint=$intLoopStartPoint + $limit - 1;\r\n } else {\r\n $intLoopEndPoint = $totalrecords;\r\n }\r\n } \r\n \r\n if (($num > $limit) && ($page != 1)) {\r\n $pageslink.=\"<a href=\\\"\".basename($_SERVER['PHP_SELF']).\"?curP=1&\".$strURL.\"\\\" class=\\\"pagenumber\\\"><<</a> \";\t\t\t\t\t\t\t\r\n }\r\n \r\n if ($intLoopStartPoint > 1) {\r\n $intPreviousPage=$page - 1;\r\n $pageslink.=\"<a href=\\\"\".basename($_SERVER['PHP_SELF']).\"?curP=\".$intPreviousPage.\"&\".$strURL.\"\\\" class=\\\"edit22\\\"> &lt;&lt; </a> \";\t\t\t\r\n }\t\r\n \r\n for($i=$intLoopStartPoint;$i<=$intLoopEndPoint;$i++){\r\n if ($page==$i) {\r\n //$this->strShowPaging.=\"<a href=\\\"\".basename($_SERVER['PHP_SELF']).\"?curP=\".$i.\"&\".$this->strURL.\"\\\" class=\\\"pagenumber\\\"><b>\".$i.\"</b></a> \";\r\n $pageslink.= '<span class=\"pagenumber\"><b>'.$i.'</b></span> ';\r\n } else {\r\n $pageslink.=\"<a href=\\\"\".basename($_SERVER['PHP_SELF']).\"?curP=\".$i.\"&\".$strURL.\"\\\" class=\\\"pagenumber\\\">\".$i.\"</a> \";\r\n }\r\n if ($i!=$intLoopEndPoint) {\r\n $pageslink.=\" \";\r\n }\r\n }\r\n\t\t\t\r\n if ($intLoopEndPoint < $intTotalNumPage) {\r\n $intNextPage=$page+1;\r\n $pageslink.=\"<a href=\\\"\".basename($_SERVER['PHP_SELF']).\"?curP=\".$intNextPage.\"&\".$strURL.\"\\\" class=\\\"edit22\\\"> &gt;&gt; </a> \";\r\n }\r\n \r\n if (($totalrecords > $limit) && ($page != $totalrecords)) {\r\n $pageslink.=\"<a href=\\\"\".basename($_SERVER['PHP_SELF']).\"?curP=\".$totalrecords.\"&\".$strURL.\"\\\" class=\\\"pagenumber\\\">>></a>\";\t\t\t\r\n }\r\n //echo $pageslink;\r\n return $pageslink;\r\n }", "title": "" } ]
99df53da6c4778b0d5683f2377fff8ba
Set a running header for tables that span multiple pages
[ { "docid": "4de211b421429b2d1104f7d65228d2aa", "score": "0.6380321", "text": "public function SetRunningHeader($running_header) {\r\n $this->running_header = $running_header;\r\n }", "title": "" } ]
[ { "docid": "953b187dd8014e72776e38255bb749af", "score": "0.7940372", "text": "function pageHeader()\r\n {\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n }", "title": "" }, { "docid": "0a3b437372bf645c5adf76d322620134", "score": "0.7041492", "text": "protected function showPageHeadTable() {\n\t\t?>\n\t\t<table class=\"header_table\" >\n\t\t\t<tr>\n\t\t\t\t<td class=\"header_td_app_name\">\n\t\t\t\t\t<h1 >\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo $this->giveTitle(true);\n\t\t\t\t\t\t?>\n\t\t\t\t\t</h1>\n\t\t\t\t</td>\n\t\t\t\t<td class=\"header_td_middle_box\">\n\t\t\t\t</td>\n\t\t\t\t<td class=\"header_td_version\">\n\n\t\t\t\t</td>\n\n\t\t\t</tr>\n\t\t</table>\n\t\t<?php\n\t}", "title": "" }, { "docid": "7cf19a3dec8521062e70b4e1e5a6046d", "score": "0.6868366", "text": "protected function setHeaderAndRows() {\n\t\t$this->Header = __('Heartrate data');\n\n\t\t$this->appendRowTabbedPlot( new SectionHeartrateRow($this->Context) );\n\t}", "title": "" }, { "docid": "a35ef0b835e5c3df5b4df63cd87cc7a0", "score": "0.68147427", "text": "public function setHeader($row_number);", "title": "" }, { "docid": "ddc9934de066bcf150dc8ddc0072f888", "score": "0.6804052", "text": "static function printTableHeader(){\n if (ProductRatings::$methodCount == 0){\n return;\n }\n ?>\n <thead>\n <tr><td>\n <td>Explicit\n <td>Orders\n <td>Display count\n <td>Method\n <td>Display time\n <td>Click\n <td>Scroll\n <td><b>Final</b>\n\n </thead>\n <tbody>\n <?php\n\n\n }", "title": "" }, { "docid": "87bc715aee45ad01b506d03a249f44de", "score": "0.67048883", "text": "function Draw_Header_(){\n \n $this->tb_header_height = 0;\n \n $this->Init_Table_Position();\n \n $this->Draw_Header_Command = false;\n\n //if the header will be showed\n if ( ! $this->tb_header_draw ) return;\n \n $this->DrawTableLine($this->tb_header_type, false, 1);\n \n $this->Data_On_Current_Page = true; \n\n}", "title": "" }, { "docid": "9713a68edeb9c36cce394ba76cb2201a", "score": "0.66852266", "text": "function makeTableHeader($type,$header,$colspan=2) {\n if(!$this->bInitialized) {\n $header = $this->getVariableName() . \" (\" . $header . \")\";\n $this->bInitialized = true;\n }\n $str_i = ($this->bCollapsed) ? \"style=\\\"font-style:italic\\\" \" : \"\";\n echo \"<table cellspacing=2 cellpadding=3 class=\\\"dBug_\".$type.\"\\\">\n <tr>\n <td \".$str_i.\"class=\\\"dBug_\".$type.\"Header\\\" colspan=\".$colspan.\" onClick='dBug_toggleTable(this)'>\".$header.\"</td>\n </tr>\";\n }", "title": "" }, { "docid": "98fc17f83a3a5183bf762103d0657e00", "score": "0.6639079", "text": "public function renderTableHeader()\n\t{\n\t\tif (!$this->hideHeader) {\n\t\t\techo \"<thead>\\n\";\n\t\t\techo \"<tr>\\n\";\n\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t$column->renderHeaderCell();\n\t\t\t}\n\t\t\techo \"</tr>\\n\";\n\t\t\techo \"</thead>\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "f1f1f228831cbad4606063819a33ffe9", "score": "0.66335946", "text": "protected function setHeaderAndRows() {\n\t\t$this->Header = __('Heart rate variability').' <a class=\"window\" href=\"glossary/hrv\"><i class=\"fa fa-question-circle-o\"></i></a>';\n\n\t\t$this->appendRowTabbedPlot( new SectionHRVRow($this->Context) );\n\t}", "title": "" }, { "docid": "06cd2a7960908c8b0255ca2fb5c5fdae", "score": "0.647981", "text": "function _buildTableHeader()\r\n {\r\n $columnList = array();\r\n foreach ($this->_dg->columnSet as $column) {\r\n $columnList[] = $column->columnName;\r\n }\r\n \r\n $this->_table->setHeaders($columnList);\r\n }", "title": "" }, { "docid": "b921dd62f8e6718661dc225f210cec13", "score": "0.6404077", "text": "function table_with_header($t, $header, $empty = 0){\n\t\t$c = \"\";\n\t\tforeach($header as $headerName => $headerDBName){\n\t\t\t$c .= td($headerName);\n\t\t}\n\t\t\n\t\twhile ($empty > 0){\n\t\t\t$c .= td(\"\");\n\t\t\t$empty--;\n\t\t}\n\t\t\n\t\t$headers = tr($c);\n\t\treturn table($headers . $t);\n\t}", "title": "" }, { "docid": "fa501b77984acfff8e385545003bd2f4", "score": "0.6365628", "text": "function tableHeader($t,$cols=1,$width=500)\r\n\t{\r\n\r\n\t\tGLOBAL $_SETTINGS;\r\n\r\n\t\t$str = \"<TABLE BGCOLOR=\\\"{$_SETTINGS[\"headerColor\"][2]}\\\" class=\\\"results\\\" WIDTH=$width ALIGN=CENTER BORDER=0 CELLSPACING=0 CELLPADDING=3 id=\\\"\\\">\";\r\n\t\t$str .= \"<TR><Th COLSPAN=\\\"$cols\\\" class=\\\"heading\\\" >$t</Th></TR>\";\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "30745b5b6c6745866683394954dcdd1a", "score": "0.63557047", "text": "function TableAddPage($header = true){\n $this->Draw_Table_Border();//draw the table border\n\n $this->End_Page_Border();//if there is a special handling for end page??? this is specific for me\n\n $this->AddPage($this->CurOrientation);//add a new page\n\n $this->Data_On_Current_Page = false;\n\n $this->table_startx = $this->GetX();\n $this->table_starty = $this->GetY();\n if ($header) $this ->Draw_Header();//if we have to draw the header!!! \n}", "title": "" }, { "docid": "077f99eb57cfd4020610d083bf3a7dcc", "score": "0.6321238", "text": "function headerTable()\r\n {\r\n $this->Cell(80);\r\n $this->SetFont('Courier', 'BI', 17);\r\n }", "title": "" }, { "docid": "85dec724a22c9317385fc2ada493469b", "score": "0.63205755", "text": "private function set_index_headers(){\n $headers = array();\n $primary = array('id', 'name', 'title', 'updated_at');\n foreach($this->structure as $row){\n if( in_array($row->Field, $primary) ){\n $headers[] = ucwords($row->Field);\n }\n }\n foreach($this->structure as $row){\n if( !in_array($row->Field, $primary) ){\n if( count( $headers ) < 3 ) {\n $headers[] = ucwords($row->Field);\n }\n }\n }\n $this->headers = $headers; \n }", "title": "" }, { "docid": "2855ced9fd3e6cd3495e73ad8b0f7ca1", "score": "0.6290141", "text": "function makeTDHeader($type,$header) {\n $str_d = ($this->bCollapsed) ? \" style=\\\"display:none\\\"\" : \"\";\n echo \"<tr\".$str_d.\">\n <td valign=\\\"top\\\" onClick='dBug_toggleRow(this)' class=\\\"dBug_\".$type.\"Key\\\">\".$header.\"</td>\n <td>\";\n }", "title": "" }, { "docid": "b8ced3458a91f9d9dd052dc0d4ea479d", "score": "0.6286004", "text": "function printHeader() {\n //HEADER\n }", "title": "" }, { "docid": "9ca52b6b564290384e350ad346e547e6", "score": "0.6275128", "text": "public function fillHeader() {\n\t\tglobal $lng;\n\n\t\t$allcolumnswithwidth = true;\n\t\tforeach ((array) $this->column as $idx => $column) {\n\t\t\tif (!strlen($column[\"width\"])) {\n\t\t\t\t$allcolumnswithwidth = false;\n\t\t\t} else if ($column[\"width\"] == \"1\") {\n\t\t\t\t// IE does not like 1 but seems to work with 1%\n\t\t\t\t$this->column[$idx][\"width\"] = \"1%\";\n\t\t\t}\n\t\t}\n\t\tif ($allcolumnswithwidth) {\n\t\t\tforeach ((array) $this->column as $column) {\n\t\t\t\t$this->tpl->setCurrentBlock(\"tbl_colgroup_column\");\n\t\t\t\t$this->tpl->setVariable(\"COLGROUP_COLUMN_WIDTH\", $column[\"width\"]);\n\t\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t}\n\t\t}\n\t\t$ccnt = 0;\n\t\tforeach ((array) $this->column as $column) {\n\t\t\t$ccnt++;\n\n\t\t\t//tooltip\n\t\t\tif ($column[\"tooltip\"] != \"\") {\n\t\t\t\tinclude_once(\"./Services/integerUIComponent/Tooltip/classes/class.ilTooltipGUI.php\");\n\t\t\t\tilTooltipGUI::addTooltip(\"thc_\" . $this->getId() . \"_\" . $ccnt, $column[\"tooltip\"]);\n\t\t\t}\n\t\t\tif ((!$this->enabled[\"sort\"] || $column[\"sort_field\"] == \"\" || $column[\"is_checkbox_action_column\"]) && !$column['link']) {\n\t\t\t\t$this->tpl->setCurrentBlock(\"tbl_header_no_link\");\n\t\t\t\tif ($column[\"width\"] != \"\") {\n\t\t\t\t\t$this->tpl->setVariable(\"TBL_COLUMN_WIDTH_NO_LINK\", \" width=\\\"\" . $column[\"width\"] . \"\\\"\");\n\t\t\t\t}\n\t\t\t\tif (!$column[\"is_checkbox_action_column\"]) {\n\t\t\t\t\t$this->tpl->setVariable(\"TBL_HEADER_CELL_NO_LINK\", $column[\"text\"]);\n\t\t\t\t} else {\n\t\t\t\t\t$this->tpl->setVariable(\"TBL_HEADER_CELL_NO_LINK\", ilUtil::img(ilUtil::getImagePath(\"spacer.png\"), $lng->txt(\"action\")));\n\t\t\t\t}\n\t\t\t\t$this->tpl->setVariable(\"HEAD_CELL_NL_ID\", \"thc_\" . $this->getId() . \"_\" . $ccnt);\n\n\t\t\t\tif ($column[\"class\"] != \"\") {\n\t\t\t\t\t$this->tpl->setVariable(\"TBL_HEADER_CLASS\", \" \" . $column[\"class\"]);\n\t\t\t\t}\n\t\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t\t$this->tpl->touchBlock(\"tbl_header_th\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (($column[\"sort_field\"] == $this->order_field) && ($this->order_direction != \"\")) {\n\t\t\t\t$this->tpl->setCurrentBlock(\"tbl_order_image\");\n\t\t\t\t$this->tpl->setVariable(\"IMG_ORDER_DIR\", ilUtil::getImagePath($this->order_direction . \"_order.png\"));\n\t\t\t\t$this->tpl->setVariable(\"IMG_ORDER_ALT\", $this->lng->txt(\"change_sort_direction\"));\n\t\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t}\n\n\t\t\t$this->tpl->setCurrentBlock(\"tbl_header_cell\");\n\t\t\t$this->tpl->setVariable(\"TBL_HEADER_CELL\", $column[\"text\"]);\n\t\t\t$this->tpl->setVariable(\"HEAD_CELL_ID\", \"thc_\" . $this->getId() . \"_\" . $ccnt);\n\n\t\t\t// only set width if a value is given for that column\n\t\t\tif ($column[\"width\"] != \"\") {\n\t\t\t\t$this->tpl->setVariable(\"TBL_COLUMN_WIDTH\", \" width=\\\"\" . $column[\"width\"] . \"\\\"\");\n\t\t\t}\n\n\t\t\t$lng_sort_column = $this->lng->txt(\"sort_by_this_column\");\n\t\t\t$this->tpl->setVariable(\"TBL_ORDER_ALT\", $lng_sort_column);\n\n\t\t\t$order_dir = \"asc\";\n\n\t\t\tif ($column[\"sort_field\"] == $this->order_field) {\n\t\t\t\t$order_dir = $this->sort_order;\n\n\t\t\t\t$lng_change_sort = $this->lng->txt(\"change_sort_direction\");\n\t\t\t\t$this->tpl->setVariable(\"TBL_ORDER_ALT\", $lng_change_sort);\n\t\t\t}\n\n\t\t\tif ($column[\"class\"] != \"\") {\n\t\t\t\t$this->tpl->setVariable(\"TBL_HEADER_CLASS\", \" \" . $column[\"class\"]);\n\t\t\t}\n\t\t\tif ($column['link']) {\n\t\t\t\t$this->setExternalLink($column['link']);\n\t\t\t} else {\n\t\t\t\t$this->setOrderLink($column[\"sort_field\"], $order_dir);\n\t\t\t}\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"tbl_header_th\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"tbl_header\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}", "title": "" }, { "docid": "9e025e364ef8579edc37830ff4db752b", "score": "0.62539", "text": "protected function setTableHead($int,$date){\n //add some basic information\n $string_header = \"<section id='\".$this->page.\"_day_table_\".$date.\"_section' class='tickets_section'>\";\n $string_header .= \"<table id='\".$this->page.\"_day_table_\".$date.\"' class='tickets'>\";\n $string_header .= \"<tr class='table_head'>\";\n\n //pick the row where the prepare_and_Print_dayTable function was stopped at\n $row = $this->tickets[$int]; \n foreach ($row as $key => $value) {\n switch($key){ \n //if there is a time value \n case 'time':\n if(($this->page != 'food') && ($this->page != 'historic')){\n $string_header .= \"<th>Time</th>\";\n }\n break; \n\n //if there is a location value\n case 'locationName':\n $string_header .= \"<th>Location</th>\";\n break; \n\n //if there is a artists value\n case 'artists':\n $string_header .= \"<th>Artists</th>\";\n break;\n\n //if there is a name value\n case 'name': \n $string_header .= \"<th>\".$key.\"</th>\"; \n break;\n\n //if there is a halljazz value\n case 'hallJazz':\n $string_header .= \"<th>Hall</th>\";\n break; \n\n //if there is a price value\n case 'price':\n $string_header .= \"<th>Price</th>\";\n break;\n\n //if there is a childprice value\n case 'ChildPrice':\n $string_header .= \"<th>Price Children</th>\";\n break;\n\n //if there is a type food value\n case 'typeFood':\n $string_header .= \"<th>type food</th>\";\n break; \n\n //there is no default value\n default:\n\n break; \n } \n }\n //add some basic info at the end\n $string_header .= \"<th>Add to cart</th>\"; \n $string_header .= \"</tr>\";\n return $string_header;\n }", "title": "" }, { "docid": "09bab9c5834c40e55947159fc14aae9b", "score": "0.6215123", "text": "function home_page_headings(){\r\n\t\t$page_data = array ();\r\n\t\t$data_list = $this->custom_db->single_table_records ( 'home_page_headings', '*', '', 0, 100000 );\r\n\t\t$page_data ['data_list'] = @$data_list ['data'];\r\n\t\t$this->template->view ( 'cms/home_page_headings', $page_data );\r\n\t}", "title": "" }, { "docid": "13205e8f467feba47ed8b4af89e116d4", "score": "0.62124324", "text": "public function openTableHead()\n\t{\n\t\tif (VersionListener::isJoomla25())\n\t\t{\n\t\t\t// 2.5\n\t\t\treturn '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// 3.x\n\t\t\treturn '<thead>';\n\t\t}\n\t}", "title": "" }, { "docid": "238a789775560e597cfe2ceeaa8e12b3", "score": "0.6209653", "text": "public function setHeader(ReportPDF $pdf)\n {\n $pdf->SetFont('Arial', 'B', 12);\n $pdf->Cell(60, 5, $this->base->title, 0, 0, 'L');\n $pdf->SetFont('Arial', 'B', 10);\n $pdf->Cell(70, 5, $this->base->text, 0, 0, 'C');\n $pdf->SetFont('Arial', 'B', 8);\n $pdf->Cell(60, 5, 'Sida ' . $pdf->PageNo() . '/{nb}', 0, 0, 'R');\n\n $pdf->SetY(4.5);\n $pdf->SetFont('Arial', '', 8);\n $pdf->Cell(190, 5, 'Utskriftsdatum: ' . date('Y-m-d'), 0, 0, 'R');\n\n $pdf->SetLineWidth(0.4);\n $pdf->Line(12, 11.8, 202, 11.8);\n\n if (!$this->base->last_page) {\n $pdf->SetXY(12, 11.9);\n $pdf->SetLineWidth(0.1);\n $pdf->SetFontSize(4);\n $pdf->SetFillColor(220, 220, 220);\n $pdf->SetFont('Arial', 'B', 5);\n\n foreach ($this->base->account_names as $col_index => $name) {\n $pdf->Cell(\n $this->base->column_widths[$col_index],\n 3,\n $name,\n $name != null,\n 0,\n $col_index >= $this->base->amount_columns_start ? 'R' : 'L',\n $name != null\n );\n }\n $pdf->Ln();\n foreach ($this->base->column_names as $col_index => $name) {\n $pdf->Cell(\n $this->base->column_widths[$col_index],\n 3,\n $name,\n 1,\n 0,\n $col_index >= $this->base->amount_columns_start ? 'R' : 'L',\n 1\n );\n }\n } else {\n $pdf->SetLineWidth(0.1);\n $pdf->SetXY(12, 13.9);\n }\n\n $pdf->Ln();\n }", "title": "" }, { "docid": "50fc0ba411cf2ec56b242a29a90ecb2d", "score": "0.6168542", "text": "function getTableHeader($first_name, $last_name, $allBool){\n\t\t$title = 'Films with ' . $first_name . ' ' . $last_name . ' and Kevin Bacon.';\n\t\tif($allBool){\n\t\t\t$title = 'All Films';\n\t\t}\n?>\n\t\t<table>\n\t\t\t<caption>\n\t\t\t\t<?=$title?>\n\t\t\t</caption>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>#</th>\n\t\t\t\t\t<th>Title</th>\n\t\t\t\t\t<th>Year</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n<?php\n\t}", "title": "" }, { "docid": "84118dce398874ee3dce9cfdd11fed1f", "score": "0.6148604", "text": "function table_head($data = array(), $params = array()) {\n\t\t\t\t$thead = \"<thead\";\n\n\t\t\t\tif (!empty($params)) {\n\t\t\t\t\t\tforeach ($params as $param => $value) {\n\t\t\t\t\t\t\t\t$thead .= \" $param=\\\"$value\\\"\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$thead .= \">\\n\";\n\n\n\t\t\t\t$thead .= \"<tr>\\n\";\n\t\t\t\tforeach ($data as $head_col) {\n\t\t\t\t\t\t$thead .= $this->_make_col($head_col);\n\t\t\t\t}\n\t\t\t\t$thead .= \"</tr>\\n\";\n\t\t\t\t$thead .= \"</thead>\\n\";\n\n\t\t\t\t$this->thead = $thead;\n\n\t\t\t\t//$this->result .= $thead;\n\t\t}", "title": "" }, { "docid": "8753add22d9f5b0a775962379e3bf89b", "score": "0.61473787", "text": "function table_header()\n{\necho '<table';\nif( $this->border )echo ' border=\"'.$this->border.'\"';\nif( $this->align )echo ' align=\"'.$this->align.'\"';\nif( $this->width )echo ' width=\"'.$this->width.'\"';\nif( $this->cellspacing )echo ' cellspacing=\"'.$this->cellspacing.'\"';\nif( $this->cellpadding )echo ' cellpadding=\"'.$this->cellpadding.'\"';\nif( $this->css_class )echo ' class=\"'.$this->css_class.'\"';\necho '>';\n}", "title": "" }, { "docid": "5ec4bf1babad5e397cf0ab216ebdf547", "score": "0.6145946", "text": "function SERVER_programmStatusTableHeader()\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\tHTML_showTableHeader();\n\n\techo(\"\n\t\t<tr>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_programName</span></td>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_description</span></td>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_status</span></td>\n\t\t\t<td><span class=\\\"subhighlight\\\">$I18N_action</span></td>\n\t\t</tr>\n\t\t\");\n}", "title": "" }, { "docid": "e14948cf616e68b1e0fb47e19930bcce", "score": "0.6127031", "text": "public static function pageHeader() {\n\t\t$name = pageBuild::getName(true);\n\t\t\n\t\t$head = '<html><head>';\n\t\t$head .= '<link rel =\"stylesheet\" href=\"styles.css\">';\n\t\t$head .= htmlTags::makeTitle($name);\n\t\t$head .= '</head><body>';\n\t\t// make useful links\n\t\t$link = 'index.php?page=read&table=' . \n\t\t\tpageBuild::getParam('table');\n\t\t\n\t\t$head .= htmlTags::href($link, htmlTags::heading($name)) .\n\t\t\thtmlTags::lineBreak();\n\t\t$head .= 'Params:' . htmlTags::lineBreak();\n\t\t$head .= 'page = [create, read, update, remove]' . \n\t\t\thtmlTags::lineBreak();\n\t\t$head .= 'table = [accounts, todos]' . \n\t\t\thtmlTags::lineBreak();\n\t\t$head .= 'optional id' . \n\t\t\thtmlTags::lineBreak();\n\t\t\n\t\treturn $head; \n\t}", "title": "" }, { "docid": "392ff127ea93cb2de72b018e748254d7", "score": "0.61168945", "text": "function setHeader($file_name){\t\n\t\t// echo date('H:i:s') , \" Set header/footer\" , EOL;\n\t\t$this->objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&G&C&HPlease treat this document as confidential!');\n\t\t$this->objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $this->objPHPExcel->getProperties()->getTitle() . '&RPage &P of &N');\n\t\t// Set page orientation and size\n\t\t$this->objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\t\t$this->objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);\n\t\t// Rename worksheet\n\t\t// echo date('H:i:s') , \" Rename worksheet\" , EOL;\n\t\t$this->objPHPExcel->getActiveSheet()->setTitle($file_name);\n\t\t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n\t\t$this->objPHPExcel->setActiveSheetIndex(0);\n\t\t// download the excel file\n\t\t$this->output($file_name);\n\t}", "title": "" }, { "docid": "8334ed21fc72ed3cb1856a55a15fe1a5", "score": "0.61110526", "text": "public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th>&nbsp;\";\n print \" TErm\";\n print \"&nbsp;</th>\";\n if (!$open)\n print \"</tr>\\n\";\n }", "title": "" }, { "docid": "d9afc05ff87dc626f6e13b1cf94a0eca", "score": "0.6107194", "text": "public function setPageHeading($pageHead){ //set the page heading \n $this->pageHeading=$pageHead;\n }", "title": "" }, { "docid": "ece939f49e975b7312b9e112086a69cc", "score": "0.60823655", "text": "public function Header() {\n $bMargin = $this->getBreakMargin();\n // get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n // disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n // set bacground image\n $img_file = K_PATH_IMAGES.'Sertif.png';\n // echo($img_file);die();\n $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);\n // restore auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n // set the starting point for the page content\n $this->setPageMark();\n }", "title": "" }, { "docid": "08d8191770e043028a87dc4e220af8ff", "score": "0.60819894", "text": "protected function _drawHeader(\\Zend_Pdf_Page $page)\n {\n /* Add table head */\n $this->_setFontRegular($page, 10);\n $page->setFillColor(new \\Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\n $page->setLineColor(new \\Zend_Pdf_Color_GrayScale(0.5));\n $page->setLineWidth(0.5);\n $page->drawRectangle(25, $this->y, 570, $this->y - 15);\n $this->y -= 10;\n $page->setFillColor(new \\Zend_Pdf_Color_Rgb(0, 0, 0));\n\n //columns headers\n $lines[0][] = array(\n 'text' => 'Products',\n 'feed' => 65,\n );\n\n $lines[0][] = array(\n 'text' => 'Qty',\n 'feed' => 35\n );\n\n $lines[0][] = array(\n 'text' => 'Image',\n 'feed' => 270\n );\n\n $lines[0][] = array(\n 'text' => 'SKU',\n 'feed' => 310\n );\n\n $lines[0][] = array(\n 'text' => 'Brand',\n 'feed' => 400\n );\n\n $lines[0][] = array(\n 'text' => 'Part No',\n 'feed' => 560,\n 'align' => 'right'\n );\n\n $lineBlock = array(\n 'lines' => $lines,\n 'height' => 10\n );\n\n $this->drawLineBlocks($page, array($lineBlock), array('table_header' => true));\n $page->setFillColor(new \\Zend_Pdf_Color_GrayScale(0));\n $this->y -= 20;\n }", "title": "" }, { "docid": "781f365eea3f4991aefe7c7fd0069695", "score": "0.6077956", "text": "public function setPrintHeader($val=true) {\r\n $this->print_header = $val;\r\n }", "title": "" }, { "docid": "2fcabb357da62acc12a49b1325e785d9", "score": "0.6074246", "text": "public function Header() {\r\n if (!$this->print_header) {\r\n return;\r\n }\r\n $this->header_count++;\r\n $this->SetAutoPageBreak(false);\r\n $this->_out (\"% Beginning Header\");\r\n if (!isset($this->original_lMargin)) {\r\n $this->original_lMargin = $this->lMargin;\r\n }\r\n if (!isset($this->original_rMargin)) {\r\n $this->original_rMargin = $this->rMargin;\r\n }\r\n //set current position\r\n $this->SetXY($this->original_lMargin, $this->header_margin*$this->k);\r\n if ($this->header_logo) {\r\n $this->Image($this->header_logo, $this->original_lMargin, $this->header_margin, $this->header_logo_width);\r\n }else {\r\n $this->img_rb_y = $this->GetY();\r\n }\r\n $header_x = $this->original_lMargin + ($this->header_logo_width * 1.05); //set left margin for text data cell\r\n $this->SetXY($header_x, $this->header_margin);\r\n if (isset($this->header_font)) {\r\n $header_font = $this->header_font;\r\n } else {\r\n //use something reasonable as a fall back\r\n $header_font = array('Arial','',14);\r\n }\r\n $cell_height = $header_font[2] / $this->k;\r\n if ($this->line_spacing > 0) {\r\n $cell_height = $cell_height * $this->line_spacing;\r\n } \r\n // header title\r\n if (isset($this->header_title)) {\r\n $this->SetFont($header_font[0], 'B', $header_font[2] + 1);\r\n $this->Cell($this->header_width, $cell_height, $this->header_title, 0, 2, 'L'); \r\n }\r\n \r\n // header string\r\n if ($this->header_string) {\r\n $this->SetFont($header_font[0], $header_font[1], $header_font[2]);\r\n $this->Cell($this->header_width, $cell_height, $this->header_string, 0, 2,'L');\r\n }\r\n // print an ending header line\r\n if (empty($this->header_width)) {\r\n //set style for cell border\r\n $prev_line_width = $this->LineWidth;\r\n $this->SetLineWidth($this->LineWidth*3);\r\n $this->SetDrawColor(0, 0, 0); //black\r\n $this->SetY(1.06*max($this->img_rb_y, $this->GetY()));\r\n $this->SetX($this->original_lMargin);\r\n $this->Cell(0, 0, '', 'T', 0, 'C'); \r\n $this->SetLineWidth($prev_line_width);\r\n } \r\n //restore position\r\n $this->SetXY($this->original_lMargin, $this->tMargin);\r\n if ($this->header_count == 1 && $this->header_desc) {\r\n if (!$this->header_desc_cell instanceof I2CE_TextCell && $this->hyphen) {\r\n $fm = null;\r\n $this->header_desc_cell = new I2CE_TextCell($fm, $this->hyphen,$this->enc, $this->algorithm);\r\n if ($this->header_width > 0) {\r\n $width = $this->header_width;\r\n } else {\r\n //get all available space\r\n $width = $this->w - $this->rMargin - $this->x;\r\n }\r\n $this->header_desc_cell->setWidth($width *$this->k*1000);\r\n }\r\n $this->SetFont($header_font[0], $header_font[1], $header_font[2]/2);\r\n if ($this->header_desc_cell instanceof I2CE_TextCell) {\r\n $this->displayTextCell($this->header_desc_cell, $this->header_desc);\r\n } else {\r\n $this->Cell($this->header_width, $cell_height/2, $this->header_desc, 0, 2,'L'); \r\n }\r\n }\r\n $this->_out (\"% Ending Header\");\r\n $this->SetAutoPageBreak(true);\r\n }", "title": "" }, { "docid": "2a060777fc9281d599fdc336272f0c2e", "score": "0.60739446", "text": "function tableHeaderid($t,$cols=1,$width=500,$id){\r\n\t\tGLOBAL $_SETTINGS;\r\n\t\t$str = \"<TABLE BGCOLOR=\\\"{$_SETTINGS[\"headerColor\"][2]}\\\" class=\\\"results\\\" WIDTH=$width ALIGN=CENTER BORDER=0 CELLSPACING=0 CELLPADDING=3 id=\\\"\".$id.\"\\\">\";\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "991e05c40dea80340e692931bf3e5c53", "score": "0.60728115", "text": "protected function _drawHeader(\\Zend_Pdf_Page $page)\n {\n /* Add table head */\n $this->_setFontRegular($page, 10);\n $page->setFillColor(new \\Zend_Pdf_Color_GrayScale(1));\n\n $page->setLineColor(new \\Zend_Pdf_Color_GrayScale(0));\n $page->setLineWidth(0.5);\n $page->drawRectangle(25, $this->y, 570, $this->y - 15);\n $this->y -= 10;\n\n //columns headers\n $lines[0][] = ['text' => __('Qty'), 'feed' => 45, 'align' => 'right'];\n $lines[0][] = ['text' => __('Sku'), 'feed' => 60, 'align' => 'left'];\n $lines[0][] = ['text' => __('Supplier Sku'), 'feed' => 200, 'align' => 'left'];\n $lines[0][] = ['text' => __('Product'), 'feed' => 300, 'align' => 'left'];\n $lines[0][] = ['text' => __('Location'), 'feed' => 500, 'align' => 'left'];\n\n $lineBlock = ['lines' => $lines, 'height' => 5];\n\n $page->setFillColor(new \\Zend_Pdf_Color_GrayScale(0));\n $this->drawLineBlocks($page, [$lineBlock], ['table_header' => true]);\n $page->setFillColor(new \\Zend_Pdf_Color_GrayScale(0));\n $this->y -= 20;\n }", "title": "" }, { "docid": "16aa2720698a630b4050480b331d8c88", "score": "0.6056581", "text": "public static function heading()\n {\n echo \"<table border = '2'>\";\n echo\"<tr><th>Name</th>\n <th>Age</th></tr>\";\n }", "title": "" }, { "docid": "4f9460ddedd491ad5f246f9ba1e017a6", "score": "0.6045047", "text": "public function Header() {\n $ormargins = $this->getOriginalMargins();\n $headerfont = $this->getHeaderFont();\n $headerdata = $this->getHeaderData();\n\n if (($headerdata['logo']) AND ($headerdata['logo'] != K_BLANK_IMAGE)) {\n $logo = K_PATH_CUSTOM_IMAGES.$headerdata['logo'];\n $imsize = @getimagesize($logo);\n if ($imsize === FALSE) {\n // encode spaces on filename\n $logo = str_replace(' ', '%20', $logo);\n $imsize = @getimagesize($logo);\n if ($imsize === FALSE) {\n $logo = K_PATH_IMAGES.$headerdata['logo'];\n $imsize = @getimagesize($logo);\n }\n }\n if ( $imsize ) {\n // Print of the logo\n // The way that the 3rd and 4th parameters work in Image() is weird. I have added a case to check if\n // w and h are set as well as resize = true so that we can get what fitbox was supposed to do.\n // w and h are used as boundary sizes in this case.\n $this->Image($logo, $this->GetX(), $this->getHeaderMargin(), self::MAX_WIDTH, self::MAX_HEIGHT, '', '', '', true, self::DPI);\n }\n\n }\n // This table split the header in 3 parts of equal width. The last part (on the right) contain the header text.\n $table[0][\"logo\"]=\"\";\n $table[0][\"blank\"]=\"\";\n $table[0][\"data\"]=\"<div><font face=\\\"\".$headerfont[0].\"\\\" size=\\\"\".($headerfont[2]+1).\"\\\"><b>\".$headerdata['title'].\"</b></font></div>\".$headerdata['string'];\n $options = array(\n \"isheader\"=>false,\n );\n $this->SetTextColor(0, 0, 0);\n // header string\n $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);\n // Start overwrite\n $this->writeHTMLTable($table, false, $options);\n }", "title": "" }, { "docid": "83e4297a8f42b7e08dd53df9568e56ad", "score": "0.6040407", "text": "protected function setHeaderAndRows() {\n\t\t$this->Header = __('Course and elevation data');\n\n\t\t$this->appendRow( new SectionRouteRowElevation($this->Context) );\n\t\t$this->appendRow( new SectionRouteRowMap($this->Context) );\n\t}", "title": "" }, { "docid": "caf6d8d32201c8e393ec3dd11145cb2d", "score": "0.6037727", "text": "function headerTable($conn)\n\t{\n $datePrint=date(\"d-m-Y\");\n\t\t$query = $conn->query(\"SELECT * FROM `tbl_transaction` NATURAL JOIN `tbl_guest` \") or die(mysql_error());\n\t\t$fetch = $query->fetch_array();\n\n\t\t$this->SetFont(\"Times\",\"I\",9);\n\t\t$this->SetFont(\"Arial\",\"\",9);\n\t\t$this->Cell(7,7,\"Date \",0,0);\n\t\t$this->Cell(14,7,\": \".$datePrint,0,1);\n\t\t$this->Ln(1);\n\t}", "title": "" }, { "docid": "2300627043524e26d2102e0a87e33eb4", "score": "0.60370845", "text": "public function setPageHeading($pageHead) { //set the page heading \n $this->pageHeading = $pageHead;\n }", "title": "" }, { "docid": "946c090fbfc135583b70947e803aefee", "score": "0.6033204", "text": "public function openThead()\n {\n $this->openTag('thead');\n }", "title": "" }, { "docid": "70da00b9dbbb509c5e061489d3b11a95", "score": "0.602985", "text": "private function buildReportHeaderDetail(){\n $activeSheet = $this->phpExcel->getActiveSheet();\n $activeSheet->setCellValue(\"A1\", $this->getDocumentName());\n }", "title": "" }, { "docid": "c30c8987e27a6fceb07727efbd7a0aee", "score": "0.60284716", "text": "private function showHeader() {\r\n\t\t\t$header = '<thead>';\r\n\t\t\t\t$header .= '<tr>';\r\n\t\t\t\t\t$header .= '<th>' . 'IP' . '</th>';\r\n\t\t\t\t\t$header .= '<th>' . 'Interface' . '</th>';\r\n\t\t\t\t\t$header .= '<th>' . 'InRate' . '</th>';\r\n\t\t\t\t\t$header .= '<th>' . 'InRateAverage' . '</th>';\r\n\t\t\t\t\t$header .= '<th>' . 'OutRate' . '</th>';\r\n\t\t\t\t\t$header .= '<th>' . 'OutRateAverage' . '</th>';\r\n\t\t\t\t$header .= '</tr>';\r\n\t\t\t$header .= '</thead>';\r\n\t\t\treturn $header;\r\n\t\t}", "title": "" }, { "docid": "491b70fce65639db35690a2805e45947", "score": "0.6023147", "text": "public function header() {\n\t\t$this->tplUse('header', $this->headerValues);\n\t}", "title": "" }, { "docid": "b96a084ca6efb9c42038345afb9a0a3c", "score": "0.6007489", "text": "function toggletableHeader($cols=1,$width=500,$identifier){\r\n\r\n\t\tGLOBAL $_SETTINGS;\r\n\t\t\r\n\t\t$str = \"<TABLE class=\\\"results toggle\".$identifier.\"\\\" WIDTH=$width ALIGN=CENTER BORDER=0 CELLSPACING=0 CELLPADDING=3 style=\\\"background-color:#f2f2f2;\\\" id=\\\"\\\">\";\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "f5ec9457c7df3f7cc7a822d77c7ca5fb", "score": "0.5991817", "text": "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 40);\n\t\t$worksheet->set_column(3, 3, 15);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ - สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เงินรางวัลประจำปี (%)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"จำนวนเงิน (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t}", "title": "" }, { "docid": "176ee3f2044eba3da79dd6f5e9b5cb91", "score": "0.59901613", "text": "private function bodyHeader(){\r\n $this-> htmlElement('h1', ucfirst($this->model->pageHeader), 'text-center d-none d-md-block');\r\n }", "title": "" }, { "docid": "b810173888b504f86b2f175126ab3b23", "score": "0.59802777", "text": "function Header()\n {\n// if (is_null($this->tplId)) {\n// $this->setSourceFile('surat_pernyataan.pdf');\n// $this->tplId = $this->importPage(1);\n// }\n// $size = $this->useImportedPage($this->tplId,0, 3, 220);\n//\n// $this->SetFont('freesans', 'B', 12);\n// $this->SetTextColor(0);\n// $this->SetXY(PDF_MARGIN_LEFT, 0);\n //$this->Cell(0, $size['height'], 'TCPDF and FPDI');\n }", "title": "" }, { "docid": "b810173888b504f86b2f175126ab3b23", "score": "0.59802777", "text": "function Header()\n {\n// if (is_null($this->tplId)) {\n// $this->setSourceFile('surat_pernyataan.pdf');\n// $this->tplId = $this->importPage(1);\n// }\n// $size = $this->useImportedPage($this->tplId,0, 3, 220);\n//\n// $this->SetFont('freesans', 'B', 12);\n// $this->SetTextColor(0);\n// $this->SetXY(PDF_MARGIN_LEFT, 0);\n //$this->Cell(0, $size['height'], 'TCPDF and FPDI');\n }", "title": "" }, { "docid": "f5c50c006f09e8b221fd020603d1d184", "score": "0.5967467", "text": "function Header() {\r\n $bMargin = $this->getBreakMargin();\r\n // get current auto-page-break mode\r\n $auto_page_break = $this->AutoPageBreak;\r\n // disable auto-page-break\r\n $this->SetAutoPageBreak(false, 0);\r\n // set background image\r\n //$img_file = '../../config/templates/cmr.png';\r\n //$img_file = '../../config/templates.felis/cmr.png';\r\n $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);\r\n // restore auto-page-break status\r\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\r\n // set the starting point for the page content\r\n $this->setPageMark();\r\n }", "title": "" }, { "docid": "f01034d9e3163d8b1015f1c0c3ff7c69", "score": "0.59632194", "text": "public function setHeading($headings) {\n\n if(sizeof($headings) > 0) {\n $_heading = '';\n foreach($headings as $heading) {\n $_heading.= str_replace('{@}',$heading,$this->table_heading);\n }\n $this->table_heading = $_heading;\n } else {\n\n }\n\n }", "title": "" }, { "docid": "6c02d8bbeb14bd6e4687b6c8a33b6cd5", "score": "0.5963107", "text": "function togglertableHeader($t,$width=500,$identifier)\r\n\t{\r\n\r\n\t\tGLOBAL $_SETTINGS;\r\n\t\t\r\n\t\t$str .= \"<TABLE BGCOLOR=\\\"{$_SETTINGS[\"headerColor\"][2]}\\\" class=\\\"results\\\" WIDTH=$width ALIGN=CENTER BORDER=0 CELLSPACING=0 CELLPADDING=3 id=\\\"\\\">\";\r\n\t\t$str .= \"<TR><Td STYLE=\\\"height:30px; padding:0 3px; COLOR:#000; font-family:sans-serif; FONT-SIZE:15px;\\\"><span class=\\\"toggler\".$identifier.\" tog\\\" style=\\\"display:block;\\\"><b class=\\\"\\\" style=\\\"float:left;\\\">$t</b> <img src=\\\"images/toggle-arrow-down.png\\\" style=\\\"margin:0px; float:right;\\\"></span></Td></TR>\";\r\n\t\t$str .= \"</table>\";\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "933e2c35498f16dbe9c1abebe8ef4ae9", "score": "0.59446037", "text": "function create_table($header){\n echo'<hr/><div class=\"table-responsive\">\n <table class=\"table table-striped\" width=\"100%\">\n <thead><tr>\n <th style=\"width: 10px\">No</th>';\n\nforeach($header as $h){\n echo '<th>'.$h.'</th>';\n}\t\t\t\n\t\n echo '</tr></thead>\n <tbody></tbody>\n <tfooter><tr>\n <th style=\"width: 10px\">No</th>';\n\t\nforeach($header as $h){\n echo '<th>'.$h.'</th>';\n}\t\t\t\n\t\n echo'</tr></tfooter>\n </table>\n </div><br/>';\n}", "title": "" }, { "docid": "72da738ba00ec6069c64402511bd3655", "score": "0.5942178", "text": "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name;\n\t\t\n\t\t$worksheet->set_column(0, 0, 8);\n\t\t$worksheet->set_column(1, 1, 35);\n\t\t$worksheet->set_column(2, 2, 35);\n\t\t$worksheet->set_column(3, 3, 10);\n\t\t$worksheet->set_column(4, 4, 10);\n\t\t$worksheet->set_column(5, 5, 20);\n\t\t$worksheet->set_column(6, 6, 25);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"หน่วยงาน/ชื่อ - นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เหตุที่ไม่มีสิทธิ์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t}", "title": "" }, { "docid": "ce62436a884a2acef522a2b74fa3d8f2", "score": "0.5923124", "text": "function RowHeader($data) {\r\n\t\t$nb = 0;\r\n\t\tfor($i = 0; $i < count ( $data ); $i ++)\r\n\t\t\t$nb = max ( $nb, $this->NbLines ( $this->widths [$i], $data [$i] ) );\r\n\t\t\t$h = 5 * $nb;\r\n\t\t\t// Issue a page break first if needed\r\n\t\t\t$this->CheckPageBreak ( $h );\r\n\t\t\t// Draw the cells of the row\r\n\t\t\tfor($i = 0; $i < count ( $data ); $i ++) {\r\n\t\t\t\t$w = $this->widths [$i];\r\n\t\t\t\t$a = isset ( $this->aligns [$i] ) ? $this->aligns [$i] : 'C';\r\n\t\t\t\t// Save the current position\r\n\t\t\t\t$x = $this->GetX ();\r\n\t\t\t\t$y = $this->GetY ();\r\n\t\t\t\t// Draw the border\r\n\t\t\t\t$this->Rect ( $x, $y, $w, $h );\r\n\t\t\t\t// Print the text\r\n\t\t\t\t$this->AddFont('AvenirNextRegular','', 'AvenirNextRegular.php');\r\n\t\t\t\t$this->SetFont ( 'AvenirNextRegular', '', 12 );\r\n\t\t\t\t$this->SetTextColor ( 255, 255, 255 );\r\n\t\t\t\t$this->SetFillColor ( 136, 138, 140 );\r\n\t\t\t\t$this->MultiCell ( $w, 5, $data [$i], 'B', $a, 1 );\r\n\t\t\t\t// Put the position to the right of the cell\r\n\t\t\t\t$this->SetXY ( $x + $w, $y );\r\n\t\t\t}\r\n\t\t\t// Go to the next line\r\n\t\t\t$this->Ln ( $h );\r\n\t}", "title": "" }, { "docid": "6acf90db61fa6a4e1d5404453a6ef8af", "score": "0.592041", "text": "function tableHeaderid_1($width=500,$id){\r\n\t\tGLOBAL $_SETTINGS;\r\n\t\t$table = \"<table class=\\\"results\\\" width=\\\"\".$width.\"\\\" align=\\\"center\\\" border=0 cellspacing=\\\"0\\\" cellpadding=\\\"3\\\" id=\\\"\".$id.\"\\\">\";\r\n\t\treturn $table;\r\n\t}", "title": "" }, { "docid": "966fd4fc3e7d73fe513f2e0847f8ad03", "score": "0.5919169", "text": "public function buildThead()\n {\n\n $this->numCols = 4;\n\n if ($this->enableNav)\n ++ $this->numCols;\n\n // Creating the Head\n $html = '<thead>'.NL;\n $html .= '<tr>'.NL;\n $html .= '<th style=\"width:30px\" >Pos.</th>'.NL;\n $html .= '<th style=\"width:230px\" >User</th>'.NL;\n $html .= '<th style=\"width:70px\" >Date</th>'.NL;\n $html .= '<th style=\"width:180px\" >Step</th>'.NL;\n $html .= '<th>Comment</th>'.NL;\n $html .= '<th style=\"width:80px\" >Rating</th>'.NL;\n\n // the default navigation col\n /*\n if ($this->enableNav)\n $html .= '<th style=\"width:70px;\">'.$this->i18n->l('Nav.', 'wbf.label' ).'</th>'.NL;\n */\n\n $html .= '</tr>'.NL;\n $html .= '</thead>'.NL;\n //\\ Creating the Head\n return $html;\n\n }", "title": "" }, { "docid": "31e28d8eb7aeb320a0d56766ea0c638e", "score": "0.5899861", "text": "function insertTableHead(){\n ?>\n <thead class=\"thead-dark justify-content-center\">\n <tr>\n <th>ID</th>\n <th>Name</th>\n <th>Actor</th>\n <th>Director</th>\n <th>Genre</th>\n <th>Location</th>\n </tr>\n </thead>\n <?php\n}", "title": "" }, { "docid": "9d1f2cd42392fc00d7505a136cbd4a24", "score": "0.5895435", "text": "public function getTableHeader()\n {\n ob_start();\n ?>\n <thead>\n <?php echo $this->getTableHf(); ?>\n </thead>\n <?php\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "99ebf27e41c36f532147b789909e2f32", "score": "0.5891435", "text": "protected function _getHeader(){\n\n\t\t$tableTag = '<table' . $this->_getNonBooleanAttribs('id') . $this->_getComputedStyleAttrib(array('margin-top' => '10px')) . ' class=\"default\">';\n\n\t\tif($this->getTitle() !== ''){\n\n\t\t\treturn $tableTag . '\n\t<tr>\n\t\t<td style=\"padding-left:' . $this->_marginLeft . 'px;padding-bottom:10px;\" class=\"' . oldHtmlspecialchars(self::kTableTitle) . '\">' . oldHtmlspecialchars($this->getTitle()) . '</td>\n\t</tr>\n\t<tr>\n\t\t<td id=\"td_' . oldHtmlspecialchars($this->getId()) . '\">';\n\t\t} else {\n\n\t\t\treturn $tableTag . '\n\t<tr>\n\t\t<td id=\"td_' . oldHtmlspecialchars($this->getId()) . '\">';\n\t\t}\n\t}", "title": "" }, { "docid": "bed8c2c3b6704225f85bcd8845714b63", "score": "0.58847785", "text": "public function echo_head()\n {\n\t\t\techo '\n\t\t\t\t<th>ID</th>\n\t\t\t\t<th>ITEM_CODE</th>\n\t\t\t\t<th>ITEM</th>\n\t\t\t\t<th>QUANTITY</th>\n\t\t\t\t<th></th>\n \t';\n }", "title": "" }, { "docid": "3bd23f8ec89a370ebd612ae2f122375f", "score": "0.5867653", "text": "function updateHeader();", "title": "" }, { "docid": "0037b8b4401be4848cd3259389759919", "score": "0.5858131", "text": "function Header() {\r\n $this->SetFont('Arial','B',15);\r\n // Titre\r\n $this->Cell(0,10,'Tableau','B',0,'C');\r\n // Saut de ligne\r\n $this->Ln(20);\r\n }", "title": "" }, { "docid": "fb89aa208b5a74d2914d7498b3bae950", "score": "0.58500916", "text": "public function create_table_header($language='en', $total_items, $extended_url, $header_list_name, $header_order_slug, $order, $type='asc', $page=0, $pagination_segment, $match='-'){ \n $links='';\n //Setting default values for displaying activated headers and ordering type icons\n $header_activate= array(\n 0 => false,\n 1 => false,\n 2 => false,\n 3 => false,\n 4 => false,\n 5 => false,\n 6 => false,\n 7 => false,\n 8 => false,\n 9 => false,\n 10 => false, \n );\n\n //Pagination position\n //$page = $this->uri->segment($pagination_segment) ? $this->uri->segment($pagination_segment) : 0;\n //Creating default values for ordering types if the user gave wrong information\n if($type != 'asc' AND $type!='desc'){$type='asc';}\n\n //Creating a dynamicly generated activation for headers \n //Checking if the current order is in the list of valid header slugs\n if(in_array($order, $header_order_slug)){\n //retrieve the $key position of the current value\n $key=array_search ($order, $header_order_slug);\n //creating list and setting the value of the active header to \"true\"\n for($i=0; $i<=$total_items; $i++){\n if($i==$key){\n $header_activate[$i]=true;\n }else{\n $header_activate[$i]=false;\n } \n }\n }\n \n //Creating the user visible fully formated table links\n $links=\"<tr class=\\\"center\\\">\";\n for($i=0; $i<=$total_items; $i++){\n if($header_order_slug[$i] === false){\n $links.=\"<th class=\\\"center\\\">\".$header_list_name[$i].\"</th>\";\n }else{\n $links.= \"<th class=\\\"center\\\" style=\\\"min-width:120px;\\\">\n <a class=\\\" dark-limegreen-link\\\" href=\\\"\".base_url().$language.$extended_url.$header_order_slug[$i].\"/\".$type.\"/\".$match.\"/\".$page.\"/\\\" >\".$header_list_name[$i].\"</a> \";\n if($header_activate[$i]){\n if($type=='desc'){\n $links.=\"&nbsp;<a class=\\\" dark-limegreen-link\\\" href=\\\"\".base_url().$language.$extended_url.$order.\"/asc/\".$match.\"/\".$page.\"/\\\">\";\n $links.=\"<i class=\\\"glyphicon glyphicon-chevron-down\\\"></i>\";\n $links.=\"</a>\";\n }else{\n $links.=\"&nbsp;<a class=\\\" dark-limegreen-link\\\" href=\\\"\".base_url().$language.$extended_url.$order.\"/desc/\".$match.\"/\".$page.\"/\\\" >\";\n $links.=\"<i class=\\\"glyphicon glyphicon-chevron-up\\\"></i>\";\n $links.=\"</a>\";\n }\n } \n $links.= \"</th>\";\n } \n }\n $links.=\"</tr>\";\n return($links);\n }", "title": "" }, { "docid": "c54d031bc43583bfdfc79a8cf4bd0227", "score": "0.5848014", "text": "function Header() {\r\n $this->SetFont('Arial','B',15);\r\n\r\n // Titre\r\n $this->Cell(0,10,'Tableau','B',0,'C');\r\n\r\n // Saut de ligne\r\n $this->Ln(20);\r\n }", "title": "" }, { "docid": "0843129d78a0aaaf2c5fd1703a90a995", "score": "0.58476764", "text": "function table($data,$headers='none',$options=array()){\n\t\tglobal $table_call_count;\n\t\t$table_call_count++;\n\n\t\t$title=\t\t$options['title'];\n\t\t$footer=\t$options['footer'];\n\t\t$style=\t\t$options['style'];\n\t\t$border=\t$options['border'];\n\t\t$message=\t$options['message'];\n\t\t$cellspacing=\t$options['cellspacing'];\n\t\t$cellpadding=\t$options['cellpadding'];\n\t\t$status=\t$options['status'];\n\t\t$collapsible=\t$options['collapsible'];\n\t\t$bordercolor=\t(isset($options['bordercolor']))?$options['bordercolor']:null;\n\t\t$no_records=\t$options['nr'];\n\t\t$row_styles=\t$options['row_styles'];\n\t\t$sortable=\t$options['sortable'];\n\t\t//echo(\"<h1>EXPAND INFO:\".gp2($options[\"expand\"]).\"</h1>\");\n\t\tif(!array_key_exists('expand',$options)){$options['expand']=array();}\n\t\tif(!array_key_exists('sortable',$options)){$sortable=0;}\n\n\n\t\tif(!array_key_exists('column_style',$options)){\n\t\t\t$options['column_style']=array();\n\t\t}\n\t\tif($no_records==1 && count($data)==0){\n\t\t\t$this->log(\"NR:\".$options['title']);\n\t\t\treturn('');\n\t\t}\n\t\t//p2($options,'red');\n\t\t#echo(\"<xmp>\");\n\t\t#print_r(debug_backtrace());\n\t\t#echo(b2());\n\t\t//\t\tstd::log('TABLE HERE:'.print_r($headers,true),'COMMON');\n\t\tif(!is_array($headers) && $headers=='none'&&is_array($data)){\n\t\t\tif(array_key_exists(0,$data)&&is_array($data[0])){\n\t\t\t\t$headers=array_keys($data[0]);\n\t\t\t}else{//for keyed table info.\n\t\t\t\tforeach($data as $k=>$v){\n\t\t\t\t\t$headers=array_keys($v);\n\n\t\t\t\t\tbreak;//only once\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($sortable==1){\n\t\t\t$column_number=0;\n\t\t\tforeach($headers as $k=>$v){\n\t\t\t\t$headers[$k]=$v.'<span style=\"padding-left:5px;float:right\" onclick=\"std_sort_column(this,'.$column_number.',\\''.$style.'\\',\\'ASC\\')\"><img title=\"CLICK AQUI PARA ORDENAR\" style=\"cursor:pointer\" src=\"'.MEDIA_DIR.'/sortable/sort.png\" alt=\"&lt;&gt;\" /></span>';\n\t\t\t\t$column_number++;\n\t\t\t}\n\t\t}\n\t\t\n//\t\tstd::log('TABLE HERE:'.print_r($headers,true),'COMMON');\n//\t\tstd::log('TABLE HERE:'.print_r($data,true),'COMMON');\n\n\n\t\tif(!array_key_exists('bordercolor',$options)){\n\t\t\t$bd='';\n\t\t}else{\n\t\t\t$bd=' bordercolor=\"'.$bordercolor.'\" ';\n\t\t}\n\n\t\t$r='';\t\n\t\t$h=\"\\n<table \".$bd.' border=\"'.$border.'\" class=\"'.$style.'_table\" cellpadding=\"'.$cellpadding.'\" cellspacing=\"'.$cellspacing.'\" >';\n\t\t\n\t\t$st9=array();//custom style for this column.\n\t\t$hst9=array();//custom style for this column.\n\t\t\n\t\t$styles=array();\n\t\tforeach($data as $k8=>$v8){\n\t\t\t$h.=\"\\n\\t<colgroup>\\n\";\n\t\t\t$c=0;\n\t\t\t\n\t\t\tforeach($v8 as $k81=>$v81){\n\t\t\t\tif(!isset($options['column_style'][$k81]) || $options['column_style'][$k81]==''){//E_NOTICE\n\t\t\t\t\t$st9[$k81]='';\n\t\t\t\t\t$hst9[]='';\n\t\t\t\t}else{\n\t\t\t\t\t$st9[$k81]=' style=\"'.$options['column_style'][$k81].'\" ';\n\t\t\t\t\t$hst9[]=' style=\"'.$options['column_style'][$k81].'\" ';\n\t\t\t\t}\n\t\t\t\t$h.=\"\\n\\t\\t<col class='\".$style.\"_cell \".$style.\"_collumn_\".$c.\"' />\";\n\t\t\t\t$c++;\n\n\t\t\t}\n\t\t\t$h.=\"\\n\\t</colgroup>\\n\";\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif($collapsible==1){\n\t\t\t$title='<a href=\\'javascript:std_collapse(\"_std_table_'.$table_call_count.'\")\\'>'.$title.\"</a>\";\n\t\t}\n\t\tif($collapsible==1 && $status==0){\n\t\t\t$p0=\" style='display:none;' \";\n\t\t}else{\n\t\t\t$p0='';\n\t\t}\n\t\tif($headers != 0){\n\t\t\t$r.=\"\\n\".'<tr class=\"'.$style.'_row\" >'.\"\\n\";\n\t\t\tforeach($headers as $k=>$v){\n\t\t\t\t$r.=\"\\n\\t\" . '<th '.$hst9[$k].' class=\"'.$style.'_head standard_text\">'.\"\\n\\t\".$v.\"\\n\\t\".'</th>';\n\t\t\t}\n\t\t\t$r.=\"\\n</tr>\";\n\t\t}\n\t\t$tmax=1;\n\t\tforeach($data as $k=>$v){\n\t\t\t$row_class = $style.'_row';\n\t\t\t$row_style = '';\n\t\t\t\n\t\t\tif(is_array($row_styles) && array_key_exists($k, $row_styles )){\n\t\t\t\t$row_style='style=\"'.$row_styles[$k].'\"';\n\t\t\t}\n\n\t\t\t$r.=\"\\n\".'<tr class=\"'.$row_class.'\" '.$row_style.'>';\n\t\t\t$c=0;/*for style stuff*/\n\t\t\tif(array_key_exists($k,$options['expand'])){\n\t\t\t\t\n\n\t\t\t\t///\\todo allow ful expandion, not just 2.\n\n\t\t\t\t$r.=\"\\n\\t<!--block:$k-->\\n\\t<td colspan=100 class=\\\"\".$style.'_cell '.$style.'_collumn_'.$c.'\">'.implode(\"\",$v).'</td>';\n\t\t\t\t$c=count($v);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tforeach($v as $k1=>$field){\n\t\t\t\t\t$r.=\"\\n\\t<td \".$st9[$k1].\" class=\\\"\".$style.'_cell '.$style.'_collumn_'.$c.'\">'.$field.'</td>';\n\t\t\t\t\t$c++;\n\t\t\t\t}\n\t\t\t\t$tmax=max($c,$tmax);\n\t\t\t}\n\t\t\t$r.=\"\\n\".'</tr>';\n\t\t}\n\t\tif($collapsible==1){\n\t\t\t$iid1=\" id=\\\"_std_table_\".$table_call_count.\"\\\" \";\n\t\t}else{\n\t\t\t$iid1='';\n\t\t}\n\t\t/* no title means no space! */\n\t\tif($title!=''){\n\t\t\t$h.=\"\\n\".'<tbody><tr><td colspan='.$tmax.' class=\"standard_title '.$style.'_title\" >'.$title.'</td></tr></tbody>';\n\t\t}\n\t\t$h.=\"\\n\".'<tbody><tr><td colspan='.$tmax.' '.$style.'_message\" >'.$message.'</td></tr></tbody>';\n\t\t$h.=\"\\n\".'<tbody'.$iid1.' '.$p0.'>';\n\t\t\n\t\tif($footer!=''){\n\t\t\t$r.=\"\\n\".'<tr><td class=\"'.$style.'_foot\" colspan=\"'.$tmax.'\">'.$footer.'</td></tr>';\n\t\t}\t\t\n\t\t$r.=\"\\n\".'</tbody></table>';\n\t\treturn($h.$r);\n\t}", "title": "" }, { "docid": "6484df44b649ed9d8586fe18982c16d1", "score": "0.5843152", "text": "function tableHeader($value,$key){\n\t echo \"<th>\".ucfirst($key).\"</th>\";\n}", "title": "" }, { "docid": "d1f7929efb644077650f2b3075bf72e5", "score": "0.5840714", "text": "function heading($properties)\n {\n //going over all the column names except the ID column and making them the header\n for($count = 1 ; $count<sizeof($properties);$count++)\n {\n echo \"<th scope='col'>\".$properties[$count].\"</th>\";\n }\n // adding one to the count to calculate the colspan in case of empty table\n echo \"<th scope='col'>Book Room</th>\";\n echo \"<th scope='col'>Request Room</th>\";\n }", "title": "" }, { "docid": "7630fd01acbb00d29ff691171ddeaae4", "score": "0.5834008", "text": "function Header()\r\n{\r\n // Page header\r\n global $title;\r\n\r\n $this->SetFont('Arial','B',15);\r\n $w = $this->GetStringWidth($title)+6;\r\n $this->SetX((210-$w)/2);\r\n $this->SetDrawColor(0,80,180);\r\n $this->SetFillColor(230,230,0);\r\n $this->SetTextColor(220,50,50);\r\n $this->SetLineWidth(1);\r\n $this->Cell($w,9,$title,1,1,'C',true);\r\n $this->Ln(10);\r\n // Save ordinate\r\n $this->y0 = $this->GetY();\r\n}", "title": "" }, { "docid": "32883ac10953db342182662c99418a43", "score": "0.5831541", "text": "public function Header() {\n $bMargin = $this->getBreakMargin();\n\n // Get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n\n // Disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n\n // Define the path to the image that you want to use as watermark.\n $img_file = assets_img_url() . 'atlantykron.png';\n\n // Render the image\n $this->Image($img_file, 10, 10, 32, 19, '', '', '', false, 300, '', false, false, 0);\n\n // Restore the auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n\n // Set the starting point for the page content\n $this->setPageMark();\n }", "title": "" }, { "docid": "e10d0f08d130fa62f0868d9c253f3ead", "score": "0.58249944", "text": "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }", "title": "" }, { "docid": "505112eecf6775dbba6365e310ce751d", "score": "0.5822865", "text": "function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'FULL INDIVIDUAL INFORMATION', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 255);\n\t\t// $this->cell(0, 10, 'STUDENTS INFORMATION',0, 0, 'C');\n\t\t$this->Ln(15);\n\t}", "title": "" }, { "docid": "cbf7cebafa4204c77e9989ca9fcd2f78", "score": "0.58209664", "text": "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 28);\n\t\t$worksheet->set_column(3, 3, 28);\n\t\t$worksheet->set_column(4, 4, 28);\n\t\t$worksheet->set_column(5, 5, 28);\n\t\t$worksheet->set_column(6, 6, 28);\n\t\t$worksheet->set_column(7, 7, 12);\n\t\t$worksheet->set_column(8, 8, 18);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"สังกัดที่ขอย้ายตามลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"วันที่ขอย้าย\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"หนึ่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"สอง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"สาม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "title": "" }, { "docid": "3cfc7ed871f9f29c18b32812967332a1", "score": "0.58199245", "text": "function pi_list_header()\t{\n\t\treturn '<tr'.$this->pi_classParam(\"listrow-header\").'>\n\t\t\t\t<td nowrap><P>'.$this->getFieldHeader(\"title\").'</P></td>\n\t\t\t\t<td nowrap><P>'.$this->getFieldHeader(\"cntry\").'</P></td>\n\t\t\t\t<td nowrap><P>'.$this->getFieldHeader(\"services\").'</P></td>\n\t\t\t\t'.($this->showRef && $this->sitesMade?'<td><P>'.$this->getFieldHeader(\"references\").'</P></td>':'').'\n\t\t\t\t<td><P>'.$this->getFieldHeader(\"details\").'</P></td>\n\t\t\t</tr>';\n\t}", "title": "" }, { "docid": "07ebd1e76ecb6e50deb54362431a4662", "score": "0.5818301", "text": "function Header() {\n\t}", "title": "" }, { "docid": "5ecaf815f3e2daa8a94961600fb4c943", "score": "0.5812095", "text": "protected function _drawPackageHeader(\\Zend_Pdf_Page $page)\n {\n /* Add table head */\n $this->_setFontRegular($page, 10);\n $page->setFillColor(new \\Zend_Pdf_Color_RGB(0.93, 0.92, 0.92));\n $page->setLineColor(new \\Zend_Pdf_Color_GrayScale(0.5));\n $page->setLineWidth(0.5);\n $page->drawRectangle(25, $this->y, 570, $this->y - 15);\n $this->y -= 10;\n $page->setFillColor(new \\Zend_Pdf_Color_RGB(0, 0, 0));\n\n //columns headers\n $lines[0][] = array(\n 'text' => 'Product',\n 'feed' => 35,\n 'align' => 'left',\n );\n $lines[0][] = array(\n 'text' => 'Packaging',\n 'feed' => 280,\n );\n\n $lines[0][] = array(\n 'text' => 'Weight',\n 'feed' => 340\n );\n\n $lines[0][] = array(\n 'text' => 'Length',\n 'feed' => 400,\n );\n\n $lines[0][] = array(\n 'text' => 'Width',\n 'feed' => 460,\n );\n\n $lines[0][] = array(\n 'text' => 'Height',\n 'feed' => 560,\n 'align' => 'right',\n );\n\n $lineBlock = array(\n 'lines' => $lines,\n 'height' => 15\n );\n\n $this->drawLineBlocks($page, array($lineBlock), array('table_header' => true));\n $page->setFillColor(new \\Zend_Pdf_Color_GrayScale(0));\n $this->y -= 5;\n }", "title": "" }, { "docid": "7211b245a9a41e8dc1c640aa1550b62c", "score": "0.5805761", "text": "public function Header(){\r\n\t\t\t$this -> SetFont ( 'ARIAL' , 'B' , 0 );\r\n\t\t\t$this -> Cell( 100, 20 , \"PERSONAL\" , 0 , 0 , 'C' );\r\n\t\t\t$this -> Ln( 30 );\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "2a214f7c3421f04c8b64da6e485c9518", "score": "0.58019996", "text": "private function tabHead($thead, $class = false) {\r\n\t\t$this->out( '<thead' . ($class ? ' class=\"' . $class . '\"' : '') . '><tr>' );\r\n\t\t$count = 0;\r\n\t\tforeach ( $thead as $value )\r\n\t\t\t$this->out( '<th' . ($count ++ ? ' class=\"right\"' : '') . '>' . $value . '</th>' );\r\n\t\t$this->out( '</tr></thead>' );\r\n\t}", "title": "" }, { "docid": "5712c7a9cc11238f4af31a35ba428664", "score": "0.57994753", "text": "function Page_DataRendering(&$header)\n {\n\n // Example:\n //$header = \"your header\";\n\n }", "title": "" }, { "docid": "6e3bd6248cf0bdb24ef58b391d9a0a2c", "score": "0.57981634", "text": "function games_outRow_kidPeriodHeader($kidPeriod) {\n if ($kidPeriod->kdPer_kidPeriodId == $this->out_curKidPeriodId)\n return;\n $this->out_curKidPeriodId = $kidPeriod->kdPer_kidPeriodId;\n $curPeriodId = $kidPeriod->periodId;\n $curPeriodObj = $this->periods->periodArray[$curPeriodId];\n $this->outRowStart(); \n $this->outCell('<span style=\"display:inline-block; font-size:18pt; font-weight:bold;padding: 4pt 8pt 4pt 0pt;\">'.$kidPeriod->kdPer_kidName . ' - ' . $curPeriodObj->schoolName . ' - ' . $curPeriodObj->periodName . ' - ' . rc_getSemesterNameFromCode($curPeriodObj->semCode) . ' - ' . rc_getYearNameFromYearAndSemesterCodes($curPeriodObj->schoolYear, $curPeriodObj->semCode) . '</span>' , ' colspan=\"99\" style=\"background-color:yellow\"');\n $this->outRowEnd();\n $this->outRowStart();\n //$this->outCell($errMessage, ' colspan=\"99\" style=\"background-color:yellow\"');\n //$this->outRowEnd();\n}", "title": "" }, { "docid": "420b137578b8023e575d0266306eb6ac", "score": "0.5792988", "text": "function thead($col1, $col2, $col3, $col4, $col5, $col6) {\r\n echo \"<thead>\";\r\n echo \"<tr>\";\r\n echo \"<th>\";\r\n echo $col1;\r\n echo \"</th>\";\r\n echo \"<th>\";\r\n echo $col2;\r\n echo \"</th>\";\r\n echo \"<th>\";\r\n echo $col3;\r\n echo \"</th>\";\r\n echo \"<th>\";\r\n echo $col4;\r\n echo \"</th>\";\r\n echo \"<th>\";\r\n echo $col5;\r\n echo \"</th>\";\r\n echo \"<th>\";\r\n echo $col6;\r\n echo \"</th>\";\r\n echo \"</tr>\";\r\n}", "title": "" }, { "docid": "7826c3c434c2d734a94fb52fc13f9eba", "score": "0.57789874", "text": "public function setHeader($title, Array $table = array(), Array $attrs = array()) {\n $this->header_title = (string)$title;\n $this->header_table = $table;\n $this->header_attrs = $attrs;\n }", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.57755756", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "94cb0640f062ae19ccc682ad1ee0c2a6", "score": "0.57748073", "text": "function page_head(){}", "title": "" }, { "docid": "94cb0640f062ae19ccc682ad1ee0c2a6", "score": "0.57748073", "text": "function page_head(){}", "title": "" }, { "docid": "0b91fc7ee05c09395c5923258b694288", "score": "0.57628304", "text": "public function Header() {\n \t\t\t$ormargins = $this->getOriginalMargins();\n \t\t\t$headerfont = $this->getHeaderFont();\n \t\t\t$headerdata = $this->getHeaderData();\n \t\t\tif ($headerdata['logo'] && $headerdata['logo'] != K_BLANK_IMAGE) {\n $this->Image($headerdata['logo'], $this->GetX(), $this->getHeaderMargin(), $headerdata['logo_width'], 12);\n \t\t\t\t$imgy = $this->getImageRBY();\n \t\t\t} else {\n \t\t\t\t$imgy = $this->GetY();\n \t\t\t}\n \t\t\t$cell_height = round(($this->getCellHeightRatio() * $headerfont[2]) / $this->getScaleFactor(), 2);\n \t\t\t// set starting margin for text data cell\n \t\t\tif ($this->getRTL()) {\n \t\t\t\t$header_x = $ormargins['right'] + ($headerdata['logo_width'] * 1.1);\n \t\t\t} else {\n \t\t\t\t$header_x = $ormargins['left'] + ($headerdata['logo_width'] * 1.1);\n \t\t\t}\n \t\t\t$this->SetTextColor(0, 0, 0);\n \t\t\t// header title\n \t\t\t$this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);\n \t\t\t$this->SetX($header_x);\n \t\t\t$this->Cell(0, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);\n \t\t\t// header string\n \t\t\t$this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);\n \t\t\t$this->SetX($header_x);\n \t\t\t$this->MultiCell(0, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false);\n \t\t\t// print an ending header line\n \t\t\t$this->SetLineStyle(array('width' => 0.85 / $this->getScaleFactor(), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\n \t\t\t$this->SetY((2.835 / $this->getScaleFactor()) + max($imgy, $this->GetY()));\n \t\t\tif ($this->getRTL()) {\n \t\t\t\t$this->SetX($ormargins['right']);\n \t\t\t} else {\n \t\t\t\t$this->SetX($ormargins['left']);\n \t\t\t}\n \t\t\t$this->Cell(0, 0, '', 'T', 0, 'C');\n \t\t}", "title": "" }, { "docid": "438736b74cd5a9760f4ce1e820e4e6f0", "score": "0.5758611", "text": "function SetHeader()\n {\n $this->fill=TRUE;\n $this->align=\"C\";\n }", "title": "" }, { "docid": "0553a2bca3b5d46da9e7902eb995b8f8", "score": "0.57574296", "text": "function Header() {\n if (!empty($this->views_header)) {\n $this->writeHTML($this->views_header);\n }\n }", "title": "" }, { "docid": "1aa6c942f52ef534881f6d6c12227377", "score": "0.57477474", "text": "protected function generateHeaders(){\n foreach($this->headers as $header){\n header($header);\n }\n }", "title": "" } ]
d4401136b93589ac8518268d1e99f8aa
Use the register method to register items with the container via the protected $this>leagueContainer property or the `getLeagueContainer` method from the ContainerAwareTrait.
[ { "docid": "a1c953a0c3d30a262ab0fd6f99a38c6f", "score": "0.61290085", "text": "public function register()\n {\n $this->addShared(\n EventBus::class,\n function () {\n $bus = new SimpleEventBus();\n\n $bus->beforeFirstPublication(function (EventBus $eventBus) {\n $subscribers = $this->get('event_bus_subscribers');\n\n if (!(is_null($this->parameter('config.event_bus'))) &&\n !(is_null($this->parameter('config.event_bus.subscribers')))) {\n $subscriberIds = $this->parameter('config.event_bus.subscribers');\n $subscribers = [];\n foreach ($subscriberIds as $subscriberServiceId) {\n $subscribers[] = $this->get($subscriberServiceId);\n }\n }\n\n foreach ($subscribers as $subscriber) {\n $eventBus->subscribe($subscriber);\n }\n });\n\n return $bus;\n }\n );\n }", "title": "" } ]
[ { "docid": "8d5349117a0c0d7916328c7e25e626a9", "score": "0.6750424", "text": "public function register()\n {\n $container = $this->getContainer();\n\n $container->add(InitCommand::class)\n ->withArguments([\n \\Symfony\\Component\\Filesystem\\Filesystem::class,\n \\Symfony\\Component\\Finder\\Finder::class,\n ]);\n\n $this->getContainer()->add(BuildCommand::class)\n ->withArguments([\n Tapestry::class,\n $this->getContainer()->get('Compile.Steps'),\n ]);\n\n $container->add(SelfUpdateCommand::class)\n ->withArguments([\n \\Symfony\\Component\\Filesystem\\Filesystem::class,\n \\Symfony\\Component\\Finder\\Finder::class,\n ]);\n\n $container->share(Application::class)\n ->withArguments([\n Tapestry::class,\n [\n $container->get(InitCommand::class),\n $container->get(BuildCommand::class),\n $container->get(SelfUpdateCommand::class),\n ],\n ]);\n }", "title": "" }, { "docid": "b957fb2b3c93d4714f6191a6082f34e1", "score": "0.6742755", "text": "public function register(Container $container);", "title": "" }, { "docid": "b957fb2b3c93d4714f6191a6082f34e1", "score": "0.6742755", "text": "public function register(Container $container);", "title": "" }, { "docid": "6d44971e9bb85bcac3c9c72224c2f5d2", "score": "0.67082757", "text": "public function register()\n {\n $manager = new Manager();\n $manager->setSerializer(new JsonApiSerializer);\n\n\n\n if( isset($_GET['include']) ) {\n $manager->parseIncludes( $_GET['include'] );\n }\n\n $this->getContainer()->add(Manager::class, $manager);\n }", "title": "" }, { "docid": "690a5663e98904fa5627f4bfe68b770a", "score": "0.6695938", "text": "public function register()\n {\n $this->getContainer()->add(InitCommand::class);\n $this->getContainer()->add(DisplayCommand::class);\n\n $this->getContainer()->add(Application::class, function(){\n $cli = new Application('AzureMonitor', Monitor::VERSION);\n $cli->add($this->getContainer()->get(InitCommand::class));\n $cli->add($this->getContainer()->get(DisplayCommand::class));\n return $cli;\n });\n }", "title": "" }, { "docid": "33d267ca8ff5f47eda0f950e385233a7", "score": "0.65534794", "text": "public function register(): void\n {\n $this->getContainer()->add(Application::class, function(){\n $application = new Application($this->name, $this->version);\n\n $defaultCommands = [\n new ExampleCommand()\n ];\n\n foreach ($defaultCommands as $command)\n {\n $command->setContainer($this->container);\n $application->add($command);\n }\n return $application;\n });\n }", "title": "" }, { "docid": "769cf86e28f57695695326e66cfecfa8", "score": "0.6497083", "text": "public function register()\n {\n $container = $this->getContainer();\n\n // Get the adapter instance from the factory\n $container->add(Adapter::class, function(AdapterFactory $factory, Site $site) {\n return $factory->fromSite($site);\n })->withArgument(AdapterFactory::class)->withArgument(Site::class);\n\n // Connect to concrete5\n $container->add(Connection::class, function(Concrete5 $client, Console $console) {\n if ($result = $client->connect()) {\n $console->registerErrorHandler();\n return $result;\n }\n })->withArguments([Concrete5::class, Console::class]);\n }", "title": "" }, { "docid": "3cbcb2aa411854f94e730f4a99b25ca5", "score": "0.64858675", "text": "public function register()\n {\n $this->getContainer()->share(\n 'Aura\\Html\\Escaper',\n function () {\n $factory = new EscaperFactory();\n return $factory->newInstance();\n }\n );\n $this->getContainer()->share(\n 'Aura\\Html\\HelperLocator',\n function () {\n $factory = new HelperLocatorFactory();\n return $factory->newInstance();\n }\n );\n\n }", "title": "" }, { "docid": "fcc19cb0b0988d98e875f0de945cae7e", "score": "0.64748067", "text": "public function register()\n {\n $this->container->singleton('wpdb', function () {\n global $wpdb;\n\n return $wpdb;\n });\n\n $this->container->singleton('WP_User', function () {\n return wp_get_current_user();\n });\n\n $this->container->singleton('Tongues\\Interfaces\\WP\\User', 'Tongues\\WP\\User');\n $this->container->singleton('Tongues\\Interfaces\\WP\\Blogs', 'Tongues\\WP\\Blogs');\n }", "title": "" }, { "docid": "9a1c40da26b23924a0b8c434c4d96688", "score": "0.64504075", "text": "public function register() {\n\t\t$this->registerManager($this->app);\n\t\t$this->registerBindings($this->app);\n\t}", "title": "" }, { "docid": "cd47fe9278862f596794d2ceb5864c32", "score": "0.6423091", "text": "public function register()\n {\n $this->getContainer()->add('TestService', new \\stdClass);\n }", "title": "" }, { "docid": "d9b6b93fd1e2941c70e387ef0069bc30", "score": "0.64159626", "text": "public function register()\n {\n $this->getContainer()->add(\\App\\Utils\\Guard::class, function(){\n return new \\App\\Utils\\Guard(\n $this->getContainer()->get(EntityManagerInterface::class),\n $this->getContainer()->get('config')\n );\n });\n }", "title": "" }, { "docid": "2a337797528f092e86198a85e06093c4", "score": "0.6387809", "text": "public function register()\n {\n $this->getContainer()->add(LoggerInterface::class, Logger::class);\n }", "title": "" }, { "docid": "4a30566a1fb58cb52a3d0157f40004e5", "score": "0.63682926", "text": "public function register()\n {\n $this->app->bind('kodi.client', function($app) {\n \n return new GuzzleClient([\n 'base_uri' => 'http://'.config('kodi.host').':'.config('kodi.port').'/',\n 'timeout' => 2.0,\n ]);\n });\n \n $this->app->bind(KodiAdapter::class, function($app) {\n \n return new KodiAdapter(app('kodi.client'));\n });\n \n $this->app->bind(Kodi::class, function($app) {\n \n return new Kodi(app(KodiAdapter::class));\n });\n }", "title": "" }, { "docid": "fd51a8ff23d8e576002f7b235e8cf585", "score": "0.6348692", "text": "public function register(): void\n {\n $this->registerApiClient();\n $this->registerApiAdapter();\n $this->registerManager();\n }", "title": "" }, { "docid": "f37e6e0ad0b80dead4f17de509d6d3e7", "score": "0.6345128", "text": "public function register()\n {\n $this->app->bind(\n \\Tarach\\LSM\\Message\\Collection::IOC_ID,\n function()\n {\n return app(\\Tarach\\LSM\\Message\\Collection::class);\n }\n );\n \n $this->app->singleton(\n \\Tarach\\LSM\\SessionStorage\\ISessionStorage::IOC_ID,\n function()\n {\n return app(\\Tarach\\LSM\\SessionStorage\\LaravelStorage::class);\n }\n );\n\n $this->app->singleton(\n \\Tarach\\LSM\\Config::IOC_ID,\n function()\n {\n return app(\\Tarach\\LSM\\Config::class);\n }\n );\n }", "title": "" }, { "docid": "ad818c36ea372bb5760fd232d597f4c3", "score": "0.6344016", "text": "public function register()\n {\n // Bind any implementations.\n }", "title": "" }, { "docid": "76fa57ecbb7ada77ccb0ffacc99e11fb", "score": "0.63424855", "text": "public function register() {\n $this->app->register(\n $this->providers[$this->driver]\n );\n }", "title": "" }, { "docid": "147a2c27e18270cb9c3691f4ba7b380c", "score": "0.6338348", "text": "public function register()\n {\n\t\t$this->app->singleton(\\Webcraft\\Helpers\\Minecraft\\Query::class, function ($app) {\n\t\t\treturn new \\MinecraftQuery(config('minecraft'));\n\t\t});\n\n\t\t$this->app->singleton(\\Webcraft\\Helpers\\Minecraft\\Rcon::class, function ($app) {\n\t\t\treturn new \\MinecraftRcon(config('minecraft'));\n\t\t});\n\n\t\t$this->app->singleton(\\Webcraft\\Helpers\\Minecraft\\Websend::class, function ($app) {\n\t\t\treturn new \\Websend(config('minecraft'));\n\t\t});\n\n \t\t$this->app->singleton('template', function() {\n \t\treturn config('minecraft.template');\n \t});\n \t\n \tView::share('template', app('template'));\n }", "title": "" }, { "docid": "60f49576df038b4e0d712465e8595419", "score": "0.63379294", "text": "public function register() {\n\t\t$this->container->bind( 'FTB_Repositories_AttachmentInterface', 'FTB_Repositories_Attachment' );\n\t\t$this->container->bind( 'FTB_RestAPI_Markup_AttachmentHandlerInterface', 'FTB_RestAPI_Markup_AttachmentHandler' );\n\n\t\tadd_action( 'rest_api_init', array( $this, 'register_rest_routes' ) );\n\t}", "title": "" }, { "docid": "3395f4bae953aefd7dffeb6a673a124b", "score": "0.6329164", "text": "public function register()\n {\n Spark::useTeamModel('App\\Merchant');\n\n Spark::prefixTeamsAs('merchants');\n\n $this->app->singleton(\\Laravel\\Spark\\TeamSubscription::class, \\App\\SparkExtensions\\TeamSubscription::class);\n\n $this->app->singleton(\\Laravel\\Spark\\Interactions\\Auth\\Register::class, \\App\\SparkExtensions\\Interactions\\Auth\\Register::class);\n\n $this->registerServices();\n }", "title": "" }, { "docid": "20e2932d4785ed4881a76cfc4b99d63c", "score": "0.6291114", "text": "public function register()\n {\n foreach ($this->repositories as $interface => $implementation) {\n $this->app->bind($interface, $implementation);\n }\n }", "title": "" }, { "docid": "4fa3987612bd1c5579329af656ecbf7b", "score": "0.62882835", "text": "public function register()\n {\n // Bind our crypto currency converter instance into the IOC container\n $this->app\n ->when(CurrencyRepository::class)\n ->needs(Converter::class)\n ->give(function (Application $app) {\n return new Converter(new CoinbaseProvider(new Client(), $app->make('cache.store'), 10*60));\n });\n }", "title": "" }, { "docid": "f0faea42c9d8fa1df0c14a732541bb49", "score": "0.62870365", "text": "public function register()\n {\n if (! $this->registered) {\n $this->prependToLoaderStack();\n\n $this->registered = true;\n }\n }", "title": "" }, { "docid": "01b83bcb8153bbe8b1aeb4783e2b05b6", "score": "0.6285007", "text": "public function register()\n {\n $this->bindFactory();\n $this->bindManager();\n $this->bindOptimus();\n }", "title": "" }, { "docid": "38c8535e8fafd9a5fffa5cd4190154e5", "score": "0.62763894", "text": "public function register()\r\r\n {\r\r\n //\r\r\n }", "title": "" }, { "docid": "04c5909b490e9971bf67c5af1b011d39", "score": "0.62553865", "text": "public function register()\n {\n $this->bindModules($this->modules);\n }", "title": "" }, { "docid": "81b69d78ec071b651ab8fc4466d83b14", "score": "0.62541854", "text": "public function register()\r\n {\r\n $this->registerContainerBindings($this->app);\r\n $this->registerFacades();\r\n }", "title": "" }, { "docid": "647b0e2e4fbbdbe56c64c6fd884f771d", "score": "0.6249175", "text": "public function register()\n {\n $this->app->singleton('saga.manager', function () {\n return new SagaManager($this->app);\n });\n\n $this->app->singleton('saga.driver', function () {\n return $this->app->make('saga.manager')->driver();\n });\n\n $this->app->alias('saga.driver', RepositoryInterface::class);\n\n $this->app->bind(MetadataFactoryInterface::class, StaticallyConfiguredSagaMetadataFactory::class);\n $this->app->bind(StateManagerInterface::class, StateManager::class);\n\n $this->app->singleton(SagaInterface::class, function () {\n $sagas = array_map(function ($saga) {\n return $this->app->make($saga);\n }, config('broadway.saga.sagas', []));\n\n return new MultipleSagaManager(\n $this->app->make(RepositoryInterface::class),\n $sagas,\n $this->app->make(StateManagerInterface::class),\n $this->app->make(MetadataFactoryInterface::class),\n $this->app->make(EventDispatcher::class)\n );\n });\n\n $this->app->make(EventBus::class)->subscribe(\n $this->app->make(SagaInterface::class)\n );\n }", "title": "" }, { "docid": "a988ae76e0b56b307298fcfc0cdfd1bb", "score": "0.6233978", "text": "public function register() { }", "title": "" }, { "docid": "4bdd524866144fd7b76a9adee26857e0", "score": "0.62303287", "text": "public function register()\n {\n Helper::autoload(__DIR__ . '/../../helpers');\n\n $loader = AliasLoader::getInstance();\n $loader->alias('CustomField', CustomFieldSupportFacade::class);\n\n $this->app->bind(CustomFieldInterface::class, function () {\n return new CustomFieldCacheDecorator(\n new CustomFieldRepository(new CustomField),\n CUSTOM_FIELD_CACHE_GROUP\n );\n });\n\n $this->app->bind(FieldGroupInterface::class, function () {\n return new FieldGroupCacheDecorator(\n new FieldGroupRepository(new FieldGroup),\n CUSTOM_FIELD_CACHE_GROUP\n );\n });\n\n $this->app->bind(FieldItemInterface::class, function () {\n return new FieldItemCacheDecorator(\n new FieldItemRepository(new FieldItem),\n CUSTOM_FIELD_CACHE_GROUP\n );\n });\n }", "title": "" }, { "docid": "9030d697f5edcf94192152bc110da2f1", "score": "0.6222034", "text": "public function register()\n {\n $this->app->singleton(\n ExceptionsCodeMapping::class,\n ExceptionsHttpStatusCodeMapping::class\n );\n\n /*$this->app->singleton(\n ExceptionHandler::class,\n HexaExceptionHandler::class\n );*/\n\n $this->app->bind(\n Container::class,\n LaravelContainer::class\n );\n\n $this->app->bind(\n QueryBus::class,\n SimpleQueryBus::class\n );\n\n $this->app->bind(\n CommandBus::class,\n SimpleCommandBus::class\n );\n }", "title": "" }, { "docid": "77778b863deb1d6f369b71fe3537f584", "score": "0.6212079", "text": "public function register()\n {\n parent::register();\n\n $this->registerConfig();\n\n $this->registerSettingsManager();\n }", "title": "" }, { "docid": "434a8ba02a670f2a0d73337d21c832f0", "score": "0.62002593", "text": "public function register( )\n\t{\n\t\t$this->container->singleton( 'factual_importer', function( $app ) {\n\t\t\treturn new FactualImporter( 'factual-import', 'fetch-listings', $app['factual'] );\n\t\t});\n\n\t\t$this->container->singleton( 'settings_page', function( $app ){\n\t\t\treturn new FactualImportPage( array(\n\t\t\t\t'page_title' => 'Factual Importer',\n\t\t\t\t'menu_title' => 'Factual Importer',\n\t\t\t\t'capability' => 'manage_options',\n\t\t\t\t'menu_slug' => 'factual-importer'\n\t\t\t), $app['action_filter_controller'], $app['factual_importer'] );\n\t\t});\n\t}", "title": "" }, { "docid": "f4609c3e929a9ee0f567339a1d286985", "score": "0.6187651", "text": "public function register()\n {\n $this->bind(static::IOC_NAME,\n function($app) {\n return new InstanceApiClientService($app);\n });\n }", "title": "" }, { "docid": "b39cd7a58ca645eba93ab786d7f305fd", "score": "0.6184273", "text": "public function register()\n {\n $modules = $this->repository->enabled();\n\n $modules->each(function ($module) {\n try {\n $this->registerServiceProvider($module);\n\n $this->autoloadFiles($module);\n\n $this->setGraphQLConfig($module);\n } catch (ModuleNotFoundException $e) {\n //\n }\n });\n }", "title": "" }, { "docid": "67c58bb17a0ccdf40e5c6806947368c6", "score": "0.6170967", "text": "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "title": "" }, { "docid": "9bb441f3bfdc84d394fcc045c34c3074", "score": "0.6169449", "text": "public function register()\n {\n $this->registerBindings();\n $this->app['events']->listen(BuildingSidebar::class, RegisterVehicleSidebar::class);\n\n $this->app['events']->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) {\n $event->load('vehicles', Arr::dot(trans('vehicle::vehicles')));\n // append translations\n\n });\n }", "title": "" }, { "docid": "69d3f167e184a4c4449b045cd6a3eea6", "score": "0.616233", "text": "public function register()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "a6fa49f7bb43bd901a9605a1a586b16b", "score": "0.61614704", "text": "public function register()\n {\n // ...\n }", "title": "" }, { "docid": "a6fa49f7bb43bd901a9605a1a586b16b", "score": "0.61614704", "text": "public function register()\n {\n // ...\n }", "title": "" }, { "docid": "ae8ad78c682b21d9ff9a1954663c4437", "score": "0.61569405", "text": "public function register(): void\n {\n $this->commands($this->commands);\n }", "title": "" }, { "docid": "76d4d2f50027a840763083e2a11cb57e", "score": "0.61492765", "text": "public function register()\n {\n $this->registerCacheSystem();\n $this->registerLoaders();\n $this->registerEngine();\n }", "title": "" }, { "docid": "78079f90d9a4f9416c1604c08f8ce30a", "score": "0.61439663", "text": "public function register()\n\t\t{\n\t\t}", "title": "" }, { "docid": "c92787db16c3af2f3afbf72ef5d549a4", "score": "0.61438924", "text": "public function register()\n {\n $this->registerComponents();\n }", "title": "" }, { "docid": "c272c0e06ef5079edc81a56232d27c48", "score": "0.613767", "text": "public function register(): void\n {\n parent::register();\n }", "title": "" }, { "docid": "bf35d9d323d5e3dfc3187e1b78290b4a", "score": "0.6137258", "text": "public function register(): void\n {\n // Fractal\n $this->app->bind(\n FractalManager::class,\n function (): FractalManager {\n return (new FractalManager())->setSerializer(new Serializer)->parseIncludes(\n $this->app->make(Request::class)->input('includes', '')\n );\n }\n );\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.613671", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.613671", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.613671", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.613671", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.613671", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "76319986b6ce835601360614cee1de79", "score": "0.6135621", "text": "public function register(): void\n {\n // We only need one RestGateway for the Arbor SDK, so to avoid having to create\n // multiple instances we can register it as a singleton and bind this\n // single instance into the service container for future use.\n $this->app->singleton(RestGateway::class, function ($app) {\n return new RestGateway(config('arbor.url'), config('arbor.username'), config('arbor.password'), config('arbor.user_agent', 'Laravel Arbor'));\n });\n\n $this->app->singleton(ArborGraphQLClient::class, function () {\n return new ArborGraphQLClient(config('arbor.url') . '/graphql/query', [\n 'Authorization' => 'Basic ' . base64_encode(config('arbor.username') . ':' . config('arbor.password')),\n ]);\n });\n }", "title": "" }, { "docid": "d687dfaa843202e5aa0e49b1d86ab9f1", "score": "0.6134347", "text": "public function register()\n {\n $this->mergeConfig();\n $this->registerManager();\n $this->registerCommands();\n }", "title": "" }, { "docid": "db7949dd9a317c54a93cc6f0aac64824", "score": "0.61290056", "text": "public function register()\n\t{\n\t\tparent::register();\n\n\t\tif ($this->getConfig('enabled'))\n\t\t{\n\t\t\t$this->registerSdk();\n\n\t\t\t$this->registerPackages();\n\n\t\t\t$this->registerServices();\n\n\t\t\t$this->registerCommands();\n\n\t\t\t$this->configurePackages();\n\n\t\t\t$this->registerAfterBootCalls();\n\t\t}\n\t}", "title": "" }, { "docid": "8affe0c7586d960f01ee72687dbd2432", "score": "0.6126825", "text": "public function register()\n {\n if ($this->app['config']['translation.driver'] === 'database') {\n $this->registerDatabaseTranslator();\n } else {\n parent::register();\n }\n }", "title": "" }, { "docid": "fb3b2058470f92acbe9c54349d72df45", "score": "0.61265343", "text": "public function register()\n {\n foreach ($this->classes as $abstract => $concrete) {\n $this->app->bind($abstract, function () use ($concrete) {\n return app($concrete);\n });\n }\n }", "title": "" }, { "docid": "1957a0f52989f283f83b5833f0a64478", "score": "0.6122161", "text": "public function register()\n {\n $this->registerMySQL();\n $this->registerFilesystem();\n\n $this->container->share('download_repository', function () {\n $alias = $this->container->get('config.database_driver') . '.download_repository';\n return $this->container->get($alias);\n });\n\n $this->container->share('transfer_repository', function () {\n $alias = $this->container->get('config.database_driver') . '.transfer_repository';\n return $this->container->get($alias);\n });\n }", "title": "" }, { "docid": "83a85cf885d571fba5ef6158e29da37f", "score": "0.61183494", "text": "public function register()\r\n\t{\r\n\t\t$this->registerThemeManager();\r\n\r\n\t\t$this->registerViewFinder();\r\n\t}", "title": "" }, { "docid": "52e1f76000c7a4dd58d0778c2c21301b", "score": "0.61151236", "text": "public function register()\n {\n $this->configure();\n $this->registerCommands();\n $this->registerMacros();\n }", "title": "" }, { "docid": "417437fc4076dac4662c877381931c49", "score": "0.60982555", "text": "public function register() {\n\t\t$this->app->singleton( 'ewus', function ( $app ) {\n\t\t\t$config = $app->make( 'config' )->get( 'ewus' );\n\n\t\t\treturn new Classes\\Manager( $config );\n\t\t} );\n\t}", "title": "" }, { "docid": "259021b7fe67f03e82d47b1cdf433b7a", "score": "0.60951215", "text": "public function register()\n {\n $this->bindInstances();\n\n $this->registerFacades();\n }", "title": "" }, { "docid": "66ebfb78184021b1249d09157cd7bc62", "score": "0.60939056", "text": "public function register(): void\n {\n $this->registerSessionManager();\n $this->registerIntentManager();\n }", "title": "" }, { "docid": "88dad6a11c18c308c9b66f2c9865063f", "score": "0.6093103", "text": "public function register()\n {\n \t\n }", "title": "" }, { "docid": "c7cf44d1e49c1c47ac82b056e6a7c6a8", "score": "0.6091845", "text": "public function register()\n {\n $providers = Collection::make($this->app->make('config')->get('cms.app.providers'))\n ->partition(function ($provider) {\n return Str::startsWith($provider, 'Illuminate\\\\');\n })->collapse()->toArray();\n\n foreach ($providers as $provider) {\n $this->app->register($provider);\n }\n\n AliasLoader::getInstance($this->app->make('config')->get('cms.app.aliases', []))\n ->register();\n }", "title": "" }, { "docid": "711d79653435d68c222ea3e8ca49a32f", "score": "0.60857505", "text": "public function register() {\n\t\t//\n\t}", "title": "" }, { "docid": "711d79653435d68c222ea3e8ca49a32f", "score": "0.60857505", "text": "public function register() {\n\t\t//\n\t}", "title": "" }, { "docid": "711d79653435d68c222ea3e8ca49a32f", "score": "0.60857505", "text": "public function register() {\n\t\t//\n\t}", "title": "" }, { "docid": "711d79653435d68c222ea3e8ca49a32f", "score": "0.60857505", "text": "public function register() {\n\t\t//\n\t}", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.60857195", "text": "public function register()\n {\n //\n }", "title": "" } ]
6255722dfc04ed63e66b9e2e3661112c
/ array("title" => "Panel Title", "head_button" => "Add", "head_button_modal_id" => "modalID") $data['title'] = "Panel Title"; $data['head_button'] = "Add"; $data['head_button_modal_id'] = "modalemail";
[ { "docid": "f02ed7fcde6936526959e978d37deb32", "score": "0.0", "text": "public static function panel($data = array())\n {\n\n $data['start'] = true;\n\n $view = View::make('core::elements.panel')->with('data', $data);\n return $view;\n\n }", "title": "" } ]
[ { "docid": "aeb455fe6be6986473902fe511231b75", "score": "0.58433884", "text": "function responsive_pop_up_variable_info() {\n $variable['normal_pop_up'] = array(\n 'type' => 'fieldset',\n 'title' => t('Normal POP UP'),\n 'localize' => TRUE,\n 'group' => 'Responsive_pop_up',\n\t'description' => t('Responsive Pop Up Module')\n );\n return $variable;\n}", "title": "" }, { "docid": "1d67d8a0ebc2fd56194606a77e1bb579", "score": "0.57626694", "text": "function add_company_modal() {\n $page_data['page_name'] = 'company_add_qh_modal';\n $page_data['page_title'] = '';\n $this->load->view('backend/index', $page_data);\n}", "title": "" }, { "docid": "15a2e5935344180f65fc44cde3c0a875", "score": "0.5608849", "text": "function BeforeShowAdd(&$xt, &$templatefile, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"member_id\"] = $_SESSION[\"member_id\"];\n$rs = DB::Select(\"personal_channel\", $data );\n\nif($rs->fetchAssoc()){\n\t$pageObject->hideField(\"repeat\");\n\t$pageObject->hideField(\"repeat_type\");\n\t$pageObject->hideField(\"loop_value\");\n\treturn true;\n}else{\n\n\t//echo(now());\n\t//$dd = date('Y-m-d H:i:s', strtotime(now() . ' +1 month' ));\n\t//echo($dd);\n\n\t$message = \"Silahkan Masukkan Personal Channel Terlebih Dahulu\";\n\t$xt->assign(\"message\",$message);\n\t$pageObject->hideField(\"loop_type\");\n\t$pageObject->hideField(\"message_content\");\n\t$pageObject->hideField(\"attachment\");\n\t$pageObject->hideField(\"repeat\");\n\t$pageObject->hideField(\"repeat_type\");\n\t$pageObject->hideField(\"loop_value\");\n\t$new_variable = \"Silahkan Masukkan Personal Channel Terlebih Dahulu\";\n\t$xt->assign(\"msg_variable\",$new_variable);\n\t$pageObject->hideItem(\"add_save\");\n}\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\n//********** Display a message on the Web page ************\n\n\n\n;\t\t\n}", "title": "" }, { "docid": "af6b92677e17e5d01fb178a5a578aa22", "score": "0.55926776", "text": "function add_header_vars(&$page, $active = null) {\n global $app;\n if (!isset($active)) {\n $active = explode('/', $app->request()->getResourceUri());\n $active = $active[1];\n }\n\n $user = DatawrapperSession::getUser();\n $headlinks = array();\n $headlinks[] = array('url' => '/chart/create', 'id' => 'chart', 'title' => _('Create Chart'), 'icon' => 'pencil');\n if ($user->isLoggedIn() && $user->hasCharts()) {\n $headlinks[] = array('url' => '/mycharts', 'id' => 'mycharts', 'title' => _('My Charts'), 'icon' => 'signal');\n }\n $headlinks[] = array('url' => '/docs', 'id' => 'about', 'title' => _('About'), 'icon' => 'info-sign');\n $headlinks[] = array('url' => 'http://blog.datawrapper.de', 'id' => 'blog', 'title' => _('Blog'), 'icon' => 'tag');\n\n $headlinks[] = array(\n 'url' => '',\n 'id' => 'lang',\n 'dropdown' => array(array(\n 'url' => '#lang-de-DE',\n 'title' => 'Deutsch'\n ), array(\n 'url' => '#lang-en-GB',\n 'title' => 'English'\n ), array(\n 'url' => '#lang-fr-FR',\n 'title' => 'Français'\n )/*, array(\n 'url' => '#lang-es-ES',\n 'title' => 'Español'\n )*/),\n 'title' => _('Language'),\n 'icon' => 'font'\n );\n if ($user->isLoggedIn()) {\n $headlinks[] = array(\n 'url' => '#user',\n 'id' => 'user',\n 'title' => $user->getEmail(),\n 'icon' => 'user',\n 'dropdown' => array(array(\n 'url' => '/account/settings',\n 'icon' => 'wrench',\n 'title' => _('Settings')\n ), array(\n 'url' => '#logout',\n 'icon' => 'off',\n 'title' => _('Logout')\n ))\n );\n if ($user->isAdmin()) {\n $headlinks[] = array(\n 'url' => '/admin',\n 'id' => 'admin',\n 'icon' => 'fire',\n 'title' => _('Admin')\n );\n }\n } else {\n $headlinks[] = array(\n 'url' => '#login',\n 'id' => 'login',\n 'title' => _('Login / Sign Up'),\n 'icon' => 'user'\n );\n }\n foreach ($headlinks as $i => $link) {\n $headlinks[$i]['active'] = $headlinks[$i]['id'] == $active;\n }\n $page['headlinks'] = $headlinks;\n $page['user'] = DatawrapperSession::getUser();\n $page['language'] = substr(DatawrapperSession::getLanguage(), 0, 2);\n $page['locale'] = DatawrapperSession::getLanguage();\n $page['DW_DOMAIN'] = DW_DOMAIN;\n $page['ADMIN_EMAIL'] = ADMIN_EMAIL;\n}", "title": "" }, { "docid": "dfc259a9cff1c3f6b04faa71952739ad", "score": "0.55315995", "text": "public function getButtonData()\n {\n return [\n 'label' => __('Send Push Notification'),\n 'class' => 'save primary',\n 'data_attribute' => [\n 'mage-init' => ['button' => ['event' => 'save']],\n 'form-role' => 'save'\n ],\n 'sort_order' => 50\n ];\n }", "title": "" }, { "docid": "e08fdfa72baa048b865b1c1e49212f40", "score": "0.5493717", "text": "function set_modal_fields( $fields = array() ) {\r\n\r\n\t\tif ( empty( $fields ) ) {\r\n\t\t\t$this->modal_fields = array(\r\n\t\t\t\t'label' => __( 'Configuration', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t'id' => '108101543',\r\n\t\t\t\t'master' => 'meta_key',\r\n\t\t\t\t'tabs' => array(\r\n\t\t\t\t\t'config' => array(\r\n\t\t\t\t\t\t'label' => __( 'Config', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t'meta_key' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Meta Key', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Should be something unique and lowercase, like <code>job_pay</code>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'placeholder' => 'job_position_shift',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'type' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Type', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'placeholder' => __( 'Textbox, WP-Editor, Dropdown, Upload, etc.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => '',\r\n\t\t\t\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t\t\t\t'default' => $this->field_types()->get_field_types( FALSE, $this->list_field_group ),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'multiple' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Multiple', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Allow multiple files to be selected in select file window.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'default' => '1||Enabled',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'ajax' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Ajax', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Use built-in Ajax uploader', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'default' => '1||Enabled',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'taxonomy' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Taxonomy', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( '<a target=\"_blank\" href=\"http://codex.wordpress.org/Taxonomies\">WordPress Taxonomy</a>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'placeholder' => 'custom_taxonomy',\r\n\t\t\t\t\t\t\t\t'help' => array(\r\n\t\t\t\t\t\t\t\t\t'icon' => 'question',\r\n\t\t\t\t\t\t\t\t\t'url' => 'https://plugins.smyl.es/docs-kb/how-to-createadd-a-custom-taxonomy-to-use-with-checklist-dropdown-or-multiselect/'\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'label' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Label', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => '',\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'placeholder' => __( 'This will be the label next to or above your field.', 'wp-job-manager-field-editor' )\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'description' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Description', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => '',\r\n\t\t\t\t\t\t\t\t'type' => 'textbox',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'placeholder' => __( 'This should be the help text below the field.', 'wp-job-manager-field-editor' )\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'placeholder' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Placeholder', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => '',\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'placeholder' => __( 'This text you are reading.', 'wp-job-manager-field-editor' )\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'priority' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Priority', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Highest number will be the last field on the form, can include decimal.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => '4.5'\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'admin_only' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Visibility', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'If enabled this field will not show on frontend.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'default' => '1||Admin Only',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'required' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Required', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => '',\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'default' => '1||Required',\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\t'advanced' => array(\r\n\t\t\t\t\t\t'label' => '↳ ' . __( 'Advanced', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t'multiple' => false,\r\n\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t'default' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Default', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Default value to use for field.', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'title' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Tooltip text and/or notice shown to user when field value does not validate. Validation requires pattern field below to be set. If you do not see pattern field below the current field type does not support it.', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'maxlength' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Max Length', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Max characters allowed in field, including spaces.', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '50',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'size' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Size', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Width of input field, in characters.', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '20',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'prepend' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Prepend', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Prepend value to use for field', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'append' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Append', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Append value to use for field', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'min' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Minimum', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Smallest value allowed in field', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '0',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'max' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Maximum', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Largest value allowed in field', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '0',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'step' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Step', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Amount to increase each step when using spinner', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '1',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE,\r\n\t\t\t\t\t\t\t\t\t'help' => array(\r\n\t\t\t\t\t\t\t\t\t\t\t'icon' => 'question',\r\n\t\t\t\t\t\t\t\t\t\t\t'url' => 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#attr-step'\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'pattern' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Pattern', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Validate field value using JavaScript regular expressions. Title (from above) will be used as notice when pattern does not match. (HTML5)', 'wp-job-manager-field-editor' ) . ' ' . __( '(optional)', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE,\r\n\t\t\t\t\t\t\t\t\t'help' => array(\r\n\t\t\t\t\t\t\t\t\t\t\t'icon' => 'question',\r\n\t\t\t\t\t\t\t\t\t\t\t'url' => 'http://html5pattern.com'\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'options' => array(\r\n\t\t\t\t\t\t'label' => __( 'Options', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t'multiple' => true,\r\n\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t'option_value' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Value', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( '', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t\t'multiple' => TRUE,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'option_label' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Label', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( '', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t\t'multiple' => true,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'option_default' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Default Selection', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( '', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'class' => 'jmfe-option-default',\r\n\t\t\t\t\t\t\t\t'default' => '1||',\r\n\t\t\t\t\t\t\t\t'multiple' => TRUE,\r\n\t\t\t\t\t\t\t\t'template_style' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'option_disabled' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Disabled Option', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( '', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'class' => 'jmfe-option-disabled',\r\n\t\t\t\t\t\t\t\t'default' => '1||',\r\n\t\t\t\t\t\t\t\t'multiple' => TRUE,\r\n\t\t\t\t\t\t\t\t'template_style' => TRUE\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\t'output' => array(\r\n\t\t\t\t\t\t'label' => __( 'Output', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t'help' => array(\r\n\t\t\t\t\t\t\t'icon' => 'question',\r\n\t\t\t\t\t\t\t'url' => 'https://plugins.smyl.es/docs-kb/field-output-configuration/'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t'output' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Output', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Automatically output on the Job/Resume listing.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t\t\t\t'placeholder' => __( 'Do not automatically output the value', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'default' => $this->auto_output()->get_options( FALSE, $this->list_field_group ),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_as' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Output As', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Choose what you want the value to be output as.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t\t\t\t'default' => $this->auto_output()->get_output_as( FALSE, $this->list_field_group ),\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_priority' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Priority', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( '<strong>optional</strong>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => __( '1.5', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_caption' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Caption', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Choose what you want the value to be output as.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'My Link', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_enable_fw' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Wrap Output', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Add an HTML element wrap around entire output.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t'default' => '1||Enable',\r\n\t\t\t\t\t\t\t\t\t'hidden' => FALSE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_full_wrap' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Output Wrapper', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Specify an HTML element wrapper for entire output, such as <strong>div</strong>, or <strong>ul</strong>. Do not include brackets. Default is <code>div</code>.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'div', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => 'div',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_enable_vw' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Wrap Value', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Add an HTML element wrap around each value that is output', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t'default' => '1||Enable',\r\n\t\t\t\t\t\t\t\t\t'hidden' => FALSE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_value_wrap' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Value Wrapper', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Specify an HTML element wrapper for each value output, such as <strong>div</strong>. Do not include brackets. For list use <code>li</code>. Default is <code>div</code>.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'div', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => 'div',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_classes' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Classes', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Add any additional classes separated by spaces, only used for value wrapper element.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'my-class my-custom-class my-other-class', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_show_label' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Label', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => '',\r\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t'default' => '1||Show Label',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_label_wrap' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Label Wrapper', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Specify an HTML element wrapper for the label, such as <strong>h3</strong>, or <strong>strong</strong>. Do not include brackets, only the type of element. Default is <code>strong</code>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'strong', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'default' => 'strong',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_oembed_width' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'oEmbed Width', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Set a specific width for oEmbed (in pixels), use only numbers do not include px.', 'wp-job-manager-field-editor' ) . __( '<strong>(optional)</strong>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => '500',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_oembed_height' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'oEmbed Height', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Set a specific height for oEmbed (in pixels), use only numbers do not include px.', 'wp-job-manager-field-editor' ) . __( '<strong>(optional)</strong>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => '700',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_video_allowdl' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Allow Download', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( \"Will display a download link for browsers incompatible with HTML5 video.\", 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'default' => '1||',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'image_link' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Image Link', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( \"Will wrap the image in a link to the URL of the image.\", 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t'default' => '1||',\r\n\t\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_video_poster' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Poster URL', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( \"A URL for an image to show until the user plays or seeks. If not specified, the first frame of video will be used when it becomes available.\", 'wp-job-manager-field-editor' ) . __( '<strong>(optional)</strong>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => 'http://somedomain.com/video-poster.png',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_video_height' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Video Height', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Set a specific height for video (in pixels), use only numbers do not include px.', 'wp-job-manager-field-editor' ) . __( '<strong>(optional)</strong>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => '700',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_video_width' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Video Width', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Set a specific width for video (in pixels), use only numbers do not include px.', 'wp-job-manager-field-editor' ) . __( '<strong>(optional)</strong>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => '500',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_check_true' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Checkbox True', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Custom caption to use if checkbox field type is checked.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => __( 'Yes', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'output_check_false' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Checkbox False', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Custom caption to use if checkbox field type is not checked', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => __( 'No', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t'hidden' => TRUE\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\t'populate' => array(\r\n\t\t\t\t\t\t'label' => __( 'Populate', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t'help' => array(\r\n\t\t\t\t\t\t\t'icon' => 'question',\r\n\t\t\t\t\t\t\t'url' => 'https://plugins.smyl.es/docs-kb/auto-populate-from-user-meta-feature/'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'footer' => array(\r\n\t\t\t\t\t\t\t'content' => __( 'You can view, edit, or add user meta using my free open source <strong><a target=\"_blank\" href=\"https://wordpress.org/plugins/user-meta-display/\">User Meta Display</a></strong> plugin.', 'wp-job-manager-field-editor' )\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t'populate_save' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Auto Save', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Save the value (except default) when a listing is submitted, to the user\\'s meta.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t'default' => '1||Enable',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'populate_save_as' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Save As', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( '<strong>ONLY</strong> set this value if you want to specify a custom meta key to save the value to! Default value for this field should be blank/empty.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t\t\t'placeholder' => '_company_facebook'\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'populate_enable' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Auto Populate', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'This box must be checked to enable auto populate.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t'default' => '1||Enable',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'populate_default' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Default', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Default value for logged in users.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'populate_meta_key' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Meta Key', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'caption' => __( 'Specify the <strong>USER</strong> meta key to auto populate this field from if it exists (and user is logged in). If meta key is set and meta exists for user, it will take priority over default value.<br /><br />If using a meta key from WPJM or WPRM you <strong>must</strong> prepend it with an underscore. <i>As example, company_website would be <code>_company_website</code></i>', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'type' => 'textfield',\r\n\t\t\t\t\t\t\t\t'placeholder' => __( '_company_facebook', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t'default' => '',\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\t'multiple' => FALSE,\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\t$this->modal_fields = $fields;\r\n\t\t}\r\n\r\n\t\t// Handle packages tab in modal\r\n\t\t$packages = array();\r\n\r\n\t\tif ( defined( 'JOB_MANAGER_WCPL_VERSION' ) ) {\r\n\t\t\t// and if wcpl flow is set to before\r\n\t\t\tif ( 'before' === get_option( 'job_manager_paid_listings_flow' ) && in_array( $this->list_field_group, array('job', 'company') ) ) {\r\n\t\t\t\t$packages = WP_Job_Manager_Field_Editor_Package_WC::get_packages( FALSE, 'job' );\r\n\t\t\t} elseif ( 'before' === get_option( 'resume_manager_paid_listings_flow' ) && in_array( $this->list_field_group, array('resume', 'resume_fields') ) ) {\r\n\t\t\t\t$packages = WP_Job_Manager_Field_Editor_Package_WC::get_packages( FALSE, 'resume' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( ! empty( $packages ) ) {\r\n\t\t\t$this->modal_fields['tabs']['packages'] = array(\r\n\t\t\t\t\t'label' => __( 'Packages', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t'help' => array(\r\n\t\t\t\t\t\t\t'icon' => 'question',\r\n\t\t\t\t\t\t\t'url' => 'https://plugins.smyl.es/docs-kb/showhide-specific-fields-based-on-selected-package/'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t'packages_require' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Require', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Require specific packages to display this field', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t'default' => '1||Enable',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'packages_show' => array(\r\n\t\t\t\t\t\t\t\t\t'label' => __( 'Packages', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'caption' => __( 'Select packages you want this field to show for. Require checkbox above must be enabled for this to work.', 'wp-job-manager-field-editor' ),\r\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t'default' => $packages,\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'field_editor_default_modal_fields', $this->modal_fields);\r\n\r\n\t}", "title": "" }, { "docid": "2d3cdf1e26b4c2698ddf102b57c28e53", "score": "0.54179573", "text": "function CrearModalAmplio($id,$title,$Vector){\r\n\t\t\r\n print('<div id=\"'.$id.'\" class=\"modal fade\" role=\"dialog\" data-backdrop=\"static\" data-keyboard=\"false\" tabindex=\"-1\" style=\"width:90%;left:5%;margin:0\">');\r\n\t\t\r\n print('<div class=\"modal-dialog\">');\r\n \r\n print('<div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\">&times;</button>\r\n <h4 class=\"modal-title\">'.$title.'</h4>\r\n </div>\r\n <div class=\"modal-body\">');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "218dae8a657c550e0dd38a20502fcad2", "score": "0.5395305", "text": "function stregistry_AdminCustomButtonArray() \n{\n $buttonarray = array(\n\t\t\"Hold Domain\" => \"HoldDomain\",\n\t\t\"Unhold Domain\" => \"UnHoldDomain\",\n );\n return $buttonarray;\n}", "title": "" }, { "docid": "f836ed016d8af4a312c981a55928e0f4", "score": "0.535756", "text": "public function modalContentLink() {\n return [\n '#type' => 'container',\n 'text' => [\n '#type' => 'markup',\n '#markup' => 'Look at me in a modal!<br><a href=\"#\">And a link!</a>',\n ],\n 'input' => [\n '#type' => 'textfield',\n '#size' => 60,\n ],\n ];\n }", "title": "" }, { "docid": "6504857e51db227a49e78171df18d07c", "score": "0.5337209", "text": "function _wysiwyg_alohaeditor_button_info() {\n return array(\n // @todo\n /*'Bold' => array('title'=> 'Strong', 'css'=> 'wym_tools_strong'),\n 'ToggleHtml' => array('title'=> 'HTML', 'css'=> 'wym_tools_html'),\n 'Preview' => array('title'=> 'Preview', 'css'=> 'wym_tools_preview'),\n */\n );\n}", "title": "" }, { "docid": "0ac3bcd04ff9235da560816a12fea927", "score": "0.5328272", "text": "public function html_panel()\n\t{\n\t\t//default data\n\t\t$data = array(\n\t\t\t'url' =>false,\n\t\t\t'default_org_id'=>false,\n\t\t\t'user_name' =>false,\n\t\t\t'user_id' =>false,\n\t\t\t'org_name' =>false,\n\t\t\t'accounts' =>array()\n\t\t);\n\t\t\n\t\t//declarations\n\t\t$userid = $this->permissions_model->get_active_user();\n\t\t$orgid = $this->permissions_model->get_active_org();\n\t\t$entity = $this->org_model->get_entity_id_from_org($orgid);\n\t\t$url_data=$this->entity_model->get_entity_url($entity);\n\t\t$roles = $this->permissions_model->get_user_assignments($userid);\n\t\t$data['logo']\t= $this->org_model->get_org_logo($orgid);\n $fb_id = $this->permissions_model->get_active_fb_id();\n \n \n \n $role_names=array();\n \n foreach($roles as $r)\n {\n\t\t\tif($r['org_id']==$orgid)\n\t\t\t\t$role_names[]=$r['role_name'];\n }\n // var_dump($role_names);\n //FB_ID\n $data['fb_id'] = $fb_id;\n $data['role_names'] = $role_names;\n \n\t\t//get username\n\t\tif($userid != null && $userid != '' && $userid > 0)\n {\n $userData = $this->permissions_model->get_user_data($userid);\n if(count($userData)>0)\n {\n\t $userName = $userData[0]['person_fname'] .\" \". $userData[0]['person_lname'];\n\t $data['user_name'] = $userName;\n\t $data['default_org_id'] = $userData[0]['default_org_id'];\n\t\t\t}\n }\n $data['user_id'] = $userid;\n \n //get active org name\n foreach($roles as $role)\n\t\t{\n\t\t\t$id = $role['org_id'];\n\t\t\t$name = $role['org_name'];\n\t\t\tif($id == $orgid) $data['org_name'] = $role['org_name'];\n\t\t}\n \n //add url\n\t\tif(isset($url_data[0]['url']))\n\t\t{\n \t$url=$url_data[0]['url'];\n \t$data['url'] = $url;\n\t\t}\n \n\t\t//get account information from finance model\n $data['accounts'] = $this->finance_model->get_org_available_fund();\n \n\t\t// load view\n\t\t$this->load->view('endeavor/panel',$data);\n\t\t\t\t\n\t}", "title": "" }, { "docid": "ca835583ec1088681b3aa6a07cec430f", "score": "0.53248835", "text": "function addHeaderTitleObject()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\t\t\n\t\tif (is_array($_POST[\"title\"]))\n\t\t{\n\t\t\tforeach($_POST[\"title\"] as $k => $v) {}\n\t\t}\n\t\t$k++;\n\t\t$_POST[\"title\"][$k] = \"\";\n\t\t$this->showHeaderTitleObject(true);\n\t}", "title": "" }, { "docid": "2f9fee7b575326b783be4874516704f4", "score": "0.5321058", "text": "public function add_modal(){\n return view('backend.modules.role_management.modals.create');\n }", "title": "" }, { "docid": "e69d6bbc0139336a31c4cf4c6e9871f1", "score": "0.5308824", "text": "function _showform(){\r\n\tglobal $usertoken,$mailfrom;\r\n\tif ($usertoken['usertype_id']<5) die_red('E58:NotPossible');\r\n\t\r\n\t$obj=array();\r\n\t$obj['mailfrom']=$mailfrom;\r\n\t$obj['mailgrp']=1;\r\n\t$obj['mailmsg']='Enter Message here';\r\n\t$obj['sysurl']='lsdbMessage.php';\r\n\t\r\n\techo \"<script type=\\\"text/javascript\\\">$('#pagetitle').html('New Message');</script>\";\r\n\techo '<p style=\\'width:500px\\'>';\r\n\techo include('../forms/email.php');\r\n\techo '<table><tr><td>'._button('Send','msgsend()').'</td></tr></table></p>';\r\n}", "title": "" }, { "docid": "3d8e97dcc636aa1878b4774d1c455d05", "score": "0.5279254", "text": "function news_feed_ControlButtons() {\n $form_buttons = array();\n\n // Control button 'Update' assignment.\n $form['Ubutton'] = array(\n '#type' => 'submit',\n '#default_value' => 'Update',\n '#required' => TRUE,\n '#submit' => array('news_feed_admin_form_update'),\n );\n\n // Control button 'Delete' assignment.\n $form['Dbutton'] = array(\n '#type' => 'submit',\n '#default_value' => 'Delete',\n '#required' => TRUE,\n '#submit' => array('news_feed_admin_form_delete'),\n );\n\n // Control button 'Submit' assignment.\n $form['Sbutton'] = array(\n '#type' => 'submit',\n '#default_value' => 'Submit',\n '#required' => TRUE,\n '#submit' => array('news_feed_admin_form_submit'),\n );\n\n return $form;\n}", "title": "" }, { "docid": "f03143d339c0be964c6779f34e54e073", "score": "0.5275027", "text": "function senarai_modul(){\n $data['title'] = \"Senarai Modul\";\n $data['status'] = array(''=>'-- Sila Pilih --', 'Y'=>'Aktif', 'N'=>'Tidak Aktif'); \n $this->_render_page($data);\n }", "title": "" }, { "docid": "66d27bc02b3bf8e76d54841c406bad6d", "score": "0.5266061", "text": "function popup_elements()\n\t\t{\n\t\t\t$this->elements = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => \"Mensagem\",\n\t\t\t\t\t\"desc\" => \"Qual a mensagem?\",\n\t\t\t\t\t\"id\" => \"message\",\n\t\t\t\t\t\"type\" => \"input\",\n\t\t\t\t),\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "9d08b589165d6a0f8ae658f0dbaa7df1", "score": "0.5250714", "text": "function eddicontact_add_settings($settings) {\n \n $eddicontact_settings = array(\n\t\tarray(\n\t\t\t'id' => 'eddicontact_settings',\n\t\t\t'name' => '<strong>' . __('iContact Settings', 'eddicontact') . '</strong>',\n\t\t\t'desc' => __('Configure iContact Integration Settings', 'eddicontact'),\n\t\t\t'type' => 'header'\n\t\t),\n array(\n\t\t\t'id' => 'eddicontact_username',\n\t\t\t'name' => __('Username', 'eddicontact'),\n\t\t\t'desc' => __('Enter your iContact Username.', 'eddicontact'),\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'regular'\n\t\t),\n array(\n\t\t\t'id' => 'eddicontact_app_password',\n\t\t\t'name' => __('APP Password', 'eddicontact'),\n\t\t\t'desc' => __('Enter your iContact APP Password. It can be found in the Developer Portal after you have registered your app.', 'eddicontact'),\n\t\t\t'type' => 'password',\n\t\t\t'size' => 'regular'\n\t\t),\n array(\n\t\t\t'id' => 'eddicontact_app_id',\n\t\t\t'name' => __('APP ID', 'eddicontact'),\n\t\t\t'desc' => __('Enter your iContact APP ID. It can be found in the Developer Portal after you have registered your app.', 'eddicontact'),\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'regular'\n\t\t),\n array(\n\t\t\t'id' => 'eddicontact_account_id',\n\t\t\t'name' => __('Account ID', 'eddicontact'),\n\t\t\t'desc' => __('Enter your iContact Account ID. It can be found in the Developer Portal after you have registered your app.', 'eddicontact'),\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'regular'\n\t\t),\n array(\n\t\t\t'id' => 'eddicontact_client_folder_id',\n\t\t\t'name' => __('Client Folder ID', 'eddicontact'),\n\t\t\t'desc' => __('Enter your iContact Client Folder ID. It can be found in the Developer Portal after you have registered your app.', 'eddicontact'),\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'regular'\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'eddicontact_list_id',\n\t\t\t'name' => __('List ID', 'eddicontact'),\n\t\t\t'desc' => __('Enter your List ID. It is the numeric value of your List Name.', 'eddicontact'),\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'regular'\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'eddicontact_label',\n\t\t\t'name' => __('Checkout Label', 'eddicontact'),\n\t\t\t'desc' => __('This is the text shown next to the signup option', 'eddicontact'),\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'regular'\n\t\t)\n\t);\n\t\n\treturn array_merge($settings, $eddicontact_settings);\n}", "title": "" }, { "docid": "11a5bd7e2fea5599a02bc9776356d68d", "score": "0.52493554", "text": "private function botones($data){\n //en myconfig los botones se definen como activos\n $data['btn_read'] = str_replace('btn-xs',$data['ver_disabled']. ' btn-xs',$this->config->item('btn_read'));\n $data['btn_update'] = str_replace('btn-xs',$data['editar_disabled'].' btn-xs',$this->config->item('btn_update'));\n $data['btn_del'] = str_replace('btn-xs',$data['borrar_disabled'].' btn-xs',$this->config->item('btn_del'));\n $data['btn_crea'] = str_replace('btn-xs',$data['crear_disabled']. ' btn-xs',$this->config->item('btn_crea'));\n return $data; \n }", "title": "" }, { "docid": "2f59b615a90efe6c3a6e9c51dab8450c", "score": "0.5242912", "text": "public function modalAdd(){\n /** atribut identitas modal */\n\t\t$data = array(\n 'modalTitle' => 'Add New Device',\n 'formAction' => base_url('device/do_save'),\n\t\t\t\t'Req' => ''\n );\n /** load view untuk modal */\n\t\t$this->load->view('pages/device/modal_form', $data);\n }", "title": "" }, { "docid": "c4ae973763b359fbcc08c5fba91a65b0", "score": "0.52398807", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname']);\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'genera', 'img'=>'images/engrana.png', 'alt' => 'Generar Listado', 'label'=>'Generar Listado'));\n\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita' , 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar registro'),\n\t\t\tarray('id'=>'fborra' , 'title'=>'Eliminar registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('INVRESU', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('INVRESU', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "6f806d04e537d969ecb809bea6ec4871", "score": "0.5229241", "text": "function create_modal($args=array()) {\n\tif(!isset($args['x'])) { $args['x'] = true; }\n\tif(!isset($args['header'])) { $args['header'] = true; }\n\tif(!isset($args['body'])) { $args['body'] = true; }\n\tif(!isset($args['footer'])) { $args['footer'] = true; }\n\tif(!isset($args['btn_close'])) { $args['btn_close'] = true; }\n\t?>\n\t<div class=\"modal fade\" id=\"<?php echo $args['id']; ?>\" tabindex=\"-1\" role=\"dialog\">\n\t <div class=\"modal-dialog\" role=\"document\">\n\t <div class=\"modal-content\">\n\t \t<?php if($args['header']): ?>\n\t\t \t<div class=\"modal-header\">\n\t\t \t<?php if($args['x']): ?><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button><?php endif; ?>\n\t\t \t<?php if(isset($args['title'])): ?><h4 class=\"modal-title\" id=\"myModalLabel\"><?php echo $args['title']; ?></h4><?php endif; ?>\n\t\t \t</div>\n\t\t <?php endif; ?>\n\t\t <?php if($args['body']): ?>\n\t\t \t<div class=\"modal-body\">\n\t\t \t<?php echo $args['content']; ?>\n\t\t \t</div>\n\t\t <?php endif; ?>\n\t\t <?php if($args['footer']): ?>\n\t \t\t<div class=\"modal-footer\">\n\t \t\t<?php if(isset($args['btn'])): ?><?php echo $args['btn']; ?><?php endif; ?>\n\t \t\t</div>\n\t \t<?php endif; ?>\n\t </div>\n\t </div>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "ec3e793da7d3651544a37d656b934cbb", "score": "0.52192706", "text": "function silencio_add_tinymce_button($buttons) {\n //Add the button ID to the $button array\n $buttons[] = \"silencio_grid\";\n $buttons[] = \"silencio_table\";\n return $buttons;\n}", "title": "" }, { "docid": "0ae8b4c4acab096ee90d572ce4d3dde3", "score": "0.52171725", "text": "function um_followers_account_notification_tab( $tabs ) {\r\n\r\n\tif ( empty( $tabs[400]['notifications'] ) ) {\r\n\t\t$tabs[400]['notifications'] = array(\r\n\t\t\t'icon' => 'um-faicon-envelope',\r\n\t\t\t'title' => __( 'Notifications', 'um-followers' ),\r\n\t\t\t'submit_title' => __( 'Update Notifications', 'um-followers' ),\r\n\t\t);\r\n\t}\r\n\r\n\treturn $tabs;\r\n}", "title": "" }, { "docid": "98eeb04322c86495a2b35a06fcbbd3c6", "score": "0.52158797", "text": "function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"id_personal_repeat\"] = $values['id_group_repeat'];\n$data[\"flag\"] = \"2\";\n$rs = DB::Select(\"outbox_line\", $data );\n$rs1 = DB::Select(\"outbox_mail_alibaba\", $data );\n$rs2 = DB::Select(\"outbox_mail_aws\", $data );\n$rs3 = DB::Select(\"outbox_mail_mailchimp\", $data );\n$rs4 = DB::Select(\"outbox_telegram\", $data );\n$rs5 = DB::Select(\"outbox_whatsapp\", $data );\n\nif($rs->fetchAssoc() || $rs1->fetchAssoc() || $rs2->fetchAssoc() || $rs3->fetchAssoc() || $rs4->fetchAssoc() || $rs5->fetchAssoc()){\n\t$pageObject->hideField(\"id_group_repeat\");\n\t$pageObject->hideField(\"member_agenda_id\");\n\t$pageObject->hideField(\"dodate\");\n}\n\n\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "d5b3d3787da60ff886b0e944c1cd24e9", "score": "0.5208749", "text": "private function addData()\n\t{\n\t\t$this->data['nav_status'] = ( isset($this->data['nav_status']) && $this->data['nav_status'] == 'hide' ) ? 'hide' : 'show';\n\t\t$this->data['np_status'] = ( isset($this->data['nested_pages_status']) ) ? 'hide' : 'show';\n\t\t$this->data['linkTarget'] = ( isset($this->data['linkTarget']) ) ? '_blank' : 'none';\n\t}", "title": "" }, { "docid": "c22ff0f9e50dc6bfc15876011a4e4296", "score": "0.5205554", "text": "function setHeadStr($arr){\n\t\tforeach ($arr as $str) {\n\t\t\t$this->customHead.= $str . '\n\t\t\t';\n\t\t}\n\t}", "title": "" }, { "docid": "c5bd9206db25e4d1c1875ca795d1ca98", "score": "0.51917565", "text": "function tmprm_columns_head($defaults) { \n\t//$defaults['comment'] = 'Описание'; \n\t//$defaults['icon'] = 'Символ'; \n\t//$defaults['category'] = 'Рубрика'; \n\t//$defaults['link'] = 'Ссылка'; \n\treturn $defaults; \n}", "title": "" }, { "docid": "e953084f270097fee6937c446469fa68", "score": "0.51803213", "text": "function bs_fullscreenbuttons($buttons) {\n $buttons[] = 'separator';\n $buttons['bootstrap-shortcodes'] = array(\n 'title' => __('Bootsrap 4 Shortcodes Help'),\n 'onclick' => \"jQuery('#bootstrap-shortcodes-help').modal('show');\",\n 'both' => false \n );\n return $buttons;\n }", "title": "" }, { "docid": "74c4d2c39c903ad9540db7321ab850ce", "score": "0.5179411", "text": "function BeforeAdd(&$values, &$message, $inline, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"member_id\"] = $_SESSION[\"member_id\"];\n$rs = DB::Select(\"personal_channel\", $data );\n\nif($rs->fetchAssoc()){\n\treturn true;\n}else{\n\t$message = \"Silahkan Masukkan Personal Channel Terlebbih Dahulu\";\n\treturn false;\n}\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\n\n;\t\t\n}", "title": "" }, { "docid": "50d7ceee3c5739a008c0d5d49ad125be", "score": "0.51666075", "text": "function page_settings($view_file, $view_data, $data_name = 'result', $page_title = NULL, $model = NULL)\n {\n\tif ($data_name == NULL) {\n\t $data = $view_data;\n\t} else {\n\t $data[$data_name] = $view_data;\n\t}\n\t$data['view_file'] = $view_file;\n\t$data['page_title'] = $page_title;\n\tif ($model != NULL) {\n\t $data['module'] = $model;\n\t}\n\treturn $data;\n }", "title": "" }, { "docid": "08126a2322e6c322fe4fad618038edde", "score": "0.5162481", "text": "public function post_modal(){\n\t\t\n\t}", "title": "" }, { "docid": "a0894d1f80ba53b67ca74799606b9ca2", "score": "0.5158365", "text": "public static function hookData() {\n return array_merge_recursive( array (\n 'userBar' => \n array (\n 0 => \n array (\n 'selector' => '#elUserLink_menu > li.ipsMenu_item[data-menuitem=\\'profile\\']',\n 'type' => 'add_after',\n 'content' => '\t\t\t\t{{if \\IPS\\Member::loggedIn()->canAccessModule( \\IPS\\Application\\Module::get( \\'everpanel\\', \\'players\\', \\'front\\' ) )}}\n\t\t\t\t\t<li class=\\'ipsMenu_item\\' data-menuItem=\\'profile\\'><a href=\\'{member=\"playerUrl()\"}\\' title=\\'{lang=\"view_my_profile\"}\\'>{lang=\"menu_player_profile\"}</a></li>\n\t\t\t\t{{endif}}',\n ),\n ),\n), parent::hookData() );\n}", "title": "" }, { "docid": "e585ae2e786f8df7e759587db747cb51", "score": "0.51570857", "text": "public function create()\n {\n $this->title .= ' create';\n $this->vars = array_add($this->vars, 'menuArray', $this->menu_rep->makeArray());\n }", "title": "" }, { "docid": "a38ac73805c3a9de163eabde7c42033e", "score": "0.5155853", "text": "function CrearCuadroDeDialogoAmplio($id,$title){\r\n\t\t\r\n\t\tprint(' <div id=\"'.$id.'\" class=\"modal hide fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\" style=\" width: 95%;left:23%;\">\r\n \r\n \t\r\n <div class=\"modal-header\">\r\n\t <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">X</button>\r\n \t <h3 id=\"myModalLabel\">'.$title.'</h3>\r\n </div>\r\n <div class=\"modal-body\">\r\n \t \t\r\n\t\t\r\n ');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "3a81463d052360fbef6d832922a3c713", "score": "0.5148702", "text": "function getIrcSettingFormCfg() {\n return array(\n 'items' => array(\n 'irc_chan' => array(\n 'label' => __('IRC_CHAN'),\n 'labelFormat' => '%s : #',\n 'type' => 'text',\n 'size' => 15\n ),\n 'irc_serv' => array(\n 'label' => __('IRC_SERVER'),\n 'type' => 'text',\n 'size' => 20\n )\n ),\n 'itemsFooter' => array(\n 'submit' => array(\n 'type' => 'submit',\n 'inputClass' => array('button')\n )\n )\n );\n}", "title": "" }, { "docid": "fb405619c00c3e65a652a978daf4d284", "score": "0.51468956", "text": "public function replyToAddFormElements($oAdminPage) {\r\n $this->addFields(\r\n\r\n array(\r\n 'field_id' => 'msg',\r\n 'type' => 'label',\r\n 'description' => 'Cấu hình dữ liệu <a href=\"'.admin_url('options-general.php?page=download-attachments-options').'\" target=\"_blank\">tại đây</a>.',\r\n 'show_title_column' => false,\r\n ),\r\n array(\r\n 'field_id' => 'skin',\r\n 'type' => 'hw_skin',\r\n 'title'=> __('Giao diện'),\r\n 'description' => __('Chọn template hiển thị attachments.') ,\r\n 'external_skins_folder' => 'hw_da_skins',\r\n 'skin_filename' => 'hw-da-skin.php',\r\n 'enable_external_callback' => false,\r\n 'skins_folder' => 'skins',\r\n 'apply_current_path' => HW_DA_PLUGIN_PATH,\r\n 'plugin_url' => HW_DA_PLUGIN_URL,\r\n 'hwskin_field_output_callback' => array($this,'_hwskin_field_output'),\r\n 'set_dropdown_ddslick_setting' => array('width'=>300)\r\n ),\r\n array(\r\n 'field_id' => 'download_box_display',\r\n 'type' => 'select',\r\n 'title' => 'Hiển thị',\r\n 'label' => array(\r\n 'after_content' => __('Chèn cuối bài viết'),\r\n 'before_content' => __('Chèn trước bài viết'),\r\n 'manually' => __('Tắt tự động hiển thị')\r\n )\r\n ),\r\n array(\r\n 'field_id' => 'content_before',\r\n 'type' => 'hw_ckeditor',\r\n 'title' => 'content_before',\r\n 'description' => 'Chèn vào trước nội dung'\r\n ),\r\n array(\r\n 'field_id' => 'content_after',\r\n 'type' => 'hw_ckeditor',\r\n 'title' => 'content_after',\r\n 'description' => 'Chèn vào sau nội dung'\r\n )\r\n );\r\n }", "title": "" }, { "docid": "9c114ee44808691c7e886272c477d47b", "score": "0.5146003", "text": "public function setPanelHead_1(){\r\n if($this->loggedin){\r\n $this->panelHead_1='<h3>Plane Fan System</h3>';\r\n }\r\n else{ \r\n $this->panelHead_1='<h3>Plane Fan System</h3>';\r\n } \r\n \r\n }", "title": "" }, { "docid": "fff748702435d745f6448ae386528f93", "score": "0.5144466", "text": "private function initToolbar()\n {\n $toolbar_btn = array();\n $toolbar_btn['save'] = array('href' => '#', 'desc' => $this->l('Save'));\n return $toolbar_btn;\n }", "title": "" }, { "docid": "17f86f666484f77a8aa5cf67fd78cd64", "score": "0.514102", "text": "function addAccountPage(){\n\t$pageData['base'] = \"../\";\n\t$pageData['title'] = \"Add Account Page\";\n\t$pageData['heading'] = \"Job Tracker Add Account Page\";\n\t$pageData['nav'] = true;\n\t$pageData['content'] = file_get_contents('views/admin/add_account.html');\n\t$pageData['js'] = \"Util^general^account\";\n\t$pageData['security'] = true;\n\treturn $pageData;\n}", "title": "" }, { "docid": "89a8ac4cd338c0104d21f980937ffd9c", "score": "0.51407313", "text": "public function addon_data()\n\t{\n\t\t$this->EE->load->helper('file');\n\t\t$this->EE->load->library(\"addons\");\n\t\t$this->EE->load->library('api');\n\t\t$this->EE->api->instantiate('channel_fields');\n\n\t\t$data = array(\n\t\t\t\"native\" => array(\n\t\t\t\t\"modules\" \t\t=> array(),\n\t\t\t\t\"extensions\" \t=> array(),\n\t\t\t\t\"fieldtypes\" \t=> array(),\n\t\t\t\t\"accessories\" \t=> array(),\n\t\t\t\t\"plugins\"\t\t=> array()\n\t\t\t),\n\t\t\t\"third_party\" => array(\n\t\t\t\t\"modules\" \t\t=> array(),\n\t\t\t\t\"extensions\" \t=> array(),\n\t\t\t\t\"fieldtypes\" \t=> array(),\n\t\t\t\t\"accessories\" \t=> array(),\n\t\t\t\t\"plugins\"\t\t=> array()\n\t\t\t)\n\t\t);\n\n\n\t\t/**\n\t\t * Modules\n\t\t */\n\n\t\t// Fetch all module names from \"modules\" folder\n\t\t$installed_modules = $this->addons->get_installed();\n\t\t$modules = $this->addons->get_files();\n\n\n\t\tforeach($modules as $module => $module_info)\n\t\t{\n\t\t\t$m = array();\n\t\t\t$type = \"third_party\";\n\n\t\t\tif(@$module_info['type'] == \"native\") {\n\t\t\t\t$type = \"native\";\n\t\t\t}\n\n\t\t\t$this->lang->loadfile( $module);\n\n\t\t\t$m['label'] = (lang(strtolower($module).'_module_name') != FALSE) ? lang(strtolower($module).'_module_name') : $module_info['name'];\n\t\t\t$m['name'] = $module;\n\t\t\t$m['version'] = \"---\";\n\t\t\t$m['installed'] = FALSE;\n\t\t\t$m['has_cp_backend'] = FALSE;\n\n\t\t\tif (isset($installed_modules[$module]))\n\t\t\t{\n\t\t\t\t$m['version'] = $installed_modules[$module]['module_version'];\n\t\t\t\t$m['installed'] = TRUE;\n\n\t\t\t\tif($installed_modules[$module]['has_cp_backend'] == 'y') {\n\t\t\t\t\t$m['has_cp_backend'] = TRUE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//If uninstalled, then always set this to false to avoid unecessary UI logic\n\t\t\tif(!$m['installed']) {\n\t\t\t\t$m['has_cp_backend'] = FALSE;\n\t\t\t}\n\n\t\t\t$data[$type]['modules'][] = $m;\n\t\t}\n\n\n\t\t/**\n\t\t * Extensions\n\t\t */\n\t\t$extension_files = $this->addons->get_files('extensions');\n\t\t$installed_ext_q = $this->addons_model->get_installed_extensions();\n\t\t$installed_extensions = array();\n\n\t\tforeach ($installed_ext_q->result_array() as $row)\n\t\t{\n\t\t\t// Check the meta data\n\t\t\t$installed_extensions[$row['class']] = $row;\n\t\t}\n\n\t\tforeach ($extension_files as $ext_name => $ext) {\n\n\t\t\t$this->EE->load->add_package_path($ext['path']);\n\n\t\t\t$class_name = $ext['class'];\n\n\t\t\t//Load extension file if possible\n\t\t\tif ( ! class_exists($class_name))\n\t\t\t{\n\t\t\t\t@include($ext['path'].$ext['file']);\n\n\t\t\t\tif ( ! class_exists($class_name))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$OBJ = new $class_name();\n\n\t\t\t$e = array();\n\t\t\t$type = \"third_party\";\n\n\t\t\tif(@$ext['type'] == \"native\") {\n\t\t\t\t$type = \"native\";\n\t\t\t}\n\n\t\t\t$e['label'] = (isset($OBJ->name)) ? $OBJ->name : $extension_files[$ext_name]['name'];\n\t\t\t$e['name'] = $ext_name;\n\t\t\t$e['version'] = $OBJ->version;\n\t\t\t$e['installed'] = ( isset($installed_extensions[$ext['class']]) ) ? TRUE : FALSE;\n\t\t\t$e['has_cp_backend'] = $OBJ->settings_exist == 'y' ? TRUE : FALSE;\n\n\t\t\t//If uninstalled, then always set this to false to avoid unecessary UI logic\n\t\t\tif(!$m['installed']) {\n\t\t\t\t$m['has_cp_backend'] = FALSE;\n\t\t\t}\n\n\t\t\t$data[$type]['extensions'][] = $e;\n\t\t}\n\n\n\n\t\t/**\n\t\t * Fieldtypes\n\t\t */\n\t\t$fieldtypes = $this->EE->api_channel_fields->fetch_all_fieldtypes();\n\t\t$installed_fts = $this->EE->addons->get_installed('fieldtypes');\n\n\n\n\t\tforeach ($fieldtypes as $fieldtype => $ft_info)\n\t\t{\n\t\t\tif ($fieldtype == 'hidden')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$f = array();\n\t\t\t$type = \"third_party\";\n\n\t\t\tif(@$ft_info['type'] == \"native\") {\n\t\t\t\t$type = \"native\";\n\t\t\t}\n\n\t\t\tif(!isset($installed_fts[$fieldtype]['has_global_settings'])) {\n\t\t\t\t$installed_fts[$fieldtype]['has_global_settings'] = \"n\";\n\t\t\t}\n\n\t\t\t$f['label'] = $ft_info['name'];\n\t\t\t$f['name'] = $fieldtype;\n\t\t\t$f['version'] = $ft_info['version'];\n\t\t\t$f['installed'] = (isset($installed_fts[$fieldtype]));\n\t\t\t$f['has_cp_backend'] = $f['installed'] && $installed_fts[$fieldtype]['has_global_settings'] == \"y\" ? TRUE : FALSE;\n\n\n\t\t\t$data[$type]['fieldtypes'][] = $f;\n\t\t}\n\n\n\t\t/**\n\t\t * Plugins\n\t\t */\n\t\t$plugins = $this->_get_installed_plugins();\n\n\n\t\tforeach ($plugins as $name => $plugin) {\n\n\t\t\t$p = array();\n\t\t\t$type = \"third_party\";\n\n\t\t\tif(in_array($name, array(\"magpie\", \"xml_encode\"))) {\n\t\t\t\t$type = \"native\";\n\t\t\t}\n\n\t\t\t$p['label'] = $plugin['pi_name'];\n\t\t\t$p['name'] = $name;\n\t\t\t$p['version'] = $plugin['pi_version'];\n\t\t\t$p['installed'] = TRUE;\n\t\t\t$p['has_cp_backend'] = TRUE;\n\n\t\t\t$data[$type]['plugins'][] = $p;\n\t\t}\n\n\n\t\t/**\n\t\t * Accessories\n\t\t */\n\t\t$accessories = array();\n\t\t//$accessories = $this->addons->get_files('accessories');\n\t\t$installed = $this->addons->get_installed('accessories');\n\n\n\n\t\tforeach ($accessories as $name => $info)\n\t\t{\n\n\t\t\t// Grab the version and description\n\t\t\tif ( ! class_exists($accessories[$name]['class']))\n\t\t\t{\n\t\t\t\tinclude $accessories[$name]['path'].$accessories[$name]['file'];\n\t\t\t}\n\n\t\t\t// add the package and view paths\n\t\t\t$path = PATH_THIRD.strtolower($name).'/';\n\n\t\t\t$this->EE->load->add_package_path($path, FALSE);\n\n\t\t\t$ACC = new $accessories[$name]['class']();\n\n\t\t\t$this->EE->load->remove_package_path($path);\n\n\t\t\t$a = array();\n\t\t\t$type = \"third_party\";\n\n\t\t\tif(in_array($name, array(\"expressionengine_info\", \"news_and_stats\", \"learning\", \"quick_tips\"))) {\n\t\t\t\t$type = \"native\";\n\t\t\t}\n\t\t\t$a['label'] = $ACC->name;\n\t\t\t$a['name'] = $name;\n\t\t\t$a['version'] = $ACC->version;\n\t\t\t$a['installed'] = isset($installed[$name]);\n\t\t\t$a['has_cp_backend'] = isset($installed[$name]);\n\n\t\t\t$data[$type]['accessories'][] = $a;\n\t\t}\n\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "b27c59a56070e8d8a1af4791b0d4dd45", "score": "0.51383585", "text": "public function getButtonData()\n {\n return [\n 'label' => __('Save Service'),\n 'class' => 'save primary',\n 'data_attribute' => [\n 'mage-init' => ['button' => ['event' => 'save']],\n 'form-role' => 'save'\n ],\n 'sort_order' => 90,\n ];\n }", "title": "" }, { "docid": "f3ddba75f2dcc48790a68294e7e2538d", "score": "0.51367563", "text": "function oneportal_ClientAreaCustomButtonArray() {\n $buttonarray = array(\n\t \"Reboot Server\" => \"reboot\",\n\t \"Turn Off Server\" => \"turnoff\",\n\t \"Turn On Server\" => \"turnon\",\n\t \"Save rDNS\" => \"saverdns\"\n\t);\n\treturn $buttonarray;\n}", "title": "" }, { "docid": "44e20423678c2642057bee90797e7bbd", "score": "0.5136293", "text": "public function postHeaderEvent() {\n?>\n\t\t\t<script src='js/jquery.picklists.js' type='text/javascript'></script>\n\t\t\t\n\t\t\t<div id=\"roleDialog\" class=\"modal\">\n\t\t\t\t<form id=\"rolesForm\" name=\"rolesForm\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" id=\"actionid\" name=\"actionid\" />\n\t\t\t\t\t<input type=\"hidden\" id=\"rolecmd\" name=\"rolecmd\" value=\"X\" />\n\t\t\t\t\t<select class=\"listpicker\" name=\"roles[]\" multiple=\"true\" id=\"roles\" >\n\t\t\t\t\t\t<?php createComboOptions(\"roleid\", \"roleid\", \"{$_SESSION['DB_PREFIX']}roles\", \"\", false); ?>\n\t\t\t\t\t</select>\n\t\t\t\t</form>\n\t\t\t</div>\n<?php\n\t\t}", "title": "" }, { "docid": "40061ae163285ec43a6b448579e92ba4", "score": "0.5134273", "text": "function my_popup_page() {\n my_ctools_popup_style();\n return ctools_modal_text_button(t('Add NEW'), 'first-popup/nojs', t('test popup'), 'ctools-modal-first-popup-style');\n}", "title": "" }, { "docid": "0400b4a681621c343850723aa11edcc2", "score": "0.5125398", "text": "function edd_payza_add_settings( $settings ) {\r\n $ap_settings = array(\r\n array(\r\n 'id' => 'payza_settings',\r\n 'name' => '<strong>' . __( 'Payza Gateway Settings', 'eddap' ) . '</strong>',\r\n 'desc' => __( 'Configure your Payza Settings', 'eddap' ),\r\n 'type' => 'header'\r\n ),\r\n array(\r\n 'id' => 'payza_merchant_id',\r\n 'name' => __( 'Merchant ID', 'eddap' ),\r\n 'desc' => __( 'Enter your Payza merchant Email', 'eddap' ),\r\n 'type' => 'text',\r\n 'size' => 'regular'\r\n )\r\n );\r\n return array_merge( $settings, $ap_settings );\r\n}", "title": "" }, { "docid": "ef15e938a3e88f62397a3c85f3fb0ace", "score": "0.51222545", "text": "function news_feed_admin_form() {\n $form = array();\n\n // Dynamically changing element objects.\n $form['databaseInfo'] = news_feed_refresh();\n\n // Static control button objects.\n $form['news_feed_ControlButtons'] = news_feed_ControlButtons();\n return $form;\n}", "title": "" }, { "docid": "02478a0efd3cf3a772c846d4ed7b4819", "score": "0.51211727", "text": "function rehub_modal_window_settings( $options ) {\n return array_merge( $options, array( 'width' => 600, 'dialogClass' => 'rh-dialog' ) );\n}", "title": "" }, { "docid": "922bec55149173b391a4c2bab0eb0ca1", "score": "0.51142806", "text": "function popup_elements()\n\t\t\t{\n\t\t\t\t$this->elements = array(\n\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"type\" \t=> \"tab_container\", 'nodescription' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"type\" \t=> \"tab\",\n\t\t\t\t\t\t\t\"name\" => __(\"Content\" , 'avia_framework'),\n\t\t\t\t\t\t\t'nodescription' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\"name\" \t=> __(\"Button Title\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"This is the text that appears on your button.\", 'avia_framework' ),\n\t\t\t\t \"id\" \t=> \"label\",\n\t\t\t\t \"type\" \t=> \"input\",\n\t\t\t\t \"std\" => __(\"Click me\", 'avia_framework' )),\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t array(\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Additional Description\",'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Enter an additional description\",'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"content\",\n\t\t\t\t\t\t\t\"type\" \t=> \"textarea\",\n\t\t\t\t\t\t\t\"std\" \t=> \"\"\n\t\t\t\t\t\t\t),\n\t\t\t\t \n\t\t\t\t array(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Description position\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Show the description above or below the title?\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"description_pos\",\n\t\t\t\t\t\t\t\"type\" \t=> \"select\",\n\t\t\t\t\t\t\t\"subtype\" => array(\t\n\t\t\t\t\t\t\t\t\t\t\t\t__('Description above title', 'avia_framework' ) =>'above',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Description below title', 'avia_framework' ) =>'below',\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\"std\" \t=> \"below\"),\n\t\t\t\t \n\t\t\t\t array(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Button Link?\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Where should your button link to?\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"link\",\n\t\t\t\t\t\t\t\"type\" \t=> \"linkpicker\",\n\t\t\t\t\t\t\t\"fetchTMPL\"\t=> true,\n\t\t\t\t\t\t\t\"subtype\" => array(\t\n\t\t\t\t\t\t\t\t\t\t\t\t__('Set Manually', 'avia_framework' ) =>'manually',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Single Entry', 'avia_framework' ) =>'single',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Taxonomy Overview Page', 'avia_framework' )=>'taxonomy',\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\"std\" \t=> \"\"),\n\t\t\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Open Link in new Window?\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Select here if you want to open the linked page in a new window\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"link_target\",\n\t\t\t\t\t\t\t\"type\" \t=> \"select\",\n\t\t\t\t\t\t\t\"std\" \t=> \"\",\n\t\t\t\t\t\t\t\"subtype\" => AviaHtmlHelper::linking_options()),\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Button Icon\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Should an icon be displayed at the left side of the button\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"icon_select\",\n\t\t\t\t\t\t\t\"type\" \t=> \"select\",\n\t\t\t\t\t\t\t\"std\" \t=> \"no\",\n\t\t\t\t\t\t\t\"subtype\" => array(\n\t\t\t\t\t\t\t\t__('No Icon', 'avia_framework' ) =>'no',\n\t\t\t\t\t\t\t\t__('Yes, display Icon to the left of the title', 'avia_framework' ) => 'yes-left-icon' ,\t\n\t\t\t\t\t\t\t\t__('Yes, display Icon to the right of the title', 'avia_framework' ) =>'yes-right-icon',\n\t\t\t\t\t\t\t)),\t\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Icon Visibility\",'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Check to only display icon on hover\",'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"icon_hover\",\n\t\t\t\t\t\t\t\"type\" \t=> \"checkbox\",\n\t\t\t\t\t\t\t\"std\" \t=> \"\",\n\t\t\t\t\t\t\t\"required\" => array('icon_select','not_empty_and','no')\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Button Icon\",'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Select an icon for your Button below\",'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"icon\",\n\t\t\t\t\t\t\t\"type\" \t=> \"iconfont\",\n\t\t\t\t\t\t\t\"std\" \t=> \"\",\n\t\t\t\t\t\t\t\"required\" => array('icon_select','not_empty_and','no')\n\t\t\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"type\" \t=> \"close_div\",\n\t\t\t\t\t\t\t'nodescription' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"type\" \t=> \"tab\",\n\t\t\t\t\t\t\t\"name\"\t=> __(\"Colors\",'avia_framework' ),\n\t\t\t\t\t\t\t'nodescription' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Font Color\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Select a custom font color for your Button here\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"custom_font\",\n\t\t\t\t\t\t\t\"type\" \t=> \"colorpicker\",\n\t\t\t\t\t\t\t\"std\" \t=> \"#ffffff\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Background Color\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Choose a background color for your button here\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"color\",\n\t\t\t\t\t\t\t\"type\" \t=> \"select\",\n\t\t\t\t\t\t\t\"std\" \t=> \"theme-color\",\n\t\t\t\t\t\t\t\"subtype\" => array(\t\n\t\t\t\t\t\t\t\t\t\t\t\t__('Theme Color', 'avia_framework' )=>'theme-color',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Theme Color Highlight', 'avia_framework' )=>'theme-color-highlight',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Theme Color Subtle', 'avia_framework' )=>'theme-color-subtle',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Blue', 'avia_framework' )=>'blue',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Red', 'avia_framework' )=>'red',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Green', 'avia_framework' )=>'green',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Orange', 'avia_framework' )=>'orange',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Aqua', 'avia_framework' )=>'aqua',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Teal', 'avia_framework' )=>'teal',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Purple', 'avia_framework' )=>'purple',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Pink', 'avia_framework' )=>'pink',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Silver', 'avia_framework' )=>'silver',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Grey', 'avia_framework' )=>'grey',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Black', 'avia_framework' )=>'black',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Custom Color', 'avia_framework' )=>'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Custom Background Color\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Select a custom background color for your Button here\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"custom_bg\",\n\t\t\t\t\t\t\t\"type\" \t=> \"colorpicker\",\n\t\t\t\t\t\t\t\"std\" \t=> \"#444444\",\n\t\t\t\t\t\t\t\"required\" => array('color','equals','custom')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Background Hover Color\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Choose a background hover color for your button here\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"color_hover\",\n\t\t\t\t\t\t\t\"type\" \t=> \"select\",\n\t\t\t\t\t\t\t\"std\" \t=> \"theme-color-alternate\",\n\t\t\t\t\t\t\t\"subtype\" => array(\t\n\t\t\t\t\t\t\t\t\t\t\t\t__('Theme Color', 'avia_framework' )=>'theme-color',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Theme Color Highlight', 'avia_framework' )=>'theme-color-highlight',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Theme Color Subtle', 'avia_framework' )=>'theme-color-subtle',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Blue', 'avia_framework' )=>'blue',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Red', 'avia_framework' )=>'red',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Green', 'avia_framework' )=>'green',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Orange', 'avia_framework' )=>'orange',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Aqua', 'avia_framework' )=>'aqua',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Teal', 'avia_framework' )=>'teal',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Purple', 'avia_framework' )=>'purple',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Pink', 'avia_framework' )=>'pink',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Silver', 'avia_framework' )=>'silver',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Grey', 'avia_framework' )=>'grey',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Black', 'avia_framework' )=>'black',\n\t\t\t\t\t\t\t\t\t\t\t\t__('Custom Color', 'avia_framework' )=>'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\n\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\"name\" \t=> __(\"Custom Hover Color\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"desc\" \t=> __(\"Select a custom background color for your Button here\", 'avia_framework' ),\n\t\t\t\t\t\t\t\"id\" \t=> \"custom_bg_hover\",\n\t\t\t\t\t\t\t\"type\" \t=> \"colorpicker\",\n\t\t\t\t\t\t\t\"std\" \t=> \"#444444\",\n\t\t\t\t\t\t\t\"required\" => array('color_hover','equals','custom')\n\t\t\t\t\t\t),\n\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\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"type\" \t=> \"close_div\",\n\t\t\t\t\t\t\t'nodescription' => true\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\tarray(\n\t\t\t\t\t\t\t\t\t\"type\" \t=> \"tab\",\n\t\t\t\t\t\t\t\t\t\"name\"\t=> __(\"Screen Options\",'avia_framework' ),\n\t\t\t\t\t\t\t\t\t'nodescription' => true\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\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"name\" \t=> __(\"Element Visibility\",'avia_framework' ),\n\t\t\t\t\t\t\t\t\"desc\" \t=> __(\"Set the visibility for this element, based on the device screensize.\", 'avia_framework' ),\n\t\t\t\t\t\t\t\t\"type\" \t=> \"heading\",\n\t\t\t\t\t\t\t\t\"description_class\" => \"av-builder-note av-neutral\",\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\tarray(\t\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t=> __(\"Hide on large screens (wider than 990px - eg: Desktop)\", 'avia_framework'),\n\t\t\t\t\t\t\t\t\t\t\"id\" \t=> \"av-desktop-hide\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t=> \"\",\n\t\t\t\t\t\t\t\t\t\t\"container_class\" => 'av-multi-checkbox',\n\t\t\t\t\t\t\t\t\t\t\"type\" \t=> \"checkbox\"),\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t=> __(\"Hide on medium sized screens (between 768px and 989px - eg: Tablet Landscape)\", 'avia_framework'),\n\t\t\t\t\t\t\t\t\t\t\"id\" \t=> \"av-medium-hide\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t=> \"\",\n\t\t\t\t\t\t\t\t\t\t\"container_class\" => 'av-multi-checkbox',\n\t\t\t\t\t\t\t\t\t\t\"type\" \t=> \"checkbox\"),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t=> __(\"Hide on small screens (between 480px and 767px - eg: Tablet Portrait)\", 'avia_framework'),\n\t\t\t\t\t\t\t\t\t\t\"id\" \t=> \"av-small-hide\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t=> \"\",\n\t\t\t\t\t\t\t\t\t\t\"container_class\" => 'av-multi-checkbox',\n\t\t\t\t\t\t\t\t\t\t\"type\" \t=> \"checkbox\"),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t=> __(\"Hide on very small screens (smaller than 479px - eg: Smartphone Portrait)\", 'avia_framework'),\n\t\t\t\t\t\t\t\t\t\t\"id\" \t=> \"av-mini-hide\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t=> \"\",\n\t\t\t\t\t\t\t\t\t\t\"container_class\" => 'av-multi-checkbox',\n\t\t\t\t\t\t\t\t\t\t\"type\" \t=> \"checkbox\"),\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\"type\" \t=> \"close_div\",\n\t\t\t\t\t\t\t\t\t'nodescription' => true\n\t\t\t\t\t\t\t\t),\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"type\" \t=> \"close_div\",\n\t\t\t\t\t\t\t'nodescription' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\n\t\t\t\t);\n\n\t\t\t}", "title": "" }, { "docid": "6a1903afc7d008096cd56e43d9785f34", "score": "0.5105964", "text": "function createElement($title, $responses)\n{\n\n $html = \"<fieldset>\";\n $html .= \"<h4>\" . $title . \"</h4>\";\n $html .= \"<div>\";\n foreach ($responses as $key => $value) {\n $html .= \"<input type='\" . $value['type'] . \"' name='\" . $value['name'] . \"' id='\" . $value['id'] . \"' value='\" . $value['value'] . \"'/>\" ;\n $html .= \"<label for='\" . $value['id'] . \"'>\" . $value['content'] . \"</label>\" ;\n }\n $html .= \"</div>\";\n $html .= \"</fieldset>\";\n return $html;\n\n}", "title": "" }, { "docid": "1cfe82585b0de8cb7541f452dcd9d356", "score": "0.50997305", "text": "private function _make_row($data) {\n $options = modal_anchor(get_uri(\"payment_methods/modal_form\"), \"<i data-feather='edit' class='icon-16'></i>\", array(\"class\" => \"edit\", \"title\" => app_lang('edit_payment_method'), \"data-post-id\" => $data->id));\n\n if (!$data->online_payable) {\n $options .= js_anchor(\"<i data-feather='x' class='icon-16'></i>\", array('title' => app_lang('delete_payment_method'), \"class\" => \"delete\", \"data-id\" => $data->id, \"data-action-url\" => get_uri(\"payment_methods/delete\"), \"data-action\" => \"delete\"));\n }\n\n return array($data->title,\n $data->description,\n $data->online_payable ? ($data->available_on_invoice ? app_lang(\"yes\") : app_lang(\"no\")) : \"-\",\n $data->minimum_payment_amount ? to_decimal_format($data->minimum_payment_amount) : \"-\",\n $options\n );\n }", "title": "" }, { "docid": "e86cde4c2356cf6f57cf2cdd189a6c38", "score": "0.5096343", "text": "public function onAddTeamLink(){\n $data = post();\n $keys = array_keys($data);\n $maxid = '0';\n foreach ($keys as $key){\n if (strpos($key, 'link_id') !== false ){\n $pos[] = str_replace('link_id', '', $key);\n $maxid = str_replace('link_id', '', $key);\n }\n }\n if (isset($pos)) {\n foreach ($pos as $p){\n $team_link[$p]['id'] = $p;\n $team_link[$p]['type'] = $data['type'.$p];\n $team_link[$p]['other'] = $data['other'.$p];\n $team_link[$p]['url'] = $data['url'.$p];\n }\n }\n $maxid += 1;\n $team_link[$maxid]['id'] = $maxid;\n return ['#_teamLink' => $this->renderPartial('@_team_link.htm',['team_link' => $team_link])];\n }", "title": "" }, { "docid": "38ebec42ef30aa84398eda11c94fd310", "score": "0.5093651", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname']);\n\n\t\t//Botones Panel Izq\n\t\t//$grid->wbotonadd(array(\"id\"=>\"edocta\", \"img\"=>\"images/pdf_logo.gif\", \"alt\" => \"Formato PDF\", \"label\"=>\"Ejemplo\"));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('ZONA', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('ZONA', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "d31419dd366795c87ada914f2637f6b1", "score": "0.508726", "text": "function editor_element($params)\n {\n $heading = \"\";\n $template = $this->update_template(\"heading\", \" - <strong>{{heading}}</strong>\");\n if(!empty($params['args']['heading'])) $heading = \"- <strong>\".$params['args']['heading'].\"</strong>\";\n\n $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n $params['innerHtml'].= \"<div class='avia-element-label' {$template}>\".$heading.\"</div>\";\n\n return $params;\n }", "title": "" }, { "docid": "78bfd2ee3ace04e31ac9efe5dd706240", "score": "0.50783616", "text": "public function modalContentInput() {\n return [\n '#type' => 'container',\n 'text' => [\n '#type' => 'markup',\n '#markup' => 'Look at me in a modal!<br><a href=\"#\">And a link!</a>',\n ],\n 'input' => [\n '#type' => 'textfield',\n '#size' => 60,\n '#attributes' => [\n 'autofocus' => TRUE,\n ],\n ],\n ];\n }", "title": "" }, { "docid": "9180904d2437768aec78fcfeb161c348", "score": "0.5067237", "text": "function index(){\n\t\t$this->tpl_data[\"mod\"] = Motd::GetMessage();\n\t}", "title": "" }, { "docid": "fdbc332812ddfb2be12091f5144173ec", "score": "0.50671405", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('145');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'bimp' , 'img'=>'assets/default/images/print.png', 'alt' => 'Reiprimir Asiento', 'label'=>'Imprimir Asiento'));\n\t\t$grid->wbotonadd(array('id'=>'boton4', 'img'=>'images/checklist.png' , 'alt' => 'Auditoria' , 'label'=>'Herramientas'));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita' , 'title'=>'Agregar/Editar Pedido'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar registro')\n\t\t);\n\n\t\t//Panel Central y Sur\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$funciones = '\n\t\tfunction ltransac(el, val, opts){\n\t\t\tvar meco=\\'<div><a href=\"#\" onclick=\"tconsulta(\\'+\"\\'\"+el+\"\\'\"+\\');\">\\' +el+ \\'</a></div>\\';\n\t\t\treturn meco;\n\t\t};';\n\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('CASI', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('CASI', 'JQ');\n\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t$param['funciones'] = $funciones;\n\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "a421a995cdc0ed2b56882e7f4cd2a3ae", "score": "0.50631446", "text": "function CreaBotonDesplegable($NombreBoton,$TituloBoton,$idBoton=\"\")\r\n {\r\n\t\r\n\t\t\r\n\tprint('<li><a href=\"#'.$NombreBoton.'\" id=\"'.$idBoton.'\" role=\"button\" class=\"btn\" data-toggle=\"modal\" title=\"'.$TituloBoton.'\">\r\n\t\t\t<span class=\"badge badge-success\">'.$TituloBoton.'</span></a></li>');\r\n\r\n\t}", "title": "" }, { "docid": "9fa3e5b51a8e58cc20b52285de0d260b", "score": "0.5060901", "text": "function get_fields() {\n\t\t$basic_fields = array(\n\t\t\t'title' => array(\n\t\t\t\t'label' => esc_html__( 'Title', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Text entered here will appear as title.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'main_content',\n\t\t\t),\n\t\t\t'content' => array(\n\t\t\t\t'label' => esc_html__( 'Content', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'tiny_mce',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Content entered here will appear inside the module.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'main_content',\n\t\t\t),\n\t\t\t'button_text' => array(\n\t\t\t\t'label' => esc_html__( 'Button Text', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Input your desired button text, or leave blank for no button.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'button',\n\t\t\t),\n\t\t\t'button_url' => array(\n\t\t\t\t'label' => esc_html__( 'Button URL', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Input URL for your button.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'button',\n\t\t\t),\n\t\t\t'button_url_new_window' => array(\n\t\t\t\t'default' => 'off',\n\t\t\t\t'default_on_front'=> true,\n\t\t\t\t'label' => esc_html__( 'Url Opens', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'option_category' => 'configuration',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'off' => esc_html__( 'In The Same Window', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t'on' => esc_html__( 'In The New Tab', 'dicm-divi-custom-modules' ),\n\t\t\t\t),\n\t\t\t\t'toggle_slug' => 'button',\n\t\t\t\t'description' => esc_html__( 'Choose whether your link opens in a new window or not', 'dicm-divi-custom-modules' ),\n\t\t\t),\n\t\t);\n\n\n\t\t// All possible official field types that can be used on custom module\n\t\t$all_types_tab_slug = 'demo';\n\t\t$all_types_of_fields = array(\n\t\t\t'text' => array(\n\t\t\t\t'label' => esc_html__( 'Text', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'textarea' => array(\n\t\t\t\t'label' => esc_html__( 'Textarea', 'et_builder' ),\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'select' => array(\n\t\t\t\t'label' => esc_html__( 'Select', 'et_builder' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'off' => esc_html__( 'Close', 'et_builder' ),\n\t\t\t\t\t'on' => esc_html__( 'Open', 'et_builder' ),\n\t\t\t\t),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'toggle' => array(\n\t\t\t\t'label' => esc_html__( 'Toggle', 'et_builder' ),\n\t\t\t\t'type' => 'yes_no_button',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'on' => esc_html__( 'On', 'et_builder' ),\n\t\t\t\t\t'off' => esc_html__( 'Off', 'et_builder' ),\n\t\t\t\t),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'multiple_buttons' => array(\n\t\t\t\t'label' => esc_html__( 'Multiple Buttons', 'et_builder' ),\n\t\t\t\t'type' => 'multiple_buttons',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'horizontal' => array(\n\t\t\t\t\t\t'title' => esc_html__( 'Horizontal', 'et_builder' ),\n\t\t\t\t\t\t'icon' => 'flip-horizontally', // Any svg icon that is defined on ETBuilderIcon component\n\t\t\t\t\t),\n\t\t\t\t\t'vertical' => array(\n\t\t\t\t\t\t'title' => esc_html__( 'Vertical', 'et_builder' ),\n\t\t\t\t\t\t'icon' => 'flip-vertically', // Any svg icon that is defined on ETBuilderIcon component\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'toggleable' => true,\n\t\t\t\t'multi_selection' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'multiple_checkboxes' => array(\n\t\t\t\t'label' => esc_html__( 'Multiple Checkboxes', 'et_builder' ),\n\t\t\t\t'type' => 'multiple_checkboxes',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'option_1' => esc_html__( 'Option 1', 'et_builder' ),\n\t\t\t\t\t'option_2' => esc_html__( 'Option 2', 'et_builder' ),\n\t\t\t\t\t'option_3' => esc_html__( 'Option 3', 'et_builder' ),\n\t\t\t\t),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'input_range' => array(\n\t\t\t\t'label' => esc_html__( 'Input Range', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'range',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'input_datetime' => array(\n\t\t\t\t'label' => esc_html__( 'Input Datetime', 'et_builder' ),\n\t\t\t\t'type' => 'date_picker',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'input_margin' => array(\n\t\t\t\t'label' => esc_html__( 'Input Margin', 'et_builder' ),\n\t\t\t\t'type' => 'custom_margin',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'checkboxes_category' => array(\n\t\t\t\t'label' => esc_html__( 'Checkboxes Category', 'et_builder' ),\n\t\t\t\t'type' => 'categories',\n\t\t\t\t'taxonomy_name' => 'category',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'select_sidebar' => array(\n\t\t\t\t'label' => esc_html__( 'Select Sidebar', 'et_builder' ),\n\t\t\t\t'type' => 'select_sidebar',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'codemirror' => array(\n\t\t\t\t'label' => esc_html__( 'Codemirror', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'codemirror',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'code',\n\t\t\t),\n\t\t\t'options_list' => array(\n\t\t\t\t'label' => esc_html__( 'Options List', 'et_builder' ),\n\t\t\t\t'type' => 'options_list',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'form',\n\t\t\t),\n\t\t\t'options_list_checkbox' => array(\n\t\t\t\t'label' => esc_html__( 'Options List: Checkbox', 'et_builder' ),\n\t\t\t\t'type' => 'options_list',\n\t\t\t\t'checkbox' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'form',\n\t\t\t),\n\t\t\t'options_list_radio' => array(\n\t\t\t\t'label' => esc_html__( 'Options List: Radio', 'et_builder' ),\n\t\t\t\t'type' => 'options_list',\n\t\t\t\t'radio' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'form',\n\t\t\t),\n\t\t\t'select_fonticon' => array(\n\t\t\t\t'label' => esc_html__( 'Select Font Icon', 'et_builder' ),\n\t\t\t\t'type' => 'et_font_icon_select',\n\t\t\t\t'renderer' => 'et_pb_get_font_icon_list',\n\t\t\t\t'renderer_with_field' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'typography',\n\t\t\t),\n\t\t\t'text_align' => array(\n\t\t\t\t'label' => esc_html__( 'Text Align', 'et_builder' ),\n\t\t\t\t'type' => 'text_align',\n\t\t\t\t'options' => et_builder_get_text_orientation_options(),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'typography',\n\t\t\t),\n\t\t\t'select_font' => array(\n\t\t\t\t'label' => esc_html__( 'Select Font', 'et_builder' ),\n\t\t\t\t'type' => 'font',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'typography',\n\t\t\t),\n\t\t\t'color' => array(\n\t\t\t\t'label' => esc_html__( 'Color', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'color',\n\t\t\t),\n\t\t\t'color_alpha' => array(\n\t\t\t\t'label' => esc_html__( 'Color Alpha', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'color',\n\t\t\t),\n\t\t\t'upload' => array(\n\t\t\t\t'label' => esc_html__( 'Upload', 'et_builder' ),\n\t\t\t\t'type' => 'upload',\n\t\t\t\t'upload_button_text' => esc_attr__( 'Upload an image', 'et_builder' ),\n\t\t\t\t'choose_text' => esc_attr__( 'Choose an Image', 'et_builder' ),\n\t\t\t\t'update_text' => esc_attr__( 'Set As Image', 'et_builder' ),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'upload',\n\t\t\t),\n\t\t\t'composite_tabbed' => array(\n\t\t\t\t'label' => esc_html__( 'Composite Tabbed', 'et_builder' ),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'attr_suffix' => '',\n\t\t\t\t'type' => 'composite',\n\t\t\t\t'composite_type' => 'default',\n\t\t\t\t'composite_structure' => array(\n\t\t\t\t\t'tab_1' => array(\n\t\t\t\t\t\t'label' => esc_html( 'Tab 1', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t'controls' => array(\n\t\t\t\t\t\t\t'tab_1_text' => array(\n\t\t\t\t\t\t\t\t'label' => esc_html__( 'Text 1', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t\t\t'type' => 'text',\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'tab_2' => array(\n\t\t\t\t\t\t'label' => esc_html( 'Tab 2', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t'controls' => array(\n\t\t\t\t\t\t\t'tab_2_text' => array(\n\t\t\t\t\t\t\t\t'label' => esc_html__( 'Text 2', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'presets_shadow' => array(\n\t\t\t\t'label' => esc_html__( 'Presets', 'et_builder' ),\n\t\t\t\t'type' => 'presets_shadow',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'affects' => array(\n\t\t\t\t\t'preset_affected_1',\n\t\t\t\t\t'preset_affected_2',\n\t\t\t\t),\n\t\t\t\t'presets' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'icon' => 'none',\n\t\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t'class' => 'preset preset1',\n\t\t\t\t\t\t\t'content' => 'aA',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'preset_affected_1' => '0.1em',\n\t\t\t\t\t\t\t'preset_affected_2' => '1em',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => 'preset1'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t'class' => 'preset preset2',\n\t\t\t\t\t\t\t'content' => 'aA',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'preset_affected_1' => '0.5em',\n\t\t\t\t\t\t\t'preset_affected_2' => '5em',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => 'preset2'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'none',\n\t\t\t\t'default_on_front'=> true,\n\t\t\t),\n\t\t\t'preset_affected_1' => array(\n\t\t\t\t'label' => esc_html__( 'Preset Affected 1', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'range',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'depends_show_if_not' => 'none',\n\t\t\t\t'default' => array(\n\t\t\t\t\t'presets_shadow',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'none' => '0em',\n\t\t\t\t\t\t'preset1' => '0.1em',\n\t\t\t\t\t\t'preset2' => '0.5em',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'preset_affected_2' => array(\n\t\t\t\t'label' => esc_html__( 'Preset Affected 2', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'range',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'depends_show_if_not' => 'none',\n\t\t\t\t'default' => array(\n\t\t\t\t\t'presets_shadow',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'none' => '0em',\n\t\t\t\t\t\t'preset1' => '1em',\n\t\t\t\t\t\t'preset2' => '5em',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn array_merge( $basic_fields, $all_types_of_fields );\n\t}", "title": "" }, { "docid": "d37ecce4ef351818b4cda45a8109fd95", "score": "0.50600195", "text": "function getModuleData($position) {\r\n\t$module = Array();\r\n\t$module['id'] = 0;\r\n\t$module['title'] = \"'Sample data'\";\r\n\t$module['note'] = \"''\";\r\n\t$module['content'] = \"'<p><img align=\\\"left\\\" src=\\\"administrator/templates/bluestork/images/header/icon-48-themes.png\\\" border=\\\"0\\\" />Joomla! is a flexible and powerful platform, whether you are building a small site for yourself or a huge site with hundreds of thousands of visitors. <a href=\\\"#\\\">Joomla</a> is open source, which means you can make it work just the way you want it to.</p><div style=\\\"clear:both;\\\"></div>'\";\r\n\t$module['ordering'] = 1;\r\n\t$module['position'] = \"'\".$position.\"'\";\r\n\t$module['checked_out '] = 0;\r\n\t$module['checked_out_time'] = \"'0000-00-00 00:00:00'\";\r\n\t$module['publish_up '] = \"'0000-00-00 00:00:00'\";\r\n\t$module['publish_down '] = \"'0000-00-00 00:00:00'\";\r\n\t$module['published'] = 1;\r\n\t$module['module'] = \"'mod_custom'\";\r\n\t$module['access'] = 1;\r\n\t$module['showtitle'] = 1;\r\n\t$module['params'] = \"''\";\r\n\t$module['client_id '] = 0;\r\n\t$module['language'] = \"'*'\";\r\n\t\r\n\treturn $module;\r\n}", "title": "" }, { "docid": "6c5eb44370e754698a8da07e2dceb761", "score": "0.50541717", "text": "function extension_array( ){\n\n\tglobal $extension_control;\n\n\t$d = array(\n\t\t'Sections' => array(\n\t\t\t'icon'\t\t=> PL_ADMIN_ICONS.'/dragdrop.png',\n\t\t\t'htabs' \t=> array(\n\t\t\t\t\t'get_new_sections'\t=> store_subtabs('section'),\n\t\t\t\t\t'your_added_sections'\t=> array(\n\t\t\t\t\t\t'title'\t\t=> __( 'Your Sections Added Via Store', 'pagelines' ),\n\t\t\t\t\t\t'callback'\t=> $extension_control->extension_engine( 'section_added', 'user' )\n\t\t\t\t\t\t),\n\t\t\t\t\t'core_framework'\t=> array(\n\t\t\t\t\t\t'title'\t\t=> __( 'Your Sections From PageLines Framework', 'pagelines' ),\n\t\t\t\t\t\t'callback'\t=> $extension_control->extension_engine( 'section_added', 'internal' )\n\t\t\t\t\t\t),\n\t\t\t\t\t'child_theme'\t=> array(\n\t\t\t\t\t\t'title'\t\t=> __( 'Your Sections From Your Child Theme', 'pagelines' ),\n\t\t\t\t\t\t'callback'\t=> $extension_control->extension_engine( 'section_added', 'child' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t)\n\n\t\t),\n\t\t'Themes' => array(\n\t\t\t'icon'\t\t=> PL_ADMIN_ICONS.'/extend-themes.png',\n\t\t\t'htabs' \t=> array(\n\t\t\t\t'get_new_themes'\t=> store_subtabs('theme'),\n\t\t\t\t'your_themes'\t=> array(\n\t\t\t\t\t'title'\t\t=> __( 'Your Installed PageLines Themes', 'pagelines' ),\n\t\t\t\t\t'callback'\t=> $extension_control->extension_engine( 'theme', 'installed' )\n\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t)\n\t\t),\n\t\t'Plugins' => array(\n\t\t\t'icon'\t\t=> PL_ADMIN_ICONS.'/extend-plugins.png',\n\t\t\t'htabs' \t=> array(\n\t\t\t\t'get_new_plugins'\t=> store_subtabs('plugin'),\n\t\t\t\t'your_plugins'\t=> array(\n\t\t\t\t\t'title'\t\t=> __( 'Your Installed PageLines Plugins', 'pagelines' ),\n\t\t\t\t\t'callback'\t=> $extension_control->extension_engine( 'plugin', 'installed' )\n\t\t\t\t\t),\n\t\t\t\t\n\t\t\t)\n\n\t\t),\n\t\t\n\t\t'Integrations' => array(\n\t\t\t'icon'\t\t=> PL_ADMIN_ICONS.'/puzzle.png',\n\t\t\t'htabs' \t=> array(\n\t\t\t\t\n\t\t\t\t'available_integrations'\t=> array(\n\t\t\t\t\t'title'\t\t=> __( 'Available PageLines Integrations', 'pagelines' ),\n\t\t\t\t\t'callback'\t=> $extension_control->extension_engine( 'integration' )\n\t\t\t\t\t)\n\t\t\t\t)\t\t\n\t\t)\n\t);\n\n\treturn apply_filters('extension_array', $d); \n}", "title": "" }, { "docid": "d324867e2418cda003a5c70a285b819f", "score": "0.50536174", "text": "public static function modal($data=array())\n {\n $data['start'] = true;\n\n $view = View::make('core::elements.modal')->with('data', $data);\n return $view;\n }", "title": "" }, { "docid": "7256291a2eca37bf07ac36c1b371cb23", "score": "0.5048193", "text": "public function getButtonData()\n {\n $this->_page = $this->getPage();\n if ($this->_page) {\n return [\n 'label' => __('Sync to %1', $this->configReader->getTargetWebsiteName()),\n 'on_click' => sprintf(\"location.href='%s'\", $this->getActionUrl())\n ];\n }\n }", "title": "" }, { "docid": "625aeb051c62ff618c588096d9e550e1", "score": "0.50471985", "text": "protected function putHtmlButtonsPanel(){\r\n\t\t\t\t\r\n\t\t?>\r\n\t\t<div class=\"uc-buttons-panel unite-clearfix\">\r\n\t\t\t<a href=\"<?php echo esc_attr($this->urlViewCreateObject)?>\" class=\"unite-button-primary unite-float-left\"><?php HelperUC::putText(\"new_layout\");?></a>\r\n\t\t\t\r\n\t\t\t<a id=\"uc_button_import_layout\" href=\"javascript:void(0)\" class=\"unite-button-secondary unite-float-left mleft_20\"><?php HelperUC::putText(\"import_layouts\");?></a>\r\n\t\t\t\r\n\t\t\t<a href=\"javascript:void(0)\" id=\"uc_layouts_global_settings\" class=\"unite-float-right mright_20 unite-button-secondary\"><?php HelperUC::putText(\"layouts_global_settings\");?></a>\r\n\t\t\t<a href=\"<?php echo esc_attr($this->urlManageAddons)?>\" class=\"unite-float-right mright_20 unite-button-secondary\"><?php esc_html_e(\"My Addons\", \"unlimited_elements\")?></a>\r\n\t\t\t\r\n\t\t</div>\r\n\t\t<?php \r\n\t}", "title": "" }, { "docid": "0266ab5e2d49537a816abebba919016f", "score": "0.50471634", "text": "function jrHelloWorld_tinymce_popup_listener($_data,$_user,$_conf,$_args,$event)\n{\n $flag_found = FALSE;\n\n //over-ride any existing jrSoundCloud setting.\n foreach ($_data as $k => $tab) {\n if ($tab['module'] == 'jrHelloWorld') {\n $_data[$k]['tab_location'] = 'jrHelloWorld';\n $_data[$k]['tab_tpl'] = 'tab_jrHelloWorld.tpl';\n $_data[$k]['onclick'] = 'loadHelloWorld()';\n $flag_found = TRUE;\n }\n }\n\n //this modules tab was not set, so set it.\n if (!$flag_found) {\n $_data[] = array(\n 'module' => 'jrHelloWorld',\n 'name' => 'helloworld',\n 'tab_location' => 'jrHelloWorld',\n 'tab_tpl' => 'tab_jrHelloWorld.tpl',\n 'onclick' => 'loadHelloWorld();'\n );\n }\n\n return $_data;\n}", "title": "" }, { "docid": "caba69a632d1af9e95203082d84ab676", "score": "0.50446624", "text": "public function addTabsToHeader($buttonsarray) {\n\t\t\n\t\t$tabsbuttons = PHP_EOL.<<<EOT\n\t\t<div data-role=\"navbar\"><ul>\nEOT;\n\t\tforeach ($buttonsarray as $button) {\n\t\t\n\t\t\t$showtitle = \"\";\n\t\t\t$dialogcode = \"\";\n\t\t\t$isactive = \"\";\n\t\t\t\n\t\t\tif($button['isselected'])\n\t\t\t\t$isactive = 'class=\"ui-btn-active\"';\n\t\t\n\t\t\tif($button['title']==\"\")\n\t\t\t\t$showtitle = \"data-iconpos=\\\"notext\\\"\";\n\t\t\n\t\t\tif($button['openasdialog'])\n\t\t\t\t$dialogcode = \"data-rel=\\\"dialog\\\"\";\n\t\t\n\t\t\n\t\t\t$tabsbuttons.= PHP_EOL.<<<EOT\n\t\t\t<li><a href=\"{$button['pageurl']}\" $isactive data-transition=\"{$button['transitionstyle']}\" $dialogcode data-role=\"button\" data-icon=\"{$button['icon']}\" $showtitle data-iconpos=\"{$button['iconpos']}\" data-theme=\"{$button['theme']}\">{$button['title']}</a></li>\nEOT;\n\t\t}\n\t\t\n\t\t$tabsbuttons.= PHP_EOL.\"</ul></div>\";\n\t\t\n\t\t$this->toolbarbuttonscode.= PHP_EOL.$tabsbuttons;\n\t\t\n\t}", "title": "" }, { "docid": "8f124d0cf84795410a11d7f80c09f394", "score": "0.5044219", "text": "function sc_add_pt_column_headers() { \n\t\t $new_columns['cb'] = '';\n\t\t $new_columns['id'] = __('ID');\n\t\t $new_columns['title'] = \"Name\";\n\t\t $new_columns['date'] = \"Date Created\";\n\t\t $new_columns['status'] = __('Status');\n\t\t $new_columns['email'] = \"Email or PayPal ID\";\n\t\t $new_columns['shipping_option'] = \"Shipping Option\"; \n\t\t $new_columns['payment_type'] = \"Payment Type\"; \n\t\t $new_columns['address1'] = \"Address1\"; \n\t\t $new_columns['city'] = \"City\"; \n\t\t $new_columns['state'] = \"State\"; \n\t\t $new_columns['zip'] = \"Zip\"; \n\t\t $new_columns['label'] = \"Shipping Label\";\n\t\t $new_columns['tracking_number'] = \"Tracking Number\";\n\t\t $new_columns['phone'] = \"Phone\";\n\t\t $new_columns['carrier'] = \"Carrier\";\n\t\t $new_columns['quote'] = \"Quote\";\n\t\treturn $new_columns; \n\t}", "title": "" }, { "docid": "408ea3b0ba19ae95daca58217acd38d5", "score": "0.50400203", "text": "function ht_settings_link($links) { \n $forms_link = '<a href=\"'.ht_get_url('entries').'\">Headlines</a>';\n array_unshift($links, $forms_link);\n return $links; \n}", "title": "" }, { "docid": "8dd5bee0e4e1737688ca8b576b3091c6", "score": "0.50394344", "text": "public function __viewNew() {\n\t\t\t\n\t\t\t$fields = $_POST['fields'] ?? empty($_POST);\n\t\t\t\n\t\t\tif(false === empty($_POST) && false == $_POST['fields']) {\n\t\t\t\t$fields = $_POST['fields'];\n\t\t\t} \n\n\t\t\t$this->setPageType('form');\n\t\t\t$this->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), __('WebHooks'))));\n\t\t\t$this->appendSubheading(false === isset($fields['id']) ? __('Untitled') : $fields['label']);\n\t\t\t\n\t\t\tif(isset($fields['id'])) {\n\t\t\t\t$this->insertBreadcrumbs(array(\n\t\t\t\t\tWidget::Anchor(__('Webhooks'), Extension_WebHooks::baseUrl() . '/'),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t$fieldset = new XMLElement('fieldset');\n\t\t\t$fieldset->setAttribute('class', 'settings');\n\t\t\t$fieldset->appendChild(new XMLElement('legend', __('WebHook Settings')));\n\n\t\t\t$label = Widget::Label(__('Label'));\n\t\t\t$label->appendChild(Widget::Input(\n\t\t\t\t'fields[label]', General::sanitize($fields['label'] ?? null)\n\t\t\t));\n\n\t\t\tif(isset($this->_errors['label']))\n\t\t\t\t$label = $this->wrapFormElementWithError($label, $this->_errors['label']);\n\n\t\t\t$callback = Widget::Label(__('Callback URL'));\n\t\t\t$callback->appendChild(Widget::Input(\n\t\t\t\t'fields[callback]', General::sanitize($fields['callback'] ?? null)\n\t\t\t));\n\n\t\t\tif(isset($this->_errors['callback']))\n\t\t\t\t$callback = $this->wrapFormElementWithError($callback, $this->_errors['callback']);\n\n\t\t\t$options = array(array(NULL, false, __('Select One...')));\n\t\t\tforeach($this->sectionNamesArray as $id => $name) {\n\t\t\t\t$options[] = array($id, false, $name);\n\t\t\t}\n\n\t\t\tif(isset($fields['section_id'])) {\n\t\t\t\tforeach($options as &$option) {\n\t\t\t\t\tif($option[0] == $fields['section_id'])\n\t\t\t\t\t\t$option[1] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$section = Widget::Label(__('Target Section'));\n\t\t\t$section->appendChild(Widget::Select('fields[section_id]', $options));\n\n\t\t\tif(isset($this->_errors['section_id']))\n\t\t\t\t$section = $this->wrapFormElementWithError($section, $this->_errors['section_id']);\n\n\t\t\t$options = array(\n\t\t\t\tarray('POST', false, 'POST'), \n\t\t\t\tarray('PUT', false, 'PUT'), \n\t\t\t\tarray('DELETE', false, 'DELETE')\n\t\t\t);\n\n\t\t\tif(isset($fields['verb'])) {\n\t\t\t\tforeach($options as &$option) {\n\t\t\t\t\tif($option[0] == $fields['verb'])\n\t\t\t\t\t\t$option[1] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$verb = Widget::Label(__('Verb'));\n\t\t\t$verb->appendChild(Widget::Select('fields[verb]', $options));\n\n\t\t\tif(isset($this->_errors['verb']))\n\t\t\t\t$verb = $this->wrapFormElementWithError($verb, $this->_errors['verb']);\n\n\t\t\t$group = new XMLElement('div');\n\t\t\t$group->setAttribute('class', 'group');\n\n\t\t\t$group->appendChild($section);\n\t\t\t$group->appendChild($verb);\n\n\t\t\t$isActive = Widget::Label();\n\t\t\t$isActiveCheckbox = Widget::Input('fields[is_active]', 'yes', 'checkbox', (($fields['is_active'] ?? null) ? array('checked' => 'checked') : NULL));\n\n\t\t\t$isActive->setValue(__('%1$s Activate this WebHook', array($isActiveCheckbox->generate())));\n\n\t\t\t$actions = new XMLElement('div');\n\t\t\t$actions->setAttribute('class', 'actions');\n\t\t\t$actions->appendChild(Widget::Input(\n\t\t\t\t'action[save]', isset($fields['id']) ? __('Update WebHook') : __('Create WebHook'),\n\t\t\t\t'submit', array('accesskey' => 's')\n\t\t\t));\n\n\t\t\tif(isset($fields['id'])){\n\t\t\t\t$button = new XMLElement('button', __('Delete'));\n\t\t\t\t$button->setAttributeArray(array('name' => 'action[delete]', 'class' => 'button confirm delete', 'title' => __('Delete this webhook'), 'accesskey' => 'd', 'data-message' => __('Are you sure you want to delete this webhook?')));\n\t\t\t\t$actions->appendChild($button);\n\t\t\t}\n\n\t\t\t$fieldset->appendChild($label);\n\t\t\t$fieldset->appendChild($group);\n\t\t\t$fieldset->appendChild($callback);\n\t\t\t$fieldset->appendChild($isActive);\n\t\t\t$fieldset->appendChild($actions);\n\n\t\t\tif(isset($fields['id'])) {\n\t\t\t\t$fieldset->appendChild(Widget::Input('fields[id]', $fields['id'], 'hidden'));\n\t\t\t}\n\n\t\t\t$this->Form->appendChild($fieldset);\n\t\t}", "title": "" }, { "docid": "75ae829a97b0ab725738519371292802", "score": "0.50347686", "text": "function form_actionemail_data($atts, $content='') {\n $result=\"<script>var actionemail_data={\";\n\n foreach(explode(\"\\n\", $content) as $key=>$line) {\n $line_trim = strip_tags($line);\n if ($line_trim != \"\") {\n list($name, $contact_name, $email) = explode(\",\", $line_trim);\n if ($key > 1 ) {\n $result .= \",\";\n }\n $result .= \"'{$name}':{'email': '{$email}', 'contact_name':'{$contact_name}' }\";\n }\n }\n $result .= \"};</script>\";\n return $result;\n}", "title": "" }, { "docid": "800dca8c058bd3e5012530f204e0e3fb", "score": "0.50275326", "text": "function ncn_ceportal_admin_settings_alert() {\n $form['ce_alert'] = array(\n '#type' => 'fieldset', \n '#title' => t('Messages & Alerts'), \n '#weight' => -50, \n '#collapsible' => TRUE, \n '#collapsed' => FALSE,\n );\n $form['ce_alert']['ce_dashboard_message'] = array(\n '#type' => 'textarea', \n '#title' => t('Body'),\n '#default_value' => variable_get('ce_dashboard_message', ''),\n '#required' => 1,\n );\n \n $form['ce_alert']['submit'] = array('#type' => 'submit', '#weight' => 101, '#value' => t('Save'));\n \n return $form;\n}", "title": "" }, { "docid": "c89e4813aaec4e21e9efd8f08c6e4faa", "score": "0.5017592", "text": "function set_dataTmensajes()\n {\n $this->tmensajes['data1'] = 'iduser';\n $this->tmensajes['data2'] = 'title';\n $this->tmensajes['data3'] = 'mensaje';\n $this->tmensajes['data4'] = 'regDate';\n $this->tmensajes['data5'] = 'estatus';\n }", "title": "" }, { "docid": "6a8bb7fb5a71c2a9ccd54af0f52939bc", "score": "0.5012582", "text": "public function createMenu(){\n\t$Curl = new Curl();\n\t$menuurl = sprintf(config('wechat.urls.createmenu'),Cache::store('file')->get('weixinaccesstoken'));\n\t$menudata\t=\t[\n\t\t\"button\"=>[\n\t\t\t[\n\t\t\t\t\"type\"=>\"click\",\n\t\t\t\t\"name\"=>\"今日金曲\".time(),\n\t\t\t\t\"key\"=>\"KEYKEY\",\n\t\t\t]\n\t\t],\n\t];\n\t$menudata\t=\tjson_encode($menudata,JSON_UNESCAPED_UNICODE);\n\t$menuarr = $Curl->post($menuurl,$menudata);\n\treturn [\n\t\t'datafromwexinserver'=>$menuarr,\n\t];\n }", "title": "" }, { "docid": "11cad9e1b3ca59c4de91219ad9cd9630", "score": "0.50088966", "text": "function return_modal_form($variable, $name=NULL, $id=NULL){\n if ($variable === 'add'){\n $form_state = array(\n 'ajax' => TRUE,\n 'title' => t('Add Location'),\n );\n $output = ctools_modal_form_wrapper('add_locations_form', $form_state); \n }\nif ($variable === 'delete'){\n $form_state = array(\n 'ajax' => TRUE,\n\t'title' => 'Delete Location: '.$name,\n\t'id' => $id\n );\n $output = ctools_modal_form_wrapper('delete_location_form', $form_state);\n } \nif ($variable === 'update')\n {\n $form_state = array(\n 'ajax' => TRUE,\n 'title' => t('Update Location'),\n );\n \n $output = ctools_modal_form_wrapper('update_locations_form', $form_state);\n }\n if ($variable === 'delete_all')\n {\n $form_state = array(\n 'ajax' => TRUE,\n 'title' => t('Delete All Locations'),\n );\n \n $output = ctools_modal_form_wrapper('delete_all_locations_form', $form_state);\n }\n if ($variable === 'add_mult')\n {\n $form_state = array(\n 'ajax' => TRUE,\n 'title' => t('Add Multiple Locations'),\n );\n \n $output = ctools_modal_form_wrapper('add_mult_locations_form', $form_state);\n }\n if ($variable === 'upload_file')\n {\n $form_state = array(\n 'ajax' => TRUE,\n 'title' => t('Upload Files'),\n );\n \n $output = ctools_modal_form_wrapper('upload_file_form', $form_state);\n }\n \n if (!empty($form_state['ajax_commands'])) {\n $output = $form_state['ajax_commands'];\n }\n if (!empty($form_state['executed'])) {\n\n ctools_add_js('ajax-responder');\n\n $output = array();\n $output[] = ctools_modal_command_dismiss();\n $output[] = ctools_ajax_command_reload();\n }\n return $output;\n}", "title": "" }, { "docid": "ab23a803ebd6e83ab8c7eef52e9301f3", "score": "0.50078636", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$readyLayout = $grid->readyLayout2( 212, 140, $param['grids'][0]['gridname']);\n\n\t\t//Panel Central y Sur\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'] );\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname']);\n\n\t\t#Set url\n\t\t$grid->setUrlput(site_url($this->url.'setdata/'));\n\n\t\t$WpAdic = \"\n\t\t<tr><td><div class=\\\"anexos\\\"><table id=\\\"bpos1\\\"></table></div><div id='pbpos1'></div></td></tr>\\n\n\t\t<tr><td><div class=\\\"anexos\\\">\n\t\t\t<table cellpadding='0' cellspacing='0' style='width:100%;' align='center'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style='vertical-align:center;border:1px solid #AFAFAF;'><div class='botones'>\".img(array('src' =>\"assets/default/images/print.png\", 'height'=>18, 'alt'=>'Imprimir', 'title'=>'Imprimir', 'border'=>'0')).\"</div></td>\n\t\t\t\t\t<td style='vertical-align:top;text-align:center;'><div class='botones'><a style='width:78px;text-align:left;vertical-align:top;' href='#' id='reteprint'>R.I.V.A.</a></div></td>\n\t\t\t\t\t<td style='vertical-align:top;text-align:center;'><div class='botones'><a style='width:78px;text-align:left;vertical-align:top;' href='#' id='reteislrprint'>R.I.S.L.R.</a></div></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</div>\n\t\t</td></tr>\";\n\n\t\t$grid->setWpAdicional($WpAdic);\n\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'imprime' ,'img'=>'assets/default/images/print.png', 'alt' => 'Reimprimir Documento', 'label'=>'Imprimir', 'tema'=>'anexos'));\n\t\t$grid->wbotonadd(array('id'=>'princheque','img'=>'images/check.png' , 'alt' => 'Emitir Cheque' , 'label'=>'Imprimir cheque', 'tema'=>'anexos'));\n\t\t$grid->wbotonadd(array('id'=>'pago' ,'img'=>'images/dinero.png' , 'alt' => 'Pago a proveedor', 'label'=>'Pago a proveedor'));\n\t\t$grid->wbotonadd(array('id'=>'bncpro' ,'img'=>'images/circuloamarillo.png' , 'alt' => 'NC a FC pagada' , 'label'=>'NC a FC pagada'));\n\t\t$WestPanel = $grid->deploywestp();\n\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita' , 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fabono' , 'title'=>'Abonar a Proveedor'),\n\t\t\tarray('id'=>'fsprvsel', 'title'=>'Seleccionar proveedor'),\n\t\t\tarray('id'=>'fborra' , 'title'=>'Borrar registro'),\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$funciones = '\n\t\tfunction ltransac(el, val, opts){\n\t\t\tvar link=\\'<div><a href=\"#\" onclick=\"tconsulta(\\'+\"\\'\"+el+\"\\'\"+\\');\">\\' +el+ \\'</a></div>\\';\n\t\t\treturn link;\n\t\t};';\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('SPRM', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('SPRM', 'JQ');\n\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t$param['funciones'] = $funciones;\n\t\t$param['tema1'] = 'darkness';\n\t\t$param['anexos'] = 'anexos1';\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "ecc9f48081041a8df63a46eb6ce86a77", "score": "0.50070703", "text": "function CrearCuadroDeDialogo($id,$title){\r\n\t\t\r\n\t\tprint(' <div id=\"'.$id.'\" class=\"modal hide fade\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\" data-keyboard=\"false\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\" >\r\n \r\n \t\r\n <div class=\"modal-header\">\r\n\t <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">X</button>\r\n \t <h3 id=\"myModalLabel\">'.$title.'</h3>\r\n </div>\r\n <div class=\"modal-body\">\r\n \t <div class=\"row-fluid\">\r\n\t \r\n \t <div class=\"span6\">\r\n \t\r\n\t\t\t\t\t\t\r\n \r\n \r\n ');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "caf10cf1649cfc7c4c37ac5761b3ada0", "score": "0.50062656", "text": "public function modalEdit(){\n /** array post id */\n $ID = explode('~',$this->input->post('id'));\n /** atribut modal edit */\n $data = array(\n 'modalTitle' => 'Edit '.$ID[1],\n 'formAction' => base_url('device/do_edit'),\n 'dMaster' => $this->mod->getData('row','*','device_tc',null,null,null,array('id_device'=>base64_decode($ID[0]))),\n\t\t\t\t'Req' => ''\n );\n /** load view modal */\n\t\t$this->load->view('pages/device/modal_form', $data);\n }", "title": "" }, { "docid": "c713562aa45db936cc7090ac82b5093e", "score": "0.5005316", "text": "public function setup_actions()\n {\n $module = substr(get_class($this), strlen('Controller_Backend_Delivery_'));\n\n $this->_model = \"Model_Delivery_$module\";\n $this->_form = \"Form_Backend_Delivery_$module\";\n\n return array(\n 'create' => array(\n 'view_caption' => 'Добавление способа доставки'\n ),\n 'update' => array(\n 'view_caption' => 'Редактирование способа доставки \":caption\"'\n ),\n 'delete' => array(\n 'view_caption' => 'Удаление способа доставки',\n 'message' => 'Удалить способ доставки \":caption\"?'\n )\n );\n }", "title": "" }, { "docid": "e404e7bb54978b9049485adb28c3bdf6", "score": "0.5003847", "text": "public static function hookData() {\n return array_merge_recursive( array (\n 'userBar' => \n array (\n 0 => \n array (\n 'selector' => '#elUserNav > li.cInbox',\n 'type' => 'add_after',\n 'content' => '{{if \\IPS\\Settings::i()->bd_moods_userNavLink AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canSee\\'] AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canChange\\']}}\r\n<li class=\"cUserNav_icon\" data-ipsTooltip _title=\"{lang=\\'bd_moods_mood\\'}\"><a href=\"{url=\\'app=bdmoods&module=mood&controller=update\\'}\" data-ipsDialog data-ipsDialog-title=\"{lang=\\'bd_moods_moodChooser\\'}\" data-ipsDialog-size=\"medium\"><i class=\"fa {setting=\\'bd_moods_moodChooserIcon\\'}\"> </i></a></li>\r\n{{endif}}',\n ),\n 1 => \n array (\n 'selector' => '#elAccountSettingsLink',\n 'type' => 'add_after',\n 'content' => '{{if \\IPS\\Settings::i()->bd_moods_userDropLink AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canSee\\'] AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canChange\\']}}\r\n<li class=\"ipsMenu_item\"><a href=\"{url=\\'app=bdmoods&module=mood&controller=update\\'}\" data-ipsDialog data-ipsDialog-title=\"{lang=\\'bd_moods_moodChooser\\'}\" data-ipsDialog-size=\"medium\">{lang=\\'bd_moods_updateMood\\'}</a></li>\r\n{{endif}}',\n ),\n ),\n 'mobileNavigation' => \n array (\n 0 => \n array (\n 'selector' => '#elUserNav_mobile > li.cInbox',\n 'type' => 'add_before',\n 'content' => '{{if \\IPS\\Settings::i()->bd_moods_userNavLink AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canSee\\'] AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canChange\\']}}\r\n<li class=\"cUserNav_icon\" data-ipsTooltip _title=\"{lang=\\'bd_moods_mood\\'}\"><a href=\"{url=\\'app=bdmoods&module=mood&controller=update\\'}\" data-ipsdialog data-ipsdialog-title=\"{lang=\\'bd_moods_moodChooser\\'}\" data-ipsdialog-size=\"medium\" ><i class=\"fa {setting=\\'bd_moods_moodChooserIcon\\'}\"> </i></a></li>\r\n{{endif}}',\n ),\n 1 => \n array (\n 'selector' => '#elAccountSettingsLinkMobile',\n 'type' => 'add_after',\n 'content' => '{{if \\IPS\\Settings::i()->bd_moods_userDropLink AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canSee\\'] AND \\IPS\\Member::loggedIn()->group[\\'g_bdm_canChange\\']}}\r\n<li><a href=\"{url=\\'app=bdmoods&module=mood&controller=update\\'}\" data-ipsDialog data-ipsDialog-title=\"{lang=\\'bd_moods_moodChooser\\'}\" data-ipsDialog-size=\"medium\">{lang=\\'bd_moods_updateMood\\'}</a></li>\r\n{{endif}}',\n ),\n ),\n), parent::hookData() );\n}", "title": "" }, { "docid": "8f279e88104cbc181a67bbe6f4a88f0b", "score": "0.4999458", "text": "function crear_head_form( $nombre,$botones_left, $botones_right, $class_modo,$id_mod){\n\t\t\t$nom_mod=\"\";\n\t\t\tif(!empty($id_mod))\n\t\t\t$nom_mod= strtolower($this->fmt->class_modulo->mombre_modulo($id_mod));\n\t\t\t?>\n\t\t\t<div class=\"head-modulo row <?php echo $class_modo.\" head-\".$nom_mod; ?> \">\n\t\t\t<div class=\"head-botones pull-left\">\n\t\t\t\t \t<?php echo $botones_left; ?>\n\t\t\t</div>\n\t\t\t<h1 class=\"title-form col-xs-4 col-xs-offset-3\"><? echo $nombre; ?> <a href='javascript:location.reload()'><i class='icn-sync'></i></a></h1>\n\t\t\t<? if ($botones_right!=\"\"){ ?>\n\t\t\t\t<div class=\"head-botones pull-right\">\n\t\t\t\t\t\t<?php echo $botones_right; ?>\n\t\t\t\t</div>\n\t\t\t<? } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "5d7b294fe08fe9d96892fbac83ed5f6f", "score": "0.49966985", "text": "public function create_group_modal()\n {\n $str = '<div class=\"modal fade\" id=\"newgroup-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\">';\n $str .= '<div class=\"credential-panel\" id=\"newgroup-panel\">';\n $str .= '<div class=\"credential-form\" id=\"newgroup-form\">';\n $str .= '<h2 class=\"sign-in font-24 modal-header group_subject\">Define New Group</h2>';\n $str .= '<table class = \"table group-invite-table\">';\n $str .= '<tr><td class = \"group-invite-label\"><label class=\"credential-label\" style=\"margin-top: 0px\">Group Label: </label></td>';\n $str .= '<td class = \"group-invite-text\"><input class=\"newgroup-credential\" id=\"newgroup_title\" type=\"text\"></td></tr>';\n $str .= '<tr><td class = \"group-invite-label\"><label class=\"credential-label\" style=\"margin-top: 0px\">Member: </label></td>';\n $str .= '<td class = \"group-invite-text\"><input class=\"newgroup-credential\" id=\"newgroup_membersearch\"';\n $str .= ' onkeyup=\"queryUsers(this.value);\" type=\"text\"/></td>';\n $str .= '<td><a href=\"javascript:;\" onclick=\"addGroupMember();\">';\n $str .= '<img src=\"./img/plus.png\" alt=\"Add to group\"/>';\n $str .= '</a></td></tr>';\n $str .= '</br>';\n $str .= '</table>';\n $str .= '<div id=\"newgroup_tagfield\">';\n $str .= '<h4 id = \"member-name\">Member Name</h4>';\n $str .= '<div class = \"chat-wrapper\">';\n $str .= '<table id=\"newgroup_members\" class=\"table table-striped\">';\n $str .= '<thead>';\n $str .= '<tr>';\n $str .= '<th></th>';\t\t# Column for \"remove\" buttons\n $str .= '</tr>';\n $str .= '</thead>';\n $str .= '<tbody id=\"newgroup_members_tbody\">';\n $str .= '</tbody>';\n $str .= '</table>';\n $str .= '</div>';\n $str .= '</div>';\n\n $str .= '<input type=\"submit\" class=\"btn-default register-button\" id=\"newgroup_save\"';\n $str .= ' value=\"Define\" onclick=\"defineGroup();\">';\n $str .= '</div>';\n $str .= '</div>';\n $str .= '</div>';\n return $str;\n }", "title": "" }, { "docid": "2abbce0020502ecdf97156265dacd6ca", "score": "0.49948624", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 165, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'boton1', 'img'=>'assets/default/images/print.png','alt' => 'Formato PDF', 'label'=>'Reimprimir Documento'));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar Conversi&oacute;n'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Ver Conversi&oacute;n')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('CONV', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('CONV', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t//$param['funciones'] = $funciones;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "title": "" }, { "docid": "389dfd76dffcd69bb955cc5223dbb221", "score": "0.49932554", "text": "function crear_head( $id_mod,$botones){\n\n\t\t$sql =\"SELECT mod_nombre,mod_icono FROM modulos WHERE mod_id=$id_mod\";\n\t\t$rs = $this->fmt->query -> consulta($sql);\n\t\t$row = $this->fmt->query -> obt_fila ($rs);\n\t\t$nom = $row[\"mod_nombre\"];\n\t\t$icon = $row[\"mod_icono\"];\n\t\t?>\n\t\t<div class=\"head-modulo\">\n\t\t<h1 class=\"title-page pull-left\"><i class=\"<? echo $icon; ?>\"></i> <? echo $nom; ?></h1>\n\t\t\t<a href='javascript:location.reload()'><i class='icn-sync'></i></a>\n\t\t\t<?php if (!empty($botones)){ ?>\n\t\t\t<div class=\"head-botones pull-right\">\n\t\t\t\t<?php echo $botones; ?>\n\t\t\t</div>\n\t\t\t<?php } ?>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "df670c51c23745a42c3fc6fa4df02a0e", "score": "0.49920425", "text": "function boot_nav_modal( $atts, $item, $args )\n{\n $menu_target = 101;\n\n // inspect $item\n if ($item->ID == $menu_target) {\n $atts['data-toggle'] = 'modal';\n $atts['data-target'] = '#myModal';\n }\n return $atts;\n}", "title": "" }, { "docid": "063b6dca1b1ebf3b041a891e30a254f2", "score": "0.4988354", "text": "function get_modificar_puesto($vals,$args){\n\textract($vals);\n\textract($args);\n\treturn \"<a href=modificar_puesto.php?contenido={$record[$id]}&accion=m><i class='fa fa-edit text-bg text-danger'></i></a>\";\n}", "title": "" }, { "docid": "6440542fc2852bcc00957e5d9321d22d", "score": "0.49881047", "text": "function ss_get_btn_link_title_and_target($button)\r\n{\r\n if (!is_array($button)) return;\r\n if (class_exists('ACF')) {\r\n $btn_title = $button['title'] ? $button['title'] : 'Click Me';\r\n $btn_link = $button['url'];\r\n $btn_target = $button['target'] ? $button['target'] : '_self';\r\n $btn_details = array(\r\n 'title' => $btn_title,\r\n 'url' => $btn_link,\r\n 'target' => $btn_target\r\n );\r\n return $btn_details;\r\n }\r\n}", "title": "" }, { "docid": "e402c4913a763836288615796335caf3", "score": "0.4973662", "text": "function insert_modal() {\r\n $form = do_shortcode('[contact-form-7 id=\"12572\" title=\"Presupuesto\"]');\r\n\r\n $html = <<<HTML\r\n <!-- The Modal -->\r\n <div id=\"presupuesto\" class=\"modal\">\r\n <!-- Modal content -->\r\n <div class=\"modal-content\">\r\n <span class=\"close\">&times;</span>\r\n <h3>¡Pide Presupuesto sin Compromiso!</h3>\r\n $form\r\n </div>\r\n </div>\r\n <!-- END: The Modal -->\r\n HTML;\r\n\r\n echo $html;\r\n}", "title": "" }, { "docid": "d3767c20b6beb2d84990596fcaf8648d", "score": "0.49713862", "text": "function add_data($idInv, $idSub, $monto, $porcentaje)\n {\n $this->data['data1'] = $idInv; //\n $this->data['data2'] = $idSub; //\n $this->data['data3'] = $monto; //\n $this->data['data4'] = $porcentaje; //\n\n }", "title": "" }, { "docid": "781a43d174952f7607b59ce5a1b37492", "score": "0.49683434", "text": "public static function add_settings( $array, $settings ) {\n \n // First reminder settings\n $array['front_end_listing'] = array( \n 'name' => esc_html__( 'Front-end Listing', 'super-forms' ),\n 'label' => esc_html__( 'Front-end Listing', 'super-forms' ),\n 'html' => array( '<style>.super-settings .front-end-listing-html-notice {display:none;}</style>', '<p class=\"front-end-listing-html-notice\">' . sprintf( esc_html__( 'Need to send more E-mail reminders? You can increase the amount here:%s%s%sSuper Forms > Settings > Front-end Listing%s%s', 'super-forms' ), '<br />', '<a target=\"_blank\" href=\"' . admin_url() . 'admin.php?page=super_settings#front-end-listing\">', '<strong>', '</strong>', '</a>' ) . '</p>' ),\n 'fields' => array(\n 'email_reminder_amount' => array(\n 'hidden' => true,\n 'name' => esc_html__( 'Select how many individual E-mail reminders you require', 'super-forms' ),\n 'desc' => esc_html__( 'If you need to send 10 reminders enter: 10', 'super-forms' ),\n 'default' => SUPER_Settings::get_value( 0, 'email_reminder_amount', $settings['settings'], '3' )\n )\n )\n );\n \n if(empty($settings['settings']['email_reminder_amount'])) $settings['settings']['email_reminder_amount'] = 3;\n $limit = absint($settings['settings']['email_reminder_amount']);\n if($limit==0) $limit = 3;\n\n $x = 1;\n while($x <= $limit) {\n // Second reminder settings\n $reminder_settings = array(\n 'email_reminder_'.$x => array(\n 'hidden_setting' => true,\n 'desc' => sprintf( esc_html__( 'Enable email reminder #%s', 'super-forms' ), $x ), \n 'default' => SUPER_Settings::get_value( 0, 'email_reminder_'.$x, $settings['settings'], '' ),\n 'type' => 'checkbox',\n 'values' => array(\n 'true' => sprintf( esc_html__( 'Enable email reminder #%s', 'super-forms' ), $x ),\n ),\n 'filter' => true\n ),\n 'email_reminder_'.$x.'_base_date' => array(\n 'hidden_setting' => true,\n 'name'=> esc_html__( 'Send reminder based on the following date:', 'super-forms' ),\n 'label'=> esc_html__( 'Must be English formatted date. When using a datepicker that doesn\\'t use the correct format, you can use the tag {date;timestamp} to retrieve the timestamp which will work correctly with any date format (leave blank to use the form submission date)', 'super-forms' ),\n 'default'=> SUPER_Settings::get_value( 0, 'email_reminder_'.$x.'_base_date', $settings['settings'], '' ),\n 'filter'=>true,\n 'parent'=>'email_reminder_'.$x,\n 'filter_value'=>'true'\n ),\n 'email_reminder_'.$x.'_date_offset' => array(\n 'hidden_setting' => true,\n 'name' => esc_html__( 'Define how many days after or before the reminder should be send based of the base date', 'super-forms' ),\n 'label'=> esc_html__( '0 = The same day, 1 = Next day, 5 = Five days after, -1 = One day before, -3 = Three days before', 'super-forms' ),\n 'default'=> SUPER_Settings::get_value( 0, 'email_reminder_'.$x.'_date_offset', $settings['settings'], '0' ),\n 'filter'=>true,\n 'parent'=>'email_reminder_'.$x,\n 'filter_value'=>'true'\n ),\n 'email_reminder_'.$x.'_time_method' => array(\n 'hidden_setting' => true,\n 'name' => esc_html__( 'Send reminder at a fixed time, or by offset', 'super-forms' ),\n 'default'=> SUPER_Settings::get_value( 0, 'email_reminder_'.$x.'_time_method', $settings['settings'], 'fixed' ),\n 'type' => 'select', \n 'values' => array(\n 'fixed' => esc_html__( 'Fixed (e.g: always at 09:00)', 'super-forms' ), \n 'offset' => esc_html__( 'Offset (e.g: 2 hours after date)', 'super-forms' ),\n ),\n 'filter'=>true,\n 'parent'=>'email_reminder_'.$x,\n 'filter_value'=>'true'\n ),\n 'email_reminder_'.$x.'_time_fixed' => array(\n 'hidden_setting' => true,\n 'name' => esc_html__( 'Define at what time the reminder should be send', 'super-forms' ),\n 'label'=> esc_html__( 'Use 24h format e.g: 13:00, 09:30 etc.', 'super-forms' ),\n 'default'=> SUPER_Settings::get_value( 0, 'email_reminder_'.$x.'_time_fixed', $settings['settings'], '09:00' ),\n 'filter'=>true,\n 'parent'=>'email_reminder_'.$x.'_time_method',\n 'filter_value'=>'fixed'\n ),\n 'email_reminder_'.$x.'_time_offset' => array(\n 'hidden_setting' => true,\n 'name' => esc_html__( 'Define at what offset the reminder should be send based of the base time', 'super-forms' ),\n 'label'=> esc_html__( 'Example: 2 = Two hours after, -5 = Five hours before<br />(the base time will be the time of the form submission)', 'super-forms' ),\n 'default'=> SUPER_Settings::get_value( 0, 'email_reminder_'.$x.'_time_offset', $settings['settings'], '0' ),\n 'filter'=>true,\n 'parent'=>'email_reminder_'.$x.'_time_method',\n 'filter_value'=>'offset'\n )\n );\n $array['front_end_listing']['fields'] = array_merge($array['front_end_listing']['fields'], $reminder_settings);\n\n\n $fields = $array['confirmation_email_settings']['fields'];\n $new_fields = array();\n foreach($fields as $k => $v){\n if($k=='confirm'){\n unset($fields[$k]);\n continue;\n }\n if( !empty($v['parent']) ) {\n if($v['parent']=='confirm'){\n $v['parent'] = 'email_reminder_'.$x;\n $v['filter_value'] = 'true';\n }else{\n $v['parent'] = str_replace('confirm_', 'email_reminder_'.$x.'_', $v['parent']);\n }\n }\n unset($fields[$k]);\n $k = str_replace('confirm_', 'email_reminder_'.$x.'_', $k);\n if( !empty($v['default']) ) {\n $v['default'] = SUPER_Settings::get_value( 0, $k, $settings['settings'], $v['default'] );\n }\n $v['hidden_setting'] = true;\n $new_fields[$k] = $v;\n }\n $new_fields['email_reminder_'.$x.'_attachments'] = array(\n 'hidden_setting' => true,\n 'name' => sprintf( esc_html__( 'Attachments for reminder email #%s', 'super-forms' ), $x ),\n 'desc' => esc_html__( 'Upload a file to send as attachment', 'super-forms' ),\n 'default'=> SUPER_Settings::get_value( 0, 'email_reminder_'.$x.'_attachments', $settings['settings'], '' ),\n 'type' => 'file',\n 'multiple' => 'true',\n 'filter'=>true,\n 'parent'=>'email_reminder_'.$x,\n 'filter_value'=>'true'\n );\n $array['front_end_listing']['fields'] = array_merge($array['front_end_listing']['fields'], $new_fields);\n $x++;\n }\n\n return $array;\n }", "title": "" }, { "docid": "1ed7ff6020165e5a9e9ae99563c6e2f4", "score": "0.49600363", "text": "function modal_form() {\n\n $this->validate_submitted_data(array(\n \"id\" => \"numeric\"\n ));\n\n $view_data['model_info'] = $this->Payment_methods_model->get_one_with_settings($this->request->getPost('id'));\n\n //get seetings associtated with this payment type\n $view_data['settings'] = $this->Payment_methods_model->get_settings($view_data['model_info']->type);\n\n return $this->template->view('payment_methods/modal_form', $view_data);\n }", "title": "" }, { "docid": "a511c0ab4301aa719e9ffe1767e23c20", "score": "0.4956395", "text": "public function headerWYSIWYGFieldset() {\n return array(\n '#type' => 'details',\n '#title' => t('Menu: First Section'),\n '#open' => FALSE,\n );\n }", "title": "" }, { "docid": "6f0faa67290715a0fdb3f4433d846e8b", "score": "0.4956004", "text": "function get_modificar_pais($vals,$args){\n\textract($vals);\n\textract($args);\n\treturn \"<a href=modificar_pais.php?contenido={$record[$id]}&accion=m><i class='fa fa-edit text-bg text-danger'></i></a>\";\n}", "title": "" }, { "docid": "d9334f5c3cbd40c1eb3d6edfc1064ffb", "score": "0.4954471", "text": "function set_dataTnotify()\n {\n $this->tnotify['data1'] = 'id';\n $this->tnotify['data2'] = 'idusuario';\n $this->tnotify['data3'] = 'idmsgtype';\n $this->tnotify['data4'] = 'regDate';\n $this->tnotify['data5'] = 'link';\n $this->tnotify['data6'] = 'estatus';\n $this->tnotify['data7'] = 'complemento';\n }", "title": "" }, { "docid": "8aeff880ffdf844544b97b84595ac8c8", "score": "0.49463525", "text": "function theme_settings_page() {\n global $theme_name, $theme_prefix;\n $fields = array(\n 'contact_title' => array( 'group' => 'Contact Info', 'label' => 'Title for Contact', 'type' => 'text', 'params' => 'size=\"25\"'),\n 'contact_heading' => array( 'group' => 'Contact Info', 'label' => 'Contact Heading', 'type' => 'text', 'params' => 'size=\"100\"'),\n 'contact_content' =>array( 'group' => 'Contact Info', 'label' => 'Contact Content', 'type' => 'textarea', 'params' => 'style=\"width:60%;\"'),\n 'contact_phone' => array( 'group' => 'Contact Info', 'label' => 'Contact Phone', 'type' => 'text', 'params' => 'size=\"25\"'),\n 'contact_email' => array( 'group' => 'Contact Info', 'label' => 'Contact Email', 'type' => 'text', 'params' => 'size=\"25\"'),\n 'contact_address' => array( 'group' => 'Contact Info', 'label' => 'Contact Address', 'type' => 'textarea', 'params' => 'style=\"width:30%;\"'),\n\n 'social_facebook' => array( 'group' => 'Social Media', 'label' => '<i class=\"fa fa-facebook-square\" aria-hidden=\"true\"></i> facebook URL', 'type' => 'text', 'params' => 'size=\"50\"'),\n 'social_linkedin' => array( 'group' => 'Social Media', 'label' => '<i class=\"fa fa-linkedin-square\" aria-hidden=\"true\"></i> LinkedIn URL', 'type' => 'text', 'params' => 'size=\"50\"'),\n 'social_google_plus' => array( 'group' => 'Social Media', 'label' => '<i class=\"fa fa-google-plus-square\" aria-hidden=\"true\"></i> Google Plus URL', 'type' => 'text', 'params' => 'size=\"50\"'),\n 'social_instagram' => array( 'group' => 'Social Media', 'label' => '<i class=\"fa fa-instagram\" aria-hidden=\"true\"></i> Instagram URL', 'type' => 'text', 'params' => 'size=\"50\"'),\n 'social_youtube' => array( 'group' => 'Social Media', 'label' => '<i class=\"fa fa-youtube-square\" aria-hidden=\"true\"></i> Youtube URL', 'type' => 'text', 'params' => 'size=\"50\"'),\n\n\n );\n\n\n webdawe_draw_form('General Settings', $fields);\n}", "title": "" }, { "docid": "ba79f252747d98358a6117849de4ecd9", "score": "0.494546", "text": "function index3() {\n\n $data = array();\n $data['messi'] = \"<a id='success-title'></a>\n <script>\n new popUp('Succesful Register ', \n {title: 'WELCOME', titleClass: 'success', \n autoclose: '1000'});\n </script>\";\n $this->session->unset_userdata('username');\n $data['head'] = '/includes/headhome';\n $data['main_content'] = 'home/home';\n $data['title'] = 'Evernote->Home';\n $this->load->view('/includes/templates', $data);\n }", "title": "" }, { "docid": "d90cbd372e0c4733c1123528d8c4d0fd", "score": "0.49440986", "text": "function hook_la_pills_session_template_data_alter(array &$template, SessionEntity $session_entity) {\n $template['title'] = 'New template title';\n}", "title": "" }, { "docid": "e0b41ecf40387ccef9c2a4f6fd8b13c5", "score": "0.49427357", "text": "function set_header_pembelian(){\n\t\t$data=array();$cek='';$datax=array();$total=0;\n\t\t$cek=$this->Admin_model->field_exists('inv_pembelian',\"where NoUrut='\".$_POST['no_trans'].\"' and Tanggal='\".tgltoSql($_POST['tanggal']).\"'\",'ID');\n\t\tif($_POST['cbayar']==1){\n\t\t\t$jenis='BT';\n\t\t}else if($_POST['cbayar']==2){\n\t\t\t$jenis='KY';\n\t\t}else if($_POST['cbayar']==3){\n\t\t\t$jenis='RK';\n\t\t}\n\t\t$data['ID']\t\t\t=empty($_POST['id_beli'])?'0':$_POST['id_beli'];\n\t\t$data['NoUrut']\t\t=$_POST['no_trans'];\n\t\t$data['Tanggal']\t=tgltoSql($_POST['tanggal']);\n\t\t$data['ID_Jenis']\t=empty($_POST['cbayar'])?'1':$_POST['cbayar'];\t\n\t\t$data['ID_Pemasok']\t=empty($_POST['id_pemasok'])?0:$_POST['id_pemasok'];\t\n\t\t$data['Nomor']\t\t=empty($_POST['faktur'])? $jenis.'-'.date('ymd').'-'.substr($_POST['no_trans'],6,4):$_POST['faktur'];\t\n\t\t$data['Bulan']\t\t=substr($_POST['tanggal'],3,2);\t\n\t\t$data['Tahun']\t\t=substr($_POST['tanggal'],6,4);\t\n\t\t$data['Deskripsi']\t=addslashes($_POST['pemasok']);\t\n $data['JatuhTempo'] =empty($_POST['jtempo'])?0:$_POST['jtempo'];\n\t\t//$total=empty($_POST['total'])? 0:$_POST['total'];\n\t\t($cek=='')?\n\t\t$this->Admin_model->replace_data('inv_pembelian',$data):'';\n\t\t//$this->Admin_model->upd_data('inv_pembelian',\"set ID_Bayar='\".$total.\"'\",\"where ID='$cek'\");\n\t\t\n\t\t$datax['nomor']\t\t=$_POST['no_trans'];\n\t\t$datax['jenis_transaksi']='GR2';\n\t\t$this->Admin_model->replace_data('nomor_transaksi',$datax);\n\t}", "title": "" }, { "docid": "19c66aaa68b76d6a40f0df3c3fcd248d", "score": "0.4938233", "text": "function careerfy_vc_about_company()\n{\n\n $about_param_arr = array(\n array(\n 'type' => 'dropdown',\n 'heading' => esc_html__(\"Style\", \"careerfy-frame\"),\n 'param_name' => 'ab_view',\n 'value' => array(\n esc_html__(\"Style 1\", \"careerfy-frame\") => 'view1',\n esc_html__(\"Style 2\", \"careerfy-frame\") => 'view2',\n ),\n 'description' => ''\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__(\"Title\", \"careerfy-frame\"),\n 'param_name' => 'title',\n 'value' => '',\n 'description' => ''\n ),\n array(\n 'type' => 'textarea',\n 'heading' => esc_html__(\"Bold Text\", \"careerfy-frame\"),\n 'param_name' => 'bold_txt',\n 'value' => '',\n 'description' => ''\n ),\n array(\n 'type' => 'textarea_html',\n 'heading' => esc_html__(\"About Text\", \"careerfy-frame\"),\n 'param_name' => 'content',\n 'value' => '',\n 'description' => ''\n ),\n array(\n 'type' => 'colorpicker',\n 'heading' => esc_html__(\"Title Color\", \"careerfy-frame\"),\n 'param_name' => 'title_color',\n 'value' => '',\n 'description' => '',\n ),\n array(\n 'type' => 'colorpicker',\n 'heading' => esc_html__(\"Content Color\", \"careerfy-frame\"),\n 'param_name' => 'desc_color',\n 'value' => '',\n 'description' => '',\n ),\n array(\n 'type' => 'careerfy_browse_img',\n 'heading' => esc_html__(\"Image\", \"careerfy-frame\"),\n 'param_name' => 'about_img',\n 'value' => '',\n 'description' => ''\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__(\"Button Text\", \"careerfy-frame\"),\n 'param_name' => 'btn_txt',\n 'value' => '',\n 'description' => ''\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__(\"Button URL\", \"careerfy-frame\"),\n 'param_name' => 'btn_url',\n 'value' => '',\n 'description' => ''\n ),\n );\n\n $about_param_arr = apply_filters('careerfy_about_company_fields', $about_param_arr);\n\n $attributes = array(\n \"name\" => esc_html__(\"About the Company\", \"careerfy-frame\"),\n \"base\" => \"careerfy_about_company\",\n \"category\" => esc_html__(\"Careerfy Theme\", \"careerfy-frame\"),\n \"class\" => \"\",\n \"params\" => $about_param_arr,\n );\n\n if (function_exists('vc_map')) {\n vc_map($attributes);\n }\n}", "title": "" }, { "docid": "837603dffab285f752a1c60a96b467e8", "score": "0.49380645", "text": "function showGeneralInfo($phpbms, $therecord){\r\n ?>\r\n<div id=\"createmodifiedby\" >\r\n <table>\r\n <tbody>\r\n <tr class=\"topRows\">\r\n <td class=\"cmTitles\">\r\n <input name=\"createdby\" type=\"hidden\" value=\"<?php $therecord[\"createdby\"] ?>\" />\r\n <input name=\"creationdate\" type=\"hidden\" value=\"<?php echo formatFromSQLDatetime($therecord[\"creationdate\"]) ?>\"/>\r\n created\r\n </td>\r\n <td><?php echo htmlQuotes($phpbms->getUserName($therecord[\"createdby\"]))?></td>\r\n <td><?php echo formatFromSQLDatetime($therecord[\"creationdate\"]) ?></td>\r\n <td id=\"cmButtonContainer\" rowspan=\"3\">\r\n <?php showSaveCancel(2)?>\r\n </td>\r\n </tr>\r\n <tr class=\"topRows\">\r\n <td class=\"cmTitles\">\r\n <input name=\"modifiedby\" type=\"hidden\" value=\"<?php $therecord[\"modifiedby\"] ?>\" />\r\n <input id=\"cancelclick\" name=\"cancelclick\" type=\"hidden\" value=\"0\" />\r\n <input name=\"modifieddate\" type=\"hidden\" value=\"<?php echo formatFromSQLDatetime($therecord[\"modifieddate\"]) ?>\"/>\r\n modified\r\n </td>\r\n <td><?php echo htmlQuotes($phpbms->getUserName($therecord[\"modifiedby\"]))?></td>\r\n <td><?php echo formatFromSQLDatetime($therecord[\"modifieddate\"]) ?></td>\r\n </tr>\r\n <tr>\r\n <td class=\"cmTitles\">\r\n uuid / id\r\n <input name=\"uuid\" id=\"uuid\" type=\"hidden\" value=\"<?php if(isset($therecord[\"uuid\"])) echo $therecord[\"uuid\"] ?>\" />\r\n <input id=\"id\" name=\"id\" type=\"hidden\" value=\"<?php echo $therecord[\"id\"]?>\" />\r\n </td>\r\n <td colspan=\"2\" id=\"cmIds\"><span><?php echo isset($therecord[\"uuid\"])?$therecord[\"uuid\"]:'&nbsp;' ?></span><span id=\"cmId\"><?php echo $therecord[\"id\"] ?></span></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n <?php\r\n }", "title": "" }, { "docid": "fc04049d957ad6da7aabd4ebd1cc8d17", "score": "0.4931736", "text": "function getCreate()\n\t{\n\t\t$controller = $this->getController();\n\t\t$request = $controller->getRequest();\n\t\tif($controller->getId())\n\t\t{\n\t\t\t$legend = sprintf(LAN_UI_EDIT_LABEL, $controller->getId());\n\t\t\t$form_start = vartrue($controller->headerUpdateMarkup);\n\t\t\t$form_end = vartrue($controller->footerUpdateMarkup);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$legend = LAN_UI_CREATE_LABEL;\n\t\t\t$form_start = vartrue($controller->headerCreateMarkup);\n\t\t\t$form_end = vartrue($controller->footerCreateMarkup);\n\t\t}\n\n\n\t\t$forms = $models = array();\n\t\t$forms[] = array(\n\t\t\t\t'id' => $this->getElementId(),\n\t\t\t\t//'url' => e_SELF,\n\t\t\t\t//'query' => 'self', or custom GET query, self is default\n\t\t\t\t'tabs' => true, // TODO - NOT IMPLEMENTED YET - enable tabs (only if fieldset count is > 1)\n\t\t\t\t'fieldsets' => array(\n\t\t\t\t\t'create' => array(\n\t\t\t\t\t\t'legend' => $legend,\n\t\t\t\t\t\t'fields' => $controller->getFields(), //see e_admin_ui::$fields\n\t\t\t\t\t\t'header' => $form_start,\n\t\t\t\t\t\t'footer' => $form_end,\n\t\t\t\t\t\t'after_submit_options' => true, // or true for default redirect options\n\t\t\t\t\t\t'after_submit_default' => $request->getPosted('__after_submit_action', $controller->getDefaultAction()), // or true for default redirect options\n\t\t\t\t\t\t'triggers' => 'auto', // standard create/update-cancel triggers\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t);\n\t\t$models[] = $controller->getModel();\n\n\t\treturn $this->renderCreateForm($forms, $models, e_AJAX_REQUEST);\n\t}", "title": "" }, { "docid": "d86a3b1503b656cb2424d1d5bac4b37c", "score": "0.49289158", "text": "protected function initHead()\r\n\t{\r\n\t\t$this->header = new Tag('h3');\r\n\t\t$this->closeButton = new Tag('button','×',array('class'=>'close','data-dismiss'=>'modal','type'=>'button'));\r\n\t\t$div = new Tag('div',array($this->closeButton,$this->header),'modal-header');\r\n\r\n\t\tparent::append($div);\r\n\t}", "title": "" } ]
6dcb2dc7edb99caf5ae6bff28f8fe868
Show the confirmation for deleting the specified resource
[ { "docid": "30244af541bd4dface8ac7e2f1316500", "score": "0.0", "text": "public function delete($id)\n {\n dd('t');\n }", "title": "" } ]
[ { "docid": "170e6ddee82d626d0bbd2d2d456ba4cf", "score": "0.76565504", "text": "protected function confirmDelete() {\n\t}", "title": "" }, { "docid": "dd22133d4544515fc3781df9a4815ab6", "score": "0.7451107", "text": "public function confirmAction() {\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\n\t\ttry {\n\t\t\tif (is_numeric ( $id )) {\n\t\t\t\t$this->view->back = \"/admin/$controller/edit/id/$id\";\n\t\t\t\t$this->view->goto = \"/admin/$controller/delete/id/$id\";\n\t\t\t\t$this->view->title = $this->translator->translate ( 'Are you sure you want to delete the invoice selected?' );\n\t\t\t\t$this->view->description = $this->translator->translate ( 'The invoice will not be longer available' );\n\t\t\t\t$record = $this->invoices->find ( $id );\n\t\t\t\t$this->view->recordselected = $record ['number'] . \" - \" . Shineisp_Commons_Utilities::formatDateOut ( $record ['invoice_date'] );\n\t\t\t} else {\n\t\t\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ), 'status' => 'danger' ) );\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\techo $e->getMessage ();\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "18d43f3548aab2fdf96dcdc4b918aa7d", "score": "0.7419468", "text": "public function confirmAction() {\r\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\r\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\r\n\t\ttry {\r\n\t\t\tif (is_numeric ( $id )) {\r\n\t\t\t\t$this->view->back = \"/admin/$controller/edit/id/$id\";\r\n\t\t\t\t$this->view->goto = \"/admin/$controller/delete/id/$id\";\r\n\t\t\t\t$this->view->title = $this->translator->translate ( 'Are you sure you want to delete the selected record?' );\r\n\t\t\t\t$this->view->description = $this->translator->translate ( 'If you delete the selected bank information, your customers will not be able to pay you with this method of payment' );\r\n\t\r\n\t\t\t\t$record = $this->productsattributes->find ( $id )->toArray();\r\n\t\t\t\t$this->view->recordselected = $record ['code'];\r\n\t\t\t} else {\r\n\t\t\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ), 'status' => 'danger' ) );\r\n\t\t\t}\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\techo $e->getMessage ();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a74a415a6ae4bd7a7421944c8d1dfc32", "score": "0.7369995", "text": "function delete()\n\t{\n\t\t$model = $this->getModel();\n\t\t$viewType\t= JFactory::getDocument()->getType();\n\t\t$view = $this->getView($this->view_item, $viewType);\n\t\t$view->setLayout('confirmdelete');\n\t\tif (!JError::isError($model)) {\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t//used to load in the confirm form fields\n\t\t$view->setModel($this->getModel('list'));\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "8eae9febbd6cf5be127506fb084b9758", "score": "0.7316421", "text": "public function confirmDelete( )\r\n {\r\n throw new KVDdom_RedactieException( 'Kan het verwijderen niet bevestigen van een object dat niet verwijderd is.' );\r\n }", "title": "" }, { "docid": "ab49e41026b277780397c907ef84967b", "score": "0.71172047", "text": "public function confirm_delete($id)\n\t{\n\t\treturn_view('view.confirm_delete.php', $id);\n\t}", "title": "" }, { "docid": "7da6592e8a44a13fa81ee523bdc8712e", "score": "0.71158195", "text": "public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }", "title": "" }, { "docid": "fec35cf9a6b12241f23769fa2c8051d4", "score": "0.7104888", "text": "public function confirm()\n {\n $task = $this->getTask();\n $link = $this->getExternalTaskLink($task);\n\n $this->response->html($this->template->render('task_external_link/remove', array(\n 'link' => $link,\n 'task' => $task,\n )));\n }", "title": "" }, { "docid": "6335a9ebea9bb421e05ea252f47ed1b2", "score": "0.69643915", "text": "public function removeConfirm()\n {\n $project = $this->getProject();\n $recovery_plan_id = $this->request->getIntegerParam('recovery_plan_id', 0);\n\n\n $this->response->html($this->template->render('status:recoveryPlanDetail/remove', array(\n 'title' => t('Remove recovery plan'),\n 'project_id' => $project['id'],\n 'values' => array('id' => $recovery_plan_id)\n )));\n }", "title": "" }, { "docid": "bb378c502008e51d36cd0e46d7ccb329", "score": "0.6941222", "text": "function displayDeleteConfirmation()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// formular sent\n\t\tif ($_POST[\"form\"][\"delete\"])\n\t\t{\n\t\t\t$ini = true;\n\t\t\t$db = false;\n\t\t\t$files = false;\n\n\t\t\t/* disabled\n\t\t\tswitch ($_POST[\"form\"][\"delete\"])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\tcase 2:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\t$db = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\t$db = true;\n\t\t\t\t\t$files = true;\n\t\t\t\t\tbreak; \n\t\t\t}\n\t\t\t*/\n\n\t\t\t$msg = $this->setup->getClient()->delete($ini,$db,$files);\n\n\t\t\tilUtil::sendInfo($this->lng->txt(\"client_deleted\"),true);\n\t\t\tilUtil::redirect(\"setup.php\");\n\t\t}\n\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_delete\"));\n\n\t\t// output\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.form_delete_client.html\", \"setup\");\n\n\t\t// delete panel\n\t\t$this->tpl->setVariable(\"FORMACTION\", \"setup.php?cmd=gateway\");\n\t\t$this->tpl->setVariable(\"TXT_DELETE\", $this->lng->txt(\"delete\"));\n\t\t$this->tpl->setVariable(\"TXT_DELETE_CONFIRM\", $this->lng->txt(\"delete_confirm\"));\n\t\t$this->tpl->setVariable(\"TXT_DELETE_INFO\", $this->lng->txt(\"delete_info\"));\n\n\t\t$this->checkPanelMode();\n\t}", "title": "" }, { "docid": "bea95474a8ad452f80715cb3eb939f09", "score": "0.68515825", "text": "public function confirmDeletion($id) {\n\n # Get the book they're attempting to delete\n $book = Book::find($id);\n\n if(!$book) {\n Session::flash('message', 'Book not found.');\n return redirect('/books');\n }\n\n return view('books.delete')->with('book', $book);\n }", "title": "" }, { "docid": "2582bc0ef644983f6b1044a8a281c6af", "score": "0.6812231", "text": "public function deleteDance(){\n $data = [\n 'status' => ''\n ];\n if(isset($_GET['id'])) {\n $id = $_GET['id'];\n\n if (isset($_POST['confirm'])) {\n if ($_POST['confirm'] == 'Yes') {\n $this->adminModel->deleteDance($id);\n $data['status'] = 'Event has been deleted';\n $this->view('admins/homepage', $data);\n } else if ($_POST['confirm'] == 'No') {\n $data['status'] = 'Event could not be deleted please contact the administrator';\n $this->view('admins/homepage', $data);\n }\n }\n }\n $this->view('admins/deleteDance' , $data);\n\n }", "title": "" }, { "docid": "08c524d5ed1004452df540e76fe51936", "score": "0.67679715", "text": "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "title": "" }, { "docid": "2d63e538f10f999d0646bf28c44a70bf", "score": "0.67618865", "text": "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "78a0cc133630c8e9b3d2702537e1c21a", "score": "0.6720281", "text": "public function delete(){\n $this->product->id = $_GET['delete_id'];\n\n // delete the product\n if($this->product->delete()){\n echo \"<div class=\\\"alert alert-success alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Object was deleted.\";\n echo \"</div>\";\n }\n\n // if unable to delete the product\n else{\n echo \"<div class=\\\"alert alert-danger alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Unable to delete object.\";\n echo \"</div>\";\n }\n }", "title": "" }, { "docid": "1473487760e0b6d4a45b3501ae5bf6bb", "score": "0.66749567", "text": "public function deleteBackupConfirm()\n {\n $delete_backups = $this->getPost('backups');\n $type = $this->getPost('type');\n $backups = $this->validateBackups($delete_backups, $type);\n $variables = array(\n 'settings' => $this->settings,\n 'backups' => $backups,\n 'backup_type' => $type,\n 'method' => $this->getPost('method'),\n 'errors' => $this->errors,\n 'view_helper' => $this->view_helper,\n 'url_base' => $this->url_base,\n 'menu_data' => $this->backup_lib->getDashboardViewMenu(),\n 'section' => 'db_backups',\n 'theme_folder_url' => plugin_dir_url(self::name)\n );\n \n //$template = 'backuppro/delete_confirm';\n \n //ee()->view->cp_page_title = $this->services['lang']->__('dashboard');\n $template = 'admin/views/delete_confirm';\n $this->renderTemplate($template, $variables);\n }", "title": "" }, { "docid": "c218c2a574f9f817f30ffc92a4d857b0", "score": "0.6664138", "text": "public function confirmdelete(Post $post) {\n return view('admin.posts.confirmdelete', compact('post'));\n }", "title": "" }, { "docid": "c8a9542f54c014d1893177a0b290394b", "score": "0.66082376", "text": "public function getConfirmDelete($id) {\n\t\t$wishlist = \\App\\Wishlist::find($id);\n\n\t\treturn view('wishlist.confirmdelete')->with('wishlist', $wishlist);\n\n\t}", "title": "" }, { "docid": "247a4b959c519fcd19527bc7cbb0585b", "score": "0.65505373", "text": "public function actionDelete() {}", "title": "" }, { "docid": "247a4b959c519fcd19527bc7cbb0585b", "score": "0.65505373", "text": "public function actionDelete() {}", "title": "" }, { "docid": "31d5cc4e0e94bfedca0877d05b0e94aa", "score": "0.6545251", "text": "public function deleteAction(){\n $this->_helper->json(\"Esto no esta implementado\");\n }", "title": "" }, { "docid": "8a58b43bc93883d414fe9c0bda476815", "score": "0.6523831", "text": "public function showDeleteMessageAction()\n {\n Flash::addMessage('Your account will be deleted in the next few days by the webmaster.', Flash::INFO);\n\n $this->redirect('/');\n }", "title": "" }, { "docid": "2fa5c8997a0fb0151eeb2805ffa5e332", "score": "0.64947665", "text": "public function confirmingDeletion()\n {\n $this->confirmingExpenseDeletion = true;\n }", "title": "" }, { "docid": "4e1b4be106e0e2c98e67c4ed9fbfeefb", "score": "0.6479382", "text": "public function deleteAction() {\n\t\t$this->_notImplemented();\n\t}", "title": "" }, { "docid": "4b5e62ab8bc8e676f124b2c76c6ed4a4", "score": "0.64666086", "text": "public function deleteAction() {\n \n }", "title": "" }, { "docid": "4785e659188a872fbe8421aa7b64286e", "score": "0.64423984", "text": "public function isDeleteResource();", "title": "" }, { "docid": "d740dd07f64f216b1b86159da573f4ef", "score": "0.64241016", "text": "function rt_button_delete($target)\n{\n return rt_ui_button('delete', $target, 'trash', array('method' => 'post', 'confirm' => 'Are you sure?'));\n}", "title": "" }, { "docid": "365922253d9cf104bc73c2ccc8e2403d", "score": "0.6422257", "text": "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "title": "" }, { "docid": "dee50bc759d0acf0e13e3ccf3c206081", "score": "0.64113003", "text": "public function delete()\n {\n if (post_param_integer('confirmed', 0) != 1) {\n $url = get_self_url();\n $text = do_lang_tempcode('DELETE_INVOICE');\n\n $hidden = build_keep_post_fields();\n $hidden->attach(form_input_hidden('confirmed', '1'));\n $hidden->attach(form_input_hidden('from', get_param_string('from', 'browse')));\n\n return do_template('CONFIRM_SCREEN', array('_GUID' => '45707062c00588c33726b256e8f9ba40', 'TITLE' => $this->title, 'FIELDS' => $hidden, 'PREVIEW' => $text, 'URL' => $url));\n }\n\n $GLOBALS['SITE_DB']->query_delete('invoices', array('id' => get_param_integer('id')), '', 1);\n\n $url = build_url(array('page' => '_SELF', 'type' => post_param_string('from', 'browse')), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "title": "" }, { "docid": "6ffeb9dd7505e3508c0c580e0733fd29", "score": "0.63963455", "text": "public function delete()\n {\n Contest::destroy($this->modelId);\n $this->modalConfirmDeleteVisible = false;\n $this->resetPage();\n }", "title": "" }, { "docid": "6271868a7f39bdd60099b5aac0035576", "score": "0.63895357", "text": "public function confirmDeleteBook()\n\t{\n\t\t$this->delete_book_model->deleteBook($this->input->post('bookISBN'));\n\t\tredirect($this->config->base_url());\n\t}", "title": "" }, { "docid": "b3f4c9b93c91ae07d4c055258bb846c3", "score": "0.63878024", "text": "public function deleteConfirm(int $id): void\n {\n abort_if(Gate::denies('roleDelete'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $this->resetInputFields();\n $this->setInputFields($id);\n\n $this->deleteModal = true;\n }", "title": "" }, { "docid": "c1ad2fc277f403e24d383e0c904d0730", "score": "0.638511", "text": "public function deleteAction()\n {\n /* Check if user is signed in and redirect to sign in if is not */\n $this->requireSignin();\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Redirect link after deleting. By default index page */\n $returnUrl = (isset($_POST['return'])) ? '/'.$_POST['return'] : '/';\n\n /* Getting Question by id */\n $answer = Answer::getById(intval($_POST['id']));\n\n /* If Answer exists and is active */\n if ($answer) {\n\n /* Checking if signed in user is answer's author */\n if ($answer->user_id == $user->id) {\n\n /* Check if question deleted */\n if (Answer::delete($answer->id)) {\n\n Flash::addMessage(\"Answer deleted!\", Flash::INFO);\n \n } else {\n\n Flash::addMessage(\"You can not delete this answer!\", Flash::INFO);\n }\n\n } else {\n\n Flash::addMessage(\"You can not delete this answer!\", Flash::INFO);\n }\n\n } else {\n\n Flash::addMessage(\"You can not delete this answer!\", Flash::INFO);\n }\n\n /* Redirect back */\n $this->redirect($returnUrl);\n }", "title": "" }, { "docid": "9befbe42f954cab4c13b351326f75bb7", "score": "0.6375123", "text": "function delete()\n {\n if ($this->GET('sure')) {\n $function = basename($this->table->tablename()) . \"_onRowDelete\";\n if (function_exists($function)) {\n $function($this->table->data($this->GET('id')), &$this->table);\n }\n\n $this->table->delete($this->GET('id'));\n $this->table->write();\n $this->browse();\n return;\n }\n $this->displayHead();\n echo 'Do you really want to<br>delete row \\'' . $this->GET('id') . '\\'?<p>';\n echo '<a class=\"danger\" href=\"' . $this->SELF . '?method=delete&table=' . $this->table->tablename() . '&id=' . $this->GET('id') . '&sure=1\">Yes</a> | ';\n echo '<a href=\"' . $this->SELF . '?method=browse&table=' . $this->table->tablename() . '\">No</a>';\n }", "title": "" }, { "docid": "62dd8e7789c12be7ea614640a7eff190", "score": "0.6372062", "text": "protected function deleteAction()\n {\n }", "title": "" }, { "docid": "265146f2f90bd9510d927b302839eb32", "score": "0.63700604", "text": "public function getDeleteQuestion()\n {\n return sprintf($this->_('Do you want to delete this %s?'), $this->getTopic(1));\n }", "title": "" }, { "docid": "0004d11b00c6844cd2351da01fa912e2", "score": "0.63679415", "text": "function confirmation_delete(){\n\t\t\tif($this->check_session->user_session() && $this->check_session->get_level()==100){\n\t\t\t\tif($this->uri->segment(3)!='99'){ //jika bukan user pusat\n\t\t\t\t\t$data['url']\t\t= site_url('rsa_tambah_em/exec_delete/'.$this->uri->segment(3));\n\t\t\t\t\t$data['message']\t= \"Apakah anda yakin akan menghapus data ini ( kode : \".$this->uri->segment(3).\") ?\";\n\t\t\t\t\t$this->load->view('confirmation_',$data);\n\t\t\t\t}else{ //jika user pusat\n\t\t\t\t\t$data['class']\t = 'option box';\n\t\t\t\t\t$data['class_btn']\t = 'ya';\n\t\t\t\t\t$data['message'] = 'Unit pusat tidak diijinkan untuk dihapus';\n\t\t\t\t\t$this->load->view('messagebox_',$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshow_404('page');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d060fbf98e7948d2e23eb1bfcccd2c01", "score": "0.63652897", "text": "public function confirmarEliminarComentario($id){\n $singleComentario = Comentarios::find($id);\n return view('preguntas.confirmarEliminarComentario', compact('singleComentario'));\n }", "title": "" }, { "docid": "cf1913ceefa775c023d45db360e31459", "score": "0.6357076", "text": "public function delete()\n\t{\n\t\tJSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->_result = $result = parent::delete();\n\t\t$model = $this->getModel();\n\n\t\t//Define the redirections\n\t\tswitch ($this->getLayout() . '.' . $this->getTask())\n\t\t{\n\t\t\tcase 'default.delete':\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t), array(\n\t\t\t\t\t'cid[]' => null\n\t\t\t\t));\n\t\t\t\tbreak;\n\n\t\t\tcase 'modal.delete':\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t), array(\n\t\t\t\t\t'cid[]' => null\n\t\t\t\t));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t));\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "8347adb84d2beeefa252fa28c57b91ec", "score": "0.63534456", "text": "public function confirmDelete(Role $role)\n {\n $this->authorize('delete', Role::class);\n\n return view('laralum::pages.confirmation', [\n 'method' => 'DELETE',\n 'action' => route('laralum::roles.destroy', ['role' => $role]),\n ]);\n }", "title": "" }, { "docid": "31dc62c2485e434b87ad387cf294106d", "score": "0.63470995", "text": "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "title": "" }, { "docid": "90d6910794bb86d3f09bc957a33b00b0", "score": "0.63416874", "text": "public function deleteAction()\n {\n \n }", "title": "" }, { "docid": "84c0a9a6e4b28d56b11d43f317dbe2f4", "score": "0.63346213", "text": "public function deleteAction() {\n parent::deleteAction();\n }", "title": "" }, { "docid": "a8dfafc6ab42e386d19f3a2c605ae246", "score": "0.6319041", "text": "public function delete()\n\n {\n Customers::find($this->deleteId)->delete();\n session()->flash('message', 'Post Deleted Successfully.');\n\n }", "title": "" }, { "docid": "307c9276291de4dc27d41ac773e07cb8", "score": "0.6300799", "text": "public function getClientDeletionURL($id)\n\t{\n\t\treturn $this->baseURL . \"/action/confirm/\" . $id;\n\t}", "title": "" }, { "docid": "0f4be91a256a42282bf68651cfc70b06", "score": "0.6273506", "text": "protected function markConfirmDelete( )\r\n {\r\n $this->_sessie->registerConfirmDelete( $this );\r\n }", "title": "" }, { "docid": "947557ed1dacf69168017b8e381389ed", "score": "0.6272791", "text": "public function deleteAction(){\n $id = $this->filterInt($this->_params[0]);\n $supplier = SupplierModel::getByPK($id);\n \n if($supplier === FALSE){\n $this->redirect('/suppliers');\n }\n $this->language->load('suppliers.messages');\n if($supplier ->delete()){\n $this->messeger->add($this->language->get('message_delete_success'));\n $this->redirect('/suppliers');\n }else {\n $this->messeger->add($this->language->get('message_delete_failed'), Messenger::ERROR_MESSEEGE);\n $this->redirect('/suppliers');\n }\n }", "title": "" }, { "docid": "5f1e9077f3e1c710ff4da157383a064b", "score": "0.62716913", "text": "public function getModalDelete($id = null)\n {\n $error = '';\n $model = '';\n $confirm_route = route('personas.delete',['id'=>$id]);\n return View('admin.layouts/modal_confirmation', compact('error','model', 'confirm_route'));\n\n }", "title": "" }, { "docid": "e17efa390019b85830f82c0fb3275cbf", "score": "0.627143", "text": "public function postDeleteconfirm(Request $request)\n {\n if( ! $request->ajax()) response()->json('error', 400);\n\n $id = $request->input('id');\n $model = $this->repo->showById($id);\n\n if ( ! $model)\n {\n $message = pick_trans('exception.not_found', ['id' => $id]);\n\n return message()->json(404, $message);\n }\n\n $result['title'] = Transformer::title($model);\n $result['subject'] = pick_trans('confirm_deleted');\n\n return message()->json(200, '', $result);\n }", "title": "" }, { "docid": "ca5ed91be2bbd27ead26045dd53e3532", "score": "0.6269507", "text": "public function confirmDelete($id)\n {\n $reply = $this->reply->find($id);\n\n $this->authorize('delete', $reply);\n\n return view('reply.delete', compact('reply'));\n }", "title": "" }, { "docid": "af929b06fb326e85df0d01775ddc657b", "score": "0.6257478", "text": "function showDeleteConfirmation($a_ids, $a_supress_message = false)\n\t{\n\t\tif (!is_array($a_ids) || count($a_ids) == 0) {\n\t\t\tilUtil::sendFailure(self::dic()->language()->txt(\"no_checkbox\"), true);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Remove duplicate entries\n\t\t$a_ids = array_unique((array)$a_ids);\n\n\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t$cgui = new ilConfirmationGUI();\n\n\t\tif (!$a_supress_message) {\n\t\t\t$msg = self::dic()->language()->txt(\"info_delete_sure\");\n\n\t\t\tif (!self::dic()->settings()->get('enable_trash')) {\n\t\t\t\t$msg .= \"<br/>\" . self::dic()->language()->txt(\"info_delete_warning_no_trash\");\n\t\t\t}\n\n\t\t\t$cgui->setHeaderText($msg);\n\t\t}\n\t\t$cgui->setFormAction(self::dic()->ctrl()->getFormAction($this));\n\t\t$cgui->setCancel(self::dic()->language()->txt(\"cancel\"), \"cancelDelete\");\n\t\t$cgui->setConfirm(self::dic()->language()->txt(\"confirm\"), \"confirmedDelete\");\n\n\t\t$form_name = \"cgui_\" . md5(uniqid());\n\t\t$cgui->setFormName($form_name);\n\n\t\t$deps = array();\n\t\tforeach ($a_ids as $ref_id) {\n\t\t\t$obj_id = ilObject::_lookupObjId($ref_id);\n\t\t\t$type = ilObject::_lookupType($obj_id);\n\t\t\t$title = call_user_func(array( ilObjectFactory::getClassByType($type), '_lookupTitle' ), $obj_id);\n\t\t\t$alt = self::dic()->language()->txt(\"icon\") . \" \" . ilPlugin::lookupTxt(\"rep_robj\", $type, \"obj_\" . $type);\n\n\t\t\t$title .= $this->handleMultiReferences($obj_id, $ref_id, $form_name);\n\n\t\t\t$cgui->addItem(\"id[]\", $ref_id, $title, ilObject::_getIcon($obj_id, \"small\", $type), $alt);\n\n\t\t\tilObject::collectDeletionDependencies($deps, $ref_id, $obj_id, $type);\n\t\t}\n\t\t$deps_html = \"\";\n\n\t\tif (is_array($deps) && count($deps) > 0) {\n\t\t\tinclude_once(\"./Services/Repository/classes/class.ilRepDependenciesTableGUI.php\");\n\t\t\t$tab = new ilRepDependenciesTableGUI($deps);\n\t\t\t$deps_html = \"<br/><br/>\" . $tab->getHTML();\n\t\t}\n\n\t\tself::dic()->mainTemplate()->setContent($cgui->getHTML() . $deps_html);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f8d27641a8d73a0f3dee9ce274e5a71b", "score": "0.6256213", "text": "function delete() {\n$id = intval( $_GET[\"id\"] );\n//delete the database record\n$q1 = \"delete from qlns_administrator where ctn_id = '$id'\";\n@mysql_query($q1) or die(mysql_error());\necho \"<script> alert ('Xóa thành viên thành công ! ') </script>\";\necho \"<div align='center'> <font color=blue size=3><img src='images/undo.gif' border='0'><a href='admin.php?dialoose=select'> Trở về </a>\";\n}", "title": "" }, { "docid": "882272c2b0899e7114269758b9294c83", "score": "0.62543535", "text": "public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }", "title": "" }, { "docid": "6ffce2a312ed7babcbc2d0c0b4a3fc7a", "score": "0.62491405", "text": "public function destroy()\n {\n //build a \"are you sure you want to delete\" popup/page\n\n //get user id from session\n //userid->delete\n //direct to page\n }", "title": "" }, { "docid": "58d4d1bbf9dcd91642529cd98be726cd", "score": "0.62431747", "text": "function showDeleteLink()\n {\n $user = common_current_user();\n\n $todel = (empty($this->repeat)) ? $this->notice : $this->repeat;\n\n if (!empty($user) &&\n ($todel->profile_id == $user->id || $user->hasRight(Right::DELETEOTHERSNOTICE))) {\n $this->out->text(' ');\n $deleteurl = common_local_url('deletenotice',\n array('notice' => $todel->id));\n $this->out->element('a', array('href' => $deleteurl,\n 'class' => 'notice_delete',\n // TRANS: Link title in notice list item to delete a notice.\n 'title' => _('Delete this notice from the timeline.')),\n // TRANS: Link text in notice list item to delete a notice.\n _('Delete'));\n }\n }", "title": "" }, { "docid": "83ab4d88e3861cd7477c0207c4c675ba", "score": "0.6231097", "text": "public function confirmDestroy(){\n\t\tif(Auth::check()){\n\t\t\treturn view('user.confirm_destroy');\n\t\t}else{\n\t\t\treturn redirect('/login')->with('error','Please log in to perform this action');\n\t\t}\n\t}", "title": "" }, { "docid": "777d6b385d399125b81a68bde3684f3b", "score": "0.6228023", "text": "public function deleteAction()\n {\n }", "title": "" }, { "docid": "4aedde17116ef9237ff194d0e53ac481", "score": "0.6225499", "text": "public function getDelete($id)\n {\n $fornecedor = Fornecedor::find($id);\n $title = \"Remover Fornecedor\";\n // Show the page\n return view('admin.fornecedor.delete', compact('fornecedor','title'));\n }", "title": "" }, { "docid": "11599dcd85af69d3406ace922c0c719c", "score": "0.62244385", "text": "function path_admin_delete_confirm_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n path_admin_delete($form_state['values']['pid']);\n $form_state['redirect'] = 'admin/build/path';\n return;\n }\n}", "title": "" }, { "docid": "ffe08f3bb6f23e6274ffc9c968519d16", "score": "0.6216473", "text": "public function actionDelete($id)\n\t{\n\t\t$this->subPageTitle = 'Xóa giáo viên';\n\t\t$model = $this->loadModel($id);\n\t\tif($model->status==User::STATUS_PENDING){\n\t\t\t$model->deleted_flag = 1;//Deleted flag\n\t\t\t$model->save();\n\t\t}\n\t\t$this->redirect(array('/admin/teacher/index'));\n\t}", "title": "" }, { "docid": "160dbd708853f9dde3a123fd822373ec", "score": "0.62130123", "text": "public function confirmDelete(Permission $permission)\n {\n $this->authorize('delete', Permission::class);\n\n return view('laralum::pages.confirmation', [\n 'method' => 'DELETE',\n 'action' => route('laralum::permissions.destroy', ['permission' => $permission->id]),\n ]);\n }", "title": "" }, { "docid": "a8f1e5555f1826b6436755251652ae8a", "score": "0.6212537", "text": "function _displayFormConfirm($err='')\r\n\t{\r\n\t\t$dt = $this->_dt;\r\n\r\n\t\t$utpage = new utPage('draws');\r\n\t\t$content =& $utpage->getPage();\r\n\t\t$form =& $content->addForm('tDelDraws', 'draws', KID_DELETE);\r\n\r\n\t\t// Initialize the field\r\n\t\t$drawId = kform::getData();\r\n\t\tif ($err =='' && count($drawId))\r\n\t\t{\r\n\t\t\t$form->addHide(\"drawId\", $drawId);\r\n\t\t\t$form->addMsg('msgConfirmDel');\r\n\t\t\t$form->addBtn('btnDelete', KAF_SUBMIT);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($err!='') $form->addWng($err);\r\n\t\t\telse $form->addWng('msgNeedDraws');\r\n\t\t}\r\n\t\t$form->addBtn('btnCancel');\r\n\t\t$elts = array('btnDelete', 'btnCancel');\r\n\t\t$form->addBlock('blkBtn', $elts);\r\n\r\n\t\t//Display the page\r\n\t\t$utpage->display();\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "06ccbd150a4ee5079e0a5870f8e476b6", "score": "0.62076336", "text": "public function deletequestionAction()\r\n {\r\n if ($this->getRequest()->isPost()) {\r\n $params = $this->getRequest()->getParams();\r\n $questionId = $params['questionId'];\r\n\r\n\r\n $question = new Application_Model_DbTable_FicheQuestion();\r\n // delete the question\r\n $question->deleteQuestion($questionId);\r\n\r\n // Return to the page informations\r\n $this->_helper->redirector('gestionquestion', 'admin', null);\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "6fb96facc11828af1f3634462044f021", "score": "0.6201672", "text": "public function deleteAction() {\n $post_data = $request = $this->getRequest()->getPost();\n\n $mapper = new Application_Model_DistractionMapper();\n $anzDeletedRows = $mapper->delete($post_data['id']);\n\n $this->view->success = ($anzDeletedRows > 0);\n }", "title": "" }, { "docid": "fdc4e66e5e055e3887cbc2fba4b47888", "score": "0.62005377", "text": "function ting_visual_relation_delete_slide_confirm_form($form, &$form_state, $slide_id = NULL) {\n // Save the slide for the submit handler.\n $form['slide_id'] = array('#type' => 'value', '#value' => $slide_id);\n return confirm_form($form,\n t('Are you sure you want to delete the relation browser slide?'),\n 'admin/config/ting/ting-visual-relation/app-settings/' . $slide_id .'/edit',\n t('This action cannot be undone.'),\n t('delete'),\n t('cancel')\n );\n}", "title": "" }, { "docid": "0c74e49cae332371e9045ccdbf699796", "score": "0.619765", "text": "public function destroy($id)\n {\n //\n $post=newrecord::find($id);\n $post->delete();\n return view('confirm.out');\n }", "title": "" }, { "docid": "9b48892c682c7e6fb6038724e305b53b", "score": "0.6195017", "text": "public function deleteAction() : object\n {\n if ($_SESSION['permission'] === \"admin\") {\n $form = new DeleteForm($this->di);\n $form->check();\n\n $this->page->add(\"user/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $this->page->render([\n \"title\" => \"Delete an item\",\n ]);\n }\n $this->di->get(\"response\")->redirect(\"user/login\");\n }", "title": "" }, { "docid": "e9368d07e19419c87147fc73baa2aaed", "score": "0.61796963", "text": "public function deleteAction()\n\t{\n\t\t$message = 'Une erreur est survenue. Votre &eacute;cole n\\'a pas été supprimé.';\n\n\t\t$school = School::find( (int) $this->getRequest()->post('id') );\n\t\t$deleted = $school->delete();\n\n\t\tif ( $deleted ) {\n\t\t\t$message = 'Votre &eacute; a correctement été supprimé.';\n\t\t}\n\t\t$this->render( View::make( 'schools/index' , array(\n\t\t\t'status' => $deleted,\n\t\t\t'message' => $message,\n\t\t\t'title' => 'Mes &Eacute;coles',\n\t\t\t'entities' => School::all()\n\t\t) ) );\n\t}", "title": "" }, { "docid": "f68f52a83ef0ef6d8ccb443852f0892f", "score": "0.6173769", "text": "public function getRequestActionText()\n {\n return t(\"Deletion\");\n }", "title": "" }, { "docid": "6a8716eab1789ff2ef9aa555d125d974", "score": "0.6166515", "text": "public function confirm_deleteactivity($activity_id) {\n $this->template->content = View::instance('v_activities_deleteact');\n $this->template->title = \"Confirm delete?\";\n $this->template->content->activity_id = $activity_id;\n\n # Render template\n echo $this->template;\n\n }", "title": "" }, { "docid": "3b3289507251c77973664c584677a741", "score": "0.616249", "text": "function node_delete_confirm(&$form_state, $node) {\n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $node->nid,\n );\n\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "title": "" }, { "docid": "988cda13879d7359fd30dbd82ab1022d", "score": "0.61327523", "text": "public function confirmUserDeletion(): void\n {\n $this->resetErrorBag();\n\n $this->password = '';\n\n $this->dispatch('confirming-delete-user');\n\n $this->dispatch('open-modal', id: 'confirmingUserDeletion');\n }", "title": "" }, { "docid": "8ec62063d9cdea94779c555d705fcd21", "score": "0.6124804", "text": "public function delete(){\n\t\t$id =$_GET['delete'];\n\t\t$sql= $this->link->query(\"DELETE FROM social WHERE id='$id'\");\n\t\t if($sql){\n\t\techo \"<script>alert('Are you sure want to delete?')</script>\";\t\n\t\techo \"<script>window.location.href = './social.php'</script>\";\n exit;\n\t }\n\t}", "title": "" }, { "docid": "d337344099c1a79e5b7566a077920b25", "score": "0.61176425", "text": "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "title": "" }, { "docid": "3d3310c658feb540b71fc72432208ca2", "score": "0.61173916", "text": "public function actionDelete()\n {\n\n $id_usuario_actual=\\Yii::$app->user->id;\n $buscaConcursante = Concursante::find()->where(['id' => $id_usuario_actual])->one();\n\n $request = Yii::$app->request;\n $id_tabla_presupuesto=$request->get('id_tabla_presupuesto');\n $id_postulacion = $request->get('id_postulacion');\n\n $buscaPostulacion = Postulacion::find()->where(['and',['id_postulacion' => $id_postulacion],['id_concursante' => $buscaConcursante->id_concursante]])->one();\n $buscaTablaPresupuesto = Tablapresupuesto::find()->where(['id_tabla_presupuesto' => $id_tabla_presupuesto])->one();\n if($buscaPostulacion != null && $buscaTablaPresupuesto != null){ \n\n $this->findModel($id_tabla_presupuesto)->delete();\n\n return $this->redirect(['/site/section4', 'id_postulacion' => $id_postulacion]);\n\n }else{\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n\n }", "title": "" }, { "docid": "5e8a4df9796d3bfb561ca9ef963fce9a", "score": "0.61112124", "text": "public function deleteAction( $site = 'default', $resource, $id )\n\t{\n\t\tif( config( 'shop.authorize', true ) ) {\n\t\t\t$this->authorize( 'admin' );\n\t\t}\n\n\t\t$cntl = $this->createClient( $site, $resource );\n\t\treturn $this->getHtml( $site, $cntl->delete( $id ) . $cntl->search() );\n\t}", "title": "" }, { "docid": "1a9f3337ef7009ec17136e0df862c92c", "score": "0.61058885", "text": "public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('backend-guildes-list');\n }\n $oTable = $this->getTableGuilde();\n $oEntite = $oTable->findRow($id);\n $oTable->delete($oEntite);\n $this->flashMessenger()->addMessage($this->_getServTranslator()->translate(\"La guilde a été supprimée avec succès.\"), 'success');\n return $this->redirect()->toRoute('backend-guildes-list');\n }", "title": "" }, { "docid": "f62c9b44a8d0c51bcfc43d16b7cbd100", "score": "0.6100088", "text": "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "5fd3442d13a750f50334dfd7bb7aee69", "score": "0.60988647", "text": "public function actionDelete()\r\n {\r\n if (!$this->requireValues($_POST, \"id\")) {\r\n AjaxResponse::missParam(\"id in post is required\");\r\n }\r\n if (CourseResource::model()->deleteByPk($_POST['id'], \"user_id=:u\", array('u' => Yii::app()->user->id))) {\r\n AjaxResponse::success();\r\n } else {\r\n AjaxResponse::resourceNotFound();\r\n }\r\n }", "title": "" }, { "docid": "c98ee3fa8c8df12399ba2a80cd481346", "score": "0.6094184", "text": "public function deleteAction() {\n\t\t\t$this->_forward('index');\n\t\t}", "title": "" }, { "docid": "e72c1aa38a498f71eb2150ba0e3e1c86", "score": "0.6089962", "text": "public function delete_confirm_supplier()\n\t {\n\t \t$id=file_get_contents(\"php://input\");\n\t \t$query=$this->ApiModel->delete_confirm_supplier($id);\n\t \techo json_encode($query);\n\t }", "title": "" }, { "docid": "1057335399201a6f86bb2a1f953e547c", "score": "0.6085128", "text": "function admin_delete($id){\n\t\t$this->loadModel('Pri');\n\t\t$this->Pri->delete($id);\n\t\t$this->Session->setFlash('Le contenu a bien été supprimé'); \n\t\t$this->redirect('admin/prix/index'); \n\t}", "title": "" }, { "docid": "14115e6338d02542d38ac57c08aadeb9", "score": "0.6077937", "text": "function displayDeleteScreen()\t{\n\t\t$pluginId=$conf['pluginId'];\n\t\t$content=\"feal : displayDeleteScreen unset content\";\n\t\tif ($this->conf['delete'])\t{\t// If deleting is enabled\n\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ($this->aCAuth($origArr) && $this->conf['requireLogin']) || !$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to delete\n\t\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\t\t\n\t\t\t\tif (is_array($origArr))\t{\n\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t// Display the form, if access granted.\n\t\t\t\t\t\t$this->markerArray['###HIDDENFIELDS###'].= '<input type=\"hidden\" name=\"rU['.$pluginId.']\" value=\"'.$this->recUid.'\" />';\n\t\t\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_DELETE_PREVIEW###', $origArr);\n\t\t\t\t\t} else {\t// Else display error, that you could not edit that particular record...\n\t\t\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_NO_PERMISSIONS###');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$content='Object already deleted';\n\t\t\t\t}\n\t\t\t} else {\t// Finally this is if there is no login user. This must tell that you must login. Perhaps link to a page with create-user or login information.\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_AUTH###');\n\t\t\t}\n\t\t} else {\n\t\t\t$content='Delete-option is not set in TypoScript';\n\t\t}\n\t\t$content=$content?$content:'No template for delete screen';\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "f6d76806c4b58012d91dfcdffdc9bb1c", "score": "0.6076733", "text": "public function delete($id, Request $request)\n { \n $document=document::find($id);\n if($request->ajax())\n return view('documents.ajax.delete-confirm')->with('document', $document);\n \n return view('documents.http.delete-confirm')->with('document', $document);\n }", "title": "" }, { "docid": "521bddea84c0698b87e4659bd92b4616", "score": "0.6076658", "text": "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //SET LAYOUT \n $this->_helper->layout->setLayout('default-simple');\n\n //GET CLAIM ID\n $claim_id = $this->_getParam('claim_id', 'null');\n\n //GET CLAIM ITEM\n $claim = Engine_Api::_()->getItem('sitepage_claim', $claim_id);\n if ($claim->user_id != Engine_Api::_()->user()->getViewer()->getIdentity()) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //GET FORM\n $this->view->form = $form = new Sitepage_Form_Deleteclaim();\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET CLAIM TABLE\n Engine_Api::_()->getDbtable('claims', 'sitepage')->delete(array('claim_id=?' => $claim_id));\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => true,\n 'format' => 'smoothbox',\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('You have successfully deleted your claim request.'))\n ));\n }\n }", "title": "" }, { "docid": "662c88bb172662e6f44c4958c7e3ea71", "score": "0.6074706", "text": "public function deleteAction() {\n\n $id = (int) $this->getRequest()->getParam('id');\n\n try {\n $this->_productMapper->delete($id);\n $this->_flashMessenger->addMessage(array('info' => 'Produkt byl úspěšně smazán.'));\n } catch (Exception $e) {\n $this->_flashMessenger->addMessage(array('error' => 'Při pokusu o smazání došlo k chybě!<br />' . $e->getMessage()));\n }\n $module = $this->getRequest()->getModuleName();\n $controller = $this->getRequest()->getControllerName();\n $this->_redirect($module . '/' . $controller);\n }", "title": "" }, { "docid": "f78a163e183850d7f34f520ffc1f09c0", "score": "0.6065491", "text": "public function deleteAction() {\n \n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n \n\n $del = $this->_model->deleteNote($this->id);\n\n if( $this->xhr ) {\n \n $this->_asJson(array('id' => $this->id,\n 'consumer_id' => $this->consumer_id,\n 'message' => 'Note Removed.',\n 'success' => $del));\n }else{\n \n $this->_helper->flashMessenger->addMessage(array('alert alert-success'=>\"Note Removed.\") ); \n $this->_redirect($this->indexAction . $this->consumer_id);\n \n }\n }", "title": "" }, { "docid": "89c4b986700f9e0b9e7007adb8a56106", "score": "0.6062536", "text": "function path_admin_delete_confirm($form_state, $pid) {\n $path = path_load($pid);\n if (user_access('administer url aliases')) {\n $form['pid'] = array('#type' => 'value', '#value' => $pid);\n $output = confirm_form($form,\n t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),\n isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path');\n }\n return $output;\n}", "title": "" }, { "docid": "359977839fdaf0766f718f113572a499", "score": "0.6055657", "text": "public function destroy($id)\n {\n \\App\\Publication::destroy($id);\n\n return view('deletedResource'); \n }", "title": "" }, { "docid": "61909a43650db141ba21d714478622c0", "score": "0.604567", "text": "public function deleteAction()\n {\n \t$this->_helper->getHelper('ViewRenderer')->setNoRender(true);\n \t\n \t// Récuperation de l'ID photo\n\t\t$id = (is_numeric($this->_getParam('id'))) ? $this->_getParam('id') : 0;\n\t\t\n\t\t// Récuperation de la photo\n\t\t$photoMapper = new Application_Model_PhotoMapper();\n\t\t$photo = $photoMapper->getPhoto($id);\n\t\t\n\t\tif(!is_null($photo))\n\t\t{\n\t\t\t// Suppression de la photo\n\t\t\t$rowsDeleted = $photoMapper->deletePhoto($id);\n\t\t\n\t\t\t// Message\n\t\t\t$message = $rowsDeleted.' photo supprimée';\n\t\t\t$this->_helper->getHelper('FlashMessenger')->addMessage($message);\n\t\t\t\n\t\t\t// Redirection\n\t\t\t$this->_helper->getHelper('Redirector')->gotoSimple('edit', 'project', 'admin', array('id' => $photo->getIdProjet()));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_helper->getHelper('Redirector')->gotoSimple('list', 'project', 'admin');\n\t\t}\n }", "title": "" }, { "docid": "a1e445e87f9707cdf37aa3a927fe9229", "score": "0.6043809", "text": "public function deleted(ConfirmationToken $confirmationToken)\n {\n //\n }", "title": "" }, { "docid": "5824c6476434b813576d39e801628a4a", "score": "0.60437506", "text": "public function delFaq(){\n// $faqManager = new FaqManager();\n// $idFaq = $_GET['id'];\n// $faqManager->deleteFaq($idFaq);\n\n View::show('admin/deleteFaq.php', 'Question deleted', []);\n\n }", "title": "" }, { "docid": "d602bbddb090012d4552e37884d1d49e", "score": "0.60433316", "text": "public function ConfirmDelete($checked_id, $item_name, $parent_id = '', $edit_id = '') \n {\n $this->adminjavascript->include_admin_js = array('ConfirmDeleteJs');\n \n if($item_name=='item') \n $this->data['sub_modules']=$this->CheckSubModuleAccessibility('support/manage-items');\t \t \n \n $this->data['attributes']=$this->Login_model->GetDeletionPopUpAttributes($checked_id, $item_name, $parent_id);\n if($edit_id != '')\n {\n $attributes2 = array('edit_id' => $edit_id);\n $this->data['attributes']['hidden'] = array_merge($this->data['attributes']['hidden'],$attributes2);\n }\n /*\n If you have any additional attribute item wise then you can merge it as follows : \n $attributes2=array('field1'=>'value1','field2'=>'value2');\n $this->data['attributes']['hidden']=array_merge($this->data['attributes']['hidden'],$attributes2);\n If you have any custom message other than common message item wise then assign message to data variable as follows\n Default message\n */\n if($item_name == \"support_image_delete\")\n {\n\t$this->data['message']=\"Are you sure want to delete this image.\";\n }\n elseif($item_name == \"remove_clone\")\n {\n $this->data['sub_modules']=$this->CheckSubModuleAccessibility('support/manage-support');\t \t \n\t$this->data['message']=\"Are you sure want to unlink this support from selected support.\";\n }\n else\n {\n $this->data['message'] = \"Are you sure you want to delete selected items\";\n }\n $this->load->view(admin.'/templates/confirm-delete',$this->data);\n }", "title": "" }, { "docid": "560d26290bfaf01678c9a1de4d09862e", "score": "0.6036735", "text": "public static function command_delete_confirm($options, $message = \"This will delete a row from the database.\\n\") {\r\n if (isset($options['noconfirm']) && $options['noconfirm'])\r\n return true;\r\n\r\n echo $message;\r\n echo \"Coninue (yes/no)\\n> \";\r\n while (!in_array($line = trim(fgets(STDIN)), array('yes', 'no'))) {\r\n\r\n echo \"enter one of (yes/no):\\n> \";\r\n }\r\n return $line == 'yes';\r\n }", "title": "" }, { "docid": "ea4f8dcc6913b6ff8b258782a9e69bf8", "score": "0.6036063", "text": "public function deleteAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }", "title": "" }, { "docid": "f10f83c15af94f3f4ad46020c15f0a0f", "score": "0.603023", "text": "public function action_delete_delete(){\r\n\t\t\t//permission check\r\n\t\t\tif(!$this->user->can('Assumeownership', array('owner' => $this->user->id))){\r\n\t\t\t\t$this->throw_permission_error(Constant::NOT_OWNER);\r\n\t\t\t}\r\n\r\n\t\t\tif(!isset($this->myID) || !isset($this->myID2))\r\n\t\t\t{\r\n\t\t\t\t$error_array = array(\r\n\t\t\t\t\t\"error\" => \"Required Parameters Missing\",\r\n\t\t\t\t\t\"desc\" => \"Required Parameters Missing.\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$this->modelNotSetError($error_array);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$subject = Ent::eFact($this->myID, $this->myID2);\r\n\t\t\t$subject->delete_with_deps();\r\n\t\t\treturn $subject->getBasics();\r\n\t\t}", "title": "" }, { "docid": "faef97e42d5f1785aecddf29e405fe41", "score": "0.60242146", "text": "public function delete( $option );", "title": "" }, { "docid": "642f7dbd0299a10c8b552b0263e2a4aa", "score": "0.6021026", "text": "protected function confirmDeleteUser(){\n\t\tif (!\\Settings::ALLOW_USER_DELETION) {\n\t\t\tnew Alert('error', 'La suppression des comptes utilisateurs est interdite !');\n\t\t\treturn false;\n\t\t}\n\t\tif (UsersManagement::deleteUser($this->user)){\n\t\t\tnew Alert('success', (($this->user->getId() == $GLOBALS['cUser']->getId()) ? 'Votre compte' : 'Le compte de '.$this->user->getName()).' a été supprimé !');\n\t\t\treturn true;\n\t\t}else{\n\t\t\tnew Alert('error', 'Impossible de supprimer le compte utilisateur !');\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0e66083211374862d78af27b301a5577", "score": "0.6019825", "text": "public function deleteAction(){\n\t\t$this->view->isLoggedIn = $this->isLoggedIn;\n\t\t\n\t\t$id = (int)$this->_request->getParam('id');\n\t\t\n\t\tif(is_numeric($id)){\n\t\t\t$notificationTable = new Zend_Db_Table('notifications');\n\t\t\t$where = array(\n\t\t\t\t\t\t'user_id = ?' => $this->user_id_seq,\n\t\t\t\t\t\t'id = ?' => $id\n\t\t\t\t\t\t);\n\t\t\t$notificationTable->delete($where);\n\t\t}\n\t}", "title": "" }, { "docid": "0deebdfee13b251bea930e2ad4383fec", "score": "0.6018609", "text": "public function deleteAction()\n {\n $service = $this->getServiceLocator()->get($this->service);\n if( $service->delete($this->params()->fromRoute('id', 0)) )\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n else\n $this->getResponse()->setStatusCode(404);\n\n }", "title": "" }, { "docid": "ea2c2227cd725f35d7c78e76b57f11fe", "score": "0.6016188", "text": "public function onConfirmDelete(GridRowEventData $event)\n {\n $presenter = $event->getControl()->getPresenter();\n $id = $event->getId();\n try {\n $this->adminFacade->remove($id);\n $presenter->flashMessage(\n self::MESSAGE_SUCCESS_DELETE,\n AdminPresenter::STATUS_SUCCESS,\n null,\n AdminPresenter::ICON_SUCCESS,\n 75\n );\n $presenter->redirect(AdminPresenter::ACTION_DEFAULT);\n return;\n } catch (AdminException $exc) {\n $presenter->flashMessage(\n $exc->getMessage(),\n AdminPresenter::STATUS_DANGER,\n null,\n AdminPresenter::ICON_DANGER,\n 100\n );\n $presenter->redirect(AdminPresenter::ACTION_DEFAULT);\n }\n }", "title": "" } ]
24f20b61d9fb52cb88f55d17c4da1eff
Bootstrap the application services.
[ { "docid": "618bc8751997989caf46e4a9c0aea96d", "score": "0.0", "text": "public function boot()\n {\n if (!$this->app->routesAreCached()) {\n $this->app->router->group(['namespace' => 'Mixdinternet\\Galleries\\Http\\Controllers'],\n function () {\n require __DIR__ . '/../Http/routes.php';\n });\n }\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'mixdinternet/galleries');\n\n $this->publishes([\n __DIR__ . '/../resources/assets' => base_path('resources/assets'),\n ], 'assets');\n\n $this->publishes([\n __DIR__ . '/../resources/views' => base_path('resources/views/vendor/mixdinternet/galleries'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../database/migrations' => base_path('database/migrations'),\n ], 'migrations');\n\n $this->publishes([\n __DIR__ . '/../config/mgalleries.php' => base_path('config/mgalleries.php'),\n ], 'config');\n }", "title": "" } ]
[ { "docid": "3d004bde9e10aeedcc4c81558d7dc97f", "score": "0.72865707", "text": "public function boot()\n {\n dd('we are loading our package service provider');\n }", "title": "" }, { "docid": "a909f9e81cf4fa4d14672123a49a8a55", "score": "0.71553916", "text": "public function boot()\n {\n // ...\n }", "title": "" }, { "docid": "66f1554a4d642582b403ab0d34e51225", "score": "0.71544486", "text": "public function boot()\n {\n /*\n * Optional methods to load your package assets\n */\n }", "title": "" }, { "docid": "5bfbaee948a11cefddf3067d273e89c5", "score": "0.71243453", "text": "public function boot()\n {\n $this->package('domain/services');\n }", "title": "" }, { "docid": "e62a2aa228f26a213cf5a26dd765a006", "score": "0.71238774", "text": "protected function bootstrap()\n {\n $this->app->bootstrapWith([\n DetectAndLoadEnvironment::class,\n LoadConfiguration::class,\n RegisterApplicationServiceProviders::class\n ]);\n }", "title": "" }, { "docid": "3022318af344223bd6011ae5bf36ffc2", "score": "0.69934887", "text": "public function boot()\n {\n \\App::bind('CurlService', function()\n {\n return new CurlService;\n });\n }", "title": "" }, { "docid": "c9ae4c6a304cbb29962e00aa65990fdc", "score": "0.6988908", "text": "public function boot()\n {\n return [\n 'contracts' => ['AppContract'],\n 'services' => ['AppService']\n ];\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "0ac8997a8479b988f610a43189c08bcd", "score": "0.0", "text": "public function show($id)\n {\n $category = $this->categoryService->getById((int)$id);\n\n return view('admin.modules.gallery.category.show', compact('category'));\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "ddf04ce79355e6393b4e16ac5ca5339b", "score": "0.72854424", "text": "public function show(Resource $resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "b1f9ad094841da4c93bfc71c1fe290ee", "score": "0.7228577", "text": "function resourceAction() {\n\t\t$model = new Resources;\n\t\t$model->output( $_GET['resource'] );\n\t\texit();\n\t\tif (isset($_GET['resource'])) {\n\t\t\tResources::output();\n\t\t}\n\t}", "title": "" }, { "docid": "675560eedfc7019d4f6a3a8ccf4380ae", "score": "0.7058661", "text": "public function show($resource, $resourceId)\n {\n return view('microboard::resource.show', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "2ef8aa5a12fe505c49b213bd0bde4d8c", "score": "0.6679027", "text": "public function show(Resource $Resource)\n {\n\t\t\t\t$Actions = Action::all()->toArray();\n return view('resource.show',compact(\"Resource\",\"Actions\"));\n }", "title": "" }, { "docid": "dfd1e41399b89992277d2f4181b60c74", "score": "0.66665685", "text": "public function index($resource)\n {\n return view('microboard::resource.index', compact('resource'));\n }", "title": "" }, { "docid": "dda8eb008b6dd683d8a6d910da413069", "score": "0.6562032", "text": "public function show(Resource $resource)\n {\n return Storage::download($resource->file);\n }", "title": "" }, { "docid": "5dbe1076e63c172c2caafb4d8a1cf41a", "score": "0.63623476", "text": "public function show($id)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n return view('resources.show', compact('resource'));\n }\n return abort(404, 'Resource Not Found!');\n }", "title": "" }, { "docid": "45a73038dfd7440f98b74e8f017c5dbf", "score": "0.6339965", "text": "function viewItem($pResourceId = null) {\n if (isset($pResourceId) && is_numeric($pResourceId) && ($pResourceId > 0)) {\n $this->load->model('findaids/FindingAidsItemDAO');\n $data['resource'] = $this->FindingAidsItemDAO->getItem($pResourceId); //get the resource data from the database\n }\n else {\n $data['msg'] = 'Resource not found';\n }\n \n $this->display('findaids/viewItem', $data);\n }", "title": "" }, { "docid": "62fef0174aa48ad81f97f645799dda19", "score": "0.62100685", "text": "public function show($id)\n {\n //\n\t\treturn Resource::find($id);\n }", "title": "" }, { "docid": "040327f0d952b093f5c02dfe2fde04db", "score": "0.611832", "text": "public function show($id) {\n ${$this->resource} = $this->model->findOrFail($id);\n\n return view($this->view_path . '.show', compact($this->resource));\n }", "title": "" }, { "docid": "4acc522a1cb2928143f0fad96697ebf3", "score": "0.60883623", "text": "public function show(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$this->authorize('view', $resource);\n\n\t\t$resource->load('client', 'tags', 'type');\n\n\t\treturn view('resources.show', ['resource' => $resource]);\n\t}", "title": "" }, { "docid": "a8c35455a5242ccc9e930e21edd43e0b", "score": "0.6043974", "text": "function display($resource_name, $cache_id = null, $compile_id = null, $display = false) {\n\t\t\n\t\t// attempt to load the theme's requested template\n\t\tif (!is_file($this->template_dir.'/'.$resource_name) and substr($resource_name,0,5) != 'file:')\n\t\t\t// template file not existant in theme, fallback to \"default\" theme\n\t\t\tif (!is_file($this->_themeDir.'default/'.$resource_name))\n\t\t\t\t// requested template file does not exist in \"default\" theme, die.\n\t\t\t\tdie('<img src=\"'.bm_baseUrl.'themes/shared/images/icons/alert.png\" align=\"middle\">'.$resource_name.': '._T('Template file not found in default theme.'));\n\t\t\telse\n\t\t\t\t$resource_name = $this->_themeDir.'default/'.$resource_name;\n\t\t\n\t\tglobal $poMMo;\n\t\tif ($poMMo->_logger->isMsg()){ \n\t\t\t$this->assign('messages',$poMMo->_logger->getMsg(false,false));\n }\n\t\tif ($poMMo->_logger->isErr())\n\t\t\t$this->assign('errors',$poMMo->_logger->getErr(false,false));\n\t\t\n\t\treturn parent::display($resource_name, $cache_id = null, $compile_id = null, $display = false);\n\t}", "title": "" }, { "docid": "f7c05d96e66a9dcdda46564a24504d64", "score": "0.603562", "text": "public function show($id)\n {\n $model = $this->resourceModel::find($id);\n\n $this->beforeShow($model);\n\n if (!is_null($this->relatedModel) && !$model->relationLoaded($this->relatedModel)) {\n $model->load($this->relatedModel);\n }\n\n $this->viewData['resourceData'] = $model;\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['show']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "0a686d0ac05d929e084eb5f40c6c52cf", "score": "0.59964097", "text": "public function show(Restify $restify)\n {\n //\n }", "title": "" }, { "docid": "395de905ba7e4d06210c28e4bf02fc77", "score": "0.59784734", "text": "public function show( )\n\t{\n\t}", "title": "" }, { "docid": "f92fbb1cbd7db59751764b73789cea6c", "score": "0.59730935", "text": "public function actionView()\n {\n if (!Parameters::hasParam('type'))\n throw new APIException('Invalid resource TYPE (parameter name: \\'type\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n if (!Parameters::hasParam('id'))\n throw new APIException('Invalid resource IDENTIFICATOR (parameter name: \\'id\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n $resource_type = Parameters::get('type');\n\n $finder = new YiiResourceFinder($resource_type);\n $object = $finder->findById(Parameters::get('id'));\n\n $format = Parameters::hasParam('format') ? Parameters::get('format') : 'json';\n $coder = ObjectCodingFactory::factory()->createObject($format);\n if ($coder === null)\n throw new APIException('Invalid Coder for format', APIResponseCode::API_INVALID_CODER);\n \n $response = $coder->encode($object->getAttributes());\n die($response);\n }", "title": "" }, { "docid": "1e891653b5f4912aa409c758d50a1b98", "score": "0.5965172", "text": "function display()\n\t{\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "bdefca54eb98b7da00ba328f778b1d62", "score": "0.5963372", "text": "public function show() {\r\n $this->_handleThumbRequest();\r\n $this->_setOutputHeaders();\r\n\r\n // Show image\r\n if ($this->_cache) {\r\n // Note to developers:\r\n // If you are using some sort of _GET, _POST, _COOKIE, ... parameters to set\r\n // the cache path or the root path, make sure you sanity check the path's so\r\n // file_get_contents doesn't ouput any other file on your server!\r\n //\r\n // By default the _cachePath is created in PHP and _cachedFileName is a md5 hashed string\r\n // and normally you shouldn't run into security issues here\r\n echo file_get_contents($this->_cachePath.$this->_pathSeparator.$this->_cachedFileName);\r\n } else {\r\n $this->_toImage($this->_image);\r\n }\r\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ff943e72bc423e0031ca638d0459516", "score": "0.59518224", "text": "public function Display()\n {\n // by application template)\n }", "title": "" }, { "docid": "711b3e79a897f1435b168cf31d7bbc46", "score": "0.5939425", "text": "public function show($id)\n {\n // Get the resource using the parent API\n $object = $this->api()->show($id);\n\n // Render show view\n $data = [Str::camel($this->package) => $object];\n return $this->content( 'show', $data );\n }", "title": "" }, { "docid": "10dda82513aea0f93ead687a2ff8c827", "score": "0.5917097", "text": "public function show() {\n if (!$this->resource) return false;\n header(\"Content-Type: \" . $this->mime);\n switch ($this->ext) {\n case \"jpeg\":\n imagejpeg($this->resource);\n break;\n case \"png\":\n imagesavealpha($this->resource, true);\n imagepng($this->resource);\n break;\n }\n }", "title": "" }, { "docid": "6ba059f4682aab8baf61ec9d7bd7aa2f", "score": "0.59067607", "text": "public function showAction($id){\n $data = $this->getData();\n //returns object and renders it to a Twig file\n return $this->app['twig']->render('show.twig.html', array('item' => $data[$id],'id'=>$id));\n }", "title": "" }, { "docid": "a4e858e0516451a1779fc03420ea9ca6", "score": "0.58891064", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('DevPCultBundle:Representation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Representation entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DevPCultBundle:Representation:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "165e57248abdff75085b534357be6960", "score": "0.5881089", "text": "public function show() {\r\n // feel free to change this method if it is ever needed\r\n abort(404);\r\n }", "title": "" }, { "docid": "1346e215e2992fa9399bf2d0e2cefa29", "score": "0.5880812", "text": "public function showAction($id)\n {\n # code...\n }", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "3561014ddd4ab65fe67a18e78c535e0f", "score": "0.57959795", "text": "public function show()\n {\n // get data\n $data = $this->model->get();\n\n // print_r($data); die();\n\n // render data\n $this->twig->render($this->template, $data);\n }", "title": "" }, { "docid": "18dc3859862f1c173af6767cfb82607b", "score": "0.5793224", "text": "public function act(Resource $resource): void;", "title": "" }, { "docid": "63925fbab89765f6ec514208a03fc871", "score": "0.5787218", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "9b77148c668e41a20410842157f00e5a", "score": "0.5732526", "text": "public function showAction()\r\n {\r\n $id = $this->getRequest()->getParam('id');\r\n if ($id > 0) {\r\n $post = $this->Surveys->loadData($id);\r\n $this->view->survey = $post;\r\n }\r\n else $this->view->message = 'The post ID does not exist';\r\n }", "title": "" }, { "docid": "4de13c28a63d7306cf639907e8ef1d9c", "score": "0.57274294", "text": "public function edit($resource, $resourceId)\n {\n return view('microboard::resource.edit', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "82d1ab8dceb8c3af6887aff2ec025a2a", "score": "0.5725802", "text": "public function resolveForDisplay($resource)\n {\n if (is_callable($this->displayCallback)) {\n $this->value = call_user_func($this->displayCallback, $resource[$this->attribute]);\n } else {\n $this->value = $resource[$this->attribute];\n }\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d0e3eeb22ea781b9d946b9eabd93bb46", "score": "0.57204515", "text": "public function show()\n {\n $fileType = pathinfo($this->_fullPath, PATHINFO_EXTENSION);\n $contentType = '';\n switch ($fileType) {\n case 'jpg':\n $contentType = 'image/jpeg';\n break;\n case 'png':\n $contentType = 'image/png';\n break;\n }\n\n if (!$contentType) {\n return;\n }\n\n header(\"Content-Type: {$contentType}\");\n echo file_get_contents($this->_fullPath);\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "f2d9ca8da2ec54369857c7069cea0429", "score": "0.57117283", "text": "public function show()\n\t{\n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "d5b3a480445ab1fbb2e08bd3242ca940", "score": "0.56927294", "text": "abstract public function get($resource, $id);", "title": "" }, { "docid": "70b16164ff10f28b63f2a72c5d91047b", "score": "0.56880486", "text": "public function show($id)\n\t{\n\t\t// \n\t}", "title": "" }, { "docid": "7580b6a8a70ffcf0c85b9c5fd2d164c8", "score": "0.56878597", "text": "public function show($id)\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
b863aeabbb303d8d47af066dd138369f
Map any supported payment method into a config path by specified field name
[ { "docid": "b126c25e76bd6075b73a5021b33418e5", "score": "0.66226625", "text": "protected function _getSpecificConfigPath($fieldName)\n {\n if ($this->pathPattern) {\n return sprintf($this->pathPattern, $this->_methodCode, $fieldName);\n }\n\n return \"payment/{$this->_methodCode}/{$fieldName}\";\n }", "title": "" } ]
[ { "docid": "af67fe98539b777cb3c903dd85800d3a", "score": "0.5810094", "text": "abstract public function getPaymentMethod();", "title": "" }, { "docid": "544f5ecf1db0fc69a9294312225f3dbc", "score": "0.56402886", "text": "abstract public function getPaymentConfig($payment);", "title": "" }, { "docid": "cdcbec1927c5e96e219570c314d7a0fb", "score": "0.5581209", "text": "public function getPaymentMethod();", "title": "" }, { "docid": "8c0b43c851fc632ff3dc0d94935bf748", "score": "0.54424834", "text": "function updatePaymentMethodOptions() {\n try {\n $payments_table = TABLE_PREFIX . 'payments';\n\n if (!in_array('method', $this->listTableFields($payments_table))) {\n DB::execute(\"ALTER TABLE $payments_table ADD method VARCHAR(100) DEFAULT '' AFTER comment\");\n } // if\n\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_common', 'payments', ?)\", serialize(array('Bank Deposit','Check','Cash','Credit','Debit')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_credit_card', 'payments', ?)\", serialize(array('Credit Card','Credit Card (Visa)','Credit Card (Mastercard)','Credit Card (Discover)','Credit Card (American Express)','Credit Card (Diners)')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_online', 'payments', ?)\", serialize(array('Online Payment', 'Online Payment (PayPal)', 'Online Payment (Authorize)')));\n\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "title": "" }, { "docid": "ea6c3adbbe6d011d31356ddf9d359024", "score": "0.5325551", "text": "abstract protected function getPaymentMethodCode();", "title": "" }, { "docid": "cc6fc09b25d3521a19bff941be8d69cd", "score": "0.51845866", "text": "public static function addPaymentMethod()\n {\n $aPaymentDescriptions = array(\n 'en' => '<div>When selecting this payment method you are being redirected to PayPal where you can login into your account or open a new account. In PayPal you are able to authorize the payment. As soon you have authorized the payment, you are again redirected to our shop where you can confirm your order.</div> <div style=\"margin-top: 5px\">Only after confirming the order, transfer of money takes place.</div>',\n 'de' => '<div>Bei Auswahl der Zahlungsart PayPal werden Sie im n&auml;chsten Schritt zu PayPal weitergeleitet. Dort k&ouml;nnen Sie sich in Ihr PayPal-Konto einloggen oder ein neues PayPal-Konto er&ouml;ffnen und die Zahlung autorisieren. Sobald Sie Ihre Daten f&uuml;r die Zahlung best&auml;tigt haben, werden Sie automatisch wieder zur&uuml;ck in den Shop geleitet, um die Bestellung abzuschlie&szlig;en.</div> <div style=\"margin-top: 5px\">Erst dann wird die Zahlung ausgef&uuml;hrt.</div>'\n );\n\n $oPayment = oxNew('oxPayment');\n if (!$oPayment->load('oxidpaypal')) {\n $oPayment->setId('oxidpaypal');\n $oPayment->oxpayments__oxactive = new oxField(1);\n $oPayment->oxpayments__oxdesc = new oxField('PayPal');\n $oPayment->oxpayments__oxaddsum = new oxField(0);\n $oPayment->oxpayments__oxaddsumtype = new oxField('abs');\n $oPayment->oxpayments__oxfromboni = new oxField(0);\n $oPayment->oxpayments__oxfromamount = new oxField(0);\n $oPayment->oxpayments__oxtoamount = new oxField(10000);\n\n $oLanguage = oxRegistry::get('oxLang');\n $aLanguages = $oLanguage->getLanguageIds();\n foreach ($aPaymentDescriptions as $sLanguageAbbreviation => $sDescription) {\n $iLanguageId = array_search($sLanguageAbbreviation, $aLanguages);\n if ($iLanguageId !== false) {\n $oPayment->setLanguage($iLanguageId);\n $oPayment->oxpayments__oxlongdesc = new oxField($sDescription);\n $oPayment->save();\n }\n }\n }\n }", "title": "" }, { "docid": "df0de27431cd5563f007bb9d0d4f7f3d", "score": "0.5153582", "text": "abstract public function getPaymentDrivers();", "title": "" }, { "docid": "c443513787cc9bda089f4080eed20d94", "score": "0.508336", "text": "function interswitch_config()\n{\n return array(\n // the friendly display name for a payment gateway should be\n // defined here for backwards compatibility\n 'FriendlyName' => array(\n 'Type' => 'System',\n 'Value' => 'Interswitch WebyPay (Mastercard, Visa, Verve)',\n ),\n // a text field type allows for single line text input\n 'product_id' => array(\n 'FriendlyName' => 'Product ID',\n 'Type' => 'text',\n 'Size' => '25',\n 'Default' => '1076',\n 'Description' => 'Product Id provided by WebPay (test product_id: 1076)',\n ),\n\t\t 'pay_item_id' => array(\n 'FriendlyName' => 'Pay Item ID',\n 'Type' => 'text',\n 'Size' => '25',\n 'Default' => '101',\n 'Description' => ' Item Id provided by WebPay (test pay_item_id: 101)',\n ),\n // a password field type allows for masked text input\n 'mac_key' => array(\n 'FriendlyName' => 'Mac Key',\n 'Type' => 'text',\n 'Default' => '',\n\t\t \t'Size' => '50',\n 'Description' => 'MAC provided by WebPay',\n ),\n\t\t'test_payment_url' => array(\n 'FriendlyName' => 'TEST Payment URL',\n 'Type' => 'text',\n 'Default' => 'https://sandbox.interswitchng.com/collections/w/pay',\n 'Description' => 'Test url provided by WebPay for development',\n ),\n\t\t\n\t\t'live_payment_url' => array(\n 'FriendlyName' => 'LIVE Payment URL',\n 'Type' => 'text',\n 'Default' => 'https://webpay.interswitchng.com/collections/w/pay',\n 'Description' => 'Live url provided by WebPay for production',\n ),\n\t\n \n // the radio field type displays a series of radio button options\n 'apimodde' => array(\n 'FriendlyName' => 'API Mode',\n 'Type' => 'radio',\n 'Options' => 'Development,Production',\n\t\t\t'Default' =>'Development',\n 'Description' => 'Tick this box to request manage API mode',\n ),\n \n );\n}", "title": "" }, { "docid": "169499cb069fe3023994ded37ff11b5f", "score": "0.50626016", "text": "public function initPaymentMethod()\n {\n $helper = Mage::helper('onestepcheckout/payment');\n // check if payment saved to quote\n if (!$this->getQuote()->getPayment()->getMethod()) {\n $data = array();\n $paymentMethods = $helper->getPaymentMethods();\n if ((count($paymentMethods) == 1)) {\n $currentPaymentMethod = current($paymentMethods);\n $data['method'] = $currentPaymentMethod->getCode();\n } elseif ($lastPaymentMethod = $helper->getLastPaymentMethod()) {\n $data['method'] = $lastPaymentMethod;\n } elseif ($defaultPaymentMethod = Mage::helper('onestepcheckout/config')->getDefaultPaymentMethod()) {\n $data['method'] = $defaultPaymentMethod;\n }\n if (!empty($data)) {\n try {\n $this->getOnepage()->savePayment($data);\n } catch (Exception $e) {\n // catch this exception\n }\n }\n }\n }", "title": "" }, { "docid": "57baf5fe8770e65c503e62631c7bfc6f", "score": "0.49777007", "text": "private function registerPaymentMethods()\n {\n $pPosition = 0;\n foreach ($this->paymentMethods as $pValue => $pSub) {\n if ($this->isAboveShopwareVersion52()) {\n $action = 'payment_processor_csrf/process';\n } else {\n $action = 'payment_processor/process';\n }\n $this->createPayment(array(\n 'name' => $pValue,\n 'description' => $pSub['description'],\n 'action' => $action,\n 'active' => 0,\n 'position' => $pPosition,\n 'additionalDescription' => ''\n ));\n $pPosition++;\n }\n }", "title": "" }, { "docid": "4683989ad483e2659d3e1609856a2503", "score": "0.49733573", "text": "protected function addCarrierFieldConfig()\n {\n // Carrier id form field (hidden for existing method or select for the new method)\n $method = $this->getMethod();\n if ($method->getData('entity_id')) {\n $carrierFieldConfig = [\n 'label' => __('Carrier'),\n 'componentType' => Field::NAME,\n 'formElement' => Hidden::NAME,\n 'dataScope' => static::FIELD_CARRIER_ID_NAME,\n 'dataType' => Number::NAME,\n 'sortOrder' => 0,\n ];\n } elseif ($this->request->getParam('carrier_id')) {\n $carrierFieldConfig = [\n 'label' => __('Carrier'),\n 'componentType' => Field::NAME,\n 'formElement' => Hidden::NAME,\n 'dataScope' => static::FIELD_CARRIER_ID_NAME,\n 'dataType' => Number::NAME,\n 'sortOrder' => 0,\n 'value' => $this->request->getParam('carrier_id')\n ];\n } else {\n $carrierFieldConfig = [\n 'label' => __('Carrier'),\n 'componentType' => Field::NAME,\n 'formElement' => Select::NAME,\n 'dataScope' => static::FIELD_CARRIER_ID_NAME,\n 'dataType' => Text::NAME,\n 'sortOrder' => 0,\n 'options' => $this->getCarriers(),\n 'disableLabel' => true,\n 'multiple' => false,\n 'validation' => [\n 'required-entry' => true,\n ],\n ];\n }\n\n $result[static::GENERAL_FIELDSET_NAME]['children'][static::FIELD_CARRIER_ID_NAME] = [\n 'arguments' => [\n 'data' => [\n 'config' => $carrierFieldConfig\n ],\n ],\n ];\n\n // The \"back_to\" hidden input, if need to redirect admin back to the carrier edit form\n if ($this->request->getParam(MethodController::BACK_TO_PARAM)) {\n $result[static::GENERAL_FIELDSET_NAME]['children'][MethodController::BACK_TO_PARAM] = [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => '',\n 'componentType' => Field::NAME,\n 'formElement' => Hidden::NAME,\n 'dataScope' => MethodController::BACK_TO_PARAM,\n 'dataType' => Number::NAME,\n 'sortOrder' => 0,\n 'value' => $this->request->getParam(MethodController::BACK_TO_PARAM)\n ]\n ],\n ],\n ];\n }\n\n $this->meta = array_replace_recursive(\n $this->meta,\n $result\n );\n }", "title": "" }, { "docid": "0b9944154277439ff2cc5da66c64faa1", "score": "0.4962578", "text": "function spgateway_credit_config() {\n return array(\n // the friendly display name for a payment gateway should be\n // defined here for backwards compatibility\n 'FriendlyName' => array(\n 'Type' => 'System',\n 'Value' => 'spgateway信用卡',\n ),\n // a text field type allows for single line text input\n 'MerchantID' => array(\n 'FriendlyName' => '商店代號',\n 'Type' => 'text',\n 'Size' => '15',\n 'Default' => '',\n 'Description' => 'spgateway商店代號。',\n ),\n // a password field type allows for masked text input\n 'HashKey' => array(\n 'FriendlyName' => 'HashKey',\n 'Type' => 'password',\n 'Size' => '32',\n 'Default' => '',\n 'Description' => 'HashKey',\n ),\n 'HashIV' => array(\n 'FriendlyName' => 'HashIV',\n 'Type' => 'password',\n 'Size' => '16',\n 'Default' => '',\n 'Description' => 'HashIV',\n ),\n 'TradeLimit' => array(\n 'FriendlyName' => '交易秒數',\n 'Type' => 'text',\n 'Size' => '3',\n 'Default' => '90',\n 'Description' => '最少 60 秒',\n ),\n \"InvoicePrefix\" => array(\n \"FriendlyName\" => \"帳單前綴\",\n \"Type\" => \"text\",\n \"Default\" => \"\",\n \"Description\" => \"選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)\",\n \"Size\" => \"5\",\n ),\n 'CreditRed' => array(\n 'FriendlyName' => '信用卡紅利',\n 'Type' => 'yesno',\n 'Description' => '勾選以啟用',\n ),\n 'UNIONPAY' => array(\n 'FriendlyName' => '銀聯',\n 'Type' => 'yesno',\n 'Description' => '勾選以啟用',\n ),\n // the yesno field type displays a single checkbox option\n 'testMode' => array(\n 'FriendlyName' => '測試模式',\n 'Type' => 'yesno',\n 'Description' => '測試模式',\n ),\n );\n}", "title": "" }, { "docid": "06f3390b8e7aca7756fbaee931b0073a", "score": "0.4956253", "text": "public static function getPaymentMethodsByIsoCode($iso_code)\n {\n // HSS -> Web Payment Pro / Integral Evolution\n // ECS -> Express Checkout Solution\n // PPP -> PAYPAL PLUS\n // PVZ -> Braintree / Payment VZero\n\n $payment_method = array(\n // EUROPE\n 'BE'=>array(WPS, ECS),\n 'CZ'=>array(WPS, ECS),\n 'DE'=>array(WPS, ECS, PPP),\n 'ES'=>array(WPS, HSS, ECS),\n 'FR'=>array(WPS, HSS, ECS),\n 'IT'=>array(WPS, HSS, ECS),\n 'VA'=>array(WPS, HSS, ECS),\n 'NL'=>array(WPS, ECS),\n 'AN'=>array(WPS, ECS), //Netherlands Antilles\n 'PL'=>array(WPS, ECS),\n 'PT'=>array(WPS, ECS),\n 'AT'=>array(WPS, ECS),\n 'CH'=>array(WPS, ECS),\n 'DK'=>array(WPS, ECS),\n 'FI'=>array(WPS, ECS),\n 'GR'=>array(WPS, ECS),\n 'HU'=>array(WPS, ECS),\n 'LU'=>array(WPS, ECS),\n 'NO'=>array(WPS, ECS),\n 'RO'=>array(WPS, ECS),\n 'RU'=>array(WPS, ECS),\n 'SE'=>array(WPS, ECS),\n 'SK'=>array(WPS, ECS),\n 'UA'=>array(WPS, ECS),\n 'TR'=>array(WPS, ECS),\n 'SI'=>array(WPS, ECS),\n 'GB'=>array(WPS, HSS, ECS),\n 'IE'=>array(WPS, ECS),\n 'LT'=>array(WPS, ECS),\n 'EE'=>array(WPS, ECS),\n 'LV'=>array(WPS, ECS),\n 'RS'=>array(WPS, ECS),\n 'HR'=>array(WPS, ECS),\n 'MD'=>array(WPS, ECS),\n 'BA'=>array(WPS, ECS),\n 'AL'=>array(WPS, ECS),\n 'MT'=>array(WPS, ECS),\n 'MC'=>array(WPS, ECS),\n 'IS'=>array(WPS, ECS),\n\n //ASIE\n 'CN'=>array(WPS, ECS),\n 'MO'=>array(WPS, ECS),\n 'HK'=>array(WPS, HSS, ECS),\n 'JP'=>array(WPS, HSS, ECS),\n 'MY'=>array(WPS, ECS),\n 'BN'=>array(WPS, ECS),\n 'ID'=>array(WPS, ECS),\n 'KH'=>array(WPS, ECS),\n 'LA'=>array(WPS, ECS),\n 'PH'=>array(WPS, ECS),\n 'TL'=>array(WPS, ECS),\n 'VN'=>array(WPS, ECS),\n 'IL'=>array(WPS, ECS), //Israel\n 'SG'=>array(WPS, ECS),\n 'TH'=>array(WPS, ECS),\n 'TW'=>array(WPS, ECS),\n\n // OCEANIE\n 'NZ'=>array(WPS, ECS),\n 'PW'=>array(WPS, ECS),\n 'AU'=>array(WPS, HSS, ECS),\n\n // AMERIQUE LATINE\n 'BR'=>array(WPS, ECS),\n 'MX'=>array(WPS, ECS),\n 'CL'=>array(WPS, ECS),\n 'CO'=>array(WPS, ECS),\n 'PE'=>array(WPS, ECS),\n\n //AFRIQUE\n 'SL'=>array(WPS, ECS),\n 'SN'=>array(WPS, ECS),\n );\n $return = isset($payment_method[$iso_code]) ? $payment_method[$iso_code] : false;\n if(Configuration::get('VZERO_ENABLED'))\n {\n $return[] = PVZ;\n }\n return $return;\n }", "title": "" }, { "docid": "033bc0c026d2d6fc9a8f35c647473eee", "score": "0.49123833", "text": "protected function _getMappedPaymentMethod($ebay_payment_method)\n\t{\n\t\t\t$mapping = Mage::getModel('magebid/mapping')->load($ebay_payment_method,'ebay');\n\t\t\tif ($mapping->getMagento())\n\t\t\t{\n\t\t\t\treturn $mapping->getMagento();\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\n\t}", "title": "" }, { "docid": "b74600a07ae93a15dda6635358e8dfe8", "score": "0.4870829", "text": "private function _getPaymentMethod ()\n\t{\n\t\t$id = craft()->config->get('paymentMethodId', 'commercepaybear');\n\t\treturn craft()->commerce_paymentMethods->getPaymentMethodById($id);\n\t}", "title": "" }, { "docid": "c81338ace83950258f3ab0329e7fa0a2", "score": "0.48670012", "text": "private function get_payment_method($payment_type) {\r\n\t\t$info_pieces = explode('_', $payment_type);\r\n\t\t\r\n\t\treturn $info_pieces[0];\r\n\t}", "title": "" }, { "docid": "48cdfcc7ab2805e4df256aefef198caf", "score": "0.48616102", "text": "public function getShippingMethods()\n {\n $array = array();\n foreach ($this->config as $key => $item) {\n if ($key == 'allowed_domestic_methods') {\n foreach ($item as $item_internal) {\n $array['Domestic'][] = $item_internal['name'];\n }\n }\n\n if ($key == 'allowed_international_methods') {\n foreach ($item as $item_internal) {\n $array['International'][] = $item_internal['name'];\n }\n }\n }\n return $array;\n }", "title": "" }, { "docid": "99db15b200c60827a47a461e59ab6f34", "score": "0.48589054", "text": "public function setDefaultActivePaymentMethod()\n {\n $criteria = new CDbCriteria;\n $criteria->select = 't.name, t.value';\n $criteria->condition = \"t.name LIKE 'payment_method_%' AND t.value = 1\";\n\n $data = Option::model()->findAll($criteria);\n\n $payment_method_options = array();\n\n foreach($data as $option) {\n if($option->name == 'payment_method_paypal') $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n if($option->name == 'payment_method_skrill') $payment_method_options[] = self::PAYMENT_METHOD_MONEY_BOOKERS;\n if($option->name == 'payment_method_wiretransfer') $payment_method_options[] = self::PAYMENT_METHOD_WIRE_TRANSFER;\n if($option->name == 'payment_method_check') $payment_method_options[] = self::PAYMENT_METHOD_CHECK;\n if($option->name == 'payment_method_no_payment') $payment_method_options[] = self::PAYMENT_METHOD_NO_PAYMENT;\n }\n\n if(empty($payment_method_options))\n $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n\n if(!in_array($this->payment_method, $payment_method_options))\n $this->payment_method = $payment_method_options[0];\n }", "title": "" }, { "docid": "338862a867ed369e44b95d8782660a87", "score": "0.48552656", "text": "public function setPaymentField($name, $value)\n\t{\n\t\tif ($this->verify_fields) {\n\t\t\tif (in_array($name, $this->_string_fields)) {\n\t\t\t\t$this->_payment_fields[$name] = $value;\n\t\t\t} else {\n\t\t\t\tforeach($this->_pattern_fields as $pattern) {\n\t\t\t\t\tif (preg_match(\"/\" . $pattern . \"/\", $name)) {\n\t\t\t\t\t\t$this->_payment_fields[$name] = $value;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new PayPalException(\"Error: no field $name exists in the PayPal API.\");\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_payment_fields[$name] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "c41c1a470b7d486e9d59b815b870de2c", "score": "0.4846622", "text": "protected function register_payment_methods()\n {\n }", "title": "" }, { "docid": "6c40698cf1d7bc8d2bf9eff171b6b956", "score": "0.4839477", "text": "public static function getPaymentMethods() {\n\n // return array(\n // self::PAYMENT_METHOD_PAY_PAL => 'Pay Pal',\n // self::PAYMENT_METHOD_MONEY_BOOKERS => 'Skrill',\n // self::PAYMENT_METHOD_WIRE_TRANSFER => 'Wiretransfer',\n // );\n\n $payment_methods = array();\n\n if(Option::getByName('payment_method_paypal')) \n $payment_methods[self::PAYMENT_METHOD_PAY_PAL] = 'Pay Pal';\n\n if(Option::getByName('payment_method_skrill')) \n $payment_methods[self::PAYMENT_METHOD_MONEY_BOOKERS] = 'Skrill';\n\n if(Option::getByName('payment_method_wiretransfer') && Option::getByName('wiretransfer_doc_path')) \n $payment_methods[self::PAYMENT_METHOD_WIRE_TRANSFER] = 'Wiretransfer';\n\n if(Option::getByName('payment_method_check')) \n $payment_methods[self::PAYMENT_METHOD_CHECK] = 'Check';\n\n if(Option::getByName('payment_method_no_payment')) \n $payment_methods[self::PAYMENT_METHOD_NO_PAYMENT] = 'No Payment';\n\n return $payment_methods;\n }", "title": "" }, { "docid": "79b357353a7ac8a20f79fe3360891073", "score": "0.48091626", "text": "public function getPaymentGateway()\n {\n return Mage::getStoreConfig(\"fontis_masterpass/settings/payment_gateway\");\n }", "title": "" }, { "docid": "ddc5a298d2b84ef84fcaf5d46b017468", "score": "0.4800841", "text": "function template_preprocess_braintree_payment_method_label(&$variables) {\n $payment_method = $variables['payment_method'];\n\n if (braintree_payment_method_is_credit_card($payment_method)) {\n $variables['type'] = 'credit_card';\n $variables['card_type'] = $payment_method->cardType;\n // Get last four numbers of masked number.\n $variables['masked_number'] = 'x-' . substr($payment_method->maskedNumber, -4);\n }\n elseif (braintree_payment_method_is_paypal($payment_method)) {\n $variables['type'] = 'paypal';\n $variables['email'] = $payment_method->email;\n }\n}", "title": "" }, { "docid": "3eb02d85e70a2973ec72d72b6bb15a22", "score": "0.4799048", "text": "public static function getPaymentMethod($payment)\n {\n switch ($payment) {\n case 'rpayratepayinvoice':\n return 'INVOICE';\n break;\n case 'rpayratepayrate':\n return 'INSTALLMENT';\n break;\n case 'rpayratepaydebit':\n return 'ELV';\n break;\n }\n }", "title": "" }, { "docid": "139f72ff8eeea3ce25cc00d3d6eba20f", "score": "0.47923657", "text": "private function determinePaymentType(string $paymentMethod): array\n {\n $parts = explode('-', $paymentMethod, 2);\n\n switch (count($parts)) {\n case 1:\n return [\n 'code' => $parts[0],\n 'type' => 'OnChain'\n ];\n break;\n case 2:\n return [\n 'code' => $parts[0],\n 'type' => $parts[1]\n ];\n break;\n default:\n return [];\n }\n }", "title": "" }, { "docid": "091140798277a877d5faea14c2363843", "score": "0.47830933", "text": "protected function setPayMethod()\n {\n $this->payMethod = new DirectDebitPaymentMethod();\n $this->id = 'hp_dd';\n $this->has_fields = true;\n $this->name = __('Direct Debit', 'woocommerce-heidelpay');\n }", "title": "" }, { "docid": "58783bbae7e6e07a85efaa053e5ffc95", "score": "0.4775985", "text": "function woocommerce_add_wayforpay_gateway($methods)\n {\n $methods[] = 'WC_wayforpay';\n return $methods;\n }", "title": "" }, { "docid": "e0b54955026506a3f1876fc3fd785a80", "score": "0.47725067", "text": "function optPaymentMode()\n\t\t{\n\t\t $paymentgateway=$_POST['paymentBy'];\n\t\t \n\t\t if($paymentgateway=='paypal')\n\t\t {\n\t\t $obj=new Core_CPaymentGateways();\n\t\t $res=$obj->getMerchantId($paymentgateway);\n\t\t\t return Display_DPaymentGateways::paypal($res);\t\n\t\t }\n\t\t elseif($paymentgateway=='strompay')\n\t\t {\n\t\t\t return Display_DPaymentGateways::stromPay();\n\t\t }\n\t\t elseif($paymentgateway=='egold')\n\t\t {\n\t\t\t return Display_DPaymentGateways::eGold();\n\t\t }\n\t\t elseif($paymentgateway=='intgold')\n\t\t {\n\t\t\t return Display_DPaymentGateways::intGold();\n\t\t }\n\t\t elseif($paymentgateway=='twocheckout')\n\t\t {\n\t\t\t return Display_DPaymentGateways::twoCheckOut();\n\t\t }\n\t\t elseif($paymentgateway=='ebullion')\n\t\t {\n\t\t\t return Display_DPaymentGateways::eBullion();\n\t\t }\n\t\t elseif($paymentgateway=='securepay')\n\t\t {\n\t\t\t return Display_DPaymentGateways::securePay();\t\t\n\t\t }\n\t\t elseif($paymentgateway=='bluepay')\n\t\t {\n\t\t\t return Display_DPaymentGateways::secureBluePay();\t\t\n\t\t }\n\t\t elseif($paymentgateway=='google')\n\t\t {\n\t\t\t return Display_DPaymentGateways::googlePay();\n\t\t }\n\t\t elseif($paymentgateway=='moneybookers')\n\t\t {\n\t\t\t return Display_DPaymentGateways::moneyBookers();\n\t\t }\n\t\t elseif($paymentgateway=='epath')\n\t\t {\n\t\t\t return Display_DPaymentGateways::stromPay();\n\t\t }\n\t\t \n\t\t}", "title": "" }, { "docid": "c0c2d09094ad49db10f96a20339d39d3", "score": "0.4747084", "text": "public function getConfig()\n {\n return [\n 'payment' => [\n self::CODE => [\n // get setting values using events.xml section/group/field ids for path\n 'apiKey' => $this->helper->getConfig('payment/payio/integration/api_key'),\n 'apiTransactionPath' => $this->helper->getApiTransactionPath(),\n 'apiSettingsPath' => $this->helper->getApiSettingPath(),\n 'gatewayPath' => $this->helper->getGatewayPath(),\n 'checkoutUrl' => $this->helper->getCheckoutUrl(),\n 'paymentSuccessUrl' => $this->helper->getPaymentSuccessUrl(),\n 'currency' => $this->helper->getCurrentCurrencyCode(),\n 'cartTax' => $this->helper->getUKTaxRate(),\n 'shippingMethods' => $this->helper->getActiveShippingMethods()\n ]\n ]\n ];\n }", "title": "" }, { "docid": "2700ef70af0c718b4e03fa850e31c9dc", "score": "0.47466007", "text": "function my_new_contactmethods($contactmethods)\n{\n// Add Twitter\n $contactmethods['twitter'] = 'Twitter URL';\n// Add Facebook\n $contactmethods['facebook'] = 'Facebook URL';\n// Add Google+\n $contactmethods['googleplus'] = 'Google Plus URL';\n\n return $contactmethods;\n}", "title": "" }, { "docid": "7bab8bfefe4e438cdbac8a15c6d22430", "score": "0.47417477", "text": "function payment_fields() {\r\n\t\t\t\tglobal $woocommerce;\r\n\t\t\t\t?>\r\n\t\t\t\t<?php if ($this->description) : ?><p><?php echo $this->description; ?></p><?php endif; ?>\r\n\t\t\t\t<fieldset>\r\n\t\t\t\t<legend><label>Method of payment<span class=\"required\">*</span></label></legend>\r\n\t\t\t\t<ul class=\"wc_payment_methods payment_methods methods\">\r\n\t\t\t\t\t<li class=\"wc_payment_method\">\r\n\t\t\t\t\t\t<input id=\"citconpay_pay_method_alipay\" class=\"input-radio\" name=\"vendor\" checked=\"checked\" value=\"alipay\" data-order_button_text=\"\" type=\"radio\" required>\r\n\t\t\t\t\t\t<label for=\"citconpay_pay_method_alipay\"> AliPay </label>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li class=\"wc_payment_method\">\r\n\t\t\t\t\t\t<input id=\"citconpay_pay_method_wechatpay\" class=\"input-radio\" name=\"vendor\" value=\"wechatpay\" data-order_button_text=\"\" type=\"radio\" required>\r\n\t\t\t\t\t\t<label for=\"citconpay_pay_method_wechatpay\"> WechatPay </label>\r\n\t\t\t\t </li>\r\n\t\t\t\t <li class=\"wc_payment_method\">\r\n\t\t\t\t\t\t<input id=\"citconpay_pay_method_unionpay\" class=\"input-radio\" name=\"vendor\" value=\"upop\" data-order_button_text=\"\" type=\"radio\" required>\r\n\t\t\t\t\t\t<label for=\"citconpay_pay_method_unionpay\"> Unionpay </label>\r\n\t\t\t\t </li>\r\n\t\t\t\t <li class=\"wc_payment_method\">\r\n\t\t\t\t\t\t<input id=\"citconpay_pay_method_cc\" class=\"input-radio\" name=\"vendor\" value=\"cc\" data-order_button_text=\"\" type=\"radio\" required>\r\n\t\t\t\t\t\t<label for=\"citconpay_pay_method_cc\"> Credit Card </label>\r\n\t\t\t\t </li>\r\n\t\t\t\t</ul>\r\n\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t</fieldset>\r\n\t\t\t\t<?php\r\n\t\t }", "title": "" }, { "docid": "b38c9b6fabe72b07c92154de1808533f", "score": "0.47288254", "text": "public function hookPaymentOptions()\n {\n $paymentOptions = [];\n\n foreach (CONFIG['payment_methods'] as $payment => $paymentConfig) {\n $settingsKey = \"HYPERPAY_METHOD_\" . $payment;\n\n if (Configuration::get(\"{$settingsKey}_ENABLED\")) {\n $cardPaymentOption = new PaymentOption();\n $cardPaymentOption->setCallToActionText($this->l(Configuration::get(\"{$settingsKey}_TITLE\")))\n ->setAction(\n $this->context->link->getModuleLink(\n $this->name,\n 'iframe',\n [\n 'method' => $payment\n ],\n true\n )\n )\n ->setModuleName($this->name);\n\n if ($payment == 'MADA') {\n // insert mada at the top of array and add it's logo\n array_unshift($paymentOptions, $cardPaymentOption);\n $cardPaymentOption->setLogo(Media::getMediaPath(_PS_BASE_URL_ . _MODULE_DIR_ . \"hyperpay/views/imgs/payments_logos/smaller-$payment.svg\"));\n if ($this->context->language->iso_code == 'ar') {\n $cardPaymentOption->setCallToActionText('بطاقة مدى البنكية');\n }else{\n $cardPaymentOption->setCallToActionText('mada debit card');\n }\n } else {\n $paymentOptions[] = $cardPaymentOption;\n }\n }\n }\n\n\n return $paymentOptions;\n }", "title": "" }, { "docid": "13fe163edf538c17694744d52eea446c", "score": "0.47275728", "text": "public function payType($payType);", "title": "" }, { "docid": "ab895b039055424d8d1e8ffe0e9fcd76", "score": "0.47218862", "text": "public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "ab895b039055424d8d1e8ffe0e9fcd76", "score": "0.47218862", "text": "public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "1961026c4be825137d02071b52619ddf", "score": "0.47173285", "text": "public function getShippingMethodKey();", "title": "" }, { "docid": "37a13b441f9ac8797e128a7d3e4d8c8c", "score": "0.47073218", "text": "public function init_form_fields_for_payment_gateway()\n {\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => 'Enable/Disable',\n 'label' => 'Enable IA Gateway',\n 'type' => 'checkbox',\n 'description' => 'After enable it you can customize it',\n 'default' => \"no\"\n ),\n 'title' => array(\n 'title' => 'IA Payment Gateway',\n 'type' => 'text',\n 'description' => 'This controls the title which the user sees during checkout.',\n 'desc_tip' => true,\n ),\n 'description' => array(\n 'title' => 'Description',\n 'type' => 'textarea',\n 'description' => 'This controls the description which the user sees during checkout.',\n 'default' => 'Pay with your credit card via our super-cool payment gateway.',\n 'desc_tip' => true,\n ),\n 'api_login' => array(\n 'title' => \"Stripe Publishable key\",\n 'type' => 'text',\n 'desc_tip' => true,\n \"description\" => 'This is the API Login provided by Authorize.net when you signed up for an account.',\n ),\n 'trans_key' => array(\n 'title' => 'Stripe Transaction Key',\n 'type' => 'password',\n 'desc_tip' => true,\n \"description\" => 'This is the Transaction Key provided by Authorize.net when you signed up for an account.',\n ),\n 'environment' => array(\n 'title' => 'Stripe Test Mode',\n 'label' => 'Enable Test Mode',\n 'type' => 'checkbox',\n 'description' => 'This is the test mode of gateway.',\n 'default' => 'no',\n )\n );\n }", "title": "" }, { "docid": "3448db4bea6232320a96f435b93e79e0", "score": "0.4706456", "text": "public function getPaymentHandler(): string;", "title": "" }, { "docid": "ce560970a2ed09899165c6410b0b8930", "score": "0.47059983", "text": "public function getPaymentMethod() \n {\n return $this->_fields['PaymentMethod']['FieldValue'];\n }", "title": "" }, { "docid": "ce560970a2ed09899165c6410b0b8930", "score": "0.47059983", "text": "public function getPaymentMethod() \n {\n return $this->_fields['PaymentMethod']['FieldValue'];\n }", "title": "" }, { "docid": "76d9b5fa2963fc5b13447d1811ab5a16", "score": "0.46708262", "text": "public static function loadPaymentMethod($name)\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('*')\n\t\t\t->from('#__osmembership_plugins')\n\t\t\t->where('name = ' . $db->quote($name));\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadObject();\n\t}", "title": "" }, { "docid": "0fc106aa04b1eccdeaee14396199b342", "score": "0.46670416", "text": "function my_new_contactmethods( $contactmethods ) {\n // Add Twitter\n $contactmethods['twitter'] = 'Twitter';\n //add Facebook\n $contactmethods['facebook'] = 'Facebook';\n \n //add Facebook\n $contactmethods['pinterest'] = 'Pinterest';\n \n //add Facebook\n $contactmethods['snapchat'] = 'snapchat';\n return $contactmethods;\n}", "title": "" }, { "docid": "2b706e9587a3551a8bb7f79dceb5d527", "score": "0.46662673", "text": "function mp_edd_register_gateway($gateways) {\n\t$gateways['mpowerpayments'] = array('admin_label' => 'Mpower Payments', 'checkout_label'=>__('Mpower Payments','mp_edd'));\n\treturn $gateways;\n}", "title": "" }, { "docid": "29d8b61d68ac6ea43777cd53105c3591", "score": "0.466291", "text": "function my_custom_available_payment_gateways( $gateways ) {\n $chosen_shipping_rates =(array) WC()->session->get( 'chosen_shipping_methods' );\n\n if ( in_array( 'flat_rate:10', $chosen_shipping_rates ) ) :\n unset( $gateways['cod'] );\n unset ( $gateways['other_payment'] );\n\n elseif ( in_array( 'flat_rate:13', $chosen_shipping_rates ) ) :\n unset( $gateways['dotpay'] );\n unset ( $gateways['other_payment'] );\n\n elseif ( in_array( 'flat_rate:11', $chosen_shipping_rates ) ) :\n unset( $gateways['cod'] );\n unset ( $gateways['other_payment'] );\n\n elseif ( in_array( 'flat_rate:14', $chosen_shipping_rates ) ) :\n unset( $gateways['dotpay'] );\n unset ( $gateways['other_payment'] );\n\n elseif ( in_array( 'local_pickup:4', $chosen_shipping_rates ) ) :\n unset( $gateways['dotpay'] );\n unset ( $gateways['cod'] );\n\n endif;\n return $gateways;\n}", "title": "" }, { "docid": "67aae5786b88e9e26129202ca147f011", "score": "0.46582544", "text": "public function getConfig()\n {\n return [\n 'payment' => [\n self::CODE => [\n 'defaultWidgetPageUrl' => 'fasterpay/gateway/fasterpay',\n 'logoUrl' => 'https://pay.fasterpay.com/images/logo/v1/fp-logo-dark.png'\n ]\n ]\n ];\n }", "title": "" }, { "docid": "8feae473d3de00a0a209bb2d4d7e5dd4", "score": "0.46580458", "text": "function colabs_list_gateway_dropdown( $input_name = 'payment_gateway' ) {\n\n $available_gateways = array();\n\n if ( $available_gateways = Colabs_Gateway_Registry::get_active_gateways() ) {\n ?>\n <ul class=\"payment_methods methods\">\n <?php foreach ( $available_gateways as $gateway ) {?>\n <li class=\"payment_method_<?php echo $gateway->identifier(); ?>\">\n <input id=\"payment_method_<?php echo $gateway->identifier(); ?>\" type=\"radio\" class=\"input-radio\" name=\"colabs_payment_method\" value=\"<?php echo esc_attr( $gateway->identifier() ); ?>\" data-order_button_text=\"<?php echo esc_attr( $gateway->display_name( 'dropdown' ) ); ?>\" />\n <label for=\"payment_method_<?php echo $gateway->identifier(); ?>\"><?php echo $gateway->display_name( 'dropdown' ); ?></label>\n <?php\n if ( $gateway->has_fields() || $gateway->get_description() ) {\n echo '<div class=\"payment_box payment_method_' . $gateway->identifier() . '\" style=\"display:none;\">';\n $gateway->payment_fields();\n echo '</div>';\n }\n ?>\n </li>\n <?php }?>\n </ul>\n <?php \n }else{\n echo '<p>'.__( 'No Gateways are currently available', 'colabsthemes' ).'</p>';\n }\n\n}", "title": "" }, { "docid": "701dcf8b56d33c5ce9de9740c08d2323", "score": "0.46574807", "text": "public function getShippingMethod();", "title": "" }, { "docid": "878e126fe35d2bd5c99eb872bf828bb1", "score": "0.46481824", "text": "static function pmpro_gateways($gateways)\n\t\t{\n\t\t\tif(empty($gateways['fondy']))\n\t\t\t\t$gateways['fondy'] = __('fondy', 'pmpro');\n\n\t\t\treturn $gateways;\n\t\t}", "title": "" }, { "docid": "919076b51486f4d4dee3f5bc052adfe3", "score": "0.4645285", "text": "public function hookPaymentOptions($params)\n {\n if (!$this->active) {\n return;\n }\n if (!$this->checkCurrency($params['cart'])) {\n return;\n }\n $payments_options = [];\n $ifthenpayGateway = GatewayFactory::build('gateway');\n foreach ((array) unserialize($this->ifthenpayConfig['IFTHENPAY_USER_PAYMENT_METHODS']) as $paymentMethod) {\n if (PrestashopModelFactory::buildCurrency($params['cart']->id_currency)->iso_code === 'EUR' || $paymentMethod === 'ccard') {\n if (Configuration::get('IFTHENPAY_' . Tools::strtoupper($paymentMethod))) {\n $option = PrestashopFactory::buildPaymentOption();\n if ($paymentMethod === 'mbway') {\n $this->context->smarty->assign('mbwaySvg', Media::getMediaPath(\n _PS_MODULE_DIR_ . $this->name . '/views/svg/mbway.svg' \n )\n );\n $this->context->smarty->assign(\n [\n 'action' => $this->context->link->getModuleLink(\n $this->name,\n 'validation',\n [\n 'paymentOption' => $paymentMethod,\n ],\n true\n ),\n ]\n );\n $option->setForm(\n $this->context->smarty->fetch(\n $this->local_path .\n 'views/templates/front/mbwayPhone.tpl'\n )\n );\n }\n $option->setCallToActionText($this->l('Pay by ') . $ifthenpayGateway->getAliasPaymentMethods(\n $paymentMethod, $this->context->language->iso_code)\n )\n ->setLogo(Media::getMediaPath(\n _PS_MODULE_DIR_ . $this->name . '/views/img/' . $paymentMethod . '_option.png'\n ))\n ->setAction(\n $this->context->link->getModuleLink(\n $this->name,\n 'validation',\n [\n 'paymentOption' => $paymentMethod,\n ],\n true\n )\n )\n ->setModuleName($this->name);\n $payments_options[] = $option;\n }\n }\n \n }\n return $payments_options;\n }", "title": "" }, { "docid": "5b33de3270cfb27f471e5c4c5998465f", "score": "0.46335804", "text": "function bitdrivestandard_config() {\n return array(\n 'FriendlyName' => array(\n 'Type' => 'System',\n 'Value' => 'BitDrive Standard Checkout'\n ),\n 'UsageNotes' => array(\n 'Type' => 'System',\n 'Value' => 'Accept bitcoin payments using BitDrive Standard Checkout.'\n ),\n 'merchantId' => array(\n 'FriendlyName' => 'Merchant ID',\n 'Type' => 'text',\n 'Size' => '36',\n 'Description' => 'The BitDrive merchant ID which can be found in Merchant Tools.'\n ),\n 'ipnSecret' => array(\n 'FriendlyName' => 'IPN Secret',\n 'Type' => 'text',\n 'Description' =>\n 'The Instant Payment Notification (IPN) secret which you configured in your BitDrive merchant account settings.'\n )\n );\n}", "title": "" }, { "docid": "45361d056d71d4e958acce40eec64228", "score": "0.46206433", "text": "private function get_request_payment_method(\\WP_REST_Request $request)\n {\n }", "title": "" }, { "docid": "9105ce374b35ca99da9763ea4c006981", "score": "0.4616292", "text": "function paymentMethods($tpl_dir)\r\n\t{\r\n\t\tif(isset($_REQUEST['sub']) && $_REQUEST['sub'] == 'save')\r\n\t\t{\r\n\t\t\tforeach($_POST['Name'] as $id => $Name)\r\n\t\t\t{\r\n\t\t\t\tif(!empty($_POST['Name'][$id])) $GLOBALS['db']->Query(\"UPDATE \" . PREFIX . \"_modul_shop_zahlungsmethoden SET Name = '\".$_POST['Name'][$id].\"', Aktiv = '\".$_POST['Aktiv'][$id].\"', Position = '\".$_POST['Position'][$id].\"' WHERE Id = '$id'\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$GLOBALS['tmpl']->assign('methods', $this->displayMethods());\r\n\t\t$GLOBALS['tmpl']->assign('content', $GLOBALS['tmpl']->fetch($tpl_dir . 'shop_paymentmethods.tpl'));\r\n\t}", "title": "" }, { "docid": "19430fcecbde8e2a873f145de3b6b1c7", "score": "0.46129933", "text": "public function column_method( $request ) {\n\t\t$method = get_post_meta( $request->ID, '_camppayments_payment_method', true );\n\t\treturn esc_html( $method );\n\t}", "title": "" }, { "docid": "26657a134bbb3e170ee4e5da9d03c562", "score": "0.46111", "text": "private function filterPaymentMethod($paymentMethod) {\n\t\t$filteredMethod = ['method' => $paymentMethod, 'issuer' => NULL];\n\n\t\t// Check if this is an iDeal payment method\n\t\tif (strpos($paymentMethod, strtolower(\\Mollie_API_Object_Method::IDEAL)) !== false) {\n\n\t\t\t// Add the filtered method\n\t\t\t$filteredMethod['method'] = \\Mollie_API_Object_Method::IDEAL;\n\t\t\t$filteredMethod['issuer'] = $paymentMethod;\n\t\t}\n\n\t\t// Return the filtered method\n\t\treturn $filteredMethod;\n\t}", "title": "" }, { "docid": "b02e613e4545e36cdda544b5c566faf8", "score": "0.46103853", "text": "function get_external_method($field, $method) {\r\n\r\n $data = explode(\":\", $this->properties_type[\"$field\"]);\r\n\r\n $tclass = $data[1];\r\n $tfield = $data[2];\r\n debug(\"{$this->properties_type[\"$field\"]} $tclass|$field|$tfield\", \"red\");\r\n return \"fref#$tclass|$field|$method\";\r\n }", "title": "" }, { "docid": "a608c478e1bc1295fdd9c0f58ed3d648", "score": "0.46066728", "text": "public function add_gateways($methods) {\n\t\tif ( is_admin() ) {\n\t\t\t$methods[] = 'Ebanx\\WooCommerce\\Gateways\\Configuration';\n\t\t\treturn $methods;\n\t\t}\n\n\t\t$methods[] = 'Ebanx\\WooCommerce\\Gateways\\SampleGateway';\n\n\t\treturn $methods;\n\t}", "title": "" }, { "docid": "8136e34da5eea5d5e3335bc8ec381579", "score": "0.46004745", "text": "public function getCustomerMappedMethods($user_id, $type = '', $user_country = '0') {\n if (is_numeric($user_id)) {\n switch ($type) {\n case 'payment':\n // first we load all options\n $allmethods = mslib_fe::loadPaymentMethods(0, $user_country, true, true);\n $str = $GLOBALS['TYPO3_DB']->SELECTquery('s.code, cmm.negate', // SELECT ...\n 'tx_multishop_customers_method_mappings cmm, tx_multishop_payment_methods s', // FROM ...\n 's.status=1 and cmm.type=\\'' . $type . '\\' and cmm.customers_id = \\'' . $user_id . '\\' and cmm.method_id=s.id', // WHERE...\n '', // GROUP BY...\n '', // ORDER BY...\n '' // LIMIT ...\n );\n $qry = $GLOBALS['TYPO3_DB']->sql_query($str);\n $array = array();\n if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry) > 0) {\n while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) {\n if (!isset($allmethods[$row['code']])) {\n if (!$row['negate']) {\n $allmethods[$row['code']] = mslib_fe::loadPaymentMethod($row['code']);\n }\n } else {\n if ($row['negate'] > 0) {\n unset($allmethods[$row['code']]);\n }\n }\n }\n } else {\n // since only containing default method we will give the default loader to handle\n $allmethods = array();\n }\n break;\n case 'shipping':\n // first we load all options\n $allmethods = array();\n $str = $GLOBALS['TYPO3_DB']->SELECTquery('s.*, d.description, d.name, cmm.negate', // SELECT ...\n 'tx_multishop_customers_method_mappings cmm, tx_multishop_shipping_methods s, tx_multishop_shipping_methods_description d', // FROM ...\n 's.status=1 and cmm.type=\\'' . $type . '\\' and cmm.customers_id = \\'' . $user_id . '\\' and cmm.method_id=s.id and d.language_id=\\'' . $this->sys_language_uid . '\\' and s.id=d.id', // WHERE...\n '', // GROUP BY...\n 's.sort_order', // ORDER BY...\n '' // LIMIT ...\n );\n $qry = $GLOBALS['TYPO3_DB']->sql_query($str);\n if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry) > 0) {\n while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) {\n if (!isset($allmethods[$row['code']])) {\n if (!$row['negate']) {\n $allmethods[$row['code']] = mslib_fe::loadShippingMethod($row['code']);\n }\n } else {\n if ($row['negate'] > 0) {\n unset($allmethods[$row['code']]);\n }\n }\n }\n } else {\n $allmethods = array();\n }\n break;\n }\n return $allmethods;\n }\n }", "title": "" }, { "docid": "99b82eea2e87147c6442b172b3be05ff", "score": "0.459544", "text": "function getMethod(){\n\t\t$value = '--';\n\t\t$values = getPaymentMethods();\n\t\tif(!isEmptyString($this->getPaymentType()) && $this->getPaymentType() != 0){\n\t\t\t$value = $values[$this->getPaymentType()];\n\t\t}\n\t\treturn $value;;\n\t}", "title": "" }, { "docid": "06aa911a4a12a2c63b25f6bb442da619", "score": "0.4595113", "text": "public function getConfig()\n {\n\n $methodCode = self::CODE;\n $config = [];\n\n $testMode = $this->_config->getValue('payment/brick/test_mode');\n $publicTestKey = $this->_config->getValue('payment/brick/public_test_key');\n $publicKey = $this->_config->getValue('payment/brick/public_key');\n $autoFillCardInfo = $this->_config->getValue('payment/brick/auto_fill_card_info');\n $config = array_merge_recursive($config, [\n 'payment' => [\n 'ccform' => [\n 'availableTypes' => [$methodCode => $this->getCcAvailableTypes()],\n 'months' => [$methodCode => $this->getCcMonths()],\n 'years' => [$methodCode => $this->getCcYears()],\n 'hasVerification' => [$methodCode => true],\n 'hasSsCardType' => [$methodCode => false],\n 'ssStartYears' => [$methodCode => $this->getSsStartYears()],\n 'cvvImageUrl' => [$methodCode => $this->getCvvImageUrl()]\n ],\n $methodCode => [\n 'public_key' => $testMode ? $publicTestKey : $publicKey,\n 'auto_fill_card_info' => $autoFillCardInfo,\n 'isActive' => true\n ]\n ]\n ]);\n return $config;\n }", "title": "" }, { "docid": "8f30d615ad23de5df1f99437835e889b", "score": "0.45906726", "text": "protected function getField($path) {\n $segments = split(\"/\", $path);\n $var = $this->config;\n foreach ($segments as $seg) {\n $var = $var->{$seg};\n }\n return $var;\n }", "title": "" }, { "docid": "c9ecfa85a3c9bc46461d449ef16f7b16", "score": "0.4589539", "text": "public function __getDriverPath($type){\n\t\t\treturn $this->__getClassPath($type) . \"/field.{$type}.php\";\n\t\t}", "title": "" }, { "docid": "ddd77e7584f1bd05c8f52f04e00185a7", "score": "0.45832354", "text": "function wpbs_form_outputter_payment_method_name_payment_on_arrival($active, $language)\n{\n $settings = get_option('wpbs_settings', array());\n if (!empty($settings['payment_poa_name_translation_' . $language])) {\n return $settings['payment_poa_name_translation_' . $language];\n }\n if (!empty($settings['payment_poa_name'])) {\n return $settings['payment_poa_name'];\n }\n return wpbs_settings_payment_on_arrival_defaults()['display_name'];\n}", "title": "" }, { "docid": "132a49bab6ff82041d48b8df65c3cfaa", "score": "0.4577231", "text": "public function getFormFields()\r\n {\r\n $currency = $this->getOrder()->getBaseCurrencyCode();\r\n $returnurl = Mage::getUrl('wirecard_checkout_page/processing/checkresponse', array('_secure'=>true, '_nosid'=>true));\r\n $shopName = 'Magento';\r\n $shopVersion = Mage::getVersion();\r\n $pluginName = $this->getPluginName();\r\n $pluginVersion = $this->_pluginVersion;\r\n $versionString = base64_encode($shopName.';'.$shopVersion.'; ;'.$pluginName.';'.$pluginVersion);\r\n $deliveryAddress = $this->getOrder()->getShippingAddress();\r\n $billingAddress = $this->getOrder()->getBillingAddress();\r\n\r\n $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());\r\n if (is_array($locale) && !empty($locale))\r\n $locale = $locale[0];\r\n else\r\n $locale = $this->getDefaultLocale();\r\n\r\n $params = array(\r\n 'customerId' => $this->getConfigData('customer_id'),\r\n 'amount' => round($this->getOrder()->getBaseGrandTotal(), 2),\r\n 'currency' => $currency,\r\n 'language' => $locale,\r\n 'orderDescription' => $this->getOrder()->getRealOrderId(),\r\n 'customerStatement' => $this->getOrder()->getRealOrderId(),\r\n 'successURL' => $returnurl,\r\n 'cancelURL' => $returnurl,\r\n 'failureURL' => $returnurl,\r\n 'pendingURL' => $returnurl,\r\n 'serviceURL' => Mage::getUrl($this->getConfigData('service_url'), array('_nosid'=>true)),\r\n 'confirmURL' => Mage::getUrl('wirecard_checkout_page/processing/confirm', array('_secure'=>true, '_nosid'=>true)),\r\n 'duplicateRequestCheck' => 'no',\r\n 'paymenttype' => $this->_paymentMethod,\r\n 'orderId' => $this->getOrder()->getRealOrderId(),\r\n 'orderReference' => $this->getOrder()->getRealOrderId(),\r\n 'pluginVersion' => $versionString,\r\n 'backgroundColor' => $this->getConfigData('background_color'),\r\n 'consumerUserAgent' => Mage::app()->getRequest()->getHeader('User-Agent'),\r\n 'consumerIpAddress' => Mage::app()->getRequest()->getServer('REMOTE_ADDR')\r\n );\r\n\r\n $params = array_merge($params, $this->_getConsumerInformation());\r\n\r\n if (strlen($this->getConfigData('shop_id')) > 0)\r\n $params['shopId'] = $this->getConfigData('shop_id');\r\n if (strlen($this->getConfigData('display_text')) > 0)\r\n $params['displayText'] = $this->getConfigData('display_text');\r\n if (strlen($this->getConfigData('logo_url')) > 0)\r\n $params['imageURL'] = Mage::getDesign()->getSkinUrl($this->getConfigData('logo_url'));\r\n\r\n if($this->getConfigData('auto_deposit'))\r\n {\r\n $params['autoDeposit'] = 'yes';\r\n }\r\n\r\n if($this->getConfigData('detect_layout'))\r\n {\r\n $detect = new WirecardCEE_MobileDetect();\r\n\r\n if($detect->isTablet()) {\r\n $layout = 'TABLET';\r\n }\r\n elseif($detect->isMobile()) {\r\n $layout = 'SMARTPHONE';\r\n }\r\n else {\r\n $layout = 'DESKTOP';\r\n }\r\n\r\n $params['layout'] = $layout;\r\n }\r\n\r\n // compile fingerprint\r\n $requestFingerprintOrder = 'secret,';\r\n $requestFingerprintSeed = $this->getConfigData('secret_key');\r\n foreach($params as $key => $value)\r\n {\r\n if($value == NULL)\r\n {\r\n unset($params[$key]);\r\n }\r\n else\r\n {\r\n $requestFingerprintOrder .= $key.',';\r\n $requestFingerprintSeed .= $value;\r\n }\r\n }\r\n $requestFingerprintOrder .= 'requestFingerprintOrder';\r\n $requestFingerprintSeed .= $requestFingerprintOrder;\r\n $requestfingerprint = md5($requestFingerprintSeed);\r\n $params['requestFingerprintOrder'] = $requestFingerprintOrder;\r\n $params['requestFingerprint'] = $requestfingerprint;\r\n return $params;\r\n }", "title": "" }, { "docid": "33515292c3c6d2b94e34db00850654d6", "score": "0.45757332", "text": "private function getPath($fieldName): array {\r\n\r\n //Check if the path is already known\r\n if(true === isset($this -> cachedValues[$fieldName])) {\r\n return $this -> cachedValues[$fieldName];\r\n }\r\n\r\n //Check if field is a combine instance\r\n if($combine = $this -> combine -> get($fieldName)) {\r\n $path = [['value' => $combine -> combine(), 'path' => explode('.', $fieldName)]];\r\n }\r\n else {\r\n\r\n $type = $this -> fieldNames[$fieldName] ?? null;\r\n $path = null;\r\n\r\n switch($type) {\r\n\r\n case FileCollection::class:\r\n\r\n $files = Request :: getUploadedFiles();\r\n $translator = new StringTranslator($files);\r\n $path = $translator -> path($fieldName);\r\n break;\r\n\r\n case FieldCollection::class:\r\n\r\n $path = $this -> translator -> path($fieldName);\r\n break;\r\n }\r\n }\r\n\r\n //Cache the path\r\n $this -> cachedValues[$fieldName] = $path;\r\n\r\n return $path ?? [['value' => null, 'path' => null]];\r\n }", "title": "" }, { "docid": "9d3f3ebcfbba453c54ef21081c1a0177", "score": "0.4572626", "text": "function add_mygate_gateway($methods) {\n $methods[] = 'woocommerce_mygate';\n return $methods;\n}", "title": "" }, { "docid": "5a503e3ef672655d41c83db4b4be1f84", "score": "0.45628947", "text": "public function payment_fields() {\n\n $cc_form = new WC_Payment_Gateway_CC;\n $cc_form->id = $this->id;\n $cc_form->supports = $this->supports;\n $this->cc_form = $cc_form;\n $this->images_dir = plugin_dir_url(__FILE__).'../assets/images/';\n \n $form_template = realpath(dirname(__FILE__)).'/../templates/payment_form.php'; \n include_once($form_template); \n }", "title": "" }, { "docid": "d3e4612f28aefc396ec5c960e4d38a7e", "score": "0.4561368", "text": "public function payment_fields() {\r\n\t\tif (!empty($this->description)) {\r\n\t\t\techo $this->add_next_line($this->description . '<br /><br />');\r\n\t\t}\r\n\t\techo __('Payment Method', 'ecpay') . ' : ';\r\n\t\techo $this->add_next_line('<select name=\"ecpay_choose_payment\">');\r\n\t\tforeach ($this->ecpay_payment_methods as $payment_method) {\r\n\t\t\techo $this->add_next_line(' <option value=\"' . $payment_method . '\">');\r\n\t\t\techo $this->add_next_line(' ' . $this->get_payment_desc($payment_method));\r\n\t\t\techo $this->add_next_line(' </option>');\r\n\t\t}\r\n\t\techo $this->add_next_line('</select>');\r\n\t}", "title": "" }, { "docid": "d969a340c392054bcd879e4da9752de5", "score": "0.4555868", "text": "public function processField(FieldConfiguration $configuration, $value, array $fieldPath);", "title": "" }, { "docid": "1fcc69359e867c88f725ce44c142893c", "score": "0.4550234", "text": "public function makeConfiguration($paymentMethod,$order,$transaction){\n\n\t\t$conf['merchantId'] = $paymentMethod->options->merchantId ?? null;\n\t \t$conf['publicKey'] = $paymentMethod->options->publicKey ?? null;\n\t \t\n\t \t$conf['sandboxMode'] = true;\n\t \tif($paymentMethod->options->mode!='sandbox')\n\t \t\t$conf['sandboxMode'] = false;\n\t \t\n\t \t$conf['reedirectAfterPayment'] = $order->url;\n\t \t\n\t \t$conf['order'] = $order;\n\n\t \treturn json_decode(json_encode($conf));\n \n\t}", "title": "" }, { "docid": "cec074d96cac99e559d0a0abc7d2732e", "score": "0.4540371", "text": "static function pmpro_gateways($gateways)\n\t\t{\n\t\t\tif(empty($gateways['paypalexpress']))\n\t\t\t\t$gateways['paypalexpress'] = __('PayPal Express', 'paid-memberships-pro' );\n\n\t\t\treturn $gateways;\n\t\t}", "title": "" }, { "docid": "bdc2c6ac34c8a15cd2f11bde242d8e66", "score": "0.45365548", "text": "protected abstract function getKeyMethodMapping();", "title": "" }, { "docid": "0bd1b83bdca7b718455cd034a2027093", "score": "0.45324862", "text": "public static function getPaymentMethod() {\r\n throw new PaymentException('Payment Method not defined. ');\r\n }", "title": "" }, { "docid": "c2911f190b9f5f2564b08c97165c9831", "score": "0.45281255", "text": "private static function setRequestMethods($method) {\n self::$methodLower = strtolower($method);\n self::$methodUpper = strtoupper($method);\n //Saves the Methods set in the ini as lowercase\n $s = ConfigLoader::getGlobalConfig();\n $ret = array();\n foreach ($s['ressource_options'] as $value) {\n array_push($ret, strtolower($value));\n }\n self::$possibleMethods = $ret;\n }", "title": "" }, { "docid": "b69e5460c014791833a07cfbba94551b", "score": "0.45279777", "text": "public function get_payment_method_data();", "title": "" }, { "docid": "24311dbf02a8f9864c26f67e74ab726a", "score": "0.45211974", "text": "public static function find($field, $value)\n {\n $result = [];\n $paymentMethods = new PaymentMethod();\n\n /** @var PaymentMethod\\PaymentMethod $paymentMethod */\n foreach ($paymentMethods as $paymentMethod) {\n if ($paymentMethod->getDataUsingMethod($field) === $value) {\n $result[$paymentMethod->getId()] = $paymentMethod;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "8a78e6e10f86cd5453d2e3982859da5b", "score": "0.4519777", "text": "protected function _checkShippingMethodMapping()\n\t{\n\t\t$transaction_shipping_method = $this->_reference_transaction->getShippingMethod();\n\t\t$mapping = Mage::getModel('magebid/mapping')->load($transaction_shipping_method,'ebay');\t\t\n\t\t\n\t\tif ($mapping->getMagento()) \n\t\t{\n\t\t\t$code_array = explode(\"_\",$mapping->getMagento());\n\t\t\t\n\t\t\t//Get CarrierName\t\n\t if ($name = Mage::getStoreConfig('carriers/'.$code_array[0].'/title')) {\n\t $carrier_title = $name;\n\t }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$carrier_title = $code_array[0];\n\t\t\t}\n\t\t\t\n\t\t\t//Get Method Title\n\t\t\t $className = Mage::getStoreConfig('carriers/'.$code_array[0].'/model');\n\t\t\t if ($className)\n\t\t\t {\n\t\t $obj = Mage::getModel($className);\n\t\t\t\t foreach ($obj->getAllowedMethods() as $key=>$method)\n\t\t\t\t {\n\t\t\t\t \tif ($key==$code_array[1]) $method_title = $method;\n\t\t\t\t }\t\t\t \t\n\t\t\t }\t\t\n\t\t\t if ($method_title==\"\")\t$method_title = $code_array[1]; \n\t\t\t\n\t\t\t//Build Data Array\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'code' => $mapping->getMagento(),\n\t\t\t\t'carrier' => $code_array[0],\n\t\t\t\t'method' => $code_array[1],\n\t\t\t\t'carrier_title' => $carrier_title,\n\t\t\t\t'method_title' => $method_title,\t\t\t\t\n\t\t\t\t);\t\t\t\t\t\n\t\t\t\n\t\t\treturn $data;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "d82f922322f32c31e99d9eb473dd8fb3", "score": "0.4517309", "text": "public function map()\n {\n $type = $this->resolveType();\n foreach ($this->fieldsMap as $dinteroField => $magentoField) {\n if ($value = $this->dataObject->getDataByPath(sprintf('%s/%s', $type, $dinteroField))) {\n $this->address->setData($magentoField, $value);\n }\n }\n }", "title": "" }, { "docid": "19ab27292dc49aabbe107a9b54008b8b", "score": "0.4507471", "text": "public function getConfigPaymentAction()\n {\n return Mage_Payment_Model_Method_Abstract::ACTION_ORDER;\n }", "title": "" }, { "docid": "a49d95bf9cd63a3db2317ac87cda88d9", "score": "0.4502565", "text": "public function getDefaultPaymentMethod(string $customer_id);", "title": "" }, { "docid": "a3a0f7adf4cb1621ee6afa0995a27f80", "score": "0.45019248", "text": "public function register_method( $methods ) {\n\t\t$methods['enda_bundle_rate'] = 'ENDA_Woocommerce_Bundle_Shipping';\n\t\treturn $methods;\n\t}", "title": "" }, { "docid": "5cc1abbe77d01274a860c271b26aed0c", "score": "0.44925588", "text": "private function translatePayment(array $paymentMethod, $languageId)\n {\n $translation = new Shopware_Components_Translation();\n $paymentTranslations = $translation->read($languageId, 'config_payment');\n\n $paymentId = $paymentMethod['id'];\n\n if (!is_null($paymentTranslations[$paymentId]['description'])) {\n $paymentMethod['description'] = $paymentTranslations[$paymentId]['description'];\n }\n\n //for the confirmation mail template\n $paymentMethod['additionaldescription'] = $paymentTranslations[$paymentId]['additionalDescription'];\n $paymentMethod['additionalDescription'] = $paymentTranslations[$paymentId]['additionalDescription'];\n\n return $paymentMethod;\n }", "title": "" }, { "docid": "bf505d0585654e26839a03cad4c2d03c", "score": "0.4490305", "text": "public function set_payment_method($payment_method)\n {\n }", "title": "" }, { "docid": "c5a1d372e90d3a2e5ad219c38dcb6548", "score": "0.4476945", "text": "public function getPostRoutesConfigDataProvider(): array\n {\n return [\n [\n 'GET',\n '/get-route/'\n ],\n [\n 'POST',\n '/post-route/'\n ]\n ];\n }", "title": "" }, { "docid": "2ce5b8b83a42361732d1b5462bb17eff", "score": "0.4470074", "text": "public function parsePaymentMethod($paymentData)\n {\n if (!empty($paymentData->paymentMethod)) {\n $paymentMethod = $paymentData->paymentMethod;\n } else {\n switch ($paymentData->paymentInstrumentType ?? '') {\n case PaymentMethods::PAYPAL_ACCOUNT;\n if (!empty($paymentData->paypalDetails)) {\n $paymentMethod = $paymentData->paypalDetails;\n break;\n } else {\n return Factory::get(PaymentMethod::class, true);\n }\n default;\n if (!empty($paymentData->creditCardDetails)) {\n $paymentMethod = $paymentData->creditCardDetails;\n break;\n } else {\n return Factory::get(PaymentMethod::class, true);\n }\n }\n }\n\n // Define payment method parser\n switch (get_class($paymentMethod)) {\n case CreditCardDetails::class:\n case CreditCard::class:\n $parser = 'parseBraintreeCreditCard';\n break;\n case PayPalDetails::class:\n case PayPalAccount::class:\n $parser = 'parseBraintreePayPalAccount';\n break;\n default:\n break;\n }\n\n // Return parsed result\n return $this->{$parser}($paymentMethod);\n }", "title": "" }, { "docid": "897a784b9a0706182104c40e3a77a5c5", "score": "0.4466927", "text": "public static function getPaymentMethod($name)\n\t{\n\t\t$methods = os_payments::getPaymentMethods();\n\n\t\tforeach ($methods as $method)\n\t\t{\n\t\t\tif ($method->getName() == $name)\n\t\t\t{\n\t\t\t\treturn $method;\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "a0d04aaf25dfbde15d752741cc78d041", "score": "0.44614333", "text": "protected function get_enabled_payment_gateways()\n {\n }", "title": "" }, { "docid": "673d10ff14f591047f58e9a725bafa86", "score": "0.4454537", "text": "function wpbs_action_payment_on_arrival_save_payment_details($booking_id, $post_data, $form, $form_args, $form_fields)\n{\n $payment_found = false;\n\n // Check if payment method is enabled.\n foreach ($form_fields as $form_field) {\n if ($form_field['type'] == 'payment_method' && $form_field['user_value'] == 'payment_on_arrival') {\n $payment_found = true;\n break;\n }\n }\n\n if ($payment_found === false) {\n return false;\n }\n\n // Get price\n $payment = new WPBS_Payment;\n $details['price'] = $payment->calculate_prices($post_data, $form, $form_args, $form_fields);\n\n // Save Order\n wpbs_insert_payment(array(\n 'booking_id' => $booking_id,\n 'gateway' => 'payment_on_arrival',\n 'order_id' => '-',\n 'order_status' => '-',\n 'details' => $details,\n 'date_created' => current_time('Y-m-d H:i:s'),\n ));\n\n}", "title": "" }, { "docid": "f477c05a3a51c5eaf8cd7c8b8a6a2735", "score": "0.44441137", "text": "function wp_invoice_get_payment_gateway()\n{\n\t$wp_invoice_payment_gateway = wp_invoice_get_option( 'payment_gateway' );\t\n\tif ( $wp_invoice_payment_gateway )\n\t{\n\t\treturn $wp_invoice_payment_gateway;\n\t}\n\telse\n\t{\n\t\treturn 'None';\t\n\t}\n}", "title": "" }, { "docid": "799d904954c41be32ad69d25cf27986d", "score": "0.44381255", "text": "public function getAllowedMethods()\n {\n \n \n \n return array( \n 'homedelivery' => $this->getConfigData('homedelivery'),\n \n 'matkahuolto' => $this->getConfigData('matkahuolto'),\n 'smartpost' => $this->getConfigData('smartpost'),\n \n \n \n 'chooseapostoffice' => $this->getConfigData('chooseapostoffice'), \n 'default' => $this->getConfigData('closestpostoffice'),\n \n );\n \n }", "title": "" }, { "docid": "7730856eb91902bf0898342e917fa125", "score": "0.4432789", "text": "public function testUpdatePaymentMethod()\n {\n\n }", "title": "" }, { "docid": "0661020903e06963552934a666bb681a", "score": "0.44267562", "text": "public static function find($name) {\n $settings = (new PaymentGateway)->where('gateway', $name)->get();\n $object = new PaymentGateway();\n\n foreach ($settings as $setting) {\n $name = $setting->setting;\n $value = $setting->value;\n $object->$name = $value;\n }\n\n return $object;\n }", "title": "" }, { "docid": "3e8a0a985c2809e441de7472b9c911ec", "score": "0.44262633", "text": "function addPaymentFormField(NodeTypeInterface $type, $label = 'Payment Label') {\n $field_storage = FieldStorageConfig::create(array(\n 'field_name' => $this->fieldName,\n 'entity_type' => 'node',\n 'type' => 'payment_form',\n ));\n $field_storage->save();\n\n $instance = FieldConfig::create(array(\n 'field_storage' => $field_storage,\n 'bundle' => $type->id(),\n 'label' => $label,\n 'settings' => array('currency_code' => 'CHF'),\n ));\n $instance->save();\n\n // Assign display settings for the 'default' and 'teaser' view modes.\n entity_get_display('node', $type->id(), 'default')\n ->setComponent($this->fieldName, array(\n 'label' => 'hidden',\n 'type' => 'text_default',\n ))\n ->save();\n\n return $instance;\n }", "title": "" }, { "docid": "70bc98b19ce022d51d225d906a7fbfda", "score": "0.44249627", "text": "function edd_simplify_commerce_register_gateway( $gateways ) {\n\t$gateways['simplify'] = array(\n\t\t'admin_label' => 'Simplify Commerce',\n\t\t'checkout_label' => __( 'Credit Card', 'edd-simplify-commerce' )\n\t);\n\n\treturn $gateways;\n}", "title": "" }, { "docid": "f04baf2e18e0e40d303821ba0ce5a4b1", "score": "0.4424889", "text": "function wc_fabric_add_to_gateways( $methods ) {\n // Add\n $methods [] = __NAMESPACE__ . '\\\\WC_Fabric_Gateway';\n return $methods ;\n}", "title": "" }, { "docid": "1d98227e08952663c8500a3d6af60a5b", "score": "0.44235906", "text": "public function getConfig()\n {\n return [\n 'payment' => [\n self::CODE => [\n 'transactionResults' => [\n 1 => __('Success'),\n 0 => __('Fraud')\n ],\n 'redirectUrl' => $this->_url->getRouteUrl('rewardredirect/payment/redirect')\n ]\n ]\n ];\n }", "title": "" }, { "docid": "7f934b5f5c946ff45faaef7433936154", "score": "0.44167772", "text": "public function fieldMapping() : string {\n return $this->configGet('field_mapping', '');\n }", "title": "" }, { "docid": "4b7ce98aee855310e9a43e30b9101b0b", "score": "0.4415725", "text": "public function hookPaymentOptions()\n {\n $payseraOption = new PaymentOption();\n\n $payseraOption->setCallToActionText($this->l('Pay by Paysera'));\n $payseraOption->setAction($this->context->link->getModuleLink($this->name, 'redirect'));\n\n $displayPaymentMethods = (bool) Configuration::get('PAYSERA_DISPLAY_PAYMENT_METHODS');\n if ($displayPaymentMethods) {\n $projectID = Configuration::get('PAYSERA_PROJECT_ID');\n $defaultCountry = Configuration::get('PAYSERA_DEFAULT_COUNTRY');\n\n $currencyISO = $this->context->currency->iso_code;\n $amount = $this->context->cart->getOrderTotal() * 100;\n $langISO = strtolower($this->context->language->iso_code);\n $langISO = in_array($langISO, ['lt', 'en', 'ru', 'lv', 'ee', 'et', 'pl', 'bg']) ? $langISO : 'en';\n\n $methods = WebToPay::getPaymentMethodList($projectID, $currencyISO)\n ->filterForAmount($amount, $currencyISO)\n ->setDefaultLanguage($langISO)\n ->getCountries();\n\n $this->context->smarty->assign([\n 'defaultCountry' => $defaultCountry,\n 'payMethods' => $methods,\n ]);\n\n $additionalInfo = $this->context->smarty->fetch('module:paysera/views/templates/hook/payment-options.tpl');\n $payseraOption->setAdditionalInformation($additionalInfo);\n $payseraOption->setInputs([\n 'paysera_payment_method' => [\n 'name' => 'paysera_payment_method',\n 'type' => 'hidden',\n 'value' => '',\n ],\n ]);\n }\n\n return [$payseraOption];\n }", "title": "" }, { "docid": "84d768ae0c37731ae85e20d868b4c428", "score": "0.44150537", "text": "public function get_fields( $specific_field = \"\" )\n {\n\n $fields = array(\n \n 'config_id' => array(\n 'table' => $this->_table,\n 'name' => 'config_id',\n 'label' => 'id #',\n 'type' => 'hidden',\n 'type_dt' => 'text',\n 'attributes' => array(),\n 'dt_attributes' => array(\"width\"=>\"5%\"),\n 'js_rules' => '',\n 'rules' => 'trim'\n ),\n\n 'config_variable' => array(\n 'table' => $this->_table,\n 'name' => 'config_variable',\n 'label' => 'Variable',\n 'type' => 'label',\n 'attributes' => array(),\n 'js_rules' => 'required',\n 'rules' => 'required|trim|htmlentities'\n ),\n \n 'config_value' => array(\n 'table' => $this->_table,\n 'name' => 'config_value',\n 'label' => 'Value',\n 'type' => 'text',\n 'attributes' => array(),\n 'js_rules' => 'required',\n 'rules' => 'required|trim|htmlentities'\n ),\n \n 'config_type' => array(\n 'table' => $this->_table,\n 'name' => 'config_type',\n 'label' => 'Type?',\n 'type' => 'switch',\n 'type_dt' => 'dropdown',\n 'type_filter_dt' => 'dropdown',\n 'list_data' => array( \n 1 => \"<span class=\\\"label label-default\\\">Admin</span>\" , \n 2 => \"<span class=\\\"label label-primary\\\">System</span>\" \n ) ,\n 'default' => '1',\n 'attributes' => array(),\n 'dt_attributes' => array(\"width\"=>\"7%\"),\n 'rules' => 'trim'\n ),\n 'config_status' => array(\n 'table' => $this->_table,\n 'name' => 'config_status',\n 'label' => 'Status?',\n 'type' => 'switch',\n 'type_dt' => 'dropdown',\n 'type_filter_dt' => 'dropdown',\n 'list_data' => array(\n STATUS_INACTIVE => \"<span class=\\\"label label-default\\\">InActive</span>\" ,\n STATUS_ACTIVE => \"<span class=\\\"label label-primary\\\">Active</span>\",\n ) ,\n 'default' => '1',\n 'attributes' => array(),\n 'dt_attributes' => array(\"width\"=>\"7%\"),\n 'rules' => 'trim'\n ),\n \n );\n\n if($specific_field)\n return $fields[ $specific_field ];\n else\n return $fields;\n\n }", "title": "" }, { "docid": "53084da0935709dfbe9fdf859176986b", "score": "0.4400832", "text": "public function applyPaymentMethod($methodCode = null)\n {\n if (false === $methodCode) {\n return $this->getQuote()->removePayment();\n }\n\n $store = $this->getQuote() ? $this->getQuote()->getStoreId() : null;\n $methods = Mage::helper('payment')->getStoreMethods($store, $this->getQuote());\n $availablePayments = array();\n foreach ($methods as $key => $method) {\n if (!$method || !$method->canUseCheckout()) {\n continue;\n }\n if ($this->_canUsePaymentMethod($method)) {\n $availablePayments[] = $method;\n }\n }\n\n $found = false;\n $count = count($availablePayments);\n if (1 === $count) {\n $methodCode = $availablePayments[0]->getCode();\n $found = true;\n } elseif ($count) {\n if (!$methodCode) {\n $methodCode = $this->getQuote()->getPayment()->getMethod();\n }\n if ($methodCode) {\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n if (!$found || !$methodCode) {\n $methodCode = Mage::getStoreConfig('firecheckout/general/payment_method');\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n }\n\n if (!$found) {\n $this->getQuote()->removePayment();\n } elseif ($methodCode) {\n $payment = $this->getQuote()->getPayment();\n $payment->setMethod($methodCode);\n $payment->setMethodInstance(null); // fix for billmate payments\n $method = $payment->getMethodInstance();\n try {\n $data = new Varien_Object(array('method' => $methodCode));\n $method->assignData($data);\n } catch (Exception $e) {\n // Adyen HPP extension fix\n }\n\n if ($this->getQuote()->isVirtual()) { // discount are looking for method inside address\n $this->getQuote()->getBillingAddress()->setPaymentMethod($methodCode);\n } else {\n $this->getQuote()->getShippingAddress()->setPaymentMethod($methodCode);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "6f653e5138f7c839f25d58a7c0521d65", "score": "0.43983287", "text": "function init_form_fields () {\n\n\n\t\t$data_dir = $this->getDataDirectory();\n\n\t\t$files = glob($data_dir . \"*.*\");\n\n\t\t$options = array();\n\t\tforeach($files as $file)\n\t\t{\n\t\t\t$fileName = str_replace($data_dir, '', $file);\n\t\t\t$options[$fileName] = $fileName;\n\t\t}\n\n \t$this->form_fields = array(\n \t\t\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t\t\t\t\t\t'title' => __( 'Enable/Disable', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'label' => __( 'Enable Epay.kkb.kz', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t\t\t'description' => __( 'This controls whether or not this gateway is enabled within WooCommerce.', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'default' => 'yes'\n\t\t\t\t\t\t\t\t\t\t),\n \t\t\t\t\t\t'title' => array(\n \t\t\t\t\t\t\t\t\t\t'title' => __( 'Title', 'woocommerce-gateway-kkb' ),\n \t\t\t\t\t\t\t\t\t\t'type' => 'text',\n \t\t\t\t\t\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-gateway-kkb' ),\n \t\t\t\t\t\t\t\t\t\t'default' => __( 'Epay.kkb.kz', 'woocommerce-gateway-kkb' )\n \t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'description' => array(\n\t\t\t\t\t\t\t\t\t\t\t'title' => __( 'Description', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'testmode' => array(\n\t\t\t\t\t\t\t\t\t\t\t'title' => __( 'Sandbox', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t\t\t'description' => __( 'Place the payment gateway in development mode.', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'default' => 'yes'\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'merchant_id' => array(\n\t\t\t\t\t\t\t\t\t\t\t'title' => __( 'Shop/merchant id', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'description' => __( 'This is the merchant ID, received from kkb.', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'merchant_name' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Shop/merchant Name', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'description' => __( 'This is the merchant name, received from kkb.', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'merchant_certificate_id' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Certificate Serial Number', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'description' => __( 'This is the certificate id, received from kkb.', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'private_key_path' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Private certificate', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t'description' => __( 'Choose private certificate', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t\t\t\t'options' => $options\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'private_key_pass' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Private certificate password', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'description' => __( 'This is the private certificate password, received from kkb.', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'default' => ''\n\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t'approve_method' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Approve payment method', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t'description' => __( 'Choose approve payment method', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'automatic' => __('Automatic', 'woocommerce-gateway-kkb'),\n\t\t\t\t\t\t\t\t\t'manual' \t=> __('Manual', 'woocommerce-gateway-kkb')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t'log' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Log', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'description' => __( 'Enable logging', 'woocommerce-gateway-kkb' ),\n\t\t\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\n\n\n }", "title": "" } ]
28a5af7d58753af3a17aeaeadc3e4e08
Verifier si un tableau est vide ou pas
[ { "docid": "982107fb00fa533ee4efaaff4a011b0e", "score": "0.0", "text": "function array_empty($array) {\r\n \t$is_empty = true;\r\n foreach($array as $k) {\r\n \t$is_empty = $is_empty && empty($k);\r\n }\r\n return $is_empty;\r\n }", "title": "" } ]
[ { "docid": "67da92bf16ece0ad4f313bf931f13a41", "score": "0.6677759", "text": "public function validateTable($table){\r\n return true;\r\n }", "title": "" }, { "docid": "ece4323c6297b9de84a5650c007ab084", "score": "0.6493672", "text": "private function checkTable(){\n\t\t$row = $this->db->query(\"SELECT `personId`, `faceId`, `name`, `email` FROM `user`\");\n\t\t\n\t\tif(!$row)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "bec58046d401088a166db4601f786ee7", "score": "0.63643754", "text": "public function validate_aioseo_table()\n {\n }", "title": "" }, { "docid": "a71cb17af316a21294ace8ef4683e593", "score": "0.6086155", "text": "public function validate_table()\r\n\t{\r\n $rows = $this->queryAll('SELECT DISTINCT * FROM substances WHERE name IS NULL OR uploadName IS NULL OR identifier IS NULL');\r\n\t\t\r\n\t\tforeach($rows as $row)\r\n\t\t{\r\n $substance = new Substances($row->id);\r\n\r\n $identifier = Identifiers::generate_substance_identifier($row->id);\r\n \r\n $substance->identifier = $identifier;\r\n $substance->name = !empty($substance->name) ? $substance->name : $identifier; \r\n $substance->uploadName = !empty($substance->uploadName) ? $substance->uploadName : $identifier; \r\n\r\n $substance->save();\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "ef7d5bcaf5e71272c79f503aff4cd0f2", "score": "0.60351235", "text": "private function checkTable(){\n if(!mysqli_query($this->database->connect(), \"DESCRIBE `products2`\")) {\n self::createTable();\n }\n }", "title": "" }, { "docid": "3929a754565b8af572ebe2ad3ed6db21", "score": "0.5962561", "text": "protected function getShowTableOnEmpty()\n {\n return true;\n }", "title": "" }, { "docid": "4b9cd8ba6a20e6b86a9ba94e88d217d4", "score": "0.595538", "text": "public function testVerificaOsCampoDaTabelaPlano()\n {\n $plano = new Plano();\n\n $expected = [\n 'plano',\n 'minutos'\n ];\n\n $arrayCompared = array_diff($expected, $plano->getFillable());\n\n $this->assertEquals(0, count($arrayCompared));\n }", "title": "" }, { "docid": "031b16f0f814393dbdcf563c491a7723", "score": "0.59454805", "text": "public function valid() {\n\t\treturn !is_null($this->row);\n\t}", "title": "" }, { "docid": "683debed384e5e483b8d0b2044acd35a", "score": "0.58987457", "text": "public function valid () {\n\t\t#coopy/TableIO.hx:25: characters 9-20\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2039c285666dd660c5bb6cb393679ba6", "score": "0.588578", "text": "protected function checkTable(){\n if( is_null($this->_tableName) )\n exit('Error: Database table \"'.($this->_tableName).'\" does not exist.');\n }", "title": "" }, { "docid": "2afc5713564c5d0f922a5afa201ead2b", "score": "0.5873629", "text": "abstract protected function RetCheckTable();", "title": "" }, { "docid": "b7f4d590838c43f3772150bc29802438", "score": "0.58260417", "text": "public function test_latest_attempt_table_no_filter() {\n $table = new latest_attempt_table($this->context, $this->course->id, 0, null, null);\n $this->assertEquals(['contextid' => $this->context->id], $table->sql->params);\n }", "title": "" }, { "docid": "50473237694236884748e46436b33a27", "score": "0.5774483", "text": "function checkAnswerTable ($db){\n\t\t$p = @$db->query('SELECT * FROM Answer'); //test if number is within range\n\t\treturn $p === false; \n\t}", "title": "" }, { "docid": "10b42f9ce9fa9659f12b187e6c44d832", "score": "0.576175", "text": "private function isOnTable(): bool {\n return $this->is_placed;\n }", "title": "" }, { "docid": "4c2297785743623af33725fc5a8e2c3d", "score": "0.5757676", "text": "public function requireTable()\n {\n return false;\n }", "title": "" }, { "docid": "7140b3bcb72997718220c35a2160db65", "score": "0.57570064", "text": "public function checkTableInfo(){\n $checkConfigTableName = Config::CONTACT_FORM_TABLE_NAME;\n\n // get table name from db\n $checkDbTableName = Model::checkTableName(self::$_tableName);\n\n // check if table name is empty\n if ($checkDbTableName == ''){\n\n // add call to jquery dialog error message box here and remove echo\n echo 'Table Name Not Found';\n\n } // check if config table name is equal to database name before continue\n else if($checkDbTableName != $checkConfigTableName) {\n\n // add call to jquery dialog error message box here and remove echo\n echo 'Table Name Does Match';\n }\n\n }", "title": "" }, { "docid": "91d956bffeaf60cc22bc6048251bee73", "score": "0.5752985", "text": "public function valid ( /* void */ )\n {\n /*\n Check for statement and record.\n */\n return !(is_null($this->__rs) or ($this->__record === false));\n }", "title": "" }, { "docid": "c86d31aaec1ec4028bd81bac32521388", "score": "0.57502925", "text": "public function table_check(){\n\t\t\t// List of default WordPress tables\n\t\t\t$required_tables = array(\n\t\t\t\t\t\t\t'commentmeta', \n\t\t\t\t\t\t\t'comments', \n\t\t\t\t\t\t\t'links', \n\t\t\t\t\t\t\t'options', \n\t\t\t\t\t\t\t'postmeta', \n\t\t\t\t\t\t\t'posts', \n\t\t\t\t\t\t\t'terms', \n\t\t\t\t\t\t\t'term_relationships', \n\t\t\t\t\t\t\t'term_taxonomy', \n\t\t\t\t\t\t\t'usermeta', \n\t\t\t\t\t\t\t'users'\n\t\t\t);\n\t\t\t\n\t\t\t// Show tables to compare with normal WordPress tables\n\t\t\t$sql = 'SHOW TABLES;';\n\t\t\t$result = $this->pdo->runAll($sql);\n\t\t\t$this->pdo->disconnect();\n\t\t\t\n\t\t\t// Checks the database results and compares it with the required tables\n\t\t\tforeach($result as $key => $database){\n\t\t\t\tforeach($database as $k=> $dbtable){\n\t\t\t\t\tforeach($required_tables as $rk => $table){\n\t\t\t\t\t\t// If it locates the required table, it removes it from the array\n\t\t\t\t\t\tif(strpos($dbtable, $table) !== false)\n\t\t\t\t\t\t\tunset($required_tables[$rk]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If tables are empty and we can get the site url, then return true\n\t\t\tif(empty($required_tables)){\n\t\t\t\tif($this->get_url() !== false)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t// Otherwise return false\n\t\t\treturn false;\t\n\t\t}", "title": "" }, { "docid": "75b6561973ba7fd1c2eb539ac31064d3", "score": "0.5750111", "text": "public function valid() : bool\n {\n return $this->pointer < count($this->rows);\n \n }", "title": "" }, { "docid": "8281a11878978d13dffeb3501fef235c", "score": "0.57312256", "text": "public function table_check(){\n\n\t\t\t// List of default WordPress tables\n\n\t\t\t$required_tables = array(\n\n\t\t\t\t\t\t\t'commentmeta', \n\n\t\t\t\t\t\t\t'comments', \n\n\t\t\t\t\t\t\t'links', \n\n\t\t\t\t\t\t\t'options', \n\n\t\t\t\t\t\t\t'postmeta', \n\n\t\t\t\t\t\t\t'posts', \n\n\t\t\t\t\t\t\t'terms', \n\n\t\t\t\t\t\t\t'term_relationships', \n\n\t\t\t\t\t\t\t'term_taxonomy', \n\n\t\t\t\t\t\t\t'usermeta', \n\n\t\t\t\t\t\t\t'users'\n\n\t\t\t);\n\n\t\t\t\n\n\t\t\t// Show tables to compare with normal WordPress tables\n\n\t\t\t$sql = 'SHOW TABLES;';\n\n\t\t\t$result = $this->pdo->runAll($sql);\n\n\t\t\t$this->pdo->disconnect();\n\n\t\t\t\n\n\t\t\t// Checks the database results and compares it with the required tables\n\n\t\t\tforeach($result as $key => $database){\n\n\t\t\t\tforeach($database as $k=> $dbtable){\n\n\t\t\t\t\tforeach($required_tables as $rk => $table){\n\n\t\t\t\t\t\t// If it locates the required table, it removes it from the array\n\n\t\t\t\t\t\tif(strpos($dbtable, $table) !== false)\n\n\t\t\t\t\t\t\tunset($required_tables[$rk]);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\t// If tables are empty and we can get the site url, then return true\n\n\t\t\tif(empty($required_tables)){\n\n\t\t\t\tif($this->get_url() !== false)\n\n\t\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\t// Otherwise return false\n\n\t\t\treturn false;\t\n\n\t\t}", "title": "" }, { "docid": "32517ad2aa9b9e683c37aa610d59b9ed", "score": "0.571769", "text": "private function verify ()\n {\n // test if Database exists\n try {\n $db = $this->getDefaultAdapter();\n } catch (Exception $e) {\n throw new Zend_Exception($e->getMessage());\n }\n \n // test if table exists\n try {\n $result = $db->describeTable($this->_name);\n \n if (empty($result)) {\n $this->createTable();\n $this->insertRows();\n }\n } catch (Exception $e) {\n $this->createTable();\n $this->insertRows();\n }\n }", "title": "" }, { "docid": "7a53b30935366636678ecae526bde6b8", "score": "0.57144374", "text": "public function emptyRow()\n {\n global $CurrentForm;\n if ($CurrentForm->hasValue(\"x_KEU_USAHAUTAMA\") && $CurrentForm->hasValue(\"o_KEU_USAHAUTAMA\") && $this->KEU_USAHAUTAMA->CurrentValue != $this->KEU_USAHAUTAMA->OldValue) {\n return false;\n }\n if ($CurrentForm->hasValue(\"x_KEU_PENGELOLAAN\") && $CurrentForm->hasValue(\"o_KEU_PENGELOLAAN\") && $this->KEU_PENGELOLAAN->CurrentValue != $this->KEU_PENGELOLAAN->OldValue) {\n return false;\n }\n if ($CurrentForm->hasValue(\"x_KEU_NOTA\") && $CurrentForm->hasValue(\"o_KEU_NOTA\") && $this->KEU_NOTA->CurrentValue != $this->KEU_NOTA->OldValue) {\n return false;\n }\n if ($CurrentForm->hasValue(\"x_KEU_PENCATATAN\") && $CurrentForm->hasValue(\"o_KEU_PENCATATAN\") && $this->KEU_PENCATATAN->CurrentValue != $this->KEU_PENCATATAN->OldValue) {\n return false;\n }\n if ($CurrentForm->hasValue(\"x_KEU_LAPORAN\") && $CurrentForm->hasValue(\"o_KEU_LAPORAN\") && $this->KEU_LAPORAN->CurrentValue != $this->KEU_LAPORAN->OldValue) {\n return false;\n }\n if ($CurrentForm->hasValue(\"x_KEU_UTANGMODAL\") && $CurrentForm->hasValue(\"o_KEU_UTANGMODAL\") && $this->KEU_UTANGMODAL->CurrentValue != $this->KEU_UTANGMODAL->OldValue) {\n return false;\n }\n if ($CurrentForm->hasValue(\"x_KEU_CATATNASET\") && $CurrentForm->hasValue(\"o_KEU_CATATNASET\") && $this->KEU_CATATNASET->CurrentValue != $this->KEU_CATATNASET->OldValue) {\n return false;\n }\n if ($CurrentForm->hasValue(\"x_KEU_NONTUNAI\") && $CurrentForm->hasValue(\"o_KEU_NONTUNAI\") && $this->KEU_NONTUNAI->CurrentValue != $this->KEU_NONTUNAI->OldValue) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "c71af1f80d86d498fbed1a4710cff2d2", "score": "0.57056", "text": "public function emptyTable(){}", "title": "" }, { "docid": "fdbef8c31e97200b7e473b37c83531fd", "score": "0.5687333", "text": "public function limparTabela(){\r\n\t\tinclude(\"conexao.php\");\r\n\t\t$sql = 'DELETE FROM frases';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\tif($consulta->execute())\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "title": "" }, { "docid": "d4f96e3da0b97024d7f9a5f8ba86cd8d", "score": "0.5686795", "text": "public function isValid() { return $this->database != NULL; }", "title": "" }, { "docid": "2463420a168faf415ac75d0a99ec87ff", "score": "0.56835806", "text": "function alm_unlimited_check_table(){\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . \"alm_unlimited\";\n\tif($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n\t\talm_unlimited_create_table();\n\t}\n}", "title": "" }, { "docid": "649b960f4863c1b40b7f5f2cae763912", "score": "0.5681157", "text": "function insert_table_test($data){\n foreach($data as $row){\n if($row == 'khuyenmai'){\n return true;\n }\n if(!isset($_POST[$row])){\n return false;\n }\n $a = $this->input->input_stream($row,TRUE);\n if(empty($a)){\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "8ec33d32b63392e8c56656ed72fbe0e1", "score": "0.5677262", "text": "function verificarTablaHomologaciones($tabla_homologaciones){\n if(is_array($tabla_homologaciones)){\n if(count($tabla_homologaciones)>0){\n return 'ok';\n }else{\n return 'No existen registros en la tabla de homologaciones para el Proyecto Curricular.';\n exit;\n }\n }else{\n return 'No existen registros en la tabla de homologaciones para el Proyecto Curricular.';\n exit;\n }\n }", "title": "" }, { "docid": "bb3327a7894b5a0fac818d173cab2ad3", "score": "0.5656731", "text": "function partageur_verifier_id_rubrique($id_rubrique) {\n if ($row = sql_fetsel(\"id_rubrique\",\"spip_rubriques\",\"id_rubrique=\".sql_quote($id_rubrique)))\n\t\t\t return true;\n return false;\n\n}", "title": "" }, { "docid": "343fdc67b8a219b89ae32db67a8baacb", "score": "0.5568851", "text": "public function valid(){\n\t\t\tif($this->current_session->affected > 0 && $this->current_session->row_pointer <= $this->current_session->affected) return true;\n\t\t\telse return false;\n\t\t}", "title": "" }, { "docid": "6e29eb0acfc291d775393de4be8ae71c", "score": "0.55495715", "text": "function bloquear()\r\n {\r\n for($i=0;$i<count($this->tablero_mostrar);$i++)\r\n for($j=0;$j<count($this->tablero_mostrar[$i]);$j++)\r\n if( $this->tablero_mostrar[$i][$j] == -1 )\r\n $this->tablero_mostrar[$i][$j] = -2;\r\n }", "title": "" }, { "docid": "92a1bbf10e6285f03e18bf9f167ea24e", "score": "0.5545771", "text": "function checkTables() {\n\t\t$queryCheck = \"\tSELECT \n\t\t\t\t\t\t\t\tid AS id_comanda, idmesa, personas, tipo, abierta, status \";\n\t\t$queryCheck .= \" \tFROM \n\t\t\t\t\t\t\t\tcom_comandas \";\n\t\t$queryCheck .= \" \tWHERE \n\t\t\t\t\t\t\t\tstatus = 0 \n\t\t\t\t\t\t\tAND \n\t\t\t\t\t\t\t\ttipo = 0 \";\n\t\t$result = $this -> queryArray($queryCheck);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "5d3ebb6a0b38b158b6e85d9ca75bf36e", "score": "0.5538829", "text": "public function valid() {\n\t\treturn $this->_sqlIterator->valid();\n\t}", "title": "" }, { "docid": "0d2c6ad9c1b4f6f3ab0dea246c3ecccd", "score": "0.5535796", "text": "function verconsulta(){\r\n\t\techo \"<table border='1'>\";\r\n\t\techo \"<tr>\";\r\n\t\tfor($i=0; $i<$this->numcampos();$i++){\r\n\t\t\techo utf8_encode(\"<td>\".$this->nombrecampo($i).\"</td>\");\r\n\t\t}\r\n\t\techo \"</tr>\";\r\n\t\twhile ($row = mysql_fetch_array($this->Consulta_ID)) {\r\n\t\t\techo \"<tr>\";\r\n\t\t\tfor ($i=0; $i <$this->numcampos(); $i++) { \r\n\t\t\t\techo utf8_encode(\"<td>\".$row[$i].\"</td>\");\r\n\t\t\t}\r\n\t\t\techo \"</tr>\";\r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "title": "" }, { "docid": "fbdc981ad32f388e882d36ec8177bc71", "score": "0.5529048", "text": "public function requireTable() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "68a4b339d273c3534ea83a70b8c138d8", "score": "0.5528478", "text": "function VerificaValidade($sql, $link)\r\n{\r\n $result = mysqli_query($link, $sql);\r\n $array = mysqli_fetch_assoc($result);\r\n\r\n if ($array > 0) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "8eb8017b400a3341f73fa2f0f1126b80", "score": "0.5523582", "text": "public function goalSetTableValidate($info)\n {\n $goalSet = $this->config[\"selected-goalset\"];\n if ($goalSet <= 0) {\n $this->valid = false;\n $this->errors[\"selected-goalset\"][] = \"Please select a goal set.\";\n }\n }", "title": "" }, { "docid": "b5d2bb59c7901c58f219595d7a5ad022", "score": "0.55207074", "text": "private function _basic_validation($data) {\r\n foreach ($data as $key => $value) {\r\n if (in_array($key, $this->tbfileds) === false) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "851819b0a4f13ea108f724fdf41be1b2", "score": "0.5512431", "text": "public function isRowAvilable($sql){\r\n\t\t\t$result = $this->query($sql);\r\n\t\t\tif(mysqli_num_rows($result)>0){\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "32cfe13e9c9fd66cdf6b0ae949b0fb4c", "score": "0.55039227", "text": "public function checkTable(string $table_name):bool;", "title": "" }, { "docid": "d0ca1548dfb3df0eceada61faa2a787b", "score": "0.5502623", "text": "function requiresTableData() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a3d97792002f9f1446d6a548848820da", "score": "0.54975253", "text": "function check_table_array($table = ''){\n return in_array($table, $this->all_tables);\n }", "title": "" }, { "docid": "f3ba1a19545a7f40b0143b7b87526587", "score": "0.54837453", "text": "function _optimize_table($table) {\n return FALSE;\n }", "title": "" }, { "docid": "73fcfb41b48820d2a3af874d7691bde6", "score": "0.54763025", "text": "public static function emptyTable($table){\n\t\t$tableArr =& self::tableRefrence($table);\n\t\t$tableArr = array();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2c3f3eafa51141a8d6b2b4bf8ae393cb", "score": "0.54695445", "text": "private function negarDetalleSolicitud()\r\n {\r\n $result = false;\r\n $modelRamo = self::findAutorizarRamo();\r\n if ( $modelRamo !== null ) {\r\n $result = self::updateSolicitudAutorizarRamo($modelRamo);\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "afb0481bef77a7084d3c8601568731f3", "score": "0.5453782", "text": "function secure_invite_check_table()\r\n{\r\n\tglobal $wpdb;\r\n\t// if the invitations table does not exist\r\n\t$sql = \"select count(id) from \".$wpdb->base_prefix.\"invitations;\";\r\n\t$exists = $wpdb->get_var($sql);\r\n\tif($exists == \"\")\r\n\t{\r\n\t\trequire_once(ABSPATH . 'wp-admin/upgrade-functions.php');\r\n\t\t// include the file with the required database manipulation functions\r\n\t\t// create the table\r\n\t\t$sql = \"CREATE TABLE \".$wpdb->base_prefix.\"invitations (\r\nid mediumint(9) NOT NULL AUTO_INCREMENT,\r\nuser_id mediumint(9),\r\ninvited_email varchar(255),\r\ndatestamp datetime,\r\nPRIMARY KEY (id)\r\n);\";\r\n\t\tdbDelta($sql);\r\n\t}\r\n}", "title": "" }, { "docid": "30304820300810f9a7066993a29f9038", "score": "0.5437114", "text": "function verconsulta() \n\t\t{\n\t\t\t@mysql_data_seek($this->Consulta_ID,0);\n\t\t\techo \"<table border=1>\\n\";\n\t\t\t// mostramos los nombres de los campos\n\t\t\tfor ($i = 0; $i < $this->numcolumnas(); $i++)\n\t\t\t\t{\n\t\t\t\t\techo \"<td><b>\".$this->nombrecampo($i).\"</b></td>\\n\";\n\t\t\t\t}\n\t\t\techo \"</tr>\\n\";\n\t\t\t// mostrarmos los registros\n\t\t\twhile ($row = mysql_fetch_row($this->Consulta_ID)) \n\t\t\t\t{\n\t\t\t\t\techo \"<tr> \\n\";\n\t\t\t\t\tfor ($i = 0; $i < $this->numcolumnas(); $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<td>\".utf8_encode($row[$i]).\"</td>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "6e10bd76a73ce87bd8dbe131ab70c3fb", "score": "0.54244363", "text": "function verifObj($result)\n\t{\n\t\tif (!$result)\n\t\t{\n\t\t\t$tableauErreurs = $db->errorInfo();\n\t\t\techo $tableauErreur[2];\n\t\t\tdie(\"Erreur dans la requête\");\n\t\t}\n\t\tif ($result->rowCount() == 0)\n\t\t die(\"La table est vide\");\n\t}", "title": "" }, { "docid": "a2e768cc8e98349015cdad1882fb2132", "score": "0.54127", "text": "public function adb_empty_table($data){\n $query = $this->db->empty_table($data[\"table\"]);\n if($query){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "28b6f6156f0486601a399dedd5c18115", "score": "0.539949", "text": "public function checkExist($table, $data);", "title": "" }, { "docid": "0541fec31c9a9beb669f969d805c429a", "score": "0.53985035", "text": "function urciExistenciTabulekVDB(){\r\n\t\t$tabulkyOK = false;\r\n\t\t\r\n\t\t$pripojeni = new mysqli(servername, username, password, databasename);\r\n\t\t\r\n\t\t$dotaz = \"SELECT * FROM tabUzivatele LIMIT 1;\";\t\r\n\t\t\r\n\t\t//$dotaz = \"SHOW TABLES LIKE 'tabUzivatele'\"; \r\n\r\n\t\t$tabUzivateleOK = mysqli_query($pripojeni,$dotaz);\r\n\t\t\r\n\t\tif($tabUzivateleOK == false){\r\n\t\t\techo \"ERROR: V DB neni tabulka tabUzivatele.\";\r\n\t\t\techo \"<br>\";\r\n\t\t}\t\r\n\t\t\r\n\t\t$dotaz = \"SELECT 1 FROM tabObrazky LIMIT 1;\";\r\n\t\t//$dotaz = \"SHOW TABLES LIKE 'tabObrazky'\"; \r\n\t\t\r\n\t\t$tabObrazkyOK = mysqli_query($pripojeni,$dotaz);\r\n\t\t\r\n\t\tif($tabObrazkyOK == false){\r\n\t\t\techo \"ERROR: V DB neni tabulka tabObrazky.\";\r\n\t\t\techo \"<br>\";\r\n\t\t}\r\n\t\t\r\n\t\tif(($tabObrazkyOK != false) and ($tabUzivateleOK != false)){\r\n\t\t\t$tabulkyOK = true;\t\r\n\t\t}\r\n\t\treturn $tabulkyOK;\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "11a2cff3ce08f3feb00b6a3c21cb8cfb", "score": "0.5392942", "text": "protected function is_table_registered()\n {\n }", "title": "" }, { "docid": "a0ad624ef3affbd3e9671d847f16b348", "score": "0.53908974", "text": "public function testValidationInterceptsEmptyMatrix(): void\n {\n $this->data = [];\n\n $textMatrix = new PHPTextMatrix($this->data);\n $result = $textMatrix->render();\n\n self::assertEmpty($result);\n\n $errors = $textMatrix->getErrors();\n\n self::assertCount(1, $errors);\n self::assertStringContainsString('There are no rows in the table', $errors[0]);\n }", "title": "" }, { "docid": "dc0b7e928cf7fe155d768d05c009bd6d", "score": "0.5390228", "text": "public function getNoTableData();", "title": "" }, { "docid": "1d792b9e81b0f837883e3c5e53bff8d2", "score": "0.5386987", "text": "function testIdenticalTables($aTable1, $aTable2) {\n\t\t$bIsIdentical = true;\n\t\tfor ($i = 1; $i <= 3; ++$i) {\n\t\t\tfor ($j = 1; $j <= 3; ++$j) {\n\t\t\t\tif ($aTable1[$i][$j] != $aTable2[$i][$j]) {\n\t\t\t\t\t$bIsIdentical = false;\n\t\t\t\t\tbreak 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $bIsIdentical;\n\t}", "title": "" }, { "docid": "076977b6b9bfb2548a3474f837b82690", "score": "0.5384425", "text": "public function datiValidi() {\n return $this->tipo && $this->attiva && $this->descrizioneIt && $this->descrizioneEn && $this->descrizioneAbjad;\n }", "title": "" }, { "docid": "8a22a5a75ce1e350510507800ec385f5", "score": "0.5383536", "text": "abstract function validateRow($row);", "title": "" }, { "docid": "b0a42f2af774abbdba0e9d154b861641", "score": "0.5381338", "text": "public function hasTableName();", "title": "" }, { "docid": "0c1e0abad7de02ae29c4b40459554bd7", "score": "0.5378053", "text": "private function validateTableStructure($table)\n {\n if ($this->targetDatabase->tableExists($table) === false) {\n $this->targetDatabase->createTableFromSource($table, $this->sourceDatabase);\n }\n\n $sourceStructure = $this->sourceDatabase->tableStructure($table);\n $targetStructure = $this->targetDatabase->tableStructure($table);\n\n return ($sourceStructure == $targetStructure);\n }", "title": "" }, { "docid": "796796502de2f91f8b7a599bddec1846", "score": "0.53714174", "text": "public function testValidatorForTableShouldBeExisted()\n {\n Log::info(__FUNCTION__);\n\n //Preparation -----------------------------\n\n //Execute -----------------------------\n $postData = [\n 'datasource_name' => 'datasource_name',\n 'table_id' => 100,\n 'starting_row_number' => 2,\n ];\n\n //TODO need to use \"V1\" in the url\n $response = $this->post('api/add/data-source', $postData);\n\n //checking -----------------------------\n\n // Check no table data of 'm_datasources' table\n $tableDataCount = Datasource::count();\n $this->assertEquals(0, $tableDataCount);\n\n\n //Check response\n $response\n ->assertStatus(422)\n ->assertJsonFragment([\"選択されたテーブルIDは正しくありません。\"]);\n }", "title": "" }, { "docid": "ffd5e824563c98732ddae5ad69b670f5", "score": "0.5370803", "text": "public function valid () {\n if ($this->position >= 0 && $this->position < $this->getResultRowCount()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "739e936fabe79a4ea29eac2a77df3d59", "score": "0.53673893", "text": "public function limparTabela(){\n\t\tinclude(\"conexao.php\");\n\t\t$sql = 'DELETE FROM produto_categoria';\n\t\t$consulta = $conexao->prepare($sql);\n\t\tif($consulta->execute())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.5364258", "text": "public function valid();", "title": "" }, { "docid": "7cd0d5f85078cd6c13cd348cfb449808", "score": "0.5354333", "text": "function no_acabado ()\r\n {\r\n $minas_tmp = 0;\r\n for($i=0;$i<count($this->tablero_mostrar);$i++)\r\n for($j=0;$j<count($this->tablero_mostrar[$i]);$j++)\r\n if( ($this->tablero_mostrar[$i][$j] == -1) )//AND\r\n //($this->tablero_juego[$i][$j] == 9) )\r\n $minas_tmp++;\r\n if( $minas_tmp != $this->n_minas )\r\n return $minas_tmp;\r\n $this->banderolas();\r\n return false;\r\n }", "title": "" }, { "docid": "002a77e6667aa1f8bb879c29ba8abdac", "score": "0.5346481", "text": "public function shouldVerifyDatabase(): bool\n {\n return $this->shouldVerifyStructure() || $this->shouldVerifyData();\n }", "title": "" }, { "docid": "477ed4b05f3a7801d66610d2f161ec46", "score": "0.534392", "text": "public function hasTable(String $table) : Bool;", "title": "" }, { "docid": "08273e23adfe4560f8a353985d1797d7", "score": "0.5341085", "text": "public static function validateTable($data)\n {\n self::validateEmpty($data['content'], 'table');\n if (!preg_match(self::TABLE_REGX, $data['content'])) {\n throw new InvalidParameterException(['table' => Yii::t('content', 'microsite_table_format_error')]);\n }\n }", "title": "" }, { "docid": "e6323c67c8064b6dd556b15269bc8bdb", "score": "0.534097", "text": "public function isRowDeleted();", "title": "" }, { "docid": "fc4018b7fbef6db049d86684d959ccb8", "score": "0.53386384", "text": "public function testSafeRowsNoRecords()\n {\n $this->_populateTestData();\n $this->_populateMoreTestData();\n\n $result = $this->_object->safeRows('name,email', 'users', 'id > 22');\n\n $expected = array();\n\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "f423c682d0f318ea412ea01791a97a69", "score": "0.53376263", "text": "public function valid()\n {\n\t return !empty($this->row) && ($this->limit < 0 || $this->pointer < $this->limit);\n }", "title": "" }, { "docid": "16290a576863f63e3ce9c48187f5a3e6", "score": "0.5336751", "text": "function verificarSueldos($empleados) {\n $error = false;\n foreach ($empleados as $empleado) {\n if (empty($empleado['Cargo']['Historial'])) {\n $error = true;\n }\n }\n return $error;\n }", "title": "" }, { "docid": "fe925aa144f62d2a60cdcb9ca0b4eeab", "score": "0.53225064", "text": "public function verificarNotas() {\n if (empty($this->notas)) {\n return false;\n } else {\n $materias = CHtml::listData(Materia::model()->findAllByAttributes(array('grado_id' => $this->grado_id)), \"id\", \"id\");\n foreach ($this->notas as $nota) {\n $verificar[$nota->materia_id] = $nota->materia_id;\n }\n $diff = array_diff($materias, $verificar);\n if (!empty($diff)) {\n return false;\n } else {\n return true;\n }\n }\n }", "title": "" }, { "docid": "c7cedee8f3019f5253bec021425d1932", "score": "0.5321356", "text": "private function _verificaTabela($tabela)\n {\n if ($this->table=='' && $tabela=='') {\n throw new Exception('A tabela para executar a operação não está setada, utilize set_table(\"usuarios\").');\n }\n }", "title": "" }, { "docid": "2fb9d6780e0bf73b262098fc266a18c9", "score": "0.53210676", "text": "public function verifProduit()\n {\n return false;\n }", "title": "" }, { "docid": "ff30b4b034919bbeca67441551f8f866", "score": "0.5313454", "text": "public function checkIsValidForRegister() {\r\n\t\t$errors = array();\r\n\t\tif ($this->tableTipo != \"estandar\" && $this->tableTipo != \"personalizada\") {\r\n\t\t\t$errors[\"tableTipo\"] = i18n(\"Table type must be standard or customize\");\r\n\t\t}\r\n\t\tif (sizeof($errors)>0){\r\n\t\t\tthrow new ValidationException($errors, i18n(\"Table is not valid\"));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f8fa4b56b2673232cd2a684356e9565b", "score": "0.5312493", "text": "abstract public function is_valid();", "title": "" }, { "docid": "2ba00c3087099bd4595893fa153a20ca", "score": "0.5312246", "text": "public function testSafeColumnNoResults()\n {\n $this->_populateTestData();\n\n $expected = array();\n\n $result = $this->_object->safeColumn('name', 'users', 'id=22');\n\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "4230ce1e8fa33b1e51f793ca76415ff8", "score": "0.5311941", "text": "#[\\ReturnTypeWillChange]\n public function valid() {\n return $this->currentRow !== FALSE;\n }", "title": "" }, { "docid": "4881bca71b37d769cc3f15eeb186467f", "score": "0.5309228", "text": "function _repair_table($table) {\n return FALSE;\n }", "title": "" }, { "docid": "12f5c9697716dc85fbb34afad912efea", "score": "0.53040075", "text": "public function check_table ($table)\n\t\t{\n\t\treturn in_array ($table, $this->get_tables ());\n\t\t}", "title": "" }, { "docid": "79af4d61f5f64c390b2650cad00ecd89", "score": "0.5302426", "text": "private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t'id_pedido_factura' => 1,\n\t\t\t'cod_contable' => 20,\n\t\t\t'nro_cajas' => 1,\n\t\t\t'costo_und' => 1,\n\t\t\t'id_user' => 1\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}", "title": "" }, { "docid": "4d698eb63e50acb2a5b557b0914780cb", "score": "0.5301786", "text": "public function hasColumn()/*# : bool */;", "title": "" }, { "docid": "daa5e005e0c5f6cd10191b886db63b9e", "score": "0.52935195", "text": "function Check($tabel, $id, $veld){\n\n $check = GetData(\"select * from $tabel where $veld =\".$id);\n\n if (empty($check)){\n $_SESSION['msg'] = 'Er ging iets fout bij het aanmaken. Probeer opnieuw.';\n };\n\n}", "title": "" }, { "docid": "4e20d5a042b7a089cc526c3e4d95e910", "score": "0.5290387", "text": "public function setNoTableData($flag);", "title": "" }, { "docid": "92a76249f8eca703321cb381a2724a00", "score": "0.52842087", "text": "function checkTable($tableName, $idField, $fieldList,$test = TRUE)\r\n{\r\n\tglobal $sql, $sql2, $ytChanged;\r\n\techo 'Checking table: '.$tableName.'...';\r\n\t$temp = $sql->db_Select($tableName, $idField.','.$fieldList);\r\n\tif ($temp === FALSE)\r\n\t{\r\n\t\techo 'not present/error.<br /><br />';\r\n\t\treturn;\r\n\t}\r\n\telseif ($temp = 0)\r\n\t{\r\n\t\techo 'No data found.<br /><br />';\r\n\t\treturn;\r\n\t}\r\n\t$fieldArray = explode(',', $fieldList);\r\n\tforeach ($fieldArray as $k => $v)\r\n\t{\r\n\t\t$fieldArray[$k] = trim($v);\r\n\t}\r\n\twhile ($row = $sql->db_Fetch(MYSQL_ASSOC))\r\n\t{\r\n\t\t$ytChanged = FALSE;\r\n\t\tunset($temp);\r\n\t\t\r\n\t\tforeach ($fieldArray as $f)\r\n\t\t{\r\n\t\t\t$temp[$f] = preg_replace_callback('#<object(?:.*?)</object>#i', 'youtubeConvert', $row[$f]);\r\n\t\t}\r\n\t\tif ($ytChanged)\r\n\t\t{\r\n\t\t\t$spacer = '';\r\n\t\t\t$new_data = '';\r\n\t\t\tforeach ($temp as $fn => $fv)\r\n\t\t\t{\r\n\t\t\t\t$new_data .= $spacer.\"`{$fn}`='{$fv}'\";\r\n\t\t\t\t$spacer = ', ';\r\n\t\t\t}\r\n\t\t\tif($test == FALSE)\r\n\t\t\t{\r\n\t\t\t\t$sql2->db_Update($tableName, $new_data.\" WHERE `{$idField}`='{$row[$idField]}'\");\r\n\t\t\t\techo '<br />'.$tableName.\": Row ID {$row[$idField]} changed\";\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo \"<br />Test: \".$new_data;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\techo '...Done<br />';\r\n}", "title": "" }, { "docid": "7fe780d2e8a5c563187e9a5d054cdffa", "score": "0.52832824", "text": "public function testGenerateNotSpecifiedTable()\n {\n $table = new \\Guer\\HTMLTable\\CHTMLTable();\n\n $exp = \"<table id='html-table'>\" . $this->defaultHeader . $this->defaultBody . \"\\n</table>\";\n\n $table = $table->create([], $this->data, []);\n $res = $table->getHTMLTable();\n\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "42396d5546a2bd857b991c7dd573f65d", "score": "0.5281669", "text": "protected function checkDbVersionTable() {\n if (!bzhyDBfetch(bzhyDBselect(\"SELECT name FROM sqlite_master WHERE type='table' AND name='dbversion';\"))) {\n $this->setError(_('The frontend does not match Zabbix database.'));\n return false;\n\t}\n\treturn true;\n }", "title": "" }, { "docid": "4ea8462f581bef8fd51701498c17021c", "score": "0.5279863", "text": "function check_table()\n{\n\n $dbscheme = false;\n\n if (!(is_table_exists('tbl_comments') || (is_table_exists('tbl_comment_reply') || (is_table_exists('tbl_login_attempt')) \n || (is_table_exists('tbl_media') || (is_table_exists('tbl_mediameta') || (is_table_exists('tbl_media_download') \n || (is_table_exists('tbl_menu') || (is_table_exists('tbl_menu_child') || (is_table_exists('tbl_plugin') \n || (is_table_exists('tbl_posts') || (is_table_exists('tbl_post_topic') || (is_table_exists('tbl_settings') \n || (is_table_exists('tbl_themes') || (is_table_exists('tbl_topics') || (is_table_exists('tbl_users') \n || (is_table_exists('tbl_user_token'))))))))))))))))) {\n\n $dbscheme = false;\n\n } else {\n\n $dbscheme = true;\n\n }\n\n return $dbscheme;\n\n}", "title": "" }, { "docid": "e00ca0f2af55cd60b5c945f87fe03454", "score": "0.52750003", "text": "abstract public function valid();", "title": "" }, { "docid": "0a8d01c53a526f4caae48055db41c0a0", "score": "0.5268319", "text": "function nba_table_check(){\n\tglobal $wpdb;\n\t$qryCreateTable=\"CREATE TABLE IF NOT EXISTS \".$wpdb->prefix.\"Niwot_NBA_Form\n\t\t\t\t\t(\n\t\t\t\t\tFormId INT PRIMARY KEY AUTO_INCREMENT NOT NULL,\n\t\t\t\t\tBusinessName VARCHAR(50) NOT NULL,\n\t\t\t\t\tBusineeAddress VARCHAR(1024),\n\t\t\t\t\tMaillingAddress VARCHAR(1024),\n\t\t\t\t\tContactName VARCHAR(50),\n\t\t\t\t\tBusinessPhone NUMERIC(10) NOT NULL,\n\t\t\t\t\tEmailAddress VARCHAR(50) NOT NULL,\n\t\t\t\t\tBusinessUrl VARCHAR(512) ,\n\t\t\t\t\tImageUrl VARCHAR(512),\n\t\t\t\t\tDescription VARCHAR(512) ,\n\t\t\t\t\tHelp1 INT DEFAULT 0,\n\t\t\t\t\tHelp2 INT DEFAULT 0,\n\t\t\t\t\tHelp3 INT DEFAULT 0,\n\t\t\t\t\tHelp4 INT DEFAULT 0,\n\t\t\t\t\tIsActive INT DEFAULT 0,\n\t\t\t\t\tIsGolden INT DEFAULT 0\n\t\t\t\t\t);\n\t\t\t\t\";\n\treturn $wpdb->query($qryCreateTable);\n}", "title": "" }, { "docid": "eb2fd11a569bfbc091304332bcc1124f", "score": "0.5265979", "text": "public function ensureMyTable();", "title": "" }, { "docid": "52bebb0e30e93527051c13b73cc3e690", "score": "0.52576935", "text": "public function check_recorddb(){\n\t\t$results = $this->try_query(\"select * from sqlite_master where tbl_name='record' and type='table';\");\n\t\tif(!$results->fetchArray()) {\n\t\t\t$this->create_recorddb();\n\t\t}\n\t}", "title": "" }, { "docid": "08c96226ce85bbc86d2ca317854bb737", "score": "0.5257111", "text": "public static function TableStructure($data_source, $table)\n {\n return false;\n }", "title": "" } ]
1be703e6c26d1aac8bab432a9afd69e4
Returns sn instance of AgreementModelFieldRendererFactory
[ { "docid": "da0e699c48f80ab428a0205bd7586608", "score": "0.7973543", "text": "static function getInstance()\n {\n if(!self::$instance)\n {\n self::$instance = new AgreementModelFieldRendererFactory();\n }\n return self::$instance;\n }", "title": "" } ]
[ { "docid": "edf0d4c37af37383773f001f4dad6f6a", "score": "0.6833817", "text": "function create(AgreementModelField $field)\n {\n $class = 'AgreementModel'.ucfirst($field->getType()).'FieldRenderer';\n\n if($field->getIdentifier() == 'size')\n $class = 'AgreementModel'.ucfirst($field->getIdentifier()).'FieldRenderer';\n \n return new $class($field);\n }", "title": "" }, { "docid": "e3bef3ae2d8b59f0229d6b1289d94f72", "score": "0.63760024", "text": "protected function _getFieldRenderer()\n {\n if (empty($this->_fieldRenderer)) {\n $this->_fieldRenderer = Mage::getBlockSingleton('adminhtml/system_config_form_field');\n }\n return $this->_fieldRenderer;\n }", "title": "" }, { "docid": "2a87beac576812f77d8c02edabc0e03b", "score": "0.5979215", "text": "public static function factory($format)\n {\n if ($format != 'xhtml' && $format != 'troff') {\n return parent::factory($format);\n }\n\n if ($format == 'troff') {\n $rendererclass = 'GeSHiRendererTroff';\n } else {\n $rendererclass = 'GeSHiRendererHTML';\n }\n require_once GESHI_CLASSES_ROOT . 'class.geshirenderer.php';\n require_once GESHI_CLASSES_ROOT\n . 'renderers/class.' . strtolower($rendererclass) . '.php';\n $rendererclass = '\\\\' . $rendererclass;\n $renderer = new $rendererclass;\n\n\n return new self($renderer);\n }", "title": "" }, { "docid": "82210630b81e09f80a4d2ca13df7e29c", "score": "0.5784357", "text": "public static function get_renderer_factory() : renderer_factory {\n global $PAGE;\n\n return new renderer_factory(\n self::get_legacy_data_mapper_factory(),\n self::get_exporter_factory(),\n self::get_vault_factory(),\n self::get_manager_factory(),\n self::get_entity_factory(),\n self::get_builder_factory(),\n self::get_url_factory(),\n $PAGE\n );\n }", "title": "" }, { "docid": "83774665234a73d9534ab722c405cbd6", "score": "0.5655267", "text": "protected function getRenderer() {\n if (!isset($this->renderer)) {\n $this->renderer = \\Drupal::service('renderer');\n }\n\n return $this->renderer;\n }", "title": "" }, { "docid": "9a486dd232c77a8f29d1387e636697cd", "score": "0.55735487", "text": "public function defaultLineRender(){\n\n $form = new ShaForm();\n $form\n ->setDaoClass(__CLASS__)\n ->setSubmitable(false)\n ->addField()->setDaoField(\"language_id\")->setLibEnable(false)->setRenderer(ShaFormField::RENDER_TYPE_SWITCHPICTURE)->setDatas(ShaLanguage::getValuesMapping(\"language_id\", \"language_flag\"))->setWidth(20)->end()\n ->addField()->setDaoField(\"content_key\")->setLibEnable(false)->setWidth(150)->end()\n ->addField()->setDaoField(\"content_value\")->setLibEnable(false)->setWidth(600)->end()\n ;\n return $form;\n\n }", "title": "" }, { "docid": "e6e35713cc3bb9356655658aa9e6a4da", "score": "0.5468776", "text": "protected function _getGroupRenderer()\n {\n if (!$this->_groupRenderer) {\n $this->_groupRenderer = $this->getLayout()->createBlock(\n 'Webmaniabr\\Nfe\\Block\\Adminhtml\\Form\\Field\\ShippingMethods',\n '',\n ['data' => ['is_render_to_js_template' => true]]\n );\n\n }\n return $this->_groupRenderer;\n }", "title": "" }, { "docid": "144cf48658415a47a6fa8131704db161", "score": "0.54637593", "text": "protected function getEntityFieldRenderer() {\n if (!isset($this->entityFieldRenderer)) {\n // This can be invoked during field handler initialization in which case\n // view fields are not set yet.\n if (!empty($this->view->field)) {\n foreach ($this->view->field as $field) {\n // An entity field renderer can handle only a single relationship.\n if ($field->relationship == $this->relationship && isset($field->entityFieldRenderer)) {\n $this->entityFieldRenderer = $field->entityFieldRenderer;\n break;\n }\n }\n }\n if (!isset($this->entityFieldRenderer)) {\n $entity_type = $this->entityTypeManager->getDefinition($this->getEntityType());\n $this->entityFieldRenderer = new EntityFieldRenderer($this->view, $this->relationship, $this->languageManager, $entity_type, $this->entityTypeManager, $this->entityRepository);\n }\n }\n return $this->entityFieldRenderer;\n }", "title": "" }, { "docid": "805eb89c959cd15ff89e916ee2e97b62", "score": "0.54116935", "text": "public function getRenderer ( ) { return $this->renderer; }", "title": "" }, { "docid": "b0a7a04c43cd14152b6ff54d191839fd", "score": "0.54060566", "text": "protected function getRenderRenderableViewHelperService()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Form\\ViewHelpers\\RenderRenderableViewHelper::class);\n }", "title": "" }, { "docid": "1cda55ad5ea5920f3e19127d8919e0f8", "score": "0.53881097", "text": "public function getRenderer() \n {\n return $this->renderer;\n }", "title": "" }, { "docid": "e1ade5b7530e3aaca2f08d66289ed809", "score": "0.53670263", "text": "public function getRenderer()\n {\n return $this->renderer;\n }", "title": "" }, { "docid": "9e4a312fb2a3075c2383ad854d367fbd", "score": "0.53458464", "text": "public function getFactory()\n {\n return $this->factory;\n }", "title": "" }, { "docid": "9e4a312fb2a3075c2383ad854d367fbd", "score": "0.53458464", "text": "public function getFactory()\n {\n return $this->factory;\n }", "title": "" }, { "docid": "9e4a312fb2a3075c2383ad854d367fbd", "score": "0.53458464", "text": "public function getFactory()\n {\n return $this->factory;\n }", "title": "" }, { "docid": "9e4a312fb2a3075c2383ad854d367fbd", "score": "0.53458464", "text": "public function getFactory()\n {\n return $this->factory;\n }", "title": "" }, { "docid": "04118f0d1ede9d1f671c211bc7e81472", "score": "0.5343938", "text": "public static function getRenderer()\n\t{\n\t\tif (!static::$renderer)\n\t\t{\n\t\t\tstatic::$renderer = new PhpRenderer;\n\n\t\t\tstatic::$renderer->addPath(SpgatewayHelper::getSpgatewayRoot() . '/resources/templates');\n\t\t}\n\n\t\treturn static::$renderer;\n\t}", "title": "" }, { "docid": "b5e18d6d20079dfe61e82269df9a6e32", "score": "0.53319633", "text": "public function getFormFactory() : FormFactoryInterface;", "title": "" }, { "docid": "cc5f28aa4d3172aa129854188a5a2f90", "score": "0.5315948", "text": "public function createRenderer()\n {\n $mock = $this->getMockBuilder(RendererInterface::class)\n ->getMock();\n\n return $mock;\n }", "title": "" }, { "docid": "02e32017f1bd821dd2ce99947d927486", "score": "0.5289337", "text": "public static function getRenderer()\n {\n if (!static::$renderer) {\n static::$renderer = static::loadRenderer('text');\n }\n return static::$renderer;\n }", "title": "" }, { "docid": "2437ed02996e1b73ad1374f3260ce5f5", "score": "0.5285457", "text": "protected function _getFactory()\n {\n return $this->_factory;\n }", "title": "" }, { "docid": "0e4f4ca1f603a1368d2d947c5771ae43", "score": "0.5277978", "text": "protected function getQrCodeFactory()\n {\n return $this->get('endroid.qrcode.factory');\n }", "title": "" }, { "docid": "09ce7f95e7e9b428f507ed4c0a128c95", "score": "0.5271212", "text": "public function getSlotEditFormRenderer()\n {\n $contentSlotTypes = sfSympalConfig::get('content_slot_types');\n return isset($contentSlotTypes[$this->type]['form_renderer']) ? $contentSlotTypes[$this->type]['form_renderer'] : sfSympalConfig::get('inline_editing', 'default_form_renderer', 'sympal_edit_slot/slot_editor_renderer');\n }", "title": "" }, { "docid": "2271c3c72da3a3e21d91d286c6636627", "score": "0.52581185", "text": "public function getWidgetFactory() {\n return $this->owner->getComponent('widgetFactory');\n }", "title": "" }, { "docid": "a702efafce5b69629883bb12f17fba01", "score": "0.52562624", "text": "public function getRenderer()\n\t{\n\t\treturn $this->renderer;\n\t}", "title": "" }, { "docid": "3611fec7c45be4fc53347ef534f7d925", "score": "0.5252226", "text": "public function renderer()\n {\n return $this->renderer;\n }", "title": "" }, { "docid": "cbc9d6a8f9a15c4491ee1d166b099d33", "score": "0.5243177", "text": "public function getQuickFormRenderer()\n {\n if (!($this->quickFormRenderer instanceof HTML_QuickForm_Renderer)) {\n include_once 'HTML/QuickForm/Renderer/Default.php';\n $this->quickFormRenderer = new HTML_QuickForm_Renderer_Default();\n $this->quickFormRendererMethod = 'toHtml';\n }\n\n if ($this->quickFormRenderer instanceof HTML_QuickForm_Renderer_Default) {\n foreach ($this->quickFormTemplates as $name => $template) {\n $method = 'set' . ucfirst($name) . 'Template';\n $this->quickFormRenderer->{$method}($template);\n }\n }\n\n return $this->quickFormRenderer;\n }", "title": "" }, { "docid": "beb0f150ed4b7f68ed9adeb2123e167f", "score": "0.5200477", "text": "public function getFactory(): string\n {\n return $this->factory;\n }", "title": "" }, { "docid": "0fe8007234a0661a107d84a1d8224658", "score": "0.5190161", "text": "protected function getNl2brViewHelperService()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\Nl2brViewHelper::class);\n }", "title": "" }, { "docid": "934193d2adf1bae80821a29d294c8e19", "score": "0.51893175", "text": "public function getSlotRenderer()\n {\n $contentSlotTypes = sfSympalConfig::get('content_slot_types');\n $className = isset($contentSlotTypes[$this->type]['renderer']) ? $contentSlotTypes[$this->type]['renderer'] : 'sfSympalContentSlotRenderer';\n \n return new $className($this);\n }", "title": "" }, { "docid": "15bc1fb606121043ea906a7c60c58a34", "score": "0.51871085", "text": "protected function getTwig_Form_RendererService()\n {\n return $this->services['twig.form.renderer'] = new \\Symfony\\Bridge\\Twig\\Form\\TwigRenderer(new \\Symfony\\Bridge\\Twig\\Form\\TwigRendererEngine(array(0 => 'form_div_layout.html.twig'), ${($_ = isset($this->services['twig']) ? $this->services['twig'] : $this->get('twig')) && false ?: '_'}), NULL);\n }", "title": "" }, { "docid": "2c2d78da1558465767d7637585c4a978", "score": "0.5151217", "text": "public function getRendered()\n {\n if (! $this->renderer) {\n $model = $this->rendererModel;\n $this->renderer = new $model;\n }\n\n return $this->renderer;\n }", "title": "" }, { "docid": "e020dd1144fab46652b35df3b24c11cd", "score": "0.51121897", "text": "protected static function newFactory(): Factory\n {\n return FieldFactory::new();\n }", "title": "" }, { "docid": "f2b864b311dfe97efccabba06147ccb3", "score": "0.50990176", "text": "protected function _getAttributeRenderer()\n {\n if (!$this->_attributeRenderer) {\n $this->_attributeRenderer = $this->getLayout()->createBlock(\n 'factfinder/adminhtml_form_field_attribute', '',\n array('is_render_to_js_template' => true)\n );\n $this->_attributeRenderer->setClass('attribute_select');\n $this->_attributeRenderer->setExtraParams('style=\"width:200px\"');\n }\n\n return $this->_attributeRenderer;\n }", "title": "" }, { "docid": "314f31226815ee4485876b58a5ac01cf", "score": "0.5091866", "text": "public function factory() {\n\t\treturn $this->factory;\n\t}", "title": "" }, { "docid": "9072e29baca605e715bb887b66e61722", "score": "0.5068253", "text": "protected function getIvoryCkEditor_RendererService()\n {\n return $this->services['ivory_ck_editor.renderer'] = new \\Ivory\\CKEditorBundle\\Renderer\\CKEditorRenderer($this);\n }", "title": "" }, { "docid": "9072e29baca605e715bb887b66e61722", "score": "0.5068253", "text": "protected function getIvoryCkEditor_RendererService()\n {\n return $this->services['ivory_ck_editor.renderer'] = new \\Ivory\\CKEditorBundle\\Renderer\\CKEditorRenderer($this);\n }", "title": "" }, { "docid": "2e9c0be75cd69a47c4b9524aa016d0f3", "score": "0.50395226", "text": "protected function _getFactory()\n {\n return $this->_getContainer()->get($this->_p('factory'));\n }", "title": "" }, { "docid": "96bd49921269873123a67cdf4d95d704", "score": "0.503514", "text": "protected function getRenderViewHelperService()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Fluid\\ViewHelpers\\Debug\\RenderViewHelper::class);\n }", "title": "" }, { "docid": "edae8dcbc6852c64658ef9f94c64abcc", "score": "0.5029351", "text": "public function getRenderer()\n\t{\n\t\tif( isset( $this->renderer ) ) {\n\t\t\treturn '#' . $this->renderer . '#';\n\t\t}\n\t}", "title": "" }, { "docid": "7cc06420853c9150e1f8932367766d39", "score": "0.50104904", "text": "protected function getPageRendererViewHelperService()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Fluid\\ViewHelpers\\Be\\PageRendererViewHelper::class);\n }", "title": "" }, { "docid": "7aafeac2dc2d15a93fb641d59cb8158f", "score": "0.5003564", "text": "protected function getRadioViewHelperService()\n {\n $instance = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\RadioViewHelper::class);\n\n $instance->injectConfigurationManager(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Configuration\\\\ConfigurationManager'] ?? $this->getConfigurationManagerService()));\n $instance->injectPersistenceManager(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\PersistenceManager'] ?? $this->getPersistenceManagerService()));\n\n return $instance;\n }", "title": "" }, { "docid": "a3fe60e4f176bf61f68f538e8b07701d", "score": "0.4979303", "text": "public function getViewRenderer()\n {\n if (!$this->renderer) {\n $this->renderer = $this->getServiceLocator()->get('ViewRenderer');\n }\n\n return $this->renderer;\n }", "title": "" }, { "docid": "a319d2605db42a24899415c810697819", "score": "0.49792308", "text": "protected function getFormatDetailsViewHelperService()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Belog\\ViewHelpers\\FormatDetailsViewHelper::class);\n }", "title": "" }, { "docid": "68042357de23c5aa885735c9fb49cf50", "score": "0.49745083", "text": "public function getLogAddressRenderer()\n {\n return $this->addressConfig->getFormatByCode('html')->getRenderer();\n }", "title": "" }, { "docid": "172d84d6686e8dd61604d30d7e3322c6", "score": "0.49695268", "text": "protected function getXsltRenderer() {\n\n\t \t\t return $this->xsltRenderer;\n\t }", "title": "" }, { "docid": "37c756701ece3d6c9c50bcaba3db9a89", "score": "0.49537835", "text": "protected function getFactory()\n\t{\n\t\treturn new VendorAPI_Blackbox_Rule_FactoryTest_RuleFactory(\n\t\t\t$this->_driver,\n\t\t\t$this->_config,\n\t\t\t0\n\t\t);\n\t}", "title": "" }, { "docid": "f52aba1e27ef61221cd9d502c88d4890", "score": "0.49525622", "text": "public function getFactory(){\n\t\treturn $this->getApplication()->getFactory();\n\t}", "title": "" }, { "docid": "7b0e02d72fc28df2e1b0577bd5e9ffdc", "score": "0.49499547", "text": "protected function _getLocaleRenderer()\n {\n if (null === $this->_localeRenderer) {\n $this->_localeRenderer = $this->getLayout()->createBlock(\n 'lanot_regionmanager/adminhtml_region_locale', '',\n array('is_render_to_js_template' => true)\n );\n $this->_localeRenderer->setExtraParams('style=\"width:200px\"');\n }\n return $this->_localeRenderer;\n }", "title": "" }, { "docid": "c5c73955a7f9f9ff2e5f550918476655", "score": "0.49446774", "text": "public static function getViewFactory(){\r\n return \\Illuminate\\Mail\\Mailer::getViewFactory();\r\n }", "title": "" }, { "docid": "8017bff64a9eb45812e0e5d50bc7d5df", "score": "0.49355617", "text": "public function getFormFactory()\n {\n return $this->get('form.factory');\n }", "title": "" }, { "docid": "23d75d6e3671216bd42b747ad64085a8", "score": "0.49291745", "text": "public function GetFieldsRenderModeDefault ();", "title": "" }, { "docid": "ee32757c59c2838bacd31cc525aad51a", "score": "0.49215892", "text": "protected function getTwig_Form_RendererService()\n {\n return $this->services['twig.form.renderer'] = new \\Symfony\\Bridge\\Twig\\Form\\TwigRenderer(new \\Symfony\\Bridge\\Twig\\Form\\TwigRendererEngine(array(0 => 'IvoryCKEditorBundle:Form:ckeditor_widget.html.twig', 1 => 'form_div_layout.html.twig', 2 => 'AvanzuAdminThemeBundle:layout:form-theme.html.twig', 3 => 'bootstrap_3_layout.html.twig', 4 => 'VichUploaderBundle:Form:fields.html.twig'), $this->get('twig')), $this->get('security.csrf.token_manager', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "title": "" }, { "docid": "8d25d5c68e5f091d36565dd5f0e8826f", "score": "0.4915348", "text": "protected function getRenderViewHelper3Service()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Form\\ViewHelpers\\RenderViewHelper::class);\n }", "title": "" }, { "docid": "d78c917a649aaa71d76d76331776defc", "score": "0.49111545", "text": "public static function newFactory()\n {\n return TaxExemptionFactory::new();\n }", "title": "" }, { "docid": "15c361d5fcf593c3c892bc5b26d9d039", "score": "0.49079427", "text": "private static function _getFactory()\n\t{\n\t\tself::_init();\n\t\treturn self::$factory;\n\t}", "title": "" }, { "docid": "d612b8fa21bc4019592ea91f81fa9a6a", "score": "0.49072337", "text": "protected function getFragment_Renderer_SsiService()\n {\n $this->services['fragment.renderer.ssi'] = $instance = new \\Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer(NULL, ${($_ = isset($this->services['fragment.renderer.inline']) ? $this->services['fragment.renderer.inline'] : $this->get('fragment.renderer.inline')) && false ?: '_'}, ${($_ = isset($this->services['uri_signer']) ? $this->services['uri_signer'] : $this->get('uri_signer')) && false ?: '_'});\n\n $instance->setFragmentPath('/_fragment');\n\n return $instance;\n }", "title": "" }, { "docid": "9988cfea34ee74dc9b39209a00810c35", "score": "0.49027503", "text": "public function getRendererClassName()\n {\n return UnknownFormElementRenderer::class;\n }", "title": "" }, { "docid": "07361178236a9c316a9de568cc94cd0e", "score": "0.4892561", "text": "public function selectRenderer(ViewEvent $e)\n {\n $model = $e->getModel();\n \n if ($model instanceof Model\\PdfModel) {\n return $this->renderer;\n }\n\n return;\n }", "title": "" }, { "docid": "942013417c8fd9746f43baf047b55816", "score": "0.48896396", "text": "public function defaultEditRender(){\n\n $form = new ShaForm();\n $form\n ->setDaoClass(__CLASS__)\n ->addField()->setDaoField(\"language_id\")->setRenderer(ShaFormField::RENDER_TYPE_SWITCHPICTURE)->setDatas(ShaLanguage::getValuesMapping(\"language_id\", \"language_flag\"))->setWidth(20)->end()\n ->addField()->setDaoField(\"content_key\")->setRenderer(ShaFormField::RENDER_TYPE_TEXT)->setLib(ShaContext::t(\"Id\"))->setWidth(600)->end()\n ->addField()->setDaoField(\"content_value\")->setRenderer(ShaFormField::RENDER_TYPE_TEXTAREA)->setLib(ShaContext::t(\"Content\"))->setWidth(600)->setHeight(300)->end()\n ;\n return $form;\n \n }", "title": "" }, { "docid": "98cdfc7d260083cb45e66a0b299dc0ee", "score": "0.48807195", "text": "public function getQuickFormRendererMethod()\n {\n return $this->quickFormRendererMethod;\n }", "title": "" }, { "docid": "28b7c9e5f373ea2652e7bc2e2d3f46e5", "score": "0.48765165", "text": "protected function getFormatterInstance($format = NULL) {\n if (!isset($format)) {\n $format = $this->options['type'];\n }\n $settings = $this->options['settings'] + $this->formatterPluginManager->getDefaultSettings($format);\n\n $options = [\n 'field_definition' => $this->getFieldDefinition(),\n 'configuration' => [\n 'type' => $format,\n 'settings' => $settings,\n 'label' => '',\n 'weight' => 0,\n ],\n 'view_mode' => '_custom',\n ];\n\n return $this->formatterPluginManager->getInstance($options);\n }", "title": "" }, { "docid": "0141ee9a0e96e951e92acb50aadf6df1", "score": "0.4875931", "text": "public static function getFormatter()\n {\n return self::getComponent('formatter');\n }", "title": "" }, { "docid": "7000ca886354fd3b31b70dada5aa2e45", "score": "0.48714685", "text": "public static function getInstance($designator, tx_sglib_factory $factoryObj) {\n\t\tif (!isset(self::$instance[$designator])) {\n\t\t\tself::$instance[$designator] = new tx_sglib_validate();\n\t\t\tself::$instance[$designator]->init($factoryObj);\n\t\t}\n\t\treturn (self::$instance[$designator]);\n\t}", "title": "" }, { "docid": "a3f2d4eae266c35b8f181e8241fae27a", "score": "0.48712996", "text": "protected function getSymfonyCmfCreate_RdfTypeFactoryService()\n {\n return $this->services['symfony_cmf_create.rdf_type_factory'] = new \\Midgard\\CreatePHP\\Metadata\\RdfTypeFactory($this->get('symfony_cmf_create.object_mapper'), $this->get('symfony_cmf_create.rdf_driver'));\n }", "title": "" }, { "docid": "8e96fbb881c91d20bb582dc32949c526", "score": "0.48580664", "text": "function &factory(&$parser, $type = 'array', $conf = array())\r\n {\r\n $class = 'PHP_CompatInfo_Renderer_' . ucfirst(strtolower($type));\r\n $file = str_replace('_', '/', $class) . '.php';\r\n\r\n /**\r\n * Attempt to include our version of the named class, but don't treat\r\n * a failure as fatal. The caller may have already included their own\r\n * version of the named class.\r\n */\r\n if (!PHP_CompatInfo_Renderer::_classExists($class)) {\r\n include_once $file;\r\n }\r\n\r\n // If the class exists, return a new instance of it.\r\n if (PHP_CompatInfo_Renderer::_classExists($class)) {\r\n $instance =& new $class($parser, $conf);\r\n } else {\r\n $instance = null;\r\n }\r\n\r\n return $instance;\r\n }", "title": "" }, { "docid": "155707c7268be57e03f5b9c7daed1c1b", "score": "0.4844153", "text": "protected function getUrlencodeViewHelperService()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\UrlencodeViewHelper::class);\n }", "title": "" }, { "docid": "63b5fdee33bdd44389e320ed84c3b6fa", "score": "0.48312336", "text": "protected function createBootstrapDriver(): Contracts\\Renderer\n {\n return new Renderers\\BootstrapRenderer($this->container->make(Factory::class));\n }", "title": "" }, { "docid": "39b0985852c1875f90241b0d684bc1d6", "score": "0.48291415", "text": "protected function _getDefaultValueRenderer()\n\t{\n\t\treturn new \\Application\\DeskPRO\\Dpql\\Renderer\\Values\\Html();\n\t}", "title": "" }, { "docid": "040509f1ee55831ff26e1c79063ce90d", "score": "0.4820197", "text": "protected function getKnpMenu_RendererProviderService()\n {\n return $this->services['knp_menu.renderer_provider'] = new \\Knp\\Bundle\\MenuBundle\\Renderer\\ContainerAwareProvider($this, 'twig', array('list' => 'knp_menu.renderer.list', 'twig' => 'knp_menu.renderer.twig'));\n }", "title": "" }, { "docid": "040509f1ee55831ff26e1c79063ce90d", "score": "0.4820197", "text": "protected function getKnpMenu_RendererProviderService()\n {\n return $this->services['knp_menu.renderer_provider'] = new \\Knp\\Bundle\\MenuBundle\\Renderer\\ContainerAwareProvider($this, 'twig', array('list' => 'knp_menu.renderer.list', 'twig' => 'knp_menu.renderer.twig'));\n }", "title": "" }, { "docid": "c50e8add7c4209edc5adcef6218461aa", "score": "0.48175898", "text": "protected function getRenderViewHelper2Service()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Fluid\\ViewHelpers\\RenderViewHelper::class);\n }", "title": "" }, { "docid": "150740643d562adf08a155abfe4b71f5", "score": "0.48122516", "text": "protected function getRendererTemplate()\n {\n return $this->isProductHasSwatchAttribute() ?\n self::CUSTOM_SWATCH_RENDERER_TEMPLATE : self::CUSTOM_CONFIGURABLE_RENDERER_TEMPLATE;\n }", "title": "" }, { "docid": "64093569511b5f56f16492219e5ebe21", "score": "0.48110694", "text": "public abstract function getRenderType();", "title": "" }, { "docid": "ad0a1c58f27bdccccfca1e7dcd2e91d5", "score": "0.48079774", "text": "public function getRenderer(): array\n {\n return $this->renderer;\n }", "title": "" }, { "docid": "5fb1d4e708227356e3f76a856c3a858b", "score": "0.48076722", "text": "protected function getPageRendererService()\n {\n return $this->services['TYPO3\\\\CMS\\\\Core\\\\Page\\\\PageRenderer'] = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Core\\Page\\PageRenderer::class);\n }", "title": "" }, { "docid": "9aae2dbc1485b2719d16cb1cc74e1e3a", "score": "0.4805661", "text": "private function getFormatter()\n {\n $formatter = new XMLFormatter();\n return $formatter;\n }", "title": "" }, { "docid": "357d6d69fa6121a9183885c0992f7e4c", "score": "0.4804153", "text": "public static function createInstance()\n {\n return new TextBoxRepeaterField('ISerializable', 'ISerializable', 'ISerializable');\n }", "title": "" }, { "docid": "ed1ef68b53a8943ca2b032d7b7c9b993", "score": "0.48007578", "text": "protected static function newFactory()\n {\n return ContactFactory::new();\n }", "title": "" }, { "docid": "2246682728eba0fc6d7dd10411e47b91", "score": "0.4798725", "text": "public function getFormatter()\n {\n if (is_object($this->_formatter) === false) {\n $this->_formatter = new Line();\n }\n\n return $this->_formatter;\n }", "title": "" }, { "docid": "11afbc5e707b024611e6b763f910da78", "score": "0.47951254", "text": "protected function get_renderer_function($data){\n $renderer = false;\n \n // Has config explicitly set a renderer?\n if(isset($data->renderer) && is_string($data->renderer) && !empty($data->renderer)){\n $renderer = $data->renderer;\n } else { \n // Otherwise try and figure it out using TV's input type\n $tv = $this->modx->getObject('modTemplateVar',array('name'=>$data->field));\n $tvType = $tv->get('type');\n // Check against defaults array\n if(isset(self::$defaultRenderers[$tvType])){\n $renderer = self::$defaultRenderers[$tvType];\n };\n }; \n return $renderer;\n $obj = new stdClass();\n $obj->fn = $renderer;\n return $obj ;\n }", "title": "" }, { "docid": "b6a4453d958b2d109940e7561c0950b3", "score": "0.47881478", "text": "protected function getFragment_Renderer_SsiService()\n {\n $this->services['fragment.renderer.ssi'] = $instance = new \\Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer(NULL, $this->get('fragment.renderer.inline'), $this->get('uri_signer'));\n\n $instance->setFragmentPath('/_fragment');\n\n return $instance;\n }", "title": "" }, { "docid": "b6a4453d958b2d109940e7561c0950b3", "score": "0.47881478", "text": "protected function getFragment_Renderer_SsiService()\n {\n $this->services['fragment.renderer.ssi'] = $instance = new \\Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer(NULL, $this->get('fragment.renderer.inline'), $this->get('uri_signer'));\n\n $instance->setFragmentPath('/_fragment');\n\n return $instance;\n }", "title": "" }, { "docid": "8a5d6feca9515e8bbfaef9713efc3599", "score": "0.47835657", "text": "public static function getInstance()\n {\n return Doctrine_Core::getTable('OhrmSelectedGroupField');\n }", "title": "" }, { "docid": "8cd40b04ca2dc38b8bedf8c8bd89631a", "score": "0.47797176", "text": "public static function fieldsFactory(): FieldsFactory\n {\n //====================================================================//\n // Initialize Field Factory Class\n if (isset(self::$fieldsFactory)) {\n return self::$fieldsFactory;\n }\n //====================================================================//\n // Initialize Class\n self::$fieldsFactory = new FieldsFactory();\n //====================================================================//\n // Load Translation File\n Splash::translator()->load(\"objects\");\n\n return self::$fieldsFactory;\n }", "title": "" }, { "docid": "e979639fc86906aae68328ff9c439da8", "score": "0.47788018", "text": "private function getRendererLessRenderer()\n {\n $env = new TestEnvironment(false, false);\n\n return new EnvironmentAwareRenderer($env);\n }", "title": "" }, { "docid": "ed000e58e60fca55c89588f67f4ef3c4", "score": "0.47772506", "text": "public function getFactoryMethod(): ?string;", "title": "" }, { "docid": "ef8b2357101ae2c1e6f885320e01abb2", "score": "0.4773732", "text": "protected function _getGroupRenderer()\n {\n if (!$this->_groupRenderer) {\n $this->_groupRenderer = $this->getLayout()->createBlock(\n \\RLTSquare\\DeliveryTime\\Block\\Adminhtml\\Form\\Field\\Fieldsgroup::class,\n '',\n ['data' => ['is_render_to_js_template' => true]]\n );\n $this->_groupRenderer->setClass('formfields_group_select');\n }\n return $this->_groupRenderer;\n }", "title": "" }, { "docid": "8edf3672f88bd6975a8def407baf0a75", "score": "0.47711512", "text": "protected function getSymfonyCmfCreate_RdfDriverService()\n {\n return $this->services['symfony_cmf_create.rdf_driver'] = new \\Midgard\\CreatePHP\\Metadata\\RdfDriverXml(array(0 => '/vagrant/project/vendor/symfony-cmf/content-bundle/Symfony/Cmf/Bundle/ContentBundle/Resources/rdf-mappings', 1 => '/vagrant/project/vendor/symfony-cmf/simple-cms-bundle/Symfony/Cmf/Bundle/SimpleCmsBundle/Resources/rdf-mappings'));\n }", "title": "" }, { "docid": "87c332b89febfb8f4425f77c38c6e946", "score": "0.4768573", "text": "protected function getRenderFormValueViewHelperService()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Form\\ViewHelpers\\RenderFormValueViewHelper::class);\n }", "title": "" }, { "docid": "40acb14d92f9036504f68cab8ac60445", "score": "0.47645056", "text": "public function getRenderer(Rendering $rendering);", "title": "" }, { "docid": "41eeeff4088b4c787012dfc0a28f20e5", "score": "0.47458234", "text": "public function getFormatter(){ }", "title": "" }, { "docid": "31339749784a2ef52138093f4c538702", "score": "0.4742961", "text": "public static function createInstance()\n {\n return new LabelRepeaterField('ISerializable', 'ISerializable', 'ISerializable');\n }", "title": "" }, { "docid": "ae732f7a3f24398041df17fac46d2c4d", "score": "0.47405967", "text": "public static function createInstance()\n {\n return new TextRepeaterField('ISerializable', 'ISerializable', 'ISerializable');\n }", "title": "" }, { "docid": "93d16586681c2ea3652f46d9568e4292", "score": "0.47387326", "text": "private static function get_settings_renderer() {\n\n\t\treturn self::$_settings_renderer;\n\n\t}", "title": "" }, { "docid": "3531015a3e8cd3fab97e31ac0ad0e578", "score": "0.47331944", "text": "protected static function getFacadeAccessor()\n {\n return 'Gma\\Payment\\Contracts\\Factory';\n }", "title": "" }, { "docid": "978b487a9214c6209c0d2bbefda96cd4", "score": "0.47300056", "text": "function getFormatter()\n {\n\t\t$formatterFile = $this->fixPath($this->_formatterPath).$this->_formatter.'.php';\n\t\tif (is_file($formatterFile)) {\n\t\t\trequire_once($formatterFile);\n\t\t\treturn new $this->_formatter();\n\t\t} else {\n\t\t\t$this->error('Could not find formatter \"'.$formatterFile.'\"');\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "84badae291f87686233b931a15c6b1d4", "score": "0.47237086", "text": "public static function getInstance()\n {\n return Doctrine_Core::getTable('Formats');\n }", "title": "" }, { "docid": "be4a5c70c17019261f314afdcfb618e4", "score": "0.47196364", "text": "public function get_renderer($module, $page, $subtype=null) {\n if (is_null($this->rf)) {\n if (CLI_SCRIPT) {\n $classname = 'cli_renderer_factory';\n } else {\n $classname = $this->rendererfactory;\n }\n $this->rf = new $classname($this);\n }\n\n return $this->rf->get_renderer($module, $page, $subtype);\n }", "title": "" }, { "docid": "1f60a2d4232a08aff9efb7801d2d1798", "score": "0.47174224", "text": "protected function getEntityTranslationRenderer() {\n if (!isset($this->entityTranslationRenderer)) {\n $view = $this->getView();\n $rendering_language = $view->display_handler->getOption('rendering_language');\n $langcode = NULL;\n $dynamic_renderers = [\n '***LANGUAGE_entity_translation***' => 'TranslationLanguageRenderer',\n '***LANGUAGE_entity_default***' => 'DefaultLanguageRenderer',\n ];\n if (isset($dynamic_renderers[$rendering_language])) {\n // Dynamic language set based on result rows or instance defaults.\n $renderer = $dynamic_renderers[$rendering_language];\n }\n else {\n if (strpos($rendering_language, '***LANGUAGE_') !== FALSE) {\n $langcode = PluginBase::queryLanguageSubstitutions()[$rendering_language];\n }\n else {\n // Specific langcode set.\n $langcode = $rendering_language;\n }\n $renderer = 'ConfigurableLanguageRenderer';\n }\n $class = '\\Drupal\\views\\Entity\\Render\\\\' . $renderer;\n $entity_type = $this->getEntityTypeManager()->getDefinition($this->getEntityTypeId());\n $this->entityTranslationRenderer = new $class($view, $this->getLanguageManager(), $entity_type, $langcode);\n }\n return $this->entityTranslationRenderer;\n }", "title": "" } ]
c3835c0ebb2a54331510dd978f0415b4
overrides the number of posts found, this affects pagination.
[ { "docid": "cd078a366bf53d6dde27d8cdbdd654f1", "score": "0.0", "text": "public function found_posts( $found_posts, $wp_query )\n\t{\n\t\tif ( isset( $this->total_found ) && $this->total_found )\n\t\t{\n\t\t\t$found_posts = $this->total_found;\n\t\t}\n\n\t\treturn $found_posts;\n\t}", "title": "" } ]
[ { "docid": "a98522cec5c1238510d844f9999654c4", "score": "0.6917543", "text": "function limit_posts( $query ) {\n if ( $query->is_home() && $query->is_main_query() ) {\n $query->set( 'posts_per_page', '2' );\n }\n}", "title": "" }, { "docid": "86e3361505af5f52a3d623792f4bcc40", "score": "0.68032116", "text": "function unlimited_posts_per_page( $query )\n {\n $query->set( 'posts_per_page', -1 );\n }", "title": "" }, { "docid": "8cde3b1e2f7a7aca14f5a1ec43e32cb6", "score": "0.67755693", "text": "function buddyblogvideos_limit_no_of_posts() {\n\n\treturn apply_filters( 'buddyblogvideos_limit_no_of_posts', buddyblogvideos_get_option( 'limit_no_of_posts' ) );\n}", "title": "" }, { "docid": "8c5380a25f26a717a6a0de4355009351", "score": "0.67587733", "text": "public function getAllPostsPaginate()\n\t{\n\t\treturn $this->model->where('post_type', 'post')->orderBy('created_at', 'desc')->paginate($this->count);\n\t}", "title": "" }, { "docid": "83e65b437fcce57ae9f905860ff0e001", "score": "0.6720044", "text": "function pjg_searchwp_posts_per_page( $posts_per_page = 10, $engine = 'default', $terms = null, $page = null ) {\n return 10;\n}", "title": "" }, { "docid": "fe7a3b881c566631ab555bdc0b651124", "score": "0.6690454", "text": "function infinity_set_posts_per_page( $query ) {\n\t\t// Get Data\n\t\tglobal $wp_the_query;\n\t\t$home_layout = substr( infinity_options('general_home_layout'), 0, 4 );\n\n\t if ( $home_layout!=='full' && infinity_options('general_full_post') && is_home() && !is_paged() ) {\n\t \t$default_posts_per_page = get_option( 'posts_per_page' );\n\t\t\t$default_posts_per_page++;\n\t\t\t$query->set( 'posts_per_page', $default_posts_per_page );\n\t\t\treturn $query; \n\t\t}\n\n\t}", "title": "" }, { "docid": "b3afa49d63fa71ecddc057be75ffd853", "score": "0.66799814", "text": "function limit_posts_per_archive_page() {\n\t\tif ( is_search() ) {\n\t\t\tset_query_var('posts_per_page', 10); // or use variable key: posts_per_page\n\t\t} \n\t}", "title": "" }, { "docid": "33b53e5bd3e5cc1ff107cabb7885d5df", "score": "0.66090983", "text": "public function getNumOfPosts()\n {\n return $this->num_of_posts;\n }", "title": "" }, { "docid": "3c045004e72a352ddec45a16f1c44178", "score": "0.6606885", "text": "function hm_search_post_count( $query ) {\n if( is_search() && !is_admin() ) {\n $query->set( 'posts_per_page', -1 );\n }\n}", "title": "" }, { "docid": "b789d82a45ef669c904f2dd93bc30ab4", "score": "0.6577096", "text": "public static function perPage()\n {\n return (Config::meta('show_all_posts')\n ? self::count() + 1\n : Config::meta('posts_per_page')\n );\n }", "title": "" }, { "docid": "581247429fe12b0789e94d82810b5625", "score": "0.65762347", "text": "public function numPosts($n) {\n\t\treturn $this->span(sprintf($this->_n('%d post', '%d posts', $n), $n), 'num-posts'); \n\t}", "title": "" }, { "docid": "e57e529a0176122cf22caa294025ab13", "score": "0.6515185", "text": "public function perPage()\n {\n return 10;\n }", "title": "" }, { "docid": "cbe200f13af65bd17f712887a0693b8d", "score": "0.6497617", "text": "protected function get_entries_per_page()\n {\n }", "title": "" }, { "docid": "c3a16376e4870dcf86b354d314e33edb", "score": "0.64667875", "text": "private function _count_posts() {\n\t\tglobal $wpdb;\n\t\t$results = $wpdb->get_results( 'SELECT FOUND_ROWS() as cnt', OBJECT );\n\t\treturn $results[0]->cnt;\n\t}", "title": "" }, { "docid": "d9a6d67da6ba9790fa932d0eaaff155f", "score": "0.6462528", "text": "public function searchPostAsPaginationPublic() {\n\t\t\t$search = \"%$this->search%\";\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51' and a.PostID like :search\n\t\t\t\tor a.StatusID='51' and a.Title like :search\n\t\t\t\tor a.StatusID='51' and a.Stars like :search\n\t\t\t\tor a.StatusID='51' and a.Cast like :search\n\t\t\t\tor a.StatusID='51' and a.Director like :search\n\t\t\t\tor a.StatusID='51' and a.Tags like :search\n\t\t\t\tor a.StatusID='51' and a.Country like :search\n\t\t\t\tor a.StatusID='51' and a.Released like :search\n\t\t\t\torder by a.Created_at desc;\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\t\t\t\t$stmt->bindValue(':search', $search, PDO::PARAM_STR);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' and a.PostID like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Title like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Stars like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Cast like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Director like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Tags like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Country like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Released like :search\n\t\t\t\t\t\t\torder by a.Created_at desc LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':search', $search, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\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$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "b7889686ae6d28e601b267bb5f0165fb", "score": "0.64481515", "text": "function myprefix_adjust_offset_pagination($found_posts, $query) {\n $offset = 1;\n\n //Ensure we're modifying the right query object...\n if ( $query->is_posts_page ) {\n //Reduce WordPress's found_posts count by the offset... \n return $found_posts - $offset;\n }\n return $found_posts;\n}", "title": "" }, { "docid": "9838534d27432076aeee9a58e947535a", "score": "0.64455587", "text": "public function for_posts_page()\n {\n }", "title": "" }, { "docid": "9838534d27432076aeee9a58e947535a", "score": "0.6445262", "text": "public function for_posts_page()\n {\n }", "title": "" }, { "docid": "8354eb28073ff36cdf02609dec15bc1b", "score": "0.64219016", "text": "private function getNumPages() {\n if($this->category != \"All\") {\n $where = \" WHERE Kitchen_Category.name = '\" . $this->category . \"' \";\n } else {\n $where = \" \";\n }\n\n $query_str = \"\n SELECT Count(Kitchen_Post.id) AS NumPosts\n FROM Kitchen_Post INNER JOIN Kitchen_Category ON Kitchen_Post.category_id = Kitchen_Category.id\n $where;\n \";\n\n $db_query = $this->connection->query($query_str);\n if((!$db_query) || ($db_query->num_rows < 1))\n return Null;\n else {\n $tmp = $db_query->fetch_assoc();\n return $tmp['NumPosts'];\n }\n }", "title": "" }, { "docid": "875eee48a08f82782a177046d24ce543", "score": "0.6373771", "text": "function get_page_count(){ return $this->pages; }", "title": "" }, { "docid": "2ec511899c157118129d4f20ce495931", "score": "0.63724524", "text": "function blossom_recipe_posts_per_page_count(){\r\n global $wp_query;\r\n if( is_archive() || is_search() && $wp_query->found_posts > 0 ) {\r\n printf( esc_html__( '%1$s Showing %2$s %3$s Result(s) %4$s', 'blossom-recipe' ), '<span class=\"showing-results\">', '<span class=\"result-count\">', esc_html( number_format_i18n( $wp_query->found_posts ) ), '</span></span>' );\r\n }\r\n}", "title": "" }, { "docid": "8069a2d00890c4abb0023f20e7c3bcaf", "score": "0.6362877", "text": "private function getInternalNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }", "title": "" }, { "docid": "2229f73a0018e9fa8b970beadeb49d29", "score": "0.63549757", "text": "protected function get_number_of_pages_for_post($post)\n {\n }", "title": "" }, { "docid": "f0f7e66dc73aaabfd5a25b7ce85b1907", "score": "0.6350754", "text": "static function number_of_articles($config) {\n\t\t\t// total amount of the posts\n\t\t\treturn $config['highlighter_articles'];\n\t\t}", "title": "" }, { "docid": "5d69eebf29c3c6c74f5ca3c98a24c4f7", "score": "0.6306554", "text": "public function searchPostAsPagination() {\n\t\t\tif (Auth::validToken($this->db,$this->token,$this->username)){\n\t\t\t\t$newusername = strtolower(filter_var($this->username,FILTER_SANITIZE_STRING));\n\t\t\t\t$search = \"%$this->search%\";\n\t\t\t\t\tif (Auth::getRoleID($this->db,$this->token) == '3'){\n\t\t\t\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.Username=:username and a.PostID like :search\n\t\t\t\t\t\t\tor a.Username=:username and a.Title like :search\n\t\t\t\t\t\t\tor a.Username=:username and a.Stars like :search\n\t\t\t\t\t\t\tor a.Username=:username and a.Cast like :search\n\t\t\t\t\t\t\tor a.Username=:username and a.Director like :search\n\t\t\t\t\t\t\tor a.Username=:username and a.Tags like :search\n\t\t\t\t\t\t\tor a.Username=:username and a.Country like :search\n\t\t\t\t\t\t\tor a.Username=:username and a.Released like :search\n\t\t\t\t\t\t\torder by a.Created_at desc;\";\n\t\t\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\t\t\t\t\t\t$stmt->bindValue(':username', $newusername, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt->bindValue(':search', $search, PDO::PARAM_STR);\n\t\t\t\t\t} else if (Auth::getRoleID($this->db,$this->token) == '1' || Auth::getRoleID($this->db,$this->token) == '2'){\n\t\t\t\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.PostID like :search\n\t\t\t\t\t\t\tor a.Title like :search\n\t\t\t\t\t\t\tor a.Stars like :search\n\t\t\t\t\t\t\tor a.Cast like :search\n\t\t\t\t\t\t\tor a.Director like :search\n\t\t\t\t\t\t\tor a.Tags like :search\n\t\t\t\t\t\t\tor a.Country like :search\n\t\t\t\t\t\t\tor a.Released like :search\n\t\t\t\t\t\t\torder by a.Created_at desc;\";\n\t\t\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\t\t\t\t\t\t$stmt->bindValue(':search', $search, PDO::PARAM_STR);\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\tif ($stmt->execute()) {\t\n \t \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t\tif (Auth::getRoleID($this->db,$this->token) == '3'){\n\t\t\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\t\twhere a.Username=:username and a.PostID like :search\n\t\t\t\t\t\t\t\tor a.Username=:username and a.Title like :search\n\t\t\t\t\t\t\t\tor a.Username=:username and a.Stars like :search\n\t\t\t\t\t\t\t\tor a.Username=:username and a.Cast like :search\n\t\t\t\t\t\t\t\tor a.Username=:username and a.Director like :search\n\t\t\t\t\t\t\t\tor a.Username=:username and a.Tags like :search\n\t\t\t\t\t\t\t\tor a.Username=:username and a.Country like :search\n\t\t\t\t\t\t\t\tor a.Username=:username and a.Released like :search\n\t\t\t\t\t\t\t\torder by a.Created_at desc LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t\t$stmt2->bindValue(':username', $newusername, PDO::PARAM_STR);\n\t\t\t\t\t\t\t$stmt2->bindValue(':search', $search, PDO::PARAM_STR);\n\t\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\t} else if (Auth::getRoleID($this->db,$this->token) == '1' || Auth::getRoleID($this->db,$this->token) == '2'){\n\t\t\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\t\twhere a.PostID like :search\n\t\t\t\t\t\t\t\tor a.Title like :search\n\t\t\t\t\t\t\t\tor a.Stars like :search\n\t\t\t\t\t\t\t\tor a.Cast like :search\n\t\t\t\t\t\t\t\tor a.Director like :search\n\t\t\t\t\t\t\t\tor a.Tags like :search\n\t\t\t\t\t\t\t\tor a.Country like :search\n\t\t\t\t\t\t\t\tor a.Released like :search\n\t\t\t\t\t\t\t\torder by a.Created_at desc LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t\t$stmt2->bindValue(':search', $search, PDO::PARAM_STR);\n\t\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Embed_inline\":'.json_encode($redata['Embed_video']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Stars_inline\":'.json_encode($redata['Stars']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\t\"Cast_inline\":'.json_encode($redata['Cast']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\t\"Director_inline\":'.json_encode($redata['Director']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\t\"Tags_inline\":'.json_encode($redata['Tags']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\t\"Country_inline\":'.json_encode($redata['Country']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t\t \t\t\t'status' => 'error',\n\t \t\t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\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} else {\n\t\t\t\t\t\t\t\t$data = [\n \t \t\t \t\t'status' => 'error',\n\t\t \t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t\t $data = [\n \t \t\t \t'status' => 'error',\n\t\t \t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t];\n\t\t \t } \t \t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$data = [\n \t \t\t\t\t'status' => 'error',\n\t\t\t\t\t\t\t'code' => 'RS202',\n\t \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$data = [\n\t \t\t\t'status' => 'error',\n\t\t\t\t\t'code' => 'RS401',\n \t \t'message' => CustomHandlers::getreSlimMessage('RS401')\n\t\t\t\t];\n\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "a908c97c79eb8be817a3eef7fed582c9", "score": "0.6305677", "text": "function WPbook_Number_Of_Posts_On_Archive($query)\r\n{\r\n $first_text = esc_attr(get_option('wpbook_first_text', ''));\r\n if (is_post_type_archive(array('book'))) {\r\n $query->set('posts_per_page', $first_text);\r\n }\r\n return $query;\r\n}", "title": "" }, { "docid": "23d344e9e197065d8b3d0db988e9fb3c", "score": "0.62937325", "text": "public function paginate($noOfItem = 10);", "title": "" }, { "docid": "23d344e9e197065d8b3d0db988e9fb3c", "score": "0.62937325", "text": "public function paginate($noOfItem = 10);", "title": "" }, { "docid": "2dae335beecfc8a9367c9ea70e690a8c", "score": "0.6266379", "text": "public function getPageCount(): int;", "title": "" }, { "docid": "04fab624bdf17bb922ea21fa70f0fb7a", "score": "0.6263946", "text": "public function showPostPopularAsPaginationPublic() {\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51'\n\t\t\t\torder by a.Released desc,a.Viewer desc;\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' \n\t\t\t\t\t\t\torder by a.Released desc,a.Viewer desc LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\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$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "fedfd458de65b4f5e7287319cfe8c214", "score": "0.626197", "text": "public function setCount(int $count): PaginatorInterface;", "title": "" }, { "docid": "e0b0e9411a032e2baf874528cea2a6ae", "score": "0.62493736", "text": "protected function retrieve_posts()\n {\n }", "title": "" }, { "docid": "f5ee33ac5dde7b60dd60b3bd0dcc8d48", "score": "0.6233832", "text": "function perPage() {\n $countSQL = \"SELECT COUNT(comment_id) as count FROM comments\";\n $stmt = $this->conn->prepare($countSQL);\n $stmt->execute();\n // Calculates diapason of posts which should be shown on each page\n $this->commentCount = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->commentCount = $this->commentCount[\"count\"];\n $this->pagerCount = ceil($this->commentCount / $this->perPage); \n if(isset($_GET[\"page\"])) {\n if($_GET[\"page\"] == 1) {\n $this->page = 1;\n $this->startFrom = 0;\n } elseif($_GET[\"page\"] == 0 || $_GET[\"page\"] > $this->pagerCount || empty($_GET[\"page\"])) {\n echo \"<h1>This page doesn't exist.</h1>\";\n } else {\n $this->page = $_GET[\"page\"];\n $this->startFrom = ($this->page - 1) * $this->perPage;\n }\n } else {\n $this->page = 1;\n $this->startFrom = 0;\n }\n }", "title": "" }, { "docid": "08b22f19154a23be6b44e71584d117d2", "score": "0.622887", "text": "function pre_get_posts( $query )\n {\n if( $query->is_main_query() && ! is_admin() ){\n \n if( $this->is_unlimted() )\n {\n $query->set( 'posts_per_page', -1 );\n }\n }\n }", "title": "" }, { "docid": "91111afddae7cd4c624925b25abd0e54", "score": "0.6226444", "text": "public function searchPostRandomAsPaginationPublic() {\n\t\t\t$search = \"%$this->search%\";\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51' and a.PostID like :search\n\t\t\t\tor a.StatusID='51' and a.Title like :search\n\t\t\t\tor a.StatusID='51' and a.Stars like :search\n\t\t\t\tor a.StatusID='51' and a.Cast like :search\n\t\t\t\tor a.StatusID='51' and a.Director like :search\n\t\t\t\tor a.StatusID='51' and a.Tags like :search\n\t\t\t\tor a.StatusID='51' and a.Country like :search\n\t\t\t\tor a.StatusID='51' and a.Released like :search\n\t\t\t\torder by a.Created_at desc;\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\t\t\t\t$stmt->bindValue(':search', $search, PDO::PARAM_STR);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' and a.PostID like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Title like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Stars like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Cast like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Director like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Tags like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Country like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Released like :search\n\t\t\t\t\t\t\torder by rand() LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':search', $search, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\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$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "dec369bf6d1ae3b58d4c03b515a9d4e6", "score": "0.61995685", "text": "function bimber_injection_count_posts( $found_posts, $query ) {\n\tif ( is_admin() || ! $query->is_main_query() ) {\n\t\treturn $found_posts;\n\t}\n\n\tif ( ! bimber_is_injection_allowed() ) {\n\t\treturn $found_posts;\n\t}\n\n\t$posts_per_page = bimber_get_posts_per_page();\n\n\tif ( $posts_per_page <= 0 ) {\n\t\treturn $found_posts;\n\t}\n\n\t$extra_posts = bimber_count_injections_before_post( $found_posts );\n\n\t$found_posts += $extra_posts;\n\n\treturn $found_posts;\n}", "title": "" }, { "docid": "cccd5e9315904f99a32e0f131d7ba591", "score": "0.61716646", "text": "public function getNumberItemsPerPage(): int;", "title": "" }, { "docid": "1750cbb5c10ba8d87add359a4109a7d4", "score": "0.61686", "text": "public function searchPostAsPaginationPublicAsc() {\n\t\t\t$search = \"%$this->search%\";\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51' and a.PostID like :search\n\t\t\t\tor a.StatusID='51' and a.Title like :search\n\t\t\t\tor a.StatusID='51' and a.Stars like :search\n\t\t\t\tor a.StatusID='51' and a.Cast like :search\n\t\t\t\tor a.StatusID='51' and a.Director like :search\n\t\t\t\tor a.StatusID='51' and a.Tags like :search\n\t\t\t\tor a.StatusID='51' and a.Country like :search\n\t\t\t\tor a.StatusID='51' and a.Released like :search\n\t\t\t\torder by a.Created_at asc;\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\t\t\t\t$stmt->bindValue(':search', $search, PDO::PARAM_STR);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' and a.PostID like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Title like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Stars like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Cast like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Director like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Tags like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Country like :search\n\t\t\t\t\t\t\tor a.StatusID='51' and a.Released like :search\n\t\t\t\t\t\t\torder by a.Created_at asc LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':search', $search, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\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$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "9caf17535e2c6b5f420ee10cba7e5d94", "score": "0.6150523", "text": "function perPage($perPage) {\n $countSQL = \"SELECT COUNT(user_id) as count FROM users\";\n $stmt = $this->conn->prepare($countSQL);\n $stmt->execute();\n // Calculates diapason of posts which should be shown on each page\n $this->userCount = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->userCount = $this->userCount[\"count\"];\n $this->perPage = $perPage;\n $this->pagerCount = ceil($this->userCount / $this->perPage); \n if(isset($_GET[\"page\"])) {\n if($_GET[\"page\"] == 1) {\n $this->page = 1;\n $this->startPostsFrom = 0;\n } elseif($_GET[\"page\"] == 0 || $_GET[\"page\"] > $this->pagerCount || empty($_GET[\"page\"])) {\n echo \"<h1>This page doesn't exist.</h1>\";\n } else {\n $this->page = $_GET[\"page\"];\n $this->startPostsFrom = ($this->page - 1) * $this->perPage;\n }\n } else {\n $this->page = 1;\n $this->startPostsFrom = 0;\n }\n }", "title": "" }, { "docid": "240bdc9c718c7e53b3eeb501e9c68dcf", "score": "0.61345184", "text": "protected function get_posts($post_type, $count, $offset)\n {\n }", "title": "" }, { "docid": "c3a68a040bbf40c967a84d1f71724653", "score": "0.612817", "text": "public function index() {\n $this->load->database();\n $count = $this->db->get('posts')->num_rows();\n if (!empty($this->input->get(\"page\"))) {\n $this->input->get(\"page\");\n \n $start = ceil($this->input->get(\"page\") * $this->perPage);\n \n// $query = $this->db->limit($start, $this->perPage)->get(\"posts1\");\n $query = $this->db->limit($this->perPage, $start)->get(\"posts\");\n $data['posts'] = $query->result();\n\n $result = $this->load->view('data', $data);\n echo json_encode($result);\n } else {\n //$query = $this->db->limit(10, $this->perPage)->get(\"posts\");\n $query = $this->db->limit(10, 0)->get(\"posts\");\n $data['posts'] = $query->result();\n $this->load->view('myPost', $data);\n }\n }", "title": "" }, { "docid": "c83f73ac4d62e060b1085a198037fb89", "score": "0.61204344", "text": "function wpfme_search_results_per_page( $query ) {\n global $wp_the_query;\n if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) {\n $query->set( 'wpfme_search_results_per_page', 50 );\n }\n return $query;\n}", "title": "" }, { "docid": "11f15af8703b419427e82ca063795735", "score": "0.6114974", "text": "function wktheme_set_posts_per_page_cpts($query){\n if(!is_admin() && $query->is_main_query() && is_post_type_archive('posttypename')){\n $query->set('posts_per_page', '9');\n\t\t$query->set('orderby', 'ID');\n\t\t$query->set('order', 'DESC');\n\t}\n}", "title": "" }, { "docid": "fa8dd8e6686a2398a0229b09f012ee97", "score": "0.609477", "text": "public function getCountPages(): int;", "title": "" }, { "docid": "17b950f6bdc3fd1f5d69481567274578", "score": "0.6094622", "text": "function getCount()\n {\n // Prepare\n $args = $this->_prepare();\n\n // The Query\n $the_query = new WP_Query($args);\n return (int) $the_query->found_posts;\n }", "title": "" }, { "docid": "dc813330449c80f961dbd6b69ec26a99", "score": "0.60917807", "text": "public function index() {\n $this->paginate = array(\n 'limit' => 3,\n 'order' => 'Post.created DESC'\n );\n $posts = $this->paginate('Post');\n \n $this->set('posts', $posts);\n }", "title": "" }, { "docid": "567d29101b826890db29c039eca2257f", "score": "0.6079407", "text": "public function setNumOfPosts($num_of_posts)\n {\n $this->num_of_posts = $num_of_posts;\n }", "title": "" }, { "docid": "3fdee148e4408ee2cdd6d04034b62cd4", "score": "0.60713226", "text": "function myprefix_adjust_offset_pagination($found_posts, $query) {\n\t\t$offset = 4;\n $option = get_option(\"magazin_theme_options\");\n if(!empty($option['category_grid_style'])) {\n \tif($option['category_grid_style']==\"1\"){\n \t\t$offset = 0;\n \t} else if($option['category_grid_style']==\"2\"){\n \t\t$offset = 2;\n \t} else if($option['category_grid_style']==\"3\"){\n \t\t$offset = 3;\n \t}\n }\n\n //Ensure we're modifying the right query object...\n if ( $query->is_category() ) {\n //Reduce WordPress's found_posts count by the offset...\n return $found_posts - $offset;\n }\n return $found_posts;\n}", "title": "" }, { "docid": "7690ecd60d32493456fcf1f473b208ab", "score": "0.60667276", "text": "function more_post_ajax(){\n\n $ppp = (isset($_POST[\"ppp\"])) ? $_POST[\"ppp\"] : 3;\n $page = (isset($_POST['pageNumber'])) ? $_POST['pageNumber'] : 0;\n\n header(\"Content-Type: text/html\");\n\n $args = array(\n 'suppress_filters' => true,\n 'post_type' => 'post',\n 'posts_per_page' => $ppp,\n 'paged' => $page,\n );\n\n $loop = new WP_Query($args);\n\n $out = '';\n\n if ($loop -> have_posts()) : while ($loop -> have_posts()) : $loop -> the_post();\n $out .= '<div class=\"small-12 large-4 columns\">\n <h1>'.get_the_title().'</h1>\n <p>'.get_the_content().'</p>\n </div>';\n\n endwhile;\n endif;\n wp_reset_postdata();\n die($out);\n}", "title": "" }, { "docid": "9ab34c140559bd0b1ff13f8d317bf07a", "score": "0.60603625", "text": "public function postRowsPerPage()\n\t{\n\t\tif(method_exists($this, 'rowsPerPage'))\n\t\t{\n\t\t\treturn $this->rowsPerPage();\n\t\t}\n\t\tif(property_exists($this, 'rowsPerPage'))\n\t\t{\n\t\t\treturn $this->rowsPerPage;\n\t\t}\n\t\treturn $this->postRowsPerPage;\n\t}", "title": "" }, { "docid": "563e7c0b9b05effa35071cbbb53b36e7", "score": "0.60419464", "text": "function wpfme_search_results_per_page( $query ) {\n\tglobal $wp_the_query;\n\tif ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) {\n\t$query->set( 'wpfme_search_results_per_page', 100 );\n\t}\n\treturn $query;\n}", "title": "" }, { "docid": "aec65c986c0636a1ccdd402a9adacf71", "score": "0.6041444", "text": "public function getPostPerPageConfig()\n {\n return 20; // TODO: get config\n }", "title": "" }, { "docid": "81679d2a495fd1e234ac394214d1fef0", "score": "0.60285556", "text": "private function ArticleCount()\n {\n return $this->archive->GetItemsPerPage(); \n }", "title": "" }, { "docid": "3be8e720fcf8511aa53a79fe20cd363c", "score": "0.6024071", "text": "function eddwp_adjust_offset_pagination( $found_posts, $query ) {\n\t$offset = 2;\n\tif ( ! $query->is_main_query() && $query->is_home() ) {\n\t\treturn $found_posts - $offset;\n\t}\n\treturn $found_posts;\n}", "title": "" }, { "docid": "fd7631c6b4fee7b5e53eb1abe126a4f8", "score": "0.60155547", "text": "function pageCount(){ \r\n \r\n $this->half_pages = $this->num_records % $this->records_per_page;\r\n \r\n $this->complete_pages = $this->num_records - $this->half_pages;\r\n \r\n $this->pages = $this->complete_pages / $this->records_per_page;\r\n if ($this->half_pages != 0){ $this->pages++; }\r\n \r\n // Page number is too high -> does not exist,\r\n // replace with last number\r\n if ($this->current_page > $this->pages){ \r\n $this->current_page = $this->pages;\r\n }\r\n\r\n }", "title": "" }, { "docid": "6b9e5d8b4c16675e4c118fb870b2bd27", "score": "0.6014177", "text": "function df_get_found_posts(){\n\t\t\treturn $this->found_posts;\n\t\t}", "title": "" }, { "docid": "f88ca092e7fffa3f12edbb15c97d956d", "score": "0.60124964", "text": "function fajar_woocommerce_shop_posts_per_page() {\n $products = fajar_option('number_of_shop_products');\n return $products;\n}", "title": "" }, { "docid": "5f043af3cc04963c23304c782136fbdb", "score": "0.6007061", "text": "function collections_archive_postcount_query( $query ) {\n\tif ( ! $query->is_main_query() || ! $query->is_tax( 'post_format' ) )\n\t\treturn;\n\n\t// Get the posts_per_page from the query first, then settings if not in query.\n\t$ppp = ( $query->get( 'posts_per_page' ) ) ? absint( $query->get( 'posts_per_page' ) ) : absint( get_option( 'posts_per_page' ) );\n\tif ( 0 === $ppp ) {\n\t\t$ppp = 10;\n\t}\n\n\t$format = $query->get( 'post_format' );\n\n\tif ( 'post-format-video' === $format ) {\n\t\t$ppp = $ppp * 2;\n\t\tif ( 0 !== $ppp % 3 ) {\n\t\t\t$ppp = $ppp + 3 - ( $ppp % 3 );\n\t\t}\n\t}\n\n\t// Set the query var\n\t$query->set( 'posts_per_page', $ppp );\n}", "title": "" }, { "docid": "c61d6b35f92f92225ee9bae8067317e7", "score": "0.5998919", "text": "function set_records_per_page($n){ $this->records_per_page = $n; }", "title": "" }, { "docid": "7374612d5709ff2afde574dbce3a4d51", "score": "0.5997575", "text": "public function getNumberOfPages()\n {\n $query = \"SELECT COUNT(post_id) FROM forum_posts\";\n $result = $this->_dbHandler->prepare($query);\n $result->execute();\n $row = $result->fetch();\n $totalPosts = $row['COUNT(post_id)'];\n //If the number is multiple of $this->$postsPerPage return the value\n //Otherwise divide it by 10 and then add 1\n if ($totalPosts % $this->postPerPage == 0) {\n return $totalPosts / $this->postPerPage;\n } else {\n return $totalPosts / $this->postPerPage + 1;\n }\n }", "title": "" }, { "docid": "2248581373d5f8eef88bfe7f8931b1ce", "score": "0.59884036", "text": "public function getPerPage(): int;", "title": "" }, { "docid": "2248581373d5f8eef88bfe7f8931b1ce", "score": "0.59884036", "text": "public function getPerPage(): int;", "title": "" }, { "docid": "89115eb3d26c5d7ddf32850375068fb1", "score": "0.5977716", "text": "public function paginate($count = NULL) {\n\t\tif(is_null($count))\n\t\t\treturn $this->model->paginate(5);\n\t\telse\n\t\t\treturn $this->model->paginate($count);\n\t}", "title": "" }, { "docid": "c1fc38a99451e9b19321f50044f94916", "score": "0.5976659", "text": "public function get_number_of_archive_pages()\n {\n }", "title": "" }, { "docid": "f8a534a8a0e1d1d112fb42be5fd0d099", "score": "0.5970916", "text": "public function showPostFavoriteAsPaginationPublic() {\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51'\n\t\t\t\torder by a.Released desc,a.Liked desc,a.Disliked asc;\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' \n\t\t\t\t\t\t\torder by a.Released desc,a.Liked desc,a.Disliked asc LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\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$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "f832cceef0ea01898be6819bc006f530", "score": "0.5952004", "text": "public function postsAction()\n {\n //$mainModel = new MainModel();\n $pagination = new Pagination($this->route, $this->model->postCount(), 5);\n $vars = [\n 'pagination' => $pagination->get(),\n 'list' => $this->model->postsList($this->route),\n ];\n $this->view->render('All posts', $vars);\n }", "title": "" }, { "docid": "5e2f33812820ed3834a91726e51c7cf0", "score": "0.5951999", "text": "public function limit($limit)\n {\n return $this->set('posts_per_page', (int) $limit);\n }", "title": "" }, { "docid": "a8c5043361d8f94cf5032ff0499e4b7e", "score": "0.5944843", "text": "public function getNumberOfPosts()\n {\n return $this->getUserServices()->count();\n }", "title": "" }, { "docid": "82a227deee35a991b00867351549040d", "score": "0.59376967", "text": "function ucfwp_the_posts_pagination( $args=array() ) {\n\techo ucfwp_get_the_posts_pagination( $args );\n}", "title": "" }, { "docid": "107aa761b6e6698769fa60659dc2b0cc", "score": "0.59366536", "text": "public function getPerPage();", "title": "" }, { "docid": "7a0faf2426e3dc13a338c9abf8eccefb", "score": "0.5930526", "text": "public function getLimitPerPage(): int;", "title": "" }, { "docid": "be648808626affba5d6ef7f61e0ec642", "score": "0.5929621", "text": "function get_last_ten_entries($page = 0, $items_per_page = 50)\n {\n // return $query->result();\n\n $end_limit = $page+$items_per_page;\n\n // echo $page.\" => \".$end_limit.\"<br>\\n\";\n // echo count($this->blog->readdata(array(\"status\" => 1), null)).\"<br>\";\n\n return $this->blog->readdata(array(\"status\" => 1), null, $page, $end_limit);\n }", "title": "" }, { "docid": "755c4e4a78c25436a5747c419c956217", "score": "0.59283763", "text": "function setPostsPerPage($value)\n {\n $this->args ['posts_per_page'] = intval($value);\n return $this;\n }", "title": "" }, { "docid": "0969c4e46d2139aa710673ac7d91fe7d", "score": "0.5918864", "text": "function ssc_wp_search_size($searchQuery) {\n if ( $searchQuery->is_search ) // Make sure it is a search page\n $searchQuery->query_vars['posts_per_page'] = 10; // Change 10 to the number of posts you would like to show\n\n return $searchQuery; // Return our modified query variables\n}", "title": "" }, { "docid": "934eb3d3fe77264cc5a84f817155b977", "score": "0.59154135", "text": "public function getNbPosts() \n {\n $strSQL = 'select count(*) as nbPosts from T_POST';\n $result = $this->executeQuery($strSQL);\n \n $result->setFetchMode(PDO::FETCH_OBJ);\n\n return $result->fetch()->nbPosts;\n }", "title": "" }, { "docid": "4f2b9e366cdfcf32dde0a84808b04ac0", "score": "0.5913367", "text": "function get_num_of_posts($num_of_posts) {\n if ($num_of_posts['numberposts'] == \"all\" ) {\n $integer = -1;\n } else {\n $integer = intval($num_of_posts['numberposts']);\n };\n \n $args = array( \n 'post_content',\n 'post_status' => 'publish',\n 'post_title',\n 'numberposts' => $integer,\n 'post_type' => 'post' );\n\n $posts_arr = get_posts($args);\n\n $posts_info = array();\n\n forEach( $posts_arr as $post ){\n $thumb_url = get_the_post_thumbnail_url($post -> ID);\n $category = get_the_category($post -> ID);\n $result = array();\n $result[\"quiz_id\"] = filter_quiz_id( $post -> post_content );\n $result[\"quiz_title\"] = $post -> post_title;\n $result[\"quiz_thumbnail\"] = $thumb_url;\n $result[\"quiz_category\"] = $category;\n array_push( $posts_info, $result );\n }\n\n return $posts_info;\n}", "title": "" }, { "docid": "4efbbcca6f80958f38d0b029e51e1e52", "score": "0.59081584", "text": "public function correct_found_posts( $found_posts ) {\n\n\t\tif ( empty( $this->final_options['set_count'] ) || empty( $this->final_options['set_count_paged'] ) ) {\n\t\t\treturn $found_posts;\n\t\t}\n\n\t\t// We don't have the same issues if our first page and paged counts are the same as the math is easy then\n\t\tif ( $this->final_options['set_count'] === $this->final_options['set_count_paged'] ) {\n\t\t\treturn $found_posts;\n\t\t}\n\n\t\t// Do the true calculation for pages required based on both\n\t\t// values: page 1 posts count and subsequent page post counts\n\t\t$pages_required = ( ( ( $found_posts - $this->final_options['set_count'] ) / $this->final_options['set_count_paged'] ) + 1 );\n\n\t\tif ( 0 === $this->page_number ) {\n\t\t\treturn $pages_required * $this->final_options['set_count'];\n\t\t}\n\n\t\tif ( 1 < $this->page_number ) {\n\t\t\treturn $pages_required * $this->final_options['set_count_paged'];\n\t\t}\n\n\t\treturn $found_posts;\n\t}", "title": "" }, { "docid": "b66ddbbb11ab7a430f0b228d2c7f4ab7", "score": "0.59025997", "text": "function wall_posts_per_page( $query ) {\n\n\t\t// Get Posts Per Page Number.\n\t\tif ( bp_is_activity_directory() ) {\n\t\t\t$posts_per_page = yz_option( 'yz_activity_wall_posts_per_page', 5 );\n\t\t} elseif( bp_is_user_activity() ) {\n\t\t\t$posts_per_page = yz_option( 'yz_profile_wall_posts_per_page', 5 );\n\t\t} elseif( bp_is_groups_component() ) {\n\t\t\t$posts_per_page = yz_option( 'yz_groups_wall_posts_per_page', 5 );\n\t\t} else {\n\t\t\t$posts_per_page = '';\n\t\t}\n\n\t\tif ( ! empty( $posts_per_page ) ) {\n\n\t\t\tif ( ! empty( $query ) ) {\n\t\t $query .= '&';\n\t\t }\n\n\t\t\t// Query String.\n\t\t\t$query .= 'per_page=' . $posts_per_page;\n\n\t\t}\n\n\t\t// echo $query;\n\t\treturn $query;\n\n\t}", "title": "" }, { "docid": "3578ebae1ef660bf625691572c82dd0f", "score": "0.58986264", "text": "public function custom_posts_per_page( $query ){\n\t\tglobal $wp_query;\n\t\t\n\t\t$term = $wp_query->get_queried_object();\n\t\t$term_id = ($term && !empty($term->term_id)) ? $term->term_id : 0;\n\t\t$product_cat_custom_page_id = get_woocommerce_term_meta($term_id, 'dtwpb_product_cat_custom_page', true);\n\t\t\n\t\tif ( !empty($product_cat_custom_page_id) && $query->is_archive('product_cat') ) {\n\t\t\tset_query_var('posts_per_page', apply_filters('dtwpb_custom_posts_per_page', get_option('posts_per_page')));\n\t\t}\n\t}", "title": "" }, { "docid": "7c640b87151623423ca079d44dc13698", "score": "0.5882691", "text": "public function buildPagination() {\n $this->discuss->hooks->load('pagination/build',array_merge(array(\n 'count' => $this->threads['total'],\n 'id' => 0,\n 'view' => 'thread/new_replies_to_posts',\n 'limit' => $this->threads['limit'],\n ), $this->options));\n }", "title": "" }, { "docid": "a2fccf9a41ea32788fbb4047a057f330", "score": "0.58797497", "text": "function get_limit_paginate()\n {\n return setting('page_limit');\n }", "title": "" }, { "docid": "fc5a7dd0978d767a3a4bdb0ad0ee78dd", "score": "0.58795", "text": "public function getPageSize(): int;", "title": "" }, { "docid": "fa7659adb8cf4248c6bbbc7cb9d378ce", "score": "0.5876968", "text": "protected function getPerPage(): int\n {\n return self::DEFAULT_PER_PAGE;\n }", "title": "" }, { "docid": "0622da468c19df0cc7930751fcba9aa6", "score": "0.58757925", "text": "public static function getPaginationCount(){\n\t\treturn \\Illuminate\\Database\\Query\\Builder::getPaginationCount();\n\t}", "title": "" }, { "docid": "44261856867010dc160ff432a368e73a", "score": "0.5865505", "text": "function countPost(){\n global $db;\n $limit = 12;\n $sql = \"SELECT COUNT(id) FROM post\";\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetch();\n $total_records = $result[0]; \n $total_pages = ceil($total_records / $limit); \n return $total_pages;\n}", "title": "" }, { "docid": "92146dff1226b1b6e3a79b3f0c0d56ea", "score": "0.58565533", "text": "public function paginetion() {\r\n }", "title": "" }, { "docid": "970843b56d6df0dc6ed82a5ee8c2b3e5", "score": "0.5853465", "text": "function idg_base_theme_pagination() {\n\t\tif ( ! is_paged() && get_next_posts_link() ) {\n\t\t\tprintf(\n\t\t\t\t'\n\t\t\t<div class=\"articleFeed-button\">\n\t\t\t\t<a href=\"%s\" aria-label=\"View More\" role=\"button\" class=\"btn\">\n\t\t\t\t\t%s\n\t\t\t\t</a>\n\t\t\t</div>',\n\t\t\t\tesc_url( get_next_posts_page_link() ),\n\t\t\t\tesc_html__( 'More Stories', 'idg-base-theme' )\n\t\t\t);\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<?php\n\t\t\t\tglobal $wp_query;\n\t\t\t\t$big = PHP_INT_MAX;\n\t\t\t\techo wp_kses_post(\n\t\t\t\t\tpaginate_links(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n\t\t\t\t\t\t\t'format' => '?paged=%#%',\n\t\t\t\t\t\t\t'current' => max( 1, get_query_var( 'paged' ) ),\n\t\t\t\t\t\t\t'total' => $wp_query->max_num_pages,\n\t\t\t\t\t\t\t'prev_next' => true,\n\t\t\t\t\t\t\t'end_size' => 1,\n\t\t\t\t\t\t\t'mid_size' => 1,\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</div>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "86aa0254d6a1879a5af218177ab942f1", "score": "0.58515096", "text": "function hkr_infinite_scroll_results($results) {\n if ( '' === get_option( The_Neverending_Home_Page::$option_name_enabled ) ) {\n return $results;\n }\n\n $max_pages = get_option( 'hkr_infinite_scroll_pages' );\n if ( ! $max_pages ) {\n return $results;\n }\n\n $results['max_pages'] = (int) $max_pages;\n\n return $results;\n}", "title": "" }, { "docid": "d675ea997343d82268180192ad7e703c", "score": "0.58448374", "text": "function fern_pagination_thumbs(){\n\techo '<div class=\"pag-thumbs\">';\n\tif( is_singular('post') ){\n\t\t//fancy pagination with post thumbnails\n\t\t$next_post = get_next_post();\n\t\t$prev_post = get_previous_post();\n\t?>\n\t\t<h3>More posts:</h3>\n\n\t\t<?php if($prev_post){ ?>\n\t\t\t<div class=\"pag-thumb-prev\">\n\t\t\t<a href=\"<?php echo get_permalink( $prev_post ); ?>\">\n\t\t\t\t<?php echo get_the_post_thumbnail( $prev_post, 'pag-thumbnail' ); ?>\n\t\t\t\t<h4><?php echo $prev_post->post_title; ?></h4>\n\t\t\t</a>\n\t\t\t</div>\n\t\t<?php } //end if prev post exists \n\t\tif($next_post){\n\t\t\t?>\n\t\t\t<div class=\"pag-thumb-next\">\t\t\n\t\t\t<a href=\"<?php echo get_permalink( $next_post ); ?>\">\n\t\t\t\t<?php echo get_the_post_thumbnail( $next_post, 'pag-thumbnail' ); ?>\n\t\t\t\t<h4><?php echo $next_post->post_title; ?></h4>\n\t\t\t</a>\n\t\t\t</div>\n\t\t\t<?php\n\t\t} //end if next post\n\t}\n}", "title": "" }, { "docid": "c9c9264bd2081ae2a3c4ada340361f43", "score": "0.584407", "text": "public function getWithCountPosts(string $slug);", "title": "" }, { "docid": "0618d3e24562d9b6fab2fe69b3130208", "score": "0.5840126", "text": "function pnina_popular_posts( $posts_number = 5 , $thumb = true){\r\n global $post;\r\n $original_post = $post;\r\n\r\n $args = array(\r\n 'post_type'\t\t\t\t => 'news',\r\n 'orderby'\t\t\t\t => 'comment_count',\r\n 'order'\t\t\t\t\t => 'DESC',\r\n 'posts_per_page'\t\t => $posts_number,\r\n 'post_status'\t\t\t => 'publish',\r\n 'no_found_rows' => true,\r\n 'ignore_sticky_posts'\t => true\r\n );\r\n\r\n $popularposts = new WP_Query( $args );\r\n if ( $popularposts->have_posts() ):\r\n while ( $popularposts->have_posts() ) : $popularposts->the_post();\r\n ?>\r\n <li>\r\n <div class=\"media\">\r\n <?php if ( function_exists(\"has_post_thumbnail\") && has_post_thumbnail() && $thumb ) : ?>\r\n <a class=\"media-left\" href=\"<?php the_permalink(); ?>\" rel=\"bookmark\">\r\n <?php the_post_thumbnail('thumbnail', array('class' => 'media-object img-rounded border-color-'.$count)); ?>\r\n </a>\r\n <?php endif; ?>\r\n <div class=\"media-body\">\r\n <h5 class=\"media-heading\">\r\n <a href=\"<?php the_permalink(); ?>\"><?php the_title()?></a>\r\n </h5>\r\n <p><?php the_time('F j - Y')?></p>\r\n </div>\r\n </div>\r\n </li>\r\n <?php\r\n endwhile;\r\n endif;\r\n\r\n $post = $original_post;\r\n wp_reset_query();\r\n}", "title": "" }, { "docid": "16c0cce1f2b2921756e9c8acdf4fd336", "score": "0.58367306", "text": "public function getPaginate();", "title": "" }, { "docid": "f285944847cdcc02558f687d52d44e17", "score": "0.5826431", "text": "public static function getNewest10Posts()\r\n {\r\n $q = self::getInstance()->createQuery('p')\r\n ->select('p.title,p.user_id')\r\n ->orderBy('p.id DESC')\r\n ->limit(10);\r\n\r\n return $q->execute();\r\n }", "title": "" }, { "docid": "0c30d30e13c4bf9da6ae98077ac545dd", "score": "0.58173186", "text": "public function showPostAlphabetAsPaginationPublic() {\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51'\n\t\t\t\torder by a.Title asc;\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' \n\t\t\t\t\t\t\torder by a.Title asc LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\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$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "629e11241fcc65b052ac8cb7efb85995", "score": "0.5813927", "text": "function get_records_per_page(){ return $this->records_per_page; }", "title": "" }, { "docid": "61493f1911d0e68cd0329b4fa2df3890", "score": "0.5805688", "text": "public function getPageCount()\n\t{\n\t\t/* get total number of pages */\n\t\t$query = <<<SQL\nSELECT COUNT(*) AS `count` \nFROM image_link p \nINNER JOIN `album` b ON (p.parent_id = b.id AND p.type_id = {$this::$page_content_type_id}) \nWHERE (b.id={$this->book_id->value}) \nAND (b.access='public') AND (p.access='public') \nAND (p.release_date IS NOT NULL) AND (DATEDIFF(p.release_date,NOW())<=0) \nSQL;\n\t\t$this->recordCount = $this->fetchRecords($query)[0]->count;\n\t}", "title": "" }, { "docid": "86415a7b308a89793e1241dc07eecac0", "score": "0.5803593", "text": "public function infinite()\n {\n $query = Input::get('query', \"\");\n $oldest = Input::get('oldest', 0) > 0 ? Input::get('oldest') : time();\n $oldest = date('Y-m-d H:i:s',$oldest);\n $limit = Input::get('limit', 20);\n\n // Convert comma separated string to array of integer tag ids\n $tagStrings = array_filter(explode(',', Input::get('tags', '')));\n $tagIds = array_map(\"intval\", $tagStrings);\n\n $postIds = $this->post->getIdsWithQueryTagsAndRelevance($query, $tagIds);\n\n if (empty($postIds)) {\n // No posts remaining\n return Response::json([\n 'data' => [],\n 'message' => 'No more posts remaining'\n ], 200);\n }\n\n $posts = $this->post->getForInfiniteByTime($postIds, $oldest, $limit);\n return Response::json([\n 'data' => $this->postTransformer->transformCollection($posts->toArray())\n ], 200);\n\n }", "title": "" }, { "docid": "ca4bd2c86cb0e18226c4d12cd1b1eedf", "score": "0.58028394", "text": "function onsen_pagination_callback() {\n\n if ( ! isset( $_POST['args'], $_POST['paginationNonce'], $_POST['loop'] ) ) die();\n check_ajax_referer( 'pagination-read-more', 'paginationNonce' );\n\n $args = airkit_Compilator::build_str( $_POST['args'], 'decode' );\n $loop = is_numeric( $_POST['loop'] ) ? (int)$_POST['loop'] : 0;\n\n if ( ! is_array( $args ) ) die();\n\n \n\n if ( 0 == $args['posts_per_page'] ) {\n\n $args['posts_per_page'] = get_option('posts_per_page');\n }\n\n if ( 0 < $loop ) {\n\n $args['offset'] = $offset + ( $args['posts_per_page'] * $loop );\n }\n\n if ( 0 == $loop ) {\n\n $args['offset'] = $offset + $args['posts_per_page'];\n }\n\n global $shown_ids;\n $args['post_not__in'] = $shown_ids;\n\n $query = new WP_Query( $args );\n\n $options = airkit_Compilator::build_str( $_POST['options'], 'decode' );\n\n if ( $query->have_posts() ) {\n\n while ( $query->have_posts() ) { $query->the_post();\n onsen_article($options);\n $shown_ids[] = get_the_ID();\n }\n wp_reset_postdata();\n\n } else {\n\n echo '0';\n \n }\n die();\n}", "title": "" }, { "docid": "99f7040680db0ee456b97371b30ee916", "score": "0.57984245", "text": "public function countPages()\n\t{\n\t\t// but by setting 10 we at least have some paginiation/UI updates on the CLI\n\t\t// and this handles changes to 10,000.\n\t\treturn 10;\n\t}", "title": "" }, { "docid": "356f002b7f3ce925426e988a0134460a", "score": "0.5793979", "text": "public function getPageSize();", "title": "" }, { "docid": "9901dbdad4ce9314716c5a0c35414d85", "score": "0.5790631", "text": "function keel_get_all_posts( $query ) {\n\t\t$query->set( 'posts_per_page', '-1' );\n\t}", "title": "" } ]
b923b546c05c2357961ef3e6f8418546
Get PaymentMonthly value An additional test has been added (isset) before returning the property value as this property may have been unset before, due to the fact that this property is removable from the request (nillable=true+minOccurs=0)
[ { "docid": "cede2fcf7cc9f8d3a1c7607e2ac14578", "score": "0.8221961", "text": "public function getPaymentMonthly()\n {\n return isset($this->PaymentMonthly) ? $this->PaymentMonthly : null;\n }", "title": "" } ]
[ { "docid": "01360d3bc9f587b571953ea6dd5132ca", "score": "0.70161635", "text": "public function getMonthlyPayment(){\n $this->monthlyPayment = round( ($this->principal - $this->downPayment) * ($this->interestPerMonth * (1 + $this->interestPerMonth)**$this->totalMonths) /((1 + $this->interestPerMonth)**$this->totalMonths - 1), 2 );\n return $this-> monthlyPayment;\n\n }", "title": "" }, { "docid": "5f8758ca40abfd89ca14dea8285aa661", "score": "0.6647976", "text": "private function getMonthlyFeePayment(){\n if( !$this->input_template['house_price_per_month'] ) return 0;\n return $this->input_template['house_price_per_month'];\n\n }", "title": "" }, { "docid": "9ea9a7428461b716d66ec437c921c815", "score": "0.60362417", "text": "public function setPaymentMonthly(\\StructType\\PaymentItem $paymentMonthly = null)\n {\n if (is_null($paymentMonthly) || (is_array($paymentMonthly) && empty($paymentMonthly))) {\n unset($this->PaymentMonthly);\n } else {\n $this->PaymentMonthly = $paymentMonthly;\n }\n return $this;\n }", "title": "" }, { "docid": "27adfa52946bb50d67bfcc1cc4ae5220", "score": "0.5970487", "text": "public function isPayMonthly()\n {\n if (self::PAYBY_MONTHLY == $this->payBy) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "42d54a5ff22dfd690de2c373f55efe13", "score": "0.587807", "text": "public function monthly($value) {\n return $this->setProperty('monthly', $value);\n }", "title": "" }, { "docid": "f4ff20e445d2c8c351d1308c97c71c75", "score": "0.57721657", "text": "public function getMonth()\n {\n return $this->data['fields']['month'];\n }", "title": "" }, { "docid": "5fa7e4a1a3fbaef6287e553a1c5443f5", "score": "0.5763867", "text": "public function getPaidValue() {\n // current term\n $term = AccountSetting::getCurrentTerm();\n // old balance\n $oldBalance = $this->getOldBalance();\n // current balance of year\n $currentBalance = $this->getCurrentBalance($term->id);\n // value should pay in store\n $value = 0;\n \n if ($oldBalance > 0) {\n if ($this->is_old_installed) {\n $installment = $this->getReadyInstallment('old');\n $value = optional($installment)->value;\n } else \n $value = $oldBalance;\n } else {\n if ($this->is_current_installed) {\n $value = optional(Installment::where('student_id', $this->id)->where('type', 'new')->where('paid', '0')->first())->value;\n } else\n $value = $currentBalance;\n }\n return $value;\n }", "title": "" }, { "docid": "5f2c515a4c650d78858d1344febf11f6", "score": "0.5759954", "text": "protected function _monthly() {\n \n }", "title": "" }, { "docid": "9eac0975d29fd884ed4d98653dbbfeb6", "score": "0.57208854", "text": "public function getPayment() {\n return $this->payment;\n }", "title": "" }, { "docid": "f09a218ad5df7fb931c00c3b654d4457", "score": "0.5710558", "text": "public function getPaymentDayOfMonth()\n {\n return $this->paymentDayOfMonth;\n }", "title": "" }, { "docid": "fab4a888e0bcf016cf4a38e5af9dc4ca", "score": "0.5693145", "text": "public function getMonth() {\n\t\treturn $this->month;\n\t}", "title": "" }, { "docid": "0dcad9f3778fa5a57a9a622b74549b85", "score": "0.5684797", "text": "public function getMonth(): stdClass;", "title": "" }, { "docid": "8d40c8b129e6bef7ed2c258b73e1b012", "score": "0.56715614", "text": "public function get_payment(){\n\t\treturn $this->payment;\n\t}", "title": "" }, { "docid": "2853a0f8f1df3804a4d323697e79ebae", "score": "0.5662966", "text": "public function isMonthlyBilled(): bool;", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.5647804", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.5647804", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.5647804", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "32d75533958887a71e2c3cfeb042ef43", "score": "0.56281745", "text": "public function getIntendedBillAmountPerMonth()\n {\n return $this->intendedBillAmountPerMonth;\n }", "title": "" }, { "docid": "54a0f77a4198cdaeda2dfcd7d63c8fef", "score": "0.56251466", "text": "public function getExpiry_month()\n {\n return $this->expiry_month;\n }", "title": "" }, { "docid": "47da5e04dfc26b0d5ec34fa1dc0437bb", "score": "0.55863494", "text": "public function getPaid()\n {\n return $this->paid;\n }", "title": "" }, { "docid": "825dfa0742c931563bf4c9a952eed44a", "score": "0.55768293", "text": "public function getMonth(){\treturn $this->retrieve(sfTime::MONTH);\t\t}", "title": "" }, { "docid": "ae1daded45d7b93cba4de1b9240f9314", "score": "0.55765265", "text": "public function getExpire_month()\r\n {\r\n return $this->expire_month;\r\n }", "title": "" }, { "docid": "3d88a031c7ba66273901d8c95dc55f6a", "score": "0.5549914", "text": "public function getExpMonth(): ?int\n {\n return $this->expMonth;\n }", "title": "" }, { "docid": "e188a0089fc737b59d5a379050e21ae2", "score": "0.55021733", "text": "public function getExpiryMonth() : ?string\n {\n if (isset($this->data['expmonth']) && $this->data['expmonth']) {\n return str_pad($this->data['expmonth'], 2, \"0\", STR_PAD_LEFT);\n }\n return null;\n }", "title": "" }, { "docid": "6ef4cf35b2426b977172bf17ae7f8e8e", "score": "0.54387414", "text": "public function getExpireMonth()\r\n {\r\n return $this->expire_month;\r\n }", "title": "" }, { "docid": "fb82d77c38011f904db9c078bd4effba", "score": "0.5385972", "text": "public function getDepositPayment()\n {\n return $this->depositPayment;\n }", "title": "" }, { "docid": "314f4d99a455a428fed7d99645533bd1", "score": "0.5367153", "text": "public function month(): int\n {\n return $this->month;\n }", "title": "" }, { "docid": "08dfcf21500c4d23f907b9f2135551d8", "score": "0.53669196", "text": "function payment_fee() {\r\n return $this->Payment_fee;\r\n }", "title": "" }, { "docid": "36ba0b843ea4df095ec0a3fb7c3c75b9", "score": "0.5356109", "text": "public function getPaid()\n {\n // @TODO implement this logic\n return false;\n }", "title": "" }, { "docid": "b96be29dd980616f098192d601fd3543", "score": "0.53490937", "text": "public function getMonth()\n {\n return $this->getProperty('mon');\n }", "title": "" }, { "docid": "2f24d5dfda49abeefe5107d793722879", "score": "0.5333952", "text": "public function getMonthlyQuota()\n {\n return $this->monthlyQuota;\n }", "title": "" }, { "docid": "68328b16192a1f16caa9e6645d9f8686", "score": "0.53051287", "text": "public function getTotalMonth();", "title": "" }, { "docid": "229adc0875974351b05a7e3289f7d03d", "score": "0.53048426", "text": "public function getExpirationMonth()\n {\n return $this->expirationMonth;\n }", "title": "" }, { "docid": "a7348bb2d5da1b2885bcf9369d0acaef", "score": "0.5291547", "text": "public function getPaid(): ?bool\n {\n return $this->paid;\n }", "title": "" }, { "docid": "a7348bb2d5da1b2885bcf9369d0acaef", "score": "0.5291547", "text": "public function getPaid(): ?bool\n {\n return $this->paid;\n }", "title": "" }, { "docid": "382bb2d67be835f8d795417dfecce875", "score": "0.5269304", "text": "function getPaymentFieldRequired();", "title": "" }, { "docid": "d1f8d341f17e72fd1dc6d11d935ea7a9", "score": "0.5247158", "text": "public function testGetPaymentValue()\n {\n $oPayment = oxNew('oxPayment');\n\n $oPayment->load('oxidpayadvance');\n $dBasePrice = 100.0;\n $this->assertEquals(0, $oPayment->getPaymentValue($dBasePrice));\n\n $oPayment->load('oxidcashondel');\n $this->assertEquals(7.5, $oPayment->getPaymentValue($dBasePrice));\n\n $oPayment->oxpayments__oxaddsum = new oxField(-105, oxField::T_RAW);\n $this->assertEquals(100, $oPayment->getPaymentValue($dBasePrice));\n }", "title": "" }, { "docid": "6e33acdd5c0e19e4205889e13be63ac5", "score": "0.520209", "text": "public function getMonths()\n {\n return $this->months;\n }", "title": "" }, { "docid": "e11d4fc8a28e03f242a3570cb36707da", "score": "0.5168623", "text": "public function getArchiveMonth()\n {\n $month = $this->request->param('Month');\n\n if (preg_match('/^[0-9]{1,2}$/', $month)) {\n if ($month > 0 && $month < 13) {\n if (checkdate($month, 01, $this->getArchiveYear())) {\n return (int) $month;\n }\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "6c81042bb395e80915f50b63fd5fd226", "score": "0.5148893", "text": "public function getMonths(): int\n {\n return $this->internal->m;\n }", "title": "" }, { "docid": "b2ebc3a4c4cda501056bcebb2f70ca4a", "score": "0.51345205", "text": "public function getPaymentDate(): ?DateTime;", "title": "" }, { "docid": "e99b62525b7c0597f5ec4c0c38951f8b", "score": "0.5116246", "text": "public function getPaidAmount()\n {\n return $this->paidAmount;\n }", "title": "" }, { "docid": "125d73c5fa4e791f8bfc205133a193cc", "score": "0.51132584", "text": "public function getPaymentData()\n {\n return $this->paymentData;\n }", "title": "" }, { "docid": "bc4a8dceff98f366d24b3224845b2c27", "score": "0.5109454", "text": "public function getPaymentInitial()\n {\n return isset($this->PaymentInitial) ? $this->PaymentInitial : null;\n }", "title": "" }, { "docid": "d423e34870147edc75555e64fe4fd8c2", "score": "0.51023173", "text": "public function getCreditCartExpirationMonth()\n {\n return $this->creditCartExpirationMonth;\n }", "title": "" }, { "docid": "b13f89a6ced4c8d03f714cd08bf37c81", "score": "0.5093684", "text": "public function getCardExpirationMonth()\n {\n return $this->cardExpirationMonth;\n }", "title": "" }, { "docid": "6f9b4d4e736bae57a712334229466468", "score": "0.5082909", "text": "public function getSettlementFullDataForMonth(BillingMonth $billingMonth) : array {\n $data = [\n 'costSum' => 0,\n 'incomeSum' => 0,\n 'incomeTax' => 0,\n 'vatTax' => 0,\n 'usedTaxFreeAllowance' => 0,\n 'restTaxFreeAllowance' => 0,\n 'surplusIncomeTax' => 0,\n 'surplusVatTax' => 0,\n 'realIncome' => 0,\n 'quarterIncomeTax' => 0,\n 'quarterVatTax' => 0,\n 'taxSum' => 0,\n 'quarterTaxSum' => 0,\n 'deductionFromIncomeTaxAmount' => 0,\n ];\n \n // base billing month settlement values\n if ($billingMonth->getBillingMonthSettlement()) {\n $data['costSum'] = $billingMonth->getBillingMonthSettlement()->getCostSum();\n $data['incomeSum'] = $billingMonth->getBillingMonthSettlement()->getIncomeSum();\n $data['incomeTax'] = $billingMonth->getBillingMonthSettlement()->getIncomeTax();\n $data['vatTax'] = $billingMonth->getBillingMonthSettlement()->getVatTax();\n $data['usedTaxFreeAllowance'] = $billingMonth->getBillingMonthSettlement()->getUsedTaxFreeAllowance();\n $data['restTaxFreeAllowance'] = $billingMonth->getBillingMonthSettlement()->getRestTaxFreeAllowance();\n $data['surplusIncomeTax'] = $billingMonth->getBillingMonthSettlement()->getSurplusIncomeTax();\n $data['surplusVatTax'] = $billingMonth->getBillingMonthSettlement()->getSurplusVatTax(); \n $data['realIncome'] = $billingMonth->getBillingMonthSettlement()->getRealIncome();\n $data['deductionFromIncomeTaxAmount'] = $billingMonth->getBillingMonthSettlement()->getDeductionFromIncomeTaxAmount();\n }\n \n // quarter values\n $data['quarterIncomeTax'] = $this->getSettlementQuarterIncomeTaxForDate($billingMonth->getDate());\n $data['quarterVatTax'] = $this->getSettlementQuarterVatTaxForDate($billingMonth->getDate());\n \n // sums\n $data['taxSum'] = $data['incomeTax'] + $data['vatTax'];\n $data['quarterTaxSum'] = $data['quarterIncomeTax'] + $data['quarterVatTax'];\n \n return $data;\n }", "title": "" }, { "docid": "1393f25c8957b3d5959451a1ff2c2771", "score": "0.5080751", "text": "function payment_date() {\r\n return $this->Payment_date;\r\n }", "title": "" }, { "docid": "a41c56ba5528ba26e691169711c0d3b6", "score": "0.5080324", "text": "public function getPaymillCcMonths()\n {\n $months[0] = $this->__('Month');\n $months = array_merge($months, Mage::getSingleton('payment/config')->getMonths());\n\n return $months;\n }", "title": "" }, { "docid": "38891d60c4328396e9889c80f7acde30", "score": "0.5073186", "text": "public function getMonth(){\r\n return $this->format('m');\r\n }", "title": "" }, { "docid": "834c02ac13a310336bd04d6bc3115a93", "score": "0.5053287", "text": "public function billPayment()\n {\n return $this->billPaymentDao->billPayment();\n }", "title": "" }, { "docid": "980496393bc584b0fe1d26130f35c799", "score": "0.5050894", "text": "function getNotPaidThisMonth($syear, $month) {\r\n \t$eyear = $syear+1;\r\n \t$years = ($syear.','.$eyear);\r\n \t$sdate = $syear.'-10-01';\r\n \t$edate = $eyear.'-09-30';\r\n \t$sql = \"select\r\n\t\t\t\t\tconcat(father_name,' ', mother_name) parent_name,\r\n \t\t\t\tfather_name, father_cell, mother_name, mother_cell,\r\n \t\t\t\tconcat(address,', ',city,' - ', zipcode) address_line, phone,\r\n \t\t\t \tfinancial_aid, total_fee,\r\n \t\t\t\t(select count(ss.id) from school_student ss where se.id = ss.enrollment_id\r\n \t\t\t\t and ss.active = 1) no_of_student\r\n\t\t\t\tfrom\r\n\t\t\t\t\tschool_enrollment se\r\n\t\t\t\t\tleft join school_fee sf on se.id = sf.enrollment_id\r\n \t\t\t\t\tand fee_date>=? and fee_date <=? and month(fee_date) =?\r\n\t\t\t\tgroup by\r\n\t\t\t\t\tparent_name\r\n \t\t\thaving\r\n \t\t\t\tif(SUM(amount) is null,0,SUM(amount))=0\";\r\n \t$stmt = $this->conn->prepare($sql);\r\n \t$this->db->checkError();\r\n \t$stmt->bind_param('ssi', $sdate, $edate, $month);\r\n \t$this->db->checkError();\r\n \t$stmt->execute();\r\n \t$this->db->checkError();\r\n\r\n \t$reports = array();\r\n \t$stmt->bind_result($parent_name, $father_name, $father_cell, $mother_name, $mother_cell,\r\n \t\t\t$address_line, $phone, $financial_aid, $total_fee, $no_of_student);\r\n \twhile ($stmt->fetch()) {\r\n \t\t$reports[] = array(\r\n \t\t\t\t'parent_name' => $parent_name,\r\n \t\t\t\t'father_name' => $father_name,\r\n \t\t\t\t'father_cell' => $father_cell,\r\n \t\t\t\t'mother_name' => $mother_name,\r\n \t\t\t\t'mother_cell' => $mother_cell,\r\n \t\t\t\t'address_line' => $address_line,\r\n \t\t\t\t'phone' => $phone,\r\n \t\t\t\t'financial_aid' => $financial_aid,\r\n \t\t\t\t'total_fee' => $total_fee,\r\n \t\t\t\t'no_of_student' => $no_of_student);\r\n \t}\r\n \t$stmt->close();\r\n\r\n \treturn $reports;\r\n }", "title": "" }, { "docid": "044d8911ffb04fb4a30182f9db3a45ea", "score": "0.5048218", "text": "function getPartialPaidThisMonth($syear, $month) {\r\n \t$eyear = $syear+1;\r\n \t$years = ($syear.','.$eyear);\r\n \t$sdate = $syear.'-10-01';\r\n \t$edate = $eyear.'-09-30';\r\n \t$sql = \"select\r\n\t\t\t\t\tconcat(father_name,' ', mother_name) parent_name,\r\n \t\t\t\tfather_name, father_cell, mother_name, mother_cell,\r\n \t\t\t\tconcat(address,', ',city,' - ', zipcode) address_line, phone,\r\n \t\t\t \tfinancial_aid, total_fee,\r\n \t\t\t\t(select count(ss.id) from school_student ss where se.id = ss.enrollment_id\r\n \t\t\t\t and ss.active = 1) no_of_student, if(SUM(amount) is null,0,SUM(amount)) sum_amount\r\n\t\t\t\tfrom\r\n\t\t\t\t\tschool_enrollment se\r\n\t\t\t\t\tleft join school_fee sf on se.id = sf.enrollment_id\r\n \t\t\t\t\tand fee_date>=? and fee_date <=? and month(fee_date) =?\r\n\t\t\t\tgroup by\r\n\t\t\t\t\tparent_name\r\n \t\t\thaving\r\n \t\t\t\tSUM(amount)!=se.total_fee\";\r\n \t$stmt = $this->conn->prepare($sql);\r\n \t$this->db->checkError();\r\n \t$stmt->bind_param('ssi', $sdate, $edate, $month);\r\n \t$this->db->checkError();\r\n \t$stmt->execute();\r\n \t$this->db->checkError();\r\n \r\n \t$reports = array();\r\n \t$stmt->bind_result($parent_name, $father_name, $father_cell, $mother_name, $mother_cell,\r\n \t\t\t$address_line, $phone, $financial_aid, $total_fee, $no_of_student, $sum_amount);\r\n \twhile ($stmt->fetch()) {\r\n \t\t$reports[] = array(\r\n \t\t\t\t'parent_name' => $parent_name,\r\n \t\t\t\t'father_name' => $father_name,\r\n \t\t\t\t'father_cell' => $father_cell,\r\n \t\t\t\t'mother_name' => $mother_name,\r\n \t\t\t\t'mother_cell' => $mother_cell,\r\n \t\t\t\t'address_line' => $address_line,\r\n \t\t\t\t'phone' => $phone,\r\n \t\t\t\t'financial_aid' => $financial_aid,\r\n \t\t\t\t'total_fee' => $total_fee,\r\n \t\t\t\t'no_of_student' => $no_of_student,\r\n \t\t\t\t'sum_amount' => $sum_amount);\r\n \t}\r\n \t$stmt->close();\r\n \r\n \treturn $reports;\r\n }", "title": "" }, { "docid": "bae4f504479db21655bb16d6fcc504fe", "score": "0.504556", "text": "function mc_fee() {\r\n return $this->Mc_fee;\r\n }", "title": "" }, { "docid": "17ad59c4873e4bdc785c8efc72a38a99", "score": "0.49914503", "text": "public function isPaid()\n {\n return $this->isPaid;\n }", "title": "" }, { "docid": "bccf1d9d6d37770536e66c4f0d64ba33", "score": "0.4962752", "text": "public function getPaymentStatus()\n {\n return $this->paymentStatus;\n }", "title": "" }, { "docid": "d56c948ae6b5b26082221438ff0997a4", "score": "0.49552292", "text": "function hasPaid(){\n\t\treturn $this->getPaymentStatus() == 1 ? true : false; \n\t}", "title": "" }, { "docid": "a843f130a060c0841992ffc460cd6bc4", "score": "0.49499255", "text": "public function totalPaymentDue($totalPaymentDue)\n {\n return $this->setProperty('totalPaymentDue', $totalPaymentDue);\n }", "title": "" }, { "docid": "1680ad8ea08351e55d9da53f87acaa67", "score": "0.49481443", "text": "public static function getMonthlyGoal($customerId)\n {\n \t$monthlyGoal = self::where('customer_id', $customerId)->pluck('monthly_goal');\n \treturn $monthlyGoal;\n }", "title": "" }, { "docid": "5046dfa33fb4fe65b5b6088562e1eb24", "score": "0.49459738", "text": "public function paymentDue($paymentDue)\n {\n return $this->setProperty('paymentDue', $paymentDue);\n }", "title": "" }, { "docid": "abeeee8e34b15e1edcb0539f6bab148b", "score": "0.49393132", "text": "public function getWeeklyRepaymentAttribute()\n {\n return $this->total / $this->duration;\n }", "title": "" }, { "docid": "74d2c8bf323ca23d82964fdb583605e0", "score": "0.49351576", "text": "public function hasMonths();", "title": "" }, { "docid": "c030674ce2558b50fbf47b058102a955", "score": "0.49334627", "text": "public function pay_monthly()\n\t{\n\t\t$data['title'] = $this->Xin_model->site_title();\n\t\t$id = $this->input->get('employee_id');\n\t\t// get addd by > template\n\t\t$user = $this->Xin_model->read_user_info($id);\n\t\t$result = $this->Payroll_model->read_template_information_byempid($id);\n\t\t$department = $this->Department_model->read_department_information($user[0]->department_id);\n\t\t$location = $this->Location_model->read_location_information($department[0]->location_id);\n\t\tif($result){\n\t\t\t$data = array(\n\t\t\t\t'department_id' => $user[0]->department_id,\n\t\t\t\t'designation_id' => $user[0]->designation_id,\n\t\t\t\t'location_id' => $location[0]->location_id,\n\t\t\t\t'company_id' => $location[0]->company_id,\n\t\t\t\t'salary_template_id' => $result[0]->salary_template_id,\n\t\t\t\t'user_id' => $user[0]->user_id,\n\t\t\t\t'salary_with_bonus' => $result[0]->salary_with_bonus,\n\t\t\t\t'added_by' => $result[0]->added_by,\n\t\t\t);\n\t\t}\n\t\tif(!empty($this->userSession)){\n\t\t\t$this->load->view('payroll/dialog_make_payment', $data);\n\t\t} else {\n\t\t\tredirect('');\n\t\t}\n\t}", "title": "" }, { "docid": "4d90d2f7110fe179a7c940d0b946995a", "score": "0.4915099", "text": "public function getPayDebit()\n {\n return $this->pay_debit;\n }", "title": "" }, { "docid": "0c1abf4e0f40fbfe13547c08e42dde7e", "score": "0.49146882", "text": "public function getMontoActual()\n {\n $total=ProyectoUsuarioAsignar::find()->select(['sum((enero+febrero+marzo+abril+mayo+junio+julio+agosto+septiembre+octubre+noviembre+diciembre)*precio) as total'])->innerJoin('proyecto_pedido', 'proyecto_usuario_asignar.id = proyecto_pedido.asignado')->where(['proyecto_usuario_asignar.proyecto_id' => $this->id])->asArray()->One();\n\n if($total!=null)\n {\n return $total['total'];\n }\n else\n {\n return null;\n }\n }", "title": "" }, { "docid": "6e6fb2f33e303160686a646ac7e07567", "score": "0.49135476", "text": "public function getDonationAmountPaid()\n\t{\n\t\treturn $this->donation_amount_paid;\n\t}", "title": "" }, { "docid": "ea88560fca3b3371cea42a9a396041f7", "score": "0.49050742", "text": "public function getStatusAttribute($value){\n $now=Carbon::now('GMT+7');\n $last_paid=$this->getOriginal('last_paid_interest_at');\n if ( !empty ( $last_paid ) ) {\n $year=Carbon::parse($last_paid)->year;\n $month=Carbon::parse($last_paid)->month;\n if ($now->subMonth()->month ==$month) {\n if ($this->balance == 0) {\n return $value=false;\n }\n return $value=true;\n }else {\n return $value=false;\n }\n }\n\n return $value;\n\n }", "title": "" }, { "docid": "d5c8f43d9bdb4368799def9f4ee324ad", "score": "0.4897586", "text": "public function getPaymentStatus();", "title": "" }, { "docid": "d5c8f43d9bdb4368799def9f4ee324ad", "score": "0.4897586", "text": "public function getPaymentStatus();", "title": "" }, { "docid": "42f7363fcd6f18ecb3d7d3b06cc9a686", "score": "0.48962277", "text": "public function getPaidDate()\n {\n return $this->paidDate;\n }", "title": "" }, { "docid": "16e3ab75a68a8ad7ff40d24d4ecdf688", "score": "0.48944736", "text": "function payment_status() {\r\n return $this->Payment_status;\r\n }", "title": "" }, { "docid": "17e4fce39b0ca589ec7ac4d72733023a", "score": "0.4891364", "text": "public function testSetPaymentAndGetPaymentId()\n {\n // testing if value is taken from request\n $this->getSession()->setVariable('paymentid', 'xxx');\n $oBasket = oxNew('oxbasket');\n $this->assertEquals('xxx', $oBasket->getPaymentId());\n\n // testing if value is taken from setter\n $oBasket->setPayment('yyy');\n $this->assertEquals('yyy', $oBasket->getPaymentId());\n }", "title": "" }, { "docid": "20b572dfa02fb8775502df29ab9d9f03", "score": "0.48841572", "text": "public function getMonth()\r\n\t{\r\n\t\t$date = $this->getDateObject();\r\n\t\t\r\n\t\treturn date(\"n\",$date);\r\n\t}", "title": "" }, { "docid": "2efd6a5f98075134eefbd3c6b2538fe8", "score": "0.48780024", "text": "abstract public function getPayment();", "title": "" }, { "docid": "fb8e69849971eae123dc830b5f1e8277", "score": "0.4873953", "text": "public static function monthly_payment(Plan $plan, User $user, Financial $financial, Request $request, MonthlyPayment $mp)\n\t{\n\t\tif (empty($financial) || empty($user) || empty($plan) || empty($mp) || empty($request))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = new \\stdClass();\n\n\t\ttry\n\t\t{\n\t\t\t$data = array();\n\n\t\t\t// via config\n\t\t\t$data[\"email\"] = config('app.payment_email');\n\t\t\t$data[\"token\"] = config('app.payment_token');\n\t\t\t$data['receiverEmail'] = config('app.payment_email_shop');\n\t\t\t$data['currency'] = config('app.payment_currency');\n\t\t\t$data['itemQuantity1'] = config('app.payment_qtt');\n\t\t\t$data['notificationURL'] = config('app.payment_notification');\n\t\t\t// via code\n\t\t\t$data['reference'] = Codes::generateCode();\n\n\t\t\t// via request\n\t\t\t$data['itemDescription1'] = \"Mensal. {$plan->name}, valor R$ {$plan->amount}\";\n\t\t\t$data['senderHash'] = $request->hash_card;\n\t\t\t$data['itemAmount1'] = $plan->amount;\n\n\t\t\t// via financial\n\t\t\tif ($user->Person()->exists())\n\t\t\t{\n\t\t\t\t$data['senderCPF'] = Codes::clean( $user->PersonOrLegal->cpf );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['senderCNPJ'] = Codes::clean( $user->PersonOrLegal->cnpj );\n\t\t\t}\n\n\t\t\t$data['shippingAddressRequired'] = $financial->address;\n\n\t\t\t// via constante\n\t\t\t$data['paymentMode'] = self::Mode;\n\t\t\t$data['paymentMethod'] = self::Method;\n\n\t\t\t// via campaign\n\t\t\t$data['itemId1'] = $mp->id;\n\n\t\t\t// via user\n\t\t\t$data['senderName'] = urldecode($user->first_name . \" \" . $user->last_name);\n\t\t\t$data['senderAreaCode'] = $user->ddd;\n\t\t\t$data['senderPhone'] = $user->phone;\n\t\t\t$data['senderEmail'] = urldecode($user->email);\n\n\t\t\t$buildQuery = http_build_query($data);\n\t\t\t$url = config('app.payment_url').\"transactions\";\n\n\t\t\t$curl = curl_init($url);\n\t\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, Array(\"Content-Type: application/x-www-form-urlencoded; charset=ISO-8859-1\"));\n\t\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, !config('app.debug') );\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $buildQuery);\n\t\t\t$return = curl_exec($curl);\n\t\t\tcurl_close($curl);\n\t\t\t$xml = @simplexml_load_string($return);\n\n\t\t\tif (isset($xml->error->message)) \n\t\t\t{\n\t\t\t\tthrow new \\Exception($xml->error->message);\n\t\t\t}\n\n\t\t\t$result->result = $xml;\n\t\t\t$result->data = $data;\n\t\t\t$result->status = Response::HTTP_CREATED;\n\t\t\t$result->is_done = true;\n\n\t\t}\n\t\tcatch (\\Throwable $e)\n\t\t{\n\t\t\t$result->result = $e->getMessage();\n\t\t\t$result->data = [];\n\t\t\t$result->status = Response::HTTP_INTERNAL_SERVER_ERROR;\n\t\t\t$result->is_done = false;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a1a0bbf80a056c526ae017d67e235c85", "score": "0.48723936", "text": "public function getPaymentStatusAttribute(): ?string\n {\n return Arr::get($this->payment_data, 'status.status');\n }", "title": "" }, { "docid": "e3a2099ce55d47e2ed41c84fd729384a", "score": "0.4869061", "text": "public function minimumPaymentDue($minimumPaymentDue)\n {\n return $this->setProperty('minimumPaymentDue', $minimumPaymentDue);\n }", "title": "" }, { "docid": "20d173b971c218fdf23237a27c4817ad", "score": "0.48689494", "text": "protected function getMonthlyVariance()\n {\n if ( ! $this->monthly_variance)\n {\n $this->monthly_variance = $this->getMonthlyActualValue() - $this->getMonthlyBudgetValue();\n }\n return $this->monthly_variance;\n }", "title": "" }, { "docid": "a8be33772fa799c042eef001d011543f", "score": "0.48680717", "text": "public function getPaymentStatus()\n\t{\n\t\treturn $this->data['payment_status'];\n\t}", "title": "" }, { "docid": "167f40a25fe895d72ee88c594c327e1a", "score": "0.48623937", "text": "public function chargeMonthlyPayment() {\n $users = User::whereNull('deleted_at')\n ->whereNull('pm_type')\n // ->where('users.created_at', '<', strtotime(date('Ym').'01 00:00:00'))\n ->get();\n foreach($users as $user) {\n $paid = 0;\n Stripe::setApiKey(env('STRIPE_SECRET'));\n if(!$user->hasPaymentMethod()) {\n $this->sendEmailToUser($user);\n $this->sendEmailToOwner($user);\n } else {\n $customer = [];\n try {\n $customer = \\Stripe\\Customer::retrieve($user->stripe_id);\n $amount = $user->salon->fee;\n Charge::create(array(\n 'amount' => $amount,\n 'currency' => 'jpy',\n 'customer' => $customer->id\n ));\n $paid = $amount;\n } catch( \\Exception $e ){\n // send email to user and owner\n echo('エラー!');\n $this->sendEmailToUser($user);\n $this->sendEmailToOwner($user);\n $paid = null;\n echo(1);\n }\n }\n $yearMonth = (int)(date(\"Y\").date(\"m\"));\n echo($user->id.' '.$yearMonth);\n Payment::insert([\n 'amount' => $paid,\n 'salon_id' => $user->salon->id,\n 'user_id' => $user->id,\n 'payment_for' => $yearMonth,\n 'created_at' => now()\n ]);\n }\n }", "title": "" }, { "docid": "afd1af41d68e0d3f7c0f2fd994ff1fe8", "score": "0.4851659", "text": "public function add_pay_monthly() {\n\t\tif($this->input->post('add_type')=='add_monthly_payment') {\n\t\t\t$Return = array('result'=>'', 'error'=>'');\n\t\t\tif($this->input->post('payment_method')==='') {\n\t\t\t\t$Return['error'] = \"The payment method field is required.\";\n\t\t\t} else if($this->input->post('comments')==='') {\n\t\t\t\t$Return['error'] = \"The comments field is required.\";\n\t\t\t}\n\n\t\t\tif($Return['error']!=''){\n\t\t\t\t$this->output($Return);\n\t\t\t}\n\n\t\t\tif($this->input->post('comments')){\n\t\t\t\t$com=$this->input->post('comments');\n\t\t\t}else{\n\t\t\t\t$com='';\n\t\t\t}\n\t\t\t$s_end_date=salary_start_end_date($this->input->post('pay_date'));\n\n\t\t\t$tax_value=[];\n\t\t\tif($this->input->post('tax_name')){\n\t\t\t\t$count_of_tax=count($this->input->post('tax_name'));\n\t\t\t\t$tax_name=$this->input->post('tax_name');\n\t\t\t\t$tax_percentage=$this->input->post('tax_percentage');\n\t\t\t\t$tax_amount=$this->input->post('tax_amount');\n\t\t\t\tfor($i=0;$i<$count_of_tax;$i++){\n\t\t\t\t\t$tax_value[]=array('tax_name'=>$tax_name[$i],'tax_percentage'=>$tax_percentage[$i],'tax_amount'=>$tax_amount[$i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$data = array(\n\t\t\t\t'employee_id' => $this->input->post('emp_id'),\n\t\t\t\t'department_id' => $this->input->post('department_id'),\n\t\t\t\t'company_id' => $this->input->post('company_id'),\n\t\t\t\t'location_id' => $this->input->post('location_id'),\n\t\t\t\t'designation_id' => $this->input->post('designation_id'),\n\t\t\t\t'payment_date' => $this->input->post('pay_date'),\n\t\t\t\t'payment_amount' => $this->input->post('payment_amount'),\n\t\t\t\t'payment_amount_to_employee' => ($this->input->post('payment_amount')-$this->input->post('perpertual_amount')),\n\t\t\t\t'basic_salary' => $this->input->post('basic_salary'),\n\t\t\t\t'salary_with_bonus' => $this->input->post('salary_with_bonus'),\n\t\t\t\t'total_salary' => $this->input->post('total_salary'),\n\t\t\t\t'salary_template_id' => $this->input->post('salary_template_id'),\n\t\t\t\t'salary_components' => $this->input->post('salary_components'),\n\t\t\t\t'bonus' => $this->input->post('bonus'),\n\t\t\t\t'required_working_hours' => $this->input->post('required_working_hours'),\n\t\t\t\t'total_working_hours' => $this->input->post('total_working_hours'),\n\t\t\t\t'late_working_hours' => $this->input->post('late_working_hours'),\n\t\t\t\t'rate_per_hour_contract_bonus' => $this->input->post('rate_per_hour_contract_bonus'),\n\t\t\t\t'rate_per_hour_contract_only' => $this->input->post('rate_per_hour_contract_only'),\n\t\t\t\t'rate_per_hour_basic_only' => $this->input->post('rate_per_hour_basic_only'),\n\t\t\t\t'ot_day_rate' => $this->input->post('ot_day_rate'),\n\t\t\t\t'ot_night_rate' => $this->input->post('ot_night_rate'),\n\t\t\t\t'ot_holiday_rate' => $this->input->post('ot_holiday_rate'),\n\t\t\t\t'leave_salary_paid' => $this->input->post('leave_salary_paid'),\n\t\t\t\t'leave_salary_amount' => $this->input->post('leave_salary_amount'),\n\t\t\t\t'ot_hours_amount' => $this->input->post('ot_hours_amount'),\n\t\t\t\t'actual_days_worked' => $this->input->post('actual_days_worked'),\n\t\t\t\t'is_payment' => '1',\n\t\t\t\t'payment_method' => $this->input->post('payment_method'),\n\t\t\t\t'comments' => $com,\n\t\t\t\t'status' => '1',\n\t\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t\t\t'currency' => $this->Xin_model->currency_sign('',$location_id='',$this->input->post('emp_id')),\n\t\t\t\t'leave_start_date' => $this->input->post('leave_start_date'),\n\t\t\t\t'leave_end_date' => $this->input->post('leave_end_date'),\n\t\t\t\t'annual_leave_salary' => $this->input->post('annual_leave_salary'),\n\t\t\t\t'month_salary' => $this->input->post('month_salary'),\n\t\t\t\t'joining_month_salary' => $this->input->post('joining_month_salary'),\n\t\t\t\t'payment_amount_with_tax' => $this->input->post('payment_amount_with_tax'),\n\t\t\t\t'tax_amount' => json_encode($tax_value),\n\t\t\t\t'driver_delivery_details'=>$this->input->post('driver_delivery_details'),\n\t\t\t);\n\n\t\t\t//echo \"<pre>\";print_r($data);die;\n\t\t\tif($this->input->post('adjustment_id')){\n\t\t\t\t$adjustment_id=$this->input->post('adjustment_id');\n\t\t\t\t$adjustment_type=$this->input->post('parent_type');\n\t\t\t\t$adjustment_name=$this->input->post('child_type');\n\t\t\t\t$adjustment_amount=$this->input->post('amount');\n\t\t\t\t$comments=$this->input->post('salary_comments');\n\t\t\t\t$aj=0;\n\t\t\t\tforeach($adjustment_id as $adjus){\n\t\t\t\t\tif($adjus==0){\n\t\t\t\t\t\t$data_adj = array(\n\t\t\t\t\t\t\t'adjustment_type' => $adjustment_type[$aj],\n\t\t\t\t\t\t\t'adjustment_name' => $adjustment_name[$aj],\n\t\t\t\t\t\t\t'adjustment_amount' => $adjustment_amount[$aj],\n\t\t\t\t\t\t\t'adjustment_for_employee' => $this->input->post('emp_id'),\n\t\t\t\t\t\t\t'adjustment_perpared_by' => $this->userSession['user_id'],\n\t\t\t\t\t\t\t'salary_type' => 'internal_adjustments',\n\t\t\t\t\t\t\t'end_date' => $this->input->post('pay_date').'-01',\n\t\t\t\t\t\t\t'comments' => $comments[$aj],\n\t\t\t\t\t\t\t'status' => '0',\n\t\t\t\t\t\t\t'created_by' => $this->userSession['user_id'],\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Payroll_model->add_adjustments($data_adj);\n\t\t\t\t\t\t$affected_id= table_max_id('xin_salary_adjustments','adjustment_id');\n\t\t\t\t\t\t$adjus=$affected_id['field_id'];\n\t\t\t\t\t}\n\t\t\t\t\t$this->Payroll_model->update_salary_adjustments_status($adjus,1);\n\t\t\t\t\t$aj++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$result = $this->Payroll_model->add_monthly_payment_payslip($data);\n\n\t\t\tif($this->input->post('parent_type')){\n\t\t\t\t$count_type=count($this->input->post('parent_type'));\n\t\t\t\t$payment_return_id=$result;\n\t\t\t\t$created_at=date('d-m-Y h:i:s');\n\t\t\t\t$parent_type=$this->input->post('parent_type');\n\t\t\t\t$child_type=$this->input->post('child_type');\n\t\t\t\t$amount=$this->input->post('amount');\n\t\t\t\t$comments=$this->input->post('salary_comments');\n\t\t\t\tfor($i=0;$i<$count_type;$i++){\n\t\t\t\t\t$data_options=array('make_payment_id'=>$payment_return_id,'parent_type'=>$parent_type[$i],'child_type'=>$child_type[$i],'amount'=>$amount[$i],'comments'=>$comments[$i],'created_at'=>$created_at,'payment_date'=>$this->input->post('pay_date'));\n\t\t\t\t\t$result1 = $this->Payroll_model->add_payment_options($data_options);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//echo $result;\n\n\t\t\tif ($result== TRUE) { // == TRUE\n\n\t\t\t\t$Return['result'] = 'Payment paid.';\n\n\n\t\t\t\t$setting = $this->Xin_model->read_setting_info(1);\n\t\t\t\t/*if($setting[0]->enable_email_notification == 'yes') {\n\n\t\t\t\t$this->load->library('email');\n\t\t\t\t$cinfo = $this->Xin_model->read_company_setting_info(1);\n\t\t\t\t//get email template\n\t\t\t\t$template = $this->Xin_model->read_email_template(1);\n\t\t\t\t//get employee info\n\t\t\t\t$user_info = $this->Xin_model->read_user_info($this->input->post('emp_id'));\n\t\t\t\t$full_name = change_fletter_caps($user_info[0]->first_name.' '.$user_info[0]->middle_name.' '.$user_info[0]->last_name);\n\t\t\t\t// get date\n\t\t\t\t$d = explode('-',$this->input->post('pay_date'));\n\t\t\t\t$get_month = date('F', mktime(0, 0, 0, $d[1], 10));\n\t\t\t\t$pdate = $get_month.', '.$d[0];\n\n\t\t\t\t$subject = $template[0]->subject.' - '.$cinfo[0]->company_name;\n\t\t\t\t$logo = base_url().'uploads/logo/'.$cinfo[0]->logo;\n\t\t\t\t$cid = $this->email->attachment_cid($logo);\n\n\t\t\t\t$message = '<div style=\"background:#f6f6f6;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;margin:0;padding:0;padding: 20px;\">\n\t\t\t<img src=\"'.$logo.'\" title=\"'.$cinfo[0]->company_name.'\"><br>'.str_replace(array(\"{var site_name}\",\"{var site_url}\",\"{var employee_name}\",\"{var payslip_date}\"),array($cinfo[0]->company_name,site_url(),$full_name,$pdate),html_entity_decode(stripslashes($template[0]->message))).'</div>';\n\t\t\t\t$this->email->from($cinfo[0]->email, $cinfo[0]->company_name);\n\t\t\t\t$this->email->to($user_info[0]->email);\n\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\n\t\t\t\t//$this->email->send();\n\t\t\t}*/\n\t\t\t} else {\n\t\t\t\t$Return['error'] = 'Bug. Something went wrong, please try again.';\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "b0a84127f9124d680460d5a66f63e3cd", "score": "0.4845033", "text": "public function get_month_permastruct() {\n\t\t$structure = $this->get_date_permastruct();\n\n\t\tif ( empty($structure) )\n\t\t\treturn false;\n\n\t\t$structure = str_replace('%day%', '', $structure);\n\t\t$structure = preg_replace('#/+#', '/', $structure);\n\n\t\treturn $structure;\n\t}", "title": "" }, { "docid": "e4a2014becb69a565539a3b24661f762", "score": "0.48359773", "text": "function hasNotPaid(){\n\t\treturn $this->getPaymentStatus() == 0 ? true : false;\n\t}", "title": "" }, { "docid": "51df11ace82badc5ddcbfc72d191ad8d", "score": "0.48343676", "text": "public function actionGetPayment()\n {\n if(!Yii::$app->request->isAjax) {\n exit('go home!');\n }\n $user_payment_detail = '';\n if($post = Yii::$app->request->post()) {\n if(isset($post['pay_id'])) {\n $user_payment_detail = UserPay::find()\n ->where(['user_id'=> Yii::$app->user->id, 'pay_id' => $post['pay_id']])\n ->one();\n }\n if($user_payment_detail) {\n exit($user_payment_detail->value);\n }\n }\n exit($user_payment_detail);\n }", "title": "" }, { "docid": "f6b3b797a1f7dc206e4a77aa093fa43b", "score": "0.48325723", "text": "public function getEndMonth(): ?int {\n $val = $this->getBackingStore()->get('endMonth');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'endMonth'\");\n }", "title": "" }, { "docid": "79699b14ffbacc9a2330958205261bc6", "score": "0.48288992", "text": "public function getTotalPaid();", "title": "" }, { "docid": "e8a6e95f88b7677f5fc4c14ded7d1dc0", "score": "0.4807828", "text": "public function getStartMonth(): ?int {\n $val = $this->getBackingStore()->get('startMonth');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'startMonth'\");\n }", "title": "" }, { "docid": "3645262944a29d870fe56885b04fcd60", "score": "0.4806003", "text": "public function needsMonthlyReset(): bool\n {\n return ResetFrequency::fromValue($this->reset_frequency)->in([\n ResetFrequency::MONTHLY,\n ResetFrequency::DAILY,\n ]);\n }", "title": "" }, { "docid": "418a3eafcc584fff40e1c9a928cad7df", "score": "0.48059994", "text": "function _getLastMonth()\n\t{\n\t\t$months = $this->_getMonthsArray();\n\t\t$month = array_pop($months);\n\n\t\treturn $month;\n\t}", "title": "" }, { "docid": "623b380fdadf32edc26898e53a3c9ad8", "score": "0.4803236", "text": "public function getReporteMantenimiento()\n {\n return $this->reporteMantenimiento;\n }", "title": "" }, { "docid": "02c08b19dff0810a553449599e201586", "score": "0.47909263", "text": "public function getPaidTime()\n {\n return $this->paidTime;\n }", "title": "" }, { "docid": "9b8aaf5970128abc2c88e87c79846d5e", "score": "0.4790888", "text": "public function getPaymentStatus(): ?int\n {\n return $this->paymentStatus;\n }", "title": "" }, { "docid": "0d283e79a4fc95e79f2362e8add65209", "score": "0.47890538", "text": "public function testApiGetReportLimitMonthlyOk(): void\n {\n $this->assertEquals(93, SklikApi::getReportLimit('2018-01-01', '2018-01-31', 100, 'monthly'));\n }", "title": "" }, { "docid": "67c2667964ac62ef813e41a4244b62b0", "score": "0.47831213", "text": "public function getPaidModel() {\n // current term\n $term = AccountSetting::getCurrentTerm();\n // old balance\n $oldBalance = $this->getOldBalance();\n // current balance of year\n $currentBalance = $this->getCurrentBalance($term->id);\n // value should pay in store\n $model = null;\n \n if ($oldBalance > 0) {\n if ($this->is_old_installed) {\n $model = Installment::where('student_id', $this->id)->where('type', 'old')->where('paid', '0')->first();\n } else \n $model = null;\n } else {\n if ($this->is_current_installed) {\n $model = Installment::where('student_id', $this->id)->where('type', 'new')->where('paid', '0')->first();\n } else\n $model = $this->getCurrentExpenses()->first();\n }\n return $model;\n }", "title": "" }, { "docid": "775c5db0b48159fc517e750eeb7a68fc", "score": "0.47600135", "text": "public function getSettlementBaseDataForMonth(BillingMonth $billingMonth) : array {\n $data = [\n 'incomeTax' => 0,\n 'vatTax' => 0,\n 'realIncome' => 0,\n 'quarterIncomeTax' => 0,\n 'quarterVatTax' => 0,\n 'taxSum' => 0,\n 'quarterTaxSum' => 0,\n 'additionalCostToRemoveFromRealIncome' => 0,\n ];\n \n // base billing month settlement values\n if ($billingMonth->getBillingMonthSettlement()) {\n $data['incomeTax'] = $billingMonth->getBillingMonthSettlement()->getIncomeTax();\n $data['vatTax'] = $billingMonth->getBillingMonthSettlement()->getVatTax();\n $data['realIncome'] = $billingMonth->getBillingMonthSettlement()->getRealIncome();\n $data['additionalCostToRemoveFromRealIncome'] = $billingMonth->getBillingMonthSettlement()->getAdditionalCostToRemoveFromRealIncome();\n $data['realIncomeAfterRemoveAdditionalCost'] = $data['realIncome'] + $data['additionalCostToRemoveFromRealIncome'];\n }\n \n // quarter values\n $data['quarterIncomeTax'] = $this->getSettlementQuarterIncomeTaxForDate($billingMonth->getDate());\n $data['quarterVatTax'] = $this->getSettlementQuarterVatTaxForDate($billingMonth->getDate());\n \n // sums\n $data['taxSum'] = $data['incomeTax'] + $data['vatTax'];\n $data['quarterTaxSum'] = $data['quarterIncomeTax'] + $data['quarterVatTax'];\n \n return $data;\n }", "title": "" }, { "docid": "44f4fab90f17ffde054b4b1980af526d", "score": "0.47587132", "text": "public function isSetPromotionAmount()\n {\n return !is_null($this->_fields['PromotionAmount']['FieldValue']);\n }", "title": "" }, { "docid": "34b4c27b1fd1e4f70bfd968f8b37bea1", "score": "0.47580662", "text": "public function getMonth()\n\t\t{\n\t\t\treturn $this->_getMonthFromDate($this->_start_date);\n\t\t}", "title": "" }, { "docid": "47289895d9efc13650ef2e5c246b23b0", "score": "0.47573015", "text": "protected function _getPaymentStatus()\n {\n // @todo\n return self::PAYMENT_STATUS_NONE;\n }", "title": "" }, { "docid": "8aef46ce48ccb2b82b4975af5e6b086f", "score": "0.47404826", "text": "public function monthly_transaction()\n {\n \n\n\n }", "title": "" }, { "docid": "c3f013430c80f67bdd6225095b9fff2c", "score": "0.47337073", "text": "public function getNextPaymentDate()\n {\n //Get new payment date\n $office = Office::find(intval(Auth::user()->idoffice));\n $officePayments = Payment::where('idoffice', $office->idoffice)->select('for_month')->get();\n if ($officePayments != null) {\n $lastPayment = $officePayments->max('for_month');\n } else {\n $lastPayment = null;\n }\n\n if ($lastPayment != null) {\n $nextPayment = date('Y-m-d', strtotime($lastPayment . '+1 month'));\n } else {\n $nextPayment = $office->payment_date;\n }\n return $nextPayment;\n //Get new payment date end\n }", "title": "" } ]
7a1495ffa5c51f5dab66bf7434041f90
Array of property to format mappings. Used for (de)serialization
[ { "docid": "13cff88dfa57987074b20cdceb684b6f", "score": "0.0", "text": "public static function swaggerFormats()\n {\n return self::$swaggerFormats;\n }", "title": "" } ]
[ { "docid": "c24b2913ce8cec879352828755647833", "score": "0.62727153", "text": "public function getFormats(): array;", "title": "" }, { "docid": "30c9148ae2bd752060a6abde8f5eedc9", "score": "0.6109943", "text": "public function toArray()\n {\n $out = [];\n\n foreach ($this->setFields as $key) {\n $property = $this->{$key};\n\n if ($property instanceof DateTime) {\n $out[$key] = $property->format(DateTime::ISO8601);\n } else {\n $out[$key] = $property;\n }\n }\n\n return $out;\n }", "title": "" }, { "docid": "fd99c4970c4434899b2c2257e7f1ab57", "score": "0.6073685", "text": "public function format(): array {\n $data = [];\n if ($this->migrationId) {\n $data = [\n \"migrationId\" => $this->migrationId,\n \"migrationName\" => $this->migrationName,\n \"migrationBatch\" => $this->migrationBatch,\n \"dateApplied\" => $this->dateApplied,\n \"meta\" => json_decode($this->meta, TRUE)\n ];\n }\n return $data;\n }", "title": "" }, { "docid": "4c3dc7b5bf523079844757ea750a40ed", "score": "0.60666436", "text": "public function getFormats() {\n return $this->formats;\n }", "title": "" }, { "docid": "6ea1c419118c95b11cac962f8e3dec95", "score": "0.60516745", "text": "public function getProperties() {\n\t\t$data = array();\n\n\t\tforeach($this->data[$this->current_row] as $key => $value) {\n\t\t\t// apply the formatter for the field\n\t\t\tif ($this->isField($key) === true && !empty($this->fields[$key]['format']['onGet'])) {\n\t\t\t\t$value = ModelFieldFormat::format($this->fields[$key]['format']['onGet'], $value);\n\t\t\t}\n\n\t\t\t$data[$key] = $value;\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "bbe7dd050d80033dc5994159b22cd8ea", "score": "0.5982339", "text": "protected function _getFormats() {\n if (!isset($this->_getConfig()['formats'])) {\n return array_keys($this->_formats);\n }\n return $this->_getConfig()['formats'];\n }", "title": "" }, { "docid": "ef71758bd26fd43c02a2e19504530477", "score": "0.59670043", "text": "public function toArray()\n {\n $array = get_object_vars($this);\n $props = [];\n if (is_array($array)) {\n foreach ($array as $key => $value) {\n if ($value != null and !is_object($value) and !is_array($value)) {\n $props[$key] = $value;\n } elseif ($value instanceof \\DateTime) {\n // If value is a DateTime instance and get method exists we choose it in first place\n $method = 'getFormatted' . ucfirst($key);\n $props[$key] = method_exists($this, $method) ? $this->$method()\n : $value->format(self::DATETIME_MASK);\n }\n }\n }\n\n return $props;\n }", "title": "" }, { "docid": "09da0d82be5caa68a5d08d5c1d9da014", "score": "0.59637415", "text": "private function getPostFieldFormatArray()\n\t{\n\t\t$field_formats = array(\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%d',\n\t\t'%s',\n\t\t'%d',\n\t\t'%s',\n\t\t'%s',\n\t\t'%d'\n\t\t);\n\t\treturn $field_formats;\n\t}", "title": "" }, { "docid": "f1fc9f111bea6f8b300159b6caeb62d4", "score": "0.5954238", "text": "public function toArray(){\n\t\t$properties = array();\n\t\tforeach($this as $prop=>$value){\n\t\t\t$properties[$prop] = $value;\n\t\t}\n\t\treturn $properties;\n\t}", "title": "" }, { "docid": "b17f801b6abb5afa9b359758d50fb394", "score": "0.59194297", "text": "public function getFormats() {\n return $this->_formats;\n }", "title": "" }, { "docid": "6e5f86a28996f21fe0afbf2fd803eb4f", "score": "0.5918061", "text": "public function getFormatsList()\n {\n return [\n self::COUPON_FORMAT_ALPHANUMERIC => __('Alphanumeric'),\n self::COUPON_FORMAT_ALPHABETICAL => __('Alphabetical'),\n self::COUPON_FORMAT_NUMERIC => __('Numeric')\n ];\n }", "title": "" }, { "docid": "eb834b145518c389993601c53ad5e231", "score": "0.5905047", "text": "public function getFormats(): array\n {\n return array_keys($this->dumpers);\n }", "title": "" }, { "docid": "e0dae5073e422aab973384168d8c9450", "score": "0.5876044", "text": "public function Output_Format(){\n\t\treturn array(\n\t\t\t\t\"xml\",\n\t\t\t\t\"text\",\n\t\t\t\t\"json\"\n\t\t\t);\n\t}", "title": "" }, { "docid": "f2266e2c9fa944ca628c85f60a78376a", "score": "0.5872639", "text": "public static function avaliableFormats() {\t\t\t\r\n\t\t\treturn array_keys(Service::$formatMap);\r\n\t\t}", "title": "" }, { "docid": "f584b9617202f3c765d54b91dbfef0e4", "score": "0.58690095", "text": "public function toArray()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "f584b9617202f3c765d54b91dbfef0e4", "score": "0.58690095", "text": "public function toArray()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "f584b9617202f3c765d54b91dbfef0e4", "score": "0.58690095", "text": "public function toArray()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "46fceb58e5d8b0c32d33499516987ed8", "score": "0.5851533", "text": "public function toArray()\n {\n return $this->_properties;\n }", "title": "" }, { "docid": "5ecb7199e79d74389d9553d5aefc295d", "score": "0.5744449", "text": "public function jsonSerialize(){\n\t\t$ret = [];\n\t\t$columnDefinitions = static::getColumns();\n\t\tforeach( $columnDefinitions as $prop => $definition ){\n\t\t\t$ret[$prop] = $this->$prop;\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "99b428144c79f0f75059e50b041dc410", "score": "0.5737283", "text": "public function exportArray():array {\r\n\t\t$list = [];\r\n\t\tforeach ($this->getProperties() as $property) {\r\n\t\t\t$list[substr($property, 5)] = $this->$property;\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "title": "" }, { "docid": "b0db648f459dd593ee367ef5da19c502", "score": "0.5692605", "text": "function getFormattedProperties() {\r\n $props = '';\r\n foreach ($this->properties as $key => $val) {\r\n //$props .= $pro->getName() . \"=\" . $pro->getValue . \"\\n\";\r\n $newval = str_ireplace(\"=\",\"&#61;\",$val); // Clean the value to replace any EQUAL signs with the HTML code\r\n $props .= $key . \"=\" . $val . \"\\n\";\r\n }\r\n return $props;\r\n }", "title": "" }, { "docid": "9d28e3d4a5457a06b52bcba5222419cd", "score": "0.5668523", "text": "public function getSourceFormats() {\n\t\treturn self::$source_formats;\n\t}", "title": "" }, { "docid": "1f2173d2d5d652d0a556aea8ba6d078e", "score": "0.56654525", "text": "public function toArray()\n {\n $array = array();\n foreach ($this->properties as $property) {\n $array[] = $property->toArray();\n };\n\n return $array;\n }", "title": "" }, { "docid": "8909cced4e24910e5c7a739b62d72ee4", "score": "0.56494623", "text": "public function getFieldFormaters()\n\t{\n\t\t$retour = array();\n\t\t\n\t\t$retour['pad_left'] = 'Pad left';\n\t\t$retour['pad_right'] = 'Pad right';\n\t\t$retour['date_format'] = 'Date format';\n\t\t$retour['number_format'] = 'Number format';\n\t\t$retour['custom_value'] = 'Custom value';\n\t\t$retour['custom_list'] = 'Custom list';\n\t\t\n\t\treturn $retour;\n\t}", "title": "" }, { "docid": "64b87bbcd1f403c9a175c9f509d89a31", "score": "0.5644918", "text": "public static function swaggerFormats(): array\n {\n return static::$swaggerFormats + (get_parent_class(static::class) !== false ? get_parent_class(static::class)::swaggerFormats() : []);\n }", "title": "" }, { "docid": "790765113735674dccd4d455f8ad0f71", "score": "0.5642862", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'color' => fn(ParseNode $n) => $o->setColor($n->getStringValue()),\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'isActive' => fn(ParseNode $n) => $o->setIsActive($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'parent' => fn(ParseNode $n) => $o->setParent($n->getObjectValue([ParentLabelDetails::class, 'createFromDiscriminatorValue'])),\n 'sensitivity' => fn(ParseNode $n) => $o->setSensitivity($n->getIntegerValue()),\n 'tooltip' => fn(ParseNode $n) => $o->setTooltip($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "19f7f94c29afed5d4f20da33ea718ded", "score": "0.56373346", "text": "public function format(): array\n {\n $result = [\n self::EMAIL_KEY => $this->email,\n self::PROPERTIES_KEY => array_filter($this->optionalProperties)\n ];\n\n if ($this->action !== null) {\n $result[self::ACTION_KEY] = $this->action;\n }\n\n return $result;\n }", "title": "" }, { "docid": "72a978574b43d964b003a6523bb92df3", "score": "0.56307226", "text": "protected function propertiesToFields()\n\t{\n\t\t$fields = array(\"name\" => array(\"text\", $this->getName()),\n\t\t\t\"type\" => array(\"integer\", $this->getType()));\n\t\t\t\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "3a940e3e4aef38ccb74db2ae66b1791a", "score": "0.5616282", "text": "private static function getMappedProperties()\n {\n return array(\n 'startDate' => 'PolicyStartAt',\n 'endDate' => 'PolicyEndAt',\n );\n }", "title": "" }, { "docid": "1751ee677a3280d3168d628ef0e760fa", "score": "0.5592947", "text": "public function getFileFormats(): array\n {\n return array_keys($this->fileFormats);\n }", "title": "" }, { "docid": "9d79e5754a8cc46ec2c2141ca32d1072", "score": "0.5579437", "text": "public function jsonSerialize()\n {\n return [\n 'events' => $this->events,\n 'prefix' => $this->prefix,\n 'suffix' => $this->suffix,\n 'suffixInflection' => $this->suffixInflection,\n 'format' => $this->format,\n ];\n }", "title": "" }, { "docid": "ad3ba8cd226a790988b6be487260e452", "score": "0.55579233", "text": "public function toArray() {\n $properties = [];\n foreach ($this as $var => $value) {\n $properties[$var] = $value;\n }\n return $properties;\n }", "title": "" }, { "docid": "6ac29457c80ce733fc0e1273cb5e51b5", "score": "0.5551422", "text": "public static function buildFormatMap()\r\n {\r\n $fm = explode(',', config('formats'));\r\n \r\n foreach ($fm as $f) {\r\n self::$formatMap[config('formats.' . $f)] = $f;\r\n }\r\n }", "title": "" }, { "docid": "8875a17e7a0e8f2f23d2ce4a9a6a7cda", "score": "0.554865", "text": "public static function getProperties()\n {\n return [\n 'ABN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'USI' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SPIN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ProductName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "title": "" }, { "docid": "de60b33a68ad53fdadc2669091802f8f", "score": "0.5547918", "text": "public function toArray( $format = true ) {\n\t \n\t $values = get_object_vars( $this );\n\t \n\t if( !$format ) {\n\t return $values;\n\t }\n\t \n foreach( $values as &$value ){\n \n if( ( $value instanceof Date ) ) {\n $value = $value->format();\n }\n \n }\n\t \n\t return $values;\n\t \n\t}", "title": "" }, { "docid": "62735efb88c4cf8e38a91deb32c17107", "score": "0.55250174", "text": "public static function getProperties()\n {\n return [\n 'id' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'name' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'type' => [true, self::PROPERTY_TYPE_ENUM, null, false, false],\n ];\n }", "title": "" }, { "docid": "fe4ad67c6a4ae7ee72922561085bfcf8", "score": "0.5520638", "text": "public static function swaggerFormats(): array\n {\n return self::$swaggerFormats;\n }", "title": "" }, { "docid": "3cbcb96da80f7dd6abe8e601c2e87f55", "score": "0.55148697", "text": "public function getOutputFormats()\n {\n return [FileFormat::BIBLIOGRAPHY_ENTRIES, FileFormat::BIBLIOGRAPHY_LOG];\n }", "title": "" }, { "docid": "9cdfbe7a17da91e1a8f240c0f93dcb0e", "score": "0.55113", "text": "public function toArray()\r\n {\r\n return [\r\n self::DISPLAY_PRICE => __('Price'),\r\n self::DISPLAY_IMAGE => __('Image'),\r\n self::DISPLAY_DESCRIPTION => __('Short Description')\r\n ];\r\n }", "title": "" }, { "docid": "92a6dd8d1f6462cc9dfc4058354deba4", "score": "0.5509584", "text": "public function toArray()\n {\n return $this->_readProperties;\n }", "title": "" }, { "docid": "10a19106cccf4ff326ae45e7483689ef", "score": "0.5509171", "text": "public function asArray()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "a9137e19785e5ef56860a07db601aeea", "score": "0.55082285", "text": "public function toArray()\n {\n $a = parent::toArray();\n if ($this->type) {\n $a[\"type\"] = $this->type;\n }\n if ($this->preferred) {\n $a[\"preferred\"] = $this->preferred;\n }\n if ($this->date) {\n $a[\"date\"] = $this->date->toArray();\n }\n if ($this->nameForms) {\n $ab = array();\n foreach ($this->nameForms as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['nameForms'] = $ab;\n }\n return $a;\n }", "title": "" }, { "docid": "e974034d7ac1dba0b4e377deafd71cce", "score": "0.550624", "text": "public function toArray()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'begin' => $this->getBegin(),\n 'end' => $this->getEnd(),\n 'color' => $this->getColor()\n ];\n }", "title": "" }, { "docid": "8a117c4274731e59c7cf2cbaefac8016", "score": "0.55013317", "text": "public static function _getPropertyNames(): array\n {\n return [\n 'title',\n 'description',\n 'payload',\n 'provider_token',\n 'currency',\n 'prices',\n 'max_tip_amount',\n 'suggested_tip_amounts',\n 'provider_data',\n 'photo_url',\n 'photo_size',\n 'photo_width',\n 'photo_height',\n 'need_name',\n 'need_phone_number',\n 'need_email',\n 'need_shipping_address',\n 'send_phone_number_to_provider',\n 'send_email_to_provider',\n 'is_flexible',\n ];\n }", "title": "" }, { "docid": "f6b9c0b5011e2621a7e341ca8f16a77a", "score": "0.5500344", "text": "public function format()\n {\n return $this->list()->toArray();\n }", "title": "" }, { "docid": "7e2a087921c8a9f5157007018fc2d0a4", "score": "0.5495597", "text": "public function toArray()\n {\n\n // Start with the misc properties (don't worry, PHP won't affect the original array)\n $array = $this->properties;\n\n $array['title'] = $this->title;\n\n // Figure out the date format. This essentially encodes allDay into the date string.\n if ($this->allDay) {\n $format = 'Y-m-d'; // output like \"2013-12-29\"\n } else {\n $format = 'c'; // full ISO8601 output, like \"2013-12-29T09:00:00+08:00\"\n }\n\n // Serialize dates into strings\n $array['start'] = $this->start->format($format);\n if (isset($this->end)) {\n $array['end'] = $this->end->format($format);\n }\n\n return $array;\n }", "title": "" }, { "docid": "b6052f672e1fd6891caabdfeecbbc774", "score": "0.54905546", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'columns' => fn(ParseNode $n) => $o->setColumns($n->getCollectionOfObjectValues([HorizontalSectionColumn::class, 'createFromDiscriminatorValue'])),\n 'emphasis' => fn(ParseNode $n) => $o->setEmphasis($n->getEnumValue(SectionEmphasisType::class)),\n 'layout' => fn(ParseNode $n) => $o->setLayout($n->getEnumValue(HorizontalSectionLayoutType::class)),\n ]);\n }", "title": "" }, { "docid": "80a682012a235276232433b4a6c415b5", "score": "0.5483435", "text": "public function toArray()\r\n\t{\r\n\t\t// return properties as array.\r\n\t\treturn $this->_properties;\r\n\t}", "title": "" }, { "docid": "5a906b26ff8b3961f35e6a323aff02a4", "score": "0.5474268", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'unit' => fn(ParseNode $n) => $o->setUnit($n->getStringValue()),\n 'value' => fn(ParseNode $n) => $o->setValue($n->getFloatValue()),\n ]);\n }", "title": "" }, { "docid": "0b226d6fc314191b0701bcf8dd6afd03", "score": "0.5471114", "text": "public static function availableFormatsExtensions() {\r\n return array_values(Service::$formatMap);\r\n }", "title": "" }, { "docid": "32dd7dee9d27fad384b169fb76d5f05e", "score": "0.5468203", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'totalCount' => fn(ParseNode $n) => $o->setTotalCount($n->getIntegerValue()),\n 'usedCount' => fn(ParseNode $n) => $o->setUsedCount($n->getIntegerValue()),\n ]);\n }", "title": "" }, { "docid": "426e2a6dc2bc788e5ee450555435e4c7", "score": "0.5463409", "text": "public function toArray()\n {\n return $this->mapProperties(\n $this->fetchClassVars()\n );\n }", "title": "" }, { "docid": "c2f4471ffc71bec22dcf27d7d64ed14e", "score": "0.5461935", "text": "public function dataFormats () : array\n\t{\n\t\t$arr = [];\n\t\t$faker = \\Faker\\Factory::create('pt_BR');\n\n\t\tfor ( $i = 0; $i < 100; $i++ )\n\t\t{\n\t\t\t$amount = $faker->randomFloat(2, 1, 999);\n\n\t\t\t$modality = new DueAmountModality($faker->randomElement(DueAmountModality::MODALITIES));\n\t\t\t$modality->setAmount(\\number_format($amount, 2, '.', ''));\n\n\t\t\t$arr[] = [ $amount, $modality->getAmount() ];\n\t\t}\n\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "75312d74d98b6285de6d80420ae15069", "score": "0.54573655", "text": "public function toArray()\n {\n return [\n 'percentage' => $this->getPercentage(),\n 'inclusive' => $this->getInclusive(),\n ];\n }", "title": "" }, { "docid": "8f7ec9efb14218abe0f4fad34595ed6f", "score": "0.5450776", "text": "public static function swaggerFormats()\n {\n return [\n 'created' => null,\n 'id' => null,\n 'name' => null\n ];\n }", "title": "" }, { "docid": "731b7a9c65af44716c65ed722f246b4e", "score": "0.5450586", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'alternativeText' => fn(ParseNode $n) => $o->setAlternativeText($n->getStringValue()),\n 'enableGradientEffect' => fn(ParseNode $n) => $o->setEnableGradientEffect($n->getBooleanValue()),\n 'imageWebUrl' => fn(ParseNode $n) => $o->setImageWebUrl($n->getStringValue()),\n 'layout' => fn(ParseNode $n) => $o->setLayout($n->getEnumValue(TitleAreaLayoutType::class)),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'serverProcessedContent' => fn(ParseNode $n) => $o->setServerProcessedContent($n->getObjectValue([ServerProcessedContent::class, 'createFromDiscriminatorValue'])),\n 'showAuthor' => fn(ParseNode $n) => $o->setShowAuthor($n->getBooleanValue()),\n 'showPublishedDate' => fn(ParseNode $n) => $o->setShowPublishedDate($n->getBooleanValue()),\n 'showTextBlockAboveTitle' => fn(ParseNode $n) => $o->setShowTextBlockAboveTitle($n->getBooleanValue()),\n 'textAboveTitle' => fn(ParseNode $n) => $o->setTextAboveTitle($n->getStringValue()),\n 'textAlignment' => fn(ParseNode $n) => $o->setTextAlignment($n->getEnumValue(TitleAreaTextAlignmentType::class)),\n ];\n }", "title": "" }, { "docid": "a6f3ed7cc3555fb0c8f08dd64e8c36c5", "score": "0.54487014", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'lastUpdatedDateTime' => fn(ParseNode $n) => $o->setLastUpdatedDateTime($n->getDateTimeValue()),\n 'productKey' => fn(ParseNode $n) => $o->setProductKey($n->getStringValue()),\n 'state' => fn(ParseNode $n) => $o->setState($n->getEnumValue(MacOSSoftwareUpdateState::class)),\n 'updateCategory' => fn(ParseNode $n) => $o->setUpdateCategory($n->getEnumValue(MacOSSoftwareUpdateCategory::class)),\n 'updateVersion' => fn(ParseNode $n) => $o->setUpdateVersion($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "6d47abcffc16e3d5e55a39ec7496b527", "score": "0.5435111", "text": "public function toArray(): array\n {\n return [\n \"scope\" => \"#/properties/\" . $this->getScope(),\n \"schema\" => [\n \"enum\" => $this->getValues(),\n ],\n ];\n }", "title": "" }, { "docid": "7aa9568731efcf825956a45c92210c22", "score": "0.5434486", "text": "public function toArray(): array\n {\n return [\n 'name' => $this->name(),\n 'singular' => $this->singular(),\n 'plural' => $this->plural(),\n 'singular_camel' => $this->singularCamel(),\n 'plural_camel' => $this->pluralCamel(),\n 'singular_snake' => $this->singularSnake(),\n 'plural_snake' => $this->pluralSnake(),\n 'singular_pascal' => $this->singularPascal(),\n 'plural_pascal' => $this->pluralPascal(),\n 'singular_lcfirst' => $this->singularLowercaseFirst(),\n 'plural_lcfirst' => $this->pluralLowercaseFirst(),\n 'plural_kebab' => $this->pluralKebab(),\n ];\n }", "title": "" }, { "docid": "7b3fbdd27c010a6a50d5beded7575a01", "score": "0.5430603", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'decimalPlaces' => fn(ParseNode $n) => $o->setDecimalPlaces($n->getStringValue()),\n 'displayAs' => fn(ParseNode $n) => $o->setDisplayAs($n->getStringValue()),\n 'maximum' => fn(ParseNode $n) => $o->setMaximum($n->getFloatValue()),\n 'minimum' => fn(ParseNode $n) => $o->setMinimum($n->getFloatValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "79f8e0eec6dc8418943c6e9829f9bdba", "score": "0.5429629", "text": "protected static function define_properties() {\n return [\n 'dayno' => [\n 'type' => PARAM_INT,\n ],\n 'shortname' => [\n // Note: The calendar type class has already formatted the names.\n 'type' => PARAM_RAW,\n ],\n 'fullname' => [\n // Note: The calendar type class has already formatted the names.\n 'type' => PARAM_RAW,\n ],\n ];\n }", "title": "" }, { "docid": "5cb9460553be5111641848e06fa68948", "score": "0.5424199", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'healthOverviews' => fn(ParseNode $n) => $o->setHealthOverviews($n->getCollectionOfObjectValues([ServiceHealth::class, 'createFromDiscriminatorValue'])),\n 'issues' => fn(ParseNode $n) => $o->setIssues($n->getCollectionOfObjectValues([ServiceHealthIssue::class, 'createFromDiscriminatorValue'])),\n 'messages' => fn(ParseNode $n) => $o->setMessages($n->getCollectionOfObjectValues([ServiceUpdateMessage::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "73f0e4e0f53c991108973a286b27daa3", "score": "0.5421387", "text": "public function toArray(): array\n {\n return $this->propertiesToArray();\n }", "title": "" }, { "docid": "4f587752bc69e7b1827c647984568606", "score": "0.5405029", "text": "public function toArray()\n {\n return [\n 'iso_code' => $this->iso_code,\n 'currency_symbol' => $this->currency_symbol,\n 'currency_code' => $this->currency_code,\n 'decimal_spaces' => $this->decimal_spaces,\n 'decimal_separator' => $this->decimal_separator,\n 'thousand_separator' => $this->thousand_separator,\n 'label' => $this->label,\n 'prepend_symbol' => $this->prepend_symbol\n ];\n }", "title": "" }, { "docid": "c8409a7dfc34b8f1f7a45fbf221c5c03", "score": "0.5402451", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'line' => fn(ParseNode $n) => $o->setLine($n->getObjectValue([WorkbookChartLineFormat::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "b645f9d38acf68991854bf1c0e4017a0", "score": "0.54017574", "text": "public function toArray() :array\n {\n return $this->properties()->toArray();\n }", "title": "" }, { "docid": "093c9a704bede78cd25bbb93d9d006b7", "score": "0.53999335", "text": "public function getFormat() {\n\t\treturn 'array';\n\t}", "title": "" }, { "docid": "1db7507455265f516448bdd4044f63cd", "score": "0.53934366", "text": "public function toArray()\n {\n return [ 0 => 'Select',\n '{%order.id%}' => 'Order Id',\n '{%customer.firstname%}' => 'First Name',\n '{%customer.middlename%}' => 'Middle Name',\n '{%customer.lastname%}' => 'Last Name',\n '{%customer.dob%}' => 'Date Of Birth',\n '{%customer.email%}' => 'Email',\n '{%order.fullprice%}' => 'Price',\n '*%products.names%*' => 'All Products Name',\n '*%products.sku(s)%*' => 'All Products Sku'\n ];\n }", "title": "" }, { "docid": "8d68aa6590ddee6d2d67cb818cdabfcc", "score": "0.53879267", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'categoryAxis' => fn(ParseNode $n) => $o->setCategoryAxis($n->getObjectValue([WorkbookChartAxis::class, 'createFromDiscriminatorValue'])),\n 'seriesAxis' => fn(ParseNode $n) => $o->setSeriesAxis($n->getObjectValue([WorkbookChartAxis::class, 'createFromDiscriminatorValue'])),\n 'valueAxis' => fn(ParseNode $n) => $o->setValueAxis($n->getObjectValue([WorkbookChartAxis::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "415a61b5a73cab315566cb65fb81b1a4", "score": "0.5387723", "text": "public function getFormattedDatesAttribute()\n {\n $dates = [];\n foreach ($this->dates as $field) {\n $dates[$field] = Dates::returnFormattedDates($this->{$field});\n }\n if(isset($this->attributes['formatted_dates'])) {\n return array_merge($dates, $this->attributes['formatted_dates']);\n }\n return $dates;\n }", "title": "" }, { "docid": "872db5a4feba920b33d64339cd235f4d", "score": "0.5384948", "text": "public static function getProperties()\n {\n return [\n 'ReportID' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ReportName' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ReportType' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ReportTitles' => [true, self::PROPERTY_TYPE_STRING, null, true, false],\n 'ReportDate' => [true, self::PROPERTY_TYPE_DATE, null, false, false],\n 'UpdatedDateUTC' => [true, self::PROPERTY_TYPE_TIMESTAMP, '\\\\DateTimeInterface', false, false],\n 'Rows' => [true, self::PROPERTY_TYPE_STRING, null, true, false],\n ];\n }", "title": "" }, { "docid": "22a57ab1828c307decd28c8c8be2dd80", "score": "0.5374998", "text": "private function defineDataFormat()\n {\n $this->dataFormat = array(\n 'publications' => array(\n 'int' => array(\n 'publicationId' => 'int',\n 'citationCount' => 'int',\n 'publicationYear' => 'int',\n 'fieldOfStudy' => 'string',\n 'authors' => array(\n 'int' => array(\n 'authorId' => 'int',\n ),\n ),\n 'citations' => array(\n 'int' => array(\n 'publicationId' => 'int',\n 'publicationYear' => 'int',\n 'publicationTimestamp' => 'int',\n 'authors' => array(\n 'int' => array(\n 'authorId' => 'int',\n ),\n ),\n ),\n ),\n ),\n ),\n 'author' => array(\n 'firstPublicationYear' => 'int',\n 'colleagues' => array(\n 'int' => array(\n 'int' => array(\n 'authorId' => 'int',\n ),\n ),\n ),\n ),\n );\n }", "title": "" }, { "docid": "386ee20cbac1bea99c6e9c045bf788af", "score": "0.53716964", "text": "public function toArray()\n {\n $arr = parent::toArray();\n foreach($this->getDates() as $date){\n $key = \"{$this->getJalaliPrefix()}{$date}\";\n $arr[$key] = $this->convertToPersian($date);\n }\n return $arr;\n }", "title": "" }, { "docid": "b76ba3cda54e54f5f523ecc3f3bfd753", "score": "0.5368534", "text": "public function toArray(): array\n {\n $model = model($this);\n\n $data = [];\n foreach ($model->properties as $property => $_) {\n $data[$property] = $this->{$property};\n }\n\n return $data;\n }", "title": "" }, { "docid": "e3ffc917b559d16d93b0efcfb83d9410", "score": "0.53682697", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'targetDisplayName' => fn(ParseNode $n) => $o->setTargetDisplayName($n->getStringValue()),\n 'targetDisplayVersion' => fn(ParseNode $n) => $o->setTargetDisplayVersion($n->getStringValue()),\n 'targetId' => fn(ParseNode $n) => $o->setTargetId($n->getStringValue()),\n 'targetPublisher' => fn(ParseNode $n) => $o->setTargetPublisher($n->getStringValue()),\n 'targetType' => fn(ParseNode $n) => $o->setTargetType($n->getEnumValue(MobileAppRelationshipType::class)),\n ]);\n }", "title": "" }, { "docid": "6b351bfb0c1418c275df0c634fd67247", "score": "0.5367149", "text": "private function formatSchema(): array\n {\n $schema = $this->schema;\n $schema['type'] = $this->type;\n $schema['format'] = $this->format ?? $schema['format'];\n $schema['example'] = $this->example;\n $schema['enum'] = $this->enum;\n\n return removeEmptyValues($schema);\n }", "title": "" }, { "docid": "ed8d106047bb52625b2ac504c6cec600", "score": "0.53638935", "text": "public function toArray(): array\n {\n return [\n \"id\" => $this->id,\n 'client_id_old' => $this->client_id_old,\n \"name\" => $this->name,\n \"description\" => $this->description,\n \"display_name_old\" => $this->display_name_old ? $this->display_name_old : null,\n \"active_status\" => $this->active_status,\n \"client_code\" => $this->client_code,\n \"display_name\" => $this->display_name,\n \"property_group_calc_status\" => $this->property_group_calc_status,\n \"property_group_force_first_time_calc\" => $this->property_group_force_first_time_calc,\n \"property_group_force_calc_property_group_ids\" => $this->property_group_force_calc_property_group_ids,\n /**\n * @todo get consistant about dates\n */\n \"property_group_force_recalc\" => $this->property_group_force_recalc,\n \"property_group_calc_last_requested\" => $this->perhaps_format_date($this->property_group_calc_last_requested),\n \"active_status_date\" => $this->perhaps_format_date($this->active_status_date),\n\n \"config_json\" => json_decode($this->config_json, true),\n \"style_json\" => json_decode($this->style_json, true),\n \"image_json\" => json_decode($this->image_json, true),\n\n \"dormant_user_switch\" => $this->dormant_user_switch,\n \"dormant_user_ttl\" => $this->dormant_user_ttl,\n\n \"created_at\" => $this->perhaps_format_date($this->created_at),\n \"updated_at\" => $this->perhaps_format_date($this->updated_at),\n\n \"model_name\" => self::class,\n ];\n }", "title": "" }, { "docid": "80d7d0a3bb834ba33615eef8444e4fad", "score": "0.5363693", "text": "public function toArray()\n {\n return [\n 'name' => $this->getName(),\n 'class' => $this->getClass(),\n 'config' => $this->getConfig(),\n 'hash' => $this->getHash(),\n ];\n }", "title": "" }, { "docid": "8499c222e99fd366037f9108858add84", "score": "0.53626096", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'use' => fn(ParseNode $n) => $o->setEscapedUse($n->getStringValue()),\n 'exp' => fn(ParseNode $n) => $o->setExp($n->getIntegerValue()),\n 'k' => fn(ParseNode $n) => $o->setK($n->getStringValue()),\n 'nbf' => fn(ParseNode $n) => $o->setNbf($n->getIntegerValue()),\n ];\n }", "title": "" }, { "docid": "5653620dbceb5b4919845ed28195e4cc", "score": "0.535232", "text": "public static function serialFormats()\n {\n return self::$serialFormats;\n }", "title": "" }, { "docid": "7267b62f5285279927d59bec03efefc0", "score": "0.53511655", "text": "protected function getSerializerFormats() {\n // Many more are supported...\n // @todo Move this to a settings form.\n $white_list = $this->config('rdf_export.settings')->get('export_types');\n $list = [];\n $formats = Format::getFormats();\n /** @var \\EasyRdf\\Format $format */\n foreach ($formats as $format) {\n if (!in_array($format->getName(), $white_list)) {\n continue;\n }\n if ($format->getSerialiserClass()) {\n $list[$format->getName()] = $format;\n }\n }\n return $list;\n }", "title": "" }, { "docid": "df3e7f68f8e6093307da2c6178f02a9f", "score": "0.53493136", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'ruleId' => fn(ParseNode $n) => $o->setRuleId($n->getStringValue()),\n 'subjects' => fn(ParseNode $n) => $o->setSubjects($n->getCollectionOfObjectValues([SynchronizationJobSubject::class, 'createFromDiscriminatorValue'])),\n ];\n }", "title": "" }, { "docid": "1dd68b579c0e8984a08ecb7a6d211764", "score": "0.5345012", "text": "public function getFormatted() {\n\n $hasPerson = $this->person instanceof Person;\n $hasKeyword = $this->keyword instanceof Keyword;\n $hasColor = $this->color instanceof Color;\n// echo \"\\n\" . __DIR__ . '/../../../public/media/users/' . $this->user_id . '/' . $this->thumbnail;\n return [\n 'id' => $this->id,\n 'person' => $hasPerson ? $this->person->name : '',\n 'email' => $hasPerson ? $this->person->email : '',\n 'person_id' => $this->person_id,\n 'keyword' => $hasKeyword ? $this->keyword->keyword : '',\n 'keyword_id' => $this->keyword_id,\n 'color' => $hasColor ? $this->color->w3c_hex : '',\n 'color_id' => $this->color_id,\n 'keywords' => explode(',', $this->keywords),\n 'colors' => explode(',', $this->colors),\n 'profile_picture' => $hasPerson ? $this->person->profile_picture : '',\n 'profile_picture_cropped' => $hasPerson ? $this->person->profile_picture_cropped : '',\n 'profile_animation' => $hasPerson ? $this->person->profile_animation : '',\n 'has_video' => $hasPerson && $this->person->has_video ? true : false,\n 'video_url' => $hasPerson ? $this->person->video_url : '',\n 'source' => $hasPerson ? $this->person->source : '',\n 'created_at' => Carbon::parse($hasPerson ? $this->person->created_at : $this->created_at)->toDateTimeString(),\n ];\n }", "title": "" }, { "docid": "007d7c5f7e8498d302a6a74dd5320719", "score": "0.533473", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'activePeripherals' => fn(ParseNode $n) => $o->setActivePeripherals($n->getObjectValue([TeamworkActivePeripherals::class, 'createFromDiscriminatorValue'])),\n 'createdBy' => fn(ParseNode $n) => $o->setCreatedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'lastModifiedBy' => fn(ParseNode $n) => $o->setLastModifiedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),\n 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()),\n ]);\n }", "title": "" }, { "docid": "21a9a55e5da25d6ef7ced9419f3042cb", "score": "0.53288835", "text": "public function applicable_formats() {\n return array(\n 'all' => true\n );\n }", "title": "" }, { "docid": "a838c68c3331dae70a5ee09d9ac4973c", "score": "0.53179204", "text": "protected function _getPropertyTransformMap() : array {\r\n\t\treturn $this->_propertyTransformMap;\r\n\t}", "title": "" }, { "docid": "4cd23168f238c73d942831c6917dfac2", "score": "0.5303917", "text": "protected function properties()\n {\n return [\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CONTACT__GROUP_TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_person_group_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CONTACT__GROUP_TITLE'\n ]\n ]\n ),\n 'email_address' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CONTACT__GROUP_EMAIL_ADDRESS',\n C__PROPERTY__INFO__DESCRIPTION => 'EMail'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_person_group_list__email_address'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CONTACT__GROUP_EMAIL_ADDRESS'\n ]\n ]\n ),\n 'phone' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CONTACT__GROUP_PHONE',\n C__PROPERTY__INFO__DESCRIPTION => 'Phone'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_person_group_list__phone'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CONTACT__GROUP_PHONE'\n ]\n ]\n ),\n 'ldap_group' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__PERSON_GROUPS__LDAP_MAPPING',\n C__PROPERTY__INFO__DESCRIPTION => 'LDAP Group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_person_group_list__ldap_group'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CONTACT__GROUP_LDAP'\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_person_group_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_SPECIFIC . C__CATS__PERSON_GROUP_MASTER\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "13617d7080810f303b58639ea72cd901", "score": "0.53013647", "text": "public static function _getPropertyNames(): array\n {\n return [\n 'migrate_to_chat_id',\n 'retry_after',\n ];\n }", "title": "" }, { "docid": "e70c6b0a278f5d90490ed5e2765a32c7", "score": "0.5291707", "text": "protected function getPropertyListFields() : array\n {\n $arPropertyList = (array) Property::active()->lists('name', 'id');\n if (empty($arPropertyList)) {\n return [];\n }\n\n $arResult = [];\n foreach ($arPropertyList as $iPropertyID => $sName) {\n $arResult['property.'.$iPropertyID] = $sName;\n }\n\n return $arResult;\n }", "title": "" }, { "docid": "ab23e23e48e32d6191735fdc696de6b9", "score": "0.5289913", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'ccRecipients' => fn(ParseNode $n) => $o->setCcRecipients($n->getCollectionOfObjectValues([Recipient::class, 'createFromDiscriminatorValue'])),\n 'hasAttachments' => fn(ParseNode $n) => $o->setHasAttachments($n->getBooleanValue()),\n 'isLocked' => fn(ParseNode $n) => $o->setIsLocked($n->getBooleanValue()),\n 'lastDeliveredDateTime' => fn(ParseNode $n) => $o->setLastDeliveredDateTime($n->getDateTimeValue()),\n 'posts' => fn(ParseNode $n) => $o->setPosts($n->getCollectionOfObjectValues([Post::class, 'createFromDiscriminatorValue'])),\n 'preview' => fn(ParseNode $n) => $o->setPreview($n->getStringValue()),\n 'topic' => fn(ParseNode $n) => $o->setTopic($n->getStringValue()),\n 'toRecipients' => fn(ParseNode $n) => $o->setToRecipients($n->getCollectionOfObjectValues([Recipient::class, 'createFromDiscriminatorValue'])),\n 'uniqueSenders' => function (ParseNode $n) {\n $val = $n->getCollectionOfPrimitiveValues();\n if (is_array($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n }\n /** @var array<string>|null $val */\n $this->setUniqueSenders($val);\n },\n ]);\n }", "title": "" }, { "docid": "f57d94de483942cd9e851f69c68052c0", "score": "0.52821237", "text": "public function toArray(): array\n {\n $array = [];\n $str = new Str();\n\n foreach (\\get_object_vars($this) as $property => $value) {\n $array[$str->snake($property)] = $value;\n }\n\n return $array;\n }", "title": "" }, { "docid": "721fe74827c72bed806d9db6a0098e02", "score": "0.5281223", "text": "public function getProperties() : array\n {\n return $this->properties;\n }", "title": "" }, { "docid": "78874d31d48cec832cfb4b184de859b4", "score": "0.52796865", "text": "public function toArray()\r\n { \r\n return array(\r\n 'name' => $this->name,\r\n 'discountType' => array(\r\n 'value' => $this->discountType,\r\n 'name' => self::$discountTypes[$this->discountType],\r\n ),\r\n 'usageType' => array(\r\n 'value' => $this->usageType,\r\n 'name' => self::$usageTypes[$this->usageType],\r\n ), \r\n );\r\n }", "title": "" }, { "docid": "5394f6cbb2f9b174af98a65439fb5346", "score": "0.5278243", "text": "public static function getProperties()\n {\n return [\n 'PublisherID' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PublisherName' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'LogoURL' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Website' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "title": "" }, { "docid": "6bb8e80d4acb2566ed7fc2eda5b418d8", "score": "0.5264382", "text": "protected function propertiesToFields()\n\t{\n\t\t$fields = array(\n\t\t\t\"cp_professional_id\" => array(\"integer\", $this->getCertifiedProfessionalId()),\n\t\t\t\"ep_exam_id\" => array(\"integer\", $this->getExaminationId()),\n\t\t\t\"nr\" => array(\"integer\", $this->getNumber()),\n\t\t\t\"signed_by\" => array(\"text\", $this->getSignedBy()),\n\t\t\t\"issued_by_wmo\" => array(\"text\", $this->getIssuedByWmo()),\n\t\t\t\"is_extension\" => array(\"integer\", $this->getIsExtension()),\n\t\t\t\"status\" => array(\"integer\", $this->getStatus()),\n\t\t\t\"cfile\" => array(\"integer\", $this->getFile()),\n\t\t\t);\n\n\t\t// proofs\n\t\tforeach (self::getProofTypes() as $k => $v)\n\t\t{\n\t\t\t$fields[$k] = array(\"integer\", $this->getProof($k));\n\t\t}\n\n\t\t// types\n\t\tforeach (self::getCertificateTypes() as $k => $v)\n\t\t{\n\t\t\t$fields[\"type_\".$k] = array(\"integer\", $this->getType($k));\n\t\t}\n\n\t\t// valid until\n\t\t$date = $this->getValidUntil();\n\t\tif($date && !$date->isNull())\n\t\t{\n\t\t\t$fields[\"valid_until\"] = array(\"timestamp\", $date->get(IL_CAL_DATE));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields[\"valid_until\"] = array(\"timestamp\", \"\");\n\t\t}\n\n\t\t// issued on\n\t\t$date = $this->getIssuedOn();\n\t\tif($date && !$date->isNull())\n\t\t{\n\t\t\t$fields[\"issued_on\"] = array(\"timestamp\", $date->get(IL_CAL_DATE));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields[\"issued_on\"] = array(\"timestamp\", \"\");\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "281e0ec920978d7a3ab6fe4c43aa41d6", "score": "0.525179", "text": "public function getSupportedFormats()\n {\n return array_keys($this->formats);\n }", "title": "" }, { "docid": "de0602fab3c6c7cd8a9b8e881f4873a5", "score": "0.5249272", "text": "public static function getProperties()\n {\n return [\n 'PaymentServiceID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PaymentServiceName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PaymentServiceUrl' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PayNowText' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PaymentServiceType' => [false, self::PROPERTY_TYPE_STRING, null, false, false]\n ];\n }", "title": "" }, { "docid": "7aae827a5c7b8210c085949411cd5257", "score": "0.52441776", "text": "public function getKafkaDataFormatAllowableValues()\r\n {\r\n return [\r\n self::KAFKA_DATA_FORMAT_JSON,\r\n self::KAFKA_DATA_FORMAT_AVRO,\r\n ];\r\n }", "title": "" }, { "docid": "55233f800e9b659c1a0907aa462d471e", "score": "0.52429205", "text": "public function toArray()\n {\n return [\n 'locale' => $this->getLocale(),\n 'label' => $this->getLabel(),\n 'selected' => $this->getSelected(),\n 'lastUpdate' => $this->getLastUpdate(),\n ];\n }", "title": "" }, { "docid": "22e8e4660b6c71c31b308447be91e500", "score": "0.5242232", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'conflictCount' => fn(ParseNode $n) => $o->setConflictCount($n->getIntegerValue()),\n 'errorCount' => fn(ParseNode $n) => $o->setErrorCount($n->getIntegerValue()),\n 'failedCount' => fn(ParseNode $n) => $o->setFailedCount($n->getIntegerValue()),\n 'notApplicableCount' => fn(ParseNode $n) => $o->setNotApplicableCount($n->getIntegerValue()),\n 'notApplicablePlatformCount' => fn(ParseNode $n) => $o->setNotApplicablePlatformCount($n->getIntegerValue()),\n 'successCount' => fn(ParseNode $n) => $o->setSuccessCount($n->getIntegerValue()),\n ]);\n }", "title": "" }, { "docid": "91ca97b5aa7215fb0116e33e758ccf88", "score": "0.5235751", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'completionMonthYear' => fn(ParseNode $n) => $o->setCompletionMonthYear($n->getDateValue()),\n 'endMonthYear' => fn(ParseNode $n) => $o->setEndMonthYear($n->getDateValue()),\n 'institution' => fn(ParseNode $n) => $o->setInstitution($n->getObjectValue([InstitutionData::class, 'createFromDiscriminatorValue'])),\n 'program' => fn(ParseNode $n) => $o->setProgram($n->getObjectValue([EducationalActivityDetail::class, 'createFromDiscriminatorValue'])),\n 'startMonthYear' => fn(ParseNode $n) => $o->setStartMonthYear($n->getDateValue()),\n ]);\n }", "title": "" } ]
bef654e22e7b076471787ac8572b32e4
/ Git Functions for Admin Home Define a function for checking if a given home page option has uncommitted changes or unpulled updates
[ { "docid": "3d6a814afe6e9154142a44cd80901aad", "score": "0.0", "text": "public static function admin_home_group_get_repo_changes($repo_config, &$repo_changes, $filter_unique = false){\n if (empty($repo_config['path'])){ return false; }\n $repo_changes = array();\n\n // Collect uncommitted changes, uncommitted deletes, and committed changes/deletes\n $uncommitted_changes = cms_admin::git_get_uncommitted_changes($repo_config['path']);\n $uncommitted_deletes = cms_admin::git_get_deleted($repo_config['path']);\n $all_committed = cms_admin::git_get_committed_changes($repo_config['path']);\n\n // If any of the uncommitted changes are actually deletes, remove them from the first list\n if (!empty($uncommitted_deletes)){ $uncommitted_changes = array_diff($uncommitted_changes, $uncommitted_deletes); }\n\n // Filter each of the result arrays as necessary (if provided)\n if (!empty($uncommitted_changes) && !empty($repo_config['filter'])){ $uncommitted_changes = self::git_filter_list_by_data($uncommitted_changes, $repo_config['filter']); }\n if (!empty($uncommitted_deletes) && !empty($repo_config['filter'])){ $uncommitted_deletes = self::git_filter_list_by_data($uncommitted_deletes, $repo_config['filter']); }\n if (!empty($all_committed) && !empty($repo_config['filter'])){ $all_committed = self::git_filter_list_by_data($all_committed, $repo_config['filter']); }\n\n // Filter out unique values to ensure no duplicates (if requested)\n if (!empty($uncommitted_changes) && $filter_unique){ $unique = array(); foreach ($uncommitted_changes AS $k => $p){ list($t) = explode('/', $p); if (!in_array($t, $unique)){ $unique[] = $t; } } $uncommitted_changes = $unique; }\n if (!empty($uncommitted_deletes) && $filter_unique){ $unique = array(); foreach ($uncommitted_deletes AS $k => $p){ list($t) = explode('/', $p); if (!in_array($t, $unique)){ $unique[] = $t; } } $uncommitted_deletes = $unique; }\n if (!empty($all_committed) && $filter_unique){ $unique = array(); foreach ($all_committed AS $k => $p){ list($t) = explode('/', $p); if (!in_array($t, $unique)){ $unique[] = $t; } } $all_committed = $unique; }\n\n // Add the results to the repo changes array\n $repo_changes['uncommitted'] = array();\n if (!empty($uncommitted_changes)){ $repo_changes['uncommitted']['changes'] = $uncommitted_changes; }\n if (!empty($uncommitted_deletes)){ $repo_changes['uncommitted']['deletes'] = $uncommitted_deletes; }\n $repo_changes['committed'] = $all_committed;\n\n }", "title": "" } ]
[ { "docid": "7e12abd152b78197b7d4b6016506b58c", "score": "0.60631424", "text": "function OS_is_home_page() {\r\n\r\n if ( !$_GET OR ( isset($_GET[\"post_id\"]) OR (!isset($_GET[\"u\"]) AND isset($_GET[\"page\"]) ) ) \r\n AND !isset($_GET[\"game\"]) \r\n AND !isset($_GET[\"games\"]) \r\n AND !isset($_GET[\"heroes\"]) \r\n AND !isset($_GET[\"items\"])\r\n AND !isset($_GET[\"warn\"])\r\n AND !isset($_GET[\"safelist\"])\r\n AND !isset($_GET[\"bans\"])\r\n AND !isset($_GET[\"ban_appeals\"])\r\n AND !isset($_GET[\"ban_reports\"])\r\n AND !isset($_GET[\"admins\"])\r\n AND !isset($_GET[\"about_us\"])\r\n AND !isset($_GET[\"top\"])\r\n AND !isset($_GET[\"members\"])\r\n AND !isset($_GET[\"guides\"])\r\n AND !isset($_GET[\"action\"])\r\n ) \r\n {\r\n return true;\r\n } else return false;\r\n\r\n}", "title": "" }, { "docid": "10b166904e86a286ad4793141005952d", "score": "0.59783256", "text": "function _check_own_changes()\n {\n if( ($_POST['rights_orig'] != (int)$_POST['rights']) || ($_POST['status_orig'] != (int)$_POST['status']) ) \n {\n // check permission\n $_is_logged_user = $this->B->F( USER_FILTER,\n 'permission',\n array( 'action' => 'is_logged_user',\n 'user_id' => (int) $_POST['uid'])); \n if(TRUE == $_is_logged_user)\n {\n $this->B->tpl_error = 'You can not change your own rights or status!';\n return FALSE;\n } \n }\n return TRUE;\n }", "title": "" }, { "docid": "4a79f1461d6e52ade72e91d63c2afb98", "score": "0.5837102", "text": "public function action_update_check()\r\n\t{\r\n\t\tUpdate::add( 'SubPages', 'c6a39795-d5cb-4042-b05b-9666825b1bb4', $this->info->version );\r\n\t}", "title": "" }, { "docid": "dcfc6ea6b0b0a647b297c2bf16ebaa63", "score": "0.572159", "text": "public function checkIfLoginAllowedInBranch() {}", "title": "" }, { "docid": "8334a98bb705f33928f79fdcc61da3c4", "score": "0.5671724", "text": "private function checkPermision() \n {\n $allow_change_filds = false;\n if ($this->_input['page_id']) {\n $issue_created_by = $this->_dbr->getOne(\"\n SELECT users.username\n FROM total_log \n JOIN users ON users.system_username = total_log.username\n WHERE `Table_name` = 'issuelog' \n AND Field_name = 'id' \n AND TableID = \" . $this->_input['page_id']);\n\n if ($issue_created_by == $this->_loggedUser->get('username') || $this->_loggedUser->get('admin')) {\n $allow_change_filds = true;\n }\n }\n return $allow_change_filds;\n }", "title": "" }, { "docid": "94fe33d1334c0d00663bc05382839a19", "score": "0.5550573", "text": "function checkPerm($lvl, $au, $changes=false) //heck who is trying to access this. false == access denied..\n {\n \n // do we have an empty system..\n if ($au && $au->id == -1) {\n return true;\n }\n // if not authenticated... do not allow in???\n if (!$au ) {\n return false;\n }\n \n // determine if it's staff!!!\n $owncomp = DB_DataObject::Factory('core_company');\n $owncomp->get('comptype', 'OWNER');\n $editor_is_staff = ($au->company_id == $owncomp->id);\n \n if (!$editor_is_staff) {\n // non staff editing should not user roo/isPerm?\n return false; // no permission if user is not staff!?\n \n }\n \n $this_is_staff = ($this->company_id == $owncomp->id);\n \n /*\n if (!$this_is_staff ) {\n \n // - can not change company!!!\n if ($changes && \n isset($changes['company_id']) && \n $changes['company_id'] != $au->company_id) {\n return false;\n }\n // can only set new emails..\n if ($changes && \n !empty($this->email) && \n isset($changes['email']) && \n $changes['email'] != $this->email) {\n return false;\n }\n \n \n // mtrack had the idea that all 'S' should be allowed.. - but filtered later..\n // ???? do we want this?\n \n // edit self... - what about other staff members...\n \n //return $this->company_id == $au->company_id;\n }\n */\n \n // yes, only owner company can mess with this...\n \n \n \n \n switch ($lvl) {\n // extra case change passwod?\n case 'P': //??? password\n // standard perms -- for editing + if the user is dowing them selves..\n $ret = $this_is_staff ? $au->hasPerm(\"Core.Staff\", \"E\") : $au->hasPerm(\"Core.Person\", \"E\");\n return $ret || $au->id == $this->id; // can change own data?\n \n default: \n return $this_is_staff ? $au->hasPerm(\"Core.Staff\", $lvl) : $au->hasPerm(\"Core.Person\", $lvl);\n \n \n \n }\n return false;\n }", "title": "" }, { "docid": "681033c0fbb618f3f51ba731825722c5", "score": "0.5544073", "text": "function has_homepage() {\n\tglobal $themetemplates;\n\treturn(file_exists(\"$themetemplates/home\".TPL_EXT));\n}", "title": "" }, { "docid": "280047cba78a4db0ad30741eab1e929a", "score": "0.55293614", "text": "function is_edit_account_page()\n {\n }", "title": "" }, { "docid": "b5d727b73a2d44a30b8e955d99b671e0", "score": "0.5527343", "text": "protected function calledFromPlugin(){\r\n\r\n return !file_exists( $this->getGitRootDirectory() . '/htdocs' );\r\n \r\n }", "title": "" }, { "docid": "20313c62af577349c806a683fafefc4d", "score": "0.55230147", "text": "public function git_status() {\n\t\tIDE::check_perms();\n\n\t\t$this->git_open_repo(); // make sure git repo is open\n\n\t\t// echo branch\n\t\t$branch = $this->git->getCurrentBranch();\n\t\techo '<p><strong>' . __( 'Current branch:' ) . '</strong> ' . $branch . '</p>';\n\n\t\t// [0] => Array\n\t\t// (\n\t\t// [file] => AceIDE.php\n\t\t// [x] =>\n\t\t// [y] => M\n\t\t// [renamed] =>\n\t\t// )\n\t\t$status = $this->git->getStatus();\n\t\t$i = 0;// row counter\n\n\t\tif ( count( $status ) ) {\n\t\t\t// echo out rows of staged files\n\t\t\tforeach ( $status as $item ) {\n\t\t\t\techo '<div class=\"gitfilerow ' . ( $i % 2 != 0 ? 'light' : '' ) .\"\\\"><span class='filename'>{$item[\"file\"]}</span> <input type='checkbox' name=\\\"\" . str_replace( '=', '_', base64_encode( $item['file'] ) ) . '\" value=\"' . base64_encode( $item['file'] ) . '\" checked />\n\t\t\t\t<a href=\"' . base64_encode( $item['file'] ) . '\" class=\"viewdiff\">[view diff]</a> <div class=\"gitdivdiff ' . str_replace( '=', '_', base64_encode( $item['file'] ) ) . '\"></div> </div>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} else {\n\t\t\techo '<p class=\"red\">' . __( 'No changed files in this repo so nothing to commit.' ) . '</p>';\n\t\t}\n\n\t\t// output the commit message box\n\t\techo '<div id=\"gitdivcommit\"><label>Commit message</label><br /><input type=\"text\" id=\"gitmessage\" name=\"message\" class=\"message\" />\n\t\t\t<p><a href=\"#\" class=\"button-primary\">' . __( 'Commit the staged changes' ) . '</a></p></div>';\n\n\t\tdie(); // this is required to return a proper result\n\t}", "title": "" }, { "docid": "ae00581febb8874b518ff3bff458dc96", "score": "0.5502048", "text": "public function ts_update_db_check() {\n\n\t\tif ( ( false === self::$plugin_version || false === self::$previous_plugin_version ) &&\n\t\t 'yes' == get_option( self::$plugin_prefix . '_pro_welcome_page_shown' )\n\t\t) {\n\t\t return;\n\t\t}\n\n\t\tif( self::$previous_plugin_version > self::$plugin_version ) {\n\t\t return;\n\t\t}\n\n\t\tif ( '' == self::$plugin_version || '' == self::$previous_plugin_version ) {\n\t\t return;\n\t\t}\n\n\t\tif ( self::$plugin_version != self::$previous_plugin_version ) {\n\t\t delete_option( self::$plugin_prefix . '_pro_welcome_page_shown' );\n\t\t delete_option( self::$plugin_prefix . '_pro_welcome_page_shown_time' );\n\t\t}\n \t}", "title": "" }, { "docid": "b48c01966af078c3f5f110ac4354f3e9", "score": "0.54802406", "text": "function update_check()\r\r\n{\r\r\n\t\r\r\n\t$ns = e107::getRender();\r\r\n\t$e107cache = e107::getCache();\r\r\n\t$sql = e107::getDb();\r\r\n\t$mes = e107::getMessage();\r\r\n\t\t\r\r\n\tglobal $dont_check_update, $e107info;\r\r\n\tglobal $dbupdate, $dbupdatep, $e107cache;\r\r\n\r\r\n\t$update_needed = FALSE;\r\r\n\r\r\n\tif ($dont_check_update === FALSE)\r\r\n\t{\r\r\n\t\t\r\r\n\t\tforeach($dbupdate as $func => $rmks) // See which core functions need update\r\r\n\t\t{\r\r\n\t\t if (function_exists('update_'.$func))\r\r\n\t\t\t{\r\r\n\t\t\t\tif (!call_user_func('update_'.$func, FALSE))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t $update_needed = TRUE;\r\r\n\t\t\t\t break;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// Now check plugins - XXX DEPRECATED \r\r\n\t\tforeach($dbupdatep as $func => $rmks)\r\r\n\t\t{\r\r\n\t\t\tif (function_exists('update_'.$func))\r\r\n\t\t\t{\r\r\n\t\t\t\tif (!call_user_func('update_'.$func, FALSE))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t $update_needed = TRUE;\r\r\n\t\t\t\t break;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t// New in v2.x\r\r\n\t\tif(e107::getPlugin()->updateRequired('boolean'))\r\r\n\t\t{\r\r\n\t\t\t $update_needed = TRUE;\t\t\r\r\n\t\t}\r\r\n\t\r\r\n\r\r\n\t//\t$e107cache->set_sys('nq_admin_updatecheck', time().','.($update_needed ? '2,' : '1,').$e107info['e107_version'], TRUE);\r\r\n\t}\r\r\n\telse\r\r\n\t{\r\r\n\t\t$update_needed = ($dont_check_update == '2');\r\r\n\t}\r\r\n\r\r\n\tif ($update_needed === TRUE)\r\r\n\t{\r\r\n\t\t$frm = e107::getForm();\r\r\n\t\t\r\r\n\t\t$txt = \"\r\r\n\t\t<form method='post' action='\".e_ADMIN_ABS.\"e107_update.php'>\r\r\n\t\t<div>\r\r\n\t\t\t\".ADLAN_120.\"\r\r\n\t\t\t\".$frm->admin_button('e107_system_update', LAN_UPDATE, 'other').\"\r\r\n\t\t</div>\r\r\n\t\t</form>\r\r\n\t\t\";\r\r\n\t\t\r\r\n\t\t$mes->addInfo($txt);\r\r\n\t}\r\r\n}", "title": "" }, { "docid": "71170a11f7a0f4b823d22721f4c8dcae", "score": "0.54702955", "text": "function plugin_update_checker() {\n\t\\do_action( 'gnist/plugin_update_checker' );\n}", "title": "" }, { "docid": "0a9cbeae7d325f0d2c0bfac1aaafd437", "score": "0.546951", "text": "public function slider_need_update_checks(){\n\t\t$finished = get_option('revslider_update_revision_current', '1.0.0');\n\n\t\treturn (version_compare($finished, $this->revision, '<')) ? true : false;\n\t}", "title": "" }, { "docid": "a41881c86ad9708768b90da9bad5823b", "score": "0.5461165", "text": "function check_for_update(){\n return false;\n }", "title": "" }, { "docid": "0cb2637011dd206ec390aac1e90725a0", "score": "0.54479796", "text": "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "title": "" }, { "docid": "cb2123386a07144bdab1885f20bb690d", "score": "0.54383236", "text": "function is_checkout()\n {\n }", "title": "" }, { "docid": "83337393802a1c095253fae9461e23ce", "score": "0.54355776", "text": "public function check_options()\r\n\t{\r\n\t\tif ( current_user_can( 'edit_posts' ) )\r\n\t\t{\r\n\t\t\tif ( empty( $this->options['bitly_username'] ) || empty( $this->options['bitly_api_key'] ) )\r\n\t\t\t{\r\n\t\t\t\tif ( ! isset( $_GET['page'] ) || $_GET['page'] != 'wpbitly' )\r\n\t\t\t\t{\r\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'notice_setup' ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( get_option( 'wpbitly_invalid' ) !== false && isset( $_GET['page'] ) && $_GET['page'] == 'wpbitly' )\r\n\t\t\t{\r\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'notice_invalid' ) );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "d9a1731d0bf29272e31e3c9c08d50537", "score": "0.5410997", "text": "function ms_site_check() {\n\n\t/**\n\t * Filters checking the status of the current blog.\n\t *\n\t * @since 3.0.0\n\t *\n\t * @param bool null Whether to skip the blog status check. Default null.\n\t*/\n\t$check = apply_filters( 'ms_site_check', null );\n\tif ( null !== $check )\n\t\treturn true;\n\n\t// Allow super admins to see blocked sites\n\tif ( is_super_admin() )\n\t\treturn true;\n\n\t$blog = get_site();\n\n\tif ( '1' == $blog->deleted ) {\n\t\tif ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )\n\t\t\treturn WP_CONTENT_DIR . '/blog-deleted.php';\n\t\telse\n\t\t\twp_die( __( 'This site is no longer available.' ), '', array( 'response' => 410 ) );\n\t}\n\n\tif ( '2' == $blog->deleted ) {\n\t\tif ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {\n\t\t\treturn WP_CONTENT_DIR . '/blog-inactive.php';\n\t\t} else {\n\t\t\t$admin_email = str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_network()->domain ) );\n\t\t\twp_die(\n\t\t\t\t/* translators: %s: admin email link */\n\t\t\t\tsprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact %s.' ),\n\t\t\t\t\tsprintf( '<a href=\"mailto:%s\">%s</a>', $admin_email )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( $blog->archived == '1' || $blog->spam == '1' ) {\n\t\tif ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) )\n\t\t\treturn WP_CONTENT_DIR . '/blog-suspended.php';\n\t\telse\n\t\t\twp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) );\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "9bd816a971ac662b58c2a4ad6780159c", "score": "0.5402883", "text": "public function is_home()\n {\n return is_home();\n }", "title": "" }, { "docid": "5ff0bea6bb825d23a3006e1ff26af8b8", "score": "0.5388592", "text": "function canBeUpdated() ;", "title": "" }, { "docid": "751107ed3ddca2848125b2a900c7fc4f", "score": "0.5385925", "text": "private function admin_check() {\n\n\t\tif ($this->pikachu->show('userstatus') === 'admin') {\n\n\t\t\treturn TRUE;\n\n\t\t} else {\n\n\t\t\tredirect(base_url('log'));\n\t\t\treturn FALSE;\n\t\t}\n\n\t}", "title": "" }, { "docid": "d5444db31f0dfc41c4b8a47a23b270a5", "score": "0.53803414", "text": "public function is_home()\n {\n }", "title": "" }, { "docid": "7b9fde5ce58dd47d9e88d24889165dd3", "score": "0.53759086", "text": "function bunchy_is_latest_page() {\n\treturn is_home();\n}", "title": "" }, { "docid": "7ce43a6fb7a05aae7bcf0d57032402c0", "score": "0.5373527", "text": "function validAdminAccess() {\n $validAccess = true;\n $options = get_option('pediodosonline_option_name');\n if (!isset($options['email']) || !isset($options['password'])) {\n $validAccess = false;\n } elseif (!$this->login($options['email'], $options['password'], false, true)) {\n $validAccess = false;\n }\n\n if (isset($_SERVER['QUERY_STRING'])) {\n $array = explode(\"&\", $_SERVER['QUERY_STRING']);\n $page = $array[0]; //page always firts.\n $pos = strpos($page, $this->suffixPages);\n $pageNumber = substr($page, $pos);\n if ($pos && isset($this->pages[$pageNumber]) && $pageNumber != 'config_error') {\n if (!$validAccess) {\n wp_redirect(site_url() . '?' . $this->suffixPages . 'config_error');\n die();\n }\n }\n }\n\n if (isset($options['login_page']) && !empty($options['login_page'])) {\n $id = $options['login_page'];\n if (is_page($id)) {\n if (!$validAccess) {\n wp_redirect(site_url() . '?' . $this->suffixPages . 'config_error');\n die();\n }\n }\n }\n return;\n }", "title": "" }, { "docid": "12aa13f77ab07416f6ba68671b5e2fb5", "score": "0.53699046", "text": "public static function check($action = false, $editCID = false, $editCType = false, $editCVersion = 'latest', $welcomePage = false) {\n\t\n\t\t//If the Admin is not logged in to this site, then they shouldn't have Admin rights here\n\t\tif (!empty($_SESSION['admin_userid'])\n\t\t && !empty($_SESSION['admin_permissions'])\n\t\t && !empty($_SESSION['admin_logged_into_site'])\n\t\t && $_SESSION['admin_logged_into_site'] == COOKIE_DOMAIN. SUBDIRECTORY. \\ze::setting('site_id')\n\t\n\t\t//If an admin looks at an embedded link, show them what it would look like if they were logged out.\n\t\t//(N.b. if we didn't do this, they'd see a security error due to the X-Frame-Options logic in index.php.)\n\t\t && !isset($_REQUEST['zembedded'])\n\t\n\t\t//If the Admin hasn't passed the welcome page, then they shouldn't be able to use their\n\t\t//Admin rights anywhere except the welcome page\n\t\t && ($welcomePage || !empty($_SESSION['admin_logged_in']))) {\n\t\t\n\t\t\t//If this is a check to edit a Content Item, also check to see if it is unlocked to\n\t\t\t//the current admin and able to be edited\n\t\t\tif (!$welcomePage\n\t\t\t && $editCID && $editCType\n\t\t\n\t\t\t//Permissions to view languages, menu nodes, plugins and export content items are exceptions and\n\t\t\t//should be granted even if the admin could not edit a content item\n\t\t\t && $action != '_PRIV_VIEW_LANGUAGE'\n\t\t\t && $action != '_PRIV_VIEW_MENU_ITEM'\n\t\t\t && $action != '_PRIV_EXPORT_CONTENT_ITEM'\n\t\t\t && $action != '_PRIV_VIEW_REUSABLE_PLUGIN') {\n\t\t\t\n\t\t\t\t//If this is a check on the current content item, there's no need to query the\n\t\t\t\t//database for info we already have\n\t\t\t\tif ($editCID === \\ze::$cID\n\t\t\t\t && $editCType === \\ze::$cType) {\n\t\t\t\t\t$status = \\ze::$status;\n\t\t\t\t\t$equivId = \\ze::$equivId;\n\t\t\t\t\t$adminVersion = \\ze::$adminVersion;\n\t\t\t\t\t$langId = \\ze::$langId;\n\t\t\t\t\t$locked = \\ze::$locked;\n\t\t\t\n\t\t\t\t//Otherwise look up the details from the database\n\t\t\t\t} else {\n\t\t\t\t\tif (!$content = \\ze\\row::get(\n\t\t\t\t\t\t'content_items',\n\t\t\t\t\t\t['equiv_id', 'language_id', 'status', 'admin_version', 'lock_owner_id'],\n\t\t\t\t\t\t['id' => $editCID, 'type' => $editCType]\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\t\t$status = $content['status'];\n\t\t\t\t\t$equivId = $content['equiv_id'];\n\t\t\t\t\t$adminVersion = $content['admin_version'];\n\t\t\t\t\t$langId = $content['language_id'];\n\t\t\t\t\t$locked = $content['lock_owner_id'] && $content['lock_owner_id'] != $_SESSION['admin_userid'];\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//Deleted or locked content items cannot be edited\n\t\t\t\tif ($status == 'deleted' || $locked) {\n\t\t\t\t\treturn false;\n\t\t\n\t\t\t\t//If a specific version is given, check that version is a draft\n\t\t\t\t} elseif ($editCVersion !== 'latest') {\n\t\t\t\t\tif (($editCVersion !== true && $editCVersion != $adminVersion)\n\t\t\t\t\t || $status == 'published'\n\t\t\t\t\t || $status == 'hidden'\n\t\t\t\t\t || $status == 'trashed') {\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\t\tif ($_SESSION['admin_permissions'] == 'specific_areas') {\n\t\t\t\t\n\t\t\t\t\t//If this admin can only edit specific content items,\n\t\t\t\t\t//or can only edit content items of a specific content type,\n\t\t\t\t\t//or can only edit content items of a specific language,\n\t\t\t\t\t//check that this is one of those content items.\n\t\t\t\t\tif (empty($_SESSION['admin_specific_languages'][$langId])\n\t\t\t\t\t && empty($_SESSION['admin_specific_content_types'][$editCType])\n\t\t\t\t\t && empty($_SESSION['admin_specific_content_items'][$editCType. '_'. $editCID])) {\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\n\t\t\t//No action specified? Just check if the admin is logged in.\n\t\t\tif ($action === false) {\n\t\t\t\treturn true;\n\t\t\n\t\t\t//Otherwise run different logic depending on this admin's permissions\n\t\t\t} else {\n\t\t\t\tswitch ($_SESSION['admin_permissions']) {\n\t\t\t\t\t//Always return true if the admin has every permission\n\t\t\t\t\tcase 'all_permissions':\n\t\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\t\t//If the admin has specific actions, check they have the specified action\n\t\t\t\t\tcase 'specific_actions':\n\t\t\t\t\t\treturn !empty($_SESSION['privs'][$action]);\n\t\t\t\t\n\t\t\t\t\t//Translators/microsite admins can only have a few set permissions,\n\t\t\t\t\t//anything else should be denied.\n\t\t\t\t\tcase 'specific_areas':\n\t\t\t\t\t\tswitch ($action) {\n\t\t\t\t\t\t\tcase 'perm_author':\n\t\t\t\t\t\t\tcase 'perm_editmenu':\n\t\t\t\t\t\t\tcase 'perm_publish':\n\t\t\t\t\t\t\tcase '_PRIV_VIEW_SITE_SETTING':\n\t\t\t\t\t\t\tcase '_PRIV_VIEW_CONTENT_ITEM_SETTINGS':\n\t\t\t\t\t\t\tcase '_PRIV_VIEW_MENU_ITEM':\n\t\t\t\t\t\t\tcase '_PRIV_EDIT_MENU_TEXT':\n\t\t\t\t\t\t\tcase '_PRIV_CREATE_TRANSLATION_FIRST_DRAFT':\n\t\t\t\t\t\t\tcase '_PRIV_EDIT_DRAFT':\n\t\t\t\t\t\t\tcase '_PRIV_CREATE_REVISION_DRAFT':\n\t\t\t\t\t\t\tcase '_PRIV_DELETE_DRAFT':\n\t\t\t\t\t\t\tcase '_PRIV_EDIT_CONTENT_ITEM_TEMPLATE':\n\t\t\t\t\t\t\tcase '_PRIV_SET_CONTENT_ITEM_STICKY_IMAGE':\n\t\t\t\t\t\t\tcase '_PRIV_IMPORT_CONTENT_ITEM':\n\t\t\t\t\t\t\tcase '_PRIV_EXPORT_CONTENT_ITEM':\n\t\t\t\t\t\t\tcase '_PRIV_HIDE_CONTENT_ITEM':\n\t\t\t\t\t\t\tcase '_PRIV_PUBLISH_CONTENT_ITEM':\n\t\t\t\t\t\t\tcase '_PRIV_VIEW_LANGUAGE':\n\t\t\t\t\t\t\tcase '_PRIV_MANAGE_LANGUAGE_PHRASE':\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Allow admins to create content items of certain types, if they have that content type enabled\n\t\t\t\t\t\t\tcase '_PRIV_CREATE_FIRST_DRAFT':\n\t\t\t\t\t\t\t\tif ($editCType) {\n\t\t\t\t\t\t\t\t\treturn !empty($_SESSION['admin_specific_content_types'][$editCType]);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c7b32b309ee25f8d977f73ec6c969b6c", "score": "0.5359335", "text": "function mash_core_status() {\n $status_table = _core_site_status_table(mash_get_option('project',''), mash_get_option('full'));\n // If args are specified, filter out any entry that is not named\n // (in other words, only show lines named by one of the arg values)\n $args = func_get_args();\n if (!empty($args)) {\n foreach ($status_table as $key => $value) {\n if (!_mash_core_is_named_in_array($key, $args)) {\n unset($status_table[$key]);\n }\n }\n }\n $return = $status_table;\n unset($status_table['%paths']);\n // Print either an ini-format list or a formatted ASCII table\n if (mash_get_option('pipe')) {\n if (count($status_table) == 1) {\n $first_value = array_shift($status_table);\n mash_print_pipe($first_value);\n }\n else {\n mash_print_pipe(_core_site_credential_list($status_table));\n }\n }\n else {\n unset($status_table['Modules path']);\n unset($status_table['Themes path']);\n mash_print_table(mash_key_value_to_array_table($status_table));\n }\n return $return;\n}", "title": "" }, { "docid": "4804959b035bc8779106b85ed191e90a", "score": "0.535283", "text": "public function isHome()\n {\n return false;\n }", "title": "" }, { "docid": "e4729d62e4e552e62526356d4531c5a0", "score": "0.5337035", "text": "private function updateAccessAllowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n }", "title": "" }, { "docid": "4be85272e2736ff87b15099debf63f30", "score": "0.5335977", "text": "protected function getMainRepositoryStatus() {}", "title": "" }, { "docid": "8f0a31733ffb25b3a208ada057b20ca2", "score": "0.53249854", "text": "private function includes() {\r\n\t\t\r\n\t\tif ( is_admin() ) {\r\n\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "849c6c06ffcd090dc6b78c503da9a745", "score": "0.53237736", "text": "function check_updates($content_github=array()/*array*/,$current_version='')\n\t\t\t{\n\t\t\t\tif(count($content_github) == 0)\n\t\t\t\t{\n\t\t\t\t\treturn 'e1';//error 1 -> no pointers on the array\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(($content_github['tag_name']==$current_version) && ($content_github['target_commitish']=='3.3.5'))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn '0';//no updates\n\t\t\t\t\t}\n\t\t\t\t\telseif(($content_github['tag_name']!=$current_version) && ($content_github['target_commitish']=='3.3.5'))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn '1';//update\n\t\t\t\t\t}\n\t\t\t\t\telseif(($content_github['tag_name']!=$current_version) && ($content_github['target_commitish']!='3.3.5'))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 'e2';//can't find updates for this repo\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "81cea75a07b394f73168ef5d2fe739c8", "score": "0.5322542", "text": "function basicChecks( ) {\n\tglobal $database, $mainframe, $mosConfig_list_limit, $mosConfig_live_site;\n\n\t// if the field site_section or site_view doesn't exist in juga_items, echo message to run patch\n\t\t$query = \"SHOW COLUMNS FROM #__juga_items \"\n\t\t. \"\\n LIKE 'site_section' \"\n\t\t;\n\t\t$database->setQuery( $query );\n\t\t$site_section = $database->loadObjectList();\n\t\tif ($database->getErrorNum()) {\n\t\t\techo $database->stderr();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!$site_section) {\n\t\t\techo \"<p style='color:#FFCC00;'>No column of the name `site_section`.</p>\";\n\t\t\t$query = \"ALTER TABLE #__juga_items ADD `site_section` VARCHAR(255) NOT NULL;\"\n\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\tif (!$database->query()) {\n\t\t\t\techo \"<script> alert('\".$database->getErrorMsg().\"'); window.history.go(-1); </script>\\n\";\n\t\t\t\texit();\n\t\t\t}\n\t\t\techo \"<p style='color:#00CC00;' >Column `site_section` created in #__juga_items. </p>\";\t\t\n\t\t}\t\t\n\t\t\n\t\t$query = \"SHOW COLUMNS FROM #__juga_items \"\n\t\t. \"\\n LIKE 'site_view' \"\n\t\t;\n\t\t$database->setQuery( $query );\n\t\t$site_view = $database->loadObjectList();\n\t\tif ($database->getErrorNum()) {\n\t\t\techo $database->stderr();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!$site_view) {\n\t\t\techo \"<p style='color:#FFCC00;'>No column of the name `site_view`.</p>\";\n\t\t\t$query = \"ALTER TABLE #__juga_items ADD `site_view` VARCHAR(255) NOT NULL;\"\n\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\tif (!$database->query()) {\n\t\t\t\techo \"<script> alert('\".$database->getErrorMsg().\"'); window.history.go(-1); </script>\\n\";\n\t\t\t\texit();\n\t\t\t}\n\t\t\techo \"<p style='color:#00CC00;' >Column `site_view` created in #__juga_items. </p>\";\t\t\n\t\t} \t\t\n\t\n\t\t//\t\tif (!site_section || !$site_view) {\n\t\t//\t\t\t$lists[\"alert\"] = _JUGA_RUNPATCH_MESSAGE;\n\t\t//\t\t\tHTML_juga::standardMessage ( $option, $section, &$row, &$lists, &$search, &$pageNav );\n\t\t//\t\t}\t\t\n\t\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga_items \n\t\tWHERE `site_option` = '' \n\t\tAND `site_section` = '' \n\t\tAND `site_view` = '' \n\t\tAND `site_task` = '' \n\t\tAND `type` = 'com'\n\t\t\"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!$data) {\n\t\t\t$query = \"\t\n\t\t\t\tINSERT INTO #__juga_items\n\t\t\t\tSET `title` = 'Joomla! 1.5 Homepage', `site_option` = '', `type` = 'com', `option_exclude` = '1' \n\t\t\t\t\"\n\t\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\t$database->query();\n\t\t\tif ($database->getErrorNum()) {\n\t\t\t\techo $database->stderr();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($data->option_exclude != '1') {\n\t\t\t// set exclude = '1' for frontpage to prevent endless loops\n\t\t\t$query = \"\t\n\t\t\t\tUPDATE #__juga_items\n\t\t\t\tSET `option_exclude` = '1' \n\t\t\t\tWHERE `id` = '\".$data->id.\"' \n\t\t\t\t\"\n\t\t\t\t;\t\t\t\n\t\t\t$database->setQuery( $query );\n\t\t\t$database->query();\n\t\t}\n\t\t\t\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga_items \n\t\tWHERE `site_option` = 'com_frontpage' \n\t\tAND `site_section` = '' \n\t\tAND `site_view` = '' \n\t\tAND `site_task` = '' \n\t\tAND `type` = 'com'\n\t\t\"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!$data) {\n\t\t\t$query = \"\t\n\t\t\t\tINSERT INTO #__juga_items\n\t\t\t\tSET `title` = 'Frontpage', `site_option` = 'com_frontpage', `type` = 'com', `option_exclude` = '1' \n\t\t\t\t\"\n\t\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\t$database->query();\n\t\t\tif ($database->getErrorNum()) {\n\t\t\t\techo $database->stderr();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($data->option_exclude != '1') {\n\t\t\t// set exclude = '1' for frontpage to prevent endless loops\n\t\t\t$query = \"\t\n\t\t\t\tUPDATE #__juga_items\n\t\t\t\tSET `option_exclude` = '1' \n\t\t\t\tWHERE `id` = '\".$data->id.\"' \n\t\t\t\t\"\n\t\t\t\t;\t\t\t\n\t\t\t$database->setQuery( $query );\n\t\t\t$database->query();\n\t\t}\n\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga_items \n\t\tWHERE `site_option` = 'com_login' \n\t\tAND `site_section` = '' \n\t\tAND `site_view` = '' \n\t\tAND `site_task` = '' \n\t\tAND `type` = 'com'\n\t\t\"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!$data) {\n\t\t\t$query = \"\t\n\t\t\t\tINSERT INTO #__juga_items\n\t\t\t\tSET `title` = 'Login', `site_option` = 'com_login', `type` = 'com', `option_exclude` = '1' \n\t\t\t\t\"\n\t\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\t$database->query();\n\t\t\tif ($database->getErrorNum()) {\n\t\t\t\techo $database->stderr();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($data->option_exclude != '1') {\n\t\t\t// set exclude = '1' for login to prevent endless loops\n\t\t\t$query = \"\t\n\t\t\t\tUPDATE #__juga_items\n\t\t\t\tSET `option_exclude` = '1' \n\t\t\t\tWHERE `id` = '\".$data->id.\"' \n\t\t\t\t\"\n\t\t\t\t;\t\t\t\n\t\t\t$database->setQuery( $query );\n\t\t\t$database->query();\n\t\t}\n\t\t\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga_items \n\t\tWHERE `site_option` = 'com_content' \n\t\tAND `site_section` = '' \n\t\tAND `site_view` = '' \n\t\tAND `site_task` = '' \n\t\tAND `type` = 'com'\n\t\t\"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!$data) {\n\t\t\t$query = \"\t\n\t\t\t\tINSERT INTO #__juga_items\n\t\t\t\tSET `title` = 'Content Component', `site_option` = 'com_content', `type` = 'com' \n\t\t\t\t\"\n\t\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\t$database->query();\n\t\t\tif ($database->getErrorNum()) {\n\t\t\t\techo $database->stderr();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga_groups \"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!isset($data->id)) {\n\t\t\t$newJugaGroup = new jugaGroup( $database );\n\t\t\t$newJugaGroup->title\t\t\t= \"Public Access\";\n\t\t\t$newJugaGroup->description\t\t= \"The default JUGA group for Public Access.\";\n\t\t\t$newJugaGroup->store();\n\t\t}\t\n\n\n\t// basic checks\n\tunset($data);\n\t$query = \" SELECT * FROM #__juga WHERE `title` = 'juga_superusergroup' \"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!isset($data->id)) {\n\t\t\t$newJugaConfig = new jugaConfig( $database );\n\t\t\t$newJugaConfig->title\t\t\t= \"juga_superusergroup\";\n\t\t\t$newJugaConfig->description\t\t= \"The JUGA Superuser Group\";\n\t\t\t$newJugaConfig->value\t\t\t= \"-1\";\n\t\t\t$newJugaConfig->store();\n\t\t}\t\n\t\t\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga WHERE `title` = 'flex_juga' \"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!isset($data->id)) {\n\t\t\t$newJugaConfig = new jugaConfig( $database );\n\t\t\t$newJugaConfig->title\t\t\t= \"flex_juga\";\n\t\t\t$newJugaConfig->description\t\t= \"Use this JUGA group for quickly assigning many users and items access\";\n\t\t\t$newJugaConfig->value\t\t\t= \"1\";\n\t\t\t$newJugaConfig->store();\n\t\t}\t\n\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga WHERE `title` = 'default_ce' \"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!isset($data->id)) {\n\t\t\t$newJugaConfig = new jugaConfig( $database );\n\t\t\t$newJugaConfig->title\t\t\t= \"default_ce\";\n\t\t\t$newJugaConfig->description\t\t= \"The default custom error url.\";\n\t\t\t$newJugaConfig->value\t\t\t= $mosConfig_live_site;\n\t\t\t$newJugaConfig->store();\n\t\t}\t\n\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga WHERE `title` = 'default_juga' \"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!isset($data->id)) {\n\t\t\t$newJugaConfig = new jugaConfig( $database );\n\t\t\t$newJugaConfig->title\t\t\t= \"default_juga\";\n\t\t\t$newJugaConfig->description\t\t= \"The default JUGA group. Usually is best as a Public Group or something along those lines...\";\n\t\t\t$newJugaConfig->value\t\t\t= \"1\";\n\t\t\t$newJugaConfig->store();\n\t\t}\t\n\n\t// basic checks\n\tunset($data);\n\t$query = \"\t\n\t\tSELECT * FROM #__juga WHERE `title` = 'default_juga_admin' \"\n\t\t;\n\t$database->setQuery( $query );\n\t$database->loadObject($data);\n\t\tif (!isset($data->id)) {\n\t\t\t$newJugaConfig = new jugaConfig( $database );\n\t\t\t$newJugaConfig->title\t\t\t= \"default_juga_admin\";\n\t\t\t$newJugaConfig->description\t\t= \"The default JUGA admin group, used for new Admin-side Items. Is often the Administrator group.\";\n\t\t\t$newJugaConfig->value\t\t\t= \"-1\";\n\t\t\t$newJugaConfig->store();\n\t\t}\t\n\t\t\t\n}", "title": "" }, { "docid": "48578b1da9b812ea4654c4a5abb2f9cb", "score": "0.5315263", "text": "function check_access($page_name=\"\")\n{\nglobal $ilance,$ilpage,$ilconfig;\n\tif((isset($_SESSION['staff'][$page_name]) AND $_SESSION['staff'][$page_name] == '1')or($_SESSION['ilancedata']['user']['isadmin']==1))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\t\n\t print_action_failed('Access denied',$_SERVER['HTTP_REFERER']);\n\t exit();\n\t}\n}", "title": "" }, { "docid": "7bd37372e882fb5b2885bf01d14f50f6", "score": "0.5312461", "text": "function asu_scholar_check_for_home(){\n $menu_list = vsite_menu_os_menu_tree('primary-menu');\n\n if(!empty($menu_list)){\n reset($menu_list);\n $arrkey = key($menu_list);\n\n if(isset($menu_list[$arrkey]['link']['title']) && strtolower($menu_list[$arrkey]['link']['title']) != \"home\") {\n $found = false;\n foreach($menu_list as $item){\n if(isset($item['link']['title']) && strtolower($item['link']['title']) == 'home') {\n $found = true;\n }\n }\n\n if($found == true){\n drupal_set_message('Web Standards warning. The Home button must be at the beginning of your site menu.', 'warning');\n watchdog('Web Standards', 'The Home button must be first in the primary menu.');\n } else {\n asu_scholar_inject_home();\n watchdog('Web Standards', 'Generating a home button for the primary menu');\n }\n\n }\n } else {\n watchdog('asu_scholar', 'The Primary Menu is missing from the site.');\n }\n}", "title": "" }, { "docid": "5123e885c245f714219a3c50af587327", "score": "0.53067833", "text": "function status()\r\n {\r\n if (is_file(C5T_ROOT . 'cache/config/dbconfig.php')) {\r\n return true;\r\n }\r\n if (is_file(C5T_ROOT . 'cache/dbconfig.php')) {\r\n return true;\r\n }\r\n if (is_file(C5T_ROOT . 'dbconfig.php')) {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "7aff26fdbc90951502b88bc0a958b901", "score": "0.52947813", "text": "public function is_allowed_page(){\n\n\n $allowed_screens = array(\n 'toolset_page_views-editor',\n 'toolset_page_ct-editor',\n 'toolset_page_view-archives-editor',\n 'toolset_page_dd_layouts_edit',\n 'page',\n 'post',\n );\n\n $allowed_pages = array(\n 'dd_layouts_edit',\n 'views-editor',\n 'ct-editor',\n 'view-archives-editor',\n\t\t\t\t'cred_association_form'\n );\n\n\n\n $bootstrap_available = false;\n $bootstrap_version = Toolset_Settings::get_instance();\n\n if(isset($bootstrap_version->toolset_bootstrap_version) && $bootstrap_version->toolset_bootstrap_version != \"-1\"){\n $bootstrap_available = true;\n }\n \n if(defined('LAYOUTS_PLUGIN_NAME')){\n $bootstrap_available = true;\n }\n\n if(is_admin()){\n\n $screen_id = '';\n $screen_base = '';\n $screen = get_current_screen();\n\n if(isset($screen)){\n $screen_id = $screen->id;\n $screen_base = (isset($screen->base)) ? $screen->base : false;\n }\n\n if(in_array($screen_id, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(in_array($screen_base, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(isset($_GET['page']) && in_array($_GET['page'], $allowed_pages) && $bootstrap_available === true){\n return true;\n }\n\n\n } else {\n if ( isset( $_GET['toolset_editor'] ) === true ) {\n return true;\n }\n }\n\n return false;\n\n }", "title": "" }, { "docid": "5d2bae9eb2b8034209de888ee4efaf10", "score": "0.52927834", "text": "public function isVersioncontrolled():bool\n {\n return $this->is_local === true || is_dir(SITE_PATH . '/.apex/svn/' . $this->alias) ? true : false;\n }", "title": "" }, { "docid": "e2df8b8637937751c8c8e33364beb2cf", "score": "0.5292473", "text": "function checkUpdate() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7823e119c91b7b8f5606e25ce0ac5c77", "score": "0.5290576", "text": "function FuncCheckUpdates($File, $Cfg) {\n$Index = TGFindGrid($Cfg);\nif($Index<0) Error(0, \"\"); // The grid was deleted already, this is error\n$Chg = TGGetChanges($Index,1);\nif($Chg!=null) {\n return \"<Grid><IO Result='0' UpdateMessage='The data on server have been modified by another user, do you want to update your data?'/>\"\n . \"<Cfg LastId='\" . TGGetLastId($Index) . \"'/>\"\n . $Chg . \"</Grid>\";\n }\nError(0, \"\");\n}", "title": "" }, { "docid": "34b02c16d24f27425ad7be1dbf7a03de", "score": "0.52864033", "text": "function fn_check_editable_permissions($auth, $user_data)\n{\n $has_permissions = true;\n\n if ($auth['is_root'] == 'Y' && $auth['user_type'] == 'A') {\n $has_permissions = true;\n\n } elseif (isset($user_data['is_root'])) {\n if ($user_data['is_root'] == 'Y' && $auth['is_root'] != 'Y' && $user_data['user_type'] == 'A') {\n $has_permissions = false;\n\n } elseif ($auth['user_type'] == 'V' && $user_data['is_root'] == 'Y') {\n if ($auth['user_id'] != $user_data['user_id']) {\n $has_permissions = false;\n }\n }\n }\n\n /**\n * Modifies the result of permission checking to modify profile\n *\n * @param array $auth authentication information\n * @param array $user_data Edited profile\n * @param bool $has_permissions checking result\n */\n fn_set_hook('check_editable_permissions_post', $auth, $user_data, $has_permissions);\n\n return $has_permissions;\n}", "title": "" }, { "docid": "a04ce2f2e59aeab402498e0de17e9031", "score": "0.52749664", "text": "public function check_user_optin_changes() {\n\n\t\t// Make sure we have the action we want.\n\t\tif ( empty( $_POST['action'] ) || 'lw_woo_gdpr_changeopt' !== esc_attr( $_POST['action'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The nonce check. ALWAYS A NONCE CHECK.\n\t\tif ( ! isset( $_POST['lw_woo_gdpr_changeopt_nonce'] ) || ! wp_verify_nonce( $_POST['lw_woo_gdpr_changeopt_nonce'], 'lw_woo_gdpr_changeopt_action' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure we have a user of some kind.\n\t\tif ( empty( $_POST['lw_woo_gdpr_data_changeopt_user'] ) ) {\n\t\t\tself::redirect_export_error( 'no-user' );\n\t\t}\n\n\t\t// Set my user ID.\n\t\t$user_id = absint( $_POST['lw_woo_gdpr_data_changeopt_user'] );\n\n\t\t// Filter my field args getting passed.\n\t\t$field_args = empty( $_POST['lw_woo_gdpr_changeopt_items'] ) ? array() : array_filter( $_POST['lw_woo_gdpr_changeopt_items'], 'sanitize_text_field' );\n\n\t\t// Update my fields.\n\t\tif ( false !== $update = lw_woo_gdpr()->update_user_optin_fields( $user_id, null, $field_args ) ) {\n\n\t\t\t// Now set my redirect link.\n\t\t\t$link = lw_woo_gdpr()->get_account_page_link( array( 'gdpr-result' => 1, 'success' => 1, 'action' => 'changeopts' ) );\n\n\t\t\t// Do the redirect.\n\t\t\twp_redirect( $link );\n\t\t\texit;\n\t\t}\n\n\t\t// And do the return / redirect / etc for the error.\n\t}", "title": "" }, { "docid": "2aba302d054b269124203d6fb5de1c60", "score": "0.5271351", "text": "public function check_admin()\n {\n $this->addchat_lib->check_admin();\n }", "title": "" }, { "docid": "7ab88110274cdb4758395844c3799faf", "score": "0.5270703", "text": "static private function check_permissions() {\n\t\t\tif ( isset( $_REQUEST['page'] ) && in_array( $_REQUEST['page'], array( 'fl-builder-settings', 'fl-builder-multisite-settings' ) ) ) {\n\n\t\t\t\t$wp_upload_dir = wp_upload_dir( null, false );\n\t\t\t\t$bb_upload_dir = FLBuilderModel::get_upload_dir();\n\n\t\t\t\tif ( ! fl_builder_filesystem()->is_writable( $wp_upload_dir['basedir'] ) || ! fl_builder_filesystem()->is_writable( $bb_upload_dir['path'] ) ) {\n\t\t\t\t\tadd_action( 'admin_notices', __CLASS__ . '::permissions_admin_notice' );\n\t\t\t\t\tadd_action( 'network_admin_notices', __CLASS__ . '::permissions_admin_notice' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8cbf8f62e9eca84da50d0253b5ea327f", "score": "0.5264658", "text": "public function doesCheckModifyAccessListHookModifyAccessAllowed() {}", "title": "" }, { "docid": "9f5aab3bc0a19906526861693aaf2bd8", "score": "0.52585113", "text": "function check_new_vs_update( $post_id ){\n}", "title": "" }, { "docid": "1518c072362be412e6ff1ec4020acbd9", "score": "0.5255911", "text": "function plugin_fusinvinventory_needUpdate() {\n $version = \"2.3.0\";\n include (GLPI_ROOT . \"/plugins/fusinvinventory/install/update.php\");\n $version_detected = pluginFusinvinventoryGetCurrentVersion($version);\n if ((isset($version_detected)) AND ($version_detected != $version)) {\n return 1;\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "70c1319c8bbb5460b4be5478954082be", "score": "0.525177", "text": "function yourls_is_private() {\n $private = defined( 'YOURLS_PRIVATE' ) && YOURLS_PRIVATE;\n\n if ( $private ) {\n\n // Allow overruling for particular pages:\n\n // API\n if ( yourls_is_API() && defined( 'YOURLS_PRIVATE_API' ) ) {\n $private = YOURLS_PRIVATE_API;\n }\n // Stat pages\n elseif ( yourls_is_infos() && defined( 'YOURLS_PRIVATE_INFOS' ) ) {\n $private = YOURLS_PRIVATE_INFOS;\n }\n // Others future cases ?\n }\n\n return yourls_apply_filter( 'is_private', $private );\n}", "title": "" }, { "docid": "1dbc5ebb766966a60b3fb588634d7cdf", "score": "0.5228189", "text": "function yourls_is_admin() {\n return (bool)yourls_apply_filter( 'is_admin', defined( 'YOURLS_ADMIN' ) && YOURLS_ADMIN );\n}", "title": "" }, { "docid": "e5d90b7b00e85ad2fbc3839c77e72045", "score": "0.52258855", "text": "function check_updates() {\n\t$request = wp_remote_get( 'https://raw.githubusercontent.com/dimadin/redirect-canonical-fix/rest-api/latest.json' );\n\n\tif ( ! is_wp_error( $request ) ) {\n\t\t$response = json_decode( wp_remote_retrieve_body( $request ), true );\n\n\t\tif ( is_array( $response ) ) {\n\t\t\t// Get current WordPress branch.\n\t\t\t$current_branch = implode( '.', array_slice( preg_split( '/[.-]/', get_bloginfo( 'version' ) ), 0, 2 ) );\n\n\t\t\t// First check if plugin should be disabled.\n\t\t\tif ( isset( $response['disable'] ) && is_array( $response['disable'] ) && isset( $response['disable']['wp_version'] ) ) {\n\t\t\t\t$disable_in_branch = $response['disable']['wp_version'];\n\n\t\t\t\tif ( version_compare( $current_branch, $disable_in_branch, '>=' ) ) {\n\t\t\t\t\tif ( ! function_exists( 'deactivate_plugins' ) ) {\n\t\t\t\t\t\trequire ABSPATH . '/wp-admin/includes/plugin.php';\n\t\t\t\t\t}\n\n\t\t\t\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t\t\t}\n\t\t\t} elseif ( isset( $response['version'] ) && is_array( $response['version'] ) && isset( $response['version'][ $current_branch ] ) ) {\n\t\t\t\t// Then check if there is newer version.\n\t\t\t\tif ( version_compare( VERSION, $response['version'][ $current_branch ], '<' ) ) {\n\t\t\t\t\tset_site_transient( 'md_redirect_canonical_fix_new_version', true, DAY_IN_SECONDS );\n\t\t\t\t} else {\n\t\t\t\t\tdelete_site_transient( 'md_redirect_canonical_fix_new_version' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e60a37420998bef1dd467bfe127888f0", "score": "0.5221925", "text": "public function checkDBSettings() {\n\t\tglobal $cmsUserMenuItems, $cmsAdminMenuItems, $ftsdb;\n\n\t\t$defaultPermissions = array(// 'clms_appointments_access' => '2,',\n\t\t);\n\n\t\tif ( count( $defaultPermissions ) ) {\n\t\t\tforeach ( $defaultPermissions as $name => $role_ids ) {\n\t\t\t\tif ( ! permision_setting_exists( $name ) ) {\n\t\t\t\t\tadd_permision_setting( $name, $role_ids );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$defaultSettings = array(//'ftsmbp_snts_useClientAsOwner' => '1'\n\t\t);\n\n\t\tif ( count( $defaultSettings ) ) {\n\t\t\tforeach ( $defaultSettings as $name => $value ) {\n\t\t\t\tif ( ! config_value_exists( $name ) ) {\n\t\t\t\t\tadd_config_value( $name, $value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check our rewrites are in the DB\t\t\n\t\t$defaultRewrites = array(\n\t\t\t'page/([A-Za-z0-9-_]+)/?$' => 'index.php?p=module&prefix=CMS&module_page=viewPage&page=$matches[1]',\n\t\t\t'page/([A-Za-z0-9-_]+).html?$' => 'index.php?p=module&prefix=CMS&module_page=viewPage&page=$matches[1]',\n\t\t);\n\n\t\tif ( count( $defaultRewrites ) ) {\n\t\t\tforeach ( $defaultRewrites as $match => $query ) {\n\t\t\t\tif ( ! url_rewrite_exists( $name ) ) {\n\t\t\t\t\tadd_url_rewrite( $match, $query, 'Module', $this->prefix );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add icons if necessary\n\t\tforeach ( array_merge( (array) $cmsUserMenuItems, (array) $cmsAdminMenuItems ) as $key => $menuItemArray ) {\n\t\t\t$result = $ftsdb->update( DBTABLEPREFIX . 'menu_items', array(\n\t\t\t\t'icon' => $menuItemArray['icon']\n\t\t\t),\n\t\t\t\t\"link = :link\", array(\n\t\t\t\t\t\":link\" => $menuItemArray['link']\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "fadffd3668a961a3b6e4004fd924434a", "score": "0.52141726", "text": "function is_version_controlled() {\r\n\t\t$is_version_controlled = get_transient( 'jetpack_site_is_vcs' );\r\n\r\n\t\tif ( false === $is_version_controlled ) {\r\n\t\t\tinclude_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';\r\n\t\t\t$updater = new WP_Automatic_Updater();\r\n\t\t\t$is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) );\r\n\t\t\t// transients should not be empty\r\n\t\t\tif ( empty( $is_version_controlled ) ) {\r\n\t\t\t\t$is_version_controlled = '0';\r\n\t\t\t}\r\n\t\t\tset_transient( 'jetpack_site_is_vcs', $is_version_controlled, DAY_IN_SECONDS );\r\n\t\t}\r\n\r\n\t\treturn $is_version_controlled;\r\n\t}", "title": "" }, { "docid": "5d05b6723e9e1c667f69ac348ff41cf7", "score": "0.5214139", "text": "public static function check_page(){NJIMEDIA_WP_Utils::page_check();}", "title": "" }, { "docid": "e20da3d6c5401a0ab6663b955c5e065b", "score": "0.5212427", "text": "function view_tool() {\n\t$target = $_SERVER['QUERY_STRING'];\n\treturn ( isset( $target ) && ! empty( $target ) && $target !== 'home' );\n}", "title": "" }, { "docid": "69ae216aa8b2d6b03e11a27e375c8f1c", "score": "0.5207224", "text": "function mb_home_condition() {\n\n\t\tglobal $post;\n\n\t\treturn $post && get_option( 'page_on_front' ) == $post->ID && method_exists( 'IR_CPT_Service', 'mb_services' );\n\t}", "title": "" }, { "docid": "226d4bf15324794a7c7088657ceb8586", "score": "0.52040035", "text": "function hasEditTemplate() ;", "title": "" }, { "docid": "50af7fefa295a3ed0f2ce07d1b707ef6", "score": "0.5200983", "text": "public static function is_admin_page()\n {\n }", "title": "" }, { "docid": "50af7fefa295a3ed0f2ce07d1b707ef6", "score": "0.52007574", "text": "public static function is_admin_page()\n {\n }", "title": "" }, { "docid": "5328f567bfa36d249353c51c53983b99", "score": "0.51865876", "text": "public function checkUpdate()\n\t{\n\t}", "title": "" }, { "docid": "69813295404a2836a26f69fb92687576", "score": "0.5186043", "text": "function admin_or_contributor($author, $project, $loggedUser)\n{\n check_not_null($author, $project, $loggedUser);\n\n if (check_owner_bool($author, $loggedUser)) { //Are we the creator or an admin ?\n //Nope, then\n if (!check_contributor($loggedUser, $project, $author)) //If we are not a contributor\n {\n //May replace with return false;\n return false; //Not a contributor and not an admin -> Do not have the rights\n }\n }\n return true;\n}", "title": "" }, { "docid": "1e1593101e0f90579739ab07c5219e96", "score": "0.5185828", "text": "public function checkWorkspaceCurrent() {}", "title": "" }, { "docid": "80217ff3d0fa3aac792aba37d5a9e841", "score": "0.51743674", "text": "function is_blog_admin()\n{\n}", "title": "" }, { "docid": "ac483825f2bb60e26e6cdb4dbe286cf8", "score": "0.5174021", "text": "function user_has_admin_right(&$menu, $sl = true) {\r\n if ($_SESSION[ 'authright' ] <= - 8) { // co leader...\r\n return true;\r\n } else {\r\n $uri_to_check1 = $menu->get(0);\r\n $uri_to_check2 = $menu->get(1);\r\n if (count($_SESSION[ 'authmod' ]) < 1 OR !loggedin()) {\r\n if ($sl === true) {\r\n if (!loggedin()) {\r\n $design = new design('', '', 0);\r\n $menu->set_url(0, 'user');\r\n load_modul_lang();\r\n $tpl = new tpl('user/login.htm');\r\n $design->addheader($tpl->get(0));\r\n $design->header();\r\n $tpl->set_out('WDLINK', 'admin.php', 1);\r\n $design->footer();\r\n } else {\r\n echo '<strong>Keine Berechtigung!</strong> <a href=\"index.php\">Startseite</a>';\r\n }\r\n }\r\n return (false);\r\n } elseif ((isset($_SESSION[ 'authmod' ][ $uri_to_check1 ]) AND $_SESSION[ 'authmod' ][ $uri_to_check1 ] == true) OR (isset($_SESSION[ 'authmod' ][ $uri_to_check1 . '-' . $uri_to_check2 ]) AND $_SESSION[ 'authmod' ][ $uri_to_check1 . '-' . $uri_to_check2 ] == true)) {\r\n return (true);\r\n } elseif (count($_SESSION[ 'authmod' ]) > 0 AND loggedin()) {\r\n if ($sl === true) {\r\n foreach ($_SESSION[ 'authmod' ] as $k => $v) {\r\n $x = $k;\r\n break;\r\n }\r\n $x = explode('-', $x);\r\n $menu->set_url(0, $x[ 0 ]);\r\n if (isset($x[ 1 ])) {\r\n $menu->set_url(1, $x[ 1 ]);\r\n }\r\n }\r\n return (true);\r\n }\r\n }\r\n return (false);\r\n}", "title": "" }, { "docid": "c4884edc97e3cb6286351cd9cf59f395", "score": "0.5170419", "text": "function installCheck() {\n\tglobal $m;\n\n\t// Check if config.php has permission 644\n\tif(substr(sprintf('%o', fileperms('config.php')), -4) != \"0644\") {\n\t\techo \"<div class='alert alert-danger' role='alert'>\". $m['config_still_writable'] .\"</div>\";\n\t}\n\n\t// Check if database.sql exists\n\tif(file_exists(\"database.sql\")) {\n\t\techo \"<div class='alert alert-danger' role='alert'>\". $m['delete_database'] .\"</div>\";\n\t}\n\n\t// Check if install.php exists\n\tif(file_exists(\"install.php\")) {\n\t\techo \"<div class='alert alert-danger' role='alert'>\". $m['delete_install'] .\"</div>\";\n\t}\n}", "title": "" }, { "docid": "6c17b5b06cdca81188a4039279a1c09f", "score": "0.51685214", "text": "public static function has_homepage()\n {\n }", "title": "" }, { "docid": "ad61a604e10be93cfdd321cea4a72196", "score": "0.5165923", "text": "public static function verify()\r\n {\r\n if (self::needsCoreUpdate()) { // Now check for core updates\r\n add_action('admin_init', array(__CLASS__, 'updateCore'));\r\n\r\n return false;\r\n } else if (\r\n class_exists('Rootd', false) &&\r\n !self::hasStepData()\r\n ) {\r\n return true;\r\n } else if (is_admin()) {\r\n add_action('admin_init', array(__CLASS__, 'install'));\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "989e5e3baa975a3e2ee494c13ed63f25", "score": "0.51625", "text": "function checkIfAdmin(){\r\n \t$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*',$this->personTable,'feuser_id='.intval($GLOBALS['TSFE']->fe_user->user['uid']));\r\n \tif($res[0]['publadmin']){\r\n \t\treturn true;\r\n \t}else{\r\n \t\treturn false;\r\n \t}\r\n }", "title": "" }, { "docid": "e5ab9e6be216a2d6475033665406ddf2", "score": "0.5158077", "text": "public static function onSharedRepo() {\r\n\t\tglobal $wgGlobalUsageSharedRepoWiki, $wgGlobalUsageDatabase;\r\n\t\tif ( !$wgGlobalUsageSharedRepoWiki ) {\r\n\t\t\t// backwards compatability with settings from before $wgGlobalUsageSharedRepoWiki\r\n\t\t\t// was introduced.\r\n\t\t\treturn $wgGlobalUsageDatabase === wfWikiID() || !$wgGlobalUsageDatabase;\r\n\t\t} else {\r\n\t\t\treturn $wgGlobalUsageSharedRepoWiki === wfWikiID();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d143c39eac1fced4fc5f5324f7b0337e", "score": "0.51569396", "text": "public function isUpToDate(): bool;", "title": "" }, { "docid": "3ce6f5798ccf98fbbb6e5215e20bb3f3", "score": "0.5153586", "text": "public function checkPageState() {\n\t\tif ($_SERVER[\"QUERY_STRING\"] == \"logout\" && \n\t\t\t$this->pageViewer->loggedIn()) {\n\t\t\t\t\n\t\t\t$this->message = \"Du har nu loggat ut\";\n\t\t\t$this->pageViewer->saveState(false);\n\t\t\t\n\t\t} else if ($_SERVER[\"QUERY_STRING\"] == \"logout\" && \n\t\t\t\t $this->pageViewer->loggedIn() == false) {\n\t\t\t\t \t\n\t\t\t$this->pageViewer->redirectURL();\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "f707e5ead53123b1c89300a5318b634f", "score": "0.5139046", "text": "function onCheckActions() {\n\t\t$this->blogfolder = explode(\",\",$this->blogfolder);\n\t\tfor ($c=0;$c<count($this->blogfolder);$c++) {\n\t\t\t$this->blogfolder[$c] = trim($this->blogfolder[$c],\" /\");\n\t\t\t$this->contextfriendlyfolderlist[] = ($this->blogfolder[$c]!=''?\"/\":\"\").$this->blogfolder[$c].\"/\";\n\t\t}\n\t\t$this->folderfilters = explode(\",\",$this->folderfilters);\n\t}", "title": "" }, { "docid": "2b5d1e1d1d151f5c4fd2d65baf084b27", "score": "0.51356065", "text": "function wpabstracts_db_check(){\n if(!(get_option( \"wpabstracts_db_upgraded\") == \"Y\")){\n wpabstracts_upgrade_db();\n }\n}", "title": "" }, { "docid": "5c210d5515395e0287c92e9c0df36d7b", "score": "0.51330084", "text": "protected function force_all_updates() {\n\t\treturn isset($_GET[AELIA_CS_ARG_FORCE_ALL_UPDATES]) && ($_GET[AELIA_CS_ARG_FORCE_ALL_UPDATES] == 'go') && is_admin() && current_user_can('manage_options');\n\t}", "title": "" }, { "docid": "456bf486c4a877dd644b80923488605f", "score": "0.5125603", "text": "public function fileIndexStatusIsTrueIfUidIsSet() {}", "title": "" }, { "docid": "850678e8c99bb42b7051ab428cc80d6e", "score": "0.5124007", "text": "abstract protected function check_power_admin();", "title": "" }, { "docid": "7e9d1ff5df00062d2456bad7619f210e", "score": "0.5123059", "text": "final private function _check(){\n\t\tif($this->error < 20400 && $this->error > 20410){\n\t\t\t$this->error = 0;\n\t\t}\n\t\tif($this->only_registered_views){\n\t\t\tif(!in_array($this->view,$this->registered_views)){\n\t\t\t\t $this->error = 20402;\n\t\t\t}\n\t\t}\n\n\t\tif($this->access_mode == 1){\n\t\t\tif($this->global_access > $this->access){\n\t\t\t\t$this->error = 20403;\n\t\t\t}\n\t\t} elseif($this->access_mode == 2){\n\t\t\tif(!empty($this->access_groups) && !in_array($this->current_group,$this->access_groups)){\n\t\t\t\t$this->error = 20403;\n\t\t\t}\n\t\t}\n\n\t\tif(FALSE !== $this->model_required){\n\t\tif($this->model==NULL){\n\t\t\t$this->error = 20405;\n\t\t}\n\t\t}\n\t\tif($this->view==NULL){\n\t\t\t$this->error = 20401;\n\t\t}\n\t\t$this->CheckView($this->view);\n\t}", "title": "" }, { "docid": "cfa32e44500bfc88c28fb6bae73cd1fe", "score": "0.5119841", "text": "function onCheckActions() {\n\n\t\tif (!$this->parent->virtualFolder) return; // other module processed the folder. The adm pane is a mandatory virtual folder\n\t\n\t\t// prepare folders (we can have multiple administrative pages)\n\t\t$this->admFolder = explode(\",\",$this->admFolder);\n\t\tfor ($c=0;$c<count($this->admFolder);$c++) {\n\t\t\t$this->admFolder[$c] = trim($this->admFolder[$c],\" /\");\n\t\t\t$this->contextfriendlyfolderlist[] = ($this->admFolder[$c]==\"\"?\"/\":(\"/\".$this->admFolder[$c].\"/\"));\n\t\t}\n\n\t\t// check for default/action on this page\n\t\tif (in_array($this->parent->context_str,$this->contextfriendlyfolderlist)) { // are we on the admin?\n\t\t\t$this->isAdminPage = true; // we are on the admin\n\t\t\t$this->parent->virtualFolder = false; // or we will 404 or serve root data\n\t\t\t$this->parent->cachetime = 0;\n\t\t\t$this->parent->cachetimeObj = 0;\n\t\t\t$this->parent->cacheControl->noCache = true;\n\t\t\t########## SAFETY - IT'S HERE ##############\n\t\t\t// if we do not have enough level (not logged, logged with low-level user), force to login page\n\t\t\tif ($_SESSION[CONS_SESSION_ACCESS_LEVEL]<$this->admRestrictionLevel) {\n\t\t\t\t$this->parent->authControl->logsGuest();\n\t\t\t\t$this->parent->action = \"login\";\n\t\t\t}\n\t\t\t############################################\n\n\t\t\t$this->parent->debugFile = CONS_PATH_SYSTEM.\"plugins/\".$this->name.\"/payload/template/_debugarea.html\"; // this is our debug area\n\n\t\t\t// prepare skin\n\t\t\t$this->skin = isset($this->parent->dimconfig['bi_adm_skin']) && $this->parent->dimconfig['bi_adm_skin'] != ''?$this->parent->dimconfig['bi_adm_skin']:CONS_ADM_BASESKIN;\n\t\t\tif (isset($_SESSION[CONS_SESSION_ACCESS_USER]['userprefs']) && $_SESSION[CONS_SESSION_ACCESS_USER]['userprefs'] != '') {\n\t\t\t\t$up = $_SESSION[CONS_SESSION_ACCESS_USER]['userprefs'];\n\t\t\t\tif (!is_array($up)) $up = @unserialize($up);\n\t\t\t\tif (is_array($up)) {\n\t\t\t\t\t$this->parent->storage['up'] = $up;\n\t\t\t\t\t$this->skin = $up['skin'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->parent->action == \"login\") $this->skin = CONS_ADM_BASESKIN;\n\n\t\t\t$temp = explode(\",\",CONS_ADM_ACTIVESKINS);\n\t\t\tif (!in_array($this->skin,$temp)) $this->skin = CONS_ADM_BASESKIN;\n\n\t\t\t// check if statistics are installed\n\t\t\tif (isset($this->parent->loadedPlugins['bi_stats'])) { # we are aware of bi_stats ;)\n\t\t\t\t$this->parent->loadedPlugins['bi_stats']->doNotLogMe = true;\n\t\t\t\t$this->hasStats = true;\n\t\t\t}\n\t\t\t// check if undo module is installed\n\t\t\tif (isset($this->parent->loadedPlugins['bi_undo'])) $this->hasUndo = true;\n\n\t\t\t$this->parent->cacheControl->noCache = true; // do not cache admin pages!\n\n\t\t\t$this->parent->template->constants['SKIN_PATH'] = CONS_INSTALL_ROOT.CONS_PATH_PAGES.\"_common/files/adm/skin/\".$this->skin.\"/\";\n\t\t\t$this->parent->template->constants['IMG_ADMPATH'] = CONS_INSTALL_ROOT.CONS_PATH_PAGES.\"_common/files/adm/\";\n\n\t\t\t// basic ok, check if we have a specific action for the current page\n\t\t\t$core = &$this->parent;\n\t\t\tif (is_file(CONS_PATH_SYSTEM.\"plugins/\".$this->name.\"/payload/actions/default.php\")) { // default?\n\t\t\t\tinclude_once CONS_PATH_SYSTEM.\"plugins/\".$this->name.\"/payload/actions/default.php\"; // will load template\n\t\t\t}\n\t\t\tif (!is_file(CONS_PATH_PAGES.$_SESSION['CODE'].\"/actions\".$this->parent->context_str.$this->parent->action.\".php\") && is_file(CONS_PATH_SYSTEM.\"plugins/\".$this->name.\"/payload/actions/\".$this->parent->action.\".php\")) { // file?\n\t\t\t\tinclude_once CONS_PATH_SYSTEM.\"plugins/\".$this->name.\"/payload/actions/\".$this->parent->action.\".php\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9be48dd2bf29b15cb6b69e7fecbc2d9d", "score": "0.5117394", "text": "function yourls_is_upgrading() {\n return (bool)yourls_apply_filter( 'is_upgrading', defined( 'YOURLS_UPGRADING' ) && YOURLS_UPGRADING );\n}", "title": "" }, { "docid": "2c6158fd3a2e0ef9e89569727dcf7f1f", "score": "0.5113752", "text": "public function hasChanges();", "title": "" }, { "docid": "9e289feb419c1530ed005973ebbcd306", "score": "0.511212", "text": "function is_uptodate($hash, $url) {\r\n \t\r\n \tglobal $wpdb;\r\n \t\r\n \t$result = $wpdb->get_row(\"SELECT hash FROM {$this->db['index']} WHERE url = '{$url}'\");\r\n \tif($result->hash != $hash) return false;\r\n \telse return true;\r\n \t\r\n }", "title": "" }, { "docid": "703be1942d77a20816564a0f010d53d1", "score": "0.51104414", "text": "function twe_check_permission($pagename){\n global $db;\n if ($pagename!='index') {\n $access_permission_query = \"select \" . $pagename . \" from \" . TABLE_ADMIN_ACCESS . \" where customers_id = '\" . $_SESSION['customer_id'] . \"'\";\n $access_permission = $db->Execute($access_permission_query); \n\n if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($access_permission->fields[$pagename] == '1')) {\n return true;\n } else {\n return false;\n }\n } else {\n twe_redirect(twe_href_link(FILENAME_LOGIN));\n }\n }", "title": "" }, { "docid": "e84d95293ac64e79e0a534b71393a22d", "score": "0.5108123", "text": "public function hasRemoteChanges($projectRoot): bool;", "title": "" }, { "docid": "b330ca9e4fb4de7107d6986163f5f1db", "score": "0.510064", "text": "function wpdb_migration_status(){\n if(!isset($_POST['new-url'])) return;\n\n global $wpdb;\n\n $sTable_options = $wpdb->prefix . \"options\";\n\n $site_url = $wpdb->get_results(\"\n SELECT option_value \n FROM $sTable_options\n WHERE option_name = 'siteurl'\n \");\n\n /* Remove last '/' so it can be equal to $sActualUrl */\n $site_url = $site_url[0]->option_value;\n $sSetURL = $_POST['new-url'];\n \n $aSiteUrl = url_validation($site_url);\n $site_url = !empty($aSiteUrl['url']) ? $aSiteUrl['url'] : $sSiteUrl;\n\n $aSetURL = url_validation($sSetURL);\n $sSetURL = !empty($aSetURL['url']) ? $aSetURL['url'] : $sSetURL;\n\n $success = $site_url == $sSetURL;\n\n return $success;\n}", "title": "" }, { "docid": "6fc290379b34dbaf48810e37cb71114b", "score": "0.5084092", "text": "function upgrade_check($h, $old_version, $show_next) \r\n{ \r\n // delete existing cache\r\n $h->deleteFiles(CACHE . 'db_cache');\r\n $h->deleteFiles(CACHE . 'css_js_cache');\r\n $h->deleteFiles(CACHE . 'rss_cache');\r\n $h->deleteFiles(CACHE . 'lang_cache');\r\n $h->deleteFiles(CACHE . 'html_cache');\r\n\r\n template($h, 'upgrade/upgrade_step_1.php', array(\r\n 'old_version' => $old_version,\r\n 'show_next' => $show_next\r\n ));\t\r\n}", "title": "" }, { "docid": "a49a0be32b9486f04ee2414dc2605fc6", "score": "0.5083774", "text": "public function doesCheckModifyAccessListHookGetsCalled() {}", "title": "" }, { "docid": "4e45349d16cb994a2939a9767dceed9a", "score": "0.5072693", "text": "public static function isAdminQuickStatusUpdate()\r\n\t{\r\n\t\t$routes\t=\tself :: getRoutes();\r\n\t\t$data\t=\tfalse;\r\n\t\t\r\n\t\tif (\r\n\t\tin_array( 'status', $routes ) &&\r\n\t\tin_array( 'quickupdate', $routes ) &&\r\n\t\tin_array( 'admin', $routes ) &&\r\n\t\tin_array( 'clients', $routes )\r\n\t\t)\r\n\t\t{\r\n\t\t\t$data = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "a7476b35936d15e59c1f95e8a2a0fb4c", "score": "0.5069381", "text": "public function in_view()\n { \n return $GLOBALS['pagenow'] === 'admin.php' && isset($_GET['page']) && $_GET['page'] === $this->args['id'];\n }", "title": "" }, { "docid": "fac23664a568f778cb3282bbc4461a39", "score": "0.506684", "text": "function wp_save_post_revision_check_for_changes($return, $last_revision, $post)\n {\n }", "title": "" }, { "docid": "02782db0d04f611d0f16b42b5ed18c6b", "score": "0.50633264", "text": "private function check_settings() {\r\n\r\n\t\t$success = true;\r\n\r\n\t\tif ( empty( $this->page_callback ) ) {\r\n\t\t\ttrigger_error( 'The page callback can not be empty!', E_USER_WARNING );\r\n\t\t\t$success = false;\r\n\t\t}\r\n\r\n\t\tif ( empty( $this->option_name ) ) {\r\n\t\t\ttrigger_error( 'The options-name can not be empty!', E_USER_WARNING );\r\n\t\t\t$success = false;\r\n\t\t}\r\n\r\n\t\t// create a random menu slug if it is not set\r\n\t\tif ( empty( $this->menu_slug ) )\r\n\t\t\t$this->menu_slug = 'empty-menu-slug' . rand( 0, 999 );\r\n\r\n\t\treturn $success;\r\n\r\n\t}", "title": "" }, { "docid": "bda10aaace21157762d8b49f991d78d6", "score": "0.50626075", "text": "protected function hasChanged()\n {\n return !array_key_exists($this->module_name.\"_\".$this->module_controller_name, $this->overrided_module_controller) || $this->overrided_module_controller[$this->module_name.\"_\".$this->module_controller_name] != filemtime(_PS_MODULE_DIR_.$this->module_name.'/controllers/front/'.$this->module_controller_name.'.php');\n }", "title": "" }, { "docid": "ab09ea2a92921ca362c026114569d05c", "score": "0.50616837", "text": "function check_cred(){\n\t\n\t//check_admin_referer();\n\t\n\t$form_fields = array('allUsers');\n\t$method = '';\n\t\n\tif (isset($_POST['allUsers'])){\n\t\t$url = 'themes.php?page=otto';\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\t\n\t\t//global $wp_filesystem;\n\t\tupdate_all_users();\n\t}\n\t\n\t\n\t$form_fields = array('user');\n\t$method = '';\n\t\n\tif (isset($_GET['user']) && isset($_GET['action'])){\n\t\t$url = 'themes.php?page=otto';\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\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\t\n\t\t\n\t\t//global $wp_filesystem;\n\t\tif($_GET['action'] == \"update\"){\n\t\t\tupdate_env_by_ID($_GET['user']);\n\t\t}\n\t\t \n\t\telse if($_GET['action']== \"delete\"){\n\t\t\tdelete_by_ID($_GET['user']);\n\t\t}\n\t\t\n\t\telse if($_GET['action']== \"create\"){\n\t\t\tcreate_by_ID($_GET['user']);\n\t\t}\n\t\n\t}\n\t\n}", "title": "" }, { "docid": "e518ac6163a6d5a9874d87cb8501ba0d", "score": "0.5053561", "text": "public function hasBeenInitializedWithGit()\n {\n if (! is_dir(base_path('.git'))) {\n $this->error('Please initialize with git before install git hooks');\n exit(0);\n }\n }", "title": "" }, { "docid": "82c78ec78a349d952369d31ff5427ac5", "score": "0.5052866", "text": "public function is_admin(){\n $context_check = isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'frontend';\n $is_admin = is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX && $context_check );\n return apply_filters( 'yith_wfbt_check_is_admin', $is_admin );\n }", "title": "" }, { "docid": "d1e332210ee47945854d3f644adb0410", "score": "0.5048909", "text": "private function getHaveIndexPage(): bool\n\t{\n\t\treturn !empty($this->interface['indexPage']);\n\t}", "title": "" }, { "docid": "816ea948f6243ca326c49fba18193c7f", "score": "0.50484544", "text": "static function core_updates_check() {\r\n $return = array();\r\n\r\n if ((defined('AUTOMATIC_UPDATER_DISABLED') && AUTOMATIC_UPDATER_DISABLED) ||\r\n (defined('WP_AUTO_UPDATE_CORE') && WP_AUTO_UPDATE_CORE != 'minor')) {\r\n $return['status'] = 0;\r\n } else {\r\n $return['status'] = 10;\r\n }\r\n\r\n return $return;\r\n }", "title": "" }, { "docid": "acb9e32599701219be6c628c56feaca8", "score": "0.5044458", "text": "function onAdminPanelCheck($name, &$isOK)\n {\n if ($name == 'bitly') {\n $isOK = true;\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "389f87a687b8e81d73d6c1ef470f81c6", "score": "0.5040977", "text": "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t\t$this->checkUniquePhpSelector();\n\t}", "title": "" }, { "docid": "28ab975d1402fcde562a988f7ace1d92", "score": "0.5039563", "text": "function wp_version_check($extra_stats = array(), $force_check = \\false)\n{\n}", "title": "" }, { "docid": "c6c50e8fee6e342c33c96ac3daebb1f7", "score": "0.5037314", "text": "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($GLOBALS[\"user_data\"][0] && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "ce018e8d50293a79414f364bd389c448", "score": "0.5036333", "text": "function checkAccess() ;", "title": "" }, { "docid": "9f7b263eb9edb991fd099120f3ce143a", "score": "0.50347495", "text": "function updateComplainStatusCalls(){\n\tif($_SERVER[\"REQUEST_METHOD\"]==\"POST\"){\n\t\t$email=clean($_POST[\"admin_email\"]);\n\t\t$access_token=clean($_POST[\"admin_access_token\"]);\n\t\tif(is_admin_valid($email,$access_token)==true){\n\t\t\tif(isset($_POST[\"update_status\"])){\n\t\t\t\tupdateStatus();\n\t\t\t\techo\"<p class='bg-success text-center' style='color:#fff'>Successfully updated the status. </p>\";\n\t\t\t\tset_message(\"<p class='bg-success text-center' style='color:#fff'>Successfully updated the status. </p>\");\n\t\t\t\tredirect(\"showComp.php\");\n\t\t\t}elseif(isset($_POST[\"mark_resolved\"])){\n\t\t\t\tmarkResolved();\n\t\t\t\tset_message(\"<p class='bg-success text-center' style='color:#fff'>Successfully marked as resolved. </p>\");\n\t\t\t\techo\"<p class='bg-success text-center' style='color:#fff'>Successfully marked as resolved. </p>\";\n\t\t\t\tredirect(\"showComp.php\");\n\t\t\t}elseif(isset($_POST[\"update_mark_resolved\"])){\n\t\t\t\tupdateStatus();\n\t\t\t\tmarkResolved();\n\t\t\t\techo\"<p class='bg-success text-center' style='color:#fff'>Successfully completed the task. </p>\";\n\t\t\t\tset_message(\"<p class='bg-success text-center' style='color:#fff'>Successfully completed the task. </p>\");\n\t\t\t\tredirect(\"showComp.php\");\n\t\t\t}\n\t\t}else{\n\t\t\techo \"<p class='bg-danger text-center'>Unauthorized access.</p>\";\n\t\t}\n\t}\n}", "title": "" } ]
0f9baaf15e0ef2250222663d51d47d54
Returns an entry version by its ID.
[ { "docid": "d8e23b266150051924c58f1001a9e364", "score": "0.66669935", "text": "public function getVersionById($versionId)\n\t{\n\t\treturn blx()->entryRevisions->getVersionById($versionId);\n\t}", "title": "" } ]
[ { "docid": "d23211d8719861f33fd4f86d1807e800", "score": "0.68311864", "text": "private function findVersionById($id) {\n $query = $this->model->createQuery(0);\n $query->setFields('{' . self::NAME . '}');\n $query->addCondition('{' . ModelTable::PRIMARY_KEY . '} = %1%', $id);\n\n $data = $query->queryFirst();\n\n if (!$data) {\n return 0;\n }\n\n return $data->version;\n }", "title": "" }, { "docid": "117969b282e3fca77d01ec3ef6347711", "score": "0.6618583", "text": "public function getEntry($id = 0) {\n\t\tif($this->entry) {\n\t\t\tif(!$id || $id == $this->entry['id']) return $this->entry;\n\t\t}\n\t\tif(empty($id)) {\n\t\t\t$id = (int) $this->entryID;\n\t\t}\n\t\treturn $id > 0 ? $this->entries()->getById((int) $id) : null;\n\t}", "title": "" }, { "docid": "7919c622eb5edb5002784c2e937a3a46", "score": "0.6572128", "text": "public function getVersionById(int $versionId)\n {\n Craft::$app->getDeprecator()->log('craft.entryRevisions.getVersionById()', 'craft.entryRevisions.getVersionById() has been deprecated. Use craft.app.entryRevisions.getVersionById() instead.');\n\n return Craft::$app->getEntryRevisions()->getVersionById($versionId);\n }", "title": "" }, { "docid": "038fd5c61e3e229f65fa6a2b846cd947", "score": "0.654705", "text": "public function getVersionsByEntryId($entryId)\n\t{\n\t\treturn blx()->entryRevisions->getVersionsByEntryId($entryId);\n\t}", "title": "" }, { "docid": "befe8974ebd030f9737a3d0b504e48df", "score": "0.6475294", "text": "public function getEntry( $id ){\n\t\t$sql = \"SELECT entry_id, title, entry_text, date_created FROM blog_entry WHERE entry_id = ?\"; \n\t\t$data = array($id);\n\t\t$statement = $this->makeStatement( $sql, $data );\n\t\t$model = $statement->fetchObject();\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "2d5754dc5f92c903f9defd2776ab9d54", "score": "0.6442797", "text": "public static function retrieveByReferenceId ($v)\n\t{\n\t\t$c = KalturaCriteria::create(entryPeer::OM_CLASS);\n\t\t$c->addAnd(\"referenceID\", $v);\n\t\treturn entryPeer::doSelect($v);\n\t}", "title": "" }, { "docid": "30ebd430069cb78c165517744be64f2e", "score": "0.63379365", "text": "protected function getEntryById($id)\n {\n /*\n * Prepare the query and execute it\n */\n $sql = \"SELECT\n id, page, title, subhead, body, img, imgcap, data1, data2,\n data3, data4, data5, data6, data7, data8, author, created\n FROM `\".DB_NAME.\"`.`\".DB_PREFIX.\"entryMgr`\n WHERE id=?\n LIMIT 1\";\n $stmt = $this->mysqli->prepare($sql);\n $stmt->bind_param(\"i\", $id);\n return $this->loadEntryArray($stmt);\n }", "title": "" }, { "docid": "0569ada4298692cb460dcafc943cdb53", "score": "0.6108278", "text": "public function getEntry($id=null){\n $return_data=null;\n\n $id = strtolower($id);\n\n if(!is_null($id)){\n try{\n $stmt = $this->conn->prepare(\"SELECT E.id, E.year, E.make, E.model,C.type, E.odo,M.name as main FROM ENTRY E, CAR C, MAINTENANCE M\n WHERE C.id=E.type AND E.maintenance=M.id AND E.id=:ID;\");\n\n $stmt->bindValue(':ID',$id);\n\n $stmt->execute();\n $return_data = $stmt->fetchAll();\n }catch(PDOException $e){\n echo $e; \n } \n }\n return $return_data[0]; \n }", "title": "" }, { "docid": "abd2c663f4cdc2f7faabaab59b24a231", "score": "0.6108081", "text": "public static function get($id);", "title": "" }, { "docid": "abd2c663f4cdc2f7faabaab59b24a231", "score": "0.6108081", "text": "public static function get($id);", "title": "" }, { "docid": "293a49494660d7a67dadd7c7ae4495f7", "score": "0.60955834", "text": "public function getVersionByOffset($entryId, $offset = 0)\n\t{\n\t\treturn blx()->entryRevisions->getVersionByOffset($entryId, $offset);\n\t}", "title": "" }, { "docid": "472145fbd279d37e1fb60457fc9f16f5", "score": "0.60837185", "text": "public function getEntry();", "title": "" }, { "docid": "878cac9366e47817b74d631571e871d0", "score": "0.6053794", "text": "public function get($entryIdentifier);", "title": "" }, { "docid": "506a49f1083e2194668935e8a0e55116", "score": "0.59850717", "text": "public static function getById($id);", "title": "" }, { "docid": "a790fa7042a5395a7cf3c4275a16d95c", "score": "0.5984341", "text": "public static function Get($id);", "title": "" }, { "docid": "f1a959fbfac3ceebacd02b38954b18c4", "score": "0.59478605", "text": "function get_log_entry($entry_id) {\n\tglobal $CONFIG;\n\n\t$entry_id = (int)$entry_id;\n\n\treturn get_data_row(\"SELECT * from {$CONFIG->dbprefix}system_log where id=$entry_id\");\n}", "title": "" }, { "docid": "d778e71cade823792bf3817d87cdd252", "score": "0.59405494", "text": "public function get_entry($entry_id=0)\n\t{\n\t\t$entry_cols = $this->build_entry_pull_cols('a.');\n\t\tsettype($entry_id, 'int');\n\t\t$strsql = \"\n\t\t\tselect \n\t\t\t\t{$entry_cols}, \n\t\t\t\tb.author_name, \n\t\t\t\tc.category\n\t\t\tfrom \n\t\t\t\tsite_blog_entries a, \n\t\t\t\tsite_blog_authors b, \n\t\t\t\tsite_blog_cats c\n\t\t\twhere \n\t\t\t\ta.site_id = b.site_id \n\t\t\t\tand a.site_id = ? \n\t\t\t\tand a.blog_id = ?\n\t\t\t\tand b.id = a.entry_author \n\t\t\t\tand c.id = a.cat_id\n\t\t\t\tand a.id = ?\n\t\t\t\tand a.active = 1\n\t\t\t\tand a.{$this->ver_field} > 0\n\t\t\t\tlimit 1\n\t\t\";\n\n\t\t$params = array('iii', $this->site_id, $this->blog_id, $entry_id);\n\t\t$entries = QDB::qdb_exec($this->data_source, $strsql, $params);\n\t\tif (!$entries) { return false; }\n\t\t$this->add_content_to_entries($entries);\n\t\tif ($entries) { return $entries; }\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1debb05c7b76ff7082ffd56c1f666ef6", "score": "0.5899926", "text": "public function get( $id );", "title": "" }, { "docid": "59406b93fcf7df02e6f6fff1d5d073b0", "score": "0.5849321", "text": "public function getLatestVersion() {\n DB_DAO::connectDatabase();\n $handler = DB_DAO::getDB()->prepare(\"SELECT id, version FROM version ORDER BY version DESC LIMIT 0,1\");\n\n if (!$handler->execute()) {\n DB_DAO::throwDbError($handler->errorInfo());\n }\n while ($row = $handler->fetch(PDO::FETCH_ASSOC)) {\n return new Version(intval($row['id']), $row['version']);\n }\n }", "title": "" }, { "docid": "82250fb7eb6b3327546a866f61ea5257", "score": "0.5846528", "text": "public function getRevisionById($id)\n {\n return $this->pageRevision->findOrFail($id);\n }", "title": "" }, { "docid": "45952f445543b52922dfb5930bd2c2af", "score": "0.58376396", "text": "public function get(string $id);", "title": "" }, { "docid": "f58d41e8a509023620ebfbe65c66aecf", "score": "0.58156294", "text": "public function edit($id)\n {\n $ver = Version::find($id);\n return view('admin.elements.version.add', ['active' => 'version', 'breadcrumb' => $this->breadcrumb, 'version' => $ver]);\n }", "title": "" }, { "docid": "36c5a66d9fdccf93129fff42be94d1e8", "score": "0.5774694", "text": "public function get($id) {\n\n\t\t$qb = Select::fromTable('digest');\n\t\t$qb->select('*')\n\t\t\t->where($qb->compare('id', '=', $id, ELGG_VALUE_INTEGER));\n\n\t\treturn $this->db->getDataRow($qb, $this->row_callback) ? : false;\n\t}", "title": "" }, { "docid": "58ef3c1f3efcc7ba6dfc49b61afe2799", "score": "0.5774605", "text": "function retrieveKbentry($id) {\r\n\r\n\t\treturn ($this->query('SELECT * FROM kbentries WHERE kbentries.id = '. $id .';'));\r\n\r\n\t}", "title": "" }, { "docid": "af8668a7d4c6556378ffc2ebdd9d9c11", "score": "0.5765509", "text": "function vite_entry(string $entry)\n {\n return app()->make(Innocenzi\\Vite\\Vite::class)->getEntry($entry);\n }", "title": "" }, { "docid": "be0d17bdfdc7a45facf346622e998522", "score": "0.57631665", "text": "public function fetchObjectByIdRevision($id,$revision){\n return $this->getTable()->find($id,$revision)->current();\n }", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.57484114", "text": "public function get($id);", "title": "" }, { "docid": "e1db1323ae61476676ca9da0acb5c3a1", "score": "0.56956357", "text": "public static function get($id) {\n\t\treturn self::_getDao()->get(intval($id));\n\t}", "title": "" }, { "docid": "5ac106e67876acc55123a1cf62dec948", "score": "0.5692551", "text": "public function get_entry($id) {\n\t\t$entries = $this->db->select(\"Entries\", [\"*\"], \"WHERE id = $id\");\n\t\t$res = [];\n\n\t\t// Update the categories cache.\n\t\t$this->update_categories_cache();\n\n\t\tforeach ($entries as $row) {\n\t\t\t$item = [\n\t\t\t\t\"id\" => (int)$row[\"id\"],\n\t\t\t\t\"datetime\" => [\n\t\t\t\t\t\"iso8601\" => $row[\"dt\"]\n\t\t\t\t],\n\t\t\t\t\"category\" => [\n\t\t\t\t\t\"id\" => (int)$row[\"cat_id\"],\n\t\t\t\t\t\"name\" => $this->get_category_name((int)$row[\"cat_id\"])\n\t\t\t\t],\n\t\t\t\t\"description\" => $row[\"description\"],\n\t\t\t\t\"value\" => floatval($row[\"value\"])\n\t\t\t];\n\n\t\t\t// Put the item into the response array.\n\t\t\t$res[\"entry\"] = $item;\n\t\t}\n\n\t\techo json_encode($res);\n\t}", "title": "" }, { "docid": "a04b0706cdc67c00aeda38e34303743d", "score": "0.5680325", "text": "public static function get($id) {\r\n\t\treturn self::_getDao()->get(intval($id));\r\n\t}", "title": "" }, { "docid": "b6ddb4445c04a5ed354142c28782b3f2", "score": "0.56773907", "text": "public function edit($id)\n {\n $data = Version::findOrFail($id);\n return view('administrator.version.edit', compact('data'));\n }", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5673877", "text": "public function getById($id);", "title": "" }, { "docid": "b666145592c9756f0fc2791f54f9be56", "score": "0.56706506", "text": "public function getEntryId();", "title": "" }, { "docid": "9e88a65faaf832237d66f476c4d9b700", "score": "0.56696236", "text": "public function getEntry($table, $id)\n\t{\n\t\t$item = $this->getEntries($table, array('id' => $id), array(), 1);\n\t\tif (count($item) < 1)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $item[0];\n\t\t}\n\t}", "title": "" }, { "docid": "ba1259c8c58543053a897a20228a5521", "score": "0.5650677", "text": "public function get ($id)\n {\n return $this->findOneBy (array ('id' => $id));\n }", "title": "" }, { "docid": "2422df4d3f64aa16a05a4c1acc573a02", "score": "0.56273735", "text": "public function show($id)\n\t{\n\t\t$entry = Entry::findOrFail($id);\n\n\t\treturn view('entries.show', compact('entry'));\n\t}", "title": "" }, { "docid": "4b84b3ae67ab652a42cf94e35e3ba668", "score": "0.56090516", "text": "public function ver($id)\n {\n //\n }", "title": "" }, { "docid": "3750885570797eba4e62c5874de7b817", "score": "0.56025225", "text": "public function get($id) {\n\t\treturn $this->package_repo->get($id, [\n\t\t\t'tickets',\n\t\t\t'courses',\n\t\t\t'courses.trainings',\n\t\t\t'courses.tickets',\n\t\t\t'accommodations',\n\t\t\t'addons',\n\t\t\t'basePrices',\n\t\t\t'prices'\n\t\t]);\n\t}", "title": "" }, { "docid": "1b87ad85aa661381321e014beb03a28b", "score": "0.55990046", "text": "public function retrieve($id);", "title": "" }, { "docid": "b5e2902eddae2c05bd2f30ec9f8a6f7b", "score": "0.55965793", "text": "public static abstract function getById($id);", "title": "" }, { "docid": "6a2fdb1f4a80c0eb3ae2be178c775086", "score": "0.5593187", "text": "public function get_id($id)\n\t{\n\t\tif($this->_is_allowed(__FUNCTION__))\n\t\t{\n\t\t\treturn $this->_method_not_allowed();\n\t\t}\n\n\t\t$m = $this->model;\n\t\tif($data = $m::get_by_id($id))\n\t\t{\t\n\t\t\treturn $this->api_response($data);\n\t\t} else\n\t\t{\n\t\t\treturn $this->api_response(array(), 0, array('system' => array('Entry not found.')));\n\t\t}\n\t}", "title": "" }, { "docid": "ec553f5fdf40306875450bff88d4e8f3", "score": "0.5590797", "text": "public abstract static function getById($id);", "title": "" }, { "docid": "80bf37cd1c2020ca749875a4de7bb507", "score": "0.5587301", "text": "public function find($id, $lockMode = null, $lockVersion = null)\n {\n return parent::find($id, $lockMode, $lockVersion);\n }", "title": "" }, { "docid": "7688bd192d30d55f21540092b421a933", "score": "0.55659753", "text": "public function getInstance($id) {\n return call_user_func($this->instance_name . '::findOrFail', $id);\n }", "title": "" }, { "docid": "9fe61a41e630cc7c854db7d3c9c48d4b", "score": "0.55653095", "text": "public static function getById($id) {\n\t\treturn parent::getById($id);\n\t}", "title": "" }, { "docid": "155feb14de82b290c1962c81ca63bccd", "score": "0.55505204", "text": "public static function get_published_version_number(string $class, int $id): ?int\n {\n $inst = $class::singleton();\n if (!$inst->hasExtension(Versioned::class)) {\n throw new InvalidArgumentException(sprintf(\n 'Class %s does not have the %s extension',\n $class,\n Versioned::class\n ));\n }\n\n /* @var Versioned|DataObject $inst */\n $stage = $inst->hasStages() ? Versioned::LIVE : Versioned::DRAFT;\n\n return Versioned::get_versionnumber_by_stage($class, $stage, $id);\n }", "title": "" }, { "docid": "b613c0ac75f0ceb94e3b28722d911547", "score": "0.55411667", "text": "private function getCurrentVersionForVocabularyId($id)\n {\n $versions = $this->RegistryAPI->getVersionsForVocabularyById($id);\n $current_version = null;\n foreach ($versions as $version) {\n if ($version->getStatus() === Version::STATUS_CURRENT) {\n $current_version = $version;\n break;\n }\n }\n return $current_version;\n }", "title": "" }, { "docid": "e9a0b132483acad8fee61d2dc2a01e56", "score": "0.5540884", "text": "public function getVersionByName($name) {\n DB_DAO::connectDatabase();\n\n $handler = DB_DAO::getDB()->prepare(\"SELECT id FROM version WHERE version=:version\");\n $handler->bindParam(':version', $name);\n\n if (!$handler->execute()) {\n DB_DAO::throwDbError($handler->errorInfo());\n }\n while ($row = $handler->fetch(PDO::FETCH_ASSOC)) {\n return new Version(intval($row['id']), $name);\n }\n return null;\n }", "title": "" }, { "docid": "a09fbf6dee0740bd4b5e2a448afcb664", "score": "0.554023", "text": "function getItem($id) {\n\t\treturn Generic::getItem($id, $this->db);\n\t}", "title": "" }, { "docid": "2bba8f8ac8f5d787df311f27bdacc5ad", "score": "0.5540093", "text": "public function getVersionId() {\n\t\treturn $this->versionId;\n\t}", "title": "" }, { "docid": "760d2dcbc1b0c79d05a8108f2da6aef9", "score": "0.5539065", "text": "function getVersion($post_id, $version_id)\n {\n $endpoint = \"https://api.hubapi.com/content/api/v2/blog-posts/{$post_id}/versions/{$version_id}\";\n\n return $this->client->request('get', $endpoint);\n }", "title": "" }, { "docid": "05816bd88281e8f617e548a5a20ca4c5", "score": "0.5523384", "text": "function get_by_id($id)\n {\n return $this->get($id)->row();\n }", "title": "" }, { "docid": "f8a41f427d7bee7b18806da1a3224fb3", "score": "0.5518995", "text": "public function findById($id)\n {\n return $this->get($id, $this->mainBundle);\n }", "title": "" }, { "docid": "cb1b7b67bcbcd6d3ecd009567ed9e0c8", "score": "0.5514671", "text": "public function get_by_id( $id = 0 ) {\n\n\t\t\tif ( empty( $id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn $this->get_by( 'id', $id );\n\t\t}", "title": "" }, { "docid": "81f26463e894ee2947ea7578fcba0302", "score": "0.5502558", "text": "public function get_by_id($id)\n {\n return DB::table($this->table)->where('info_id', $id)->first();\n }", "title": "" }, { "docid": "95246501f2238dfab20c2fa894fd5d67", "score": "0.54992867", "text": "public function get(string $id)\n {\n if (! $this->has($id)) {\n throw new Container\\NotFoundException($id);\n }\n\n if (isset($this->handledEntries[$id])) {\n return $this->handledEntries[$id];\n }\n\n $entry = $this->entries[$id];\n\n if (\\is_object($entry) && ! \\is_callable($entry)) {\n return $entry;\n }\n\n return $this->handledEntries[$id] = $this->resolver->handle($entry);\n }", "title": "" }, { "docid": "2ab26214b3f2f758a8f8142d6f7bd56d", "score": "0.5497876", "text": "public function getById($id)\n {\n return $this->findById($id);\n }", "title": "" }, { "docid": "82dca621602bdc13b997dcbfff427350", "score": "0.5490089", "text": "public function get($id)\n\t{\n\t\treturn $this->dao->get($id);\n\t}", "title": "" }, { "docid": "0f5256d825850e5b31fd9862edffbd98", "score": "0.548854", "text": "public function retrieve($id = 0);", "title": "" }, { "docid": "51a71e52471dff7af08831d545135be1", "score": "0.5488076", "text": "public function getById($id)\n {\n return $this->findById($id);\n\n }", "title": "" }, { "docid": "abb1191c5bf0adff30dd474c0924d3c8", "score": "0.5487526", "text": "public function get($id)\n {\n return parent::get($id);\n }", "title": "" }, { "docid": "abb1191c5bf0adff30dd474c0924d3c8", "score": "0.5487526", "text": "public function get($id)\n {\n return parent::get($id);\n }", "title": "" }, { "docid": "c50dc86969199a9dc3073ee2cdf9cdc7", "score": "0.54865193", "text": "public static function getById($id)\n {\n $select = self::getInstance()->select();\n $select->where(self::F_ID.'=?', $id);\n\n return self::getInstance()->fetchRow($select);\n }", "title": "" }, { "docid": "a5dbf17ee8a743647fb1fcd244ddf9b0", "score": "0.5479911", "text": "public function show($id)\n {\n return $this->get('/time_entries/'.urlencode($id).'.json');\n }", "title": "" }, { "docid": "0bd3370c29e6f6062964fd33b00a8301", "score": "0.5470135", "text": "public function findEntry($id)\n {\n $result = $this->getDbTable()->find($id);\n if (0 == count($result)) {\n return;\n }\n $row = $result->current()->toArray();\n $entry = new Application_Model_Addressbook($row);\n\n return $entry;\n \n }", "title": "" }, { "docid": "e7c6c381c308a77f9473dd528d9a3d74", "score": "0.545877", "text": "public static function getInstanceById(int $id)\n\t{\n\t\treturn self::getAll()[$id] ?? null;\n\t}", "title": "" }, { "docid": "e556ea077b1f98fe15169bea8bf6104d", "score": "0.5451139", "text": "public function get($id)\n {\n return $this->offsetGet($id);\n }", "title": "" }, { "docid": "614b17682b51a7d34432473fed6d4087", "score": "0.54489994", "text": "public function get($id)\n {\n return $this->_mapper->find($id);\n }", "title": "" }, { "docid": "80794af6debb99e9693adeba8480904b", "score": "0.54488283", "text": "public static function getOne($id) {\n foreach (self::narediObjekt() as $artikel) {\n if ($id == $artikel->id_artikla) {\n return $artikel;\n }\n }\n\n throw new InvalidArgumentException(\"Artikel z id = $id ne obstaja.\");\n }", "title": "" }, { "docid": "9fbcdcc1369f0081adc43bcf650c9278", "score": "0.5445787", "text": "public function edit($id)\n {\n return Voucher::find($id);\n }", "title": "" }, { "docid": "516a8d99b4ed1e20b499cac81c31ebb1", "score": "0.5441561", "text": "public function getById ($id) {\n $data = $this->table->find($id);\n return $this->mount($data);\n }", "title": "" }, { "docid": "2c9ee7cee23830de9b2ef0a0312034bb", "score": "0.5433164", "text": "public function getByid($id)\n {\n }", "title": "" }, { "docid": "ac42e79f68236a7c9609a3d934bd7429", "score": "0.54287326", "text": "public function edit($id)\n {\n return Vendor::find($id);\n }", "title": "" }, { "docid": "0ab6d32e3d65f13304217248d5ea82df", "score": "0.5417007", "text": "static function retrieveByPK($id) {\n\t\treturn static::retrieveByPKs($id);\n\t}", "title": "" }, { "docid": "6a5c5fa16997453f9da5ccd62e64621a", "score": "0.54150426", "text": "function get_by_id($id) {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "6a5c5fa16997453f9da5ccd62e64621a", "score": "0.54150426", "text": "function get_by_id($id) {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "23892d7496b9820b1ba192f708772052", "score": "0.5414819", "text": "public function edit($id)\n\t{\n\t\t$entry = Entry::findOrFail($id);\n\n\t\treturn view('entries.edit', compact('entry'));\n\t}", "title": "" }, { "docid": "56ec67437c88542840ba90e751102684", "score": "0.54135096", "text": "function versions($id)\n {\n $endpoint = \"https://api.hubapi.com/content/api/v2/blog-posts/{$id}/versions\";\n\n return $this->client->request('get', $endpoint);\n }", "title": "" }, { "docid": "4ba4f5bcfbeda9f06ab74596bc458eaf", "score": "0.5409907", "text": "public static function getFileVersion($src, $fallback_version = false)\n {\n $mix_manifest_path = get_template_directory() . '/dist/mix-manifest.json';\n\n // if the file doesn't exist we can't provide a new version\n if (! file_exists($mix_manifest_path)) {\n return $fallback_version;\n }\n\n if (substr($src, 0, 6) === '/dist/') {\n $src = str_replace('/dist/', '/', $src);\n }\n\n // fetch and decode the mix manifest file\n $versions = json_decode(file_get_contents($mix_manifest_path), true);\n\n // if the file in question doesn't exist in the file we can't provide a version\n if (! isset($versions[$src])) {\n return $fallback_version;\n }\n\n // fetch just the path for this item\n $path = $versions[$src];\n\n // if the file path doesn't contain the id query string, return\n if (strpos($path, '?id=') === false) {\n return $fallback_version;\n }\n\n // we've got this far, we can now return the version\n return explode('?id=', $path)[1];\n }", "title": "" }, { "docid": "1a5adb5c43ab766e06a4c806882ce9ce", "score": "0.54082626", "text": "public function getById($id)\n {\n return $this->model->find($id);\n }", "title": "" } ]
36b1e645d405351bdaf59800bfe27698
Function will create search restriction based on restriction array
[ { "docid": "51b4a2a8172d895e205a9e8f0b697932", "score": "0.0", "text": "function parseSearchRestriction($action)\n\t\t{\n\t\t\tif(isset($action[\"restriction\"])) {\n\t\t\t\tif(isset($action[\"restriction\"][\"start\"])) {\n\t\t\t\t\t// Set start variable\n\t\t\t\t\t$this->start = (int) $action[\"restriction\"][\"start\"];\n\t\t\t\t}\n\n\t\t\t\tif(isset($action[\"restriction\"][\"search\"]) && $action[\"restriction\"][\"search\"][\"attributes\"][\"type\"] == \"json\") {\n\t\t\t\t\tif(function_exists(\"json_decode\")) {\n\t\t\t\t\t\t$restriction = json_decode($action[\"restriction\"][\"search\"][\"_content\"], true);\n\n\t\t\t\t\t\t$errorInDecoding = false;\n\t\t\t\t\t\t/*if(function_exists(\"json_last_error\")) {\n\t\t\t\t\t\t\tif(json_last_error($restriction)) {\n\t\t\t\t\t\t\t\t// error in decoding json data\n\t\t\t\t\t\t\t\t$errorInfo = array();\n\t\t\t\t\t\t\t\t$errorInfo[\"error_message\"] = _(\"Error in decoding JSON data\") . \".\";\n\t\t\t\t\t\t\t\t$errorInfo[\"original_error_message\"] = \"Error in decoding JSON data.\";\n\t\t\t\t\t\t\t\t$this->searchRestriction = false;\n\t\t\t\t\t\t\t\t$errorInDecoding = true;\n\n\t\t\t\t\t\t\t\t$this->sendSearchErrorToClient($store, $entryid, $action, $errorInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}*/\n\n\t\t\t\t\t\tif(isset($restriction) && !$errorInDecoding) {\n\t\t\t\t\t\t\t$this->searchRestriction = Conversion::json2restriction($restriction);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// no JSON extension installed\n\t\t\t\t\t\t$errorInfo = array();\n\t\t\t\t\t\t$errorInfo[\"error_message\"] = _(\"The JSON extention for PHP is required to use this feature. Please inform your system administrator.\") . \".\";\n\t\t\t\t\t\t$errorInfo[\"original_error_message\"] = \"JSON extension for PHP is not installed.\";\n\t\t\t\t\t\t$this->searchRestriction = false;\n\n\t\t\t\t\t\t$this->sendSearchErrorToClient($store, $entryid, $action, $errorInfo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "e08328e6567e279183b19ae0a71d5d8d", "score": "0.64118475", "text": "function mm_simple_search_database_for_candidates($query_array, $query_operand, $limit)\n{\n $options = array();\n\n $filtered_array = array_filter($query_array);\n if (empty($filtered_array)) {\n register_error(elgg_echo('missions:error:no_search_values'));\n return false;\n }\n \n $value_array = array();\n foreach($filtered_array as $key => $array) {\n \t$value_array[$key] = str_replace('%', '', $array['value']);\n }\n\n // Setting options with which the query will be built.\n $options['type'] = 'object';\n $options['subtypes'] = array('education', 'experience', 'MySkill', 'portfolio');\n $options['attribute_name_value_pairs'] = $filtered_array;\n $options['attribute_name_value_pairs_operator'] = $query_operand;\n $entities = elgg_get_entities_from_attributes($options);\n\n $entity_owners = array();\n $search_feedback = array();\n $count = 0;\n foreach($entities as $entity) {\n $entity_owners[$count] = $entity->owner_guid;\n // Section for generating feedback which tells the user which search criteria the returned users met.\n if($entity->getSubtype() == 'education') {\n $identifier_string = elgg_echo('missions:school_name');\n }\n if($entity->getSubtype() == 'experience') {\n $identifier_string = elgg_echo('missions:job_title');\n }\n if($entity->getSubtype() == 'MySkill') {\n $identifier_string = elgg_echo('missions:skill');\n }\n if($entity->getSubtype() == 'portfolio') {\n $identifier_string = elgg_echo('missions:portfolio');\n }\n $search_feedback[$entity->owner_guid] .= $identifier_string . ': ' . $entity->title . ',';\n $count++;\n }\n\n $filtered_array_name = $filtered_array;\n $filtered_array_email = $filtered_array;\n foreach($filtered_array as $key => $value) {\n \t$filtered_array_name[$key]['name'] = 'name';\n \t$filtered_array_email[$key]['name'] = 'email';\n }\n $filtered_array_total = array_merge($filtered_array_name, $filtered_array_email);\n \n // Searches user names for the given string. \n $options_second['type'] = 'user';\n $options_second['limit'] = $limit;\n $options_second['attribute_name_value_pairs'] = $filtered_array_total;\n $options_second['attribute_name_value_pairs_operator'] = $query_operand;\n $users = elgg_get_entities_from_attributes($options_second);\n \n // Turns the user list into a list of GUIDs and sets the search feedback for search by name.\n foreach($users as $key => $user) {\n \t$users[$key] = $user->guid;\n \tforeach($value_array as $value) {\n \t\tif(strpos(strtolower($user->name), $value) !== false) {\n \t\t\t$search_feedback[$user->guid] .= elgg_echo('missions:name') . ': ' . $user->name . ',';\n \t\t}\n \t\tif(strpos(strtolower($user->email), $value) !== false) {\n \t\t\t$search_feedback[$user->guid] .= elgg_echo('missions:email') . ': ' . $user->email . ',';\n \t\t}\n \t}\n \t$count++;\n }\n \n $entity_owners = array_merge($entity_owners, $users);\n \n $unique_owners_entity = mm_guids_to_entities_with_opt(array_unique($entity_owners));\n $candidate_count = count($unique_owners_entity);\n\n if ($candidate_count == 0) {\n register_error(elgg_echo('missions:error:candidate_does_not_exist'));\n return false;\n } else {\n $_SESSION['candidate_count'] = $candidate_count;\n $_SESSION['candidate_search_set'] = $unique_owners_entity;\n $_SESSION['candidate_search_set_timestamp'] = time();\n $_SESSION['candidate_search_feedback'] = $search_feedback;\n $_SESSION['candidate_search_feedback_timestamp'] = time();\n\n return true;\n }\n}", "title": "" }, { "docid": "7cca6b52296b0d8ae41d4d9df6c27c9d", "score": "0.6109155", "text": "public function buildRestrictionElement(): void;", "title": "" }, { "docid": "bef78463344ce76d5434142c403389fb", "score": "0.605643", "text": "function createSearchLimit($search_terms, $rule='all') { \t\r\n\t \r\n\r\n\t\tglobal $CONFIG;\r\n\t\t// Split up $keywords by the delimiter (\" \") \r\n\r\n\t\t$arg = split(' ', $search_terms); \r\n\r\n\t\tif ($rule == 'all') { \r\n\r\n\t\t\t$joiner = 'AND'; \r\n\r\n\t\t} elseif ($rule == 'any') { \r\n\r\n\t\t\t$joiner = 'OR'; \r\n\r\n\t\t} \r\n\t\r\n\t\tif ($rule != 'exact') {\r\n\t \r\n\t\t\tfor($i=0; $i<count($arg); $i++) { \r\n\t\r\n\t\t\t\tif ($i==0) {\r\n\t\r\n\t\t\t\t\t$cond = \"(({$CONFIG['DB_PREFIX']}kb_entry_data.data LIKE '%$arg[$i]%' OR {$CONFIG['DB_PREFIX']}users.first_name LIKE '%$arg[$i]%') OR \". \r\n\t\t\t\t\t\t\"({$CONFIG['DB_PREFIX']}users.last_name LIKE '%$arg[$i]%'))\"; \r\n\t\r\n\t\t\t\t} else {\r\n\t\r\n\t\t\t\t\t$cond = \"$cond $joiner (({$CONFIG['DB_PREFIX']}kb_entry_data.data LIKE '%$arg[$i]%' OR {$CONFIG['DB_PREFIX']}users.first_name LIKE '%$arg[$i]%') OR \". \r\n\t\t\t\t\t\t\"({$CONFIG['DB_PREFIX']}users.last_name LIKE '%$arg[$i]%'))\"; \r\n\t\r\n\t\t\t\t}\t \r\n\t\t\t\t\t\t\r\n\t\r\n\t\t\t} \r\n\t\r\n\t\t} else {\r\n \r\n\t\t\t\t$cond = \"(({$CONFIG['DB_PREFIX']}kb_entry_data.data LIKE '%$search_terms%' OR {$CONFIG['DB_PREFIX']}users.first_name LIKE '%$arg[$i]%') OR \". \r\n\t\t\t\t\t\"({$CONFIG['DB_PREFIX']}users.last_name LIKE '$search_terms%'))\"; \r\n\t\r\n\t\t} \r\n\r\n\t\treturn $cond;\r\n\r\n\t}", "title": "" }, { "docid": "3eba11b0c9c7476466a0c56523f81c26", "score": "0.555824", "text": "function candidate_search($search_array)\n {\n $this->db->select('*')\n ->from(TABLE_USER_MASTER)\n ->join(TABLE_USER_PROFESSIONAL_DETAILS,TABLE_USER_MASTER.'.UserId='.TABLE_USER_PROFESSIONAL_DETAILS.'.UserId');\n if(is_array($search_array) && count($search_array) > 0)\n {\n foreach($search_array as $key => $val)\n {\n if(is_array($val) && count($val) > 0 && $key==\"KeySkill\")\n {\n foreach($val as $k =>$v)\n {\n $where = \"KeySkill REGEXP '.*\\\"SkillName\\\";s:[0-9]+:\\\"\".$v.\"\\\".*'\";\n $this->db->where($where);\n }\n }\n if(is_array($val) && count($val) > 0 && $key==\"FunctionalExpertise\")\n {\n foreach($val as $k =>$v)\n {\n $where = \"FunctionalExpertise REGEXP '.*\\\"Name\\\";s:[0-9]+:\\\"\".$v.\"\\\".*'\";\n $this->db->where($where);\n }\n }\n if($val!='' && $key!=\"KeySkill\" && $key!=\"FunctionalExpertise\" && $key!=\"Experience\" && $key!=\"ExpectedSal\" && $key!=\"ResumeDesc\")\n $this->db->like($key,$val);\n if($val!='' && $key==\"ResumeDesc\")\n $this->db->or_like($key,$val); \n if($val!='' && ($key==\"Experience\" || $key==\"ExpectedSal\" || $key==\"EmpStatus\"))\n $this->db->where($key,$val);\n }\n }\n $query=$this->db->get();\n return $query;\n }", "title": "" }, { "docid": "7428a726294be1100168ff078d6d5ed2", "score": "0.5540981", "text": "function mm_advanced_search_database_for_candidates($query_array, $query_operand, $limit) {\n $users_returned_by_attribute = array();\n $users_returned_by_metadata = array();\n $is_attribute_searched = false;\n $is_metadata_searched = false;\n $candidates = array();\n\n $filtered_array = array_filter($query_array);\n if (empty($filtered_array)) {\n register_error(elgg_echo('missions:error:no_search_values'));\n return false;\n }\n\n // Handles each query individually.\n foreach($filtered_array as $array) {\n // Sets up an education and experience array search for title (not metadata).\n if($array['name'] == 'title') {\n $options_attribute['type'] = 'object';\n $options_attribute['subtypes'] = $array['extra_option'];\n $options_attribute['joins'] = array('INNER JOIN ' . elgg_get_config('dbprefix') . 'objects_entity g ON (g.guid = e.guid)');\n $options_attribute['wheres'] = array(\"g.\" . $array['name'] . \" \" . $array['operand'] . \" '\" . $array['value'] . \"'\");\n $options_attribute['limit'] = $limit;\n $entities = elgg_get_entities($options_attribute);\n\n $entity_owners = array();\n $count = 0;\n foreach($entities as $entity) {\n $entity_owners[$count] = $entity->owner_guid;\n $count++;\n }\n\n // Adds the results of the query to a pool of results.\n if(empty($users_returned_by_attribute)) {\n $users_returned_by_attribute = array_unique($entity_owners);\n }\n else {\n $users_returned_by_attribute = array_unique(array_intersect($users_returned_by_attribute, $entity_owners));\n }\n // Notes that attributes have been searched during this function call.\n $is_attribute_searched = true;\n }\n \n else if(strpos($array['name'], 'opt_in') !== false || strpos($array['name'], 'department') !== false) {\n \t$options_attribute['type'] = 'user';\n \t$options_metadata['metadata_name_value_pairs'] = array(array('name' => $array['name'], 'operand' => $array['operand'], 'value' => $array['value']));\n \t$options_metadata['limit'] = $limit;\n \t$options_metadata['metadata_case_sensitive'] = false;\n \t$entities = elgg_get_entities_from_metadata($options_metadata);\n \t\n \t$entity_owners = array();\n \t$count = 0;\n \tforeach($entities as $entity) {\n \t\t$entity_owners[$count] = $entity->guid;\n \t\t$count++;\n \t}\n \t\n \t// Adds the results of the query to a pool of results.\n \tif(empty($users_returned_by_metadata)) {\n \t\t$users_returned_by_metadata = array_unique($entity_owners);\n \t}\n \telse {\n \t\t$users_returned_by_metadata = array_unique(array_intersect($users_returned_by_metadata, $entity_owners));\n \t}\n \t// Notes that metadata have been searched during this function call.\n \t$is_metadata_searched = true;\n }\n\n // Sets up metadata serach.\n else {\n $operand_temp = htmlspecialchars_decode($array['operand']);\n \n $options_metadata['type'] = 'object';\n $options_metadata['subtypes'] = $array['extra_option'];\n $options_metadata['metadata_name_value_pairs'] = array(array('name' => $array['name'], 'operand' => $operand_temp, 'value' => $array['value']));\n $options_metadata['limit'] = $limit;\n $options_metadata['metadata_case_sensitive'] = false;\n $entities = elgg_get_entities_from_metadata($options_metadata);\n\n $entity_owners = array();\n $count = 0;\n foreach($entities as $entity) {\n $entity_owners[$count] = $entity->owner_guid;\n $count++;\n }\n\n // Adds the results of the query to a pool of results.\n if(empty($users_returned_by_metadata)) {\n $users_returned_by_metadata = array_unique($entity_owners);\n }\n else {\n $users_returned_by_metadata = array_unique(array_intersect($users_returned_by_metadata, $entity_owners));\n }\n // Notes that metadata have been searched during this function call.\n $is_metadata_searched = true;\n }\n }\n\n // Intersects the results into a single pool.\n if($is_attribute_searched && $is_metadata_searched) {\n $candidates = array_intersect($users_returned_by_attribute, $users_returned_by_metadata);\n }\n // If only metadata or only attributes have been searched then intersection is unecessary.\n if($is_attribute_searched && !$is_metadata_searched) {\n $candidates = $users_returned_by_attribute;\n }\n if(!$is_attribute_searched && $is_metadata_searched) {\n $candidates = $users_returned_by_metadata;\n }\n \n $final_users = mm_guids_to_entities_with_opt(array_slice($candidates, 0, $limit));\n $final_count = count($final_users);\n\n if ($final_count == 0) {\n register_error(elgg_echo('missions:error:candidate_does_not_exist'));\n return false;\n } else {\n $_SESSION['candidate_count'] = $final_count;\n $_SESSION['candidate_search_set'] = $final_users;\n $_SESSION['candidate_search_set_timestamp'] = time();\n unset($_SESSION['candidate_search_feedback']);\n\n return true;\n }\n}", "title": "" }, { "docid": "da1d7efa1bed489a5dcd59314682dab9", "score": "0.5505644", "text": "private function getSearchRestriction($cpo) {\n $searchText = $cpo->GetSearchFreeText();\n\n $searchGreater = strtotime($cpo->GetSearchValueGreater());\n $searchLess = strtotime($cpo->GetSearchValueLess());\n\n if (version_compare(phpversion(),'5.3.4') < 0) {\n ZLog::Write(LOGLEVEL_WARN, sprintf(\"Your system's PHP version (%s) might not correctly process unicode strings. Search containing such characters might not return correct results. It is recommended to update to at least PHP 5.3.4. See ZP-541 for more information.\", phpversion()));\n }\n // split the search on whitespache and look for every word\n $searchText = preg_split(\"/\\W+/u\", $searchText);\n $searchProps = array(PR_BODY, PR_SUBJECT, PR_DISPLAY_TO, PR_DISPLAY_CC, PR_SENDER_NAME, PR_SENDER_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS);\n $resAnd = array();\n foreach($searchText as $term) {\n $resOr = array();\n\n foreach($searchProps as $property) {\n array_push($resOr,\n array(RES_CONTENT,\n array(\n FUZZYLEVEL => FL_SUBSTRING|FL_IGNORECASE,\n ULPROPTAG => $property,\n VALUE => u2w($term)\n )\n )\n );\n }\n array_push($resAnd, array(RES_OR, $resOr));\n }\n\n // add time range restrictions\n if ($searchGreater) {\n array_push($resAnd, array(RES_PROPERTY, array(RELOP => RELOP_GE, ULPROPTAG => PR_MESSAGE_DELIVERY_TIME, VALUE => array(PR_MESSAGE_DELIVERY_TIME => $searchGreater)))); // RES_AND;\n }\n if ($searchLess) {\n array_push($resAnd, array(RES_PROPERTY, array(RELOP => RELOP_LE, ULPROPTAG => PR_MESSAGE_DELIVERY_TIME, VALUE => array(PR_MESSAGE_DELIVERY_TIME => $searchLess))));\n }\n $mapiquery = array(RES_AND, $resAnd);\n\n return $mapiquery;\n }", "title": "" }, { "docid": "e088c9605b9d6af21155bc431717b332", "score": "0.55010563", "text": "public function setRestrictions();", "title": "" }, { "docid": "7e482717c28a5001affdf59698fc6879", "score": "0.546327", "text": "function generateFilterConditions($filter = null){\n\t\t$retval = array();\n\t\tif($filter){\n\t\t\tforeach($this->searchFields as $field){\n\t\t\t\t$retval['OR'][\"$field LIKE\"] = '%' . $filter . '%'; \n\t\t\t}\n\t\t}\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "7376c38a4892d5fd4492eb2caea98c6f", "score": "0.5447878", "text": "function _offer_search_build_conditions($data)\n {\n $conditions = array();\n foreach ($data as $k => $ca) {\n if (isset($ca['value']['between'])) {\n $betweenCondition = $ca['value']['between'];\n } else {\n $betweenCondition = false;\n }\n\n /* Check if the conditions have valid data and can be used in a where clause */\n if (empty($ca['field']) || empty($ca['value'])) {\n continue;\n //skip if no valid data found\n }\n\n /* If we got this far then that means we have adequate data for a where clause */\n if (is_array($betweenCondition)) { //check for a condition eligible for BETWEEN\n $firstValue = array_shift($betweenCondition);\n $secondValue = array_shift($betweenCondition);\n\n if (strlen($firstValue) == 0) {\n $firstValue = null;\n }\n\n if (strlen($secondValue) == 0) {\n $secondValue = null;\n }\n\n $betweenCondition = true;\n if (!strlen($firstValue) && !strlen($secondValue)) { //if both between values were\n // ommited, it's invalid\n continue;\n }\n } else {\n unset($firstValue);\n unset($secondValue);\n $betweenCondition = false;\n }\n\n if ($betweenCondition) : //generate valid SQL for a between condition\n if (null !== $firstValue && null !== $secondValue) { //if both values were\n // entered, it's a between\n if ($ca['field'] == 'SchedulingInstance.liveDuring') {\n $liveDuringCondition = \"(SchedulingInstance.startDate BETWEEN '$firstValue' AND '$secondValue' + INTERVAL 1 DAY\";\n $liveDuringCondition .= \" OR SchedulingInstance.endDate BETWEEN '$firstValue' AND '$secondValue' + INTERVAL 1 DAY\";\n $liveDuringCondition .= \" OR (SchedulingInstance.startDate <= '$firstValue' AND SchedulingInstance.endDate >= '$secondValue'))\";\n\n $conditions[$k] = $liveDuringCondition;\n } else {\n if ($ca['field'] == 'SchedulingInstance.startDate') {\n $conditions[$k] = \"SchedulingInstance.startDate >= '$firstValue' AND SchedulingInstance.startDate <= '$secondValue' + INTERVAL 1 DAY\";\n } else {\n if ($ca['field'] == 'SchedulingInstance.endDate') {\n $conditions[$k] = \"SchedulingInstance.endDate >= '$firstValue' AND SchedulingInstance.endDate <= '$secondValue' + INTERVAL 1 DAY\";\n } else {\n $conditions[$k] = $ca['field'] . ' BETWEEN ' . \"'{$firstValue}'\" . ' AND ' . \"'{$secondValue}'\";\n }\n }\n }\n } else { //if only one value was entered, it's not a between\n $conditions[$k] = $ca['field'] . ' = ' . \"'{$firstValue}'\";\n } else :\n if (is_array(\n $ca['value']\n ) || ($ca['field'] == 'ExpirationCriteria.expirationCriteriaId' && $ca['value'][0] == 'keep')\n ) {\n\n //override for expiration criteria type keep\n if ($ca['field'] == 'ExpirationCriteria.expirationCriteriaId' && $ca['value'][0] == 'keep') {\n $values = array(\n 1,\n 4\n );\n } else {\n foreach ($ca['value'] as $value) {\n $values[] = \"'{$value}'\";\n //wrap in single quotes\n }\n }\n $conditions[$k] = $ca['field'] . ' IN(' . implode(',', $values) . ')';\n } else {\n if ($ca['field'] == 'Package.packageName') {\n $conditions[$k] = \"MATCH({$ca['field']}) AGAINST('{$ca['value']}' IN BOOLEAN MODE)\";\n } else {\n if ($ca['field'] == 'Client.name') {\n $conditions[$k] = \"{$ca['field']} LIKE '%{$ca['value']}%'\";\n } else {\n $conditions[$k] = $ca['field'] . ' = ' . \"'{$ca['value']}'\";\n }\n }\n }\n\n endif; //end generate SQL for between condition\n }\n return implode($conditions, ' AND ');\n }", "title": "" }, { "docid": "e4c5c39ac95f5a2e8fe77e726e3feae5", "score": "0.53882086", "text": "function add_search_criteria(IMuTerms $imu_terms)\n {\n global $emu_search_criteria;\n\n $kind = $imu_terms->getKind();\n $search_criteria = trim($emu_search_criteria);\n\n if(!is_string($search_criteria) && '' == $search_criteria)\n {\n return $imu_terms;\n }\n\n // One condition, add it and return IMuTerms object\n if(false === strpos($search_criteria, ' AND ')\n && false === strpos($search_criteria, ' OR ')\n && false !== strpos($search_criteria, '='))\n {\n $condition = explode('=', $search_criteria);\n\n if('' != $condition[0] && '' != $condition[1])\n {\n $imu_terms->add($condition[0], $condition[1]);\n }\n\n return $imu_terms;\n }\n\n /* Example\n [\n [and] = [\n 0 => [column, val]\n 1 => [column, val]\n ]\n [or] = [\n 0 => [column, val]\n 1 => [column, val]\n ]\n ]\n */\n $conditions = array();\n\n if(false !== strpos($search_criteria, ' AND '))\n {\n $and_search_criterias = explode(' AND ', $search_criteria);\n\n foreach($and_search_criterias as $and_search_criteria)\n {\n // AND condition\n if(false === strpos($and_search_criteria, ' OR ') && false !== strpos($and_search_criteria, '='))\n {\n $condition = explode('=', $and_search_criteria);\n $column = trim($condition[0]);\n $value = trim($condition[1]);\n\n if('' != $column && '' != $value)\n {\n $conditions['and'][] = array($column, $value);\n $search_criteria = str_replace(\"{$and_search_criteria} AND \", '', $search_criteria);\n $search_criteria = str_replace(\"{$and_search_criteria}\", '', $search_criteria);\n }\n }\n }\n }\n\n if(false !== strpos($search_criteria, ' OR '))\n {\n $and_search_criterias = explode(' OR ', $search_criteria);\n\n foreach($and_search_criterias as $and_search_criteria)\n {\n // OR condition\n if(false === strpos($and_search_criteria, ' OR ') && false !== strpos($and_search_criteria, '='))\n {\n $condition = explode('=', $and_search_criteria);\n $column = trim($condition[0]);\n $value = trim($condition[1]);\n\n if('' != $column && '' != $value)\n {\n $conditions['or'][] = array($column, $value);\n $search_criteria = str_replace(\"{$and_search_criteria} OR \", '', $search_criteria);\n $search_criteria = str_replace(\"{$and_search_criteria}\", '', $search_criteria);\n }\n }\n }\n }\n\n // Adding to the actual IMuTerms object based on what kind the original\n // object was in order to end up with a correctly configured IMuTerms object\n foreach($conditions as $condition => $available_criteria)\n {\n $use_separate_terms = false;\n\n if('and' == $condition && 'and' != $kind)\n {\n $separate_terms = $imu_terms->addAnd();\n $use_separate_terms = true;\n }\n\n if('or' == $condition && 'or' != $kind)\n {\n $separate_terms = $imu_terms->addOr();\n $use_separate_terms = true;\n }\n\n foreach($available_criteria as $criteria)\n {\n if($use_separate_terms)\n {\n $separate_terms->add($criteria[0], $criteria[1]);\n\n continue;\n }\n\n $imu_terms->add($criteria[0], $criteria[1]);\n }\n }\n\n return $imu_terms;\n }", "title": "" }, { "docid": "19af73d12de05bb663373530f0aef5d5", "score": "0.5372218", "text": "public function setRestrictions(array $restrictions)\n {\n $this->restrictions = $restrictions;\n return $this;\n }", "title": "" }, { "docid": "9a84a3deae1fdd588eb7e6ff27385154", "score": "0.5315728", "text": "public function searchByCriteria($array = [])\n {\n $url = self::HTTPS_SEARCH_BIG_REGISTER_NL_API . 'criteria?';\n\n foreach ($array as $key => $value) {\n $url .= $key . '=' . $value . '&';\n }\n\n $this->curlExecute($url);\n }", "title": "" }, { "docid": "b2573c816fc364b1cdb1f2ef583eeb21", "score": "0.5281333", "text": "abstract protected function getRestrictRule();", "title": "" }, { "docid": "6d5f95e297511f7c4f23de36f2791dcc", "score": "0.52797395", "text": "function mm_analyze_advanced_search_element($place, $array)\n{\n $returner = array();\n\n switch(trim($array['selection_' . $place])) {\n // Returns an empty array if\n case '':\n break;\n\n case elgg_echo('missions:user_department'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n \t$returner['name'] = 'department';\n $returner['operand'] = 'LIKE';\n $returner['value'] = '%' . $array['selection_' . $place . '_element'] . '%';\n }\n break;\n \n case elgg_echo('missions:opt_in'):\n \tif(trim($array['selection_' . $place . '_element']) != '') {\n \t\t$name_option = '';\n\t \tswitch($array['selection_' . $place . '_element']) {\n\t \t\tcase elgg_echo('gcconnex_profile:opt:micro_mission'):\n\t \t\t\t$name_option = 'opt_in_missions';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:job_swap'):\n\t \t\t\t$name_option = 'opt_in_swap';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:mentored'):\n\t \t\t\t$name_option = 'opt_in_mentored';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:mentoring'):\n\t \t\t\t$name_option = 'opt_in_mentoring';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:shadowed'):\n\t \t\t\t$name_option = 'opt_in_shadowed';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:shadowing'):\n\t \t\t\t$name_option = 'opt_in_shadowing';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:peer_coached'):\n\t \t\t\t$name_option = 'opt_in_peer_coached';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:peer_coaching'):\n\t \t\t\t$name_option = 'opt_in_peer_coaching';\n\t \t\t\tbreak;\n\t\t\t\t\tcase elgg_echo('gcconnex_profile:opt:skill_sharing'):\n\t \t\t\t$name_option = 'opt_in_skill_sharing';\n\t \t\t\tbreak;\n\t \t\tcase elgg_echo('gcconnex_profile:opt:job_sharing'):\n\t \t\t\t$name_option = 'opt_in_job_sharing';\n\t \t\t\tbreak;\n\t \t}\n\t \t$returner['name'] = $name_option;\n $returner['operand'] = '=';\n\t \t$returner['value'] = 'gcconnex_profile:opt:yes';\n \t}\n \tbreak;\n \n case elgg_echo('missions:portfolio'):\n if(trim($array['selection_' . $place . '_element_value']) != '') {\n $name_option = '';\n $operand_option = 'LIKE';\n $value_option = '%' . $array['selection_' . $place . '_element_value'] . '%';\n switch($array['selection_' . $place . '_element']) {\n case elgg_echo('missions:title'):\n $name_option = 'title';\n break;\n case elgg_echo('missions:publication_date'):\n $name_option = 'pubdate';\n $operand_option = $array['selection_' . $place . '_element_operand'];\n $value_option = $array['selection_' . $place . '_element_value'];\n break;\n }\n $returner['name'] = $name_option;\n $returner['operand'] = $operand_option;\n $returner['value'] = $value_option;\n $returner['extra_option'] = 'portfolio';\n }\n break;\n\n case elgg_echo('missions:skill'):\n if(trim($array['selection_' . $place . '_element']) != '') {\n $returner['name'] = 'title';\n $returner['operand'] = 'LIKE';\n $returner['value'] = '%' . $array['selection_' . $place . '_element'] . '%';\n $returner['extra_option'] = 'MySkill';\n }\n break;\n\n case elgg_echo('missions:experience'):\n if(trim($array['selection_' . $place . '_element_value']) != '') {\n $name_option = '';\n $operand_option = 'LIKE';\n $value_option = '%' . $array['selection_' . $place . '_element_value'] . '%';\n switch($array['selection_' . $place . '_element']) {\n case elgg_echo('missions:title'):\n $name_option = 'title';\n break;\n case elgg_echo('missions:organization'):\n $name_option = 'organization';\n break;\n case elgg_echo('missions:end_year'):\n $name_option = 'endyear';\n $operand_option = $array['selection_' . $place . '_element_operand'];\n $value_option = $array['selection_' . $place . '_element_value'];\n break;\n }\n $returner['name'] = $name_option;\n $returner['operand'] = $operand_option;\n $returner['value'] = $value_option;\n $returner['extra_option'] = 'experience';\n }\n break;\n\n case elgg_echo('missions:education'):\n if(trim($array['selection_' . $place . '_element_value']) != '') {\n $name_option = '';\n $operand_option = 'LIKE';\n $value_option = '%' . $array['selection_' . $place . '_element_value'] . '%';\n switch($array['selection_' . $place . '_element']) {\n case elgg_echo('missions:title'):\n $name_option = 'title';\n break;\n case elgg_echo('missions:degree'):\n $name_option = 'degree';\n break;\n case elgg_echo('missions:field'):\n $name_option = 'field';\n break;\n case elgg_echo('missions:end_year'):\n $name_option = 'endyear';\n $operand_option = $array['selection_' . $place . '_element_operand'];\n $value_option = $array['selection_' . $place . '_element_value'];\n break;\n }\n $returner['name'] = $name_option;\n $returner['operand'] = $operand_option;\n $returner['value'] = $value_option;\n $returner['extra_option'] = 'education';\n }\n break;\n\n //\n case elgg_echo('missions:start_time'):\n case elgg_echo('missions:duration'):\n if (trim($array['selection_' . $place . '_element'])) {\n $name_option = '';\n // Selects which day will be searched.\n switch ($array['selection_' . $place . '_element_day']) {\n case elgg_echo('missions:mon'):\n $name_option = 'mon';\n break;\n case elgg_echo('missions:tue'):\n $name_option = 'tue';\n break;\n case elgg_echo('missions:wed'):\n $name_option = 'wed';\n break;\n case elgg_echo('missions:thu'):\n $name_option = 'thu';\n break;\n case elgg_echo('missions:fri'):\n $name_option = 'fri';\n break;\n case elgg_echo('missions:sat'):\n $name_option = 'sat';\n break;\n case elgg_echo('missions:sun'):\n $name_option = 'sun';\n break;\n }\n \n if($array['selection_' . $place] == elgg_echo('missions:start_time')) {\n \t$name_option .= '_start';\n }\n if($array['selection_' . $place] == elgg_echo('missions:duration')) {\n \t $name_option .= '_duration';\n }\n \n $operand_option = $array['selection_' . $place . '_operand'];\n // Packs the input hour and time for comparison with the packed elements in the database.\n $returner['name'] = $name_option;\n $returner['operand'] = $array['selection_' . $place . '_operand'];\n $returner['value'] = $array['selection_' . $place . '_element'];\n }\n break;\n \n case elgg_echo('missions:period'):\n \tif(trim($array['selection_' . $place . '_element']) != '') {\n\t \t$returner['name'] = 'time_interval';\n\t \t$returner['operand'] = '=';\n\t \t$returner['value'] = $array['selection_' . $place . '_element'];\n \t}\n \tbreak;\n \n case elgg_echo('missions:time'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n\t \t$returner['name'] = 'time_commitment';\n\t \t$returner['operand'] = $array['selection_' . $place . '_operand'];\n\t \t$returner['value'] = $array['selection_' . $place . '_element'];\n }\n \tbreak;\n\n // Selects language element which requires packing.\n case elgg_echo('missions:language'):\n if (trim($array['selection_' . $place . '_element_lwc']) != '' || trim($array['selection_' . $place . '_element_lwe']) != '' || trim($array['selection_' . $place . '_element_lop']) != '') {\n $name_option = '';\n // Selects which language will be searched\n switch ($array['selection_' . $place . '_element']) {\n case elgg_echo('missions:english'):\n $name_option = 'english';\n break;\n case elgg_echo('missions:french'):\n $name_option = 'french';\n break;\n }\n \n $option_value = $name_option;\n $language_requirement_array = array($array['selection_' . $place . '_element_lwc'], $array['selection_' . $place . '_element_lwe'], $array['selection_' . $place . '_element_lop']);\n foreach($language_requirement_array as $value) {\n\t switch($value) {\n\t \tcase 'A':\n\t \t\t$option_value .= '[Aa-]';\n\t \t\tbreak;\n\t \tcase 'B':\n\t \t\t$option_value .= '[ABab-]';\n\t \t\tbreak;\n\t \tcase 'C':\n\t \t\t$option_value .= '[ABCabc-]';\n\t \t\tbreak;\n\t \tdefault:\n\t \t\t$option_value .= '[-]';\n\t }\n }\n \n // Packs the input written comprehension, written expression and oral proficiency for comparison with the packed elements in the database.\n //$option_value = mm_pack_language($array['selection_' . $place . '_element_lwc'], $array['selection_' . $place . '_element_lwe'], $array['selection_' . $place . '_element_lop'], $name_option);\n $returner['name'] = $name_option;\n $returner['operand'] = 'REGEXP';\n $returner['value'] = $option_value;\n }\n break;\n\n // The next 3 are select elements that require a MySQL LIKE comparison.\n case elgg_echo('missions:key_skills'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n $returner['name'] = 'key_skills';\n $returner['operand'] = 'LIKE';\n $returner['value'] = '%' . $array['selection_' . $place . '_element'] . '%';\n }\n break;\n\n case elgg_echo('missions:location'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n $returner['name'] = 'location';\n $returner['operand'] = 'LIKE';\n $returner['value'] = '%' . $array['selection_' . $place . '_element'] . '%';\n }\n break;\n\n case elgg_echo('missions:type'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n $returner['name'] = 'job_type';\n $returner['operand'] = '=';\n $returner['value'] = $array['selection_' . $place . '_element'];\n }\n break;\n\n // The next 5 are selects elements that require a direct equivalence comparison.\n case elgg_echo('missions:title'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n $returner['name'] = 'job_title';\n $returner['operand'] = 'LIKE';\n $returner['value'] = '%' . $array['selection_' . $place . '_element'] . '%';\n }\n break;\n\n case elgg_echo('missions:security_clearance'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n $returner['name'] = 'security';\n $returner['operand'] = '=';\n $returner['value'] = $array['selection_' . $place . '_element'];\n }\n break;\n\n case elgg_echo('missions:department'):\n if (trim($array['selection_' . $place . '_element']) != '') {\n \tif(get_current_language() == 'fr') {\n \t\t$returner['name'] = 'department_path_french';\n \t}\n \telse {\n \t\t$returner['name'] = 'department_path_english';\n \t}\n $returner['operand'] = 'LIKE';\n $returner['value'] = '%' . $array['selection_' . $place . '_element'] . '%';\n }\n break;\n\n case elgg_echo('missions:work_remotely'):\n $returner['name'] = 'remotely';\n $returner['operand'] = '=';\n if($array['selection_' . $place . '_element']) {\n \t$returner['value'] = 1;\n }\n else {\n \t$returner['value'] = 0;\n }\n break;\n\n case elgg_echo('missions:program_area'):\n $returner['name'] = 'program_area';\n $returner['operand'] = '=';\n $returner['value'] = $array['selection_' . $place . '_element'];\n break;\n }\n\n return $returner;\n}", "title": "" }, { "docid": "deee6ebcaf4e2fb5ad0a69731fb84edb", "score": "0.52663", "text": "public function applySearch();", "title": "" }, { "docid": "9f394e67ca10a5ac80fd66c100f19eeb", "score": "0.52109075", "text": "public function mapForSearch(): array;", "title": "" }, { "docid": "8a62cd348a7fdfb657d98a0cd72cca1d", "score": "0.52042645", "text": "function _build_search_query()\n\t{\t\t\n\t\t$fields=$this->input->get(\"field\");\n\t\t$keywords=$this->input->get(\"keywords\");\n\t\t\n\t\t$allowed_fields=$this->allowed_fields;\n\t\t\n\t\tif ($keywords=='')\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\tif ($fields=='')\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\telse if ($fields=='all')\n\t\t{\t\t\t\n\t\t\t$where['field']=$allowed_fields;\n\t\t\t$where['keywords']=$keywords;\n\t\t\t\n\t\t\treturn $where;\n\t\t}\n\t\telse if (in_array($fields, $allowed_fields) )\n\t\t{\n\t\t\t$where['field']=array($fields);\n\t\t\t$where['keywords']=$keywords;\n\t\t\t\n\t\t\treturn $where;\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "8a62cd348a7fdfb657d98a0cd72cca1d", "score": "0.52042645", "text": "function _build_search_query()\n\t{\t\t\n\t\t$fields=$this->input->get(\"field\");\n\t\t$keywords=$this->input->get(\"keywords\");\n\t\t\n\t\t$allowed_fields=$this->allowed_fields;\n\t\t\n\t\tif ($keywords=='')\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\tif ($fields=='')\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\telse if ($fields=='all')\n\t\t{\t\t\t\n\t\t\t$where['field']=$allowed_fields;\n\t\t\t$where['keywords']=$keywords;\n\t\t\t\n\t\t\treturn $where;\n\t\t}\n\t\telse if (in_array($fields, $allowed_fields) )\n\t\t{\n\t\t\t$where['field']=array($fields);\n\t\t\t$where['keywords']=$keywords;\n\t\t\t\n\t\t\treturn $where;\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "2291eca6c8b6759b0ce32ca9c7b52f82", "score": "0.5178092", "text": "function mm_search_database_for_missions($query_array, $query_operand, $limit)\n{\n $options = array();\n $mission_count = '';\n $missions = '';\n\n $filtered_array = array_filter($query_array);\n if(empty($filtered_array)) {\n register_error(elgg_echo('missions:error:no_search_values'));\n return false;\n }\n\t\n foreach($filtered_array as $key => $array) {\n \t$filtered_array[$key]['operand'] = htmlspecialchars_decode($array['operand']);\n }\n \n // Setting options with which the query will be built.\n $options['type'] = 'object';\n $options['subtype'] = 'mission';\n $options['metadata_name_value_pairs'] = $filtered_array;\n $options['metadata_name_value_pairs_operator'] = $query_operand;\n $options['metadata_case_sensitive'] = false;\n $options['limit'] = $limit;\n $missions = elgg_get_entities_from_metadata($options);\n \n foreach($missions as $key => $mission) {\n \tif($mission->state != 'posted') {\n \t\tunset($missions[$key]);\n \t}\n }\n\n $mission_count = count($missions);\n\n if ($mission_count == 0) {\n register_error(elgg_echo('missions:error:entity_does_not_exist'));\n return false;\n } else {\n $_SESSION['mission_count'] = $mission_count;\n $_SESSION['mission_search_set'] = $missions;\n $_SESSION['mission_search_set_timestamp'] = time();\n\n return true;\n }\n}", "title": "" }, { "docid": "8acb48d87892b06bf39ba8c68b4b26ad", "score": "0.51621073", "text": "function _grAPI_getWhereForSearchFields($options) {\r\n $seenQueries = [];\r\n $andConditions = [];\r\n $schema = $options['_schema'];\r\n foreach ($_REQUEST as $name => $values) {\r\n if (!is_array($values)) { $values = [$values]; } // convert single values to arrays so we can process everything the same way\r\n if (!$values || $values[0] == '') { continue; } // skip fields with empty values\r\n\r\n $suffixList = '_min|_max|_match|_keyword|_prefix|_query|_empty';\r\n if (empty($options['searchSuffixRequired'])) { $suffixList .= '|'; }\r\n\r\n if (!preg_match(\"/^(.+?)($suffixList)\\z/\", $name, $matches)) { continue; } // skip fields without search suffixes\r\n $fieldnamesAsCSV = $matches[1];\r\n $searchType = $matches[2];\r\n $fieldnames = explode(',',$fieldnamesAsCSV);\r\n $orConditions = [];\r\n\r\n foreach ($fieldnames as $fieldnameString) {\r\n foreach ($values as $value) {\r\n\r\n // get field value for date searches.\r\n // don't do the date search if the suffix is actually part of the field name.\r\n if (preg_match(\"/^(.+?)_(year|month|day)\\z/\", $fieldnameString, $matches) && !is_array(@$schema[$fieldnameString])) {\r\n $fieldname = $matches[1];\r\n $dateValue = $matches[2];\r\n if (!is_array(@$schema[$fieldname])) { continue; } // skip invalid fieldnames\r\n if ($dateValue == 'year') { $fieldValue = \"YEAR(`$fieldname`)\"; }\r\n elseif ($dateValue == 'month') { $fieldValue = \"MONTH(`$fieldname`)\"; }\r\n elseif ($dateValue == 'day') { $fieldValue = \"DAYOFMONTH(`$fieldname`)\"; }\r\n else { die(\"unknown date value '$dateValue'!\"); }\r\n }\r\n\r\n // get field value for everything else\r\n else {\r\n if (!is_array(@$schema[$fieldnameString])) { continue; } // skip invalid fieldnames\r\n $fieldValue = '`' .str_replace('.', '`.`', $fieldnameString). '`'; // quote bare fields and qualified fieldnames (table.field)\r\n }\r\n\r\n // add conditions\r\n $fieldSchema = @$schema[$fieldnameString];\r\n $isMultiList = @$fieldSchema['type'] == 'list' && (@$fieldSchema['listType'] == 'pulldownMulti' || @$fieldSchema['listType'] == 'checkboxes');\r\n $valueAsNumberOnly = (float) preg_replace('/[^\\d\\.]/', '', $value);\r\n if (@$fieldSchema['type'] == 'date' && strlen($valueAsNumberOnly) == 8) { // add time to dates without it\r\n if ($searchType == '_min') { $valueAsNumberOnly .= '000000'; } // match from start of day\r\n if ($searchType == '_max') { $valueAsNumberOnly .= '240000'; } // match to end of day\r\n }\r\n\r\n if (!$fieldValue) { die(\"No fieldValue defined!\"); }\r\n if ($searchType == '_min') { $orConditions[] = \"$fieldValue+0 >= $valueAsNumberOnly\"; }\r\n else if ($searchType == '_max') { $orConditions[] = \"$fieldValue+0 <= $valueAsNumberOnly\"; }\r\n else if ($searchType == '_match' || $searchType == '') {\r\n // for single value lists: match exact column value\r\n // for multi value lists: match one of the multiple values or exact column value (to support single value-lists that were converted to multi-value)\r\n $thisCondition = \"$fieldValue = '\" .mysql_escape($value). \"'\";\r\n if ($isMultiList) { $thisCondition = \"($thisCondition OR $fieldValue LIKE '%\\\\t\" .mysql_escape($value). \"\\\\t%')\"; }\r\n $orConditions[] = $thisCondition;\r\n }\r\n else if ($searchType == '_keyword') { $orConditions[] = \"$fieldValue LIKE '%\" .mysql_escape($value, true). \"%'\"; }\r\n else if ($searchType == '_prefix') { $orConditions[] = \"$fieldValue LIKE '\" .mysql_escape($value, true). \"%'\"; }\r\n else if ($searchType == '_query') {\r\n if (@$seenQueries[\"$fieldnamesAsCSV=$searchType\"]++) { continue; } // only add each query once since we're add all fields at once\r\n $orConditions[] = _grAPI_getWhereForSearchQuery($values[0], $fieldnames, $schema);\r\n }\r\n else if ($searchType == '_empty') { $orConditions[] = \"$fieldValue = ''\"; }\r\n else { die(\"Unknown search type '$searchType'!\"); }\r\n }\r\n }\r\n\r\n $condition = join(' OR ', $orConditions);\r\n if ($condition) { $andConditions[] = \"($condition)\"; }\r\n\r\n }\r\n\r\n //\r\n $searchWhere = join(\" AND \", $andConditions);\r\n if (!empty($options['searchMatchRequired']) && !$searchWhere) { $searchWhere = \"false\"; } // don't return anything if no search criteria\r\n\r\n //\r\n return $searchWhere;\r\n}", "title": "" }, { "docid": "171a3d8d0f9072bba6fce597465f2289", "score": "0.51475334", "text": "public static function find($arrConditions);", "title": "" }, { "docid": "a81db02954bedd8c2e816a00face5a09", "score": "0.5098908", "text": "public function queryProcessor($listofitems){\n $counter_string = array();\n for($x = 0; $x < sizeof($listofitems); $x++){\n if(in_array($listofitems[$x], array(\"Gender\",\"Breed\",\"Type\",NULL,'selectone'))){\n \n \n } else {\n switch($x){\n case 0:\n array_push($counter_string,\"a.name LIKE '%\".$listofitems[$x].\"%'\");\n //$counter_string = $counter_string.\" a.name LIKE '%\".$listofitems[$x].\"%' AND \";\n break;\n \n case 1:\n array_push($counter_string, \"a.gender ='\".$listofitems[$x].\"'\");\n //$counter_string = $counter_string.\" a.gender ='\".$listofitems[$x].\"' AND \";\n break;\n \n case 2:\n array_push($counter_string, \"a.breed ='\".$listofitems[$x].\"'\");\n //$counter_string = $counter_string.\" a.breed ='\".$listofitems[$x].\"' AND \";\n break;\n\n case 3:\n array_push($counter_string, \"j.type ='\".$listofitems[$x].\"'\");\n //$counter_string = $counter_string.\" j.type ='\".$listofitems[$x].\"' \";\n break;\n }\n } \n }\n $final_condition = \"\";\n for($y = 0; $y < sizeof($counter_string); $y++){\n if($y == 0 && sizeof($counter_string)!=1){\n $final_condition = $final_condition.$counter_string[$y].\" AND \";\n } else {\n if($y == 0 && sizeof($counter_string)==1){\n $final_condition = $final_condition.$counter_string[$y];\n } else {\n if($y == sizeof($counter_string)-1){\n $final_condition = $final_condition.$counter_string[$y];\n } else {\n $final_condition = $final_condition.$counter_string[$y].\" AND \";\n }\n }\n } \n }\n return $final_condition; \n}", "title": "" }, { "docid": "13091628fa19339b87a0588bc6333a73", "score": "0.5090874", "text": "public function buildWherePermission( array $ids, $field='', $incStarCheck=true );", "title": "" }, { "docid": "566c0df3f32a09402fcaf9a4d0cde6e4", "score": "0.50804156", "text": "private function search_billOrgTag($inputArr)\n\t{\n\t\t$billOrgsMatch = array();\n\t\t$counter = 1;\n\t\t$countMax = count($inputArr);\n\t\t$queryStatement = \"\";\n\t\t\n\t\tforeach ($inputArr as $row)\n\t\t{\n\t\t\t// Search by billOrg\n\t\t\t$queryStatement = $queryStatement.\"(SELECT * FROM billdb.bills WHERE userID ='\".$this->session->userdata(\"userID\").\"' AND billOrg LIKE '%\".$row.\"%')\";\n\t\t\t$queryStatement = $queryStatement.\" UNION DISTINCT \";\n\t\t\t//Search by billTags\n\t\t\t$queryStatement = $queryStatement.\"(SELECT * FROM billdb.bills WHERE userID ='\".$this->session->userdata(\"userID\").\"' AND billID IN (SELECT billID FROM billdb.billTags WHERE tagName LIKE '%\".$row.\"%'))\";\n\t\t\t\n\t\t\t// If more than one token in query string\n\t\t\tif ($counter < $countMax)\n\t\t\t{\n\t\t\t\t$queryStatement = $queryStatement.\" UNION DISTINCT \";\n\t\t\t\t$counter++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t$query = $this->billdb->query($queryStatement);\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t} \n }", "title": "" }, { "docid": "fd4e92c9ab1943dd5ff1b09f4a29bdc6", "score": "0.5078571", "text": "protected function _prepare_restrictions ()\n {\n parent::_prepare_restrictions ();\n\n if (! $this->_returns_no_data ())\n {\n include_once ('webcore/db/query_security.php');\n $restriction = new QUERY_SECURITY_RESTRICTION ($this, $this->_user);\n $sql = $restriction->as_sql (array (Privilege_set_folder, Privilege_set_entry));\n if (! $sql)\n {\n $this->_set_returns_no_data ();\n }\n else\n {\n $this->_calculated_restrictions [] = $sql;\n }\n }\n }", "title": "" }, { "docid": "c0f4a03a8bb59cebaae2b957da6f8054", "score": "0.50671685", "text": "static function addMoreCriteria() {\n\n return [Rule::PATTERN_FIND => __('is already present in GLPI'),\n Rule::PATTERN_IS_EMPTY => __('is empty in GLPI')];\n }", "title": "" }, { "docid": "9f9c6f267e07a7e24a2724560290e8d1", "score": "0.50482225", "text": "public function buildCriteria(array $values)\n {\n return $this->doBuildCriteria($this->processValues($values));\n }", "title": "" }, { "docid": "f08f22006b8dd6efb3a05939a566080a", "score": "0.5043433", "text": "abstract protected function createCriteria(RentRecoveryPlusReference $reference);", "title": "" }, { "docid": "0ba8db42f8a8a6d69a065fb115f7799d", "score": "0.502864", "text": "function makeSearch($searchMode, $searchForWords, $inColumns)\n\t\t{\n\t\t\tif (!is_array($searchForWords))\n\t\t\t{\n\t\t\t\tif ($searchMode == EXACT_PHRASE) $searchForWords = array($searchForWords);\n\t\t\t\telse $searchForWords = preg_split(\"/\\s+/\", $searchForWords, -1, PREG_SPLIT_NO_EMPTY);\n\t\t\t}\n\t\t\telseif ($searchMode == EXACT_PHRASE && count($searchForWords) > 1)\n\t\t\t\t$searchForWords = array(implode(' ', $searchForWords));\n\t\n\t\t\tif (!is_array($inColumns))\n\t\t\t\t$inColumns = preg_split(\"/[\\s,]+/\", $inColumns, -1, PREG_SPLIT_NO_EMPTY);\n\t\n\t\t\t$where = '';\n\t\t\tforeach ($searchForWords as $searchForWord)\n\t\t\t{\n\t\t\t\tif (strlen($where)) $where .= ($searchMode == ALL_WORDS) ? ' AND ' : ' OR ';\n\t\n\t\t\t\t$sub = '';\n\t\t\t\tforeach ($inColumns as $inColumn)\n\t\t\t\t{\n\t\t\t\t\tif (strlen($sub)) $sub .= ' OR ';\n\t\t\t\t\t$sub .= \"$inColumn LIKE '%\" . $searchForWord . \"%'\"; //!! escaping?\n\t\t\t\t}\n\t\n\t\t\t\t$where .= \"($sub)\";\n\t\t\t}\n\t\n\t\t\treturn $where;\n\t\t}", "title": "" }, { "docid": "f4f633c2f753b51fa1144e66efba2f41", "score": "0.50136846", "text": "protected function getInputSelectionCriteria()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "fd5c74f859f904820c2a26b9b062bb90", "score": "0.49757656", "text": "private function createParams(){\n\n //filters from the map...\n $filters =[];\n $mainmenu = $this->getMenu();//Session::get('mainmenu');\n //we can make the aggregates...\n $params = [];\n for($i=0;$i<count($mainmenu['filters']);$i++){\n $filter = $mainmenu['filters'][$i];\n if (!array_key_exists ($filter, $params)) $params[$filter] = ['terms' => ['field' => $filter]];\n }\n\n return $params;\n }", "title": "" }, { "docid": "56678c4ddb492baf43f4e835b975d124", "score": "0.49692583", "text": "protected function _prepare_restrictions ()\n {\n parent::_prepare_restrictions ();\n $this->_calculated_restrictions [] = 'att.object_id = ' . $this->_host->id;\n }", "title": "" }, { "docid": "d26e88a5a81532c54dc991fe37945938", "score": "0.49454606", "text": "public function createCase($inputArray);", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.49406686", "text": "public function getCriteria();", "title": "" }, { "docid": "00be4a3cb0813fe52f33d9f5c7058290", "score": "0.4931984", "text": "public static function getSearchKmChoices($array)\n\t{\n\t\t$array = explode(',', $array);\n\t\t\n\t\t$choices = array(''=>Common::translate('home', 'Postcode Only'));\n\t\t\n\t\tforeach ($array as $a)\n\t\t{\n\t\t\t$choices[$a] = Common::translate('search', 'Within') . ' ' . $a . 'km';\n\t\t}\n\t\t\n\t\treturn $choices;\n\t}", "title": "" }, { "docid": "c742f8bc523e390e18b3523a6d10ba05", "score": "0.49281698", "text": "public function testFromArrayMulti()\n {\n $crit = Criterion::fromArray('OR',\n array(Expression::eq('sn', 'Smith'),\n Expression::eq('gn', 'Bob')));\n \n $this->assertNotNull($crit);\n $this->assertType('\\Xyster\\Data\\Symbol\\Junction', $crit);\n }", "title": "" }, { "docid": "6d268ca52fbbf37cccb51f832c5d470b", "score": "0.4924026", "text": "abstract public function getCriteria();", "title": "" }, { "docid": "91e15e3437dbfa460a75aa177adab83c", "score": "0.49204475", "text": "function search_by_criteria($criteria)\n\t{\n\t\t$i=0;\n\t\t$rec1=mysql_query(\"select * from fir_data\");\n\t\twhile($rec2=mysql_fetch_array($rec1))\n\t\t{\n\t\t\t$fir_data_obj= new fir_data();\n\t\t\t$fir_data_obj->case_id=$rec2[\"case_id\"];\n\t\t\t$fir_data_obj->crime_id=$rec2[\"crime_id\"];\n\t\t\t$fir_data_obj->crime_name=$rec2[\"crime_name\"];\n\t\t\t$fir_data_obj->location=$rec2[\"location\"];\n\t\t\t$fir_data_obj->citizen_id=$rec2[\"citizen_id\"];\n\t\t\t$fir_data_obj->fdate=$rec2[\"fdate\"];\n\t\t\t$fir_data_obj->ans1=$rec2[\"ans1\"];\n\t\t\t$fir_data_obj->ans2=$rec2[\"ans2\"];\n\t\t\t$fir_data_obj->ans3=$rec2[\"ans3\"];\n\t\t\t$fir_data_obj->ans4=$rec2[\"ans4\"];\n\t\t\t$fir_data_obj->ans5=$rec2[\"ans5\"];\n\t\t\t\n\t\t\t$arr[$i]=$fir_data_obj;\n\t\t\t$i++;\n\t\t}\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "5bd2324f566190f752280d761185b001", "score": "0.49136105", "text": "protected function initRestrictions()\n\t{\n\t\t$this->restrictions = [];\n\t\t/* all */\n\t\t$siteId = (defined('SITE_ID') ? SITE_ID : null);\n\t\tif (!empty($siteId))\n\t\t{\n\t\t\t$this->restrictions['all'] = ['SITE_ID' => $siteId];\n\t\t\t$this->restrictions['iblock'] = $this->restrictions['all'];\n\t\t\t$this->restrictions['socialnetwork'] = $this->restrictions['all'];\n\t\t}\n\t\t/* iblock */\n\t\t$iblockId = (string)Manager::getOption('source_iblocks');\n\t\tif ($iblockId !== '')\n\t\t{\n\t\t\t$iblockId = explode(',', $iblockId);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$iblockId = [\n\t\t\t\tHook\\Page\\Settings::getDataForSite()['IBLOCK_ID']\n\t\t\t];\n\t\t}\n\t\t$this->restrictions['iblock']['IBLOCK_ID'] = $iblockId;\n\t}", "title": "" }, { "docid": "b0332f5fd72206815accc2a5e054db1b", "score": "0.4892139", "text": "function array_to_query(\n $array,\n $param='id'\n )\n {\n $content_arr = explode(\"%\", $array);\n $first_el = 1;\n $content_search_arr = [];\n foreach ($content_arr as $arr_el){\n if($arr_el != ''){\n if($first_el == 1){\n $arr_el = \"$param LIKE '$arr_el'\";\n $first_el = 0;\n }else{\n $arr_el = \"OR $param LIKE '$arr_el'\";\n }\n array_push($content_search_arr, $arr_el);\n }\n }\n $content_search=implode(\" \", $content_search_arr);\n return $content_search;\n }", "title": "" }, { "docid": "b5dd41859a99b256e0d1d5d7bc00c96d", "score": "0.48732546", "text": "function pds_ss_make_filtered_wp_query($query_term, $post_type, $args = array(), $limit = 5, $thresholdStart = 2, $thresholdEnd = 4) {\n\n // Suggestions\n $suggestion = $suggestions = null;\n\n // Search\n $wp_query = pds_ss_filtered_wp_search($query_term, $post_type, $args, $limit);\n\n // Check Posts\n if(!$wp_query->have_posts()) {\n\n // Get Suggestions\n $suggestions = getSSFinderInstance()->getSuggestions($query_term);\n\n // Check for Suggestions\n if(sizeof($suggestions) > 0) {\n\n // Set Suggestion\n $suggestion = $suggestions[0];\n\n // Make Query\n $wp_query = pds_ss_filtered_wp_search($suggestion, $post_type, $args, $limit);\n }\n }\n\n // Check Posts\n if(!$wp_query->have_posts())\n $wp_query = pds_ss_filtered_wp_search(pds_ss_mapped_breakdown_string($query_term, $thresholdStart, $thresholdEnd), $post_type, $args, $limit);\n\n // Check Posts Again\n if(!$wp_query->have_posts())\n $wp_query = pds_ss_filtered_wp_search(pds_ss_breakdown_string($query_term, $thresholdStart, $thresholdEnd), $post_type, $args, $limit);\n\n // Return Response\n return array('query' => $wp_query, 'suggestion' => $suggestion, 'suggestions' => $suggestions);\n}", "title": "" }, { "docid": "0ad146e25fba5f27b6e98ef361c88737", "score": "0.4869079", "text": "private function createRequestWhere($params)\n {\n if(!empty($params))\n {\n $where = array();\n\n // Check the first element to understand the format. 2 possibilities :\n // - $where = array(\"col1\" => \"value1\", \"col2\" => \"value2\")\n // - $where = array(array(\"type\" => \"type1\", \"col\" => \"col1\", \"value\" => \"value1\"), array(...), ...)\n\n if(!isset($params[0]) || !is_array($params[0]))\n {\n foreach($params as $name => $value)\n $where[] = \"a.\".$name.\"=\".$this->pdo->quote($value);\n }\n else\n {\n foreach($params as $where_field){\n if(!isset($where_field[\"type\"]))\n {\n $where[] = \"a.\".$where_field[\"col\"].\"=\".$this->pdo->quote($where_field[\"value\"]);\n }\n if($where_field[\"type\"] == \"text\" ||\n $where_field[\"type\"] == \"email\" ||\n $where_field[\"type\"] == \"url\" ||\n $where_field[\"type\"] == \"tel\" ||\n $where_field[\"type\"] == \"textarea\")\n {\n $where[] = \"a.\".$where_field[\"col\"].\" LIKE \".$this->pdo->quote(\"%\".$where_field[\"value\"].\"%\");\n }\n else if($where_field[\"type\"] == \"number\")\n {\n $where[] = \"a.\".$where_field[\"col\"].\"=\".$this->pdo->quote($where_field[\"value\"]);\n }\n else if($where_field[\"type\"] == \"select\")\n {\n $where[] = \"a.\".$where_field[\"col\"].\"=\".$this->pdo->quote($where_field[\"value\"]);\n }\n else if($where_field[\"type\"] == \"date\")\n {\n $sign = \"=\";\n if(isset($where_field[\"info\"])){\n if($where_field[\"info\"] == \"-1\") $sign = \"<=\";\n else if($where_field[\"info\"] == \"1\") $sign = \">=\";\n }\n $where[] = \"a.\".$where_field[\"col\"].$sign.$this->pdo->quote($where_field[\"value\"]);\n }\n else if($where_field[\"type\"] == \"checkbox\")\n {\n if($where_field[\"value\"] == \"1\")\n $where[] = \"a.\".$where_field[\"col\"].\"=1\";\n else if($where_field[\"value\"] == \"-1\")\n $where[] = \"a.\".$where_field[\"col\"].\"=0\";\n }\n }\n }\n if(!empty($where))\n {\n $where = \" WHERE \".implode(\" AND \", $where);\n return $where;\n }\n }\n return \"\";\n }", "title": "" }, { "docid": "12e31364d5793fc707d324596294c889", "score": "0.48495775", "text": "public function checkRestriction($restriction)\n {\n $restrictionToCheck = $restriction;\n $dbRestrictions = EventRestriction::get();\n $restrictionArray = array();\n foreach ($dbRestrictions as $r){\n array_push($restrictionArray, $r->Description);\n }\n\n if (in_array($restrictionToCheck, $restrictionArray)){\n $data = new ArrayData(array(\n 'check' => true,\n 'restriction' => $restrictionToCheck\n ));\n } else {\n $data = new ArrayData(array(\n 'check' => false,\n 'restriction' => $restrictionToCheck\n ));\n }\n return $data;\n }", "title": "" }, { "docid": "3027d4d2f0920c80646b117668a7e078", "score": "0.48475808", "text": "public function search(array $params);", "title": "" }, { "docid": "5917465aa44171046e9229ef30ecbdc1", "score": "0.48343888", "text": "public function search(array $parameters);", "title": "" }, { "docid": "c618ba284e94d0c8835a12a58fccd56a", "score": "0.48276392", "text": "public function getSearch($searchparams)\n\t\t{\n\t\t$criteria = parent::getSearch($searchparams);\n\t\t// extend base-class to handle encoded class/category select-list option values\n\t\tforeach($searchparams as $k => $r)\n\t\t\t{\n\t\t\tif(is_object($r) and isset($r->field))\n\t\t\t\t{\n\t\t\t\t$f = $this->columns[$r->field]['criteriafield'];\n\t\t\t\tYii::log('criteriafield='.print_r($f,true), 'debug', 'AllDomainsModel::getSearch()');\n\t\t\t\tif($f != null)\n\t\t\t\t\tif($f=='holderClass') {\n\t\t\t\t\t\t$criteria->$f = encode_class_to_wsapi_str($r->data);\n }\n\t\t\t\t\telse if($f=='holderCategory') {\n\t\t\t\t\t\t\t$criteria->$f = encode_category_to_wsapi_str($r->data);\n } else if($f == 'renewDate'){\n $s = split(\" \",$criteria->$f , 2);\n $criteria->renewFrom = trim($s[0]);\n $criteria->renewTo = trim($s[1]);\n } else if($f == 'renDate') {\n $s = split(\" \",$criteria->$f , 2);\n $criteria->renewalDateFrom = trim($s[0]);\n $criteria->renewalDateTo = trim($s[1]);\n } else if ($f == 'regDate') {\n $s = split(\" \",$criteria->$f , 2);\n $criteria->registrationDateFrom = trim($s[0]);\n $criteria->registrationDateTo = trim($s[1]);\n } else if($f == 'msdDate') {\n $s = split(\" \",$criteria->$f , 2);\n $criteria->msdDateFrom = trim($s[0]);\n $criteria->msdDateTo = trim($s[1]);\n } else if($f == 'registrationDate') {\n $s = split(\" \",$criteria->$f , 2);\n $criteria->registrationFrom = trim($s[0]);\n $criteria->registrationTo = trim($s[1]);\n } else if($f == 'renewalDate') {\n $s = split(\" \",$criteria->$f , 2);\n $criteria->renewalFrom = trim($s[0]);\n $criteria->renewalTo = trim($s[1]);\n }\n\t\t\t\t\t/* otherwise leave '$criteria->$f' as was set in parent::getSearch() */\n\t\t\t\t}\n\t\t\t}\n unset($criteria->accountId);\n $criteria->notAccountId = 1;\n\t\tYii::log('returning '.print_r($criteria,true), 'debug', 'AllDomainsModel::getSearch()');\n\t\treturn $criteria;\n\t\t}", "title": "" }, { "docid": "7fddd42542d4ddd8cc9374d5b31e259c", "score": "0.48276135", "text": "public function build_filter_conditions($filter = null){\n\t\t$conditions = array();\n\t\tif($filter){\n\t\t\tforeach($this->searchFields as $field){\n\t\t\t\t$conditions['OR'][\"$field LIKE\"] = '%' . $filter . '%';\n\t\t\t}\n\t\t}\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "97690a4a84c4e4ae1787b05d9ef4f05e", "score": "0.4820387", "text": "function get_search_suggestions($search, $limit = 25) {\n $suggestions = array();\n $pawns = $this->db->dbprefix('pawn');\n $customers = $this->db->dbprefix('customers');\n $people = $this->db->dbprefix('people');\n $this->db->from('customers');\n $this->db->join('people', 'customers.person_id=people.person_id');\n $this->db->join('pawn', 'pawn.person_id = people.person_id');\n\n $this->db->where(\"(first_name LIKE '%\" . $this->db->escape_like_str($search) . \"%' or \n\t\tlast_name LIKE '%\" . $this->db->escape_like_str($search) . \"%' or \n\t\tCONCAT(`first_name`,' ',`last_name`) LIKE '%\" . $this->db->escape_like_str($search) . \"%' or \n\t\tCONCAT(`last_name`,', ',`first_name`) LIKE '%\" . $this->db->escape_like_str($search) . \"%') and \".$pawns.\".deleted=0\");\n\n $this->db->limit($limit);\n $by_name = $this->db->get();\n\n $temp_suggestions = array();\n foreach ($by_name->result() as $row) {\n $temp_suggestions[] = $row->last_name . ', ' . $row->first_name;\n }\n\n sort($temp_suggestions);\n foreach ($temp_suggestions as $temp_suggestion) {\n $suggestions[] = array('label' => $temp_suggestion);\n }\n\n $this->db->from('customers');\n $this->db->join('people', 'customers.person_id=people.person_id');\n $this->db->join('pawn', 'pawn.person_id = people.person_id');\n $this->db->where('pawn.deleted', 0);\n $this->db->like(\"start_date\", $search);\n $this->db->limit($limit);\n $by_email = $this->db->get();\n\n $temp_suggestions = array();\n foreach ($by_email->result() as $row) {\n $temp_suggestions[] = date('d-m-Y',strtotime($row->start_date));\n }\n\n sort($temp_suggestions);\n foreach ($temp_suggestions as $temp_suggestion) {\n $suggestions[] = array('label' => $temp_suggestion);\n }\n\n $this->db->from('customers');\n $this->db->join('people', 'customers.person_id=people.person_id');\n $this->db->join('pawn', 'pawn.person_id = people.person_id');\n $this->db->where('pawn.deleted', 0);\n $this->db->like(\"phone_number\", $search);\n $this->db->limit($limit);\n $by_phone = $this->db->get();\n\n $temp_suggestions = array();\n foreach ($by_phone->result() as $row) {\n $temp_suggestions[] = $row->phone_number;\n }\n\n sort($temp_suggestions);\n foreach ($temp_suggestions as $temp_suggestion) {\n $suggestions[] = array('label' => $temp_suggestion);\n }\n\n\n $this->db->from('customers');\n $this->db->join('people', 'customers.person_id=people.person_id');\n $this->db->join('pawn', 'pawn.person_id = people.person_id');\n $this->db->where('pawn.deleted', 0);\n $this->db->like(\"amount\", $search);\n $this->db->limit($limit);\n $amount = $this->db->get();\n\n $temp_suggestions = array();\n foreach ($amount->result() as $row) {\n $temp_suggestions[] = $row->amount;\n }\n\n sort($temp_suggestions);\n foreach ($temp_suggestions as $temp_suggestion) {\n $suggestions[] = array('label' => $temp_suggestion);\n }\n\n $this->db->from('customers');\n $this->db->join('people', 'customers.person_id=people.person_id');\n $this->db->join('pawn', 'pawn.person_id = people.person_id');\n $this->db->where('pawn.deleted', 0);\n $this->db->like(\"product_name\", $search);\n $this->db->limit($limit);\n $product_name = $this->db->get();\n\n $temp_suggestions = array();\n foreach ($product_name->result() as $row) {\n $temp_suggestions[] = $row->product_name;\n }\n\n sort($temp_suggestions);\n foreach ($temp_suggestions as $temp_suggestion) {\n $suggestions[] = array('label' => $temp_suggestion);\n }\n\n //only return $limit suggestions\n if (count($suggestions > $limit)) {\n $suggestions = array_slice($suggestions, 0, $limit);\n }\n return $suggestions;\n }", "title": "" }, { "docid": "e5fdd52587304e30d5914188643596d9", "score": "0.48054668", "text": "public static function getFilter()\n {\n $criteria = array('AND' => array(\n array('field' => self::ATTRIBUTE_SN,\n 'op' => 'any'),\n array('field' => self::ATTRIBUTE_MAIL,\n 'op' => 'any'),\n array('field' => self::ATTRIBUTE_SID,\n 'op' => 'any'),\n array('field' => self::ATTRIBUTE_OC,\n 'op' => '=',\n 'test' => self::OBJECTCLASS_KOLABINETORGPERSON),\n ),\n );\n return $criteria;\n }", "title": "" }, { "docid": "a2ff0834afc578fd73fc966b50947467", "score": "0.47991645", "text": "public static function setup_search(){return array();}", "title": "" }, { "docid": "ba6a4a46b2cf972274d4dd7722f79c7b", "score": "0.47976142", "text": "static function addMoreCriteria() {\n return [];\n }", "title": "" }, { "docid": "488f086271579dcdbdfce4e887bed378", "score": "0.4790716", "text": "public function generateSearchRules()\n {\n if (($table = $this->getTableSchema()) === false) {\n return [\"[['\" . implode(\"', '\", $this->getColumnNames()) . \"'], 'safe']\"];\n }\n $types = [];\n foreach ($table->columns as $column) {\n switch ($column->type) {\n case Schema::TYPE_SMALLINT:\n case Schema::TYPE_INTEGER:\n case Schema::TYPE_BIGINT:\n $types['integer'][] = $column->name;\n break;\n case Schema::TYPE_BOOLEAN:\n $types['boolean'][] = $column->name;\n break;\n case Schema::TYPE_FLOAT:\n case Schema::TYPE_DOUBLE:\n case Schema::TYPE_DECIMAL:\n case Schema::TYPE_MONEY:\n $types['number'][] = $column->name;\n break;\n case Schema::TYPE_DATE:\n case Schema::TYPE_TIME:\n case Schema::TYPE_DATETIME:\n case Schema::TYPE_TIMESTAMP:\n default:\n $types['safe'][] = $column->name;\n break;\n }\n }\n\n $rules = [];\n foreach ($types as $type => $columns) {\n $rules[] = \"[['\" . implode(\"', '\", $columns) . \"'], '$type']\";\n }\n\n return $rules;\n }", "title": "" }, { "docid": "488f086271579dcdbdfce4e887bed378", "score": "0.4790716", "text": "public function generateSearchRules()\n {\n if (($table = $this->getTableSchema()) === false) {\n return [\"[['\" . implode(\"', '\", $this->getColumnNames()) . \"'], 'safe']\"];\n }\n $types = [];\n foreach ($table->columns as $column) {\n switch ($column->type) {\n case Schema::TYPE_SMALLINT:\n case Schema::TYPE_INTEGER:\n case Schema::TYPE_BIGINT:\n $types['integer'][] = $column->name;\n break;\n case Schema::TYPE_BOOLEAN:\n $types['boolean'][] = $column->name;\n break;\n case Schema::TYPE_FLOAT:\n case Schema::TYPE_DOUBLE:\n case Schema::TYPE_DECIMAL:\n case Schema::TYPE_MONEY:\n $types['number'][] = $column->name;\n break;\n case Schema::TYPE_DATE:\n case Schema::TYPE_TIME:\n case Schema::TYPE_DATETIME:\n case Schema::TYPE_TIMESTAMP:\n default:\n $types['safe'][] = $column->name;\n break;\n }\n }\n\n $rules = [];\n foreach ($types as $type => $columns) {\n $rules[] = \"[['\" . implode(\"', '\", $columns) . \"'], '$type']\";\n }\n\n return $rules;\n }", "title": "" }, { "docid": "483e18e64b3d8778264fdfa4d3fcac86", "score": "0.47887257", "text": "function suggestions_in_software(string $suggestions_for, array $params) // -> array\n{\n $columns = array(\n \"name\" => \"`Name`\",\n \"version\" => \"`Version`\",\n \"registration_no\" => \"`RegistrationNumber`\",\n );\n\n $field = $columns[$suggestions_for];\n if ($params === null || $field === null) return null;\n\n $where = \"1\";\n foreach ($columns as $key=>$value)\n {\n $f = $value;\n $v = isset($params[$key]) ? meta_escape($params[$key]) : '';\n $where = $where . \" AND ($f LIKE '{$v}%')\";\n }\n\n $query = \"SELECT DISTINCT $field FROM `SoftwareEquipment` WHERE $where\";\n $conn = meta_open_db();\n $results = array();\n if ($stmt = $conn->prepare($query))\n {\n $stmt->execute();\n $stmt->bind_result($vals);\n while ($stmt->fetch())\n {\n array_push($results, $vals);\n }\n $stmt->close();\n }\n $conn->close();\n return $results;\n}", "title": "" }, { "docid": "c68f797a4d9b74ef7ba4954224e6262b", "score": "0.4787923", "text": "protected function generateQuery($criteria = array(), $limit = array())\n {\n }", "title": "" }, { "docid": "85470b7f29fd9e1fd2b69f5c1dc55c0d", "score": "0.4771599", "text": "function process_search($post_arr)\n{\n\tif(is_array($post_arr))\n\t{\n\t\tif(in_array(\"all\",$post_arr))\n\t\t\t$array_ret = array();\n\t\telse\n\t\t\t$array_ret = $post_arr;\n\t}\n\telse\n\t\t$array_ret = array();\n\treturn $array_ret;\t\n}", "title": "" }, { "docid": "9fb2e8bf0d36ba46462285a64e028fef", "score": "0.4761559", "text": "function _build_conditions($data)\n {\n $conditions = array();\n\n if (empty($data)) {\n return false;\n }\n\n foreach ($data as $k => $ca) {\n if (isset($ca['value']['between'])) {\n $betweenCondition = $ca['value']['between'];\n } else {\n $betweenCondition = false;\n }\n\n /* Check if the conditions have valid data and can be used in a where clause */\n if (empty($ca['field']) || empty($ca['value'])) {\n continue;\n //skip if no valid data found\n }\n\n /* If we got this far then that means we have adequate data for a where clause */\n if (is_array($betweenCondition)) { //check for a condition eligible for BETWEEN\n $firstValue = array_shift($betweenCondition);\n $secondValue = array_shift($betweenCondition);\n\n if (strlen($firstValue) == 0) {\n $firstValue = null;\n }\n\n if (strlen($secondValue) == 0) {\n $secondValue = null;\n }\n $betweenCondition = true;\n if (!strlen($firstValue) && !strlen($secondValue)) { //if both between values were\n // ommited, it's invalid\n continue;\n }\n } else {\n unset($firstValue);\n unset($secondValue);\n $betweenCondition = false;\n }\n\n if (isset($ca['explicit']) && $ca['explicit'] == 'true') :\n $conditions[$k] = $ca['field'] . ' ' . $ca['value']; elseif ($betweenCondition) : //generate valid SQL for a between condition\n $hasOrFields = false;\n if (strpos($ca['field'], 'OR=') !== false) {\n $impFields = explode('OR=',$ca['field']);\n $hasOrFields = true;\n }\n if (null !== $firstValue && null !== $secondValue) { //if both values were\n // entered, it's a between\n if ($hasOrFields == true) {\n $conditions[$k] = \"( \".trim($impFields[0]) . ' BETWEEN ' . \"'{$firstValue}'\" . ' AND ' . \"'{$secondValue}' OR \".trim($impFields[1]). ' BETWEEN ' . \"'{$firstValue}'\" . ' AND ' . \"'{$secondValue}' )\";\n }else{\n $conditions[$k] = $ca['field'] . ' BETWEEN ' . \"'{$firstValue}'\" . ' AND ' . \"'{$secondValue}'\\n\";\n }\n\n } else { //if only one value was entered, it's not a between\n if ($hasOrFields== true) {\n $conditions[$k] = \"(\".trim($impFields[0]) . ' = ' . \"'{$firstValue}'\".\" OR \".trim($impFields[1]) . ' = ' . \"'{$firstValue}'\".\")\";\n }else{\n $conditions[$k] = $ca['field'] . ' = ' . \"'{$firstValue}'\";\n }\n\n } else :\n if (is_array($ca['value'])) {\n //wrap in single quotes\n foreach ($ca['value'] as $value) {\n $values[] = \"'{$value}'\";\n }\n $conditions[$k] = $ca['field'] . ' IN(' . implode(',', $values) . ')';\n } elseif (strpos($ca['field'], 'MATCH=') !== false) {\n $field = substr($ca['field'], strpos($ca['field'], '=') + 1);\n $conditions[$k] = 'MATCH(' . $field . ') AGAINST(' . \"'{$ca['value']}' IN BOOLEAN MODE)\";\n } elseif (strpos($ca['field'], 'LIKE=') !== false) {\n $field = substr($ca['field'], strpos($ca['field'], '=') + 1);\n $conditions[$k] = \"{$field} LIKE '%{$ca['value']}%'\";\n } elseif (strpos($ca['value'], '!=') !== false) {\n $value = substr($ca['value'], strpos($ca['value'], '=') + 2);\n $conditions[$k] = \"{$ca['field']} != '{$value}'\";\n } elseif (strpos($ca['value'], '>') !== false) {\n $value = trim(substr($ca['value'], strpos($ca['value'], '>') + 1));\n $conditions[$k] = \"{$ca['field']} > '{$value}'\";\n } else {\n $conditions[$k] = $ca['field'] . ' = ' . \"'{$ca['value']}'\";\n }\n\n endif; //end generate SQL for between condition\n }\n\n return implode($conditions, ' AND ');\n\n }", "title": "" }, { "docid": "db9ee5d849378bfc1f39f5b1f8ca253f", "score": "0.47607157", "text": "function addFieldFilters( $arr_filter, $strict = FALSE ) {\n\n\t\tif($this->lms_editions_filter === true) {\n\n\t\t\t// filter for the editions selected =====================================\n\t\t\t$fvalue = (isset($_POST[$this->id]['edition_filter'])\n\t\t\t\t? (int)$_POST[$this->id]['edition_filter']\n\t\t\t\t: '' );\n\n\t\t\tif($fvalue != false) {\n\t\t\t\t$acl_man =& Docebo::user()->getAclManager();\n\t\t\t\t$members = $acl_man->getGroupAllUser($fvalue);\n\t\t\t\tif($members && !empty($members)) {\n\t\t\t\t\t$this->data->addCustomFilter('', \"idst IN (\".implode(',', $members).\") \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($this->show_simple_filter === true) {\n\n\t\t\t// filter for userid firstname e lastname , fulltext search ====================\n\t\t\t$fvalue = (isset($_POST[$this->id]['simple_fulltext_search'])\n\t\t\t\t? strip_tags(html_entity_decode($_POST[$this->id]['simple_fulltext_search']))\n\t\t\t\t: '' );\n\n\t\t\tif(trim($fvalue !== '')) {\n\n\t\t\t\t$this->data->addCustomFilter('', \" ( userid LIKE '%\".$fvalue.\"%' OR firstname LIKE '%\".$fvalue.\"%' OR lastname LIKE '%\".$fvalue.\"%' ) \");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\trequire_once($GLOBALS['where_framework'].'/modules/field/class.field.php');\n\t\t$field = new Field(0);\n\t\tforeach( $arr_filter as $fname => $fvalue ) {\n\t\t\tif(is_numeric($fname)) {\n\t\t\t\t$fname = \"cfield_\".$fname;\n\t\t\t}\n\t\t\tif( isset( $fvalue['value'] ) ) {\n\t\t\t\tif( isset( $fvalue['fieldname'] ) ) {\n\t\t\t\t\tif( $fvalue['field_type'] == 'upload' ) {\n\t\t\t\t\t\t$this->data->addFieldFilter( $fvalue['fieldname'], '', '<>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif( $fvalue['value'] == '' ) {\n\t\t\t\t\t\t\t$search_op = \" = \";\n\t\t\t\t\t\t\t$search_val = \"\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif( $strict ) {\n\t\t\t\t\t\t\t\t$search_op = \" LIKE \";\n\t\t\t\t\t\t\t\t$search_val = \"%\".$fvalue['value'].\"%\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$search_op = \" = \";\n\t\t\t\t\t\t\t\t$search_val = $fvalue['value'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->data->addFieldFilter( $fvalue['fieldname'], $search_val, $search_op);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif( $fvalue[FIELD_INFO_TYPE] == 'upload' ) {\n\t\t\t\t\t\t$this->data->addCustomFilter( \t\" LEFT JOIN \".$field->_getUserEntryTable().\" AS \".$fname\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" ON ( $fname.id_common = '\".(int)$fvalue[FIELD_INFO_ID].\"'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" AND $fname.id_user = idst ) \",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" ($fname.user_entry IS \".(($fvalue['value']=='true')?'NOT':'').\" NULL ) \" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif( $fvalue['value'] == '' )\n\t\t\t\t\t\t\t$where = \" ($fname.user_entry = '' OR $fname.user_entry IS NULL )\";\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif( $strict )\n\t\t\t\t\t\t\t\t$where = \" ($fname.user_entry = '\".$fvalue['value'].\"' ) \";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$where = \" ($fname.user_entry LIKE '%\".$fvalue['value'].\"%' ) \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->data->addCustomFilter( \t\" LEFT JOIN \".$field->_getUserEntryTable().\" AS \".$fname\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" ON ( $fname.id_common = '\".(int)$fvalue[FIELD_INFO_ID].\"'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" AND $fname.id_user = idst ) \",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$where );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8e84e914c8a08f083794d0a0090ac8d1", "score": "0.47552422", "text": "function criteria(&$query){\n $id = $this->input->post('id', true);\n $k = $this->input->post('k', true);\n $n = $this->input->post('n', true);\n $v1 = $this->input->post('v1', true);\n $v2 = $this->input->post('v2', true);\n if(!empty($id)){/*where like include: before(%pattern), after(pattern%) and both(%pattern%)*/\n $query = $query->like('id', $id, 'both');\n }\n if(!empty($k)){\n $query = $query->like('apply_key', $k, 'both');\n }\n if(!empty($n)){\n $query = $query->like('apply_name', $n, 'both');\n }\n if(!empty($v1)){\n $query = $query->like('apply_value', $v1, 'both');\n }\n if(!empty($v2)){\n $query = $query->like('apply_value2', $v2, 'both');\n }\n }", "title": "" }, { "docid": "c3ab9e6ae65548e3e95ad38b8aaf50b9", "score": "0.47359607", "text": "function _prepare_search_conditions($fields,$q,&$conditions,&$bind_ar){\n\t\tif(is_string($fields)){\n\t\t\t$fields = explode(\",\",$fields); // \"id,name\" -> array(\"id\",\"name\")\n\t\t}\n\t\tif(!isset($conditions)){ $conditions = array(); }\n\t\tif(!isset($bind_ar)){ $bind_ar = array(); }\n\n\t\t$q = trim($q);\n\t\tif(!$q){ return; }\n\n\t\t$unaccent_installed = $this->dbmole->selectInt(\"SELECT COUNT(*) FROM pg_extension WHERE extname=:extname\",array(\":extname\" => \"unaccent\"));\n\n\t\t$q = Translate::Lower($q);\n\t\t$fields = \"LOWER(COALESCE(''||\".join(\",'')||' '||COALESCE(''||\",$fields).\",''))\";\n\t\tif($unaccent_installed && Translate::CheckEncoding($q,\"ASCII\")){\n\t\t\t$fields = \"UNACCENT($fields)\";\n\t\t}\n\n\t\t($cond = FullTextSearchQueryLike::GetQuery($fields,$q,$bind_ar)) ||\n\t\t($cond = \"'invalid'='search_query'\"); // it causes that nothing will be found\n\n\t\t$conditions[] = $cond;\n\n\t\treturn $cond;\n\t}", "title": "" }, { "docid": "5b2a6fc262392077f3760a248f18765d", "score": "0.4735354", "text": "public function __construct(array $organization_Assignment_Restrictions = array())\n {\n $this\n ->setOrganization_Assignment_Restrictions($organization_Assignment_Restrictions);\n }", "title": "" }, { "docid": "baadad440a760cd55de98054df9dd3e6", "score": "0.4731909", "text": "public function getQueryCriteria(): array\n {\n return [\n 'created_after' => new DateValidator,\n 'created_before' => new DateValidator,\n 'id_greater_than' => new PositiveIntValidator,\n 'id_less_than' => new PositiveIntValidator,\n 'updated_before' => new DateValidator,\n 'updated_after' => new DateValidator,\n 'only_identified' => new BooleanValidator,\n 'prospect_ids' => new PositiveIntListValidator\n ];\n }", "title": "" }, { "docid": "61f20294a8687396fba81720667f6d5d", "score": "0.4729439", "text": "public function searchAll($input);", "title": "" }, { "docid": "4167da1830102d2054c0e6e4da293a13", "score": "0.47196043", "text": "function AdvancedSearchWhere() {\n\t\tglobal $Security, $CustomView1;\n\t\t$sWhere = \"\";\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->DetailNo, FALSE); // Field DetailNo\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->PatientID, FALSE); // Field PatientID\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->StudyDate, FALSE); // Field StudyDate\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->StudyTime, FALSE); // Field StudyTime\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->PatientName, FALSE); // Field PatientName\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->PatientSex, FALSE); // Field PatientSex\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->Modality, FALSE); // Field Modality\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->ProtocolName, FALSE); // Field ProtocolName\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->BodyPartExamined, FALSE); // Field BodyPartExamined\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->StudyID, FALSE); // Field StudyID\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->InstanceNumber, FALSE); // Field InstanceNumber\n\t\t$this->BuildSearchSql($sWhere, $CustomView1->Status, FALSE); // Field Status\n\n\t\t// Set up search parm\n\t\tif ($sWhere <> \"\") {\n\t\t\t$this->SetSearchParm($CustomView1->DetailNo); // Field DetailNo\n\t\t\t$this->SetSearchParm($CustomView1->PatientID); // Field PatientID\n\t\t\t$this->SetSearchParm($CustomView1->StudyDate); // Field StudyDate\n\t\t\t$this->SetSearchParm($CustomView1->StudyTime); // Field StudyTime\n\t\t\t$this->SetSearchParm($CustomView1->PatientName); // Field PatientName\n\t\t\t$this->SetSearchParm($CustomView1->PatientSex); // Field PatientSex\n\t\t\t$this->SetSearchParm($CustomView1->Modality); // Field Modality\n\t\t\t$this->SetSearchParm($CustomView1->ProtocolName); // Field ProtocolName\n\t\t\t$this->SetSearchParm($CustomView1->BodyPartExamined); // Field BodyPartExamined\n\t\t\t$this->SetSearchParm($CustomView1->StudyID); // Field StudyID\n\t\t\t$this->SetSearchParm($CustomView1->InstanceNumber); // Field InstanceNumber\n\t\t\t$this->SetSearchParm($CustomView1->Status); // Field Status\n\t\t}\n\t\treturn $sWhere;\n\t}", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.4718961", "text": "public function search();", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.4718961", "text": "public function search();", "title": "" }, { "docid": "1b265142d1d7671e4f87b3ae556dc85c", "score": "0.47148117", "text": "function flattenRestrictions( $limit ) {\n\t\tif( !is_array( $limit ) ) {\n\t\t\tthrow new MWException( 'Article::flattenRestrictions given non-array restriction set' );\n\t\t}\n\t\t$bits = array();\n\t\tksort( $limit );\n\t\tforeach( $limit as $action => $restrictions ) {\n\t\t\tif( $restrictions != '' ) {\n\t\t\t\t$bits[] = \"$action=$restrictions\";\n\t\t\t}\n\t\t}\n\t\treturn implode( ':', $bits );\n\t}", "title": "" }, { "docid": "fa179b07efc78fea0490d4506103fa94", "score": "0.47093278", "text": "function filtering($term)\n{\n $conjungtion = array(\"though\", \"although\", \"even though\", \"while\", \"if\", \"only if\",\n \"until\", \"provided that\", \"assuming that\", \"if\", \"only if\", \"unless\", \"until\", \"provided that\",\n \"assuming that\", \"even if\", \"in case\", \"lest\", \"than\", \"rather than\", \"whether\", \"as much as\",\n \"whereas\", \"after\", \"as long as\", \"as soon as\", \"before\", \"by the time\", \"now that\", \"once\", \"since\", \"till\",\n \"until\", \"when\", \"whenever\", \"while\", \"a\", \"of\", \"as\", \"are\", \"in\", \"is\", \"it's\");\n\n $i = 0;\n $paragraphs = array();\n foreach ($term as $sentences) {\n $paragraphs[$i] = array();\n $temp = $sentences;\n $j = 0;\n foreach ($temp as $item) {\n if (!in_array($item, $conjungtion)){\n $paragraphs[$i][$j] = $item;\n }\n $j++;\n }\n $i++;\n }\n\n return $paragraphs;\n}", "title": "" }, { "docid": "4a54ba20beb89cd7192264c4bc3a23f0", "score": "0.4698103", "text": "function _buildContentWhere()\n {\n $mainframe = JFactory::getApplication();\n $option = JRequest::getCMD('option');\n\n\t\t$filter_state = $mainframe->getUserStateFromRequest( $option.'.pub.filter_state', 'filter_state', '', 'word' );\n\t\t$filter = $mainframe->getUserStateFromRequest( $option.'.pub.filter', 'filter', '', 'int' );\n\t\t$search = $mainframe->getUserStateFromRequest( $option.'.pub.search', 'search', '', 'string' );\n\t\t$search = $this->_db->getEscaped( trim(JString::strtolower( $search ) ) );\n\n\t\t$where = array();\n\n\t\tif ($filter_state) {\n switch ($filter_state) {\n case 'P':\n $where[] = 'published = 1';\n break;\n\n case 'U':\n $where[] = 'published = 0';\n break;\n\n\t\t\t\tdefault:\n //anything else - no filter\n }\n }\n\n\t\tif ($search && $filter == 1) {\n\t\t\t$where[] = ' LOWER(title) LIKE \\'%'.$search.'%\\' ';\n }\n\n if ($search && $filter == 2) {\n $where[] = ' LOWER(description) LIKE \\'%'.$search.'%\\' ';\n }\n\n $where = ( count( $where )) ? ' WHERE ' . implode( ' AND ', $where ) : '' ;\n\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "04b43b819387a7cbcdd1edb676eb77b7", "score": "0.46967137", "text": "function CreateCascatingSearchWhere($data)\n {\n $where=array();\n foreach ($this->CascadingSearchVars[ $data ][ \"Where\" ] as $key)\n {\n $value=$this->MyMod_Search_CGI_Value($key);\n if (!empty($value))\n {\n $where[ $key ]=$value;\n }\n }\n\n return $where;\n }", "title": "" }, { "docid": "75d8ed3f9afc76c3e6c88ffaa9f60d0a", "score": "0.4690791", "text": "function makeSQL(){\n\t\t\t$search = $this->getSearchString();\n\t\t\t$fields = $this->getFields();\n\t\t\t\n\t\t\tif($search!=\"\"){\n\t\t\t\t//build array from input..\n\t\t\t\t$params = split(\" \", $search);\n\t\t\t\t$InQuotedString = 0;\n \n\t\t\t\t//now, build tokens from array (watch the \"\")\n\t\t\t\t$tokNum = 0;\n\t\t\t\t$tokens = array();\n \n\t\t\t\t$tokens[$tokNum] = \"\";\n\t\t\t\tfor($i=0;$i<count($params);$i++){\n\t\t\t\t\tif(isset($tokens[$tokNum])){\n\t\t\t\t\t\t$tokens[$tokNum] = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$param = $params[$i];\n\t\t\t\t\tif(ereg(\"^\\\"\",$param) || ereg(\"^[+-]\\\"\",$param)){\n \t\t$InQuotedString = 1;\n \t\t}\n \n\t\t\t\t\tif($InQuotedString==1){\n\t\t\t\t\t\t$tokens[$tokNum] .= ereg_replace(\"\\\"\",\"\",$param) . \" \";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tokens[$tokNum++] = $param;\n\t\t\t\t\t}\n \n\t\t\t\t\tif(ereg(\"\\\"$\", $param)){\n\t\t\t\t\t\t$InQuotedString = 0;\n\t\t\t\t\t\t$tokens[$tokNum] = chop($tokens[$tokNum]);\n\t\t\t\t\t\t$tokNum++;\n\t\t\t\t\t} \n\t\t\t\t}//end for \n \n\t\t\t\t//build SQL\n\t\t\t\t$SQL = \"\";\t\t\t\t\t\t\t\t\n\n\t\t\t\tfor($i=0; $i<count($tokens); $i++){\n\t\t\t\t\tfor($x=0; $x<count($fields); $x++){\n\t\t\t\t\t\t$token = ereg_replace(\" $\", \"\", $tokens[$i]);\n\t\t\t\t\t\tif(ereg(\"^\\\\+\",$token)){\n\t\t\t\t\t\t\t$token = ereg_replace(\"^\\\\+\",\"\",$token);\n\t\t\t\t\t\t\t$SQL .= \"$fields[$x] like '%$token%'\";\n\t\t\t\t\t\t\tif($x<count($fields)-1){\n\t\t\t\t\t\t\t\t$SQL .= \" OR \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}elseif(ereg(\"^\\\\-\",$token)){\n\t\t\t\t\t\t\t$token = ereg_replace(\"^\\\\-\",\"\",$token);\n\t\t\t\t\t\t\t$SQL .= \"$fields[$x] NOT like '%$token%'\";\n\t\t\t\t\t\t\tif($x<count($fields)-1){\n\t\t\t\t\t\t\t\t$SQL .= \" AND \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$SQL .= \"$fields[$x] like '%$token%'\";\n\t\t\t\t\t\t\tif($x<count($fields)-1){\n\t\t\t\t\t\t\t\t$SQL .= \" OR \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n \t\t}//end inner for\n \n\t\t\t\t\tif($i<count($tokens)-1){\n\t\t\t\t\t\t$SQL .= \") AND (\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$SQL .= \")\";\n\t\t\t\t\t}\n \t\t}//end outer for\n\t\t\t\t\n\t\t\t\t//check constraints\n\t\t\t\tif($this->getConstraints()){\n\t\t\t\t\t$SQL .= \" AND \" . $this->getConstraints(1);\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//check groups\n\t\t\t\tif($this->getGroup()){\n\t\t\t\t\t$SQL .= \" GROUP BY \" . $this->getGroup();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check order by\n\t\t\t\tif($this->getOrder()){\n\t\t\t\t\t$SQL .= \" ORDER BY \" . $this->getOrder(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check limits\n\t\t\t\tif($this->getLimitEnd()){\n\t\t\t\t\t$SQL .= \" LIMIT \" . $this->getLimitStart() . \", \" . $this->getLimitEnd();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$SQL = \"SELECT \" . $this->getSelect(1) . \" FROM \" . $this->getTable() . \" WHERE (\" . $SQL;\n\t\t\t\t\n\t\t\t\t$this->sql = $SQL;\n\t\t\t\treturn $SQL;\n\t\t\t\t\n \t\t}else{\n\t\t\t\t//check constraints\n\t\t\t\tif($this->getConstraints()){\n\t\t\t\t\t$SQL .= \" WHERE \" . $this->getConstraints(1);\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//check groups\n\t\t\t\tif($this->getGroup()){\n\t\t\t\t\t$SQL .= \" GROUP BY \" . $this->getGroup();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check order by\n\t\t\t\tif($this->getOrder()){\n\t\t\t\t\t$SQL .= \" ORDER BY \" . $this->getOrder(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check limits\n\t\t\t\tif($this->getLimitEnd()){\n\t\t\t\t\t$SQL .= \" LIMIT \" . $this->getLimitStart() . \", \" . $this->getLimitEnd();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$SQL = \"SELECT \" . $this->getSelect(1) . \" FROM \" . $this->getTable() . $SQL;\n\t\t\t\t$this->sql = $SQL;\n\t\t\t\treturn $SQL;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "aaef907d489507d3bd7e509cbc491f19", "score": "0.4690627", "text": "public function setRestriction($restriction)\n {\n $this->restriction = $restriction;\n return $this;\n }", "title": "" }, { "docid": "322ac287faead58147a8eced090e2924", "score": "0.46811727", "text": "public function buildSearchArray($queryParameters)\n {\n $allowedStringCriteria = array('name', 'dateFrom', 'dateTo');\n $allowedArrayCriteria = array('roots', 'types');\n $criteria = array();\n\n foreach ($queryParameters as $parameter => $value) {\n if (in_array($parameter, $allowedStringCriteria) && is_string($value)) {\n $criteria[$parameter] = $value;\n } elseif (in_array($parameter, $allowedArrayCriteria) && is_array($value)) {\n $criteria[$parameter] = $value;\n }\n }\n\n return $criteria;\n }", "title": "" }, { "docid": "6b1564fc7569296253d9e274923c7c1a", "score": "0.46659097", "text": "public function search_to_sql()\n {\n $search = [];\n $valid_opers = ['=', 'in'];\n $implode_type = 'and';\n //$this->log('Search Terms: '.json_encode($this->search_terms), __LINE__, __FILE__, 'debug');\n if (count($this->search_terms) > 0) {\n if (!is_array($this->search_terms[0])) {\n $this->search_terms = [$this->search_terms];\n }\n foreach ($this->search_terms as $search_term) {\n //$this->log(\"Processing search \" . json_encode($search_term), __LINE__, __FILE__, 'debug');\n list($field, $oper, $value) = $search_term;\n $found = false;\n foreach ($this->tables as $table => $fields) {\n if (isset($fields[$field])) {\n $found = true;\n }\n }\n if ($found == false && $field == '') {\n //$this->log(\"Searching All Fields\", __LINE__, __FILE__);\n foreach ($this->tables as $table => $fields) {\n foreach ($fields as $field_name => $field_data) {\n if (in_array($field_name, $this->fields)) {\n $search[] = $this->json_search_tosql($table.'.'.$field_name, $oper, $value);\n }\n }\n }\n $implode_type = 'or';\n } elseif ($found == false && !in_array($field, $this->fields)) {\n $this->log(\"Invalid Search Field {$field}\", __LINE__, __FILE__, 'warning');\n } elseif (!in_array($oper, $valid_opers)) {\n $this->log(\"Invalid Search Operator {$oper}\", __LINE__, __FILE__, 'warning');\n } else {\n $search[] = $this->json_search_tosql($field, $oper, $value);\n }\n }\n }\n if ($implode_type == 'and') {\n $search = implode(' and ', $search);\n } else {\n $search = '('.implode(' or ', $search).')';\n }\n //$this->log(\"search_to_sql() got {$search}\", __LINE__, __FILE__, 'debug');\n return $search;\n }", "title": "" }, { "docid": "0c68bbb00e3bdba2b4e0b8f363d3628e", "score": "0.46606714", "text": "public function generateQueryArray()\n {\n return [\n 'query' => [\n 'dis_max' => [\n 'queries' => [\n [\n 'match' => ['name.exact_match' => $this->getOriginalSearchTerm()],\n ],\n [\n 'match' => ['name_filtered.exact_match' => $this->getSearchTerm()],\n ],\n ],\n ],\n ],\n 'sort' => $this->prepareSortOrder(),\n ];\n }", "title": "" }, { "docid": "ba3a979c720efc545856fa2eed717762", "score": "0.46589065", "text": "abstract protected function _constraints();", "title": "" }, { "docid": "36ac7f19edd70f309219f410c132de5a", "score": "0.46522257", "text": "public function search(array $parameters = []);", "title": "" }, { "docid": "2b0cefa6934dce0706a8f9541c7be307", "score": "0.46509913", "text": "public function whereSearch()\n {\n\n $conf = $this->pObj->conf;\n $mode = $this->pObj->piVar_mode;\n $view = $this->pObj->view;\n\n $viewWiDot = $view . '.';\n\n // Query with OR and AND\n $str_whereOr = false;\n $arr_whereOr = array();\n // Query with AND NOT LIKE\n $str_whereNot = false;\n $arr_whereNot = array();\n\n\n\n //////////////////////////////////////////////////////////////////////////\n //\n // RETURN in case of no swords or no search fields\n\n if ( !($this->pObj->arr_swordPhrases && $this->pObj->csvSearch) )\n {\n return false;\n }\n // RETURN in case of no swords or no search fields\n //////////////////////////////////////////////////////////////////////////\n //\n // DRS - Development Reporting System\n\n if ( $this->pObj->b_drs_search )\n {\n t3lib_div::devlog( '[INFO/SEARCH] Search fields:<br />' . $this->pObj->csvSearch, $this->pObj->extKey, 0 );\n t3lib_div::devlog( '[HELP/SEARCH] Please configure: views.list.' . $mode . '.search', $this->pObj->extKey, 1 );\n }\n // DRS - Development Reporting System\n //////////////////////////////////////////////////////////////////////////\n //\n // Char for Wildcard\n\n $chr_wildcard = $this->pObj->str_searchWildcardCharManual;\n // Char for Wildcard\n //////////////////////////////////////////////////////////////////////////\n //\n // andWhere AND and OR\n\n $arrSearchFields = explode( ',', $this->pObj->csvSearch );\n $int_sword = 0;\n foreach ( $this->pObj->arr_swordPhrases[ 'or' ] as $arr_swords_and )\n {\n // Suggestion #7730\n // The user has to add a wildcard\n if ( $this->pObj->bool_searchWildcardsManual )\n {\n foreach ( ( array ) $arr_swords_and as $key => $value )\n {\n // First char of search word isn't a wildcard\n $int_firstChar = 0;\n if ( $value[ $int_firstChar ] != $chr_wildcard )\n {\n $value = '[[:<:]]' . $value;\n $arr_swords_and[ $key ] = $value;\n }\n // First char of search word isn't a wildcard\n // First char of search word is a wildcard\n if ( $value[ $int_firstChar ] == $chr_wildcard )\n {\n $value = substr( $value, 1, strlen( $value ) - 1 );\n $arr_swords_and[ $key ] = $value;\n }\n // First char of search word is a wildcard\n // Last char of search word isn't a wildcard\n $int_lastChar = strlen( $value ) - 1;\n if ( $value[ $int_lastChar ] != $chr_wildcard )\n {\n $value = $value . '[[:>:]]';\n $arr_swords_and[ $key ] = $value;\n }\n // Last char of search word isn't a wildcard\n // Last char of search word is a wildcard\n if ( $value[ $int_lastChar ] == $chr_wildcard )\n {\n $value = substr( $value, 0, -1 );\n $arr_swords_and[ $key ] = $value;\n }\n // Last char of search word is a wildcard\n }\n }\n // The user has to add a wildcard\n // Suggestion #7730\n\n foreach ( $arrSearchFields as $arrSearchField )\n {\n list($str_before_as, $str_behind_as) = explode( ' AS ', $arrSearchField );\n list($table, $field) = explode( '.', $str_before_as );\n $table = trim( $table );\n $field = trim( $field );\n\n // Suggestion #7730\n // Wildcard are used by default\n if ( !$this->pObj->bool_searchWildcardsManual )\n {\n $str_wrap_sword = '%\\' AND ' . $table . '.' . $field . ' LIKE \\'%';\n $str_whereTableField = implode( $str_wrap_sword, $arr_swords_and );\n $str_whereTableField = $table . '.' . $field . ' LIKE \\'%' . $str_whereTableField . '%\\'';\n }\n // Wildcard are used by default\n // The user has to add a wildcard\n if ( $this->pObj->bool_searchWildcardsManual )\n {\n $str_wrap_sword = '\\') AND (' . $table . '.' . $field . ' REGEXP \\'';\n $str_whereTableField = implode( $str_wrap_sword, $arr_swords_and );\n $str_whereTableField = '(' . $table . '.' . $field . ' REGEXP \\'' . $str_whereTableField . '\\')';\n }\n // The user has to add a wildcard\n // Suggestion #7730\n\n if ( count( $arr_swords_and ) > 1 )\n {\n $str_whereTableField = '(' . $str_whereTableField . ')';\n }\n $arr_whereSword[ $int_sword ][] = $str_whereTableField;\n }\n $int_sword++;\n }\n foreach ( $arr_whereSword as $key_sword => $arr_fields )\n {\n $str_or = implode( ' OR ', $arr_fields );\n $arr_or[] = '( ' . $str_or . ' )';\n }\n $str_whereOr = implode( ' OR ', $arr_or );\n $str_whereOr = ' AND ( ' . $str_whereOr . ' )';\n // andWhere AND and OR\n //////////////////////////////////////////////////////////////////////////\n //\n // andWhere NOT\n\n if ( count( $this->pObj->arr_swordPhrases[ 'not' ] ) > 0 )\n {\n foreach ( $arrSearchFields as $arrSearchField )\n {\n list($str_before_as, $str_behind_as) = explode( ' AS ', $arrSearchField );\n list($table, $field) = explode( '.', $str_before_as );\n $table = trim( $table );\n $field = trim( $field );\n\n // Suggestion #7730\n // Wildcard are used by default\n if ( !$this->pObj->bool_searchWildcardsManual )\n {\n $str_wrap_sword = '%\\' AND ' . $table . '.' . $field . ' NOT LIKE \\'%';\n $str_whereNot = implode( $str_wrap_sword, $this->pObj->arr_swordPhrases[ 'not' ] );\n $str_whereNot = $table . '.' . $field . ' NOT LIKE \\'%' . $str_whereNot . '%\\'';\n }\n // Wildcard are used by default\n // The user has to add a wildcard\n if ( $this->pObj->bool_searchWildcardsManual )\n {\n $str_wrap_sword = '\\') AND (' . $table . '.' . $field . ' NOT REGEXP \\'';\n $str_whereNot = implode( $str_wrap_sword, $this->pObj->arr_swordPhrases[ 'not' ] );\n\n // First char of search word isn't a wildcard\n $int_firstChar = 0;\n if ( $str_whereNot[ $int_firstChar ] != $chr_wildcard )\n {\n $str_whereNot = '[[:<:]]' . $str_whereNot;\n }\n // First char of search word isn't a wildcard\n // First char of search word is a wildcard\n if ( $str_whereNot[ $int_firstChar ] == $chr_wildcard )\n {\n $str_whereNot = substr( $str_whereNot, 1, strlen( $str_whereNot ) - 1 );\n }\n // First char of search word is a wildcard\n // Last char of search word isn't a wildcard\n $int_lastChar = strlen( $str_whereNot ) - 1;\n if ( $str_whereNot[ $int_lastChar ] != $chr_wildcard )\n {\n $str_whereNot = $str_whereNot . '[[:>:]]';\n }\n // Last char of search word isn't a wildcard\n // Last char of search word is a wildcard\n if ( $str_whereNot[ $int_lastChar ] == $chr_wildcard )\n {\n $str_whereNot = substr( $str_whereNot, 0, -1 );\n }\n // Last char of search word is a wildcard\n $str_whereNot = '(' . $table . '.' . $field . ' NOT REGEXP \\'' . $str_whereNot . '\\')';\n }\n // The user has to add a wildcard\n // Suggestion #7730\n\n $arr_whereNot[] = $str_whereNot;\n }\n if ( count( $arr_whereNot ) > 0 )\n {\n $str_whereNot = implode( ' AND ', $arr_whereNot );\n $str_whereNot = ' AND ' . $str_whereNot;\n }\n }\n // andWhere NOT\n //////////////////////////////////////////////////////////////////////////\n //\n // RETURN andWhere\n\n $str_return = $str_whereOr . $str_whereNot;\n\n\n\n //////////////////////////////////////////////////////////////////////////\n //\n // DRS - Development Reporting System\n\n if ( $this->pObj->b_drs_search )\n {\n t3lib_div::devlog( '[INFO/SEARCH] andWhere clause:<br />' . $str_return, $this->pObj->extKey, 0 );\n // \" AND ( ( tt_news.title LIKE '%Browser%' OR tt_news_cat.title LIKE '%Browser%' ) AND ( tt_news.title LIKE '%Erweiterung%' OR tt_news_cat.title LIKE '%Erweiterung%' ) )\"\n }\n // DRS - Development Reporting System\n\n return $str_return;\n // RETURN andWhere\n }", "title": "" }, { "docid": "488cfa83ff56cd882db08c15a6243352", "score": "0.46459648", "text": "public function filterSearch(Request $request)\n {\n // dd('comm',$request->all());\n $obj = (new Sgrant)->newQuery();\n \n // if ($request->has('district_id')) {\n // $districts = $request->get('district_id');\n \n // if(count($districts) != 0 ){\n \n // $obj->where(function ($q) use ($districts) {\n // foreach ($districts as $key => $district) {\n // // $q->orWhere(\"profiles.language\", \"LIKE\", \"%\" . $language . \"%\");\n // $q->orWhere(\"projects.district_id\", $district);\n // $q->orWhere(\"projects.district_id\", \"LIKE\", $district . \",%\");\n // $q->orWhere(\"projects.district_id\", \"LIKE\", \"%,\" . $district);\n // $q->orWhere(\"projects.district_id\", \"LIKE\", \"%, \" . $district);\n // $q->orWhere(\"projects.district_id\", \"LIKE\", \"%,\" . $district . \",%\");\n // $q->orWhere(\"projects.district_id\", \"LIKE\", \"%, \" . $district . \",%\");\n // }\n // });\n \n // }\n // }\n \n \n if ($request->has('project_code')) {\n $project_code = $request->get('project_code');\n $obj->where('project_id',$project_code);\n }\n\n if ($request->has('group_in')) {\n $group_in = $request->get('group_in');\n $obj->where('group_in',$group_in);\n }\n\n // if ($request->has('type')) {\n // $type = $request->get('type');\n // $obj->where('type',$type);\n // }\n\n if ($request->has('quarter')) {\n $quarter = $request->get('quarter');\n $obj->where('quarter', $quarter);\n }\n\n if ($request->has('quarter_year')) {\n $quarter_year = $request->get('quarter_year');\n // $obj->where('quarter_year', '>' , $quarter_year);\n $obj->where('quarter_year', $quarter_year);\n }\n\n $projects = $obj->get();\n \n // dd($projects);\n $html =' ';\n // $baseurl = \"http://192.168.0.155/sfcgdbms/public/sgrant/\";\n // $baseurl = \"http://localhost/sfcgdbms/public/sgrant/\";\n\n $root_url = url('/');\n $baseurl = $root_url.'/sgrant/';\n\n\n \n $project_code_list = Project::pluck('project_code', 'id');\n \n foreach($projects as $key => $project){\n\n $key =$key+1;\n \n //starting of district\n // if($project->district_id != ''){\n // $dist_exp = explode(',', $project->district_id); \n // $dis_array = array();\n\n // foreach($dist_exp as $dist)\n // {\n // $distname = \\DB::table('districts')->select('district_name')->where('id',$dist)->first();\n // array_push($dis_array, $distname->district_name); \n // }\n\n // $districts = implode(',<br>', $dis_array);\n // }\n //end of districts\n\n //starting of beneficiairies\n if($project->benef_id != ''){\n $benef_exp = explode(',', $project->benef_id);\n $benef_array = array();\n \n foreach($benef_exp as $dist) {\n $benefname = \\DB::table('benef')->select('name')->where('id',$dist)->first();\n\n array_push($benef_array, $benefname->name); \n }\n \n $benefs = implode(', ', $benef_array); \n // dd($benefs);\n }\n\n\n // $partners_exp = explode(',', $project->partners); \n // $part_array = array();\n\n // foreach($partners_exp as $part)\n // {\n // $part_name = \\DB::table('ngo')->select('name')->where('id',$part)->first();\n // array_push($part_array, $part_name->name); \n // }\n\n // $partners = implode(',<br>', $part_array);\n //end of partners\n\n // dd($project->quarter); \n\n if($project->quarter == 1){\n $quarter_n_year = \"1<sup>st</sup> Quarter, $project->quarter_year\" ; }\n if($project->quarter == 2) {\n $quarter_n_year = \"2<sup>nd</sup> Quarter, $project->quarter_year \"; }\n if($project->quarter == 3){\n $quarter_n_year = \"3<sup>rd</sup> Quarter, $project->quarter_year\"; }\n if($project->quarter == 4){\n $quarter_n_year = \"4<sup>th</sup> Quarter, $project->quarter_year \"; }\n \n //theme \n \n // if($project->theme == 'education'){\n // $theme ='Education'; }\n // if($project->theme == 'gender'){\n // $theme ='Gender base'; } \n // if($project->theme == 'violence') {\n // $theme ='Violence'; } \n\n // dd($project); \n // dd($quarter_n_year);\n\n // $date = $project->signed_date; //signed date <th>Signed Date</th>\n // $time = strtotime($date); //signed date <td>'. date(' F jS, Y',$time) .'</td>\n\n // case registered date\n // $reg_date = $project->case_registered_date;\n // $care_reg_date = strtotime($reg_date);\n\n $pro_date = $project->production_date;\n $prod_date = strtotime($pro_date);\n\n foreach($project_code_list as $id=>$pro_c){\n // dd($id, $project_code->project_id);\n if($id == $project->project_id) { \n \n // dd($project_code->project_code, $project_code->project_id);\n $projectcode = $pro_c;\n }\n }\n\n\n $html .= '<tr>\n <td>'. $key .'</td>\n <td>'. $project->group_in .'</td>\n <td>'. $benefs .'</td>\n <td>'. $projectcode .'</td>\n <td>'. $project->amount .'</td>\n <td>'. $project->n_benef .'</td>\n <td>'. $project->n_project .'</td>\n <td>'. $quarter_n_year .'</td>\n <td>'. '<a href=\"'. $baseurl . $project->id.'/edit\" class=\"action-btns\"> \n <span class=\"glyphicon glyphicon-pencil\"></span>\n </a>\n <form method=\"POST\" action=\"'. $baseurl . $project->id.'\">\n <input name=\"_method\" type=\"hidden\" value=\"DELETE\">\n <input name=\"_token\" type=\"hidden\" value=\"'.$request->get('_token').'\">\n <a href=\"javascript:void(0);\" class=\"action-btns submit\">\n <span class=\"glyphicon glyphicon-trash\"></span>\n </a>\n </form>\n </td>\n </tr>';\n }\n\n $table_starting = '<table class=\"table table-striped table-bordered datatbl_new\">\n <thead>\n <tr>\n <th>ID</th>\n <th>Group or Individual</th>\n <th>Benefecieries </th>\n <th>Project Code</th>\n <th>Amount</th>\n <th>No. of Beneficiaries</th>\n <th>Nature of project</th> \n <th>Quarter & Year</th> \n <th>Action</th>\n </tr>\n </thead>\n <tbody>';\n $table_end = '</tbody><table>';\n\n \n\n $data['html'] = $table_starting. $html. $table_end;\n \n $count = strlen($data['html']);\n\n if($count<5){\n \n $data['html'] = $table_starting. '<tr> <td colspan=\"9\"> No Data Available</td><tr>'. $table_end; \n }\n \n return $data;\n }", "title": "" }, { "docid": "1b3ca8febca7d564f664de9cc716c0b2", "score": "0.46430367", "text": "function local_questionbanktagfilter_get_question_bank_search_conditions($caller)\n{\n return array(new local_questionbanktagfilter_get_question_bank_search_condition($caller));\n}", "title": "" }, { "docid": "06f89ae2b7038dc7a88074d90fe8ba93", "score": "0.46382618", "text": "private function buscapropiedad($array,$param,$search){\n ///param es la relacion a buscar por ejemplo usuarios.roles \n ///seaarch es que buscamos en ese ejemplo se buscaria admin en usarios.roles puede ser un permiso en userios.permisos\n $nuevoarray=[];\n for($a=0;$a<count($array);$a++){\n \n for($b=0;$b<count($array[$a]->$param);$b++){\n if($array[$a]->$param[$b]['name']==$search){\n array_push($nuevoarray,$array[$a]);\n }\n }\n }\n return $nuevoarray;\n}", "title": "" }, { "docid": "d9957f1d0a4482150fc385f9622fc739", "score": "0.46302095", "text": "public function search(array $data)\n {\n }", "title": "" }, { "docid": "6881dc843a416cd67da54708c2de7f66", "score": "0.46258956", "text": "public function rules_get_review($request_arr = array())\n {\n // print_r($request_arr); exit;\n if(true == empty($request_arr['page_name'])){\n $valid_arr = array( \n \"page_name\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"page_name_required\",\n )\n )\n );\n\n }elseif(\"home\" == strtolower($request_arr['page_name'])){\n $valid_arr = array( \n \"page_number\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"page_number_required\",\n )\n )\n );\n }elseif(\"search\" == strtolower($request_arr['page_name'])){\n $valid_arr = array( \n \"first_name\" => array(\n array(\n \"rule\" => \"minlength\",\n \"value\" => 1,\n \"message\" => \"first_name_minlength\",\n ),\n array(\n \"rule\" => \"maxlength\",\n \"value\" => 80,\n \"message\" => \"first_name_maxlength\",\n )\n ),\n \"last_name\" => array(\n array(\n \"rule\" => \"minlength\",\n \"value\" => 1,\n \"message\" => \"last_name_minlength\",\n ),\n array(\n \"rule\" => \"maxlength\",\n \"value\" => 80,\n \"message\" => \"last_name_maxlength\",\n )\n ),\n\n \"mobile_number\" => array(\n array(\n \"rule\" => \"number\",\n \"value\" => TRUE,\n \"message\" => \"mobile_number_number\",\n ),\n array(\n \"rule\" => \"minlength\",\n \"value\" => 10,\n \"message\" => \"mobile_number_minlength\",\n ),\n array(\n \"rule\" => \"maxlength\",\n \"value\" => 13,\n \"message\" => \"mobile_number_maxlength\",\n )\n ),\n \"zipcode\" => array(\n array(\n \"rule\" => \"minlength\",\n \"value\" => 5,\n \"message\" => \"zipcode_minlength\",\n ),\n array(\n \"rule\" => \"maxlength\",\n \"value\" => 10,\n \"message\" => \"zipcode_maxlength\",\n )\n ),\n \"city\" => array(\n array(\n \"rule\" => \"regex\",\n \"value\" => \"/^[a-zA-Z]([\\w -]*[a-zA-Z])?$/\",\n \"message\" => \"city_character_only\",\n )\n )\n );\n }elseif(\"consumer_listing\" == strtolower($request_arr['page_name']) && (true == empty($request_arr['mobile_number']) || true == empty($request_arr['email_address']))){\n $valid_arr = array( \n \"consumer_full_name\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"consumer_full_name_required\",\n )\n ),\n 'page_number'=>array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"page_number_required\",\n )\n ),\n \"email_address\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"email_address_required\",\n )\n )\n );\n }elseif(\"my_review\" == strtolower($request_arr['page_name']))\n {\n $valid_arr = array( \n \"reviewer_id\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"reviewer_id_required\",\n )\n )\n );\n\n }elseif(\"review_for_me\" == strtolower($request_arr['page_name']) && (true == empty($request_arr['mobile_number']) || true == empty($request_arr['email_address']))){\n $valid_arr = array( \n \"user_full_name\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"user_full_name_required\",\n )\n ),\n 'page_number'=>array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"page_number_required\",\n )\n ),\n \"email_address\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"email_address_required\",\n )\n )\n );\n }elseif(\"new_user_listing\" == strtolower($request_arr['page_name'])){\n $valid_arr = array(\n \"email_address\" => array(\n array(\n \"rule\" => \"required\",\n \"value\" => TRUE,\n \"message\" => \"email_address_required\",\n )\n )\n );\n }\n\n \n $valid_res = $this->wsresponse->validateInputParams($valid_arr, $request_arr, \"get_review\");\n\n return $valid_res;\n }", "title": "" }, { "docid": "49378df15145a2342f7f477426b883bd", "score": "0.4620208", "text": "public function createSearch($query);", "title": "" }, { "docid": "80aeea2db89031d41a24e502c572747d", "score": "0.460507", "text": "public function generalsearch($value=array(),$limitst=null,$limitend=null){\n //$this->_db->real_escape_string($id)\n $add='';\n $add.=(!empty($value['category']))? \" and category_c like('%\".$value['category'].\"%')\":'';\n $add.=(!empty($value['model']))? \" and type_c= \".(int)$value['model']:''; \n $add.=(!empty($value['pricemin']))? \" and price_c >= \".(int)$value['pricemin']:'';\n $add.=(!empty($value['pricemax']))? \" and price_c <= \".(int)$value['pricemax']:'';\n $add.=(!empty($value['yearsemin']))? \" and year_c >= \".(int)$value['yearsemin']:'';\n $add.=(!empty($value['yearsemax']))? \" and year_c <= \".(int)$value['yearsemax']:'';\n $add.=(!empty($value['desemin']))? \" and odometer_c >= \".(int)$value['desemin']:'';\n $add.=(!empty($value['desemax']))? \" and odometer_c <= \".(int)$value['desemax']:'';\n $add.=(!empty($value['country']))? \" and Country_c = \".(int)$value['country']:'';\n $add.=(!empty($value['city']))? \" and city_c = \".(int)$value['city']:'';\n $add.=(!empty($value['status']))? \" and status_c = \".(int)$value['status']:'';\n\n $limit=(isset($limitend) and $limitend!='')?\" limit $limitst $limitend \":'';\n $sql=$this->_db->query(\"select * from cars where id_c!='' $add order by id_c desc $limit\");\n if($sql){\n $rows=array();\n\n while($array=$sql->fetch_array()){\n $rows[]=$array;\n }\n return $rows;\n }\n return false;\n }", "title": "" }, { "docid": "46a2e35b7c78ad763256e894571e400c", "score": "0.4604228", "text": "public function search(Request $request){\n // $checkStr = trim($request->get('checkStr'));\n $fieldStr = trim($request->get('fieldStr'));\n $type = trim($request->get('type'));\n $fieldArr = json_decode($fieldStr, true);\n // dump($fieldArr, $type, ($type == 1) && empty($fieldArr));die;\n if (($type == 0) && empty($fieldArr)) {\n return redirect()->action('ContactController@data_search');\n }\n if (($type == 1) && empty($fieldArr)) {\n return redirect()->action('UserController@admin_search');\n }\n $handle = DB::table('contact');\n $handle2 = DB::table('organisation');\n $queryOrg = false;\n $queryCon = false;\n $queryall = false;\n foreach ($fieldArr as $key=>$val) {\n if (isset($val['key']) && !empty($val['key'])) {\n $condition = $val['condition'];\n $entry = $val['entry'];\n $noentry = $val['noentry'];\n \n $field = $val['key'];\n if (in_array($val['key'], \n ['orgType', 'organisation', 'schoollowerage', 'schoolhigherage', 'schoolURN'])) {\n if($val['key'] == 'organisation') {\n $field = 'name';\n }\n $this->setWhere($field, $entry, $noentry, $condition, $handle2);\n // dump($val['key']);\n $queryOrg = true;\n } elseif (in_array($val['key'], \n ['professionalInterest', 'country', 'region', 'notes'])) {\n $this->setWhere($field, $entry, $noentry, $condition, $handle);\n $this->setWhere($field, $entry, $noentry, $condition, $handle2);\n // dump($val['key']);\n $queryall = true;\n } else {\n $this->setWhere($field, $entry, $noentry, $condition, $handle);\n // dump($val['key']);\n $queryCon = true;\n }\n }\n }\n $results = $results2 = [];\n if ($queryall) {\n $results = $handle->paginate(10);\n $results2 = $handle2->paginate(10);\n } \n if ($queryOrg) {\n $results2 = $handle2->paginate(10);\n } \n if ($queryCon) {\n $results = $handle->paginate(10);\n }\n\n // dump($results, $results2,!empty($results),!empty($results2));die;\n if (!empty($results)) {\n return view('searchreturn',[\n 'fieldStr' => $fieldStr,\n 'fieldArr' => $fieldArr,\n 'results' => $results,\n 'name' =>$this->getUserName()\n ]);\n } \n\n if (!empty($results2)) {\n return view('searchreturn_org',[\n 'fieldStr' => $fieldStr,\n 'fieldArr' => $fieldArr,\n 'results2' => $results2,\n 'name' =>$this->getUserName()\n ]);\n } \n \n }", "title": "" }, { "docid": "27d65c24726808ba2809e31dbcd5a443", "score": "0.46032906", "text": "public function poi_search($conditions=null);", "title": "" }, { "docid": "5f5a4eaf4be49ce8aaa5400199642d1d", "score": "0.4596727", "text": "function wffaq_search($queryarray, $andor, $limit, $offset, $userid)\r\n{\r\n\tglobal $xoopsDB;\r\n\t$ret = array();\r\n\tif ( $userid != 0 ) {\r\n\t\treturn $ret;\r\n\t}\r\n\t$sql = \"SELECT topicID, question, answer, uid, datesub FROM \".$xoopsDB->prefix(\"faqtopics\").\" WHERE submit = 1 \";\r\n\t// because count() returns 1 even if a supplied variable\r\n\t// is not an array, we must check if $querryarray is really an array\r\n\t$count = count($queryarray);\r\n\tif ( $count > 0 && is_array($queryarray) ) {\r\n\t\t$sql .= \"AND ((question LIKE '%$queryarray[0]%' OR answer LIKE '%$queryarray[0]%')\";\r\n\t\tfor ( $i = 1; $i < $count; $i++ ) {\r\n\t\t\t$sql .= \" $andor \";\r\n\t\t\t$sql .= \"(question LIKE '%$queryarray[$i]%' OR answer LIKE '%$queryarray[$i]%')\";\r\n\t\t}\r\n\t\t$sql .= \") \";\r\n\t}\r\n\t$sql .= \"ORDER BY topicID DESC\";\r\n\t$result = $xoopsDB->query($sql,$limit,$offset);\r\n\t$i = 0;\r\n \twhile ( $myrow = $xoopsDB->fetchArray($result) ) {\r\n\t\t$ret[$i]['image'] = \"images/wf.gif\";\r\n\t\t$ret[$i]['link'] = \"index.php?op=view&t=\".$myrow['topicID'];\r\n\t\t$ret[$i]['title'] = $myrow['question'];\r\n\t\t$ret[$i]['time'] = $myrow['datesub'];\r\n\t\t$ret[$i]['uid'] = $myrow['uid'];\r\n\t\t$i++;\r\n\t}\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "e3b30ce17182bb3ff16eb4e85d8d9db5", "score": "0.45944706", "text": "public function testCreateInvalidRestriction()\n {\n Gatekeeper::restrict('foobar', array());\n }", "title": "" }, { "docid": "a2ef6acb445fff4f6f0250db56e2f902", "score": "0.45936882", "text": "public function test_build_sql_search_query(){\n $search= new search('sem001');\n //select all column\n $search->select(); \n //filter\n $search->setSqlfilter('institution','Obafemi Awolowo University');\n //sort\n $search->sortResultBy('date');\n //sort direction\n $search->sortDirection('ASC');\n //limit result to 3\n $search->setResultLimit(3);\n //offset result by 2\n $search->setOffset(2);\n \n //build search string\n $search->buildQuery();\n $output=$search->get_sql_query_string();\n //expected query\n $query=\"select * from courses where (institution like :searchterm or course_code like :searchterm or course_title like :searchterm or department like :searchterm) and institution=:institution order by :sortby ASC LIMIT :limit OFFSET :offset\";\n //assert\n $this->assertEquals($query,$output,\"expecting $query\");\n\n $outputparam=$search->get_sql_query_param_array();\n //expected query\n $param=[':searchterm' => '%sem001%',':institution' => 'Obafemi Awolowo University',':sortby' => 'when_added',':limit' => 3,':offset' => 2];\n //assert\n $this->assertEquals($param,$outputparam,\"expecting parameterised array\");\n }", "title": "" }, { "docid": "8ad6b3334a86ae44013444ee6813ad70", "score": "0.45901802", "text": "function filter2sqlwhere($filters, $TVarray = array(), $resourceclass = 'modDocument', $having = '')\n {\n //$where = '`pagetitle`=\"der Titel\" AND `parent` IN (25,30,40) AND (`rennennr` > 10 OR `published` = 1 AND `deleted` = 0) OR `id` IN (1,2,3,4,5))';\n //Todo??:\n //title,body|database|MATCH\n //SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('database');\n //use $filter='title|%database%|like||pagetitle|%database%|like';\n\n // das Suchmuster mit Delimiter und Modifer (falls vorhanden)\n $pattern = '#(\\|\\|)|(\\+\\+)#';\n\n // RegEx mit preg_split() auswerten\n // Auch die eingeklammerten Ausdrücke des\n // Trennsymbol-Suchmusters erfasst und zurückgegeben\n $filterarray = preg_split($pattern, $filters, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n // formatierte Ausgabe\n //echo '<pre>'.print_r($filterarray, true).'</pre>';\n //$fieldsarray = explode(',',$fields);\n $alias = $resourceclass == 'modDocument' ? 'sc.' : '';\n\n $where = '';\n $delimiter = '|';\n\n foreach ($filterarray as $filter) {\n if (!empty($filter)) {\n $filter = trim($filter);\n $o_bracket = '';\n $c_bracket = '';\n\n if (substr($filter, 0, 1) == '(') {\n $o_bracket = '(';\n $filter = str_replace('(', '', $filter);\n }\n if (substr($filter, -1, 1) == ')') {\n $c_bracket = ')';\n $filter = str_replace(')', '', $filter);\n }\n\n switch ($filter) {\n case '||':\n $andOr = ' OR ';\n break;\n case '++':\n $andOr = ' AND ';\n break;\n default:\n $pieces = explode($delimiter, $filter);\n if (count($pieces) == 3) {\n $o_enc = '\"';\n $c_enc = '\"';\n $pieces[1] = ($pieces[1] == '#EMPTY#') ? '' : $pieces[1];\n switch ($pieces[2]) {\n case 'IN':\n $o_enc = '(';\n $c_enc = ')';\n break;\n case 'eq':\n $pieces[2] = '=';\n break;\n case 'gt':\n $pieces[2] = '>=';\n break;\n case 'lt':\n $pieces[2] = '<=';\n break;\n case 'ne':\n $pieces[2] = '<>';\n break;\n /*\n case 'isempty':\n case 'not isempty':\n $o_enc = '(';\n $c_enc = ')';\n $pieces[1]=$pieces[0];\n $scipfield=true;\t\t\t\t\t\t\t\t\n break;\n */\n default:\n break;\n }\n $field = $pieces[0];\n if ($resourceclass == 'modDocument' && in_array($field, $this->tvnames)) {\n $TVarray[$field] = $field;\n //$field = $field.'_tvcv.`value`';\n //$field = \" IF(\".$field.\"_tvcv.value!='',\".$field.\"_tvcv.value,\".$field.\"_tv.default_text) \";\n $alias = '';\n }\n $field = $scipfield ? '' : $alias . '`' . $field . '`';\n $where .= $andOr . $o_bracket . $field . $pieces[2] . $o_enc . $pieces[1] . $c_enc . ' ' . $c_bracket;\n }\n break;\n }\n }\n }\n //echo $where;\n\n return $where;\n\n }", "title": "" }, { "docid": "ea9d52ba48895ed3069900a834bb16bf", "score": "0.45882627", "text": "public function findLessonBy(array $criteria);", "title": "" }, { "docid": "ff7e2816602675e10f5305fc0fc54acd", "score": "0.45877403", "text": "function get_default_search($defaults=array(), $array = array()){\r\n\t\t//Create minimal defaults array, merge it with supplied defaults array\r\n\t\t$super_defaults = array(\r\n\t\t\t'limit' => false,\r\n\t\t\t'scope' => 'future', \r\n\t\t\t'order' => 'ASC', //hard-coded at end of this function\r\n\t\t\t'orderby' => false,\r\n\t\t\t'format' => '', \r\n\t\t\t'category' => 0, \r\n\t\t\t'location' => 0, \r\n\t\t\t'offset'=>0, \r\n\t\t\t'recurrence'=>0,\r\n\t\t\t'recurring'=>false,\r\n\t\t\t'month'=>'',\r\n\t\t\t'year'=>'',\r\n\t\t\t'array'=>false\r\n\t\t);\r\n\t\t//TODO decide on search defaults shared across all objects and then validate here\r\n\t\t$defaults = array_merge($super_defaults, $defaults);\r\n\t\t\r\n\t\t//We are still dealing with recurrence_id, location_id, category_id in some place, so we do a quick replace here just in case\r\n\t\tif( array_key_exists('recurrence_id', $array) && !array_key_exists('recurrence', $array) ) { $array['recurrence'] = $array['recurrence_id']; }\r\n\t\tif( array_key_exists('location_id', $array) && !array_key_exists('location', $array) ) { $array['location'] = $array['location_id']; }\r\n\t\tif( array_key_exists('category_id', $array) && !array_key_exists('category', $array) ) { $array['category'] = $array['category_id']; }\r\n\t\t\r\n\t\tif(is_array($array)){\r\n\t\t\t//TODO accept all objects as search options as well as ids (e.g. location vs. location_id, person vs. person_id)\r\n\t\t\t//If there's a location, then remove it and turn it into location_id\r\n\t\t\tif( array_key_exists('location', $array)){\r\n\t\t\t\tif ( is_numeric($array['location']) ) {\r\n\t\t\t\t\t$array['location'] = (int) $array['location'];\r\n\t\t\t\t} elseif( preg_match('/^([0-9],?)+$/', $array['location']) ) {\r\n\t\t\t\t\t$array['location'] = explode(',', $array['location']);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//No format we accept\r\n\t\t\t\t\tunset($array['location']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Category - for now we just make both keys have an id number\r\n\t\t\tif( array_key_exists('category', $array)){\r\n\t\t\t\tif ( is_numeric($array['category']) ) {\r\n\t\t\t\t\t$array['category'] = (int) $array['category'];\r\n\t\t\t\t} elseif( preg_match('/^([0-9],?)+$/', $array['category']) ) {\r\n\t\t\t\t\t$array['category'] = explode(',', $array['category']);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//No format we accept\r\n\t\t\t\t\tunset($array['category']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//OrderBy - can be a comma-seperated array of field names to order by (field names of object, not db)\r\n\t\t\tif( array_key_exists('orderby', $array)){\r\n\t\t\t\tif( preg_match('/,/', $array['orderby']) ) {\r\n\t\t\t\t\t$array['orderby'] = explode(',', $array['orderby']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//TODO validate search query array\r\n\t\t\t//Clean the supplied array, so we only have allowed keys\r\n\t\t\tforeach( array_keys($array) as $key){\r\n\t\t\t\tif( !array_key_exists($key, $defaults) ) unset($array[$key]);\t\t\r\n\t\t\t}\r\n\t\t\t//return clean array\r\n\t\t\t$defaults = array_merge ( $defaults, $array ); //No point using WP's cleaning function, we're doing it already.\r\n\t\t}\r\n\t\t//Do some spring cleaning for known values\r\n\t\t//Month & Year - may be array or single number\r\n\t\t$month_regex = '/^[0-9]{1,2}$/';\r\n\t\t$year_regex = '/^[0-9]{4}$/';\r\n\t\tif( is_array($defaults['month']) ){\r\n\t\t\t$defaults['month'] = ( preg_match($month_regex, $defaults['month'][0]) && preg_match($month_regex, $defaults['month'][1]) ) ? $defaults['month']:''; \r\n\t\t}else{\r\n\t\t\t$defaults['month'] = preg_match($month_regex, $defaults['month']) ? $defaults['month']:'';\t\r\n\t\t}\r\n\t\tif( is_array($defaults['year']) ){\r\n\t\t\t$defaults['year'] = ( preg_match($year_regex, $defaults['year'][0]) && preg_match($year_regex, $defaults['year'][1]) ) ? $defaults['year']:'';\r\n\t\t}else{\r\n\t\t\t$defaults['year'] = preg_match($year_regex, $defaults['year']) ? $defaults['year']:'';\r\n\t\t}\r\n\t\t//Order - it's either ASC or DESC, so let's just validate\r\n\t\tif( preg_match('/,/', $defaults['order']) ) {\r\n\t\t\t$defaults['order'] = explode(',', $defaults['order']);\r\n\t\t}elseif( !in_array($defaults['order'], array('ASC','DESC')) ){\r\n\t\t\t$defaults['order'] = $super_defaults['order'];\r\n\t\t}\r\n\t\t//ORDER BY, split if an array\r\n\t\tif( preg_match('/,/', $defaults['orderby']) ) {\r\n\t\t\t$defaults['orderby'] = explode(',', $defaults['orderby']);\r\n\t\t}\r\n\t\t//TODO should we clean format of malicious code over here and run everything thorugh this?\r\n\t\t$defaults['array'] = ($defaults['array'] == true);\r\n\t\t$defaults['limit'] = (is_numeric($defaults['limit'])) ? $defaults['limit']:$super_defaults['limit'];\r\n\t\t$defaults['recurring'] = ($defaults['recurring'] == true);\r\n\t\treturn $defaults;\r\n\t}", "title": "" }, { "docid": "0c1cd5e46bf58a10c63bf86078cf2858", "score": "0.45822746", "text": "function constrain($events, $gmt_start = null, $gmt_end = null, $limit = null) {\n $repeats = ICalEvents::collapse_repeats($events, $gmt_start, $gmt_end, $limit);\n if (is_array($repeats) and count($repeats) > 0) {\n $events = array_merge($events, $repeats);\n }\n\n $events = ICalEvents::sort_by_key($events, 'StartTime');\n //$events = ICalEvents::sort_by_key($events, 'rrule'); //sort by rrule\n if (! $limit) $limit = count($events);\n\n $constrained = array();\n $count = 0;\n foreach ($events as $event) {\n if (ICalEvents::falls_between($event, $gmt_start, $gmt_end)) {\n $constrained[] = $event;\n ++$count;\n }\n\n if ($count >= $limit) break;\n }\n\n return $constrained;\n }", "title": "" }, { "docid": "80b20f79a4696284fad0c362674c1f0f", "score": "0.45787925", "text": "function get_search_suggestions($search,$limit=5,$escape_like_str,$usertype='student')\n\t{\n\t\t$suggestions = array();\n\t\t\n\t\t$this->db->from($usertype);\n\t\t$this->db->join('users','$usertype.user_id=users.user_id');\n\t\t\n\t\t// $this->db->where(\"(first_name LIKE '%\".$this->db->escape_like_str($search).\"%' or \n\t\t// last_name LIKE '%\".$this->db->($search).\"%' or \n\t\t// CONCAT(`first_name`,' ',`last_name`) LIKE '%\".$this->db->escape_like_str($search).\"%' or \n\t\t// CONCAT(`last_name`,', ',`first_name`) LIKE '%\".$this->db->escape_like_str($search).\"%') and deleted=0\");\n\t\t\n\t\t$this->db->limit($limit);\t\n\t\t$by_name = $this->db->get();\n\t\t$temp_suggestions = array();\n\t\tforeach($by_name->result() as $row)\n\t\t{\n\t\t\t$temp_suggestions[] = $row->last_name.', '.$row->first_name;\n\t\t}\n\t\t\n\t\tsort($temp_suggestions);\n\t\tforeach($temp_suggestions as $temp_suggestion)\n\t\t{\n\t\t\t$suggestions[]=array('label'=> $temp_suggestion);\t\t\n\t\t}\n\t\t\n\t\t$this->db->from('users');\n\t\t$this->db->join('people','users.user_id=people.user_id');\n\t\t$this->db->where('deleted', 0);\n\t\t$this->db->like(\"email\",$search);\n\t\t$this->db->limit($limit);\n\t\t$by_email = $this->db->get();\n\t\t$temp_suggestions = array();\n\t\tforeach($by_email->result() as $row)\n\t\t{\n\t\t\t$temp_suggestions[] = $row->email;\n\t\t}\n\t\t\n\t\tsort($temp_suggestions);\n\t\tforeach($temp_suggestions as $temp_suggestion)\n\t\t{\n\t\t\t$suggestions[]=array('label'=> $temp_suggestion);\t\t\n\t\t}\n\t\t\n\t\t$this->db->from('users');\n\t\t$this->db->join('people','users.user_id=people.user_id');\t\n\t\t$this->db->where('deleted', 0);\n\t\t$this->db->like(\"username\",$search);\n\t\t$this->db->limit($limit);\n\t\t$by_username = $this->db->get();\n\t\tforeach($by_username->result() as $row)\n\t\t{\n\t\t\t$suggestions[]=array('label'=> $row->username);\t\t\n\t\t}\n\n\n\t\t$this->db->from('users');\n\t\t$this->db->join('people','users.user_id=people.user_id');\t\n\t\t$this->db->where('deleted', 0);\n\t\t$this->db->like(\"phone_number\",$search);\n\t\t$this->db->limit($limit);\n\t\t$by_phone = $this->db->get();\n\t\t$temp_suggestions = array();\n\t\tforeach($by_phone->result() as $row)\n\t\t{\n\t\t\t$temp_suggestions[]=$row->phone_number;\t\t\n\t\t}\n\t\t\n\t\tsort($temp_suggestions);\n\t\tforeach($temp_suggestions as $temp_suggestion)\n\t\t{\n\t\t\t$suggestions[]=array('label'=> $temp_suggestion);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//only return $limit suggestions\n\t\tif(count($suggestions > $limit))\n\t\t{\n\t\t\t$suggestions = array_slice($suggestions, 0,$limit);\n\t\t}\n\t\treturn $suggestions;\n\t\n\t}", "title": "" }, { "docid": "ccb23441490f9e653e64caa49c60da05", "score": "0.45768988", "text": "function search($search,$offset = 0,$sortResults=0, $materialTypeFilter=null) {\n \tif (!empty($materialTypeFilter)){\n \t\t\t$subquery =\"( \";\n \t\t\t$length =count($materialTypeFilter);\n \t\t\t$i=0;\n\t \t\tforeach($materialTypeFilter as $mt) {\n\t\t \t\tif ($mt == 1){\n\t\t\t\t\t$subquery .=\" U.material = 0 \";\n\t\t\t \t}else if ($mt == 2){\n\t\t\t\t\t$subquery .=\" U.material = 1 \";\n\t\t\t \t}else if ($mt == 3){\n\t\t\t\t\t$subquery .=\" U.material = 2 \";\n\t\t\t \t}else if ($mt == 4){\n\t\t\t\t\t$subquery .=\" U.material = 3 \";\n\t\t\t \t}else if ($mt == 5){\n\t\t\t\t\t$subquery .=\" U.material = 4 \";\n\t\t\t \t}else if ($mt == 6){\n\t\t\t\t\t$subquery .=\" U.material = 5 \";\n\t\t\t \t}else{\n\t\t\t\t\t$subquery .=\" U.material = 6 \";\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \tif ($i == $length-1){\n\t\t\t \t\t$subquery .= \" ) AND \";\n\t\t\t \t}else{\n\t\t\t \t\t$subquery .= \" OR \";\n\t\t\t \t}\n\t\t\t \t$i++;\n\t\t }\n \n \t\t\n \t\t$query = \"SELECT *, U.id AS upload_id, U.title AS upload_title FROM uploads AS U LEFT JOIN courses AS C ON U.Course_id = C.Id LEFT JOIN subjects_shortform AS S ON U.Subject_id = S.Id WHERE $subquery MATCH(U.title, U.description, U.filepath) AGAINST('$search' IN NATURAL LANGUAGE MODE) OR $subquery MATCH(C.course_title) AGAINST('$search' IN NATURAL LANGUAGE MODE) OR $subquery MATCH(S.subject_shortform_title) AGAINST('$search' IN NATURAL LANGUAGE MODE)\";\n \t}else{\n \t\t$query = \"SELECT *, U.id AS upload_id, U.title AS upload_title FROM uploads AS U LEFT JOIN courses AS C ON U.Course_id = C.Id LEFT JOIN subjects_shortform AS S ON U.Subject_id = S.Id WHERE MATCH(U.title, U.description, U.filepath) AGAINST('$search' IN NATURAL LANGUAGE MODE) OR MATCH(C.course_title) AGAINST('$search' IN NATURAL LANGUAGE MODE) OR MATCH(S.subject_shortform_title) AGAINST('$search' IN NATURAL LANGUAGE MODE)\";\n \t}\n\n \t\n \tif ($sortResults == 0){\n \t\t$query .= \" ORDER BY\n\t\t\t\t\t\t\t\t((SELECT COUNT(type) FROM `uploads`\n\t\t\t\t\t\t\t\tLEFT JOIN `ratings`\n\t\t\t\t\t\t\t\tON ratings.upload_id = uploads.id\n\t\t\t\t\t\t\t\tWHERE ratings.type = 1 AND uploads.id = U.id) - \n\t\t\t\t\t\t\t\t(SELECT COUNT(type) FROM `uploads`\n\t\t\t\t\t\t\t\tLEFT JOIN `ratings`\n\t\t\t\t\t\t\t\tON ratings.upload_id = uploads.id\n\tWHERE ratings.type = 0 AND uploads.id = U.id)) DESC, views DESC\"; \t \n \t}else if ($sortResults == 1){\n \t\t$query .= \" ORDER BY views DESC\"; \t \n \t}else if ($sortResults == 2){\n \t\t$query .= \" ORDER BY ((SELECT COUNT(type) FROM `uploads`\n\t\t\t\t\t\t\t\tLEFT JOIN `ratings`\n\t\t\t\t\t\t\t\tON ratings.upload_id = uploads.id\n\t\t\t\t\t\t\t\tWHERE ratings.type = 1 AND uploads.id = U.id) - \n\t\t\t\t\t\t\t\t(SELECT COUNT(type) FROM `uploads`\n\t\t\t\t\t\t\t\tLEFT JOIN `ratings`\n\t\t\t\t\t\t\t\tON ratings.upload_id = uploads.id\n\tWHERE ratings.type = 0 AND uploads.id = U.id)) DESC\"; \n \t}else if ($sortResults == 3){\n \t\t$query .= \" ORDER BY ((SELECT COUNT(type) FROM `uploads`\n\t\t\t\t\t\t\t\tLEFT JOIN `ratings`\n\t\t\t\t\t\t\t\tON ratings.upload_id = uploads.id\n\t\t\t\t\t\t\t\tWHERE ratings.type = 1 AND uploads.id = U.id) - \n\t\t\t\t\t\t\t\t(SELECT COUNT(type) FROM `uploads`\n\t\t\t\t\t\t\t\tLEFT JOIN `ratings`\n\t\t\t\t\t\t\t\tON ratings.upload_id = uploads.id\n\tWHERE ratings.type = 0 AND uploads.id = U.id)) ASC\"; \n \t}else if ($sortResults == 4){\n \t\t$query .= \" ORDER BY created_at DESC\"; \t \n \t}\n \t\n \t$query .= \" LIMIT $offset, 10\";\n\t\t\t\t\t\t\t\t\n \t\n \t# Query is sorted by calculating the positive - negative ratings and ordering descending.\n \t$query_final = $this->db->query($query); \t\n \treturn $query_final->result();\n \t\n \t \n }", "title": "" }, { "docid": "0ba13519bede3eba9fe4d226e0ae56de", "score": "0.45738068", "text": "function findPostsBy(array $criteria);", "title": "" }, { "docid": "e0cf149c1f3a543322a5ac55d746420d", "score": "0.45717123", "text": "abstract public function getFieldsSearchable();", "title": "" }, { "docid": "7d12f1d82d559e0d51ecdeec38c58f24", "score": "0.4570103", "text": "public function getRestrictions()\n {\n return $this->restrictions;\n }", "title": "" }, { "docid": "7d12f1d82d559e0d51ecdeec38c58f24", "score": "0.4570103", "text": "public function getRestrictions()\n {\n return $this->restrictions;\n }", "title": "" }, { "docid": "e3382d442bad2024c7da12f5fed1bb43", "score": "0.45660317", "text": "function build_query_restrict_select($select, $where, $order, $limit, $offsets)\n{\n\t$settings = settings();\n\tif (isset($settings['filter-pattern']))\n\t\tdie('you cannot combine filter-pattern and local sql history');\n\n\t$params = $where['params'];\n\t$i = 0;\n\n\t// summarize all accesses in one array\n\t$accesses = array();\n\t$access = Session::Get()->getAccess();\n\tif (is_array($access['domain'])) {\n\t\tforeach ($access['domain'] as $domain) {\n\t\t\t$i++;\n\t\t\t$accesses[] = 'owner_domain = :restrict'.$i;\n\t\t\t$params[':restrict'.$i] = $domain;\n\t\t}\n\t}\n\tif (is_array($access['mail'])) {\n\t\tforeach ($access['mail'] as $mail) {\n\t\t\t$i++;\n\t\t\t$accesses[] = 'owner = :restrict'.$i;\n\t\t\t$params[':restrict'.$i] = $mail;\n\t\t}\n\t}\n\t// no access? add special \"full access\" item\n\tif (count($accesses) == 0)\n\t\t$accesses[] = '';\n\n\t// create UNION of all accesses (in order to efficiently use LIMIT)\n\t$unions = array();\n\tforeach ($accesses as $i => $a) {\n\t\t$tmp_sql = 'SELECT *, '.$i.' AS union_id, ';\n\t\t$tmp_sql .= $select;\n\t\t$tmp_where = array_filter(array($a, $where['filter']));\n\t\t// important to use \"(...) AND (...)\" for access control\n\t\tif (!empty($tmp_where))\n\t\t\t$tmp_sql .= ' WHERE ('.implode(') AND (', $tmp_where).')';\n\t\t$tmp_sql .= ' '.$order;\n\t\t$tmp_sql .= ' LIMIT '.intval($limit);\n\t\t$tmp_sql .= ' OFFSET '.intval($offsets[$i]['offset']);\n\t\t$unions[] = $tmp_sql;\n\t}\n\t$sql = '('.implode(') UNION (', $unions).')';\n\treturn array('sql' => $sql, 'params' => $params);\n}", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "407f26fb715334254b5f7fbbe7007126", "score": "0.0", "text": "public function run()\n {\n\n $permissions = [\n\n // admin panel permissions\n\n [\n 'name' => 'admin_panel_access',\n ],\n\n // user permissions\n\n [\n 'name' => 'users_access',\n ],\n\n [\n 'name' => 'user_edit',\n ],\n\n [\n 'name' => 'user_delete',\n ],\n\n [\n 'name' => 'user_create',\n ],\n\n [\n 'name' => 'user_show',\n ],\n\n\n // role permissions\n\n [\n 'name' => 'roles_access',\n ],\n\n [\n 'name' => 'role_edit',\n ],\n\n [\n 'name' => 'role_delete',\n ],\n\n [\n 'name' => 'role_create',\n ],\n\n [\n 'name' => 'role_show',\n ],\n\n\n // permission permissions\n\n [\n 'name' => 'permissions_access',\n ],\n\n [\n 'name' => 'permission_edit',\n ],\n\n [\n 'name' => 'permission_delete',\n ],\n\n [\n 'name' => 'permission_create',\n ],\n\n\n\n\n ];\n\n foreach($permissions as $permission){\n Permission::create($permission);\n }\n\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\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' => '[email protected]',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\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": "339f34d479d82d76bcfcf9f30b60c215", "score": "0.7941445", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Category::class, 50)->create();\n factory(\\App\\Tag::class, 50)->create();\n\n //factory(\\App\\Post::class, 20)->create();\n factory(App\\Post::class, 50)->create()->each(function (App\\Post $post) {\n //se relaciona un post con un tag\n $post->tags()->attach([\n rand(1, 17), //el primer post se relaciona con las primeras cinco etiquetas\n rand(17, 36),\n rand(36, 50),\n ]);\n });\n\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": "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": "c1a66cf4f77ef258e5c305c72f0cb9e1", "score": "0.7886635", "text": "public function run()\n {\n\n\n\n \t$this->call([\n \t\tUserSeeder::class,\n \t\tGenreSeeder::class,\n \t\tAuthorSeeder::class,\n \t\tBookSeeder::class,\n\n \t]);\n\n\n \n \t//$imageUrl=$faker->imageUrl(640, 480);\n\n // $books =\\App\\Models\\Book::factory()->count(30)->create()->each(function ($book) {\n // // Seed the relation with one address\n // $isConfirmed = \\App\\Models\\Book::factory()->make();\n // $book->isConfirmed()->save($isConfirmed);\n // });\n \n\n\n }", "title": "" }, { "docid": "f576f30907ef7a35342b08cfa6974d30", "score": "0.78835493", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 5)->create();\n factory(App\\Model\\Album::class, 50)->create();\n factory(App\\Model\\Audio::class, 300)->create();\n }", "title": "" }, { "docid": "9114ae89fdf7d0584d56fd6bee28868b", "score": "0.7876554", "text": "public function run()\n {\n $this->call(DatabaseSeeder::class);\n DB::table('posts')->insert([\n 'title' => Str::random(10),\n 'body'=>Str::random(10).'@email.com',\n 'category_id' =>Int::random(10),\n\n ]);\n\n // $faker=Faker::create();\n // for ($i=0; $i <10 ; $i++) {\n // // code...\n // $post=new App\\Post();\n // $post->title=$faker->sentence;\n // $post->body=$faker->paragraph;\n // $post->category_id=$faker->rand(1,3);\n // $post->save();\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": "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": "012af9c3ac169cef32ec988d61a7f6aa", "score": "0.7833385", "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 DB::table('products')->insert([\n 'title' => $faker->text(30),\n 'description' => $faker->text(200),\n 'count' => $faker->randomDigit(1)\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "bfdaf9f1ed8a7212b4598d692bcc1654", "score": "0.7826624", "text": "public function run()\n {\n\n Student::factory(10)->create();\n Teacher::factory(10)->create();\n Post::factory(10)->create();\n Comment::factory(10)->create();\n Category::factory(10)->create();\n CategoryPost::factory(10)->create();\n // đẩy dữ liệu\n // $this->call([\n // StudentTableSeeder::class,\n // TeacherTableSeeder::class,\n // ]);\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' => '[email protected]',\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": "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": "33db14990dd20205cbf0ed23ac91d8a5", "score": "0.7797709", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Models\\Blog\\Category::class,10)->create();\n factory(\\App\\Models\\Blog\\Post::class,100)->create();\n $this->call(PostsCategoriesTableSeeder::class);\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => '[email protected]',\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' => '[email protected]',\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": "7d4a8acce261539d99f3a600a7fded39", "score": "0.7794814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Stocks\n $stocks = factory(Stock::class, 5)->create();\n\n $categories = factory(Category::class, 10)->create();\n\n $products = factory(Product::class, 500)->create();\n\n $products->each(function (Product $product) use ($categories, $stocks) {\n $randomCategories = $categories->random(3);\n $randomStocks = $stocks->random(rand(1, 3));\n\n $product->categories()->attach($randomCategories->pluck('id'));\n\n // associate with stocks\n foreach ($randomStocks as $stock) {\n $product->stocks()->attach($stock->id, [\n 'products_count' => rand(10, 100)\n ]);\n }\n });\n\n // Empty categories\n factory(Category::class, 5)->create();\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": "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": "3d653e15cd03e74996be098cff42dfca", "score": "0.77792233", "text": "public function run()\n {\n \\App\\Models\\Admin::factory(10)->create();\n \\App\\Models\\User::factory(10)->create();\n\n Book::create(\n [\n \"title\" => \"Self Discipline\",\n \"author\" => \"Shawn Norman\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 50,\n ]\n );\n\n Book::create(\n [\n \"title\" => \"Atomic Habits\",\n \"author\" => \"James Clear\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 20,\n ]);\n\n Book::create(\n [\n \"title\" => \"The Last Thing He Told Me\",\n \"author\" => \"Laura Dave\",\n \"publisher\" => \"Google\",\n \"year\" => 2021,\n \"stock\" => 10,\n ]\n );\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": "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": "defbf35392fe9a4d769e6b94f0fcd99b", "score": "0.7768574", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\tPost::truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tforeach(range(1, 30) as $index)\n\t\t{\n\t\t\t// MYSQL\n\t\t\t$userId = User::orderBy(DB::raw('RAND()'))->first()->id;\n\n\t\t\t// SQLITE\n\t\t\t// $userId = User::orderBy(DB::raw('random()'))->first()->id;\n\n\t\t\tPost::create([\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'title' => $faker->name($gender = null|'male'|'female'),\n\t\t\t\t'body' => $faker->catchPhrase\n\t\t\t]);\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "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": "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": "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": "ba321352baa0a7b54b30247f8156bf1a", "score": "0.7756539", "text": "public function run()\n {\n $this->seedUser();\n $this->seedCategoryAndPosts();\n }", "title": "" }, { "docid": "8a59a3aa3c368b2105f5ed2aed066fcd", "score": "0.77556384", "text": "public function run()\n {\n // $this->call(DummyDataSeeder::class);\n\n factory(App\\Models\\UserProfile::class, 100)->create();\n factory(App\\Models\\HikingGroup::class, 100)->create();\n factory(App\\Models\\Announce::class, 100)->create();\n factory(App\\Models\\EntryInfo::class, 100)->create();\n factory(App\\Models\\HikingPlan::class, 100)->create();\n factory(App\\Models\\HikingRecord::class, 100)->create();\n factory(App\\Models\\LocationMemo::class, 100)->create();\n factory(App\\Models\\Notification::class, 100)->create();\n factory(App\\Models\\RadiogramLog::class, 100)->create();\n factory(App\\Models\\Recruitment::class, 100)->create();\n factory(App\\Models\\UserPosition::class, 100)->create();\n }", "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": "645884083d11c19908303f183869ea48", "score": "0.7750386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::truncate();\n Athlete::truncate();\n Trainer::truncate();\n Plan::truncate();\n Subscription::truncate();\n TrainerPlan::truncate();\n Profile::truncate();\n Routine::truncate();\n Training::truncate();\n Calendar::truncate();\n TrainingRoutine::truncate();\n\n $cantidad_users = 30;\n $cantidad_athletes = 20;\n $cantidad_trainers = 10;\n $cantidad_profiles = 60;\n $cantidad_plans = 5;\n $cantidad_subscriptions = 20;\n $cantidad_trainer_plans = 30;\n $cantidad_routines = 30;\n $cantidad_trainings = 60;\n $cantidad_calendars = 100;\n $cantidad_training_routines = 120;\n\n factory(User::class, $cantidad_users)->create();\n factory(Athlete::class, $cantidad_athletes)->create();\n factory(Trainer::class, $cantidad_trainers)->create();\n factory(Profile::class, $cantidad_profiles)->create();\n factory(Plan::class, $cantidad_plans)->create();\n factory(Subscription::class, $cantidad_subscriptions)->create();\n factory(TrainerPlan::class, $cantidad_trainer_plans)->create();\n factory(Routine::class, $cantidad_routines)->create();\n factory(Training::class, $cantidad_trainings)->create();\n factory(Calendar::class, $cantidad_calendars)->create();\n factory(TrainingRoutine::class, $cantidad_training_routines)->create();\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'=> '[email protected]',\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": "42daa4f7485840fe27f640e7e7069e40", "score": "0.77378654", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([UsuarioSeed::class]);\n $this->call([CategoriasSeed::class]);\n $this->call([ExperienciaSeeder::class]);\n }", "title": "" }, { "docid": "f70d3c8ab2d963dc7360a2749f67f6b7", "score": "0.7736429", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n Course::factory(3)->create();\n assignament::factory(9)->create();\n exercise::factory(6)->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' => '[email protected]',\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' => '[email protected]',\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": "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": "a8c4b0faab2536f6924d6a6f05f50027", "score": "0.77278227", "text": "public function run()\n {\n $faker = Factory::create('fr_FR');\n $categories = ['Animaux', 'Nature', 'People', 'Sport', 'Technologie', 'Ville'];\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category,\n 'created_at' => $faker->date('Y-m-d H:i'),\n 'updated_at' => $faker->date('Y-m-d H:i'),\n ]);\n }\n $this->call(UserSeeder::class);\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": "cf809e1e51d295f713f0e1311ce8c5b4", "score": "0.77200127", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(BatimentsSeeder::class);\n $this->call(FormationsSeeder::class);\n $this->call(TypeformationsSeeder::class);\n eleves::factory()->count(50)->create();\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' => '[email protected]',\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": "70fbcb2aeac3103c8556e273a1ea07ef", "score": "0.7712306", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'nome' => \"Felipe Gustavo Braiani Santos\",\n 'siape' => 2310754,\n 'password' => bcrypt('2310754'),\n 'perfil' => '3'\n ]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Mecânica\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Informática\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Eletrotécnica\"]);\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": "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": "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' => '[email protected]',\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": "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": "78e5684a917cd4cdf2b47769a09f01c1", "score": "0.76985985", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n DB::table('news')->insert([\n 'title' => $faker->text(10),\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now(),\n 'resume' => $faker->text(70),\n 'pics' => $faker->imageUrl(),\n 'content' => $faker->text( 1000 ),\n 'author' => $faker->name,\n 'isPublished' => rand(0,1)\n ]);\n }", "title": "" }, { "docid": "a3ead8af61223146f6e3fdec15b00904", "score": "0.7697128", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([QuizSeeder::class]);\n $this->call([AnswererSeeder::class]);\n $this->call([SectionSeeder::class]);\n $this->call([QuestionSeeder::class]);\n $this->call([AnswerSeeder::class]);\n $this->call([OptionSeeder::class]);\n $this->call([OptionColSeeder::class]);\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' => '[email protected]',\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": "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": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => '[email protected]',\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": "d821e4330d8dabc502854ce12d329af5", "score": "0.7686517", "text": "public function run()\n {\n $this->call(ColorsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(SexesTableSeeder::class);\n $this->call(SizesTableSeeder::class);\n\n $this->call(User_StatusesTableSeeder::class);\n\n $this->call(SubcategoriesTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n\n $this->call(ProductsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n // factory(\\App\\Product::class, 62)->create();\n factory(\\App\\User::class, 25)->create();\n factory(\\App\\Cart::class, 99)->create();\n }", "title": "" }, { "docid": "29695a5ff1fa3c45993913799e105323", "score": "0.76861745", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\t$dateset = new Seed(self::TABLE_NAME);\n\n\t\tforeach ($dateset as $rows) {\n\t\t\t$records = [];\n\t\t\tforeach ($rows as $row)\n\t\t\t\t$records[] = [\n\t\t\t\t\t'id'\t\t\t=> $row->id,\n\t\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t\t'sport_id'\t\t=> $row->sport_id,\n\t\t\t\t\t'country_id'\t=> $row->country_id,\n\t\t\t\t\t'gender_id'\t\t=> $row->gender_id,\n\n\t\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t\t\t'external_id'\t=> $row->external_id ?? null,\n\t\t\t\t\t'logo'\t\t\t=> $row->logo ?? null,\n\t\t\t\t];\n\n\t\t\tinsert(self::TABLE_NAME, $records);\n\t\t}\n\t}", "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": "bdd67eaf9bb5c705971ec25aad3d2bf9", "score": "0.76768607", "text": "public function run()\n {\n $faker = Faker\\Factory::create('es_ES');\n\n DB::table('empresas')->delete();\n for ($cantidadEmpresas = 0; $cantidadEmpresas != 6; $cantidadEmpresas++) {\n DB::table('empresas')->insert(array(\n 'nombre' => $faker->company,\n 'direccion' => $faker->address,\n 'email' => $faker->companyEmail,\n 'url' => $faker->url,\n 'telefono' => $faker->numberBetween(600000000,699999999),\n 'created_at' => date('Y-m-d H:m:s'),\n 'updated_at' => date('Y-m-d H:m:s'),\n ));\n }\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' => '[email protected]',\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": "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": "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": "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', '[email protected]'),\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": "2fab92d52cf4ab60077a0d038a745f5b", "score": "0.7660352", "text": "public function run()\n {\n Model::unguard();\n\n $this->call(DatabaseCleaner::class);\n\n $faker = Faker\\Factory::create();\n\n $admin = User::create([\n 'first_name' => 'Admin',\n 'last_name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => str_random(10),\n ]);\n\n $userBirthdate = new UserMeta([\n 'created_by' => $admin->id,\n 'field_name' => 'birth_date',\n 'field_type' => 'date',\n 'date_value' => $faker->date,\n ]);\n\n $userPostalcode = new UserMeta([\n 'created_by' => $admin->id,\n 'field_name' => 'zip_code',\n 'field_type' => 'string',\n 'string_value' => $faker->postcode,\n ]);\n\n $admin->meta()->saveMany([$userBirthdate, $userPostalcode]);\n\n $this->call(GroupsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(LanguagesTableSeeder::class);\n $this->call(ContentTypesTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ContentsTableSeeder::class);\n $this->call(RoutesTableSeeder::class);\n\n Model::reguard();\n }", "title": "" }, { "docid": "d4833208ba9ca3bb97bd734168301979", "score": "0.7659574", "text": "public function run()\n {\n $this->call(ReligionsTableSeeder::class);\n $this->call(SubjectsTableSeeder::class);\n $this->call(BuildingsTableSeeder::class);\n $this->call(ScholarshipsTableSeeder::class);\n $this->call(GradesTableSeeder::class);\n $this->call(CollegesTableSeeder::class);\n $this->call(DepartmentsTableSeeder::class);\n factory('App\\Faculty', 500)->create();\n // factory('App\\Student', 1000)->create();\n factory('App\\Room', 140)->create();\n $this->call(CurriculaTableSeeder::class);\n $this->call(CurriculumSubjectsTableSeeder::class);\n $this->call(StudentsTableSeeder::class); \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'=>'[email protected]']);\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": "" }, { "docid": "238c2f72ceeb9562de5b8c8c51d03b78", "score": "0.76563185", "text": "public function run()\n {\n Model::unguard();\n DB::table('fruits')->delete();\n $fruits = [\n ['name' => 'apple', 'color' => 'green', 'weight' => 150, 'delicious' => true],\n ['name' => 'banana', 'color' => 'yellow', 'weight' => 116, 'delicious' => true],\n ['name' => 'strawberries', 'color' => 'red', 'weight' => 12, 'delicious' => true],\n ];\n // Loop through fruits above and create the record in DB\n foreach ($fruits as $fruit) {\n Fruit::create($fruit);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "61310d9d27579cb1fe2adbef75513d38", "score": "0.76559335", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\Admin::class)->create([\n \"email\" => \"[email protected]\",\n \"name\" => \"Alice\"\n ]);\n factory(App\\User::class)->create([\n \"email\" => \"[email protected]\",\n \"name\" => \"Bob\"\n ]);\n factory(App\\User::class)->create([\n \"email\" => \"[email protected]\",\n \"name\" => \"Charlie\"\n ]);\n\n $this->call([\n CategorySeeder::class,\n PostSeeder::class,\n CategoryPostSeeder::class\n ]);\n }", "title": "" }, { "docid": "ffea41874cbc07a545de1bafbfa4ff18", "score": "0.76557875", "text": "public function run()\n {\n // $faker = Faker::create() ;\n // foreach (range(1,10) as $index) {\n // // We are now inserting fake data values and credentials into the database \n\n // DB::table('users')->insert([\n // 'name' => str_random(10) ,\n // 'email' => str_random(10).'@gmail.com' ,\n // 'password' => bcrypt('secret')\n // ])\n // }\n $this->call(SendCardsTableSeeder::class);\n $this->call(CardCategoriesTableSeeder::class);\n $this->call(ComplementaryCardsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "6571121bae7932bef4e75b44130c0200", "score": "0.7654159", "text": "public function run()\n {\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 1',\n 'description' => 'harry potter',\n ]);\n\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 2',\n 'description' => 'harry potter',\n ]);\n\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 3',\n 'description' => 'harry potter',\n ]);\n\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 4',\n 'description' => 'harry potter',\n ]);\n }", "title": "" }, { "docid": "b9cbd65c0ad3a0c375171c28c8688d01", "score": "0.76536846", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n FreeCause::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 Freecause::create([\n 'title' => $faker->sentence,\n 'number' => $faker->phoneNumber,\n 'judgment_date' => $faker->date,\n 'judgment_text' => 'innocent',\n 'court_name' => 'alex',\n 'judicial_chamber' => 'chamber',\n 'considration_text' => 'considration',\n 'type' => 'new',\n 'is_public' => 0,\n 'lawyer_id' => 2,\n 'status' => 1,\n 'related_cause_number' => 2,\n 'user_id' => 8,\n ]);\n }\n }", "title": "" }, { "docid": "aa8c1e52ec82900fb89b340f2d60d9b8", "score": "0.765117", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Model::unguard();\n factory(App\\User::class, 10)->create();\n factory(App\\Organisation::class, 10)->create();\n factory(App\\Catalog::class, 9)->create();\n factory(App\\CatalogItem::class, 30)->create();\n factory(App\\Workplace::class, 9)->create();\n factory(App\\Workplace_soft::class, 30)->create();\n factory(App\\Budget::class, 50)->create();\n factory(App\\License::class, 50)->create();\n factory(App\\Contract::class, 50)->create();\n $this->call(RoleTableSeeder::class);\n\n\n //Model::reguard();\n }", "title": "" }, { "docid": "9c36a41315c56187bb677602b3709ffa", "score": "0.76483905", "text": "public function run()\n { \n $faker = \\Faker\\Factory::create();\n \n /**\n * Creates dummy Users and for each of them\n * creates 5 articles \n * \n */\n factory(User::class, 50)->create()->each(function($user) use ($faker){\n for ($i=0; $i < 5; $i++) {\n Article::create([\n 'user_id' => $user->id,\n 'title' => $faker->sentence,\n 'content' => $faker->paragraphs(3,true),\n ]);\n }\n });\n\n /**\n * Creates a User with the credentials:\n * enail: [email protected]\n * password: secret\n * \n */ \n User::create([\n 'name' => $faker->name,\n 'email' => '[email protected]',\n 'password' => bcrypt('secret')\n ]);\n }", "title": "" }, { "docid": "28708952c33a599f47466229824bdec3", "score": "0.7648328", "text": "public function run()\n {\n \t// DB::table('dogs')->delete();\n\n $dogs = array(\n \tarray('name' => 'Shilo', 'gender' => 'female', 'age' => 9, 'created_at' => new DateTime, 'updated_at' => new DateTime),\n \tarray('name' => 'Honu', 'gender' => 'male', 'age' => 4, 'created_at' => new DateTime, 'updated_at' => new DateTime),\n \tarray('name' => 'Gunner', 'gender' => 'male', 'age' => 3, 'created_at' => new DateTime, 'updated_at' => new DateTime),\n \tarray('name' => 'Rupert', 'gender' => 'male', 'age' => 9, 'created_at' => new DateTime, 'updated_at' => new DateTime)\n );\n\n // Uncomment the below to run the seeder\n DB::table('dogs')->insert($dogs);\n }", "title": "" }, { "docid": "1ea2b96b314017c9eff1d6fcbf2fe5f1", "score": "0.76481557", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'id' => 1,\n 'name' => 'lofike',\n 'email' => '[email protected]',\n 'password' => '$2y$10$bmeekV4dbnP0lJR8LEeIX.Nk.TgSI0/pSVCUktovtrua.QO6vWdna',\n 'remember_token' => NULL,\n 'created_at' => '2016-12-21 09:27:20',\n 'updated_at' => new DateTime()\n ]);\n DB::table('shows')->insert([\n 'id' => 1,\n 'title' => 'Video Title',\n 'description' => \"Long description of the video\",\n 'image_link' => \"http://www.daisuki.net/content/dam/pim/daisuki/en/ONEPUNCHMAN/13161/movie.jpg\",\n 'video_link' => \"http://www.daisuki.net/hk/en/anime/watch.ONEPUNCHMAN.13156.html\"\n ]);\n }", "title": "" }, { "docid": "ad4f7bdbd62b9b41a1ecb75f8b1bbfcb", "score": "0.7648151", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\Prouduct::class,20)->create();\n factory(App\\Category::class,5)->create();\n\n $categories = Category::all();\n Prouduct::all()->each(function ($product) use ($categories) {\n $product->categories()->attach(\n $categories->random(2)->pluck('id')->toArray()\n );\n });\n }", "title": "" } ]
3c564dd605ac872c728f6e73212b825a
Data provider for AuthCacheUtil username tests
[ { "docid": "ff9251484b3e02a2048ce11a088f02f0", "score": "0.6330588", "text": "public function testPropertyUsernameDataProvider()\n {\n $testData = [];\n\n $testModelKeys = ['username','AGAVE_USERNAME'];\n\n foreach ($testModelKeys as $testModelKey) {\n $testData[] = [$testModelKey, self::DEFAULT_CLIENT_NAME_VALUE . $testModelKey];\n }\n\n return $testData;\n }", "title": "" } ]
[ { "docid": "992897b2f69467777501b4142df91206", "score": "0.64363205", "text": "public function getUsername() {}", "title": "" }, { "docid": "5f7ed1fb4f8d96a5cdad15bcefcbea5d", "score": "0.6297723", "text": "public function getUsername(): string;", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.62854624", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.62854624", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.62854624", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.62854624", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.62854624", "text": "public function getUsername();", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.6231928", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.6231928", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "465c5b9a216c87271128daa63e5decb7", "score": "0.61931366", "text": "public function getUsername() {\n }", "title": "" }, { "docid": "d2d90240370056bbc271d40fc236b503", "score": "0.6159747", "text": "public function GetUserName ();", "title": "" }, { "docid": "442532ded507c7b5de1cc54b78fd120e", "score": "0.6156214", "text": "public function getUserName() {}", "title": "" }, { "docid": "8c56c737ac95744d4217791bcc64ac91", "score": "0.6145839", "text": "function sumo_get_username($username='', $cache=TRUE)\r\n{\r\n\tGLOBAL $SUMO;\r\n\t\r\n\t$query = \"SELECT firstname,lastname FROM \".SUMO_TABLE_USERS.\" \r\n\t\t\t WHERE username='\".$username.\"'\";\r\n\t\r\n\tif($cache)\r\n\t\t$rs = $SUMO['DB']->CacheExecute(60, $query);\r\n\telse\r\n\t\t$rs = $SUMO['DB']->Execute($query);\r\n\t\t\r\n\t$tab = $rs->FetchRow();\r\n\t\r\n\t$username = sumo_get_formatted_username($tab['firstname'], $tab['lastname']);\r\n\t\r\n\treturn $username;\r\n}", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.6125569", "text": "public function getUserName();", "title": "" }, { "docid": "28eb87dbe91331cbbf4ab52d3fb9000e", "score": "0.612467", "text": "protected function getConfiguredUsername() {}", "title": "" }, { "docid": "792295c9f521c5826cf99def735da93f", "score": "0.5974262", "text": "public function username($name);", "title": "" }, { "docid": "43d829d2d1c06e19c2264f9baf0256ea", "score": "0.5919971", "text": "public function testGetNetworkMerakiAuthUser()\n {\n }", "title": "" }, { "docid": "879119d7b86c3c4f1de24b7e018b23ac", "score": "0.5834116", "text": "protected function _setupUser($username) {}", "title": "" }, { "docid": "3a0ee4544ca4f5f513cfc2e024eb200c", "score": "0.58319724", "text": "function getUsername(){return $this->getName();}", "title": "" }, { "docid": "924ef86bb924068ae7abe7702ca5f0a2", "score": "0.5813569", "text": "abstract protected function getUserInfo($username);", "title": "" }, { "docid": "cce63906e55b84570d9c212bfff536c9", "score": "0.5806112", "text": "public function loginUsername()\n {\n return 'username';\n }", "title": "" }, { "docid": "cce63906e55b84570d9c212bfff536c9", "score": "0.5806112", "text": "public function loginUsername()\n {\n return 'username';\n }", "title": "" }, { "docid": "3638c0adc219cd33cbb5bf13efd3c7fd", "score": "0.5803599", "text": "public function getExternalUserName();", "title": "" }, { "docid": "2777a17491a5810fc1dbd3a0b2bdd9fd", "score": "0.5795469", "text": "public function getUserWithUsername($username);", "title": "" }, { "docid": "7b02c21230eac4306bea8bdaf3dbd5a0", "score": "0.57694155", "text": "public function GetByUsername($username);", "title": "" }, { "docid": "e3dd83a8981adc5d88caa13c9d933099", "score": "0.5767356", "text": "public function username($username);", "title": "" }, { "docid": "c3d7e90723938845c6359c6f0db05556", "score": "0.5740819", "text": "public function processLoginDataProvider() {}", "title": "" }, { "docid": "69de6474897b82b62ac97ac0ee810126", "score": "0.5735028", "text": "public static function user()\n\t{\n return IoC::resolve( 'user_cache', array( Auth::user()->username ) );\n\t}", "title": "" }, { "docid": "947ece50b663e8fad0e386d56fdd4212", "score": "0.57022953", "text": "abstract protected function getUser();", "title": "" }, { "docid": "e2355212c319aec6701830d2e4f12fe6", "score": "0.56635773", "text": "public function getUsername():? string;", "title": "" }, { "docid": "2ed17b3ba2ba944009ad81bbb3a846c6", "score": "0.5659111", "text": "public function testGetNetworkMerakiAuthUsers()\n {\n }", "title": "" }, { "docid": "887d7d16971e17a189c66fe742570cc9", "score": "0.5647655", "text": "public static function GetByUserName ($userName);", "title": "" }, { "docid": "a829bd0c78610d00c1d1d79b13cb73ce", "score": "0.5637226", "text": "function p_usrnam($username)\n{\n\treturn config_item(\"username_as_lowercase\")? lc($username) : $username;\n}", "title": "" }, { "docid": "0195909e5c68c17c54e8e27ce573b974", "score": "0.5634662", "text": "private static function get_user_data($username)\n {\n }", "title": "" }, { "docid": "10f5c30c825a8c2dfcb4b9227a1a1bb7", "score": "0.56329995", "text": "public function providerTestIsValidUsername() {\n return [\n 'valid' => [\n 'YesCT',\n TRUE,\n ],\n 'not valid' => [\n 'x x',\n FALSE,\n ],\n ];\n }", "title": "" }, { "docid": "d26c28e4bf9f8e591ee776679204c3b3", "score": "0.56269294", "text": "protected function getFosUser_UserProvider_UsernameService()\n {\n return $this->services['fos_user.user_provider.username'] = new \\FOS\\UserBundle\\Security\\UserProvider($this->get('fos_user.user_manager'));\n }", "title": "" }, { "docid": "50f9b9503356575504fa8dc3d72c35c0", "score": "0.5624584", "text": "function getUsername(){\r\n return $this->username;\r\n }", "title": "" }, { "docid": "a9ec6e48f446e67599a9e4732d2fb4a6", "score": "0.5620043", "text": "public function testGetCacheKey()\n {\n $dbLoader = new DatabaseTwigLoader;\n $this->assertEquals('my_cache_key', $dbLoader->getCacheKey('my_cache_key'));\n }", "title": "" }, { "docid": "405d3326532fa4d641527f86587a23f1", "score": "0.5616747", "text": "public function underscoredToLowerCamelCaseDataProvider() {}", "title": "" }, { "docid": "5f7219592f5c45e9dad6d39bb04c7b6e", "score": "0.5614944", "text": "public static function getUsername(){\n $name = Auth::user()->name;\n return $name;\n}", "title": "" }, { "docid": "ce30f0ff5caa1ff052d97c9877a4cb09", "score": "0.56065786", "text": "private function _getUserKey ($username, $key)\n\t{\n\t\t$realKey = $username . '_' . $key;\n\t\treturn $this->cache->get($realKey);\n\t}", "title": "" }, { "docid": "65ac6c6ddeaf9186e92afce6c0911c66", "score": "0.55918044", "text": "public function testUserMeGet()\n {\n }", "title": "" }, { "docid": "74045bcc47d32b0d9766b44c0f5bf25f", "score": "0.55910176", "text": "function setUserName($userName);", "title": "" }, { "docid": "f381ff061b0477688a6b8bf47f36220b", "score": "0.55849206", "text": "public function getCurrentUsername(): string;", "title": "" }, { "docid": "b4a411289baff78d02b977770a1f4b32", "score": "0.55837333", "text": "public function testInfoUser()\n {\n }", "title": "" }, { "docid": "684c5b556a79174f805e3e277696e970", "score": "0.5583167", "text": "function setUsername($Username);", "title": "" }, { "docid": "9a13edf78d62a3102dfe2722bf3c405e", "score": "0.55592465", "text": "public function getByUsername($username)\r\n {\r\n }", "title": "" }, { "docid": "b4ffd284787f590f3785094f82b3492e", "score": "0.5552061", "text": "public function testUserUserIDGet()\n {\n }", "title": "" }, { "docid": "8066f122e72fbf8ec9a758730e91c614", "score": "0.5547125", "text": "public function testGetCacheKey(): void\n {\n // If I have a method\n $uut = $this->getMethod($this->method);\n\n // I expect the active modules tracker key to be returned\n $moduleManager = $this->getMockManager($this->method);\n $expected = \"modules-cache\";\n $this->assertSame($expected, $uut->invoke($moduleManager));\n }", "title": "" }, { "docid": "bdbc72d9e888c9090f31376274c50742", "score": "0.55259365", "text": "public function underscoredToUpperCamelCaseDataProvider() {}", "title": "" }, { "docid": "fefb88cc602043335607ccb4f48bc01a", "score": "0.55104506", "text": "function get_username($cookiename=\"login\"){\n\t//debug_string(\"get_username()\");\n\t\n\t$cdata = get_cook_data($cookiename);\n if(isset($cdata['name'])){\n return $cdata['name'];\n }else{\n return \"\";\n }\n}", "title": "" }, { "docid": "4b12af12f8426170c64a6dc27eed6c3c", "score": "0.5506518", "text": "private function generateUsername() {\n $name = \"\";\n $name = $this->generator->generateString(4, '2346789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXYZ');\n $table = 'participant_data';\n $conditions = array('passcode' => $name);\n $existing_users = $this->getListFromDB($table, $conditions);\n if (empty($existing_users)) {\n return $name; \n }\n else {\n return $this->generateUsername();\n }\n \n }", "title": "" }, { "docid": "8b13ff647da746f9505ca6eb0acf2df3", "score": "0.5479276", "text": "public function testGetBackendUser()\n {\n $itemsProcFunc = GeneralUtility::makeInstance(ColPosList::class);\n $backendUserAuthentication = GeneralUtility::makeInstance(BackendUserAuthentication::class);\n $GLOBALS['BE_USER'] = $backendUserAuthentication;\n $result = $itemsProcFunc->getBackendUser();\n $this->assertEquals($backendUserAuthentication, $result);\n }", "title": "" }, { "docid": "1ebc93d49fb681129bb4f6592cecc26f", "score": "0.54752046", "text": "public function getAuthIdentifierName() {\n return 'username';\n }", "title": "" }, { "docid": "323ec767e1d468de7a65055c7e2247bf", "score": "0.54714483", "text": "public function fetchUserByUserName($username);", "title": "" }, { "docid": "6c9a018df572c074223f10b761daf00d", "score": "0.54668456", "text": "public function testProfileUnilogin()\n {\n\n }", "title": "" }, { "docid": "92559a0c51b89eb777984f0a9f66669e", "score": "0.5461921", "text": "protected function username()\n {\n return 'username';\n }", "title": "" }, { "docid": "bee232d01244f7e3e57f3616be19a54e", "score": "0.5456349", "text": "public function loginUsername()\n {\n return 'email';\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.5453406", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.5453406", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.5453406", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "13f3643f302e93c7537749ae77470d47", "score": "0.54511887", "text": "public function testGetUsernameWithLegacy()\n {\n $data = [\n 'id' => 'binding_id',\n 'legacy_username' => 'pantheon_classic',\n 'username' => 'new_pantheon',\n ];\n $model = new Binding((object)$data, ['collection' => $this->collection,]);\n $username = $model->getUsername();\n $this->assertEquals($data['legacy_username'], $username);\n }", "title": "" }, { "docid": "091eacd2f184e5531077962de948b032", "score": "0.54458153", "text": "public function username(): string\n\t{\n\t\treturn \"username\";\n\t}", "title": "" }, { "docid": "81281b0298606df12d1a22c063c740b7", "score": "0.54438347", "text": "public static function getUsername ()\n {\n return config('auth', 'username');\n }", "title": "" }, { "docid": "41faa8b6ea55bc366826f678ab1ffd3e", "score": "0.54408115", "text": "public function getUserName()\n {\n return $this->config['username']; \n }", "title": "" }, { "docid": "5719bbfb84267bc5d40793a534317a90", "score": "0.5437975", "text": "public function testCredentialsUsername()\n {\n \n $credentials = new \\PrintNode\\Credentials\\Username(API_USERNAME, API_PASSWORD);\n\n $this->assertInstanceOf('\\PrintNode\\Credentials', $credentials);\n $this->assertInstanceOf('\\PrintNode\\Credentials\\Username', $credentials);\n \n }", "title": "" }, { "docid": "996e52e84e5d1207c485ce2786540d55", "score": "0.5437902", "text": "public function testCatalogChangeCatalogColumnUserName()\n {\n\n }", "title": "" }, { "docid": "f3cd9926503ddde47acb23cc6696d4c6", "score": "0.5431276", "text": "public function testFetchUsername()\r\n\t\t{\r\n\t\t\r\n\t\t\t$db_host = \"localhost\"; //Host address (most likely localhost)\r\n\t\t\t$db_name = \"website_test\"; //Name of Database\r\n\t\t\t$db_user = \"websiteUser\"; //Name of database user\r\n\t\t\t$db_pass = \"4WPXGzCUm2y2TeG7\"; //Password for database user\r\n\t\t\t$db_table_prefix = \"apt_\";\r\n\t\t\t$GLOBALS['db_table_prefix'] = $db_table_prefix;\r\n\r\n\t\t\t$errors = array();\r\n\t\t\t$successes = array();\r\n\t\t\t$GLOBALS['errors'] = $errors;\r\n\t\t\t$GLOBALS['successes'] = $successes;\r\n\r\n\t\t\t//Create a new mysqli object with database connection parameters\r\n\t\t\t$mysqli = new mysqli($db_host, $db_user, $db_pass, $db_name);\r\n\t\t\t$GLOBALS['mysqli'] = $mysqli;\r\n\r\n\t\t\tif(mysqli_connect_errno())\r\n\t\t\t{\r\n\t\t\t\techo \"Connection Failed: \" . mysqli_connect_errno();\r\n\t\t\t\t$this->assertTrue(false);\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\r\n\t\t\t$testUsername = fetchUsername(1);\r\n\t\t\t\r\n\t\t\t$result = true;\r\n\t\t\t\r\n\t\t\tif(!isset($testUsername) || $testUsername != \"twilford\")\r\n\t\t\t{\r\n\t\t\t\t$result = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->assertTrue($result);\r\n\t\t}", "title": "" }, { "docid": "12cdf37b39c825f9cba62814b0f8934e", "score": "0.5419271", "text": "public function username()\n {\n }", "title": "" }, { "docid": "fb14a60a336650e54233b3613157ceff", "score": "0.54085594", "text": "private static function was_username_provided($input)\n {\n }", "title": "" }, { "docid": "81d861a4adc0fbf344cb448f83204853", "score": "0.539821", "text": "public function testRegistrationPasswordOnlyLowerCase(): void { }", "title": "" }, { "docid": "57a6c6a4da634f6364a52382b9c250ac", "score": "0.5393623", "text": "public function loadUserByUsername($username);", "title": "" }, { "docid": "569f366934fd0aeb42e473c48778b52b", "score": "0.5389715", "text": "public function setUpCache();", "title": "" }, { "docid": "c63355b74d1f5737ae44bc6867abbb88", "score": "0.5383825", "text": "public function testCatalogChangeCustomColumnUserName()\n {\n\n }", "title": "" }, { "docid": "dec285ade8bb33e2374a739b9c05167c", "score": "0.5376359", "text": "protected function loginUsername()\n {\n return 'email';\n }", "title": "" }, { "docid": "a42fd93bbb6eb36c304836d8df2339dc", "score": "0.5374763", "text": "protected function getUserByContext() {}", "title": "" }, { "docid": "109a59ba7df9acb379f5b1d72c5e5c10", "score": "0.53727734", "text": "public function retrieve($username);", "title": "" }, { "docid": "0ad8ad8a8cfb0136c34cc031c717adbf", "score": "0.53723526", "text": "public function testCreateNetworkMerakiAuthUser()\n {\n }", "title": "" }, { "docid": "d90f2900b3d64f8c1c3965423dcc40ca", "score": "0.53681165", "text": "public function getUsername(){\n return $this->login;\n }", "title": "" }, { "docid": "cf3e4816598cbf26ac1273830f0383ef", "score": "0.5359538", "text": "function get_user_details($username)\n {\n }", "title": "" }, { "docid": "b78318d3b158d947a3726d8399e05cc6", "score": "0.5358389", "text": "private function getUsername()\n {\n return $this->_username;\n }", "title": "" }, { "docid": "c9dd4677391395d1fd3bc71310ce48f6", "score": "0.535557", "text": "public function username(){\n return 'user_name';\n }", "title": "" }, { "docid": "44032904392902eb93682402b3593a96", "score": "0.5349484", "text": "public function test_lsvt_api_can_get_user_by_username()\n {\n $email = '[email protected]';\n\n $this->httpMock->append(new Response(200, ['Content-Type' => 'application/json'], json_encode($this->getUserEmailResponse($email))));\n\n $test = $this->apiClient->getUserByUsername($email);\n\n $this->assertCount(1, $this->curlHistory);\n $this->assertEquals('https://webservices.lightspeedvt.net/REST/v1//[email protected]', (string)$this->curlHistory[0]['request']->getUri());\n\n $this->assertIsArray($test);\n $this->assertEquals($email, $test['email']);\n }", "title": "" }, { "docid": "ff07dc246ef16a7e24b7226d607399b5", "score": "0.5344936", "text": "public static function getUser();", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.53420126", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.53411657", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.53404206", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.53404206", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "0059febb107d11f672f6f60ba93605ea", "score": "0.5339625", "text": "public function testLoginUsername(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => '',\r\n\t\t\t\t'password' => 'thisisit'\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertFalse($validLogin);\r\n\t\t}", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.533953", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "2ba38bd27a03410cfde579b6216bae92", "score": "0.53316486", "text": "public function getUsername(){\n return $this->username; \n }", "title": "" }, { "docid": "1fe3200eb70b06dfe08a78f3f5429f6b", "score": "0.5328192", "text": "public function username()\n {\n return 'username';\n }", "title": "" }, { "docid": "1fe3200eb70b06dfe08a78f3f5429f6b", "score": "0.5328192", "text": "public function username()\n {\n return 'username';\n }", "title": "" }, { "docid": "1fe3200eb70b06dfe08a78f3f5429f6b", "score": "0.5328192", "text": "public function username()\n {\n return 'username';\n }", "title": "" }, { "docid": "1fe3200eb70b06dfe08a78f3f5429f6b", "score": "0.5328192", "text": "public function username()\n {\n return 'username';\n }", "title": "" }, { "docid": "4398cbaaa372663bc9f2cf4134f1f8d7", "score": "0.53071874", "text": "protected function getBackendUser() {}", "title": "" }, { "docid": "4398cbaaa372663bc9f2cf4134f1f8d7", "score": "0.53071874", "text": "protected function getBackendUser() {}", "title": "" }, { "docid": "4398cbaaa372663bc9f2cf4134f1f8d7", "score": "0.53071874", "text": "protected function getBackendUser() {}", "title": "" }, { "docid": "4398cbaaa372663bc9f2cf4134f1f8d7", "score": "0.53071874", "text": "protected function getBackendUser() {}", "title": "" }, { "docid": "4398cbaaa372663bc9f2cf4134f1f8d7", "score": "0.53071874", "text": "protected function getBackendUser() {}", "title": "" } ]
ee3cf682b744632f83464e51ca150f8c
/ TABELLA DEI PROFILI ASSOCIATI ALLA COMPETENZA
[ { "docid": "6f133e50ce56e1701410dfe45963e684", "score": "0.0", "text": "public function datatables_competenza_profili($id_competenza)\n {\n $this->load->library('datatables');\n\n $this->datatables\n ->select('rrtq_profilo.id_profilo,id_sep,titolo_profilo,flg_regolamentato,rrtq_profilo.id_stato_profilo')\n ->from('rrtq_profilo')\n ->join('rrtq_stato_profilo', 'rrtq_profilo.id_stato_profilo = rrtq_stato_profilo.id_stato_profilo')\n ->select('des_stato_profilo')\n ->join('rrtq_profilo_competenza', 'rrtq_profilo.id_profilo = rrtq_profilo_competenza.id_profilo')\n ->where('id_competenza', $id_competenza);\n /*\n if (!$this->ion_auth->is_admin())\n {\n $this->datatables->where('rrtq_profilo.id_stato_profilo !=', 4);\n } \n */\n $action_link = '<a href=\"' . base_url() . 'admin/qualificazione/gestione/$1\" data-toggle=\"tooltip\" data-original-title=\"Gestione\"> <i class=\"fa fa-edit text-inverse m-r-5\"></i> </a>';\n\n $this->datatables->add_column('azione', $action_link, 'id_profilo');\n\n return $this->datatables->generate();\n }", "title": "" } ]
[ { "docid": "949e9b916b05ca1f3d43be58e1760e4d", "score": "0.6509115", "text": "function listadoProyectos() {\n\t\t$class = \"\";\n\t\t$this->buffer = \"\n\t\t\t\t\t<div class='panel panel-danger spancing'>\n\t\t\t\t\t\t<div class='panel-heading'><span class='titulosBlanco'>\" . LISTADODEPROYECTOS . \"</span></div>\n\t\t \t\t\t\t<div class='panel-body'><center><span id='res'></span></center>\" . $this->obtenFiltros(). \"\";\n\t\t$this->buffer .= \"<center>\" . $this->regresaLetras () . \"</center><br>\";\n\t\tif((int) $this->data['idTabla'] > 0){\n\t\t\t$nomtabla = $this->regresaNombreTabla($this->data['idTabla']);\n\t\t\t$no_registros = $this->consultaNoProyectos ();\n\t\t\tif ($no_registros) {\n\t\t\t\t$this->pages = new Paginador ();\n\t\t\t\t$this->pages->items_total = $no_registros;\n\t\t\t\t$this->pages->mid_range = 25;\n\t\t\t\t$this->pages->paginate ();\n\t\t\t\t$resultados = $this->consultaProyectos ();\n\t\t\t}\n\t\t\t\n\t\t\tif (count ( $resultados ) > 0) {\n\t\t\t\t$arrayAreas = $this->catalogoAreas();\n\t\t\t\t$arrayOpera = $this->catalogoUnidadesOperativas();\n\t\t\t\t$arrayProgr = $this->catalogoProgramas();\n\t\t\t\t$this->buffer .= \"<center>\" . $nomtabla . \"</center>\n\t\t\t\t\t\t<table width='95%' class='table tablesorter table-bordered' align='center' id='MyTableActividades'>\n\t\t\t\t\t\t<thead><tr>\" . $this->cabeceras () . \"</tr></thead><tbody>\";\n\t\t\t\t$contador = 1;\t\t\t\n\t\t\t\tif ($this->session ['page'] <= 1)\n\t\t\t\t\t$contadorRen = 1;\n\t\t\t\telse\n\t\t\t\t\t$contadorRen = $this->session ['page'] + 1;\n\t\t\t\tforeach ( $resultados as $resul ) {\n\t\t\t\t\t$class = \"\";\n\t\t\t\t\tif ($contador % 2 == 0)\n\t\t\t\t\t\t$class = \"active\";\n\t\t\t\t\t$this->buffer .= \"\n\t\t\t\t\t\t\t<tr class=' $class alturaComponentesA' id='r-\".$resul ['id'].\"'>\n\t\t\t\t\t\t\t\t<td class='tdleft'>\".$contadorRen.\"</td>\n\t\t\t\t\t\t\t\t<td class='tdleft'>\".trim($arrayProgr[$resul['programa_id']]).\"</td>\n\t\t\t\t\t\t\t\t<td class='tdleft'>\".trim($arrayAreas[$resul['unidadResponsableId']]). \"</a></td>\n\t\t\t\t\t\t\t\t<td class='tdleft'>\".trim($arrayOpera[$resul['unidadOperativaId']]).\"</td>\n\t\t\t\t\t\t\t\t<td class='tdleft'>\".trim($resul['proyecto']).\"</td>\t\n\t\t\t\t\t\t\t\t<td class='tdcenter'>\".substr ( $resul ['fecha_alta'], 0, 10 ).\"<br>Actividades: \".(int)$resul ['noAcciones'].\"</td>\n\t\t\t\t\t\t\t\t<td class='tdcenter'>\"; \n\t\t\t\t\t\t$this->buffer .= \"<button type='button' class='btn btn-default btn-xs actualizaProyectos' id='a-\".$resul ['id'].\"' name='a-\".$resul ['id'].\"' \n\t\t\t\t\t\t\t\t\t\tdata-toggle='tooltip' data-placement='bottom' title='\" . TOOLTIPEDITARPROYECTO . \"'>\n\t\t\t\t\t\t\t\t\t\t<span class='glyphicon glyphicon-pencil'></span>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<button class='btn btn-default btn-xs eliminarProyectos' id='e-\".$resul ['id'].\"' name='e-\".$resul ['id'].\"' \n\t\t\t\t\t\t\t\t\t\tdata-toggle='tooltip' data-placement='bottom' title='\" . TOOLTIPROYECTOELIMINAR . \"'>\n\t\t\t\t\t\t\t\t\t\t<span class='glyphicon glyphicon-trash'></span>\n\t\t\t\t\t\t\t\t\t</button>\";\n\t\t\t\t\t$this->buffer .= \"</td></tr>\";\n\t\t\t\t\t$contador ++;\n\t\t\t\t\t$contadorRen ++;\n\t\t\t\t}\n\t\t\t\t$this->buffer .= \"</body><thead><tr>\n\t\t\t\t\t\t\t<td class='tdleft' colspan='2'>Total: \" . $no_registros . \"</td>\n\t\t\t\t\t\t\t<td colspan='6' class='tdcenter'>&nbsp;</td>\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tr></thead></table>\n\t\t\t\t\t\t\t<table width='100%'><tr>\n\t <td class='tdcenter'>\n\t\t\t\t\t\t\t\t\t\".$this->pages->display_jump_menu () . \n\t\t\t\t\t\t\t\t\t\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t\t\t\t\t\" . $this->pages->display_items_per_page ( $this->session ['regs'] ).\"\n\t \t\t</td>\n\t </tr></table>\";\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$this->buffer .= \"<br><center><h4>Seleccione la tabla temporal a trabajar</h4></center><br>\";\n\t\t}\n\t\t$this->buffer .= \"</div></div>\";\n\t}", "title": "" }, { "docid": "de0334c7e34d4341a8c401362139dbdf", "score": "0.6497629", "text": "function mostrarTablaPorcentajes() {\r\n $this->clasificaciones=$this->consultarClasificaciones(); \r\n $codEstudiante=$this->usuario;\r\n list($valor1,$valor2,$valor3,$valor4,$valor5,$valor6)=$this->porcentajeParametros();\r\n ?>\r\n <div class=\"tablet\">\r\n <div class='tablaCreditos'>\r\n <?\r\n echo $valor1;\r\n echo $valor2;\r\n echo $valor3;\r\n echo $valor4;\r\n echo $valor5;\r\n echo $valor6;\r\n ?>\r\n <?$this->mostrar_convenciones_clasificacion();?>\r\n </div>\r\n </div> <? \r\n }", "title": "" }, { "docid": "a5c1504848ef968a7e40895357342c9e", "score": "0.6440603", "text": "function llenarGridExP()\n {\n global $sContrato;\n global $sIdConvenioAct;\n //Solo es para obtener los nombres de las columnas..\n $sql = \"select\n '' as Wbs,\n '' as Partida,\n '' as Cantidad,\n '' as Isometrico,\n '' as Isom_Refer,\n '' as Instalacion,\n '' as O_Cambio,\n '' as Total\n from\n estimacionxpartida EPP\n where\n EPP.sContrato='\".$Connection->global_sContrato.\"'\n and EPP.sNumeroOrden='\". $this->ordenSeleccionada() .\"'\n \";\n $this->qryEstimaxpartida->setActive(false);\n $this->qryEstimaxpartida->setSql($sql);\n $this->qryEstimaxpartida->setActive(true);\n }", "title": "" }, { "docid": "8ce45dce97698652709ce261007d2795", "score": "0.64046735", "text": "function limpaPropriedade()\r\n\t{\r\n\t\tparent::limpaPropriedade();\r\n\t\t$this->strAcao = \"\";\r\n\t}", "title": "" }, { "docid": "09e53929244a4130a6093315e97bf83e", "score": "0.6351611", "text": "public function getTablaPrueba(){ \n\n //permisos-------------------------------------------------------------------------\n $arrPermisos = $this->getPermisosModulo_Tipo($this->id_modulo,$_COOKIE[$this->NameCookieApp.\"_IDtipo\"]);\n $edita = $arrPermisos[0][\"editar\"];\n $elimina = $arrPermisos[0][\"eliminar\"];\n $consulta = $arrPermisos[0][\"consultar\"];\n //---------------------------------------------------------------------------------\n\n //Define las variables de la tabla a renderizar\n\n //Los campos que se van a ver\n $array_campos = [\n // [\"nombre\"=>\"pkID\"],\n [\"nombre\"=>\"nombre\"],\n [\"nombre\"=>\"descripcion\"],\n [\"nombre\"=>\"tipo\"],\n [\"nombre\"=>\"fecha_ini\"],\n [\"nombre\"=>\"fecha_fin\"]\n //[\"nombre\"=>\"url_archivo\"]\n ];\n //la configuracion de los botones de opciones\n $array_btn =[\n\n [\n \"tipo\"=>\"editar\",\n \"nombre\"=>\"prueba\",\n \"permiso\"=>$edita,\n ],\n [\n \"tipo\"=>\"eliminar\",\n \"nombre\"=>\"prueba\",\n \"permiso\"=>$elimina,\n ],\n [\n \"tipo\"=>\"descarga_multiple\",\n \"nombre\"=>\"prueba\", \n ],\n [\n \"tipo\"=>\"btn_rpta_p\",\n \"nombre\"=>\"ir_prueba\" \n ]\n\n ];\n\n $array_opciones = [\n\t\t \"modulo\"=>\"prueba\",//nombre del modulo definido para jquerycontrollerV2\n\t\t \"title\"=>\"Click Ver Detalles\",//etiqueta html title\n\t\t \"href\"=>\"detalles_prueba.php?id_prueba=\",\n\t\t \"class\"=>\"detail\"//clase que permite que añadir el evento jquery click\n\t\t ];\t\n //---------------------------------------------------------------------------------\n //carga el array desde el DAO\n $pruebas = $this->getPrueba();\n\n\n //Instancia el render\n $this->table_inst = new RenderTable($pruebas,$array_campos,$array_btn,$array_opciones);\n //--------------------------------------------------------------------------------- \n\n //valida si hay usuarios y permiso de consulta\n if( ($pruebas) && ($consulta==1) ){\n\n //ejecuta el render de la tabla\n $this->table_inst->render(); \n\n }elseif(($pruebas) && ($consulta==0)){\n\n $this->table_inst->render_blank();\n\n echo \"<h3>En este momento no tiene permiso de consulta.</h3>\";\n\n }else{\n\n $this->table_inst->render_blank();\n\n echo \"<h3>En este momento no hay registros.</h3>\";\n };\n //---------------------------------------------------------------------------------\n\n }", "title": "" }, { "docid": "31781afb5dad5746d5780ceb32e180bc", "score": "0.63231647", "text": "protected function get_info_parametro_proyecto()\n\t{\n\t\t$ep = $this->get_entorno_id_proyecto();\n\t\t$valor_p = isset( $ep ) ? $ep : 'No definida';\n\t\t$this->consola->mensaje(\"[-p id_proyecto] Asume el valor de la variable de entorno 'TOBA_PROYECTO': $valor_p\");\n\t}", "title": "" }, { "docid": "2cbb3db2fe3a1c2f88486c90e84f81c6", "score": "0.62949735", "text": "public function getPolizasListadoProduccion(){\n\t\t$estado_vigente = Domain_EstadoPoliza::getIdByCodigo('VIGENTE');\n\t\t$estado_afectada = Domain_EstadoPoliza::getIdByCodigo('AFECTADA');\n\t\t$estado_refacturado = Domain_EstadoPoliza::getIdByCodigo('REFACTURADO');\n\n\t\t$date = new DateTime();\n\t\t$hoy = $date->format('Y-m-d');\n\n\t\t$mes_pasado_timestamp = mktime(0, 0, 0, date(\"m\")-1, date(\"d\"), date(\"Y\"));\n\t\t$mes_pasado = date('Y-m-d',$mes_pasado_timestamp);\n\t\t \n\t\t$this->_model_poliza = new Model_Poliza();\n\t\t$rows = $this->_model_poliza\n\t\t->getTable()\n\t\t->createQuery()\n\t\t->andWhere('estado_id = ? OR estado_id = ? OR estado_id = ?',array($estado_vigente,$estado_afectada,$estado_refacturado))\n\t\t//->andWhere(\"fecha_vigencia = ?\" , $fecha)\n\t\t->andWhere(\"fecha_vigencia between ? AND ?\", array($mes_pasado,$hoy))\n\t\t//->getSqlQuery();\n\t\t->execute()\n\t\t->toArray();\n\t\t//echo $rows;\n\t\t//exit;\n\t\treturn $rows;\n\n\t}", "title": "" }, { "docid": "9636bce2b0559db2b8fef093870eae6b", "score": "0.6270073", "text": "public function modelsCadTurmaListProfessor()\t{\t\r\n\t\t\t$objControllerCatTurma\t= new controller_cadTurma();\r\n\r\n\t\t\t$result\t=\t$objControllerCatTurma->controllersCadTurmaListProfessor();\r\n\t\t\t\r\n\t\t\t/*retira o notice em caso de estar vazio*/\r\n\t\t\tif (!empty($result))\t{\r\n\t\t\t\t$HTML\t= null;\t\t\t\t\r\n\t\t\t\twhile($row = mysqli_fetch_assoc($result))\t{\r\n\t\t\t\t\t$HTML\t.=\t'<option value=\"'.$row['id'].'\">'.$row['nome'].'</option>';\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprint($HTML);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "b7b877c5d6f73aa93a17795e455e2edd", "score": "0.6260109", "text": "function f_getListadoPropietariosCompleto($din, $dfi, $ver, $que, $may) {\n global $oProps;\n //array('0 codapa','1 apartamento','2 codpers','3 persona','4 date','5 fecha','6 orden')\n $aPro = ($que) ? $oProps->getPropietariosEntreFechas($din, $dfi, $ver) : $oProps->getPropietariosAlta($ver);\n $html = \"<table class=\\\"table table-hover table-condensed table-ultra\\\">\";\n $dini = \"\";\n $cuer = \"\";\n $cini = \"\";\n foreach ($aPro as $aD) {\n $nomb = ($may) ? $aD[3] : f_primeraMayuscula($aD[3]);\n $dato = ($ver) ? $nomb : $aD[1]; // persona : apartamento.\n $inic = ($ver) ? \"<th style=\\\"width:50%;\\\">Propietarios - \" . substr($aD[3], 0, 1) . \"</th><th style=\\\"width:50%;\\\">Apartamentos</th>\" : \"<th style=\\\"width:10%;\\\">Portal \" . strstr($aD[1], '-', true) . \"&nbsp;</th><th style=\\\"width:90%;\\\">Propietarios</th>\";\n if ($dato != $dini) {\n $html .= ($dini) ? \"<tr><td>$dini</td><td>$cuer</td></tr>\" : \"\";\n $cuer = ($dini) ? \"\" : $cuer;\n $dini = $dato;\n }\n if ($inic != $cini) {\n $html .= \"<tr>$inic</tr>\";\n $cini = $inic;\n }\n $nuevo = ($cuer) ? \" &mdash; \" : \"\"; \n $nuevo .= ($ver) ? $aD[1] : $nomb;\n $nuevo .= ($aD[5]) ? \" (\" . $aD[5] . \")\" : \"\";\n $clase = ($aD[5]) ? \"class=\\\"baja\\\"\" : \"\";\n $cuer .= \"<span $clase>$nuevo</span>\";\n }\n return \"$html<tr><td>$dato</td><td>$cuer</td></tr></table>\";\n}", "title": "" }, { "docid": "a0013f34cc16db1f5d0bae84e4e61954", "score": "0.6215671", "text": "public function __construct() \n {\n //richiama il costruttore della classe FDatabase\n parent::__construct();\n // imposto il nome della tabella\n $this->_nomeTabella = \"clinica\";\n $this->_nomeColonnaPKTabella = \"PartitaIVA\";\n $this->_attributiTabella = $this->_attributiTabella . \"; PartitaIVA, NomeClinica, Titolare, Via, \" \n . \"NumCivico, CAP, Localita, Provincia, Regione, Username, Telefono, \"\n . \"CapitaleSociale, WorkingPlan, Validato\"; \n }", "title": "" }, { "docid": "30c0438885b86b61fe93dce24888d270", "score": "0.6213583", "text": "private function getPropriedade($seq) {\n\n // instancia a instrução de SELECT\n $this->obKDbo->setEntidade('campos_x_propriedades');\n $criteriaCampoProps = new TCriteria();\n $criteriaCampoProps->add(new TFilter('campseq','=',$seq));\n $criteriaCampoProps->add(new TFilter('statseq','=','1'));\n $Result = $this->obKDbo->select(\"*\", $criteriaCampoProps);\n\n //Zera vetor de objetos propriedades\n $this->props = null;\n\n // retorna consulta no banco de propriedades\n while($props = $Result->fetchObject()) {\n\n \tforeach(explode(';', $props->metodo) as $metodo){\n \t\t$property = clone $props;\n \t\t// verifica se a propriedade é uma addItems\n \t\t$property->metodo = $metodo;\n \t\tif($metodo == \"addItems\") {\n \t\t\n \t\t\tif(strpos($property->valor,\"getItens/\") !== false) {\n \t\t\t\t$obSetModel = new TSetModel();\n \t\t\t\t$Itens = $obSetModel->getItensSel($property->valor);\n \t\t\t}\n \t\t\telseif(strpos($property->valor,\"select\") !== false or strpos($property->valor,\"SELECT\") !== false or strpos($property->valor,\"show \") !== false or strpos($property->valor,\"SHOW \") !== false) {\n \t\t\n \t\t\t\t//=====================================================\n \t\t\t\t//apresentação do menu dropdown via chave estrageira\n \t\t\t\t$dboItens = new TDbo();\n \t\t\t\t$QueryItens = $dboItens->sqlExec($property->valor);\n \t\t\t\tif($QueryItens){\n \t\t\t\t\twhile($ObItens = $QueryItens->fetch()) {\n \t\t\n \t\t\t\t\t\tif($ObItens[0] != \"\") {\n \t\t\t\t\t\t\t$Itens[$ObItens[0]] = $ObItens[1];\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\n \t\t\t}else {\n \t\t\n \t\t\t\t$vls = explode(';',$property->valor);\n \t\t\n \t\t\t\tforeach($vls as $v) {\n \t\t\t\t\t$pts = explode('=>',$v);\n \t\t\t\t\t$Itens[$pts[0]] = $pts[1];\n \t\t\t\t}\n \t\t\t}\n \t\t\n \t\t\t//atribui items ao campo seletor\n \t\t\t$property->valor = $Itens;\n \t\t\t$Itens = NULL;\n \t\t}\n \t\t\n \t\t$this->props[$metodo] = $property;\n \t}\n \n }\n return $this->props;\n }", "title": "" }, { "docid": "bc44d9070299eb97cfa38a89f1ada524", "score": "0.6196012", "text": "function listarProcesoCaja(){\n\t\t$this->procedimiento='tes.ft_proceso_caja_sel';\n\t\t$this->transaccion='TES_REN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_caja','int4');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_int_comprobante','int4');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('motivo','text');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_fin','date');\n\t\t$this->captura('id_caja','int4');\n\t\t$this->captura('id_depto_lb','int4');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('monto','numeric');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_inicio','date');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('monto_ren_ingreso','numeric');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//var_dump($this->consulta); exit;\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "3a2cd4d6ac477c511f2e56e4e1c5dcad", "score": "0.6185789", "text": "function f_getPropiedades($per) { \n global $oProps;\n $aPro = $oProps->getPropiedadesPersona($per);\n $tabla = \"<table class=\\\"table table-sm\\\" width=\\\"100%\\\"><tr><th>&nbsp;</th><th>Propiedad</th><th>Orden</th><th>Fecha baja</th><th>&nbsp;</th><th>&nbsp;</th></tr>\";\n foreach ($aPro as $apa => $aDat) {\n $nom = $aDat[0];\n $dat = $aDat[1];\n $fec = $aDat[2];\n $ord = $aDat[3];\n $tabla .= f_getPropiedad($per, $apa, $nom, $dat, $fec, $ord);\n }\n $tabla .= f_getPropiedadNueva($aPro, $per);\n \n return \"$tabla</table>\"; \n}", "title": "" }, { "docid": "38b1858ce838204dfcd3e3fd38bd8e29", "score": "0.61724275", "text": "function aggiungiProdotto($nome, $marca, $tipo, $quantita, $prezzo=0, $prezzoRiv=0) {\n\tcleanString($nome);\n\tif($nome === \"\") {return FALSE;} //un Prodotto senza nome, marca e tipo non ha senso\n\tcleanString($marca);\n\tif($marca === \"\") {return FALSE;}\n\tcleanString($tipo);\n\tif($tipo === \"\") {return FALSE;}\n\tif($quantita === \"\" || $quantita <= 0) {return FALSE;}\n\tif(!checkPrezzo($prezzo)) {$prezzo=0;}\n\tif(!checkPrezzo($prezzoRiv)) {$prezzoRiv=0;}\n\treturn eseguiQuery(\"INSERT Prodotti(Nome, Marca, Tipo, Quantita, Prezzo, PRivendita) VALUES('$nome', '$marca', '$tipo', $quantita, $prezzo, $prezzoRiv)\");\n}", "title": "" }, { "docid": "343cb6e6bc2c0b36b4d16ac8a8b02bd8", "score": "0.61586726", "text": "function listarPresupuestoCmb(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PRE_CBMPRES_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->captura('id_centro_costo','int4');\n $this->captura('estado_reg','VARCHAR');\n $this->captura('id_ep','int4');\n $this->captura('id_gestion','int4');\n $this->captura('id_uo','int4');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('usr_reg','VARCHAR');\n $this->captura('usr_mod','VARCHAR');\n $this->captura('codigo_uo','VARCHAR');\n $this->captura('nombre_uo','VARCHAR');\n $this->captura('ep','TEXT');\n $this->captura('gestion','INTEGER');\n $this->captura('codigo_cc','text');\n $this->captura('nombre_programa','VARCHAR');\n $this->captura('nombre_proyecto','VARCHAR');\n $this->captura('nombre_actividad','VARCHAR');\n $this->captura('nombre_financiador','VARCHAR');\n $this->captura('nombre_regional','VARCHAR');\n $this->captura('tipo_pres','VARCHAR');\n $this->captura('cod_act','VARCHAR');\n $this->captura('cod_fin','VARCHAR');\n $this->captura('cod_prg','VARCHAR');\n $this->captura('cod_pry','VARCHAR');\n $this->captura('estado_pres','VARCHAR');\n $this->captura('estado','VARCHAR');\n $this->captura('id_presupuesto','int4');\n $this->captura('id_estado_wf','int4');\n $this->captura('nro_tramite','VARCHAR');\n $this->captura('id_proceso_wf','int4');\n $this->captura('movimiento_tipo_pres','VARCHAR');\n $this->captura('desc_tipo_presupuesto','VARCHAR');\n $this->captura('sw_oficial','VARCHAR');\n $this->captura('sw_consolidado','VARCHAR');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "912eac437b47f3e9afc9fa4386810181", "score": "0.6139817", "text": "function TablaComprasProductos()\n {\n //Logo #1\n $this->Image(\"./assets/images/logo_white_2.png\" , 15 ,10, 55 , 18 , \"PNG\"); \n //Logo #2\n $this->Image(\"./assets/images/logo_dark.png\" , 95 ,12, 25 , 16 , \"PNG\");\n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$co = new Login();\n $co = $co->ComprasPorId();\n\t\n####################### BLOQUE N° 1 #########################\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 20, '1.5', '');\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(130, 11);\n $this->Cell(20, 5, 'N° DE COMPRA: ', 0 , 0);\n\t$this->SetFont('courier','B',9);\n $this->SetXY(160, 11);\n $this->Cell(20, 5,utf8_decode($co[0]['codcompra']), 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(130, 14);\n $this->Cell(20, 5, 'N° DE SERIE: ', 0 , 0);\n\t$this->SetFont('courier','B',9);\n $this->SetXY(160, 14);\n $this->Cell(20, 5,utf8_decode($co[0]['codseriec']), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(130, 17);\n $this->Cell(20, 5, 'FECHA DE COMPRA: ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(160, 17);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($co[0]['fechacompra']))), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(130, 20);\n $this->Cell(20, 5, 'FECHA DE EMISIÓN: ', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(160, 20);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\n\t\n\t$dias = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : Dias_Transcurridos($co[0]['fechavencecredito'],date(\"Y-m-d\")));\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(130, 23);\n $this->Cell(20, 5, 'STATUS DE COMPRA: ', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(160, 23);\n \n\tif($co[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode($co[0]['statuscompra']), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode($co[0]['statuscompra']), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"VENCIDA\"), 0 , 0);\n\t}\n\n############################### BLOQUE N° 2 #############################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 32, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 32);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(15, 36);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(40, 36);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(100, 36);\n $this->Cell(90, 5, 'Nit :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(116, 36);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\n //Linea de membrete Nro 4\n $this->SetFont('courier','B',8);\n $this->SetXY(146, 36);\n $this->Cell(20, 5, 'Nº DE TELÉF :', 0 , 0);\n $this->SetFont('courier','',8);\n $this->SetXY(170, 36);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(15, 40);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(36, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\n //Linea de membrete Nro 6\n $this->SetFont('courier','B',8);\n $this->SetXY(130, 40);\n $this->Cell(20, 5, 'CORREO :', 0 , 0);\n $this->SetFont('courier','',8);\n $this->SetXY(145, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['correoempresa']), 0 , 0);\n\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',8);\n $this->SetXY(15, 44);\n $this->Cell(20, 5, 'RESPONSABLE :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(38, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',8);\n $this->SetXY(90, 44);\n $this->Cell(20, 5, 'Nit :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(106, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\n\t//Linea de membrete Nro 9\n\t$this->SetFont('courier','B',8);\n $this->SetXY(130, 44);\n $this->Cell(20, 5, 'CORREO :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(145, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n######################### BLOQUE N° 3 ###########################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 52, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 52);\n $this->Cell(20, 5, 'DATOS DEL PROVEEDOR ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(15, 56);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(40, 56);\n $this->Cell(20, 5,utf8_decode($co[0]['nomproveedor']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(90, 56);\n $this->Cell(70, 5, 'Nit :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(106, 56);\n $this->Cell(75, 5,utf8_decode($co[0]['ritproveedor']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(130, 56);\n $this->Cell(90, 5, 'CORREO :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(145, 56);\n $this->Cell(90, 5,utf8_decode($co[0]['emailproveedor']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(15, 60);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(36, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['direcproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(82, 60);\n $this->Cell(20, 5, 'Nº DE TELÉF :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(105, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['tlfproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(130, 60);\n $this->Cell(20, 5, 'CONTACTO :', 0 , 0);\n\t$this->SetFont('courier','',8);\n $this->SetXY(148, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['contactoproveedor']), 0 , 0);\n\t\n\t$this->Ln(8);\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS)\n\t$this->Cell(6,8,'N°',1,0,'C', True);\n\t$this->Cell(20,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(60,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(30,8,'CATEGORIAS',1,0,'C', True);\n\t$this->Cell(20,8,'PRECIO',1,0,'C', True);\n\t$this->Cell(20,8,'CANTIDAD',1,0,'C', True);\n\t$this->Cell(34,8,'IMPORTE',1,1,'C', True);\n\t\n\t########################### BLOQUE N° 4 DE DETALLES DE PRODUCTOS ##########################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 78, 190, 170, '1.5', '');\n\t\n\t$this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesCompras();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$cantidad+=$reg[$i]['cantcompra'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(6,4,$a++,0,0,'C');\n\t$this->CellFitSpace(20,4,utf8_decode($reg[$i][\"codproducto\"]),0,0,'C');\n $this->CellFitSpace(60,4,utf8_decode(getSubString($reg[$i][\"producto\"], 35)),0,0,'C');\n if($reg[$i]['tipoentrada']==\"PRODUCTO\"){\n\t$this->Cell(30,4,utf8_decode($reg[$i][\"nomcategoria\"]),0,0,'C');\n\t} else { \n\t$this->Cell(30,4,utf8_decode($reg[$i][\"categoria\"]),0,0,'C');\n\t}\n\t$this->CellFitSpace(20,4,utf8_decode($con[0]['simbolo'].number_format($reg[$i][\"precio1\"], 2, '.', ',')),0,0,'C');\n\t$this->CellFitSpace(20,4,utf8_decode($reg[$i][\"cantcompra\"]),0,0,'C');\n\t$this->CellFitSpace(34,4,utf8_decode($con[0]['simbolo'].number_format($reg[$i][\"importecompra\"], 2, '.', ',')),0,0,'C');\n $this->Ln();\n }\n \n############################ BLOQUE N° 5 DE TOTALES ################################\n\t//Bloque de Informacion adicional\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 250, 110, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',10);\n $this->SetXY(44, 250);\n $this->Cell(20, 5, 'INFORMACIÓN ADICIONAL', 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 254);\n $this->Cell(20, 5, 'CANTIDAD DE PRODUCTOS :', 0 , 0);\n $this->SetXY(60, 254);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($cantidad), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 257.2);\n $this->Cell(20, 5, 'TIPO DE DOCUMENTO :', 0 , 0);\n $this->SetXY(60, 257.2);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(\"FACTURA\"), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 260.5);\n $this->Cell(20, 5, 'TIPO DE PAGO :', 0 , 0);\n $this->SetXY(60, 260.5);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($co[0]['tipocompra'].\" - \".$variable = ( $co[0]['tipocompra'] == 'CONTADO' ? $co[0]['mediopago'] : $co[0]['formapago'])), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 263.5);\n $this->Cell(20, 5, 'FECHA DE VENCIMIENTO :', 0 , 0);\n $this->SetXY(60, 263.5);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($vence = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : date(\"d-m-Y\",strtotime($co[0]['fechavencecredito'])))), 0 , 0);\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 266.5);\n $this->Cell(20, 5, 'DIAS VENCIDOS :', 0 , 0);\n $this->SetXY(60, 266.5);\n\t$this->SetFont('courier','',9);\n\t\n if($co[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$co[0]['fechavencecredito'])), 0 , 0);\n\t}\n\t\n\t//Linea de membrete Nro 7\n\t$this->SetXY(52, 33);\n\t$this->Codabar(13,271,utf8_decode(\"133923786899444489448576556789\"));\n\t//Linea de membrete Nro 2\n $this->SetFont('courier','B',6.5); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->SetXY(48, 271);\n $this->Cell(20, 5, 'Este documento no constituye un comprobante de pago', 0 , 0);\n\t\n\t//Bloque de Totales de factura\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(122, 250, 78, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 253);\n $this->Cell(20, 5, 'SUBTOTAL IVA '.$co[0][\"ivac\"].'% :', 0 , 0);\n $this->SetXY(167, 253);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($con[0]['simbolo'].number_format($co[0][\"subtotalivasic\"], 2, '.', ',')), 0 , 0);\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 257);\n $this->Cell(20, 5, 'SUBTOTAL IVA 0% :', 0 , 0);\n $this->SetXY(167, 257);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($con[0]['simbolo'].number_format($co[0][\"subtotalivanoc\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 261);\n $this->Cell(20, 5, 'IVA '.$co[0][\"ivac\"].'% :', 0 , 0);\n $this->SetXY(167, 261);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($con[0]['simbolo'].number_format($co[0][\"totalivac\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 265);\n $this->Cell(20, 5, 'DESC '.$co[0][\"descuentoc\"].'% :', 0 , 0);\n $this->SetXY(167, 265);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($con[0]['simbolo'].number_format($co[0][\"totaldescuentoc\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 269);\n $this->Cell(20, 5, 'TOTAL PAGO :', 0 , 0);\n $this->SetXY(167, 269);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($con[0]['simbolo'].number_format($co[0][\"totalc\"], 2, '.', ',')), 0 , 0);\n \n}", "title": "" }, { "docid": "e617db162919a05778ea1100493e6fc4", "score": "0.6137264", "text": "function ListaComboPrueba()\n\t{\n\t\tif($this->ideventonacional!=\"\" && $this->lista!=\"\")\n\t\t{\n\t\t$lista = explode(',', $this->lista);\n\t\tforeach ($lista as $cat) {\n \t\t $consulta = parent::consulta(\"SELECT cat_\".$cat.\"_nombre as nombre, id_\".$cat.\" as id FROM cat_\".$cat.\" where id_eventonacional = \".$this->ideventonacional);\t\t\n\t\t $num_total_registros = parent::num_rows($consulta);\n\t\t if($num_total_registros>0)\n\t\t {\n\t\t\t while ($actual = parent::fetch_assoc($consulta)) \n\t\t\t {\t\t \n\t\t\t $arrData[] = $actual; \t\t\t\t\n\t\t\t }\t\t\t \t\t\t \n\t\t }\n\t\t else\n\t\t {\t\t\t \n\t\t\t $arrData[] = \"\";\n\t\t }\t\n\t\t $arrayenvio[$cat] = $arrData;\t\n\t\t $arrData = array();\n\t\t}\n\t\t}else{\n\t\t\t$arrayenvio = \"\";\n\t\t}\n\t\treturn $arrayenvio;\n\t}", "title": "" }, { "docid": "974c27012d453ecb9873fe5fef05c535", "score": "0.6134911", "text": "private function getProperti()\n\t{\n\t\t# code...\n\t}", "title": "" }, { "docid": "3178ea6e6232d973596e8378c3a75b85", "score": "0.61333495", "text": "function instancia__cambios_estructura()\n\t{\n\t\t$sql = \"SET CONSTRAINTS ALL IMMEDIATE;\";\n\t\t$this->elemento->get_db()->ejecutar($sql);\n\n\t\t$sql = array();\n\t\t$sql[] = \"ALTER TABLE apex_objeto_ei_formulario_ef ADD COLUMN popup_carga_desc_metodo varchar\";\n\t\t$sql[] = \"ALTER TABLE apex_objeto_ei_formulario_ef ADD COLUMN popup_carga_desc_clase varchar\";\n\t\t$sql[] = \"ALTER TABLE apex_objeto_ei_formulario_ef ADD COLUMN popup_carga_desc_include varchar\";\n\t\t$sql[] = \"ALTER TABLE apex_objeto_ei_formulario_ef ADD COLUMN oculto_relaja_obligatorio varchar\";\n\t\t$sql[] = \"ALTER TABLE apex_objeto_ei_formulario_ef ADD COLUMN selec_ancho varchar\";\n\t\t$sql[] = \"ALTER TABLE apex_objeto_ei_formulario_ef ADD COLUMN selec_cant_columnas varchar\";\n\t\t$sql[] = \"ALTER TABLE apex_estilo ADD COLUMN proyecto varchar\";\n\t\t$sql[] = \"ALTER TABLE apex_proyecto ADD COLUMN validacion_bloquear_usuario smallint\";\n\t\t$sql[] = \"ALTER TABLE apex_objeto_cuadro_cc ADD COLUMN modo_inicio_colapsado smallint\";\n\t\t$sql[] = \"\n\t\t\t\tCREATE TABLE apex_ptos_control \n\t\t\t\t(\n\t\t\t\t proyecto VARCHAR(15) NOT NULL,\n\t\t\t\t pto_control VARCHAR(20) NOT NULL,\n\t\t\t\t descripcion VARCHAR(255) NULL\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tCREATE TABLE apex_ptos_control_param\n\t\t\t\t(\n\t\t\t\t proyecto VARCHAR(15) NOT NULL,\n\t\t\t\t pto_control VARCHAR(20) NOT NULL,\n\t\t\t\t parametro VARCHAR(60) NULL\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tCREATE TABLE apex_ptos_control_ctrl\n\t\t\t\t\n\t\t\t\t(\n\t\t\t\t proyecto VARCHAR(15) NOT NULL,\n\t\t\t\t pto_control VARCHAR(20) NOT NULL,\n\t\t\t\t clase VARCHAR(60) NOT NULL,\n\t\t\t\t archivo VARCHAR(255) NULL,\n\t\t\t\t actua_como CHAR(1) DEFAULT 'M' NOT NULL CHECK (actua_como IN ('E','A','M'))\n\t\t\t\t);\n\n\t\t\t\tCREATE TABLE apex_ptos_control_x_evento\n\t\t\t\t(\n\t\t\t\t proyecto \t\t\t\t\tVARCHAR(15) NOT NULL,\n\t\t\t\t pto_control \tVARCHAR(20) NOT NULL,\n\t\t\t\t evento_id \tINTEGER NOT NULL,\n\t\t\t\t objeto\t\t\t\t\tint4\t\tNOT NULL\n\t\t\t\t);\n\t\t\";\n\t\t$this->elemento->get_db()->ejecutar($sql);\n\t}", "title": "" }, { "docid": "7b14cddfc2be3d3d92dde79276e3a390", "score": "0.6125078", "text": "function envios_subscriptos_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios_subscriptos\";\n\t\t$this->campoClave=\"IdEnvioSubscripto\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvioSubscripto\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Guid\",2);\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdEnvio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdSubscripto\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Email\",5);\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdEstadoEnvio\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaHora\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Comentarios\",8);\n$this->agregarVariable2($v);\n\n\t}", "title": "" }, { "docid": "190643f86065d7571dadf2b2e5eda427", "score": "0.61219555", "text": "public function datatables_competenza()\n {\n $this->load->library('datatables');\n $this->load->helper('MY_datatable_helper');\n\n $this->datatables\n ->select('id_competenza, titolo_competenza, risultato_competenza, livello_eqf, profili_associati')\n ->from('v_rrtq_competenza');\n\n $this->datatables->add_column('azione', '$1', 'dt_uc_action(id_competenza,profili_associati)');\n\n return $this->datatables->generate();\n }", "title": "" }, { "docid": "7169b4eef5f9ff255ea4b31d344965fe", "score": "0.61172974", "text": "public function table_trabajando_tipo(){\n\t\t\t$this->objPHPExcel->setActiveSheetIndex(1)\n\t\t\t\t\t->setCellValue('B3', \"UBICACIÓN LABORAL\")\n\t\t\t\t\t->setCellValue('B5', \"¿ESTÁ TRABAJANDO?\")\n\t\t\t\t\t->setCellValue('B6', \"AGO-DIC 2016\")\n\t\t ->setCellValue('B7', \"HOMBRES\")\n\t\t ->setCellValue('B8', \"MUJERES\")\n\t\t ->setCellValue('B9', \"TOTAL\")\n\t\t ->setCellValue('C6', \"SI\")\n\t\t ->setCellValue('D6', \"NO\")\n\t\t ;\n\n\t\t $this->objPHPExcel->setActiveSheetIndex(1)\n\n\t\t //columna 2\t\n\n\t\t ->setCellValue('C7', \"34\")\n\t\t ->setCellValue('C8', \"25\")\n\t\t ->setCellValue('C9', \"59\")\n\n\t\t //columna 2\t\n\n\t\t ->setCellValue('D7', \"5\")\n\t\t ->setCellValue('D8', \"5\")\n\t\t ->setCellValue('D9', \"10\");\n\n\n\t\t //Unir celdas\n\t $this->objPHPExcel->getActiveSheet(1)\n\t \t->mergeCells('B5:D5'); \n\n \tubicacion_laboral::tabla_trabaja_area();\n\n\t\t}", "title": "" }, { "docid": "7f9ac44273af84b23531260afa38c240", "score": "0.61148953", "text": "function consultarTablaPermanencia($porcentaje,$tipoProyecto,$acuerdo) {\n $variable=array('porcentaje'=>$porcentaje,\n 'tipo_proyecto'=>$tipoProyecto,\n 'acuerdo'=>$acuerdo\n );\n $cadena_sql=$this->sql->cadena_sql('consultarTablaPermanencia',$variable);\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\n return $resultado[0]['RENOVACIONES'];\n \n }", "title": "" }, { "docid": "7f9ac44273af84b23531260afa38c240", "score": "0.61148953", "text": "function consultarTablaPermanencia($porcentaje,$tipoProyecto,$acuerdo) {\n $variable=array('porcentaje'=>$porcentaje,\n 'tipo_proyecto'=>$tipoProyecto,\n 'acuerdo'=>$acuerdo\n );\n $cadena_sql=$this->sql->cadena_sql('consultarTablaPermanencia',$variable);\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\n return $resultado[0]['RENOVACIONES'];\n \n }", "title": "" }, { "docid": "7895b75287beee646330a1a0364b7224", "score": "0.60994196", "text": "function listarFormulacionPresuDet(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PRE_LISFORDET_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->capturaCount('importe_total', 'numeric');\n\n //Definicion de la lista del resultado del query\n $this->captura('id_formulacion_presu_detalle','int4');\n $this->captura('id_centro_costo','int4');\n $this->captura('codigo_cc','varchar');\n $this->captura('id_concepto_gasto','int4');\n $this->captura('nombre_ingas','varchar');\n $this->captura('justificacion','varchar');\n $this->captura('nro_contrato','varchar');\n $this->captura('proveedor','varchar');\n $this->captura('hoja_respaldo','varchar');\n $this->captura('periodo_enero','numeric');\n $this->captura('periodo_febrero','numeric');\n $this->captura('periodo_marzo','numeric');\n $this->captura('periodo_abril','numeric');\n $this->captura('periodo_mayo','numeric');\n $this->captura('periodo_junio','numeric');\n $this->captura('periodo_julio','numeric');\n $this->captura('periodo_agosto','numeric');\n $this->captura('periodo_septiembre','numeric');\n $this->captura('periodo_octubre','numeric');\n $this->captura('periodo_noviembre','numeric');\n $this->captura('periodo_diciembre','numeric');\n $this->captura('importe_total','numeric');\n $this->captura('id_partida','int4');\n $this->captura('nombre_partida','varchar');\n $this->captura('id_formulacion_presu','int4');\n $this->captura('id_memoria_calculo','int4');\n\n $this->captura('id_usuario_reg','int4');\n $this->captura('id_usuario_mod','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('fecha_mod','timestamp');\n $this->captura('estado_reg','varchar');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();//echo $this->consulta;exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "41c6b146e6fd1b2f5b554d486f9bceb1", "score": "0.60978127", "text": "public function lista_profe_asignados($id) {\n $sql = Yii::$app->db->createCommand('select distinct nombre_doc, paterno_doc, materno_doc, iddocente\n from proyecto \n inner join pro_estu on proyecto.idproyecto = pro_estu.proyecto_idproyecto\n inner join estudiante on pro_estu.estudiante_idestudiante = estudiante.idestudiante\n inner join reg_asig_tri on pro_estu.idpro_estu = reg_asig_tri.pro_estu_idpro_estu\n inner join docente on reg_asig_tri.docente_iddocente = docente.iddocente \n where idproyecto =:id_proyecto')\n ->bindValue(':id_proyecto', $id)\n ->queryAll();\n return $sql; \n }", "title": "" }, { "docid": "f36ca47693f9f2194e0f26de3484b26b", "score": "0.6095291", "text": "static public function mdlMpOcPendiente(){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT \n\t\tocd.codpro,\n\t\tp.codfab AS codfab,\n \t\tp.despro AS despro,\n\t\tp.undpro,\n\t\tp.colpro,\n\t\t(SELECT \n\t\t des_corta \n\t\tFROM\n\t\t tabla_m_detalle td \n\t\tWHERE cod_tabla = 'TUND' \n\t\t AND p.undpro = td.cod_argumento) AS unidad,\n\t\t(SELECT \n\t\t des_larga \n\t\tFROM\n\t\t tabla_m_detalle td \n\t\tWHERE cod_tabla = 'TCOL' \n\t\t AND p.colpro = td.cod_argumento) AS color,\n\t\tocd.PrePro AS precio,\n\t\tocd.cantni,\n\t\tocd.estac,\n\t\tocd.nro,\n\t\tprov.RazPro AS proveedor,\n\t\tDATE(oc.FecEmi) AS fecemi,\n\t\tDATE(oc.Fecllegada) AS fecllegada \n\t FROM\n\t\tocompra oc \n\t\tLEFT JOIN ocomdet ocd \n\t\t ON oc.nro = ocd.nro \n\t\tLEFT JOIN \n\t\t (SELECT \n\t\t\tpro.CodPro,\n\t\t\tpro.CodFab,\n\t\t\tpro.DesPro,\n\t\t\tpro.undpro,\n\t\t\tpro.ColPro \n\t\t FROM\n\t\t\tproducto pro \n\t\t WHERE pro.estpro = '1') AS p \n\t\t ON ocd.codpro = p.codpro \n\t\tLEFT JOIN proveedor AS prov \n\t\t ON prov.codruc = ocd.codruc \n\t WHERE ocd.estac IN ('ABI', 'PAR') \n\t\tAND ocd.estoco = '03'\");\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetchAll();\n\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "baac06b941b4a1e169ba1b0d47eb39b7", "score": "0.60896677", "text": "abstract public function getInfoProduk();", "title": "" }, { "docid": "010a4edc7f1ac1e7217d959a1eea07d5", "score": "0.60837245", "text": "function mostrarEnacabezadoEspaciosPerdidos() {\r\n ?> \r\n <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"5 px\" cellspacing=\"1px\">\r\n <caption class=\"sigma centrar\"><? echo \"ESPACIOS PERDIDOS\"; ?></caption>\r\n </table>\r\n <?\r\n }", "title": "" }, { "docid": "f95f4b0981ddf99bf08a324b43efa0a6", "score": "0.60823625", "text": "public function __construct()\n {\n $this->setColumnsMeta(array(\n 'puntosRecogidaTiposId'=> array(''),\n 'posicion'=> array('map'),\n 'posicionAddr'=> array('map'),\n ));\n\n $this->setMultiLangColumnsList(array(\n ));\n\n $this->setAvailableLangs(array('es', 'eu'));\n\n $this->setParentList(array(\n 'PuntosRecogidaIbfk1'=> array(\n 'property' => 'PuntosRecogidaTipos',\n 'table_name' => 'PuntosRecogidaTipos',\n ),\n 'PuntosRecogidaIbfk2'=> array(\n 'property' => 'Municipio',\n 'table_name' => 'Municipios',\n ),\n ));\n\n $this->setDependentList(array(\n 'CentrosEmergenciaIbfk1' => array(\n 'property' => 'CentrosEmergencia',\n 'table_name' => 'CentrosEmergencia',\n ),\n 'CubosIbfk4' => array(\n 'property' => 'Cubos',\n 'table_name' => 'Cubos',\n ),\n 'IncidenciasIbfk10' => array(\n 'property' => 'Incidencias',\n 'table_name' => 'Incidencias',\n ),\n 'ParadasIbfk2' => array(\n 'property' => 'Paradas',\n 'table_name' => 'Paradas',\n ),\n 'PostesIbfk1' => array(\n 'property' => 'Postes',\n 'table_name' => 'Postes',\n ),\n 'RecogidasIbfk7' => array(\n 'property' => 'Recogidas',\n 'table_name' => 'Recogidas',\n ),\n 'RutasRelPuntosRecogidaIbfk2' => array(\n 'property' => 'RutasRelPuntosRecogida',\n 'table_name' => 'RutasRelPuntosRecogida',\n ),\n 'TurnosRelCamionesIbfk3' => array(\n 'property' => 'TurnosRelCamiones',\n 'table_name' => 'TurnosRelCamiones',\n ),\n ));\n\n\n $this->setOnDeleteSetNullRelationships(array(\n 'Incidencias_ibfk_10',\n 'Paradas_ibfk_2'\n ));\n\n\n $this->_defaultValues = array(\n 'nombreDescriptivo' => '',\n 'barrio' => '',\n 'calle' => '',\n 'numero' => '',\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }", "title": "" }, { "docid": "89e8df7189a3b66a25d44ceaa26a737a", "score": "0.6081363", "text": "function f_getPropietarios($cod) { \n $oPro = new Propiedad($cod);\n $aPro = $oPro->getPopietarios();\n $tabla = \"<table class=\\\"table table-sm\\\" style=\\\"width:100%\\\"><tr><th>&nbsp;</th><th>Nombre del propietario</th><th>Orden</th><th>Fecha baja</th><th>&nbsp;</th><th>&nbsp;</th></tr>\";\n foreach ($aPro as $per => $aDat) {\n $nom = $aDat[0];\n $dat = $aDat[1];\n $fec = $aDat[2];\n $ord = $aDat[3];\n $tabla .= f_getPropietario($cod, $per, $nom, $dat, $fec, $ord);\n }\n $tabla .= f_getPropietarioNuevo($aPro, $cod);\n \n return \"$tabla</table>\";\n}", "title": "" }, { "docid": "10c1cb64b31d67b81c5347ff518ebb15", "score": "0.60760516", "text": "function CabeceraListadoInmueblesAsociados()\n\t{\n\t\t// Obtenemos la gama de colores a usar\n\t\t$gama_colores=InformesClientesPDF::ObtenerGamaColores($this->color);\t\t\n\t\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetTextColor(0,0,0);\t\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera'][0], $gama_colores['cabecera'][1], $gama_colores['cabecera'][2]);\n\t\t$this->pdf->SetWidths(array(190));\n\t\t$this->pdf->SetAligns(array(\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"INMUEBLES ASOCIADOS\"),true);\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera2'][0], $gama_colores['cabecera2'][1], $gama_colores['cabecera2'][2]);\n\t\t$this->pdf->SetWidths(array(10,30,35,35,60,20));\n\t\t$this->pdf->SetAligns(array(\"C\",\"C\",\"C\",\"C\",\"C\",\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"Id.\",\"Tipología\",\"Municipio\",\"Zona\",\"Dirección\",\"Metros\"),true);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "15abb6c6999965d92c16d3302c6b26c4", "score": "0.60705775", "text": "function cargdiccionario(){\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\t $query=\"SELECT Distinct emociones.nombre,emociones.descripcion,multimedia.fuente\n\t\t\t FROM multimedia \n\t\t\t inner join detalle_multimedia_juego ON idmultimedia=multimedia_idmultimedia\n\t\t\t inner join niveles ON niveles_idniveles=idniveles\n\t\t\t inner join juegos ON idjuegos = niveles.juegos_idjuegos\n\t\t\t inner join detalle_emociones_juegos ON idjuegos=detalle_emociones_juegos.juegos_idjuegos\n\t\t\t inner join emociones ON idemociones=emociones.idemociones\n\t\t\t where juegos.nombre='Diccionario' AND nivel=1\";\n\t\t\t\t $this->query($query);\n\t\t\t\t $this->execute();\n\t\t\t\t $row=$this->resultSet();\n\t\t\t\t return $row;\n\t\t\t}\n\t\t\tcatch(PDOException $e){\n\t\t\t\techo \"Error:\".$e->getMessage();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "521055e19e1d132d2ed5086a107cd744", "score": "0.6068324", "text": "function clsRecordconpoliticas()\n {\n\n global $FileName;\n $this->Visible = true;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record conpoliticas/Error\";\n $this->ds = new clsconpoliticasDataSource();\n $this->InsertAllowed = true;\n $this->UpdateAllowed = true;\n $this->DeleteAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"conpoliticas\";\n $CCSForm = split(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->EditMode = ($FormMethod == \"Edit\");\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->pol_auxiliar = new clsControl(ccsTextBox, \"pol_auxiliar\", \"Pol Auxiliar\", ccsInteger, \"\", CCGetRequestParam(\"pol_auxiliar\", $Method));\n $this->pol_auxiliar->Required = true;\n $this->pol_Cuenta = new clsControl(ccsTextBox, \"pol_Cuenta\", \"Pol Cuenta\", ccsText, \"\", CCGetRequestParam(\"pol_Cuenta\", $Method));\n $this->pol_Cuenta->Required = true;\n $this->pol_semana = new clsControl(ccsTextBox, \"pol_semana\", \"Pol Semana\", ccsInteger, \"\", CCGetRequestParam(\"pol_semana\", $Method));\n $this->pol_Vigencia = new clsControl(ccsTextBox, \"pol_Vigencia\", \"Pol Vigencia\", ccsDate, Array(\"dd\", \"/\", \"mmm\", \"/\", \"yy\"), CCGetRequestParam(\"pol_Vigencia\", $Method));\n $this->pol_Vigencia->Required = true;\n $this->DatePicker_pol_Vigencia = new clsDatePicker(\"DatePicker_pol_Vigencia\", \"conpoliticas\", \"pol_Vigencia\");\n $this->pol_Politica = new clsControl(ccsTextBox, \"pol_Politica\", \"Pol Politica\", ccsText, \"\", CCGetRequestParam(\"pol_Politica\", $Method));\n $this->pol_Valor = new clsControl(ccsTextBox, \"pol_Valor\", \"Pol Valor\", ccsFloat, Array(False, 2, \".\", \",\", False, \"\", \"\", 1, True, \"\"), CCGetRequestParam(\"pol_Valor\", $Method));\n $this->pol_Valor->Required = true;\n $this->pol_RegFecha = new clsControl(ccsTextBox, \"pol_RegFecha\", \"Pol Reg Fecha\", ccsDate, Array(\"dd\", \"/\", \"mmm\", \"/\", \"yy\"), CCGetRequestParam(\"pol_RegFecha\", $Method));\n $this->pol_RegFecha->Required = true;\n $this->pol_Ususraio = new clsControl(ccsTextBox, \"pol_Ususraio\", \"Pol Ususraio\", ccsText, \"\", CCGetRequestParam(\"pol_Ususraio\", $Method));\n $this->pol_Ususraio->Required = true;\n $this->Button_Insert = new clsButton(\"Button_Insert\");\n $this->Button_Update = new clsButton(\"Button_Update\");\n $this->Button_Delete = new clsButton(\"Button_Delete\");\n $this->Button_Cancel = new clsButton(\"Button_Cancel\");\n }\n }", "title": "" }, { "docid": "d6b6088985a93fb21e6b6bb69bfb9943", "score": "0.60630745", "text": "function listarFormulacionPresu(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PRE_LISFORMU_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\n //Definicion de la lista del resultado del query\n $this->captura('id_formulacion_presu','int4');\n $this->captura('observaciones','text');\n $this->captura('id_usuario_responsable','int4');\n $this->captura('desc_persona','text');\n $this->captura('id_usuario_reg','int4');\n $this->captura('id_usuario_mod','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('fecha_mod','timestamp');\n $this->captura('estado_reg','varchar');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('id_gestion','int4');\n\t\t\t\t$this->captura('usu_creacion','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();//echo $this->consulta;exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "46312b649433a204f9c5671f0d005179", "score": "0.60175496", "text": "function listarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_sel';\n\t\t$this->transaccion='PRE_PRE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n\n\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_presupuesto','int4');\n\t\t$this->captura('id_centro_costo','int4');\n\t\t$this->captura('codigo_cc','text');\n\t\t$this->captura('tipo_pres','varchar');\n\t\t$this->captura('estado_pres','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('desc_tipo_presupuesto','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('movimiento_tipo_pres','varchar');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('obs_wf','varchar');\n\t\t$this->captura('sw_consolidado','VARCHAR');\n\t\t$this->captura('id_categoria_prog','int4');\n\t\t$this->captura('codigo_categoria','varchar');\n\t\t$this->captura('mov_pres','varchar');\n\t\t$this->captura('momento_pres','varchar');\n\t\t$this->captura('id_uo','int4');\n\t\t$this->captura('codigo_uo','varchar');\n\t\t$this->captura('nombre_uo','varchar');\n\t\t$this->captura('id_tipo_cc','int4');\n\t\t$this->captura('desc_tcc','varchar');\n\t\t$this->captura('fecha_inicio_pres','date');\n\t\t$this->captura('fecha_fin_pres','date');\n\t\t$this->captura('codigo_tcc','varchar');\n\t\t$this->captura('descripcion_tcc','varchar');\n\t\t$this->captura('estado_reg_uo','varchar');\n\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();//echo $this->consulta;exit;\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "9c49441228220ef2491bd73b35516f97", "score": "0.60123205", "text": "function listarPartidaInstitucional(){\n $this->procedimiento='pre.f_rep_evaluacion_de_partidas';\n $this->transaccion='REP_PAR_INST';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this-> setCount(false);\n $this->setTipoRetorno('record');\n\n $this->setParametro('id_cp_programa','id_cp_programa','int4');\n $this->setParametro('id_categoria_programatica','id_categoria_programatica','int4');\n $this->setParametro('id_partida','id_partida','int4');//nuevo\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('id_gestion','id_gestion','int4');\n $this->setParametro('tipo_pres','tipo_pres','VARCHAR');\n\n $this->setParametro('nivel','nivel','int4');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setParametro('tipo_movimiento','tipo_movimiento','varchar');\n\n\n $this->captura('id_partida','int4');\n $this->captura('codigo_partida','varchar');\n $this->captura('nombre_partida','varchar');\n $this->captura('nivel_partida','int4');\n\n $this->captura('c1','NUMERIC');\n $this->captura('c2','NUMERIC');\n $this->captura('c3','NUMERIC');\n $this->captura('c4','NUMERIC');\n $this->captura('c5','NUMERIC');\n $this->captura('c6','NUMERIC');\n $this->captura('c7','NUMERIC');\n $this->captura('c8','NUMERIC');\n $this->captura('c9','NUMERIC');\n $this->captura('c10','NUMERIC');\n $this->captura('c11','NUMERIC');\n $this->captura('c12','NUMERIC');\n $this->captura('b1', 'NUMERIC');\n $this->captura('b2', 'NUMERIC');\n $this->captura('b3', 'NUMERIC');\n $this->captura('b4', 'NUMERIC');\n $this->captura('b5', 'NUMERIC');\n $this->captura('b6', 'NUMERIC');\n $this->captura('b7', 'NUMERIC');\n $this->captura('b8', 'NUMERIC');\n $this->captura('b9', 'NUMERIC');\n $this->captura('b10', 'NUMERIC');\n $this->captura('b11', 'NUMERIC');\n $this->captura('b12', 'NUMERIC');\n $this->captura('f1','NUMERIC');\n $this->captura('f2','NUMERIC');\n $this->captura('f3','NUMERIC');\n $this->captura('f4','NUMERIC');\n $this->captura('f5','NUMERIC');\n $this->captura('f6','NUMERIC');\n $this->captura('f7','NUMERIC');\n $this->captura('f8','NUMERIC');\n $this->captura('f9','NUMERIC');\n $this->captura('f10','NUMERIC');\n $this->captura('f11','NUMERIC');\n $this->captura('f12','NUMERIC');\n\n $this->captura('diferencia_compremetido1','NUMERIC');\n $this->captura('diferencia_compremetido2','NUMERIC');\n $this->captura('diferencia_compremetido3','NUMERIC');\n $this->captura('diferencia_compremetido4','NUMERIC');\n $this->captura('diferencia_compremetido5','NUMERIC');\n $this->captura('diferencia_compremetido6','NUMERIC');\n $this->captura('diferencia_compremetido7','NUMERIC');\n $this->captura('diferencia_compremetido8','NUMERIC');\n $this->captura('diferencia_compremetido9','NUMERIC');\n $this->captura('diferencia_compremetido10','NUMERIC');\n $this->captura('diferencia_compremetido11','NUMERIC');\n $this->captura('diferencia_compremetido12','NUMERIC');\n\n $this->captura('diferencia_ejecutado1','NUMERIC');\n $this->captura('diferencia_ejecutado2','NUMERIC');\n $this->captura('diferencia_ejecutado3','NUMERIC');\n $this->captura('diferencia_ejecutado4','NUMERIC');\n $this->captura('diferencia_ejecutado5','NUMERIC');\n $this->captura('diferencia_ejecutado6','NUMERIC');\n $this->captura('diferencia_ejecutado7','NUMERIC');\n $this->captura('diferencia_ejecutado8','NUMERIC');\n $this->captura('diferencia_ejecutado9','NUMERIC');\n $this->captura('diferencia_ejecutado10','NUMERIC');\n $this->captura('diferencia_ejecutado11','NUMERIC');\n $this->captura('diferencia_ejecutado12','NUMERIC');\n\n $this->captura('acumulado_comprendido1','NUMERIC');\n $this->captura('acumulado_comprendido2','NUMERIC');\n $this->captura('acumulado_comprendido3','NUMERIC');\n $this->captura('acumulado_comprendido4','NUMERIC');\n $this->captura('acumulado_comprendido5','NUMERIC');\n $this->captura('acumulado_comprendido6','NUMERIC');\n $this->captura('acumulado_comprendido7','NUMERIC');\n $this->captura('acumulado_comprendido8','NUMERIC');\n $this->captura('acumulado_comprendido9','NUMERIC');\n $this->captura('acumulado_comprendido10','NUMERIC');\n $this->captura('acumulado_comprendido11','NUMERIC');\n $this->captura('acumulado_comprendido12','NUMERIC');\n\n $this->captura('acumulado_ejecutado1','NUMERIC');\n $this->captura('acumulado_ejecutado2','NUMERIC');\n $this->captura('acumulado_ejecutado3','NUMERIC');\n $this->captura('acumulado_ejecutado4','NUMERIC');\n $this->captura('acumulado_ejecutado5','NUMERIC');\n $this->captura('acumulado_ejecutado6','NUMERIC');\n $this->captura('acumulado_ejecutado7','NUMERIC');\n $this->captura('acumulado_ejecutado8','NUMERIC');\n $this->captura('acumulado_ejecutado9','NUMERIC');\n $this->captura('acumulado_ejecutado10','NUMERIC');\n $this->captura('acumulado_ejecutado11','NUMERIC');\n $this->captura('acumulado_ejecutado12','NUMERIC');\n\n\n $this->captura('total_programado', 'NUMERIC');\n $this->captura('importe_aprobado', 'NUMERIC');\n $this->captura('modificaciones', 'NUMERIC');\n $this->captura('total_comprometido', 'NUMERIC');\n $this->captura('total_ejecutado', 'NUMERIC');\n\n\n $this->armarConsulta();\n //echo $this->consulta;exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n return $this->respuesta;\n }", "title": "" }, { "docid": "c35c5f648f6d77bcac842c3c09643c95", "score": "0.600861", "text": "function CabeceraListado()\n\t{\n\t\t// Obtenemos la gama de colores a usar\n\t\t$gama_colores=InformesClientesPDF::ObtenerGamaColores($this->color);\t\t\n\t\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetTextColor(0,0,0);\t\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera'][0], $gama_colores['cabecera'][1], $gama_colores['cabecera'][2]);\n\t\t$this->pdf->SetWidths(array(190));\n\t\t$this->pdf->SetAligns(array(\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"CLIENTES\"),true);\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera2'][0], $gama_colores['cabecera2'][1], $gama_colores['cabecera2'][2]);\n\t\t$this->pdf->SetWidths(array(40,25,30,40,20,35));\n\t\t$this->pdf->SetAligns(array(\"C\",\"C\",\"C\",\"C\",\"C\",\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"Nombre completo\",\"Provincia\",\"Municipio\",\"Dirección\",\"Teléfono\",\"Correo\"),true);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "1c59823bd46eb46804a6e9c3558d6874", "score": "0.6004506", "text": "function listarPartidaEjecutado(){\n $this->procedimiento='pre.f_rep_evaluacion_de_partidas';\n $this->transaccion='REP_PAR_EJE';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this-> setCount(false);\n $this->setTipoRetorno('record');\n\n $this->setParametro('id_cp_programa','id_cp_programa','int4');\n $this->setParametro('id_categoria_programatica','id_categoria_programatica','int4');\n $this->setParametro('id_partida','id_partida','int4');//nuevo\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('id_gestion','id_gestion','int4');\n $this->setParametro('tipo_pres','tipo_pres','VARCHAR');\n $this->setParametro('tipo_reporte','tipo_reporte','VARCHAR');\n $this->setParametro('nivel','nivel','int4');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setParametro('tipo_movimiento','tipo_movimiento','varchar');\n \n\n $this->captura('id_partida','int4');\n $this->captura('codigo_partida','varchar');\n $this->captura('nombre_partida','varchar');\n $this->captura('nivel_partida','int4');\n $this->captura('cod_prg','varchar');\n\n\n $this->captura('c1','NUMERIC');\n $this->captura('c2','NUMERIC');\n $this->captura('c3','NUMERIC');\n $this->captura('c4','NUMERIC');\n $this->captura('c5','NUMERIC');\n $this->captura('c6','NUMERIC');\n $this->captura('c7','NUMERIC');\n $this->captura('c8','NUMERIC');\n $this->captura('c9','NUMERIC');\n $this->captura('c10','NUMERIC');\n $this->captura('c11','NUMERIC');\n $this->captura('c12','NUMERIC');\n\n $this->captura('b1', 'NUMERIC');\n $this->captura('b2', 'NUMERIC');\n $this->captura('b3', 'NUMERIC');\n $this->captura('b4', 'NUMERIC');\n $this->captura('b5', 'NUMERIC');\n $this->captura('b6', 'NUMERIC');\n $this->captura('b7', 'NUMERIC');\n $this->captura('b8', 'NUMERIC');\n $this->captura('b9', 'NUMERIC');\n $this->captura('b10', 'NUMERIC');\n $this->captura('b11', 'NUMERIC');\n $this->captura('b12', 'NUMERIC');\n\n $this->captura('diferencia1', 'NUMERIC');\n $this->captura('diferencia2', 'NUMERIC');\n $this->captura('diferencia3', 'NUMERIC');\n $this->captura('diferencia4', 'NUMERIC');\n $this->captura('diferencia5', 'NUMERIC');\n $this->captura('diferencia6', 'NUMERIC');\n $this->captura('diferencia7', 'NUMERIC');\n $this->captura('diferencia8', 'NUMERIC');\n $this->captura('diferencia9', 'NUMERIC');\n $this->captura('diferencia10', 'NUMERIC');\n $this->captura('diferencia11', 'NUMERIC');\n $this->captura('diferencia12', 'NUMERIC');\n\n $this->captura('acumulado1', 'NUMERIC');\n $this->captura('acumulado2', 'NUMERIC');\n $this->captura('acumulado3', 'NUMERIC');\n $this->captura('acumulado4', 'NUMERIC');\n $this->captura('acumulado5', 'NUMERIC');\n $this->captura('acumulado6', 'NUMERIC');\n $this->captura('acumulado7', 'NUMERIC');\n $this->captura('acumulado8', 'NUMERIC');\n $this->captura('acumulado9', 'NUMERIC');\n $this->captura('acumulado10', 'NUMERIC');\n $this->captura('acumulado11', 'NUMERIC');\n $this->captura('acumulado12', 'NUMERIC');\n\n\n $this->captura('total_programado', 'NUMERIC');\n $this->captura('importe_aprobado', 'NUMERIC');\n $this->captura('modificaciones', 'NUMERIC');\n $this->captura('total_comp_ejec', 'NUMERIC');\n\n\n\n $this->armarConsulta();\n //echo $this->consulta;exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "ddcfc63cd32d7f372564d8f20b8e9b64", "score": "0.60035807", "text": "private function pendientesPorColaConceptoActivacion(){\n if($this->get_request_method() != \"GET\"){\n $this->response('',406);\n }\n\n $queryConcepto=\" select \".\n \" C1.CONCEPTO_ID \".\n \" , count(*) as CANTIDAD \".\n \" , sum(if(C1.RANGO_PENDIENTE='Entre 0-2', 1,0)) as 'Entre02',\".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 3-4', 1,0)) as 'Entre34', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 5-6', 1,0)) as 'Entre56', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 7-12', 1,0)) as 'Entre712', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 13-24', 1,0)) as 'Entre1324', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 25-48', 1,0)) as 'Entre2548', \".\n \" sum(if(C1.RANGO_PENDIENTE='Mas de 48', 1,0)) as 'Masde48' \".\n \" from ( \".\n \" SELECT \".\n \" PP.`PEDIDO_ID`, \".\n \" PP.`SUBPEDIDO_ID`, \".\n \" PP.`SOLICITUD_ID`, \".\n \" PP.`TIPO_ELEMENTO_ID`, \".\n \" PP.`FECHA_ESTADO`, \".\n \" PP.`FECHA_FINAL`, \".\n \" PP.`PRODUCTO`, \".\n \" PP.`CONCEPTO_ID`, \".\n \" PP.`RANGO_CARGA`, \".\n \" PP.`FECHA_CARGA`, \".\n \" DATE_FORMAT((PP.FECHA_CARGA),'%H') AS HORA_CARGA, \".\n \" PP.`DIA_CARGA`, \".\n \" PP.`SEMANA_CARGA`, \".\n \" PP.`SEMANA_ANO_CARGA`, \".\n \" PP.`FUENTE`, \".\n \" PP.`STATUS`, \".\n \" PP.`VIEWS` \".\n \" , CAST(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO)) AS CHAR(255)) AS TIEMPO_PENDIENTE_FULL \".\n \" , CASE \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 0 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 2 THEN 'Entre 0-2' \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 3 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 4 THEN 'Entre 3-4' \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 5 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 6 THEN 'Entre 5-6' \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) > 6 THEN 'Mas de 6' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 0 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 2 THEN 'Entre 0-2' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 3 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 4 THEN 'Entre 3-4' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 5 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 6 THEN 'Entre 5-6' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 7 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 12 THEN 'Entre 7-12' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 13 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 24 THEN 'Entre 13-24' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 25 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 48 THEN 'Entre 25-48' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) > 48 THEN 'Mas de 48' \".\n \" END AS RANGO_PENDIENTE, \".\n \" \tPP.COLA_ID \".\n \" FROM informe_activacion_pendientesm PP \".\n \" where (PP.STATUS= 'PENDI_ACTIVACION' ) \".\n \" ) C1 \".\n \" group by C1.CONCEPTO_ID order by count(*) DESC \";\n\n\n $r = $this->mysqli->query($queryConcepto) or die($this->mysqli->error.__LINE__);\n\n $resultConcepto = array();\n if($r->num_rows > 0){\n\n while($row = $r->fetch_assoc()){\n $resultConcepto[] = $row;\n }\n }\n\n $queryCola=\" select \".\n \" C1.COLA_ID \".\n \" , count(*) as CANTIDAD \".\n \" , sum(if(C1.RANGO_PENDIENTE='Entre 0-2', 1,0)) as 'Entre02',\".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 3-4', 1,0)) as 'Entre34', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 5-6', 1,0)) as 'Entre56', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 7-12', 1,0)) as 'Entre712', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 13-24', 1,0)) as 'Entre1324', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 25-48', 1,0)) as 'Entre2548', \".\n \" sum(if(C1.RANGO_PENDIENTE='Mas de 48', 1,0)) as 'Masde48' \".\n \" from ( \".\n \" SELECT \".\n \" PP.`PEDIDO_ID`, \".\n \" PP.`SUBPEDIDO_ID`, \".\n \" PP.`SOLICITUD_ID`, \".\n \" PP.`TIPO_ELEMENTO_ID`, \".\n \" PP.`FECHA_ESTADO`, \".\n \" PP.`FECHA_FINAL`, \".\n \" PP.`PRODUCTO`, \".\n \" PP.`CONCEPTO_ID`, \".\n \" PP.`RANGO_CARGA`, \".\n \" PP.`FECHA_CARGA`, \".\n \" DATE_FORMAT((PP.FECHA_CARGA),'%H') AS HORA_CARGA, \".\n \" PP.`DIA_CARGA`, \".\n \" PP.`SEMANA_CARGA`, \".\n \" PP.`SEMANA_ANO_CARGA`, \".\n \" PP.`FUENTE`, \".\n \" PP.`STATUS`, \".\n \" PP.`VIEWS` \".\n \" , CAST(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO)) AS CHAR(255)) AS TIEMPO_PENDIENTE_FULL \".\n \" , CASE \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 0 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 2 THEN 'Entre 0-2' \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 3 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 4 THEN 'Entre 3-4' \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 5 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 6 THEN 'Entre 5-6' \".\n //\" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) > 6 THEN 'Mas de 6' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 0 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 2 THEN 'Entre 0-2' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 3 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 4 THEN 'Entre 3-4' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 5 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 6 THEN 'Entre 5-6' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 7 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 12 THEN 'Entre 7-12' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 13 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 24 THEN 'Entre 13-24' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 25 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 48 THEN 'Entre 25-48' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) > 48 THEN 'Mas de 48' \".\n \" END AS RANGO_PENDIENTE, \".\n \" \tPP.COLA_ID \".\n \" FROM informe_activacion_pendientesm PP \".\n \" where (PP.STATUS= 'PENDI_ACTIVACION' ) \".\n \" ) C1 \".\n \" group by C1.COLA_ID order by count(*) DESC \";\n\n\n\n $r = $this->mysqli->query($queryCola) or die($this->mysqli->error.__LINE__);\n\n if($r->num_rows > 0){\n $resultCola = array();\n while($row = $r->fetch_assoc()){\n //$row['label']=\"Concepto \".$row['label'];\n $resultCola[] = $row;\n }\n $this->response($this->json(array($resultCola,$resultConcepto)), 200); // send user details\n }\n\n $this->response('',204); // If no records \"No Content\" status\n\n\n }", "title": "" }, { "docid": "1d57288c365c142c859d0f936f648564", "score": "0.5998526", "text": "function ConsultarTiposCuerpo()\n\t{\n\t\t//Buscando los tipos de cuerpo existentes\n\t\t$consultar = new Consultar();\n\t\t$result = $consultar->_ConsultarTiposCuerpo();\n\t\t$num_rows = $result->num_rows;\n\t\t$cuerpos = array();\n\n\t\tfor($i=0; $i<$num_rows; $i++)\n\t\t{\n\t\t\t$fila = $result->fetch_assoc();\n\t\t\t$cuerpo = array(\"id\"=>$fila['id'],\"nb_cuerpo\"=>$fila['nb_cuerpo'],\n\t\t\t\t \"desc_tipocuerpo\"=>$fila['desc_tipocuerpo'],\n\t\t\t\t \"url_img\"=>$fila['url_img']);\n\t\t\tarray_push($cuerpos, $cuerpo);\n\t\t}//for\n\t\t\n\t\treturn $datos = array(\"cuerpos\"=>$cuerpos);\n\t}", "title": "" }, { "docid": "2c9b06bdb8b70bbbd60a982329547693", "score": "0.5997993", "text": "public function cargarFormPropietarioCuenta()\r\n {\r\n $cabana = new CabanaData();\r\n $data[\"propietarios\"] = $cabana->obtenerPropietarios();\r\n $this->view->show(\"registrarPropietarioCuenta.php\", $data);\r\n }", "title": "" }, { "docid": "c586cdad790c11a2f29c384fd3cacd67", "score": "0.599566", "text": "function generarCabecera(){\r\n\t\t$conf_par_tablewidths=array(10,90,25,25,25,25);\r\n $conf_par_tablealigns=array('C','C','C','C','C','C');\r\n $conf_par_tablenumbers=array(0,0,0,0,0,0);\r\n $conf_tableborders=array();\r\n $conf_tabletextcolor=array();\r\n\t\t\r\n\t\t$this->tablewidths=$conf_par_tablewidths;\r\n $this->tablealigns=$conf_par_tablealigns;\r\n $this->tablenumbers=$conf_par_tablenumbers;\r\n $this->tableborders=$conf_tableborders;\r\n $this->tabletextcolor=$conf_tabletextcolor;\r\n\t\t\r\n\t\t$RowArray = array(\r\n \t\t\t'nro' => 'Nro',\r\n 'casa' => 'Región/Casa Oración',\r\n 's1' => 'Fecha',\r\n 's2' => 'Hermanos',\r\n 's3' => 'Hermanas',\r\n 's4' => 'Total');\r\n \r\n $this-> MultiRow($RowArray,false,1);\r\n }", "title": "" }, { "docid": "a51c2fdded32a91b834c1bccdcbd633e", "score": "0.5984188", "text": "private function getProjetos()\n {\n $objConexaoLocalOrcamentos = new ConexaoLocalOrcamentos();\n $objIMConexaoBancoDados = $objConexaoLocalOrcamentos->getConexao();\n\n $this->query = \"\n select\n cd_projeto,\n ds_projeto\n from\n projetos\n order by\n ds_projeto asc,\n dt_projeto desc\n \";\n\n $arrValores = $objIMConexaoBancoDados->query($this->query);\n\n foreach ($arrValores as $key => $value) \n {\n $arrNovo[$value['cd_projeto']] = $value['ds_projeto'];\n }\n\n return $arrNovo; \n }", "title": "" }, { "docid": "d671121468324a3cc0a5769ede6062d1", "score": "0.5981155", "text": "public function crearOrdenesReparacion() {\n //$this->asignarDatosVista('servicios', invocarNewsoftServicio('servicios'));\n //$this->asignarDatosVista('piezas', invocarNewsoftServicio('piezas'));\n $this->mostrarVista('panel/asesor/ordenreparacion');\n }", "title": "" }, { "docid": "16281abcea33bc7e799a7c32cf7c1218", "score": "0.59777486", "text": "function mostrar_propina($objeto){\n\t\t\t$sql=\"\tSELECT\n\t\t\t\t\t\tpropina\n\t\t\t\t\tFROM\n\t\t\t\t\t\tcom_configuracion\";\n\t\t\t// return $sql\n\t $result = $this->queryArray($sql);\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "4f624a1800835f9c7d5fc9ef1e83dec7", "score": "0.59710395", "text": "function reportePOA(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPPOA_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('id_objetivo','int4');\n $this->captura('id_objetivo_fk','int4');\n $this->captura('codigo','varchar');\n $this->captura('nivel_objetivo','int4');\n $this->captura('hijos','int4');\n $this->captura('nietos','int4');\n $this->captura('hermanos','int4');\n $this->captura('sw_transaccional','varchar');\n $this->captura('cantidad_verificacion','numeric');\n $this->captura('unidad_verificacion','varchar');\n $this->captura('ponderacion','numeric');\n $this->captura('fecha_inicio','date');\n $this->captura('tipo_objetivo','varchar');\n $this->captura('descripcion','varchar');\n $this->captura('linea_base','varchar');\n $this->captura('indicador_logro','varchar');\n\n $this->captura('periodo_ejecucion','varchar');\n $this->captura('producto','varchar');\n $this->captura('fecha_fin','date');\n\n $this->captura('gestion','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "7d7a699d024584ee447d30a9afa13825", "score": "0.5965144", "text": "public function ConsultaPaises(){\r\n //Lo hacemos con lasentecnia parent::_construct(); \r\n parent::__construct();\r\n }", "title": "" }, { "docid": "5a64b6466e6855f889a0dedc63798856", "score": "0.5961214", "text": "public function lista_uo($dep_id,$tp){\n $tabla='';\n $operaciones=$this->mrep_operaciones->operaciones_por_regionales($dep_id);\n $dep=$this->model_proyecto->get_departamento($dep_id);\n $head='';$foot='';\n $tab='<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\" align=\"center\">';\n if($tp==1){\n $head='<script src = \"'.base_url().'mis_js/programacion/programacion/tablas.js\"></script>\n <h3>REGIONAL '.strtoupper($dep[0]['dep_departamento']).' - <a href=\"'.site_url(\"\").'/rep_ediciones/'.$dep_id.'\" target=\"_blank\" title=\"REPORTE PDF\"><img src=\"'.base_url().'assets/Iconos/printer.png\" WIDTH=\"20\" HEIGHT=\"20\"/></a></h3>\n <div class=\"jarviswidget jarviswidget-color-darken\">\n <header>\n <span class=\"widget-icon\"> <i class=\"fa fa-arrows-v\"></i> </span>\n <h2 class=\"font-md\"><strong>UNIDADES / PROYECTOS</strong></h2> \n </header>\n <div>\n <div class=\"widget-body no-padding\">';\n\n $foot='</div>\n </div>\n </div>';\n $tab='<table id=\"dt_basic\" class=\"table table-bordered\" style=\"width:100%;\" border=1>';\n }\n \n $nro=0;\n $tabla.='\n '.$head.'\n '.$tab.'\n <thead>\n <tr class=\"modo1\">\n <th style=\"width:1%; text-align: center;\" colspan=4></th>\n <th style=\"width:10%; text-align: center;\" colspan=3>CERTIFICACIONES POA</th>\n <th style=\"width:20%; text-align: center;\" colspan=3>MODIFICACIONES POA</th>\n </tr>\n <tr class=\"modo1\">\n <th style=\"width:1%; text-align: center;\">#</th>\n <th style=\"width:10%; text-align: center;\">APERTURA PROGRAM&Aacute;TICA</th>\n <th style=\"width:20%; text-align: center;\">UNIDAD / PROYECTO</th>\n <th style=\"width:10%; text-align: center;\">TIPO DE PROYECTO</th>\n <th style=\"width:8.5%; text-align: center;\">EDICI&Oacute;N</th>\n <th style=\"width:8.5%; text-align: center;\">CERT. POA</th>\n <th style=\"width:8.5%; text-align: center;\">CERT. TOTAL</th>\n <th style=\"width:8.5%; text-align: center;\">MOD. OPE.</th>\n <th style=\"width:8.5%; text-align: center;\">MOD. REQ.</th>\n <th style=\"width:8.5%; text-align: center;\">TOTAL</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;$sum_cpoa=0;$sum_mope=0;$sum_mreq=0; $sum_cert_normal=0; $sum_cert_edit=0;\n foreach ($operaciones as $row){\n $cpoas_total=$this->model_ejecucion->list_edicion_cpoas_unidad($row['proy_id']); /// nro cert poas\n $cpoas=$this->model_ejecucion->list_cert_editados_unidad($row['proy_id'],0); /// Certificados Normal\n $cpoas_edit=$this->model_ejecucion->list_cert_editados_unidad($row['proy_id'],1); /// Certificados Editados\n $mod=$this->list_modificaciones_uni($row['proy_id']); /// Modificaciones\n $nro++;$nro_cpoa=0;\n if(count($cpoas_total)!=0){\n $nro_cpoa=$cpoas_total[0]['nro'];\n }\n\n $nro_cert_normal=0;\n $nro_cert_edit=0;\n if(count($cpoas)!=0){\n $nro_cert_normal=count($cpoas);\n }\n if(count($cpoas_edit)!=0){\n $nro_cert_edit=count($cpoas_edit);\n }\n $tabla.='<tr class=\"modo1\">';\n $tabla.='\n <td style=\"width: 1%; text-align: left;\" style=\"height:11px;\">'.$nro.'</td>\n <td style=\"width: 10%; text-align: center;\">'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</td>\n <td style=\"width: 20%; text-align: left;\">'.$row['proy_nombre'].'</td>\n <td style=\"width: 10%; text-align: left;\">'.$row['tp_tipo'].'</td>\n <td style=\"width: 8%; text-align: center;\">'.$nro_cert_normal.'</td>\n <td style=\"width: 8.5%; text-align: center;\">'.$nro_cert_edit.'</td>\n <td style=\"width: 8.5%; text-align: center;\">'.$nro_cpoa.'</td>\n <td style=\"width: 8.5%; text-align: center;\" bgcolor=\"#dff0d8\">'.$mod[1].'</td>\n <td style=\"width: 8.5%; text-align: center;\" bgcolor=\"#dff0d8\">'.$mod[2].'</td>\n <td style=\"width: 8.5%; text-align: center;\" bgcolor=\"#dff0d8\">'.$mod[3].'</td>\n </tr>';\n $sum_cpoa=$sum_cpoa+$nro_cpoa;\n $sum_mope=$sum_mope+$mod[1];\n $sum_mreq=$sum_mreq+$mod[2];\n $sum_cert_normal=$sum_cert_normal+$nro_cert_normal;\n $sum_cert_edit=$sum_cert_edit+$nro_cert_edit;\n } \n $tabla.='</tbody>\n <tr class=\"modo1\">\n <td colspan=4>TOTAL</td>\n <td style=\"text-align: center;\">'.$sum_cert_normal.'</td>\n <td style=\"text-align: center;\">'.$sum_cert_edit.'</td>\n <td style=\"text-align: center;\">'.$sum_cpoa.'</td>\n <td style=\"text-align: center;\" bgcolor=\"#dff0d8\">'.$sum_mope.'</td>\n <td style=\"text-align: center;\" bgcolor=\"#dff0d8\">'.$sum_mreq.'</td>\n <td style=\"text-align: center;\" bgcolor=\"#dff0d8\">'.($sum_mope+$sum_mreq).'</td>\n </tr>\n </table>\n '.$foot.'';\n\n return $tabla;\n }", "title": "" }, { "docid": "e598aef69ab536553754f1d9089fb0f0", "score": "0.59587854", "text": "public function comentarioVista()\n\t{\n\t\ttry{\n\n\t\t\t$sentencia= \"SELECT * FROM COMENTARIOS ORDER BY Fecha DESC LIMIT 3\";\n\t\t\t$select = $this->connection->query($sentencia);\n\t\t\t\n\t\t\twhile ($vista=$select->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\techo \"<p class='comAnteriores1'>\".$vista['fecha'].\"</p><br>\";\n\t\t\t\techo \"<p class='comAnteriores2'>\".$vista['comentario'].\"</p>\";\n\t\t\t}\n\t\t\t\n\n\t\t\t}catch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t\techo $e->getLine();\n\t\t\t}\t\n\t\t\n\t}", "title": "" }, { "docid": "1635052e69be2fe0dbdfbab545ff88b5", "score": "0.5943137", "text": "function get_cabecera_prueba()\n\t{\n\t\treturn $this->cabecera_prueba;\t\n\t}", "title": "" }, { "docid": "94b61f35323124cedcc4a2943f9e1a7f", "score": "0.5938322", "text": "function creaTabella()\n\t\t{\n\t\t// creazione della tabella sulla base della query sql\n\t\t$dbconn = $this->dammiConnessioneDB();\n\t\t$sql = \"select wadoc_vociMenu.*,\" .\n\t\t\t\t\" CONCAT(wadoc_sezioni.sigla, '/', wadoc_menu.nome) AS nomeMenu\" .\n\t\t\t\t\" FROM wadoc_vociMenu\" .\n\t\t\t\t\" LEFT JOIN wadoc_menu ON wadoc_vociMenu.idMenu=wadoc_menu.idMenu\" .\n\t\t\t\t\" LEFT JOIN wadoc_sezioni ON wadoc_menu.idSezione=wadoc_sezioni.idSezione\";\n\t\t\t\t\" WHERE 1\";\n\t\tif ($_GET['idMenu'])\n\t\t\t$sql .= \" AND wadoc_vociMenu.idMenu=\" . $dbconn->interoSql($_GET['idMenu']);\n\t\t$sql .= \" ORDER BY nomeMenu, wadoc_vociMenu.posizione\";\n\t\t$tabella = $this->dammiTabella($sql);\n\t\t\n\t\t// definizione delle proprieta' di base della tabella\n\t\t$tabella->titolo = \"Voci menu\";\n\t\t\n\t\t// azioni\n\t\t$tabella->aggiungiAzione(\"Pagina\", true, \"Pagina\", array($this, \"esistePagina\"));\n\t\t\n\t\t// definizione delle colonne della tabella e delle relative proprieta'\n\t\t$tabella->aggiungiColonna(\"idVoceMenu\", \"ID\", false, false, false);\n\t\t\n\t\t$col = $tabella->aggiungiColonna(\"idMenu\", \"Menu\", !$_GET['idMenu'], true, true, WATBL_ALLINEA_CENTRO);\n\t\t\t$sql = \"SELECT wadoc_menu.idMenu, CONCAT(wadoc_sezioni.sigla, '/', wadoc_menu.nome) AS nomeMenu\" .\n\t\t\t\t\t\" FROM wadoc_menu\" .\n\t\t\t\t\t\" INNER JOIN wadoc_sezioni on wadoc_menu.idSezione=wadoc_sezioni.idSezione\" .\n\t\t\t\t\t\" ORDER BY nomeMenu\";\n\t\t\t$col->inputOpzioni = $this->dammiLista($sql);\n\t\t\t$col->inputTipo = WATBL_INPUT_SELEZIONE;\n\t\t\t$col->aliasDi = \"CONCAT(wadoc_sezioni.sigla, '/', wadoc_menu.nome)\";\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"etichetta\", \"Etichetta\");\n\t\t\t$col->inputTipo = WATBL_INPUT_TESTO;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"destinazione\", \"Destinazione\");\n\t\t\t$col->inputTipo = WATBL_INPUT_TESTO;\n//\t\t\t$col->link = true;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"livello\", \"Livello\");\n\t\t\t$col->inputTipo = WATBL_INPUT_INTERO;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"posizione\", \"Posizione\");\n\t\t\t$col->inputTipo = WATBL_INPUT_INTERO;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"descrizione\", \"Descrizione\");\n\t\t\t$col->aliasDi = \"wadoc_vociMenu.descrizione\";\n\t\t\t$col->inputTipo = WATBL_INPUT_AREATESTO;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"help\", \"Help\");\n\t\t\t$col->aliasDi = \"wadoc_vociMenu.help\";\n\t\t\t$col->inputTipo = WATBL_INPUT_AREATESTO;\n\t\t\n\t\t// colonne non visibili\n\t\t$tabella->aggiungiColonna(\"nomeMenu\", \"nomeMenu\", false, false, false);\n\t\t\n\t\t$tabella->leggiValoriIngresso();\n\n\t\t// lettura dal database delle righe che andranno a popolare la tabella\n\t\tif (!$tabella->caricaRighe())\n\t\t\t$this->mostraErroreDB($tabella->righeDB->connessioneDB);\n\t\t\n\t\treturn $tabella;\n\t\t}", "title": "" }, { "docid": "e95f7e48b4d00d56a837f0f904482c82", "score": "0.5938091", "text": "function TablaListarProveedores()\n {\n //Logo\n $logo = \"./assets/images/logo_dark.png\";\n $logo2 = \"./assets/images/logo_white_2.png\";\n \n $con = new Login();\n $con = $con->ConfiguracionPorId(); \n\n $this->Ln();\n $this->SetFont('Courier','B',10);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(5, 130, 275); // establece el color del fondo de la celda (en este caso es AZUL\n $this->Cell(45,22,$this->Image($logo, $this->GetX()+88, $this->GetY()+4, 24),5,0,'L');\n $this->Cell(250,8,'SISTEMA DE GESTIÓN PARA RESTAURANTES',5,0,'C');\n $this->Cell(45,22,$this->Image($logo2, $this->GetX()-72, $this->GetY()+6, 58),5,0,'L');\n \n $this->Ln();\n $this->SetFont('Courier','B',10);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(5, 130, 275); // establece el color del fondo de la celda (en este caso es AZUL\n $this->Cell(45,0,'',5,0,'L');\n $this->Cell(250,-28,utf8_decode($con[0]['nomempresa']),5,0,'C');\n $this->Cell(45,0,'',5,0,'L');\n \n $this->Ln();\n $this->SetFont('Courier','B',10);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(5, 130, 275); // establece el color del fondo de la celda (en este caso es AZUL\n $this->Cell(45,0,'',5,0,'L');\n $this->Cell(250,-20,'RUC: '.utf8_decode($con[0]['rifempresa']),5,0,'C');\n $this->Cell(45,0,'',5,0,'L');\n \n $this->Ln();\n $this->SetFont('Courier','B',10);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(5, 130, 275); // establece el color del fondo de la celda (en este caso es AZUL\n $this->Cell(45,0,'',5,0,'L');\n $this->Cell(250,-12,'DIREC: '.utf8_decode($con[0]['direcempresa']),5,0,'C');\n $this->Cell(45,0,'',5,0,'L');\n \n $this->Ln();\n $this->SetFont('Courier','B',10);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(5, 130, 275); // establece el color del fondo de la celda (en este caso es AZUL\n $this->Cell(45,0,'',5,0,'L');\n $this->Cell(250,-4,'Nº DE TELÉFONO: '.utf8_decode($con[0]['tlfempresa']),5,0,'C');\n $this->Cell(45,0,'',5,0,'L');\n \n $this->Ln();\n $this->SetFont('Courier','B',10);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(5, 130, 275); // establece el color del fondo de la celda (en este caso es AZUL\n $this->Cell(45,0,'',5,0,'L');\n $this->Cell(250,4,'EMAIL: '.utf8_decode($con[0]['correoempresa']),5,0,'C');\n $this->Cell(45,0,'',5,0,'L');\n $this->Ln(8);\n \n $this->SetFont('Courier','B',14); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(350,10,'LISTADO GENERAL DE PROVEEDORES',0,0,'C');\n \n $this->Ln();\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es BLANCO)\n $this->SetFillColor(230, 126, 34); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->Cell(10,8,'N°',1,0,'C', True);\n\t$this->Cell(28,8,'Nit',1,0,'C', True);\n\t$this->Cell(70,8,'PROVEEDOR',1,0,'C', True);\n\t$this->Cell(65,8,'DIRECCIÓN DOMICILIARIA',1,0,'C', True);\n\t$this->Cell(32,8,'N° TELÉFONO',1,0,'C', True);\n\t$this->Cell(75,8,'CORREO',1,0,'C', True);\n\t$this->Cell(55,8,'CONTACTO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarProveedores();\n\n if($reg==\"\"){\n\n echo \"\"; \n \n } else {\n \n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$this->SetFont('courier','',9); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,6,$a++,1,0,'C');\n\t$this->CellFitSpace(28,6,utf8_decode($reg[$i][\"ritproveedor\"]),1,0,'C');\n $this->CellFitSpace(70,6,utf8_decode($reg[$i][\"nomproveedor\"]),1,0,'C');\n $this->CellFitSpace(65,6,utf8_decode($reg[$i][\"direcproveedor\"]),1,0,'C');\n\t$this->Cell(32,6,utf8_decode($reg[$i][\"tlfproveedor\"]),1,0,'C');\n\t$this->Cell(75,6,utf8_decode($reg[$i][\"emailproveedor\"]),1,0,'C');\n\t$this->Cell(55,6,utf8_decode($reg[$i][\"contactoproveedor\"]),1,0,'C');\n $this->Ln();\n\t }\n }\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(200,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nivel\"].\"/\".$_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(120,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(200,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(120,6,'',0,0,'');\n $this->Ln(4);\n }", "title": "" }, { "docid": "2f14de1640c08d3856b0fccaac6d3c18", "score": "0.5934717", "text": "function consultarRetirosAprobadosProyecto() {\r\n $variables=array('ano'=>$this->periodo[0]['ANO'],\r\n 'periodo'=>$this->periodo[0]['PERIODO'],\r\n 'codProyecto'=>$this->codProyecto);\r\n $cadena_sql=$this->sql->cadena_sql('consultarRetirosAprobadosProyecto',$variables);\r\n return $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n \r\n }", "title": "" }, { "docid": "2ed3bb1066521e8bc2a1f65958801fd8", "score": "0.5930384", "text": "function listarPresupPartida(){\n\t\t$this->procedimiento='pre.ft_presup_partida_sel';\n\t\t$this->transaccion='PRE_PREPAR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('tipo','tipo','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_presup_partida','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('id_centro_costo','int4');\n $this->captura('centro_codigo','varchar');\n\t\t$this->captura('id_presupuesto','int4');\n\t\t$this->captura('id_partida','int4');\n $this->captura('partida_codigo','varchar');\n\t\t$this->captura('fecha_hora','timestamp');\n\t\t$this->captura('id_moneda','int4');\n $this->captura('moneda','varchar');\n\t\t$this->captura('importe','numeric');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "4a423d44366934a13b7051d5df511b0d", "score": "0.5924527", "text": "public function listeTiposE() {CrudSIDF::listEq();}", "title": "" }, { "docid": "61ffbb768daacaadd96419b30d96c4d1", "score": "0.59235835", "text": "function consultarCopilotos () {\n $resultado = false;\n $query = \"SELECT p.nombre,p.apellido,p.cedula FROM PERSONAL p\n WHERE p.TIPO_CARGO_id =2 AND habilitado =1 ORDER BY apellido,nombre\";\n $resultado = $this->transaccion->realizarTransaccion($query);\n return $resultado;\n }", "title": "" }, { "docid": "f99e094dfb31c8acf0283f277a0b63a9", "score": "0.5908217", "text": "function consultarPilotos () {\n $resultado = false;\n $query = \"SELECT p.nombre,p.apellido,p.cedula FROM PERSONAL p\n WHERE p.TIPO_CARGO_id =1 AND habilitado =1 ORDER BY apellido,nombre\";\n $resultado = $this->transaccion->realizarTransaccion($query);\n return $resultado;\n }", "title": "" }, { "docid": "40ad0a1220ae7ed2917e366898fc9dc9", "score": "0.590655", "text": "public function propiedades_en_oferta()\n {\n $mysql= new MySQL();\n $consulta = \"SELECT id_propiedad,direccion,nombre,coordenadas \n FROM Propiedad\n WHERE Propiedad.ofertada = 1\"; \n \n \t\t$resultado=$mysql->consulta($consulta);\n $ArrPropiedades= array();\n $i=0;\n \n while($objeto =$mysql->fetch_object($resultado))\n {\n \n $ArrPropiedades[$i]=new Propiedad();\n $ArrPropiedades[$i]->setId_Propiedad($objeto->id_propiedad);\n $ArrPropiedades[$i]->setDireccion($objeto->direccion);\n $ArrPropiedades[$i]->setNombre($objeto->nombre);\n $ArrPropiedades[$i]->setCoordenadas($objeto->coordenadas);\n $i++;\n\t\t} \n \n return $ArrPropiedades;\n }", "title": "" }, { "docid": "ce9d9cf6f66eb952956b166e92701349", "score": "0.5900599", "text": "function afficherProduits4(){\n\t\t$sql=\"SELECT * From produit where type= :scooter\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "d74a9a51d5a6349c72f19e7c2246abf0", "score": "0.58988047", "text": "function listadoProyectos(){\n\t\t$class=\"\";\n\t\t$no_registros = $this->consultaNoProyectos($data);\n\t\tif($no_registros){\n\t\t\t$this->pages = new Paginador();\n\t\t\t$this->pages->items_total = $no_registros;\n\t\t\t$this->pages->mid_range = 25;\n\t\t\t$this->pages->paginate();\n\t\t\t$resultados = $this->consultaProyectos($data,$this->pages->limit);\n\t\t\t\n\t\t}\n\t\t\n\t\t$this->buffer=\"<div class='panel panel-danger spancing'>\n\t\t\t\t\t<div class='panel-heading titulosBlanco'>\".LISTADODEACTIVIDADES.\"</div>\n\t \t\t\t\t<div class='panel-body'>\";\n\t\tif(count($resultados) > 0){\n\t\t\t$this->buffer.=\"\n\t\t\t\t\t<div class=\\\"central\\\">\n\t\t\t\t\t\t<input type='button' value='\".AGREGAPROYECTO.\"' class='btn btn-default btn-sm' onclick=\\\"location='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=2'\\\">\n\t\t\t\t\t\t<input type='button' value='\".TODOS.\"' \t\t\tclass='btn btn-default btn-sm todos'>\n\t\t\t\t\t\t<input type='button' value='\".NINGUNO.\"' \t\tclass='btn btn-default btn-sm ningunos'>\t\t\n\t\t\t\t\t\t<input type='button' value='\".ENVIARCOORDINADOR.\"' class='btn btn-default btn-sm ninguno' id='cambiaFase2'>\t\t\t\t\t\t\n\t\t\t\t\t</div><br>\n\t\t\t\t\t<table align='center' border='0' class='table table-condensed'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='tdcenter fondotable' width='30%'>\".PROYECTOS.\"</td>\n\t\t\t\t\t\t<td class='tdcenter fondotable' width=' 8%'>\".PONDERACION.\"</td>\n\t\t\t\t\t\t<td class='tdcenter fondotable' width='16%'>\".ROL.\"</td>\t\t\n\t\t\t\t\t\t<td class='tdcenter fondotable' width='10%'>\".FECHAALTA.\"</td>\n\t\t\t\t\t\t<td class='tdcenter fondotable' width='10%'>\".NOACCIONES.\"</td>\n\t\t\t\t\t\t<td class='tdcenter fondotable' width='8%'>\".EDITAR.\"</td>\t\t\n\t\t\t\t\t\t<td clasS='tdcenter fondotable' width='8%'>\".EDITAACTIVIDADES.\"</td>\n\t\t\t\t\t\t<td clasS='tdcenter fondotable' width='10%'>\".ENVIARCOORDINADOR.\"</td>\n\t\t\t\t\t</tr>\";\n\t\t\t\t$contador=1;\n\t\t\t\tforeach($resultados as $id => $resul){\n\t\t\t\t\t$class=\"\";\n\t\t\t\t\tif($contador % 2 == 0)\n\t\t\t\t\t\t$class=\"active\";\n\t\t\t\t\t\t\n\t\t\t\t\t$this->buffer.=\"\n\t\t\t\t\t\t<tr class=' $class alturaComponentesA'>\n\t\t\t\t\t\t\t<td class='tdleft'>\".$resul['proyecto'].\"</td>\n\t\t\t\t\t\t\t<td class='tdcenter'>\".$resul['ponderacion'].\"</td>\n\t\t\t\t\t\t\t<td class='tdcenter'>\".$resul['nomRol'].\"</td>\n\t\t\t\t\t\t\t<td class='tdcenter'>\".substr($resul['fecha_alta'],0,10).\"</td>\n\t\t\t\t\t\t\t<td class='tdcenter'>\".$resul['noAcciones'].\"</td>\n\t\t\t\t\t\t\t<td class='tdcenter'><img src='\".$this->path.\"imagenes/iconos/pencil.png' border='0'></td>\n\t\t\t\t\t\t\t<td class='tdcenter'><img src='\".$this->path.\"imagenes/iconos/new.png' border='0'></td>\n\t\t\t\t\t\t\t<td class='tdcenter'><input type='checkbox' name='enviaId' id='env-\".$resul['id'].\"' class='enviaId'></td>\n\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t$contador++;\n\t\t\t\t}\t\n\t\t\t\t$this->buffer.=\"<tr><td colspan='8' class='tdcenter'>\".$this->pages->display_jump_menu().\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\".$this->pages->display_items_per_page().\"</td></tr></table>\";\t\t\n\t\t}\n\t\telse{\n\t\t\t$this->buffer.=\"<table class='table table-condensed'><tr><td>\".SINREGISTROS.\"</td></tr></table>\";\n\t\t}\n\t}", "title": "" }, { "docid": "060768804faab74c453abb6772f6451a", "score": "0.5898314", "text": "function listarUniConsPlano(){\n\t\t$this->objParam->defecto('ordenacion','id_uni_cons');\n\n\t\t$this->objParam->defecto('dir_ordenacion','asc');\n\t\tif($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n\t\t\t$this->objReporte = new Reporte($this->objParam, $this);\n\t\t\t$this->res = $this->objReporte->generarReporteListado('MODUniCons','listarUniConsPlano');\n\t\t} else{\n\t\t\t$this->objFunc=$this->create('MODUniCons');\t\n\t\t\t$this->res=$this->objFunc->listarUniConsPlano();\n\t\t}\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\n\t}", "title": "" }, { "docid": "256bef1ba0d79aced6e989a63d0e1e7b", "score": "0.5895145", "text": "function reporteCabeceraProcesoCaja(){\n\t\t$this->procedimiento='tes.ft_proceso_caja_sel';\n\t\t$this->transaccion='TES_REPCCAJA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\t\t$this->captura('id_cuenta_doc','INTEGER');\n\t\t$this->captura('id_tipo_cuenta_doc','INTEGER');\n\t\t$this->captura('id_proceso_wf','INTEGER');\n\t\t$this->captura('id_caja','INTEGER');\n\t\t$this->captura('nombre_cheque','VARCHAR');\n\t\t$this->captura('id_uo','INTEGER');\n\t\t$this->captura('id_funcionario','INTEGER');\n\t\t$this->captura('tipo_pago','VARCHAR');\n\t\t$this->captura('id_depto','INTEGER');\n\t\t$this->captura('id_cuenta_doc_fk','INTEGER');\n\t\t$this->captura('nro_tramite','VARCHAR');\n\t\t$this->captura('motivo','VARCHAR');\n\t\t$this->captura('fecha','DATE');\n\t\t$this->captura('id_moneda','INTEGER');\n\t\t$this->captura('estado','VARCHAR');\n\t\t$this->captura('estado_reg','VARCHAR');\n\t\t$this->captura('id_estado_wf','INTEGER');\n\t\t$this->captura('id_usuario_ai','INTEGER');\n\t\t$this->captura('usuario_ai','VARCHAR');\n\t\t$this->captura('fecha_reg','TIMESTAMP');\n\t\t$this->captura('id_usuario_reg','INTEGER');\n\t\t$this->captura('fecha_mod','TIMESTAMP');\n\t\t$this->captura('id_usuario_mod','INTEGER');\n\t\t$this->captura('usr_reg','VARCHAR');\n\t\t$this->captura('usr_mod','VARCHAR');\n\t\t$this->captura('desc_moneda','VARCHAR');\n\t\t$this->captura('desc_depto','VARCHAR');\n\t\t$this->captura('obs','TEXT');\n\t\t$this->captura('desc_funcionario','TEXT');\n\t\t$this->captura('importe','numeric');\n\t\t$this->captura('desc_funcionario_cuenta_bancaria','varchar');\n\t\t$this->captura('id_funcionario_cuenta_bancaria','integer');\n\t\t$this->captura('id_depto_lb','integer');\n\t\t$this->captura('id_depto_conta','integer');\n\t\t$this->captura('desc_tipo_cuenta_doc','VARCHAR');\n\t\t$this->captura('sw_solicitud','VARCHAR');\n\t\t$this->captura('lugar','VARCHAR');\n\t\t$this->captura('cargo_funcionario','varchar');\n\t\t$this->captura('nombre_unidad','VARCHAR');\n\t\t$this->captura('importe_literal','VARCHAR');\n\t\t$this->captura('motivo_ori','VARCHAR');\n\t\t$this->captura('gerente_financiero','VARCHAR');\n\t\t$this->captura('cargo_gerente_financiero','VARCHAR');\n\n\t\t$this->captura('aprobador','TEXT');\n\t\t$this->captura('cargo_aprobador','TEXT');\n\n\t\t$this->captura('nro_cbte','VARCHAR');\n\t\t$this->captura('num_memo','VARCHAR');\n\t\t$this->captura('num_rendicion','VARCHAR');\n\t\t$this->captura('nro_cheque','integer');\n\t\t$this->captura('importe_solicitado','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "d4e81d92ec3617212a4d231ced259fe6", "score": "0.58896786", "text": "function llenarMatrizPresupTipoComp(){\n\t\t\t\n\t\t\tunset($matriz); \n\t\t\tglobal $matriz;\t\n\t\t\t$res = llamarRegistrosMySQLPresupTipoComp();\n\t\t\t$posicion=0;\n\t\t\t\t\n\t\t\t\twhile ($fila = mysql_fetch_array($res))\n\t\t\t\t{\t\n\t\t\t\t\t\n\t\t\t\t\t$matriz[\"tipo\"][$posicion] = $fila[\"Tipo\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$posicion++;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "91e54dac165b4319372b25e34f118efa", "score": "0.5889387", "text": "function _ConsultarTiposCuerpo()\n\t{\n\t\t$query='SELECT id,nb_cuerpo from sgtipocuerpo';\n\t\t$cuerpos = $this->EjecutarTransaccionAllNoParams($query);\n\t\treturn $cuerpos;\n\t}", "title": "" }, { "docid": "28a9bfa15b5974662808d35c11fe7040", "score": "0.5887356", "text": "private function corpo() {\r\n\t \r\n // Captura os objetos da consulta\r\n $arrayObjetos = $this->arrayObjetos;\r\n \r\n // Captura os campos a serem mostrados no relatório\r\n $campos = $this->campos;\r\n \r\n // Seta a fonte\r\n $this->pdf->SetFont('Arial', '', $this->tamanhoFonte);\r\n \r\n // Seta a cor do texto\r\n $this->pdf->SetTextColor(20, 20, 20);\r\n \r\n \t$i = 1; // Controla o total de linhas por página\r\n $y = 40; // Controla a altura de cada linha dentro da página\r\n $j = 0; // Controla o total de registro inseridos\r\n $zebra = false; // Responsável por zebrar a linha\r\n $totalLinhas = count($arrayObjetos);\r\n \r\n if($totalLinhas > 0) {\r\n \r\n foreach($arrayObjetos as $linha) {\r\n \r\n $x = 10; // Controla a posição de cada coluna na linha\r\n \r\n // Seta a fonte\r\n $this->pdf->SetFont('Arial', 'B', $this->tamanhoFonte);\r\n $this->pdf->SetFillColor(230, 230, 230);\r\n \r\n // Cria uma linha com o cabeçalho e rodapé\r\n if($i == 1) {\r\n \r\n // Gera o cabecalho\r\n $this->cabecalho();\r\n \r\n // Insere o título dos campos\r\n $this->insereTitulosCampos();\r\n \r\n } else if($i == ($this->totalLinhas + 1)) {\r\n \r\n // Seta a cor da linha\r\n $this->pdf->SetDrawColor(0, 0, 0);\r\n \r\n // Gera o rodapé\r\n $this->rodape($j);\r\n \r\n // Adiciona uma página\r\n $this->pdf->AddPage();\r\n \r\n // Reseta os valores\r\n $i = 1;\r\n $y = 40;\r\n $zebra = false;\r\n \r\n // Gera o cabecalho\r\n $this->cabecalho();\r\n \r\n // Insere o título dos campos\r\n $this->insereTitulosCampos();\r\n \r\n }\r\n \r\n // Seta a fonte\r\n $this->pdf->SetFont('Arial', 'B', $this->tamanhoFonte);\r\n \r\n // Seta a cor da linha\r\n $this->pdf->SetDrawColor(255, 255, 255);\r\n $this->pdf->SetFillColor(255, 255, 255);\r\n \r\n\t\t\t\t// Define o alinhamento padrão\r\n\t\t\t\t$align = \"L\";\r\n\t\t\t\t\r\n // Joga o valor da linha na view do pdf\r\n $x = 10;\r\n if($linha[0] == \"E\") { // Espaço\r\n \t\r\n \t// Decrementa a altura da linha quando for uma nova página\r\n \tif($i == 1) {\r\n \t\t$y = $y - $this->alturaLinha;\r\n \t}\r\n \t\r\n \t$this->pdf->setXY($x, $y);\r\n \t$this->pdf->MultiCell($this->tamaMaxLinha, $this->alturaLinha, \" \" . $linha[1] . \" \", $borderLeft, $align, 1);\r\n \t\r\n \t$zebra = false;\r\n \t\r\n } else if($linha[0] == \"G\") { // Grupo\r\n \t\r\n \t$x = $x + ($linha[3] * 3);\r\n $this->pdf->setXY($x, $y);\r\n \r\n // Mostra o grupo no pdf\r\n $this->pdf->MultiCell($this->tamaMaxLinha - ($x - 10), $this->alturaLinha, $linha[2] . \": \" . $linha[1], 0, \"L\", 0);\r\n \t\r\n $zebra = false;\r\n \r\n } else if($linha[0] == \"D\") { // Dados\r\n \t\r\n \t// Seta a fonte\r\n $this->pdf->SetFont('Arial', '', 5);\r\n $this->pdf->SetTextColor(100, 100, 100);\r\n \r\n // Seta o contador das páginas\r\n $this->pdf->setXY(5, $y);\r\n $this->pdf->Cell(5, $this->alturaLinha, ($j + 1), 1, 1, 'R');\r\n \r\n\t // Seta a cor de fundo da linha para gerar o zebrado\r\n\t $zebra = ! $zebra;\r\n\t if($zebra) {\r\n\t $this->pdf->SetFillColor(200, 200, 200);\r\n\t }\r\n\r\n\t $this->pdf->SetTextColor(20, 20, 20);\r\n\t \r\n\t $x = 10;\r\n\t $totalCampos = count($campos);\r\n\t $borderLeft = \"\";\r\n\t $dados = $linha[1];\r\n\t foreach($dados as $indice => $valor) {\r\n\t \t \t\r\n\t \t// Captura a descrição\r\n\t \t$descricao = $valor[0];\r\n\t \t\r\n\t \t// Captura os atributos do campo\r\n\t \t$atributos = $valor[1];\r\n\t \t\r\n\t // Captura o valor em porcentagem\r\n $width = ($this->tamaMaxLinha * intval($atributos[\"width\"])) / 100;\r\n \r\n\t\t\t\t\t\t// Seta o alinhamento\r\n\t\t\t\t\t\tswitch(strtolower($atributos[\"text-align\"])) {\r\n\t\t\t\t\t\t\tcase \"left\" : $align = \"L\"; break;\r\n\t\t\t\t\t\t\tcase \"right\" : $align = \"R\"; break;\r\n\t\t\t\t\t\t\tcase \"center\" : $align = \"C\"; break;\r\n\t\t\t\t\t\t\tdefault: $align = \"L\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n $this->pdf->setXY($x, $y);\r\n $this->pdf->MultiCell($width, $this->alturaLinha, $descricao, $borderLeft, $align, 1);\r\n \r\n $x += $width;\r\n $borderLeft = \"L\";\r\n\t }\r\n\t \r\n\t $j++;\r\n }\r\n \r\n // Incrementa os dados de controle da linha\r\n $i += 1;\r\n $y += $this->alturaLinha; \r\n }\r\n \r\n // Faz o controle do último rodapé\r\n if($i < ($this->totalLinhas + 2)) {\r\n \t// Seta a cor da linha\r\n $this->pdf->SetDrawColor(0, 0, 0);\r\n \r\n // Gera o rodapé\r\n $this->rodape($j);\r\n }\r\n \r\n \t\r\n \t} else {\r\n \t \r\n \t // Seta a fonte\r\n $this->pdf->SetFont('Arial', 'B', $this->tamanhoFonte);\r\n $this->pdf->SetFillColor(230, 230, 230);\r\n \t \r\n \t // Gera o cabecalho\r\n $this->cabecalho();\r\n \r\n // Gera o rodapé\r\n $this->rodape(0);\r\n \t}\r\n \t\r\n\t\t// Libera da memoria\r\n \tunset($arrayObjetos);\r\n unset($campos);\r\n\t}", "title": "" }, { "docid": "c42a1f7c8a0e7c5d9eb1291e01c752bd", "score": "0.5884807", "text": "public function __construct() {\n\t\t\tparent::__construct('precio');\n\t\t\t//Se asigna a la variable heredada $nombreTabla el nombre de la tabla SQL\n\t\t\t//Se marca cual es el id de la tabla\n\t\t}", "title": "" }, { "docid": "0e171defce4906c378a2e2cbe82fdf4c", "score": "0.58810455", "text": "function tipodocumento($idDocPadre){\n\t\t$sql = $this->query(\"select * from bco_tiposDocumentoConcepto where id=\".$idDocPadre.\" and idstatus=1\");\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "32734e7a0f43bfe819b9cbeb78a288f4", "score": "0.5877242", "text": "function acargarTablaUnidadesxTipoxMaterialLaboratorio($parametros) {\n $oLLaboratorio = new LLaboratorio();\n $o_TablaHtmlx = new tablaDHTMLX();\n\n $arrayFilas = $oLLaboratorio->lcargarTablaUnidadesxTipoxMaterialLaboratorio($parametros);\n $arrayCabecera = array(0 => \"ID Material\", 1 => \"Id UnidadMedida\", 2 => \"Nombre Material Laboratorio\", 3 => \"Id Tipo Material Labo\", 4 => \"Tipo Material Labo\", 5 => \"Url Imagen\", 6 => \" Unidad Medida\", 7 => \"Tipo Unidad Medida\", 8 => \"Id Tipo Unidad Medida\");\n $arrayTamano = array(0 => \"45\", 1 => \"90\", 2 => \"*\", 3 => \"50\", 4 => \"*\", 5 => \"*\", 6 => \"*\", 7 => \"*\", 8 => \"*\");\n $arrayTipo = array(0 => \"ro\", 1 => \"ro\", 2 => \"ro\", 3 => \"ro\", 4 => \"ro\", 5 => \"ro\", 6 => \"ro\", 7 => \"ro\", 8 => \"ro\");\n $arrayCursor = array(0 => \"default\", 1 => \"default\", 2 => \"default\", 3 => \"default\", 4 => \"default\", 5 => \"default\", 6 => \"default\", 7 => \"default\", 8 => \"default\");\n $arrayHidden = array(0 => \"true\", 1 => \"false\", 2 => \"true\", 3 => \"true\", 4 => \"false\", 5 => \"true\", 6 => \"false\", 7 => \"false\", 8 => \"true\");\n $arrayAling = array(0 => \"center\", 1 => \"left\", 2 => \"left\", 3 => \"center\", 4 => \"center\", 5 => \"center\", 6 => \"center\", 7 => \"center\", 8 => \"center\");\n return $o_TablaHtmlx->generaTabla($arrayCabecera, $arrayFilas, $arrayTamano, $arrayTipo, $arrayCursor, $arrayHidden, $arrayAling);\n }", "title": "" }, { "docid": "6b609536121f9f4386b041404ffc85cb", "score": "0.5876384", "text": "public function cabecera($componente,$proyecto){\n $tabla='';\n $tabla.=' <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\" align=\"center\">\n <tr>\n <td colspan=\"2\" style=\"width:100%; height: 1.2%; font-size: 14pt;\"><b>'.$this->session->userdata('entidad').'</b></td>\n </tr>\n <tr style=\"font-size: 8pt;\">\n <td style=\"width:10%; height: 1.2%;\"><b>DIR. ADM.</b></td>\n <td style=\"width:90%;\">: '.$proyecto[0]['dep_cod'].' '.strtoupper($proyecto[0]['dep_departamento']).'</td>\n </tr>\n <tr style=\"font-size: 8pt;\">\n <td style=\"width:10%; height: 1.2%;\"><b>UNI. EJEC.</b></td>\n <td style=\"width:90%;\">: '.$proyecto[0]['dist_cod'].' '.strtoupper($proyecto[0]['dist_distrital']).'</td>\n </tr>\n <tr style=\"font-size: 8pt;\">';\n if($proyecto[0]['tp_id']==1){ /// Proyecto de Inversion\n $tabla.='\n <td style=\"width:10%;\"><b>PROY. INV.</b></td>\n <td style=\"width:90%;\">: '.$proyecto[0]['aper_programa'].' '.$proyecto[0]['proy_sisin'].' 000 - '.$proyecto[0]['proy_nombre'].'</td>';\n }\n else{ /// Gasto Corriente\n $tabla.='\n <td style=\"width:10%;\"><b>ACTIVIDAD</b></td>\n <td style=\"width:90%;\">: '.$proyecto[0]['aper_programa'].' '.$proyecto[0]['aper_proyecto'].' '.$proyecto[0]['aper_actividad'].' - '.strtoupper($proyecto[0]['act_descripcion']).' '.$proyecto[0]['abrev'].'</td>';\n }\n\n $tabla.='\n </tr>\n <tr style=\"font-size: 8pt;\">\n <td style=\"height: 1.2%; width:10%;\"><b>';\n if($proyecto[0]['tp_id']==1){\n $tabla.='UNI. RESP. ';\n }\n else{\n $tabla.='SUBACT. ';\n }\n $tabla.='</b></td>\n <td style=\"width:90%;\">: '.strtoupper($componente[0]['serv_cod']).' '.strtoupper($componente[0]['tipo_subactividad']).' '.strtoupper($componente[0]['serv_descripcion']).'</td>\n </tr>\n </table>';\n return $tabla;\n }", "title": "" }, { "docid": "382b9b67b3fd2c2f2162bac58ae0136e", "score": "0.5875285", "text": "function llamarRegistrosMySQLPresupTipoComp() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_mysql(\"Contabilidad\");\n\t\t\t$cons = \"SELECT * FROM Contabilidad.TiposComprobante\";\n\t\t\t$res = mysql_query($cons);\n\t\t\treturn $res; \n\t\t\n\t\t}", "title": "" }, { "docid": "fc4ed38bdc4b5e1266a87cd7612c3be7", "score": "0.5874974", "text": "function getAllProfessores( $filtro ) {\r\n\r\n\t\t$professores = array();\r\n\t\t$where = array();\r\n\t\t$conexao = Conexao::con();\r\n\r\n\t\tif ( !empty( $filtro ) ) {\r\n\t\t\t$filtro = json_decode( $filtro );\r\n\t\t\tswitch ( $filtro->tipo ) {\r\n\t\t\t\tcase 'byIdDepartamento':\r\n\t\t\t\t\t$where[] = 'WHERE p.id_departamento = '. $filtro->params->idDepartamento;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sql[] = \"SELECT p.*, c.descricao_cargo FROM professor p\";\r\n\t\t$sql[] = \"left join cargo c\";\r\n\t\t$sql[] = \"on p.id_cargo = c.id_cargo\";\r\n\t\t$sql[] = join( ' ', $where );\r\n\t\t$sql[] = \"ORDER BY p.nome\";\r\n\r\n\t\t$query = mysqli_query( $conexao, join( ' ', $sql ) );\r\n\r\n\t\twhile ( $row = mysqli_fetch_array( $query ) ) {\r\n\t\t\t$professor = new stdClass();\r\n\t\t\t$professor->id_professor = $row['id_professor'];\r\n\t\t\t$professor->nome = utf8_encode( $row['nome'] );\r\n\t\t\t$professor->matricula = utf8_encode( $row['matricula'] );\r\n\t\t\t$professor->siape = utf8_encode( $row['siape'] );\r\n\t\t\t$professor->dataAdmissao = $row['data_admissao'];\r\n\t\t\t$professor->dataAdmissaoUfsc = $row['data_admissao_ufsc'];\r\n\t\t\t$professor->dataNascimento = $row['data_nascimento'];\r\n\t\t\t$professor->dataPrevistaAposentadoria = $row['data_previsao_aposentadoria'];\r\n\t\t\t$professor->dataEfetivaAposentadoria = $row['data_aposentadoria'];\r\n\t\t\t$professor->idDepartamento = $row['id_departamento'];\r\n\t\t\t$professor->idCategoriaFuncionalInicial = $row['id_categoria_funcional_inicial'];\r\n\t\t\t$professor->idCategoriaFuncionalAtual = $row['id_categoria_funcional_atual'];\r\n\t\t\t$professor->idTipoTitulacao = $row['id_tipo_titulacao'];\r\n\t\t\t$professor->idCategoriaFuncionalReferencia = $row['id_categoria_funcional_referencia'];\r\n\t\t\t$professor->idCargo = $row['id_cargo'];\r\n\t\t\t$professor->idSituacao = $row['id_situacao'];\r\n\t\t\t$professor->descricaoCargo = $row['descricao_cargo'];\r\n\t\t\t$professores[] = $professor;\r\n\t\t}\r\n\t\treturn $professores;\r\n\t}", "title": "" }, { "docid": "c5a0b2d2a07f4c60859733100c98dba3", "score": "0.5873606", "text": "function muestraFormularioProyecto() {\n\t\t$tit=EDITAACCION;\n\t\tif($this->data['opc'] ==3)\n\t\t\t$tit=ALTADEACCIONES;\n\t\t$this->buffer = \"\n <input type='hidden' name='valueId' id='valueId' value='\".($this->arrayDatos ['id'] + 0).\"'>\n \t\t<div class='panel panel-danger spancing'>\n\t\t\t\t<div class='panel-heading'>\".$tit.\"</div>\n \t\t\t\t<div class='panel-body'>\n \t<table align='center' border='0' class='table table-condensed'>\n <tr class='altorenglon'>\n <td class='tdleft bold' width='20%'>\".EJEPOLITICA.\"</td>\n <td class='tdleft alinea negritas'>\".$this->regresaNombreEje ( $this->data,$this->arrayDatos ).\"</td>\n <td class='tdleft bold'>\".POLITICAPUBLICA.\"</td>\n <td class='tdleft alinea negritas'>\".$this->regresaNombrePolitica ( $this->data ).\"</td>\n </tr>\n <tr class='altorenglon'>\n <td class='tdleft bold'>\".AREA.\"<input type='hidden' name='idarea' id='idarea' value='\".$this->data['idarea'].\"'></td>\n <td class='tdleft alinea negritas'>\".$this->regresaNombreArea ( $this->data ).\"</td>\n <td class='tdleft bold'>\".PROGRAMA.\"<input type='hidden' name='idprograma' id='idprograma' value='\".$this->data['idprograma'].\"'></td>\n <td class='tdleft alinea negritas'>\".$this->regresaNombrePrograma ( $this->data ).\"</td>\n </tr>\n </table><br>\n <table width='90%' align='center' border='0' class='table-striped'>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".PROYECTO.\"</td>\n <td class='tdcenter' width='8%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-1' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\t\n </td>\n <td class='tdleft alinea'>\".$this->generaProyectos ($this->db,$this->data['idarea'],$this->data['idprograma'],2).\"&nbsp;&nbsp;<button class='ui-icon-add' data-toggle='modal' data-target='#myModalProyecto'></button></td>\n\t\t\t</tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".PONDERACION.\"&nbsp;&nbsp;</td>\n <td class='tdcenter' width='5%'><img src='\".$this->path.\"imagenes/iconos/help.png' id='a-2' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'></td>\n <td class='tdleft alinea' colspan='2'>\n <input type='radio' name='ponderacion' id='ponderacion5' value='5'>5&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion4' value='4'>4&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion3' value='3'>3&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion2' value='2'>2&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion1' value='1' checked>1\n </td>\n </tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".DESCRIPCIONDELPROYECTO.\"</td>\n <td class='tdcenter' width='5%'><img src='\".$this->path.\"imagenes/iconos/help.png' id='a-3' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'></td>\n <td class='tdleft alinea'>\n <textarea required='yes' maxlength='2000' class='bootstrap-select validatextonumero espTextArea' placeholder='\".DESCRIPCIONDELPROYECTO.\"' value='\".$this->arrayDatos ['descripcion'].\"' name='descripcion' id='descripcion'></textarea>\n </td>\n </tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".RESULTADOSESPERADOS.\"</td>\n <td class='tdcenter' width='5%'><img src='\".$this->path.\"imagenes/iconos/help.png' id='a-4' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'></td>\n <td class='tdleft alinea'>\n <textarea required='yes' maxlength='2000' class='bootstrap-select validatextonumero espTextArea' placeholder='\".RESULTADOSESPERADOS.\"' value='\".$this->arrayDatos ['resultados'].\"' name='resultados' id='resultados'></textarea>\n </td>\n </tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".PRESUPUESTO.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-7' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\".(date('Y') - 1).\"&nbsp;&nbsp;$&nbsp\n \t<input type='text' class='bootstrap-select validanums' placeholder='\".PRESUPUESTO.\"' name='presupuesto_1' id='presupuesto_1' size='12'>&nbsp;&nbsp;\".OTORGADO.\"\n </td>\n </tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;&nbsp;&nbsp;</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-8' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\".(date('Y') + 0).\"&nbsp;&nbsp;$&nbsp;\n \t<input type='text' class='bootstrap-select validanums' placeholder='\".ESTIMADO.\"' name='estimado_1' id='estimado_1' size='12'>&nbsp;&nbsp;\".ESTIMADO.\"\n </td>\n </tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".ENCOORDINACION.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-9' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n \t</td>\n \t<td class='tdleft alinea'></td>\n </tr>\n <tr class='altotitulo'>\n <td colspan='3' class='tdleft bold'>\".$this->enCoordinacion($this->data).\"</td>\n </tr>\n <tr class='altotitulo' id='trespecifique'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".ESPECIFIQUE.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-10' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\n <textarea required='yes' class='bootstrap-select validatextonumero espTextArea2' placeholder='\".ESPECIFIQUE.\"' value='\".$this->arrayDatos ['especifique'].\"' name='especifique' id='especifique'></textarea>\n </td>\n </tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".METODO.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-17' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n\t\t\t\t<td class='tdleft alinea'>\".$this->metodoParticipacion($this->data,$this->arrayDatos).\"&nbsp;&nbsp;\n \t\t<button class='ui-icon-add' data-toggle='modal' data-target='#myModalParticipacion' id='btn-5'></button></td>\n </tr>\t\t\t\t\t\t\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".UNIDADOPERATIVA.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-5' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\".$this->generaUnidadesOperativas($this->data).\"&nbsp;&nbsp;\n \t\t<button class='ui-icon-add' data-toggle='modal' data-target='#myModalUOperativa' id='btn-5'></button></td>\n </tr>\n <tr class='altotitulo'>\t\t\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".RESPONSABLE.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-6' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\".$this->generaResponsables ($this->data).\"&nbsp;&nbsp;\n <button class='ui-icon-add' data-toggle='modal' data-target='#myModalResponsable' id='btn-6'></button></td>\t\t\n </tr>\n <tr>\n <td class='tdcenter bold' colspan='6'><span id='resultado' class='error'></span></td>\n </tr> \t\t\n <tr>\n <td class='tdcenter legend' colspan='6'><br><br>\n <button type='button' class='btn btn-default savecatalogoProyecto' id='saveProyecto' name='saveProyecto'>\".GUARDARPROYECTO.\"</button> \t\t\n <BR><BR>\n </td>\n </tr>\n </table></div></div>\";\n\t\t$this->buffer.=$this->Modal(\"myModalProyecto\",1);\n\t\t$this->buffer.=$this->Modal(\"myModalParticipacion\",4);\n\t\t$this->buffer.=$this->Modal(\"myModalUOperativa\",2);\n\t\t$this->buffer.=$this->Modal(\"myModalResponsable\",3);\n\t\t\n\t}", "title": "" }, { "docid": "f328fe036a20153e5a1a427f3c61e878", "score": "0.58733386", "text": "private function pendientesPorPlaza(){\n if($this->get_request_method() != \"GET\"){\n $this->response('',406);\n }\n\n /*\n * Query viejo, cuenta por servicios.*\n\n $queryConceptos=\" select\".\n \" C1.CONCEPTO_ID\".\n \" , count(*) as CANTIDAD\".\n \" , sum(if(C1.RANGO_PENDIENTE='Entre 0-2', 1,0)) as 'Entre02',\".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 3-4', 1,0)) as 'Entre34', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 5-6', 1,0)) as 'Entre56', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 7-12', 1,0)) as 'Entre712', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 13-24', 1,0)) as 'Entre1324', \".\n \" sum(if(C1.RANGO_PENDIENTE='Entre 25-48', 1,0)) as 'Entre2548', \".\n \" sum(if(C1.RANGO_PENDIENTE='Mas de 48', 1,0)) as 'Masde48' \".\n \" from (SELECT \".\n \" PP.`PEDIDO`, \".\n \" PP.`PEDIDO_ID`, \".\n \" PP.`FECHA_INGRESO`, \".\n \" PP.`FECHA_ESTADO`, \".\n \" case \".\n \" when PP.FUENTE='FENIX_NAL' and PP.CONCEPTO_ID='PETEC' then 'PETEC-NAL' \".\n \" when PP.FUENTE='FENIX_BOG' and PP.CONCEPTO_ID='PETEC' then 'PETEC-BOG' \".\n \" else PP.CONCEPTO_ID \".\n \" end as CONCEPTO_ID, \".\n \" PP.`MUNICIPIO_ID`, \".\n \" PP.`DIRECCION_SERVICIO`, \".\n \" PP.`FECHAINGRESO_SOLA`, \".\n \" PP.`HORAINGRESO`, \".\n \" DATE((PP.`FECHAESTADO_SOLA`)) as FECHAESTADO_SOLA, \".\n \" PP.`HORAESTADO`, \".\n \" PP.`DIANUM_ESTADO`, \".\n \" PP.`DIANOM_ESTADO`, \".\n \" PP.`RANGO_CARGA`, \".\n \" PP.`FECHA_CARGA`, \".\n \" DATE_FORMAT((PP.FECHA_CARGA),'%H') AS HORA_CARGA, \".\n \" PP.`DIA_CARGA`, \".\n \" PP.`MESNOMBRE_CARGA`, \".\n \" PP.`MESNUMERO_CARGA`, \".\n \" PP.`SEMANA_CARGA`, \".\n \" PP.`SEMANA_ANO_CARGA`, \".\n \" PP.`ANO_CARGA`, \".\n \" PP.`FUENTE`, \".\n \" PP.`STATUS`, \".\n \" PP.`VIEWS` \".\n \" , CAST(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO)) AS CHAR(255)) AS TIEMPO_PENDIENTE_FULL \".\n \" , CASE \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 0 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 2 THEN 'Entre 0-2' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 3 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 4 THEN 'Entre 3-4' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 5 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 6 THEN 'Entre 5-6' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 7 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 12 THEN 'Entre 7-12' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 13 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 24 THEN 'Entre 13-24' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) >= 25 and HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) <= 48 THEN 'Entre 25-48' \".\n \" WHEN HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) > 48 THEN 'Mas de 48' \".\n \" END AS RANGO_PENDIENTE \".\n \" FROM `portalbd`.`informe_petec_pendientesm` PP \".\n \" where (PP.STATUS= 'PENDI_PETEC' or PP.STATUS= 'MALO' ) and PP.FUENTE in ('FENIX_NAL','FENIX_BOG','EDATEL','SIEBEL')) C1\".\n \" group by C1.CONCEPTO_ID order by count(*) DESC\";\n */\n\n $queryConceptos=\"SELECT \".\n \" C2.CONCEPTO_ID \".\n \" , COUNT(*) AS CANTIDAD \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 0 AND (C2.RANGO_PENDIENTE) <= 2 THEN 1 ELSE 0 END) as 'Entre02' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 3 AND (C2.RANGO_PENDIENTE) <= 4 THEN 1 ELSE 0 END) as 'Entre34' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 5 AND (C2.RANGO_PENDIENTE) <= 6 THEN 1 ELSE 0 END) as 'Entre56' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 7 AND (C2.RANGO_PENDIENTE) <= 12 THEN 1 ELSE 0 END) as 'Entre712' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 13 AND (C2.RANGO_PENDIENTE) <= 24 THEN 1 ELSE 0 END) as 'Entre1324' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 25 AND (C2.RANGO_PENDIENTE) <= 48 THEN 1 ELSE 0 END) as 'Entre2548' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) > 48 THEN 1 ELSE 0 END) as 'Masde48' \".\n \" FROM(SELECT \".\n \" C1.PEDIDO_ID \".\n \" , MAX(C1.CONCEPTO_ID) AS CONCEPTO_ID \".\n \" , MAX(C1.RANGO_PENDIENTE) AS RANGO_PENDIENTE \".\n \" FROM(select \".\n \" PP.PEDIDO_ID \".\n \" , case \".\n \" when PP.FUENTE='FENIX_NAL' and PP.CONCEPTO_ID='PETEC' AND PP.STATUS!='MALO' then 'PETEC-NAL' \".\n \" when PP.FUENTE='FENIX_BOG' and PP.CONCEPTO_ID='PETEC' AND PP.STATUS!='MALO' then 'PETEC-BOG' \".\n \" WHEN PP.STATUS='MALO' THEN 'MALO' \".\n \" else PP.CONCEPTO_ID \".\n \" end as CONCEPTO_ID \".\n \" , HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(PP.FECHA_ESTADO))) AS RANGO_PENDIENTE \".\n \" FROM portalbd.informe_petec_pendientesm PP \".\n \" WHERE PP.STATUS IN ('PENDI_PETEC','MALO') ) C1 \".\n \" GROUP BY C1.PEDIDO_ID ) C2 \".\n \" GROUP BY C2.CONCEPTO_ID \".\n \" order by count(*) DESC \";\n $rr = $this->mysqli->query($queryConceptos) or die($this->mysqli->error.__LINE__);\n\n $queryConceptos = array();\n if($rr->num_rows > 0){\n\n while($row = $rr->fetch_assoc()){\n //$row['label']=\"Concepto \".$row['label'];\n $row['CONCEPTO_ID']=utf8_encode($row['CONCEPTO_ID']);\n $queryConceptos[] = $row;\n }\n }\n\n $queryConceptosNUEVO=\" SELECT \".\n \" C2.CONCEPTO_ID \".\n \" , COUNT(*) AS CANTIDAD \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 0 AND (C2.RANGO_PENDIENTE) <= 2 THEN 1 ELSE 0 END) as 'Entre02' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 3 AND (C2.RANGO_PENDIENTE) <= 4 THEN 1 ELSE 0 END) as 'Entre34' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 5 AND (C2.RANGO_PENDIENTE) <= 6 THEN 1 ELSE 0 END) as 'Entre56' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 7 AND (C2.RANGO_PENDIENTE) <= 12 THEN 1 ELSE 0 END) as 'Entre712' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 13 AND (C2.RANGO_PENDIENTE) <= 24 THEN 1 ELSE 0 END) as 'Entre1324' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) >= 25 AND (C2.RANGO_PENDIENTE) <= 48 THEN 1 ELSE 0 END) as 'Entre2548' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) > 48 THEN 1 ELSE 0 END) as 'Masde48' \".\n \" FROM( \".\n \" SELECT \".\n \" C1.PEDIDO_ID \".\n \" , C1.CONCEPTO_ID \".\n \" , group_concat(DISTINCT C1.TIPO_TRABAJO order by 1 asc) AS TIPO_TRABAJO \".\n \" , group_concat(DISTINCT C1.FUENTE) AS FUENTE \".\n \" , group_concat(DISTINCT C1.RADICADO_TEMPORAL) AS RADICADO_TEMPORAL \".\n \" , MAX(C1.RANGO_PENDIENTE) as RANGO_PENDIENTE \".\n \" FROM ( \".\n \" SELECT \".\n \" PEDIDO_ID \".\n \" , SUBPEDIDO_ID \".\n \" , SOLICITUD_ID \".\n \" , CASE \".\n \" \twhen FUENTE='FENIX_BOG' and CONCEPTO_ID='PETEC' and STATUS!='MALO' then 'PETEC-BOG' \".\n \" when FUENTE='FENIX_NAL' and CONCEPTO_ID='PETEC' and STATUS!='MALO' then 'PETEC-NAL' \".\n \" when STATUS='MALO' then 'MALO' \".\n \" ELSE CONCEPTO_ID \".\n \" END AS CONCEPTO_ID \".\n \" , CASE \".\n /*\n \" \twhen DESC_TIPO_TRABAJO='NA NUEVO' then 'NUEVO' \".\n \" when DESC_TIPO_TRABAJO='MODIFICACION,NA NUEVO' then 'CAMBI,NUEVO' \".\n \" when TIPO_TRABAJO='CAMBIO' then 'CAMBI' \".\n \" when TIPO_TRABAJO='NUEVO,RETIR' then 'NUEVO' \".\n \" when TIPO_TRABAJO='8' then 'NUEVO' \".\n \" when TIPO_TRABAJO='CAMBI,NUEVO,RETIR' then 'CAMBI,NUEVO' \".\n \" when TIPO_TRABAJO='CAMBIO,VENTA' then 'CAMBI,NUEVO' \".\n */\n\n \" WHEN UPPER(TIPO_TRABAJO) like '%NUEVO%' OR UPPER(TIPO_TRABAJO) LIKE '%TRASL%' OR UPPER(TIPO_TRABAJO)='CAMBIO DE DOMICILIO' THEN 'NUEVO' \".\n \" else 'CAMBIO' \".\n \" end as TIPO_TRABAJO \".\n \" , FUENTE \".\n \" , RADICADO_TEMPORAL \".\n \" , HOUR(TIMEDIFF(CURRENT_TIMESTAMP(),(FECHA_ESTADO))) AS RANGO_PENDIENTE \".\n \" FROM portalbd.informe_petec_pendientesm \".\n \" where 1=1 \".\n \" and STATUS in ('PENDI_PETEC','MALO') \".\n \" and fuente in ('FENIX_NAL','FENIX_BOG','SIEBEL','EDATEL') \".\n \" and CONCEPTO_ID NOT IN ('OT-C11','OT-C08','OT-T01','OT-T04','OT-T05') )C1 \".\n \" GROUP BY C1.PEDIDO_ID, C1.CONCEPTO_ID ) C2 \".\n \" WHERE C2.TIPO_TRABAJO='NUEVO' \".\n \" GROUP BY C2.CONCEPTO_ID \".\n \" order by count(*) DESC\";\n //echo $queryConceptosNUEVO;\n\n $rr = $this->mysqli->query($queryConceptosNUEVO) or die($this->mysqli->error.__LINE__);\n\n $queryConceptosNUEVO = array();\n if($rr->num_rows > 0){\n\n while($row = $rr->fetch_assoc()){\n //$row['label']=\"Concepto \".$row['label'];\n $row['CONCEPTO_ID']=utf8_encode($row['CONCEPTO_ID']);\n $queryConceptosNUEVO[] = $row;\n }\n }\n\n /*\n * *Query viejo para sacar los pendientes segun su fecha cita por servicios\n $query= \" select \".\n \" C1.CONCEPTO_ID \".\n \" , count(*) as CANTIDAD \".\n \" , sum(if(C1.RANGO_PENDIENTE='Ayer', 1,0)) as 'Ayer', \".\n \" sum(if(C1.RANGO_PENDIENTE='Hoy', 1,0)) as 'Hoy', \".\n \" sum(if(C1.RANGO_PENDIENTE='Manana', 1,0)) as 'Manana', \".\n \" sum(if(C1.RANGO_PENDIENTE='Pasado Manana', 1,0)) as 'Pasado_Manana', \".\n \" sum(if(C1.RANGO_PENDIENTE='Mas de 3 dias', 1,0)) as 'Mas_de_3_dias', \".\n \" sum(if(C1.RANGO_PENDIENTE='Sin Fecha Cita', 1,0)) as 'Sin_Fecha_Cita', \".\n \" sum(if(C1.RANGO_PENDIENTE='Viejos', 1,0)) as 'Viejos' \".\n \" from (SELECT \".\n \" PP.PEDIDO, \".\n \" PP.PEDIDO_ID, \".\n \" PP.FECHA_INGRESO, \".\n \" PP.FECHA_ESTADO, \".\n \" PP.FECHA_CITA, \".\n \" case \".\n \" when PP.FUENTE='FENIX_NAL' and PP.CONCEPTO_ID='PETEC' then 'PETEC-NAL' \".\n \" when PP.FUENTE='FENIX_BOG' and PP.CONCEPTO_ID='PETEC' then 'PETEC-BOG' \".\n \" else PP.CONCEPTO_ID end as CONCEPTO_ID, \".\n \" PP.MUNICIPIO_ID, \".\n \" DATE((PP.FECHAESTADO_SOLA)) as FECHAESTADO_SOLA, \".\n \" DATE_FORMAT((PP.FECHA_CARGA),'%H') AS HORA_CARGA, \".\n \" PP.FUENTE, \".\n \" PP.STATUS \".\n \" , cast((CASE \".\n \" WHEN PP.FECHA_CITA= DATE_SUB(CURDATE() , INTERVAL 1 DAY) THEN 'Ayer' \".\n \" WHEN PP.FECHA_CITA=current_date() THEN 'Hoy' \".\n \" WHEN PP.FECHA_CITA=DATE_ADD(CURDATE(), INTERVAL 1 DAY) THEN 'Manana' \".\n \" WHEN PP.FECHA_CITA=DATE_ADD(CURDATE(), INTERVAL 2 DAY) THEN 'Pasado Manana' \".\n \" WHEN PP.FECHA_CITA='9999-00-00' OR PP.FECHA_CITA='0000-00-00' THEN 'Sin Fecha Cita' \".\n \" WHEN PP.FECHA_CITA>=DATE_ADD(CURDATE(), INTERVAL 3 DAY) THEN 'Mas de 3 dias' \".\n \" WHEN PP.FECHA_CITA<= DATE_SUB(CURDATE() , INTERVAL 1 DAY) THEN 'Viejos' \".\n \" else PP.FECHA_CITA \".\n \" END ) as char )AS RANGO_PENDIENTE \".\n \" FROM portalbd.informe_petec_pendientesm PP \".\n \" where (PP.STATUS= 'PENDI_PETEC' or PP.STATUS= 'MALO' ) and PP.FUENTE in ('FENIX_NAL','FENIX_BOG','EDATEL','SIEBEL')) C1 \".\n \" group by C1.CONCEPTO_ID order by count(*) DESC \";\n */\n //echo $query;\n $query=\"SELECT \".\n \" C2.CONCEPTO_ID \".\n \" , COUNT(*) AS CANTIDAD \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) ='Ayer' THEN 1 ELSE 0 END) as 'Ayer' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) ='Hoy' THEN 1 ELSE 0 END) as 'Hoy' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) ='Manana' THEN 1 ELSE 0 END) as 'Manana' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) ='Pasado_Manana' THEN 1 ELSE 0 END) as 'Pasado_Manana' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) ='Mas_3dias' THEN 1 ELSE 0 END) as 'Mas_de_3_dias' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) ='Sin_Agenda' THEN 1 ELSE 0 END) as 'Sin_Fecha_Cita' \".\n \" , sum( CASE WHEN (C2.RANGO_PENDIENTE) ='Viejos' THEN 1 ELSE 0 END) as 'Viejos' \".\n \" FROM(SELECT \".\n \" C1.PEDIDO_ID \".\n \" , MAX(C1.CONCEPTO_ID) AS CONCEPTO_ID \".\n \" , MAX(C1.RANGO_PENDIENTE) AS RANGO_PENDIENTE \".\n \" FROM(select \".\n \" PP.PEDIDO_ID \".\n \" , case \".\n \" when PP.FUENTE='FENIX_NAL' and PP.CONCEPTO_ID='PETEC' AND PP.STATUS!='MALO' then 'PETEC-NAL' \".\n \" when PP.FUENTE='FENIX_BOG' and PP.CONCEPTO_ID='PETEC' AND PP.STATUS!='MALO' then 'PETEC-BOG' \".\n \" WHEN PP.STATUS='MALO' THEN 'MALO' \".\n \" else PP.CONCEPTO_ID end as CONCEPTO_ID \".\n \" , cast((CASE \".\n \" WHEN PP.FECHA_CITA='9999-00-00' OR PP.FECHA_CITA='0000-00-00' THEN 'Sin_Agenda' \".\n \" WHEN PP.FECHA_CITA= DATE_SUB(CURDATE() , INTERVAL 1 DAY) THEN 'Ayer' \".\n \" WHEN PP.FECHA_CITA=current_date() THEN 'Hoy' \".\n \" WHEN PP.FECHA_CITA=DATE_ADD(CURDATE(), INTERVAL 1 DAY) THEN 'Manana' \".\n \" WHEN PP.FECHA_CITA=DATE_ADD(CURDATE(), INTERVAL 2 DAY) THEN 'Pasado_Manana' \".\n \" WHEN PP.FECHA_CITA>=DATE_ADD(CURDATE(), INTERVAL 3 DAY) THEN 'Mas_3dias' \".\n \" WHEN PP.FECHA_CITA<= DATE_SUB(CURDATE() , INTERVAL 1 DAY) THEN 'Viejos' \".\n \" else PP.FECHA_CITA \".\n \" END ) as char )AS RANGO_PENDIENTE \".\n \" FROM portalbd.informe_petec_pendientesm PP \".\n \" WHERE PP.STATUS IN ('PENDI_PETEC','MALO') ) C1 \".\n \" GROUP BY C1.PEDIDO_ID ) C2 \".\n \" GROUP BY C2.CONCEPTO_ID \".\n \" order by count(*) DESC \";\n $r = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);\n\n if($r->num_rows > 0){\n $queryConceptosFcita = array();\n while($row = $r->fetch_assoc()){\n //$row['label']=\"Concepto \".$row['label'];\n $queryConceptosFcita[] = $row;\n }\n $this->response($this->json(array('','',$queryConceptos,'',$queryConceptosFcita,$queryConceptosNUEVO)), 200); // send user details\n }\n\n $this->response('',204); // If no records \"No Content\" status\n\n }", "title": "" }, { "docid": "7ea39bf71caa0223072374e393f2b88a", "score": "0.5863051", "text": "public function parametros_eficacia_unidad($matriz,$proy_id,$tp_rep){\n if($tp_rep==1){ //// Normal\n $class='class=\"table table-bordered\" align=center style=\"width:60%;\"';\n $div='<div id=\"parametro_efi\" style=\"width: 600px; height: 400px; margin: 0 auto\"></div>';\n\n }\n else{ /// Impresion\n $class='class=\"change_order_items\" border=1 align=center style=\"width:100%;\"';\n $div='<div id=\"parametro_efi_print\" style=\"width: 650px; height: 330px; margin: 0 auto\"></div>';\n }\n // $nro=$matriz;\n $tabla='';\n $tabla .='<table '.$class.'>\n <tr>\n <td>\n '.$div.'\n </td>\n </tr>\n <tr>\n <td>\n <table '.$class.'>\n <thead>\n <tr>\n <th style=\"width: 33%\"><center><b>TIPO DE CALIFICACI&Oacute;N</b></center></th>\n <th style=\"width: 33%\"><center><b>PARAMETRO</b></center></th>\n <th style=\"width: 33%\"><center><b>NRO DE UNIDADES</b></center></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>INSATISFACTORIO</td>\n <td>0% a 75%</td>\n <td align=\"center\" ><a class=\"btn btn-danger\" style=\"width: 100%\" title=\"'.$matriz[1][2].' Unidades/Proyectos\">'.$matriz[1][2].'</a></td>\n </tr>\n <tr>\n <td>REGULAR</td>\n <td>75% a 90% </td>\n <td align=\"center\" ><a class=\"btn btn-warning\" style=\"width: 100%\" align=\"center\" title=\"'.$matriz[2][2].' Unidades/Proyectos\">'.$matriz[2][2].'</a></td>\n </tr>\n <tr>\n <td>BUENO</td>\n <td>90% a 99%</td>\n <td align=\"center\" ><a class=\"btn btn-info\" style=\"width: 100%\" align=\"center\" title=\"'.$matriz[3][2].' Unidades/Proyectos\">'.$matriz[3][2].'</a></td>\n </tr>\n <tr>\n <td>OPTIMO </td>\n <td>100%</td>\n <td align=\"center\" ><a class=\"btn btn-success\" style=\"width: 100%\" align=\"center\" title=\"'.$matriz[4][2].' Unidades/Proyectos\">'.$matriz[4][2].'</a></td>\n </tr>\n <tr>\n <td colspan=2 align=\"center\"><b>TOTAL SERVICIOS : </b></td>\n <td align=\"center\"><b>'.($matriz[1][2]+$matriz[2][2]+$matriz[3][2]+$matriz[4][2]).'</b></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>';\n\n return $tabla;\n }", "title": "" }, { "docid": "991350073b21fd5043c2ff1fc1a38810", "score": "0.5861048", "text": "private function select_propietario_por_id(){\n $dbName = new DataBase($this->db);\n $sentencia = \"select b.idbaseusuario ,b.nombre,b.ipserver,\n b.nombre_condominio,b.foto_path,b.ciudad \n from bases b , usuarios u ,base_usuarios bu \n where u.email = '$this->email'\n and bu.idusuarios =u.idusuarios\n and bu.idbaseusuario = b.idbaseusuario ;\"; \n return $dbName->consultar_todos($sentencia);\n }", "title": "" }, { "docid": "979e84e51e47105f41d6165174fa8d04", "score": "0.5860466", "text": "public function ListarPratos(){\n require_once('model/destaque_class.php');\n $destaque_class = new Destaques();\n $destaque = $destaque_class->SelectPratos();\n\n return $destaque;\n\n }", "title": "" }, { "docid": "b501af556db7261b505a2a6b0c9cda28", "score": "0.58585685", "text": "public function ver_reporteevalpoa($com_id){\n $data['componente'] = $this->model_componente->get_componente($com_id); ///// DATOS DEL COMPONENTE\n if(count($data['componente'])!=0){\n $data['mes'] = $this->mes_nombre();\n $data['fase']=$this->model_faseetapa->get_fase($data['componente'][0]['pfec_id']); /// DATOS FASE\n $data['proyecto'] = $this->model_proyecto->get_id_proyecto($data['fase'][0]['proy_id']); //// DATOS PROYECTO\n if($data['proyecto'][0]['tp_id']==4){\n $data['proyecto'] = $this->model_proyecto->get_datos_proyecto_unidad($data['fase'][0]['proy_id']); /// PROYECTO\n }\n $data['cabecera']=$this->cabecera($data['componente'],$data['proyecto']); /// Cabecera\n $data['datos_mes'] = $this->verif_mes;\n\n /// ----------------------------------------------------\n $operaciones=$this->model_producto->list_operaciones_subactividad($com_id); /// lISTA DE OPERACIONES\n $tabla='';\n $tabla.='<table cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:100%;\" align=center>\n <thead>\n <tr bgcolor=#f8f2f2 align=center>\n <th style=\"font-size: 7px; height:17px;\" colspan=9>DATOS POA (OPERACIONES)</th>\n <th colspan=3>DATOS SEGUIMIENTO</th>\n </tr> \n <tr style=\"font-size: 7px; height:17px;\" bgcolor=#f8f2f2 align=center>\n <th style=\"width:1%;\"></th>\n <th style=\"width:3%;\"><b>COD. OR.</b></th>\n <th style=\"width:3%;\"><b>COD. OPE.</b></th>\n <th style=\"width:20%;\">OPERACI&Oacute;N</th>\n <th style=\"width:13%;\">INDICADOR</th>\n <th style=\"width:3%;\">META</th>\n <th style=\"width:3%;\">PROG.</th>\n <th style=\"width:3%;\">EJEC.</th>\n <th style=\"width:3%;\">%EFI.</th>\n <th style=\"width:18%;\">MEDIO DE VERIFICACIÓN</th> \n <th style=\"width:18%;\">OBSERVACI&Oacute;N</th> \n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($operaciones as $row){\n $indi_id='';\n if($row['indi_id']==2 & $row['mt_id']==1){\n $indi_id='%';\n }\n $diferencia=$this->verif_valor_no_ejecutado($row['prod_id'],$this->verif_mes[1]);\n \n if($diferencia[1]!=0 || $diferencia[2]!=0){\n $ejec=$this->model_seguimientopoa->get_seguimiento_poa_mes($row['prod_id'],$this->verif_mes[1]);\n $color='';\n $nro++;\n $tabla.=\n '<tr style=\"height:15px; font-size: 6.5px;\" bgcolor=\"'.$color.'\">\n <td style=\"height:15px; width: 1%; text-align: center;\" >'.$nro.'</td>\n <td style=\"width: 3%; text-align: center; font-size: 9px;\"><b>'.$row['or_codigo'].'</b></td>\n <td style=\"width: 3%; text-align: center; font-size: 9px;\"><b>'.$row['prod_cod'].'</b></td>\n <td style=\"width: 20%;\">'.$row['prod_producto'].'</td>\n <td style=\"width: 13%;\">'.$row['prod_indicador'].'</td>\n <td align=right>'.round($row['prod_meta'],2).'</td>\n <td style=\"width: 3%; text-align: right;\">'.$diferencia[1].'</td>';\n if(count($ejec)!=0){\n $tabla.='\n <td style=\"width: 3%; text-align: right;\">'.$diferencia[2].'</td>\n <td style=\"width: 3%; text-align: right;\"></td>\n <td style=\"width: 15%;\">'.$ejec[0]['medio_verificacion'].'</td>\n <td style=\"width: 15%;\">'.$ejec[0]['observacion'].'</td>';\n }\n else{\n $tabla.='<td style=\"width: 3%; text-align: right;\">0</td>';\n $no_ejec=$this->model_seguimientopoa->get_seguimiento_poa_mes_noejec($row['prod_id'],$data['datos_mes'][1]);\n if(count($no_ejec)!=0){\n $tabla.='\n <td style=\"width: 3%; text-align: right;\"></td>\n <td style=\"width: 15%;\">'.$no_ejec[0]['medio_verificacion'].'</td>\n <td style=\"width: 15%;\">'.$no_ejec[0]['observacion'].'</td>';\n }\n else{\n $tabla.='\n <td style=\"width: 3%; text-align: right;\"></td>\n <td style=\"width: 15%;\"></td>\n <td style=\"width: 15%;\"></td>';\n }\n }\n $tabla.='\n </tr>';\n }\n\n }\n $tabla.='\n </tbody>\n </table>';\n /// -----------------------------------------------------\n\n $data['operaciones']=$tabla; /// Reporte Gasto Corriente, Proyecto de Inversion 2020\n $this->load->view('admin/evaluacion/seguimiento_poa/reporte_seguimiento_poa', $data);\n }\n else{\n echo \"Error !!!\";\n }\n }", "title": "" }, { "docid": "9f7a4cd8a06b6b9b40c7b166888114eb", "score": "0.58529025", "text": "function Parcelas() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_copia = $_REQUEST['w_copia'];\r\n $w_sq_acordo_aditivo = $_REQUEST['w_sq_acordo_aditivo'];\r\n\r\n // Recupera dados do contrato\r\n $sql = new db_getSolicData; $RS_Solic = $sql->getInstanceOf($dbms,$w_chave,$SG);\r\n $w_inicio = f($RS_Solic,'inicio');\r\n $w_fim = addDays(f($RS_Solic,'fim'),f($RS_Solic,'dias_pagamento'));\r\n $w_dias_pagamento = f($RS_Solic,'dias_pagamento');\r\n $w_prazo_indeterm = f($RS_Solic,'prazo_indeterm');\r\n $w_valor_acordo = f($RS_Solic,'valor_inicial');\r\n $w_texto = '';\r\n $w_edita = true;\r\n \r\n // Recupera dados do aditivo, caso tenha sido informado\r\n if (nvl($w_sq_acordo_aditivo,'')!='') {\r\n $sql = new db_getAcordoAditivo; $RS_Adit = $sql->getInstanceOf($dbms,$w_cliente,$w_sq_acordo_aditivo,$w_chave,null,null,null,null,null,null,null,null,null);\r\n foreach($RS_Adit as $row) { $RS_Adit = $row; break; }\r\n if (f($RS_Adit,'prorrogacao')=='N' || (f($RS_Adit,'prorrogacao')=='S' && f($RS_Adit,'valor_aditivo')>0)) {\r\n $w_inicio = f($RS_Adit,'inicio');\r\n $w_valor_acordo = f($RS_Adit,'valor_aditivo');\r\n }\r\n $w_fim = f($RS_Adit,'fim');\r\n $w_prazo_indeterm = f($RS_Adit,'prazo_indeterm');\r\n $w_prorrogacao = f($RS_Adit,'prorrogacao');\r\n $w_acrescimo = f($RS_Adit,'acrescimo');\r\n $w_supressao = f($RS_Adit,'supressao');\r\n $w_valor_parcela = f($RS_Adit,'vl_parcela');\r\n $w_texto = '<tr><td colspan=\"2\"><hr NOSHADE color=#000000 size=2></td></tr>';\r\n $w_texto .= chr(13).'<tr><td colspan=\"2\" bgcolor=\"#f0f0f0\"><div align=justify><font size=\"1\"><b>';\r\n $w_texto .= chr(13).'Aditivo: '.f($RS_Adit,'codigo').' abrangendo o período de '.formataDataEdicao(f($RS_Adit,'inicio')).' a '.formataDataEdicao(f($RS_Adit,'fim'));\r\n $w_texto .= chr(13).' <br>[Prorrogação: '.f($RS_Adit,'nm_prorrogacao').'] [Reajuste: '.f($RS_Adit,'nm_revisao').'] [Tipo: '.f($RS_Adit,'nm_tipo').']';\r\n }\r\n \r\n // Bloqueia a inclusão, geração e exclusão de parcelas ligadas ao contrato se já existir algum aditivo\r\n if((nvl($w_sq_acordo_aditivo,'')=='' && ((nvl(f($RS_Solic,'aditivo_prorrogacao'),'')!='' && nvl(f($RS_Adit,'valor_aditivo'),0)>0)|| nvl(f($RS_Solic,'aditivo_excedente'),'')!=''))) {\r\n $w_edita = false;\r\n }\r\n\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_ordem = $_REQUEST['w_ordem'];\r\n $w_data = $_REQUEST['w_data'];\r\n $w_observacao = $_REQUEST['w_observacao'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_per_ini = $_REQUEST['w_per_ini'];\r\n $w_per_fim = $_REQUEST['w_per_fim'];\r\n $w_valor_inicial = $_REQUEST['w_valor_inicial'];\r\n $w_valor_excedente = $_REQUEST['w_valor_excedente'];\r\n $w_valor_reajuste = $_REQUEST['w_valor_reajuste'];\r\n } elseif ($O=='L') {\r\n $sql = new db_getAcordoParcela; $RS = $sql->getInstanceOf($dbms,$w_chave,null,'NOTA',null,null,null,null,null,null,$w_sq_acordo_aditivo);\r\n $RS = SortArray($RS,'ordem','asc','vencimento','asc');\r\n } elseif (strpos('AEV',$O)!==false || nvl($w_copia,'')!='') {\r\n // Recupera os dados do endereço informado\r\n $sql = new db_getAcordoParcela; $RS = $sql->getInstanceOf($dbms,$w_chave,nvl($w_chave_aux,$w_copia),'NOTA',null,null,null,null,null,null,$w_sq_acordo_aditivo);\r\n foreach($RS as $row) {\r\n $w_ordem = f($row,'ordem');\r\n $w_data = FormataDataEdicao(f($row,'vencimento'));\r\n $w_observacao = f($row,'observacao');\r\n $w_valor = number_format(f($row,'valor'),2,',','.'); \r\n $w_per_ini = FormataDataEdicao(f($row,'inicio'));\r\n $w_per_fim = FormataDataEdicao(f($row,'fim'));\r\n $w_valor_inicial = formatNumber(f($row,'valor_inicial'));\r\n $w_valor_excedente = formatNumber(f($row,'valor_excedente'));\r\n $w_valor_reajuste = formatNumber(f($row,'valor_reajuste'));\r\n break;\r\n }\r\n } \r\n\r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n if (strpos('IAEGCPV',$O)!==false) {\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataValor();\r\n ShowHTML('function trataUnica() {');\r\n ShowHTML(' if (document.Form.w_tipo_geracao[0].checked || document.Form.w_tipo_geracao[1].checked || document.Form.w_tipo_geracao[4].checked) {');\r\n ShowHTML(' document.Form.w_tipo_mes[0].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_mes[1].checked = false;');\r\n ShowHTML(' document.Form.w_vencimento[0].checked = false;');\r\n ShowHTML(' document.Form.w_vencimento[1].checked = false;');\r\n ShowHTML(' document.Form.w_vencimento[2].checked = false;');\r\n ShowHTML(' document.Form.w_dia_vencimento.value = \"\";');\r\n ShowHTML(' document.Form.w_valor_parcela[0].checked = false;');\r\n ShowHTML(' document.Form.w_valor_parcela[1].checked = false;');\r\n if(nvl($w_sq_acordo_aditivo,'')=='') {\r\n ShowHTML(' document.Form.w_valor_parcela[2].checked = false;');\r\n ShowHTML(' document.Form.w_valor_parcela[3].checked = false;');\r\n }\r\n ShowHTML(' document.Form.w_valor_diferente.value = \"\";');\r\n ShowHTML(' if (!document.Form.w_tipo_geracao[4].checked) document.Form.w_qtd_31.value = \"\";');\r\n ShowHTML(' } else if (document.Form.w_tipo_geracao[2].checked || document.Form.w_tipo_geracao[3].checked) {');\r\n ShowHTML(' document.Form.w_qtd_31.value = \"\";');\r\n ShowHTML(' }');\r\n ShowHTML('}');\r\n ShowHTML('function trataVencimento() {');\r\n ShowHTML(' if (document.Form.w_tipo_geracao[0].checked || document.Form.w_tipo_geracao[1].checked || document.Form.w_tipo_geracao[4].checked) {');\r\n ShowHTML(' document.Form.w_tipo_geracao[0].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[1].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[4].checked = false;');\r\n ShowHTML(' }');\r\n ShowHTML(' if (document.Form.w_vencimento[0].checked || document.Form.w_vencimento[1].checked) {');\r\n ShowHTML(' document.Form.w_dia_vencimento.value = \"\";');\r\n ShowHTML(' }');\r\n ShowHTML('}');\r\n ShowHTML('function trataValor() {');\r\n ShowHTML(' if (document.Form.w_tipo_geracao[0].checked || document.Form.w_tipo_geracao[1].checked || document.Form.w_tipo_geracao[4].checked) {');\r\n ShowHTML(' document.Form.w_tipo_geracao[0].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[1].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[4].checked = false;');\r\n ShowHTML(' }');\r\n ShowHTML(' if (document.Form.w_valor_parcela[0].checked) {');\r\n ShowHTML(' document.Form.w_valor_diferente.value = \"\";');\r\n ShowHTML(' }');\r\n ShowHTML('}');\r\n ShowHTML('function trataDiaVencimento() {');\r\n ShowHTML(' if (document.Form.w_tipo_geracao[0].checked || document.Form.w_tipo_geracao[1].checked || document.Form.w_tipo_geracao[4].checked) {');\r\n ShowHTML(' document.Form.w_tipo_geracao[0].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[1].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[4].checked = false;');\r\n ShowHTML(' }');\r\n ShowHTML(' document.Form.w_vencimento[2].checked = true;');\r\n ShowHTML('}');\r\n ShowHTML('function trataValorDiferente() {');\r\n ShowHTML(' if (document.Form.w_tipo_geracao[0].checked || document.Form.w_tipo_geracao[1].checked || document.Form.w_tipo_geracao[4].checked) {');\r\n ShowHTML(' document.Form.w_tipo_geracao[0].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[1].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[4].checked = false;');\r\n ShowHTML(' }');\r\n ShowHTML(' if (document.Form.w_valor_parcela[0].checked) {');\r\n ShowHTML(' document.Form.w_valor_parcela[0].checked = false;');\r\n ShowHTML(' }');\r\n ShowHTML('}');\r\n ShowHTML('function trataQuantidade() {');\r\n ShowHTML(' if (document.Form.w_tipo_geracao[0].checked || document.Form.w_tipo_geracao[1].checked || document.Form.w_tipo_geracao[2].checked || document.Form.w_tipo_geracao[3].checked) {');\r\n ShowHTML(' document.Form.w_tipo_geracao[0].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[1].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[2].checked = false;');\r\n ShowHTML(' document.Form.w_tipo_geracao[3].checked = false;');\r\n ShowHTML(' }');\r\n ShowHTML(' document.Form.w_tipo_geracao[4].checked = true;');\r\n ShowHTML('}');\r\n ValidateOpen('Validacao');\r\n if (strpos('IA',$O)!==false) {\r\n Validate('w_ordem','Número de ordem da parcela','1','1','1','4','','0123456789');\r\n Validate('w_data','Data de vencimento da parcela','DATA','1','10','10','','0123456789/');\r\n if ($w_segmento=='Público' || $w_segmento=='Agência' || $w_segmento=='Organismo Internacional') {\r\n CompData('w_data','Data de vencimento','>=','w_inicio','Data de início de vigência');\r\n CompData('w_data','Data de vencimento','<=','w_fim', FormataDataEdicao($w_fim).' (término da vigência do contrato mais '.$w_dias_pagamento.' dias, que é o limite para encerramento financeiro do contrato)');\r\n }\r\n if(nvl($w_sq_acordo_aditivo,'')=='') {\r\n Validate('w_valor','Valor da parcela','VALOR','1',4,18,'','0123456789.,');\r\n } else {\r\n if(f($RS_Adit,'prorrogacao')=='S'||(f($RS_Adit,'prorrogacao')=='N'&&f($RS_Adit,'acrescimo')=='N'&&f($RS_Adit,'supressao')=='N')) Validate('w_valor_inicial','Valor inicial','VALOR','1',4,18,'','0123456789.,');\r\n if(f($RS_Adit,'acrescimo')=='S'||f($RS_Adit,'supressao')=='S') Validate('w_valor_excedente','Valor do acréscimo/supressão','VALOR','1',4,18,'','-0123456789.,');\r\n Validate('w_valor_reajuste','Valor reajuste','VALOR','1',4,18,'','0123456789.,-');\r\n }\r\n Validate('w_per_ini','Início do período de realização','DATA','1','10','10','','0123456789/');\r\n /*\r\n if($w_segmento=='Público' || $w_segmento=='Agência') {\r\n CompData('w_per_ini','Início do período de realização','>=','w_inicio','Data de início de vigência');\r\n CompData('w_per_ini','Início do período de realização','<=','w_fim','Data de término de vigência');\r\n }\r\n */\r\n Validate('w_per_fim','Fim do período de realização','DATA','1','10','10','','0123456789/');\r\n /*\r\n if($w_segmento=='Público' || $w_segmento=='Agência') {\r\n CompData('w_per_fim','Fim do período de realização','>=','w_inicio','Data de início de vigência');\r\n CompData('w_per_fim','Fim do período de realização','<=','w_fim','Data de término de vigência');\r\n }\r\n */\r\n CompData('w_per_ini','Início do período de realização','<=','w_per_fim','Fim do período de realização');\r\n Validate('w_observacao','Observação','1','','3','200','1','1');\r\n } elseif ($O=='G') {\r\n Validate('w_dia_vencimento','Dia de vencimento','1','',1,2,'','0123456789');\r\n if(nvl($w_sq_acordo_aditivo,'')=='') {\r\n Validate('w_valor_diferente','Valor da parcela','VALOR','',4,18,'','0123456789.,');\r\n }\r\n ShowHTML(' for (i = 0; i < theForm.w_tipo_geracao.length; i++) {');\r\n ShowHTML(' if (theForm.w_tipo_geracao[i].checked) break;');\r\n ShowHTML(' if (i == theForm.w_tipo_geracao.length-1) {');\r\n ShowHTML(' alert(\"Você deve selecionar uma das opções apresentadas!\");');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' if (theForm.w_tipo_geracao[2].checked || theForm.w_tipo_geracao[3].checked ) {');\r\n ShowHTML(' for (i = 0; i < theForm.w_vencimento.length; i++) {');\r\n ShowHTML(' if (theForm.w_vencimento[i].checked) break;');\r\n ShowHTML(' if (i == theForm.w_vencimento.length-1) {');\r\n ShowHTML(' alert(\"Você deve selecionar um dia para vencimento das parcelas!\");');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' for (i = 0; i < theForm.w_valor_parcela.length; i++) {');\r\n ShowHTML(' if (theForm.w_valor_parcela[i].checked) break;');\r\n ShowHTML(' if (i == theForm.w_valor_parcela.length-1) {');\r\n ShowHTML(' alert(\"Você deve selecionar uma das opções para cálculo do valor das parcelas!\");');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' if (theForm.w_vencimento[2].checked) {');\r\n ShowHTML(' if (theForm.w_dia_vencimento.value == \"\") {');\r\n ShowHTML(' alert(\"Você deve informar o dia de vencimento das parcelas!\");');\r\n ShowHTML(' theForm.w_dia_vencimento.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' if (theForm.w_dia_vencimento.value > 28) {');\r\n ShowHTML(' alert(\"Para vencimento após o dia 28, utilize a opção de vencimento no último dia do mês!\");');\r\n ShowHTML(' theForm.w_dia_vencimento.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n if(nvl($w_sq_acordo_aditivo,'')=='') { \r\n ShowHTML(' if (theForm.w_valor_parcela[2].checked || theForm.w_valor_parcela[3].checked) {');\r\n ShowHTML(' if (theForm.w_valor_diferente.value == \"\") {');\r\n ShowHTML(' alert(\"Você deve informar o valor para a parcela diferente das demais!\");');\r\n ShowHTML(' theForm.w_valor_diferente.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n }\r\n ShowHTML(' if (theForm.w_tipo_geracao[4].checked) {');\r\n ShowHTML(' if (theForm.w_qtd_31.value == \"\") {');\r\n ShowHTML(' alert(\"Você deve informar a quantidade de parcelas a serem geradas!\");');\r\n ShowHTML(' theForm.w_qtd_31.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' } else {');\r\n Validate('w_qtd_31','Quantidade de parcelas','VALOR','',1,4,'','0123456789');\r\n CompValor('w_qtd_31','Quantidade de parcelas','>=','1','1');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n Validate('w_observacao','Observação','1','','3','200','1','1');\r\n } elseif ($O=='V') {\r\n ShowHTML(' var i; ');\r\n ShowHTML(' var w_erro=true; ');\r\n ShowHTML(' if (theForm[\"w_sq_acordo_parcela[]\"].length!=undefined) {');\r\n ShowHTML(' for (i=0; i < theForm[\"w_sq_acordo_parcela[]\"].length; i++) {');\r\n ShowHTML(' if (theForm[\"w_sq_acordo_parcela[]\"][i].checked) w_erro=false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' else {');\r\n ShowHTML(' if (theForm[\"w_sq_acordo_parcela[]\"].checked) w_erro=false;');\r\n ShowHTML(' }');\r\n ShowHTML(' if (w_erro) {');\r\n ShowHTML(' alert(\"Você deve informar pelo menos uma parcela!\"); ');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n } \r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } \r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</head>');\r\n if ($w_troca>'') {\r\n BodyOpenClean('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } elseif ($O=='I' || $O=='A') {\r\n BodyOpenClean('onLoad=\\'document.Form.w_ordem.focus()\\';');\r\n } else {\r\n BodyOpenClean('onLoad=\\'this.focus()\\';');\r\n } \r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n if (nvl($w_sq_acordo_aditivo,'')!='') {\r\n ShowHTML('<tr><td colspan=\"2\"><hr NOSHADE color=#000000 size=4></td></tr>');\r\n ShowHTML('<tr><td colspan=\"2\" bgcolor=\"#f0f0f0\"><div align=justify><font size=\"2\"><b>');\r\n ShowHTML(' '.f($RS_Solic,'nome').': '.f($RS_Solic,'codigo_interno').' - '.f($RS_Solic,'titulo'));\r\n ShowHTML(' <br>Vigência: '.formataDataEdicao(f($RS_Solic,'inicio')).' a '.formataDataEdicao(f($RS_Solic,'fim')));\r\n ShowHTML(' '.$w_texto.'</b></font></div></td></tr>');\r\n ShowHTML('<tr><td colspan=\"2\"><hr NOSHADE color=#000000 size=4></td></tr>');\r\n }\r\n ShowHTML('<center>');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"97%\">');\r\n if ($O=='L') {\r\n // Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr valign=\"top\"><td>');\r\n if($w_edita) {\r\n //if (nvl($w_sq_acordo_aditivo,'')=='' || (f($RS_Adit,'prorrogacao')=='S'||(f($RS_Adit,'prorrogacao')=='N'&&f($RS_Adit,'acrescimo')=='N'&&f($RS_Adit,'supressao')=='N'))) {\r\n ShowHTML(' <a accesskey=\"I\" class=\"ss\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_chave='.$w_chave.'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>I</u>ncluir</a>&nbsp;');\r\n //}\r\n if (nvl($w_sq_acordo_aditivo,'')=='' || (f($RS_Adit,'revisao')=='S'||f($RS_Adit,'prorrogacao')=='S'||f($RS_Adit,'acrescimo')=='S'||f($RS_Adit,'supressao')=='S')) {\r\n if($w_prorrogacao=='N') {\r\n ShowHTML(' <a accesskey=\"G\" class=\"ss\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=V&w_chave='.$w_chave.'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>G</u>erar</a>&nbsp;');\r\n } else {\r\n ShowHTML(' <a accesskey=\"G\" class=\"ss\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=G&w_chave='.$w_chave.'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>G</u>erar</a>&nbsp;');\r\n }\r\n }\r\n }\r\n if(nvl($w_sq_acordo_aditivo,'')>'') ShowHTML(' <a accesskey=\"F\" class=\"ss\" href=\"javascript:window.close(); opener.location.reload(); opener.focus();\"><u>F</u>echar</a>&nbsp;');\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td colspan=2>');\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 if (nvl($w_sq_acordo_aditivo,'')=='') {\r\n ShowHTML(' <td><b>Ordem</font></td>');\r\n ShowHTML(' <td><b>Período</font></td>');\r\n ShowHTML(' <td><b>Vencimento</font></td>');\r\n ShowHTML(' <td><b>Valor</font></td>');\r\n } else {\r\n ShowHTML(' <td rowspan=2><b>Ordem</font></td>');\r\n ShowHTML(' <td rowspan=2><b>Período</font></td>');\r\n ShowHTML(' <td rowspan=2><b>Vencimento</font></td>');\r\n ShowHTML(' <td colspan=4><b>Valor</font></td>');\r\n } \r\n ShowHTML(' <td><b>Observação</font></td>');\r\n ShowHTML(' <td class=\"remover\"><b>Operações</font></td>');\r\n ShowHTML(' </tr>');\r\n if (nvl($w_sq_acordo_aditivo,'')>'') {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Inicial</font></td>');\r\n ShowHTML(' <td><b>Acres./Supr.</font></td>');\r\n ShowHTML(' <td><b>Reajuste</font></td>');\r\n ShowHTML(' <td><b>Total</font></td>');\r\n ShowHTML(' <td colspan=2><b>&nbsp;</font></td>');\r\n ShowHTML(' </tr>');\r\n }\r\n if (count($RS)<=0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=9 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n $w_total = 0;\r\n $w_total_i = 0;\r\n $w_total_e = 0;\r\n $w_total_r = 0;\r\n foreach($RS as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td>');\r\n if (nvl(f($row,'quitacao'),'nulo')=='nulo') {\r\n if (f($row,'vencimento')<addDays(time(),-1)) {\r\n ShowHTML(' <img src=\"'.$conImgAtraso.'\" border=0 width=10 heigth=10 align=\"center\">');\r\n } elseif (f($row,'vencimento')-addDays(time(),-1)<=5) {\r\n ShowHTML(' <img src=\"'.$conImgAviso.'\" border=0 width=10 height=10 align=\"center\">');\r\n } else {\r\n ShowHTML(' <img src=\"'.$conImgNormal.'\" border=0 width=10 height=10 align=\"center\">');\r\n } \r\n } else {\r\n if (f($row,'quitacao')<f($row,'vencimento')) {\r\n ShowHTML(' <img src=\"'.$conImgOkAtraso.'\" border=0 width=10 heigth=10 align=\"center\">');\r\n } else {\r\n ShowHTML(' <img src=\"'.$conImgOkNormal.'\" border=0 width=10 height=10 align=\"center\">');\r\n } \r\n } \r\n ShowHTML(' '.f($row,'ordem').'</td>');\r\n if(nvl(f($row,'inicio'),'')!='') ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'inicio')).' a '.FormataDataEdicao(f($row,'fim')).'</td>');\r\n else ShowHTML(' <td align=\"center\">---</td>');\r\n ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'vencimento')).'</td>');\r\n if (nvl($w_sq_acordo_aditivo,'')>'') {\r\n ShowHTML(' <td align=\"right\">'.number_format(f($row,'valor_inicial'),2,',','.').'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\">'.number_format(f($row,'valor_excedente'),2,',','.').'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\">'.number_format(f($row,'valor_reajuste'),2,',','.').'&nbsp;&nbsp;</td>');\r\n } \r\n ShowHTML(' <td align=\"right\">'.number_format(f($row,'valor'),2,',','.').'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td>'.crlf2br(nvl(f($row,'observacao'),'---')).'</td>');\r\n ShowHTML(' <td class=\"remover\" align=\"top\" nowrap>');\r\n if(nvl(f($row,'quitacao'),'')!='') {\r\n ShowHTML(' <A class=\"hl\" HREF=\"javascript:this.status.value;\" onClick=\"alert(\"Parcelas pagas não podem ser alteradas.\")\";>AL</A>&nbsp');\r\n ShowHTML(' <A class=\"hl\" HREF=\"javascript:this.status.value;\" onClick=\"alert(\"Parcelas pagas não podem ser excluídas.\")\";>EX</A>&nbsp');\r\n } else {\r\n if(nvl(f($row,'sq_acordo_aditivo'),'')!='' && $P1==1) {\r\n ShowHTML(' <A class=\"hl\" HREF=\"javascript:this.status.value;\" onClick=\"alert(\"Parcelas ligada a aditivo!\\nUse a operação parcelas do aditivo.\")\";>AL</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_chave='.$w_chave.'&w_chave_aux='.f($row,'sq_acordo_parcela').'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\">AL</A>&nbsp');\r\n }\r\n if($w_edita) {\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.'GRAVA&R='.$w_pagina.$par.'&O=E&w_chave='.$w_chave.'&w_chave_aux='.f($row,'sq_acordo_parcela').'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\" onClick=\"return confirm(\\'Confirma a exclusão do registro?\\');\">EX</A>&nbsp');\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_chave='.$w_chave.'&w_copia='.f($row,'sq_acordo_parcela').'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\" TITLE=\"Gera uma nova parcela a partir dos dados desta.\">CO</A>&nbsp');\r\n }\r\n }\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n if(f($row,'prorrogacao')=='N' && (f($row,'acrescimo')=='S'||f($row,'supressao')=='S')) {\r\n $w_total += f($row,'valor_excedente');\r\n } else {\r\n if (1==1 || f($row,'adi_vl_ini')>0 || nvl($w_sq_acordo_aditivo,'')=='') { $w_total_i += f($row,'valor_inicial'); $w_total += f($row,'valor_inicial'); };\r\n if (1==1 || f($row,'adi_vl_acr')>0) { $w_total_e += f($row,'valor_excedente'); $w_total += f($row,'valor_excedente'); };\r\n if (1==1 || f($row,'adi_vl_rea')>0) { $w_total_r += f($row,'valor_reajuste'); $w_total += f($row,'valor_reajuste'); };\r\n }\r\n } \r\n } \r\n //if ($w_total>0) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td align=\"center\" colspan=3><b>Total</b></td>');\r\n if (nvl($w_sq_acordo_aditivo,'')>'') {\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total_i).'</b>&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total_e).'</b>&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total_r).'</b>&nbsp;&nbsp;</td>');\r\n }\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total).'</b>&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td colspan=3>');\r\n //if (round($w_valor_acordo-$w_total,2)!=0) {\r\n if (round($w_total-$w_total,2)!=0) {\r\n //ShowHTML('<b>O valor das parcelas difere do valor contratado ('.formatNumber(round($w_valor_acordo-$w_total,2)).')</b></td>');\r\n ShowHTML('<b>O valor das parcelas difere do valor contratado ('.formatNumber(round($w_total-$w_total,2)).')</b></td>');\r\n } else {\r\n ShowHTML(' &nbsp;</td>');\r\n } \r\n ShowHTML(' </tr>');\r\n //} \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } elseif (strpos('IAE',$O)!==false) {\r\n if(!$w_edita) {\r\n $w_Disabled=' READONLY ';\r\n } else { \r\n if (strpos('EV',$O)!==false) $w_Disabled=' DISABLED ';\r\n }\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST', 'return(Validacao(this));', null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_aux\" value=\"'.$w_chave_aux.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_acordo_aditivo\" value=\"'.$w_sq_acordo_aditivo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio\" value=\"'.FormataDataEdicao($w_inicio).'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_fim\" value=\"'.FormataDataEdicao($w_fim).'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td><b>ATENÇÃO</b>: a data de vencimento deve estar contida no período de <b>'.FormataDataEdicao($w_inicio).'</b> e <b>'.FormataDataEdicao($w_fim).'</b>, que é a vigência do contrato acrescida do seu limite para encerramento financeiro (<b>'.$w_dias_pagamento.'</b> dias).<br>&nbsp;</td>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0><tr valign=\"top\">');\r\n ShowHTML(' <td><b>Número de <u>o</u>rdem da parcela:</b><br><input '.$w_Disabled.' accesskey=\"O\" type=\"text\" name=\"w_ordem\" class=\"sti\" SIZE=\"4\" MAXLENGTH=\"4\" VALUE=\"'.$w_ordem.'\" title=\"Informe o número de ordem da parcela, que indica a seqüência de pagamento.\"></td>');\r\n ShowHTML(' <td><b><u>D</u>ata de vencimento:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_data\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_data.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Informe a data de vencimento da parcela.\">'.ExibeCalendario('Form','w_data').'</td>');\r\n if(nvl($w_sq_acordo_aditivo,'')=='') {\r\n ShowHTML(' <td><b><u>V</u>alor:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor da parcela.\"></td>');\r\n } else {\r\n if(f($RS_Adit,'prorrogacao')=='S'||(f($RS_Adit,'prorrogacao')=='N'&&f($RS_Adit,'acrescimo')=='N'&&f($RS_Adit,'supressao')=='N')) {\r\n ShowHTML(' <td><b><u>V</u>alor inicial:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor_inicial\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor_inicial.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor inicial da parcela.\"></td>');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor_inicial\" value=\"'.$w_valor_inicial.'\">');\r\n }\r\n if(f($RS_Adit,'acrescimo')=='S'||f($RS_Adit,'supressao')=='S') {\r\n ShowHTML(' <td><b><u>V</u>alor excedente:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor_excedente\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor_excedente.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor de excedente da parcela.\"></td>');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor_excedente\" value=\"'.$w_valor_excedente.'\">');\r\n }\r\n //if(f($RS_Adit,'revisao')=='S') {\r\n ShowHTML(' <td><b><u>V</u>alor reajuste:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor_reajuste\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor_reajuste.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor de reajuste da parcela.\"></td>');\r\n /*\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor_reajuste\" value=\"'.$w_valor_reajuste.'\">');\r\n }\r\n */\r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td colspan=\"2\"><b><u>P</u>eríodo de realização:</b><br><input '.$w_Disabled.' accesskey=\"P\" type=\"text\" name=\"w_per_ini\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_per_ini.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Informe a data de início do periodo de realização da parcela.\">'.ExibeCalendario('Form','w_per_ini').' a '.'<input '.$w_Disabled.' accesskey=\"P\" type=\"text\" name=\"w_per_fim\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_per_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Informe a data de fim do periodo de realização da parcela.\">'.ExibeCalendario('Form','w_per_fim').'</td>');\r\n if(!$w_edita) {\r\n $w_Disabled=' ';\r\n }\r\n ShowHTML(' <tr><td colspan=4><b>Obse<u>r</u>vações:</b><br><textarea '.$w_Disabled.' accesskey=\"R\" name=\"w_observacao\" class=\"sti\" ROWS=5 cols=75 >'.$w_observacao.'</TEXTAREA></td>');\r\n ShowHTML(' <tr><td align=\"center\"><hr>');\r\n if ($O=='E') {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O=='I') {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n } \r\n } \r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&w_chave='.$w_chave.'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&O=L').'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } elseif ($O=='G') {\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST', 'return(Validacao(this));', null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_aux\" value=\"'.$w_chave_aux.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_acordo_aditivo\" value=\"'.$w_sq_acordo_aditivo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio\" value=\"'.FormataDataEdicao($w_inicio).'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_fim\" value=\"'.FormataDataEdicao($w_fim).'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td><font size=\"2\"><b>ATENÇÃO</b>: as parcelas existentes, se existirem, serão excluídas.<br>&nbsp;</td>');\r\n ShowHTML(' <tr><td><b>Dados:</b><ul>');\r\n ShowHTML(' <li>Vigência: <b>'.FormataDataEdicao($w_inicio).'</b> a <b>'.FormataDataEdicao($w_fim).'</b>');\r\n ShowHTML(' <li>Valor: <b>'.formatNumber($w_valor_acordo).'</b>');\r\n ShowHTML(' </ul>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\"><td colspan=2><b>Dados necessários à geração de parcelas únicas:</b>');\r\n ShowHTML(' <tr valign=\"top\"><td><input '.$w_Disabled.' type=\"radio\" name=\"w_tipo_geracao\" value=11 onClick=\"trataUnica();\"><td>Gerar uma única parcela, paga no início da vigência</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><input '.$w_Disabled.' type=\"radio\" name=\"w_tipo_geracao\" value=12 onClick=\"trataUnica();\"><td>Gerar uma única parcela, paga no fim da vigência</td>');\r\n ShowHTML(' <tr valign=\"top\"><td colspan=2><b>Dados necessários à geração de parcelas mensais:</b>');\r\n ShowHTML(' <tr valign=\"top\"><td><input '.$w_Disabled.' type=\"radio\" name=\"w_tipo_geracao\" value=21 onClick=\"trataUnica();\"><td>Gerar parcelas mensais com vencimento a cada trinta dias após o início da vigência</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><input '.$w_Disabled.' type=\"radio\" name=\"w_tipo_geracao\" value=22 onClick=\"trataUnica();\"><td>Gerar parcelas mensais com vencimento a cada trinta dias a partir do início da vigência</td>');\r\n ShowHTML(' <tr><td><td><table border=0 cellspacing=0 cellpadding=0>');\r\n ShowHTML(' <tr valign=\"top\"><td colspan=3><b>Período de referência das parcelas:</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_tipo_mes\" value=\"F\"><td>Fechado: deve estar contido em um único mês</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_tipo_mes\" value=\"A\"><td>Aberto: pode abranger mais de um mês</td>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td><td><table border=0 cellspacing=0 cellpadding=0>');\r\n ShowHTML(' <tr valign=\"top\"><td colspan=3><b>Dia de vencimento das parcelas:</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_vencimento\" value=\"P\" onClick=\"trataVencimento();\"><td>Sempre no primeiro dia do mês</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_vencimento\" value=\"U\" onClick=\"trataVencimento();\"><td>Sempre no último dia do mês</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_vencimento\" value=\"D\" onClick=\"trataVencimento();\"><td>Sempre no dia <input '.$w_Disabled.' type=\"text\" name=\"w_dia_vencimento\" class=\"sti\" SIZE=\"2\" MAXLENGTH=\"2\" VALUE=\"\" onKeyDown=\"trataDiaVencimento();\" title=\"Informe o dia de vencimento da parcela.\"> de cada mês.</td>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td><td><table border=0 cellspacing=0 cellpadding=0>');\r\n ShowHTML(' <tr valign=\"top\"><td colspan=3><b>Valores das parcelas:</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_valor_parcela\" value=\"I\" onClick=\"trataValor();\"><td>As parcelas têm valores iguais</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_valor_parcela\" value=\"C\" onClick=\"trataValor();\"><td>Primeira e última parcelas proporcionais aos dias</td>');\r\n if(nvl($w_sq_acordo_aditivo,'')=='') {\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_valor_parcela\" value=\"P\" onClick=\"trataValor();\"><td>A primeira parcela tem valor diferente das demais</td>');\r\n ShowHTML(' <tr valign=\"top\"><td><td><input '.$w_Disabled.' type=\"radio\" name=\"w_valor_parcela\" value=\"U\" onClick=\"trataValor();\"><td>A última parcela tem valor diferente das demais</td>');\r\n ShowHTML(' <tr valign=\"top\"><td colspan=2><td><b>Valor da parcela diferente das demais:</b> <input '.$w_Disabled.' type=\"text\" name=\"w_valor_diferente\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this, 18, 2, event); trataValorDiferente();\" VALUE=\"\" title=\"Informe o valor da primeira parcela. As demais terão valores iguais.\"></td>');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor_diferente\" value=\"0\">');\r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr valign=\"top\"><td colspan=2><b>Quantidade de parcelas definida pelo usuário:</b>');\r\n ShowHTML(' <tr valign=\"top\"><td><input '.$w_Disabled.' type=\"radio\" name=\"w_tipo_geracao\" value=31 onClick=\"trataUnica();\"><td>Gerar <input '.$w_Disabled.' type=\"text\" name=\"w_qtd_31\" class=\"sti\" SIZE=\"2\" MAXLENGTH=\"2\" VALUE=\"\" onKeyDown=\"trataQuantidade();\" title=\"Informe a quantidade desejada de parcelas.\"> parcelas. Será necessário ajustar os dados relativos à referência e ao vencimento</td>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td colspan=4><b>Obse<u>r</u>vações gerais a serem gravadas em todas as parcelas:</b><br><textarea '.$w_Disabled.' accesskey=\"R\" name=\"w_observacao\" class=\"sti\" ROWS=5 cols=75 >'.$w_observacao.'</TEXTAREA></td>');\r\n ShowHTML(' <tr><td align=\"center\"><hr>');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gerar\">');\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&w_chave='.$w_chave.'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&O=L').'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } elseif ($O=='V') {\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST', 'return(Validacao(this));', null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_aux\" value=\"'.$w_chave_aux.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_acordo_aditivo\" value=\"'.$w_sq_acordo_aditivo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio[]\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_fim[]\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_acordo_parcela[]\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\"><td>');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td><b>Dados:</b><ul>');\r\n ShowHTML(' <li>Vigência: <b>'.FormataDataEdicao($w_inicio).'</b> a <b>'.FormataDataEdicao($w_fim).'</b>');\r\n ShowHTML(' <li>Valor: <b>'.formatNumber($w_valor_acordo).'</b>');\r\n ShowHTML(' </ul>');\r\n $sql = new db_getLinkData; $RS1 = $sql->getInstanceOf($dbms,$w_cliente,'GCDCAD');\r\n $sql = new db_getAcordoParcela; $RS_Parc = $sql->getInstanceOf($dbms,$w_chave,null,'PERIODO',null,FormataDataEdicao($w_inicio),FormataDataEdicao($w_fim),null,null,null,null);\r\n $RS_Parc = SortArray($RS_Parc,'ordem','asc');\r\n ShowHTML(' <tr><td colspan=\"2\">');\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\" valign=\"top\">');\r\n ShowHTML(' <td rowspan=2><b>&nbsp;</b></td>');\r\n ShowHTML(' <td rowspan=2><b>Nº</b></td>');\r\n ShowHTML(' <td rowspan=2><b>Período</b></td>');\r\n ShowHTML(' <td rowspan=2><b>Venc.</b></td>');\r\n ShowHTML(' <td rowspan=2><b>Observações</b></td>');\r\n ShowHTML(' <td colspan=4><b>Valores</b></td>');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\" valign=\"top\">');\r\n ShowHTML(' <td><b>Inicial</b></td>');\r\n ShowHTML(' <td><b>Reajuste</b></td>');\r\n ShowHTML(' <td><b>Acr.Supr.</b></td>');\r\n ShowHTML(' <td><b>Total</b></td>');\r\n if (count($RS_Parc)<=0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n if(nvl($w_sq_acordo_aditivo,'')>'') ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=8 align=\"center\"><font size=\"2\"><b>Cadastre antes as parcelas do aditivo.</b></font></td></tr>');\r\n else ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=8 align=\"center\"><font size=\"2\"><b>Cadastre antes as parcelas do contrato.</b></font></td></tr>');\r\n } else {\r\n foreach($RS_Parc as $row) {\r\n $w_cont+= 1;\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td width=\"1%\" nowrap align=\"center\"><input type=\"checkbox\" name=\"w_sq_acordo_parcela[]\" value=\"'.f($row,'sq_acordo_parcela').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio[]\" value=\"'.FormataDataEdicao(f($row,'inicio')).'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_fim[]\" value=\"'.FormataDataEdicao(f($row,'fim')).'\">');\r\n ShowHTML(' <td>');\r\n if (nvl(f($row,'quitacao'),'nulo')=='nulo') {\r\n if (f($row,'vencimento')<addDays(time(),-1)) {\r\n ShowHTML(' <img src=\"'.$conImgAtraso.'\" border=0 width=10 heigth=10 align=\"center\">');\r\n } elseif (f($row,'vencimento')-addDays(time(),-1)<=5) {\r\n ShowHTML(' <img src=\"'.$conImgAviso.'\" border=0 width=10 height=10 align=\"center\">');\r\n } else {\r\n ShowHTML(' <img src=\"'.$conImgNormal.'\" border=0 width=10 height=10 align=\"center\">');\r\n } \r\n } else {\r\n if (f($row,'quitacao')<f($row,'vencimento')) {\r\n ShowHTML(' <img src=\"'.$conImgOkAtraso.'\" border=0 width=10 heigth=10 align=\"center\">');\r\n } else {\r\n ShowHTML(' <img src=\"'.$conImgOkNormal.'\" border=0 width=10 height=10 align=\"center\">');\r\n } \r\n } \r\n ShowHTML(' '.substr(1000+f($row,'ordem'),1,3).'</td>');\r\n if(nvl(f($row,'inicio'),'')!='') ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'inicio')).' a '.FormataDataEdicao(f($row,'fim')).'</td>');\r\n else ShowHTML(' <td align=\"center\">---</td>');\r\n ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'vencimento')).'</td>');\r\n ShowHTML(' <td>'.f($row,'observacao').'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor_inicial'),2).'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor_reajuste'),2).'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor_excedente'),2).'</td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber(f($row,'valor'),2).'</b></td>');\r\n ShowHTML(' </tr>');\r\n } \r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"center\"><hr>');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gerar\">');\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&w_chave='.$w_chave.'&w_sq_acordo_aditivo='.$w_sq_acordo_aditivo.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&O=L').'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML('</table>');\r\n ShowHTML('</TD>');\r\n ShowHTML('</tr>');\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 Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "title": "" }, { "docid": "6ff51190842d1d79d460c6bee44b97b1", "score": "0.5851634", "text": "public function getPropiedadPlazaLibre()\n {\n /*\n puede ser una plaza propia o una cedida.\n */\n $gesAsistentes = new \\asistentes\\model\\entity\\GestorAsistente();\n $err_txt = '';\n\n $id_activ = $this->getId_activ();\n $mi_dl = \\core\\ConfigGlobal::mi_delef();\n\n $propiedad = array();\n $pl_propias = $this->getPlazasPropias();\n\n if ($pl_propias > 0) {\n $ocu = $gesAsistentes->getPlazasOcupadasPorDl($id_activ, $mi_dl, $mi_dl);\n if ($ocu < $pl_propias) {\n $propiedad[\"$mi_dl>$mi_dl\"] = \"$mi_dl ($ocu de $pl_propias)\";\n } else {\n $err_txt = _(\"Ya están todas las plazas ocupadas\");\n }\n }\n\n // Si no quedan, ver si dispongo de otras\n if (empty($propiedad)) {\n //Conseguidas\n $gesActividadPlazas = new \\actividadplazas\\model\\entity\\GestorActividadPlazas();\n // plazas de calendario de cada dl\n $cActividadPlazas = $gesActividadPlazas->getActividadesPlazas(array('id_activ' => $id_activ));\n foreach ($cActividadPlazas as $oActividadPlazas) {\n $id_dl_otra = $oActividadPlazas->getId_dl();\n $dl_otra = $this->getDlText($id_dl_otra);\n\n $json_cedidas = $oActividadPlazas->getCedidas();\n if (!empty($json_cedidas)) {\n $aCedidas = json_decode($json_cedidas, TRUE);\n foreach ($aCedidas as $dl_2 => $num_plazas) {\n if ($mi_dl == $dl_2) {\n $ocu = $gesAsistentes->getPlazasOcupadasPorDl($id_activ, $mi_dl, $dl_otra);\n if ($ocu < $num_plazas) {\n $propiedad[\"$dl_otra>$dl_2\"] = \"$dl_otra ($ocu de $num_plazas)\";\n }\n }\n }\n }\n }\n }\n if (empty($propiedad)) {\n $rta['success'] = FALSE;\n $rta['mensaje'] = $err_txt;\n } else {\n $rta['success'] = TRUE;\n $rta['mensaje'] = $err_txt;\n $rta['propiedad'] = $propiedad;\n }\n\n return $rta;\n }", "title": "" }, { "docid": "af657d1b879484e87c0e629c8df637f4", "score": "0.58494604", "text": "function consultar_gestionar_plataforma(){\n\t\t$query=\"select * from plataforma;\";\n\t\t$resultado=$this->ejecutar($query);\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "7008e62b40c21421ea1e62b4357be9eb", "score": "0.58432204", "text": "function listarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('nro_contrato','varchar');\n\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_estado_wf','integer');\n\t\t$this->captura('id_proceso_wf','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t$this->captura('tipo_cambio_conv','numeric');\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "a4d558861b54a452d6f72b4d8f25072f", "score": "0.5841675", "text": "function __construct()\n {\n parent::__construct();\n \n //$this->setDatabase('dbmysql'); // defines the database\n //$this->setActiveRecord('ProdutoModel'); // defines the active record\n \n \n $painel = new TPanelGroup('Cadastro de Produtos');\n \n $this->form = new TForm('form_produto');\n $this->form->class = 'tform';\n \n //Instanciamento de Campos \n $id = new THidden('id'); \n $codigo = new TEntry('codigo');\n $descricao = new TEntry('descricao');\n $ean = new TEntry('ean');\n //$unidade_id = new TDBCombo('unidade_id','dbmysql','UnidadeModel','uni_id','uni_abrev');\n $valor = new TEntry('valor');\n $obs = new TText('obs');\n \n $descricao->setMaxLength(60); \n /*>>>>>>> MÁSCARAS <<<<<<<<*/\n $valor->setNumericMask(3,',','.');\n \n /*>>>>>>> HINTS <<<<<<<<*/\n $descricao->setTip('Insira a descrição do produto..');\n $notebookPrincipal = new BootstrapNotebookWrapper( new TNotebook('100%',400) );\n $tableGerais = new TTable;\n $tableGerais->style = 'width: 100%';\n \n $notebookPrincipal->appendPage('Dados Gerais', $tableGerais); \n $this->form->add($notebookPrincipal); \n \n //EXIBIÇÃO DE CAMPOS \n $div = new TVBox;\n $div->class = 'form-group col-lg-1';\n $div->add(new TLabel('Código'));\n $codigo->class = 'tfield form-control';\n $div->add($codigo);\n $codigo->setSize('100%');\n $codigo->setEditable(FALSE); \n $tableGerais->add($div);\n \n $div = new TVBox;\n $div->class = 'form-group col-lg-5';\n $div->add(new TLabel('Descrição'));\n $descricao->class = 'tfield form-control';\n $div->add($descricao);\n $descricao->setSize('100%');\n $tableGerais->add($div);\n \n $div = new TVBox;\n $div->class = 'form-group col-lg-2';\n $div->add(new TLabel('Preço Venda'));\n $valor->class = 'tfield form-control';\n $div->add($valor);\n $valor->setSize('100%');\n $tableGerais->add($div);\n \n \n $div = new TVBox;\n $div->class = 'form-group col-lg-3';\n $div->add(new TLabel('EAN(Cód. Barras)'));\n $ean->class = 'tfield form-control';\n $div->add($ean);\n $ean->setSize('100%'); \n $tableGerais->add($div);\n \n \n/*\n $div = new TVBox;\n $div->class = 'form-group col-lg-2';\n $div->add(new TLabel('Unidade'));\n $unidade_id->class = 'tfield form-control';\n $unidade_id->setSize('100%');\n $div->add($unidade_id);\n $tableGerais->add($div); \n \n*/ $div = new TVBox;\n $div->class = 'form-group col-lg-12';\n $div->add(new TLabel('Observações'));\n $obs->class = 'tfield'; // nao usar form-control em obs\n $obs->setSize('100%',100);\n $obs->style = 'min-width: 600px;';\n $div->add($obs);\n $tableGerais->add($div);\n \n \n if (!empty($Id))\n {\n $Id->setEditable(FALSE);\n }\n \n $bt_save = new TButton('salvar');\n \n $bt_save->setAction( new TAction(array($this, 'onSave')), _t('Save'));\n $bt_save->setImage('fa:floppy-o');\n \n \n $buttons = new TTable;\n $row = $buttons->addRow();\n $row->addCell($bt_save);\n $painel->add($this->form);\n $container = new TVBox;\n $container->style = 'width: 98%';\n $container->add($painel);\n \n \n $this->form->setFields(array($id, $codigo, $descricao, $ean,$valor, $obs, $bt_save));\n \n $painel->addFooter($buttons);\n \n \n parent::add($container);\n \n }", "title": "" }, { "docid": "6f77f166aa4e54602895b2021fed022f", "score": "0.5841137", "text": "function reporteInformacionP(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPINFPRE_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\n $this->captura('id_cp', 'int4');\n $this->captura('centro_costo', 'varchar');\n $this->captura('codigo_programa', 'varchar');\n $this->captura('codigo_proyecto', 'varchar');\n $this->captura('codigo_actividad', 'varchar');\n $this->captura('codigo_fuente_fin', 'varchar');\n $this->captura('codigo_origen_fin', 'varchar');\n\n $this->captura('codigo_partida', 'varchar');\n $this->captura('nombre_partidad', 'varchar');\n $this->captura('codigo_cg', 'varchar');\n $this->captura('nombre_cg', 'varchar');\n $this->captura('precio_total', 'numeric');\n $this->captura('codigo_moneda', 'varchar');\n $this->captura('num_tramite', 'varchar');\n $this->captura('nombre_entidad', 'varchar');\n $this->captura('direccion_admin', 'varchar');\n $this->captura('unidad_ejecutora', 'varchar');\n $this->captura('codigo_ue', 'varchar');\n $this->captura('firmas', 'varchar');\n $this->captura('justificacion', 'varchar');\n $this->captura('codigo_transf', 'varchar');\n $this->captura('unidad_solicitante', 'varchar');\n $this->captura('funcionario_solicitante', 'varchar');\n $this->captura('fecha_soli', 'date');\n $this->captura('gestion', 'integer');\n $this->captura('codigo_poa', 'varchar');\n $this->captura('codigo_descripcion', 'varchar');\n $this->captura('tipo', 'varchar');\n\n $this->captura('nombre_categoria', 'varchar');\n\n $this->captura('nro_directorio', 'varchar');\n $this->captura('nro_nota', 'varchar');\n $this->captura('nro_nota2', 'varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "c5bb38794fc653f3842b2886dd7893ce", "score": "0.58406544", "text": "public function getTablaPreguntasRespuestasP($pkID_prueba, $pkID_usuario, $fkID_tipo_usuario){\n\n include(\"../conexion/datos.php\");\n //carga todas las preguntas\n $preguntas = $this->getPruebaIdPregunta($pkID_prueba, $fkID_tipo_usuario);\n\n\n //print_r($preguntas);\n\n if ($preguntas) {\n \n echo '<div class=\"alert alert-info text-center\" role=\"alert\"><strong>[Hay preguntas disponibles para '.$_COOKIE[$NomCookiesApp.'_tipo'].'.]</strong> <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\" style=\"color: red;\">&times;</span></button> </div>'; \n /**/\n foreach ($preguntas as $key => $value) {\n //echo $key. \" \".$value[\"pregunta\"];\n\n //para cada pregunta carga respuestas multiples o abiertas\n $respuestas = $this->getRespuestaId($value[\"pkID\"], $pkID_usuario);\n $rpta_mult = $this->getRespuestasMult($value[\"pkID\"], $pkID_usuario);\n\n //print_r($respuestas);\n //print_r($rpta_mult);\n\n //echo $respuestas[0][\"pkID\"];\n\n echo '<tr>\n <td>'.$value[\"pregunta\"].'</td>\n <td>'.$respuestas[0][\"respuesta\"];\n\n foreach ($rpta_mult as $key => $value) {\n //echo $key.\"--\".$value;\n\n foreach ($value as $llave => $val) {\n \n if ($llave == \"respuestab\") {\n echo $val.\" \";\n }\n }\n \n }\n\n //echo $rpta_mult[0][\"respuestab\"];\n\n echo '</td>\n <td>';\n //echo ' data-action=\"carga_editar\" data-id-respuesta_p = \"'.$respuestas[0][\"pkID\"].'\" '; \n //echo is_null($respuestas[0]);\n if (is_null($respuestas[0])) {\n\n echo '<button id=\"btn_responder_p\" name=\"responde_prueba\" title=\"Responder '.$value[\"pregunta\"].'\" type=\"button\" class=\"btn btn-success\" data-toggle=\"modal\" data-target=\"#frm_modal_respuesta_p\" data-id-pregunta = \"'.$value[\"pkID\"].'\"';\n echo ' data-action=\"nuevo\" ';\n echo '><span class=\"glyphicon glyphicon-hand-right\"></span></button>&nbsp'; \n \n }; \n\n echo '</td> \n </tr>';\n }\n\n } else {\n \n echo '<div class=\"alert alert-danger text-center\" role=\"alert\"><strong>[No hay preguntas disponibles para '.$_COOKIE[$NomCookiesApp.'_tipo'].'.]</strong> <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\" style=\"color: red;\">&times;</span></button> </div>';\n }\n \n }", "title": "" }, { "docid": "825fe3ac8c5bb997c0ad01cbd299c90e", "score": "0.5831773", "text": "public function read_pro(){\n $sql = \"SELECT \tpro.*, ce.sNombre AS cliente,\n usr.sName AS autor,\n _status.sHtml AS htmlStatus\n FROM ope_proforma AS pro\n INNER JOIN ope_recepciones_documentos AS rd ON rd.sReferencia = pro.sReferencia\n INNER JOIN cat_empresas ce ON ce.skEmpresa = rd.skEmpresa\n INNER JOIN _users AS usr ON usr.skUsers = pro.skUserCreacion\n INNER JOIN _status ON _status.skStatus = pro.skStatus\n WHERE 1=1 \";\n if(!is_null($this->pro['skProforma'])){\n $sql .=\" AND pro.skProforma = '\".$this->pro['skProforma'].\"'\";\n }\n if(!is_null($this->pro['sReferencia'])){\n $sql .=\" AND pro.sReferencia like '%\".$this->pro['sReferencia'].\"%'\";\n }\n if(!is_null($this->pro['sObservaciones'])){\n $sql .=\" AND pro.sObservaciones like '%\".$this->pro['sObservaciones'].\"%'\";\n }\n if(!is_null($this->pro['skUserCreacion'])){\n $sql .=\" AND pro.skUserCreacion = '\".$this->pro['skUserCreacion'].\"'\";\n }\n if(!is_null($this->pro['dFechaCreacion'])){\n $sql .=\" AND pro.dFechaCreacion = '\".$this->pro['dFechaCreacion'].\"'\";\n }\n if(!is_null($this->pro['skStatus'])){\n $sql .=\" AND pro.skStatus = '\".$this->pro['skStatus'].\"'\";\n }\n\n if(!is_null($this->pro['skEmpresa'])){\n $sql .=\" AND ce.skEmpresa = '\".$this->pro['skEmpresa'].\"'\";\n }\n\n if(!is_null($this->pro['orderBy'])){\n $sql .=\" ORDER BY \".$this->pro['orderBy'].\" \".$this->pro['sortBy'];\n }\n if(is_int($this->pro['limit'])){\n if(is_int($this->pro['offset'])){\n $sql .= \" LIMIT \".$this->pro['offset'].\" , \".$this->pro['limit'];\n }else{\n $sql .= \" LIMIT \".$this->pro['limit'];\n }\n }\n //exit($sql);\n $result = $this->db->query($sql);\n if($result){\n if($result->num_rows > 0){\n return $result;\n }else{\n return false;\n }\n }\n }", "title": "" }, { "docid": "21daa325b11d2ddf78bfe20f0620d892", "score": "0.5827538", "text": "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = \"SELECT\n \n pl.descripcion planta,\n sec.descripcion seccion,\n\teq.descripcion equipo,\n com.descripcion componente,\n\tmeca.descripcion mecanismo,\n me.descripcion metodo,\n\totd.puntos,\n\tme.descripcion metodo,\n\ttar.descripcion tareas,\n\tlub.descripcion lubricante,\n\totd.cantidad,\n\totd.observaciones_ejec,\n uni.abreviatura unidad,\n otd.fecha_prog\n \nFROM\n ot_detalle otd \nINNER JOIN mec_met mec on mec.id_mecanismos = otd.id_mecanismos\nINNER JOIN unidades uni on uni.id_unidades = otd.codunidad_cant \nINNER JOIN mecanismos meca ON mec.id_mecanismos = meca.id_mecanismos\nINNER JOIN componentes com ON meca.id_componente = com.id_componentes\nINNER JOIN equipos eq ON com.id_equipos = eq.id_equipos\nINNER JOIN secciones sec ON eq.id_secciones = sec.id_secciones\nINNER JOIN plantas pl ON sec.id_planta = pl.id_planta\nINNER JOIN metodos me ON mec.id_metodos = me.id_metodos\nINNER JOIN tareas tar ON tar.id_tareas = mec.id_tareas\nINNER JOIN lubricantes lub ON lub.id_lubricantes = lub.id_lubricantes\nwhere otd.id_ot = '3'\nORDER BY pl.descripcion, sec.descripcion, q.descripcion, com.descripcion, meca.descripcion, me.descripcion ASC\";\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 4, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "title": "" }, { "docid": "e25259599bee647501f14846fb7748df", "score": "0.58267814", "text": "function mo_creaTAblaPublica(){\n $con_numRows = \"SELECT COUNT(T.IDPUBLICACION) NUM_FIL FROM FINAL_PUBLICACION T WHERE T.TITULO\";\n \n $consulta1 = \"SELECT T.IDPUBLICACION, T.TITULO, T.FECHA_PUBLICACION, T.AUTOR FROM FINAL_PUBLICACION T WHERE T.TITULO\";\n $orderBy = \"T.TITULO\";\n\n $colNames = array('ID PUBLICACION', 'TITULO', 'FECHA PUBLICACION', 'AUTOR','','FINAL_EJERCICIO');\n $colnamesSQL = array('IDPUBLICACION', 'TITULO', 'FECHA_PUBLICACION', 'AUTOR');\n \n return mo_getTablaData($con_numRows,$consulta1,$colNames,$colnamesSQL,$orderBy);\n }", "title": "" }, { "docid": "f75c30f85b10963ad9f5efd14283caf6", "score": "0.58244526", "text": "public function ver_reporteevalpoa_consolidado($com_id){\n $data['componente'] = $this->model_componente->get_componente($com_id); ///// DATOS DEL COMPONENTE\n if(count($data['componente'])!=0){\n $data['mes'] = $this->mes_nombre();\n $data['fase']=$this->model_faseetapa->get_fase($data['componente'][0]['pfec_id']); /// DATOS FASE\n $data['proyecto'] = $this->model_proyecto->get_id_proyecto($data['fase'][0]['proy_id']); //// DATOS PROYECTO\n if($data['proyecto'][0]['tp_id']==4){\n $data['proyecto'] = $this->model_proyecto->get_datos_proyecto_unidad($data['fase'][0]['proy_id']); /// PROYECTO\n }\n $data['cabecera']=$this->cabecera($data['componente'],$data['proyecto']); /// Cabecera\n $data['datos_mes'] = $this->verif_mes;\n\n /// ----------------------------------------------------\n $operaciones=$this->model_producto->list_operaciones_subactividad($com_id); /// lISTA DE OPERACIONES\n $tabla='';\n $tabla.=' <table cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:100%;\" align=center>\n <thead>\n <tr style=\"font-size: 7px;\" bgcolor=#1c7368 align=center>\n <th style=\"width:1%;height:15px;color:#FFF;\">#</th>\n <th style=\"width:2%;color:#FFF;\">COD.<br>OR.</th>\n <th style=\"width:2%;color:#FFF;\">COD.<br>OPE.</th> \n <th style=\"width:10%;color:#FFF;\">OPERACI&Oacute;N</th>\n <th style=\"width:10%;color:#FFF;\">RESULTADO</th>\n <th style=\"width:10%;color:#FFF;\">INDICADOR</th>\n <th style=\"width:3%;color:#FFF;\">L.B.</th>\n <th style=\"width:3%;color:#FFF;\">META</th>\n <th style=\"width:3.5%;color:#FFF;\">PROG.</th>\n <th style=\"width:3.5%;color:#FFF;\">EJEC.</th>\n <th style=\"width:3.5%;color:#FFF;\">%EFI</th>\n <th style=\"width:5%;color:#FFF;\"></th>\n\n \n <th style=\"width:3%;color:#FFF;\">ENE.</th>\n <th style=\"width:3%;color:#FFF;\">FEB.</th>\n <th style=\"width:3%;color:#FFF;\">MAR.</th>\n <th style=\"width:3%;color:#FFF;\">ABR.</th>\n <th style=\"width:3%;color:#FFF;\">MAY.</th>\n <th style=\"width:3%;color:#FFF;\">JUN.</th>\n <th style=\"width:3%;color:#FFF;\">JUL.</th>\n <th style=\"width:3%;color:#FFF;\">AGO.</th>\n <th style=\"width:3%;color:#FFF;\">SEPT.</th>\n <th style=\"width:3%;color:#FFF;\">OCT.</th>\n <th style=\"width:3%;color:#FFF;\">NOV.</th>\n <th style=\"width:3%;color:#FFF;\">DIC.</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($operaciones as $rowp){\n $programado=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $ejecutado=$this->model_producto->suma_total_evaluado($rowp['prod_id']);\n $prog=0;\n if(count($programado)!=0){\n $prog=$programado[0]['meta_gest'];\n }\n\n $ejec=0;\n if(count($ejecutado)!=0){\n $ejec=$ejecutado[0]['suma_total'];\n }\n\n $tit='<p style=\"color:red\"><b>NO CUMPLIDO</b></p>';\n if($ejec==$prog){\n $tit='<p style=\"color:green\"><b>CUMPLIDO</b></p>';\n }\n elseif ($ejec<$prog & $ejec!=0) {\n $tit='<p style=\"color:orange\"><b>EN PROCESO</b></p>';\n }\n\n $nro++;\n $tabla .='\n <tr >\n <td style=\"width: 1%; text-align: center; height:50px; font-size: 3px;\" title='.$rowp['prod_id'].'>'.$nro.'</td>\n <td style=\"width: 2%; text-align: center;\">'.$rowp['or_codigo'].'</td>\n <td style=\"width: 2%; text-align: center; font-size: 8px;\" bgcolor=\"#eceaea\"><b>'.$rowp['prod_cod'].'</b></td>\n <td style=\"width: 7%; text-align: left;\">'.$rowp['prod_producto'].'</td>\n <td style=\"width: 7%; text-align: left;\">'.$rowp['prod_resultado'].'</td>\n <td style=\"width: 7%; text-align: left;\">'.$rowp['prod_indicador'].'</td>\n <td style=\"width: 2%; text-align: right;\">'.round($rowp['prod_linea_base'],2).'</td>\n <td style=\"width: 2%; text-align: right;\">'.round($rowp['prod_meta'],2).'</td>\n <td style=\"width: 2.5%; text-align: center; font-size: 9px;\" bgcolor=\"#eceaea\"><b>'.round($prog,2).'</b></td>\n <td style=\"width: 2.5%; text-align: center; font-size: 9px;\" bgcolor=\"#eceaea\"><b>'.round($ejec,2).'</b></td>\n <td style=\"width: 2.5%; text-align: center; font-size: 9px;\" bgcolor=\"#e9f7e9\"><b>'.round((($ejec/$prog)*100),2).'%</b></td>\n <td style=\"width: 7%; text-align: left;\">'.$tit.'</td>';\n $temp=$this->temporalizacion_productos($rowp['prod_id']);\n\n for ($i=1; $i <=12 ; $i++) { \n $tabla.='\n <td style=\"width: 3%; text-align: center;font-size: 7px;\">\n <table cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:90%;\" align=center>\n <tr><td style=\"width:50%;\"><b>P:</b></td><td style=\"width:50%;\">'.round($temp[1][$i],2).'</td></tr>\n <tr><td style=\"width:50%;\"><b>E:</b></td><td style=\"width:50%;\">'.round($temp[4][$i],2).'</td></tr>\n </table>\n </td>';\n }\n $tabla.='\n </tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n $data['operaciones']=$tabla; /// Reporte Gasto Corriente, Proyecto de Inversion 2020\n $this->load->view('admin/evaluacion/seguimiento_poa/reporte_seguimiento_poa_consolidado', $data);\n }\n else{\n echo \"Error !!!\";\n }\n }", "title": "" }, { "docid": "1b73a5e8126862a3d74ab5925363416b", "score": "0.5822231", "text": "function recorrerMatrizPresupTipoComp() {\n\t\t\t\n\t\t\t\tglobal $res,$matriz;\n\t\t\t\t\tfor($pos=0;$pos < mysql_num_rows($res); $pos++) {\n\n\t\t\t\t\t$tipo= $matriz[\"tipo\"][$pos] ;\n\t\t\t\t\t$tipo = eliminarCaracteresEspeciales($tipo);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tinsertarPresupTipoComp($tipo);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t}", "title": "" }, { "docid": "8133e8a433e608218a4a222c808ef3cd", "score": "0.5820293", "text": "public function avbuscarMaterialesxPuntoControl_3() {\n $oLLaboratorio = new LLaboratorio();\n\n//$comboTipoDocumentos = $o_LPersona->comboTipoDocumento('1');\n require_once(\"../../cvista/laboratorio/buscarMaterialesxPuntodeControl_3.php\");\n }", "title": "" }, { "docid": "56a457e36e33972484858d62904ebded", "score": "0.5818587", "text": "function afficherProjets(){\n\t\t$sql=\"SElECT * From projet\";\n\t\t$db = configP::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "4958dee6eef0f303098801293b3c99a6", "score": "0.5817647", "text": "function afficherproduits(){\r\n\t\t$sql=\"SElECT * From produit order by id_produit asc\";\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 }\r\n\t}", "title": "" }, { "docid": "53e484348474921a49d57fa7bd3ce11b", "score": "0.5814587", "text": "function creaTabella()\n\t\t{\n\t\t// creazione della tabella sulla base della query sql\n\t\t$sql = \"SELECT *\" . \n\t\t\t\t\" FROM wadoc_allegati\" .\n\t\t\t\t\" ORDER BY posizione\";\n\t\t$tabella = $this->dammiTabella($sql);\n\n\t\t// definizione delle proprieta' di base della tabella\n\t\t$tabella->titolo = \"allegati\";\n\t\n\t\t// azioni\n\n\t\t// definizione delle colonne della tabella e delle relative proprieta'\n\t\t$tabella->aggiungiColonna(\"idAllegato\", \"ID\", false, false, false);\n\t\t\n\t\t$col = $tabella->aggiungiColonna(\"nome\", \"Nome file\");\n\t\t\t$col->link = true;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"titolo\", \"Titolo\");\n\t\t\t$col->inputTipo = WATBL_INPUT_TESTO;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"posizione\", \"Posizione\");\n\t\t\t$col->inputTipo = WATBL_INPUT_INTERO;\n\t\t\t\n\t\t$col = $tabella->aggiungiColonna(\"descrizione\", \"Descrizione\");\n\t\t\t$col->inputTipo = WATBL_INPUT_AREATESTO;\n\t\t\t\n\t\t// colonne non visibili\n\n\t\t$tabella->leggiValoriIngresso();\n\n\t\t// lettura dal database delle righe che andranno a popolare la tabella\n\t\tif (!$tabella->caricaRighe())\n\t\t\t$this->mostraErroreDB($tabella->righeDB->connessioneDB);\n\t\t\n\t\treturn $tabella;\n\t\t}", "title": "" }, { "docid": "77a554ba529bdc6982c57320e69db2b8", "score": "0.5814228", "text": "private function escreverColunaParecer() {\n\n if ( $this->lExibirParecer ) {\n\n for ( $i = 0; $i < 3; $i++) {\n $this->Cell( $this->iLarguraColunaPadrao, 4, '', 1, 0, 'C' );\n }\n }\n }", "title": "" }, { "docid": "72110d7146a3b91497340b1fca9c68e2", "score": "0.5813646", "text": "public function asesorOrdenesReparacion(){\n $this->mostrarVista('panel/asesor/ordenesreparacion');\n }", "title": "" }, { "docid": "d1f0fac345056a061e15dbf796b42c97", "score": "0.58098555", "text": "function CriarTabela($nome,$campos = array()){\n $pref = GerConteudo::Pref_camp($nome);\n $sql = 'CREATE TABLE IF NOT EXISTS '.$nome.' (';\n $sql .= $pref.'_id int(11) NOT NULL AUTO_INCREMENT,';\n\n foreach($campos as $Camp){\n foreach($Camp as $camp=>$config){\n $tipo = $config[0];\n $Label = $config[1];\n\n switch($tipo) {\n case 'data':\n $tipo_real = 'date';\n break;\n case 'text':\n $tipo_real = 'varchar(200)';\n break;\n case 'inteiro':\n $tipo_real = 'int(11)';\n break;\n case 'textarea':\n $tipo_real = 'text';\n break;\n case 'alternativa':\n $tipo_real = 'ENUM(0,1,2)';\n break;\n }\n $sql .= $pref.'_'.$camp.' '.$tipo_real.' COLLATE utf8_unicode_ci NOT NULL COMMENT \"'.$Label.'\",';\n }\n }\n $sql .= $pref.'_slug varchar(200) COLLATE utf8_unicode_ci NOT NULL,';\n $sql .= 'SUB_slug varchar(200) COLLATE utf8_unicode_ci NOT NULL,';\n $sql .= 'SUB_id int(11) NOT NULL,';\n $sql .= 'PRIMARY KEY ('.$pref.'_id)';\n $sql .= ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=58 ;';\n\n return $sql;\n }", "title": "" }, { "docid": "68b0b4943fa56b581619fbfb8bd76a88", "score": "0.5803368", "text": "public function getComponenteListaPessoaAutorizada($dados) {\r\n\t\t$html = \"\";\r\n\t\t$html .= \"<table><thead><tr><th style='text-align: center';>Nome</th>\r\n\t\t\t\t<th style='text-align: center';>CPF</th>\r\n\t\t\t\t<th style='text-align: center';>RG</th>\r\n\t\t\t\t<th style='text-align: center';>Fone Residencial</th>\r\n\t\t\t\t<th style='text-align: center';>Fone Comercial</th>\r\n\t\t\t\t<th style='text-align: center';>Fone Celular</th>\r\n\t\t\t\t<th style='text-align: center';>ID Nextel</th>\r\n\t\t\t\t<th style='text-align: center';>Acoes</th></tr></thead><tbody>\";\r\n\t\t\r\n\t\r\n\t\tforeach ( $dados as $row ) :\r\n\t\t$class = $class == '' ? 'par' : '';\r\n\t\t\t\r\n\t\t$html .= \"<tr class=\" . $class . \">\r\n\t\t<input type=hidden id=idContPessoaAut name=idContPessoaAut value=\".$row[ptpaptraoid ].\" />\r\n\t\t<td style=text-align: center;>$row[ptpanome]</td>\r\n\t\t<td style=text-align: center;>$row[ptpacpf]</td>\r\n\t\t<td style=text-align: center;>$row[ptparg]</td>\r\n\t\t<td style=text-align: center;>$row[ptpafone_residencial]</td>\r\n\t\t<td style=text-align: center;>$row[ptpafone_comercial]</td>\r\n\t\t<td style=text-align: center;>$row[ptpafone_celular]</td>\r\n\t\t<td style=text-align: center;>$row[ptpaidnextel]</td>\r\n\t\t\t\t<td class='acao centro'>\r\n\t\t <a title=Excluir rel=\".$row['ptpaoid'].\" id=btn_excluir_pessoas_aut href=javascript:void(0);>\r\n\t\t \t\t<IMG class=icone alt=Excluir src=images/icon_error.png></a>\r\n\t\t \t\t<a title=Editar rel=\".$row['ptpaoid'].\" id=btn_editar_pessoas_aut href=javascript:void(0);>\r\n\t\t \t\t<IMG class=icone alt=Editar src=images/icon_editar.gif></a>\r\n\t\t\t\t\t</td>\r\n\t\t</tr>\";\r\n\t\tendforeach;\r\n\t\t\r\n\t\t$html .= \"</tbody><tfoot><tr class='center'><td align='center' colspan='8'></td></tr></tfoot>\";\r\n\t\t\r\n\t\techo json_encode ( array (\"html\" => $html) );\r\n\t}", "title": "" }, { "docid": "66f22e841ed3a518d253635670db4a95", "score": "0.57937485", "text": "public function actionParametros(){\n\t$idtipo=0;\n\t$gridActividades=new CActiveDataProvider('Actividadmtto',array('criteria' => array(\n\t\t'condition' =>\"1\",\n\t\t'order'=>'id')));\n\n\t$gridServicios=new CActiveDataProvider('Servicio',array('criteria' => array(\n\t\t'condition' =>\"1\",\n\t\t'order'=>'id')));\n\t\n\t$gridTipo=new CActiveDataProvider('Tipoinsumo',array('criteria' => array(\n\t\t'condition' =>\"1\",\n\t\t'order'=>'id')));\n\n\tif(isset($_GET[\"idtipo\"]))\n\t\t$idtipo=$_GET[\"idtipo\"];\n\n\t$gridInsumo=new CActiveDataProvider('Insumo',array('criteria' => array(\n\t\t'condition' =>\"tipoInsumo='\".$idtipo.\"'\",\n\t\t'order'=>'id')));\n\n\t\t$this->render('parametros',array(\n\t\t\t'gridActividades'=>$gridActividades,\n\t\t\t'gridServicios'=>$gridServicios,\n\t\t\t'gridTipo'=>$gridTipo,\n\t\t\t'gridInsumo'=>$gridInsumo,\n\t\t\t'mi'=>$this->getIniciales(),\n\t\t\t'color'=>$this->getColor($this->getIniciales()),\n\t\t\t'abiertas'=>$this->getOrdenesAbiertas(),\n\t\t\t'Colorabi'=>$this->getColor($this->getOrdenesAbiertas()),\n\t\t\t'Colorli'=>$this->getColor($this->getOrdenesListas()),\n\t\t\t'listas'=>$this->getOrdenesListas(),\n\t\t));\n\t}", "title": "" }, { "docid": "b434a4f4af957f1141c1338b1fe60a43", "score": "0.57927126", "text": "function data_pri()\n {\n $id = $this->fungsi->user_login()->id_kar;\n $data = array (\n 'judul' => \"BiasHRIS | Data Pribadi\",\n 'rowfam' => $this->M_Aproject->getFam(),\n 'rowplam' => $this->M_Aproject->getPlam(),\n 'rowdoc' => $this->M_Aproject->getDoc(),\n 'rownip' => $this->M_Aproject->getNip($id),\n );\n $this->template->load('template','personal/v_pribadi',$data);\n }", "title": "" }, { "docid": "f243d6b8b0689179ebed864c7df98da4", "score": "0.57925516", "text": "function getBoutiqueAdmin ($lang, $type)\n{\n $bdd = new Connection();\n \n $tab_act = array(); // tableau contenant les informations des actualitées a\n // recuperer\n \n /**\n * recupération de toute l'actualite\n */\n $rqt_act = 'SELECT * FROM produits_contenu RIGHT OUTER JOIN produits ON bt_prod = pd_num WHERE bt_prod=? AND bt_lang = ?';\n \n $result = $bdd->prepare($rqt_act);\n $result->bindValue(1, $type);\n $result->bindValue(2, $lang);\n $result->execute();\n \n if ($row = $result->fetch()) {\n $tab_act = extractProductFromARow($row);\n }\n \n return $tab_act;\n}", "title": "" } ]
38358c7026a59e1e1c41a43ef67c96c9
Display this module as a payment option during the checkout
[ { "docid": "f96b1e32e0df7d40bf42f15d0eb5e95a", "score": "0.0", "text": "public function hookPaymentOptions($params)\n {\n /*\n * Verify if this module is active\n */\n if (!$this->active) {\n return;\n }\n\n /**\n * Form action URL. The form data will be sent to the\n * validation controller when the user finishes\n * the order process.\n */\n $formAction = $this->context->link->getModuleLink($this->name, 'validation', array(), true);\n\n /**\n * Assign the url form action to the template var $action\n */\n $this->smarty->assign(['action' => $formAction]);\n\n /**\n * Load form template to be displayed in the checkout step\n */\n $paymentForm = $this->fetch('module:irandargah/views/templates/hook/payment_options.tpl');\n\n /**\n * Create a PaymentOption object containing the necessary data\n * to display this module in the checkout\n */\n $displayName = ' پرداخت با ایران درگاه';\n $newOption = new PrestaShop\\PrestaShop\\Core\\Payment\\PaymentOption;\n $newOption->setModuleName($this->displayName)\n ->setCallToActionText($displayName)\n ->setAction($formAction)\n ->setForm($paymentForm);\n\n $payment_options = array(\n $newOption,\n );\n\n return $payment_options;\n }", "title": "" } ]
[ { "docid": "1e94e4f19a55c91f0acea4168cb44201", "score": "0.7000337", "text": "public function apply_payment_option()\n\t\t{\n\t\t$link \t\t\t\t\t= breadcrumb();\n\t\t$data['breadcrumb']\t\t= $link;\n\t\t\n\t\t// GET PUBLISHER DETAILS\n\t\t$acc_data = $this->mod_account->get_myaccount();\n\t\t$data['pub_data'] = $acc_data[0];\n\t\t$data['page_content']\t=$this->load->view('payment_options',$data,true);\n\t\t$this->load->view('publisher_layout',$data);\n\t\t}", "title": "" }, { "docid": "e8d636f9de8b70379e2e62d8f4becaf3", "score": "0.69368184", "text": "public function option_payments_show() \n\t{\n\t\tglobal $userpanel; // PHP Globals\r\n\r\n\t\t$CTM_HTML = NULL;\n\t\t$CTM_HTML .= \"\t<div class=\\\"box-content\\\" style=\\\"width: 700px\\\">\r\n \t<div class=\\\"header\\\"><span>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['Title']}</span></div>\r\n \r\n <h3>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['PaymentInfos']['Title']}</h3>\r\n <table width=\\\"100%\\\" border=\\\"0\\\" class=\\\"tableBackColumn\\\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['PaymentInfos']['Method']}</td>\r\n\t\t\t\t<td width=\\\"60%\\\"><strong>{$userpanel['payments']['show_payment']['method']}</strong></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['PaymentInfos']['SendDate']}</td>\r\n\t\t\t\t<td>{$userpanel['payments']['show_payment']['confirm_date']}</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['PaymentInfos']['Status']}</td>\r\n\t\t\t\t<td>{$userpanel['payments']['show_payment']['status']}</td>\r\n\t\t\t</tr>\r\n\t\t\t\".($userpanel['payments']['show_payment']['annex'] ? \"<tr>\r\n\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['PaymentInfos']['Annex']}</td>\r\n\t\t\t\t<td><a href=\\\"{$userpanel['payments']['show_payment']['annex']['link']}\\\" target=\\\"_blank\\\">[ {$userpanel['payments']['show_payment']['annex']['name']} ]</a></td>\r\n\t\t\t</tr>\" : NULL).\"\r\n\t\t</table>\r\n \r\n <h3>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['BuyData']['Title']}</h3>\r\n <table width=\\\"100%\\\" border=\\\"0\\\" class=\\\"tableBackColumn\\\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['BuyData']['Date']}</td>\r\n\t\t\t\t<td width=\\\"60%\\\">{$userpanel['payments']['show_payment']['date']}</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['BuyData']['Hour']}</td>\r\n\t\t\t\t<td>{$userpanel['payments']['show_payment']['hour']}</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['BuyData']['Local']}</td>\r\n\t\t\t\t<td>{$userpanel['payments']['show_payment']['local']}</td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n \r\n <h3>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['PaymentData']}</h3>\r\n <table width=\\\"100%\\\" border=\\\"0\\\" class=\\\"tableBackColumn\\\">\r\n\t\t\t\".(count($userpanel['payments']['show_payment']['payment_data']) > 0 ? \"\".$this->loop__option_payments_show__0x15().\"\" : NULL).\"\r\n\t\t</table>\r\n \r\n <h3>{$this->lang->words['UserPanel']['Payments']['ShowPayment']['Message']}</h3>\r\n <div class=\\\"blockquote\\\">{$userpanel['payments']['show_payment']['message']}</div>\r\n\t</div>\";\n\t\treturn $CTM_HTML;\n\t}", "title": "" }, { "docid": "bcffc86f8227ab00c5101c4d8d483143", "score": "0.6780135", "text": "public function payment_fields()\n {\n\n if ($this->description) {\n if ($this->sandbox) {\n $this->description .= '<br />Test mode enabled. Use sort code 20-00-00 and account number 55779911.';\n $this->description = trim($this->description);\n }\n echo wpautop(wp_kses_post($this->description));\n }\n\n $selectedTwo = $_SESSION['wc-gc-installments-number'] == '2' ? 'selected' : '';\n $selectedFour = $_SESSION['wc-gc-installments-number'] == '4' ? 'selected' : '';\n\n echo '\n <div id=\"wc-gc-installments-form\" class=\"wc-payment-form\">\n <div class=\"form-row form-row-wide\">\n <label>Number of Installments</label>\n <select name=\"wc-gc-installments-number\" style=\"display: block; width: 100%\">\n <option value=\"\">Choose...</option>\n <option ' . $selectedTwo . ' value=\"2\">2 Installments (Min Order: £' . $this->min_cart_total_two . ')</option>\n <option ' . $selectedFour . ' value=\"4\">4 Installments (Min Order: £' . $this->min_cart_total_four . ')</option>\n </select>\n </div>\n </div> \n ';\n\n global $woocommerce;\n $cartTotal = floatval($woocommerce->cart->get_total('float'));\n $numberOfInstallments = $_SESSION['wc-gc-installments-number'];\n if (!empty($_SESSION['wc-gc-installments-number'])) {\n echo \"<p>£\" . number_format($cartTotal / $numberOfInstallments, 2) . \" per month for \" . $numberOfInstallments . \" months.</p>\";\n }\n\n }", "title": "" }, { "docid": "bd2db8ac42842f09b940a1395c61c5ea", "score": "0.66635686", "text": "public function payment_fields()\n {\n if ( $this->description ) {\n // you can instructions for test mode, I mean test card numbers etc.\n if ( $this->testmode ) {\n $this->description .= '. Включен тестовый режим.';\n $this->description = trim( $this->description );\n }\n // display the description with <p> tags etc.\n echo wpautop( wp_kses_post( $this->description ) );\n }\n }", "title": "" }, { "docid": "2e795c4476b9408597b95981fcef9ed0", "score": "0.6651917", "text": "public function payment_fields() {\n\t\tparent::payment_fields();\n\n\t\techo sprintf( __( 'You will be redirected to <a target=\"_blank\" href=\"%s\">PayEx</a> website when you place an order.', 'woocommerce-gateway-payex-payment' ), 'http://www.payex.com' );\n\t\t?>\n\t\t<div class=\"clear\"></div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "422c1c94369d9bc7463a06325ca9b302", "score": "0.66480505", "text": "public function payment_fields ()\n {\n\n // ok, let's display some description before the payment form\n if ($this->description) {\n // you can instructions for test mode, I mean test card numbers etc.\n if ($this->testmode) {\n $this->description .= ' TEST MODE ENABLED. In test mode, you can use the card numbers listed in \n <span href=\"#\" id=\"paiement_visa\" style=\"color: red; cursor: pointer;\" >Payer via APPROCARTE ORANGE</span>.';\n $this->description = trim($this->description);\n }\n // display the description with <p> tags etc.\n echo wpautop(wp_kses_post($this->description));\n }\n\n // I will echo() the form, but you can close PHP tags and print it directly in HTML\n echo '<fieldset id=\"wc-' . esc_attr($this->id) . '-cc-form\" class=\"wc-credit-card-form wc-payment-form\" style=\"background:transparent;\">';\n\n // Add this action hook if you want your custom payment gateway to support it\n do_action('woocommerce_credit_card_form_start', $this->id);\n echo '<div class=\"form-row form-row-wide\">\n <label>ID de transaction <span class=\"required\">*</span></label>\n <input name=\"mm_transaction\" id=\"mm_transaction\" type=\"text\" autocomplete=\"off\" required>\n <span class=\"badge\">Format: 00000000.0000.000000</span>\n </div>\n <div class=\"form-row form-row-first\">\n <label>Date d\\'envoye <span class=\"required\">*</span></label>\n <input name=\"mm_date\" id=\"mm_date\" type=\"text\" autocomplete=\"off\" placeholder=\"MM / YY\" required>\n </div>\n <div class=\"form-row form-row-last\">\n <!--<label>ID de transaction <span class=\"required\">*</span></label>\n <input id=\"mm_transaction\" type=\"password\" autocomplete=\"off\" placeholder=\"Transaction ID\">-->\n </div>\n <div class=\"clear\"></div>';\n do_action('woocommerce_credit_card_form_end', $this->id);\n\n echo '<div class=\"clear\"></div></fieldset>';\n }", "title": "" }, { "docid": "227b49a1f93ab2bf519b5cfd7e774829", "score": "0.6645541", "text": "function pkpk_payment_box() {\n\n\t$payment_info = get_field( 'checkout_payment_info', 'options-checkout' );\n\n\tglobal $edd_options;\n\tload_libs();\n\tLang::setLang('pl');\n\t$data['merchant_id'] = $edd_options['transferuj_merchantid'];\n\t$data['show_regulations_checkbox'] = true;\n\t$data['regulation_url'] = 'https://secure.tpay.com/regulamin.pdf';\n\t$data['form'] = '';\n\t?>\n\t<div class=\"col-sm-6\">\n\t\t<h2 class=\"checkout-heading\"><?= esc_html__('Informacje o płatności', 'pkpk'); ?></h2>\n\t\t<div class=\"spc__secure\">\n\t\t\t<i class=\"ion-lock-combination\"></i>\n\t\t\t<span class=\"spc__secure-text\">\n\t\t\t\t<?= esc_html__('Jest to bezpieczna 128-bitowa płatność szyfrowana SSL', 'pkpk'); ?>\n\t\t\t</span>\n\t\t</div>\n\t\t<div class=\"checkout-box\">\n\t\t\t<?= $payment_info; ?>\n\t\t\t<a href=\"https://tpay.com/jak-to-dziala\" target=\"_blank\">\n\t\t\t\t<img src=\"https://tpay.com/img/logo/tpaycom.png\" height=\"145\" width=\"250\"/>\n\t\t\t</a>\n\t\t</div>\n\t\t<input type=\"hidden\" name=\"regulamin\" id=\"tpay-regulations-input\" value=\"0\">\n\t\t<input type=\"hidden\" name=\"kanal\" id=\"tpay-channel-input\" value=\" \">\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "b424334ecc3b2d60b1075efac5eab494", "score": "0.66324854", "text": "public function payment_fields() {\n\n // ok, let's display some description before the payment form\n if ( $this->description ) {\n // you can instructions for test mode, I mean test card numbers etc.\n echo wpautop( wp_kses_post( $this->description ) );\n }\n\n switch ($this->settings['type']) {\n case 'direct':\n echo $this->generate_direct_initial_request_form_v1();\n break;\n case 'direct_v2':\n echo $this->generate_direct_initial_request_form_v2();\n break;\n default;\n }\n }", "title": "" }, { "docid": "3563da392c4b68377eae8c8d982dde38", "score": "0.6608234", "text": "function payment_fields()\n\t{\n\t\t$description = $this->description;\n\t\t \t\n\t\tif($this->test_mode == 'true')\n\t\t{\n\t\t\t$description = \"Sandbox Mode Enabled\\r\\n\";\n\t\t\t$description .= \"In Sandbox Mode, you can test with sandbox account\";\n\t\t }\n\t\t\n\t\tif ( $description ) {\n\t\t\techo wpautop( wptexturize( trim( $description ) ) );\n\t\t}\n\n\t\t?>\n\t\t<script>\n\t\tfunction checkCvv()\n\t\t{\n\t\t\tif(document.getElementById('chk_cvv').checked)\n\t\t\t{\n\t\t\t document.getElementById('salt_cvv').style.display = \"block\";\n\t\t\t document.getElementById('use_cvv').value = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t document.getElementById('salt_cvv').style.display = \"none\";\n\t\t\t document.getElementById('use_cvv').value = 0;\n\t\t\t}\t\t\t\n\t\t}\n\n\t\t</script>\n\t\t<div class=\"salt_credit_card\">\n\t\t\t<fieldset id=\"salt_woo_card_info\">\n\t\t\t<p class=\"form-row\">\n\t\t\t\t<label for=\"card_number\"><?php _e( \"Credit Card Number\", 'salt_woo'); ?> <span class=\"required\">*</span></label>\n\t\t\t\t<input class=\"wc-credit-card-form-card-number\" type=\"text\" id=\"salt_card_number\" name=\"salt_card_number\" maxlength=\"20\" autocomplete=\"off\" />\n\t\t\t</p>\n\t\t\t<div class=\"clear\"></div>\n\n\t\t\t<p class=\"form-row form-row-first\">\n\t\t\t\t<label for=\"salt_exp_month\"><?php _e( \"Expiration Date\", 'slat_woo'); ?> <span class=\"required\">*</span></label>\n\t\t\t\t<select name=\"salt_exp_month\" id=\"salt_exp_month\" class=\"woocommerce-select woocommerce-cc-month\" style=\"width:auto;\">\n\t\t\t\t\t<option value=\"\"><?php _e( 'Month', 'salt_woo'); ?></option>\n\t\t\t\t\t<?php foreach ( range( 1, 12 ) as $month ) : ?>\n\t\t\t\t\t<option value=\"<?php printf( '%02d', $month ) ?>\"><?php printf( '%02d', $month ) ?></option>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"salt_exp_year\" id=\"salt_exp_year\" class=\"woocommerce-select woocommerce-cc-year\" style=\"width:auto;\">\n\t\t\t\t\t<option value=\"\"><?php _e( 'Year', 'slat_woo'); ?></option>\n\t\t\t\t\t<?php foreach ( range( date( 'Y' ), date( 'Y' ) + 10 ) as $year ) : ?>\n\t\t\t\t\t<option value=\"<?php echo $year ?>\"><?php echo $year ?></option>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</select>\n\t\t\t</p>\n\n\t\t\t<p class=\"form-row form-row-first\">\n\t\t\t\t<label for=\"salt_cvv\"><?php _e( \"CVV\", 'slat_woo'); ?> <span class=\"required\">*</span></label>\n\t\t\t\t<input type=\"text\" id=\"salt_cvv\" name=\"salt_cvv\" autocomplete=\"off\" maxlength=\"4\"/>\n\t\t\t\t<input type=\"hidden\" id=\"use_cvv\" name=\"use_cvv\" value=1 />\n\t\t\t\t\n\t\t\t</p>\n\n\t\t\t</fieldset>\n\t\t</div>\n\t\t\n\t\t<?php\n\t\t//$this->credit_card_form();\n\t\n\t}", "title": "" }, { "docid": "35e293e97e62c700c2ca520cafa414a7", "score": "0.65612394", "text": "public function payment_fields() {\n\t\t$message = $this->get_sandbox_form_message( $this->get_transaction_address( 'country' ) );\n\t\twc_get_template(\n\t\t\t'sandbox-checkout-alert.php',\n\t\t\t[\n\t\t\t\t'is_sandbox_mode' => $this->is_sandbox_mode,\n\t\t\t\t'message' => $message,\n\t\t\t],\n\t\t\t'woocommerce/ebanx/',\n\t\t\tWC_EBANX::get_templates_path()\n\t\t);\n\n\t\t$description = $this->get_description();\n\t\tif ( isset( $description ) ) {\n\t\t\techo wp_kses_post( wpautop( wptexturize( $description ) ) );\n\t\t}\n\n\t\twc_get_template(\n\t\t\t'wallets/payment-form.php',\n\t\t\t[\n\t\t\t\t'title' => $this->title,\n\t\t\t\t'description' => $this->description,\n\t\t\t\t'id' => $this->id,\n\t\t\t],\n\t\t\t'woocommerce/ebanx/',\n\t\t\tWC_EBANX::get_templates_path()\n\t\t);\n\n\t\tparent::checkout_rate_conversion( WC_EBANX_Constants::CURRENCY_CODE_BRL );\n\n\t\twc_get_template(\n\t\t\t'bacen-international-alert.php',\n\t\t\tarray(\n\t\t\t\t'is_international' => $this->is_international(),\n\t\t\t),\n\t\t\t'woocommerce/ebanx/',\n\t\t\tWC_EBANX::get_templates_path()\n\t\t);\n\t}", "title": "" }, { "docid": "639ac67508ada8e2ba4a621b05a50c47", "score": "0.65479946", "text": "public function setting_payment()\n {\n redirect_admin_home();\n\n $data[\"paypal_info\"] = $this->admin->get_paypal_setting_info();\n// $data[\"shipping_methods\"] = $this->admin->get_shipping_methods();\n $this->load->view('backend/setting_payment', $data);\n }", "title": "" }, { "docid": "2f6fea29e8077068a003a881c78b73a3", "score": "0.65105283", "text": "public function actionSelectpayment(){\r\n $user_details = Generic::checkUserDetails();\r\n if(!$user_details){\r\n Yii::$app->session->setFlash('error','Please login first');\r\n return $this->redirect(Yii::$app->urlManager->createUrl(['/price-plan']));\r\n }\r\n $user_helper = new UserHelper();\r\n $subscription = $user_helper->checkUserSubscription($user_details);\r\n// if($subscription){\r\n// Yii::$app->session->setFlash('success','You have already choose a package');\r\n// return $this->redirect(Yii::$app->urlManager->createUrl(['/price-plan']));\r\n// }\r\n $plan_id = Yii::$app->request->post('package_id');\r\n $chosen_plan = PlanConfig::find()\r\n ->where(['id' => $plan_id])\r\n ->one();\r\n if($chosen_plan->price == 0){\r\n $user_helper->createSubscriptionForUser($user_details->id,$plan_id,1);\r\n return $this->render('transaction-success', array(\r\n 'user_details' => $user_details\r\n ));\r\n }\r\n return $this->render('payment-selection',['plan' => $plan_id,'user_details' => $user_details,'plan_details' => $chosen_plan]);\r\n }", "title": "" }, { "docid": "45a9ab505daa33e9d28da0eab15989d0", "score": "0.6494828", "text": "public function payment_fields() {\n\n if ( $description = $this->get_description() ) {\n echo wpautop( wptexturize( $description ) );\n }\n\n\t\t$this->komoju_method_form();\n }", "title": "" }, { "docid": "15cbb7c26890018884e9cf5e281cb903", "score": "0.6474734", "text": "public function __construct()\n {\n $this->id = 'paymo'; // payment gateway plugin ID\n $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\n $this->has_fields = true; // in case you need a custom credit card form\n $this->method_title = 'PAYMO Gateway';\n $this->method_description = 'Онлайн оплата с карт UzCard и Humo'; // will be displayed on the options page\n\n // gateways can support subscriptions, refunds, saved payment methods,\n // but in this tutorial we begin with simple payments\n $this->supports = array(\n 'products'\n );\n\n $lang_codes = ['ru_RU' => 'ru', 'en_US' => 'en', 'uz_UZ' => 'uz'];\n $this->lang = isset($lang_codes[get_locale()]) ? $lang_codes[get_locale()] : 'en';\n\n\n // Method with all the options fields\n $this->init_form_fields();\n\n // Load the settings.\n $this->init_settings();\n $this->title = $this->get_option('title');\n $this->description = $this->get_option('description');\n $this->enabled = $this->get_option('enabled');\n $this->testmode = 'yes' === $this->get_option('testmode');\n $this->store_id = $this->testmode ? $this->get_option('test_store_id') : $this->get_option('store_id');\n $this->api_key = $this->testmode ? $this->get_option('test_api_key') : $this->get_option('api_key');\n $this->theme = $this->get_option('theme');\n $this->colors[] = $this->get_option('color1');\n $this->colors[] = $this->get_option('color2');\n $this->colors[] = $this->get_option('color3');\n $this->colors[] = $this->get_option('color4');\n $this->colors[] = $this->get_option('color5');\n $this->colors[] = $this->get_option('color6');\n $this->colors[] = $this->get_option('color7');\n $this->colors[] = $this->get_option('color8');\n $this->colors[] = $this->get_option('color9');\n $this->colors[] = $this->get_option('color10');\n\n add_action('woocommerce_receipt_' . $this->id, [$this, 'receipt_page']);\n\n // This action hook saves the settings\n add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));\n\n // We need custom JavaScript to obtain a token\n add_action('wp_enqueue_scripts', array($this, 'payment_scripts'));\n\n // You can also register a webhook here\n add_action( 'woocommerce_api_paymo_callback', array( $this, 'webhook' ) );\n }", "title": "" }, { "docid": "373f892f0132a77a8f98d165db087bb6", "score": "0.6449055", "text": "public function index() {\n $this->load->language('payment/svea_partpayment');\n $this->load->model('checkout/order');\n\n $data['text_payment_options'] = $this->language->get('text_payment_options');\n $data['text_ssn'] = $this->language->get('text_ssn');\n $data['text_birthdate'] = $this->language->get('text_birthdate');\n $data['text_initials'] = $this->language->get('text_initials');\n $data['text_get_address'] = $this->language->get('text_get_address');\n $data['text_invoice_address'] = $this->language->get('text_invoice_address');\n $data['text_shipping_address'] = $this->language->get('text_shipping_address');\n $data['svea_partpayment_shipping_billing'] = $this->config->get('svea_partpayment_shipping_billing');\n\n\n $data['button_confirm'] = $this->language->get('button_confirm');\n $data['button_back'] = $this->language->get('button_back');\n\n $data['continue'] = 'index.php?route=checkout/success';\n\n if ($this->request->get['route'] != 'checkout/guest_step_3') {\n $data['back'] = 'index.php?route=checkout/payment';\n } else {\n $data['back'] = 'index.php?rout=checkout/guest_step_2';\n }\n\n // $this->id = 'payment';\n\n //Get the country from the order\n $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);\n $data['countryCode'] = $order_info['payment_iso_code_2'];\n\n $data['logo'] = \"<img src='admin/view/image/payment/\" . $this->getLogo($order_info['payment_iso_code_2']) . \"/svea_partpayment.png'>\";\n\n // we show the available payment plans w/monthly amounts as radiobuttons under the logo\n $data['paymentOptions'] = $this->getPaymentOptions();\n\n\n if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/svea_partpayment.tpl')) {\n return $this->load->view($this->config->get('config_template') . '/template/payment/svea_partpayment.tpl', $data);\n } else {\n return $this->load->view('default/template/payment/svea_partpayment.tpl', $data);\n }\n }", "title": "" }, { "docid": "19efa5de6af450281690f16e1ec7872f", "score": "0.64326435", "text": "public function admin_options() {\r\n\r\n ?>\r\n <h3><?php _e( '2Checkout', 'twocheckout' ); ?></h3>\r\n <p><?php _e( '2Checkout - Credit Card/Paypal', 'twocheckout' ); ?></p>\r\n\r\n <?php if ( $this->is_valid_for_use() ) : ?>\r\n\r\n <table class=\"form-table\">\r\n <?php\r\n // Generate the HTML For the settings form.\r\n $this->generate_settings_html();\r\n ?>\r\n </table><!--/.form-table-->\r\n\r\n <?php else : ?>\r\n <div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'twocheckout' ); ?></strong>: <?php _e( '2Checkout does not support your store currency.', 'twocheckout' ); ?></p></div>\r\n <?php\r\n endif;\r\n }", "title": "" }, { "docid": "39ba561aa172d5ce39079d11dfa73b97", "score": "0.64224976", "text": "public function payment_fields() {\n\t\t$integration_type_cls = 'integration_type_' . $this->id;\n\t\techo '<input type=\"hidden\" class=\"' . wp_kses_data( $integration_type_cls ) . '\" value=\"' . wp_kses_data( $this->get_integration_type() ) . '\" />';\n\t\tif ( class_exists( 'APS_Public' ) ) {\n\t\t\tAPS_Public::load_valu_wizard( $this->aps_config->get_language(), $this->aps_config->get_enable_valu_down_payment(), $this->aps_config->get_valu_down_payment_value() );\n\t\t}\n\t}", "title": "" }, { "docid": "a11a39d88bbf15917c1c2650d2edfb73", "score": "0.64198446", "text": "public function payment_fields(){\n\t\t\tif ( $this -> description ) { echo wpautop( wptexturize( $this -> description ) ); }\n\t}", "title": "" }, { "docid": "8a0dbdc02f6e4f292ee73da643f508e9", "score": "0.64071715", "text": "public function paymentoptionsAction() {\n\t\ttry{\t\t\t\n\t\t\t$this->view->title = \"Payment Options\";\n\n\t\t\t$ViewCartProductDetails_array = $this->productssdb->getViewCartProductDetails();\t\t\t\n\t\t\t\n\t\t\tif(count($ViewCartProductDetails_array)>0){\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$sub_total_product_price = 0;\n\t\t\t\tforeach($ViewCartProductDetails_array as $ViewCartProductDetails){\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif($ViewCartProductDetails['product_discount']!='0' && trim($ViewCartProductDetails['product_discount_type'])!=''){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(trim($ViewCartProductDetails['product_discount_type'])=='Percentage'){\n\t\t\t\t\t\t\t$product_price = $ViewCartProductDetails['product_price'] - (($ViewCartProductDetails['product_price']*$ViewCartProductDetails['product_discount'])/100);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(trim($ViewCartProductDetails['product_discount_type'])=='Amount'){\n\t\t\t\t\t\t\t$product_price = $ViewCartProductDetails['product_price'] - $ViewCartProductDetails['product_discount'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$product_price = $ViewCartProductDetails['product_price'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$sub_product_price = $product_price * $ViewCartProductDetails['product_quantity'];\n\t\t\t\t\t\n\t\t\t\t\t$sub_total_product_price = $sub_total_product_price + $sub_product_price;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->view->sub_total_product_price = $sub_total_product_price;\n\t\t\t\n\t\t\t$params = $this->_getAllParams();\n\t\t\t$request = $this->getRequest();\n\t\t\t$Request_Values = $request->getPost();\n\t\t\tif ($request->isPost()) {\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}catch (Exception $e){\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "0f95cbc1f24e170fbd6b02a401129f83", "score": "0.6406497", "text": "function payment($objTpl)\r\n {\r\n global $objDatabase, $_ARRAYLANG, $_CORELANG;\r\n\r\n $objTpl->addBlockfile($this->moduleLangVar.'_SETTINGS_CONTENT', 'settings_content', 'module_calendar_settings_payment.html');\r\n \r\n if(isset($_POST['submitSettingsPayment'])){\r\n $this->_saveSettings();\r\n }\r\n \r\n $this->_getSettingElements($objTpl, 9);\r\n\r\n }", "title": "" }, { "docid": "d2dcba481028a98a420f3df7f0d8f39a", "score": "0.6341572", "text": "function plgVmOnShowOrderBEPayment($virtuemart_order_id, $virtuemart_payment_id) {\r\n if (!$this->selectedThisByMethodId($virtuemart_payment_id)) {\r\n return null; // Another method was selected, do nothing\r\n }\r\n\r\n $db = JFactory::getDBO();\r\n\r\n $q = 'SELECT * FROM `'.$this->_tablename.'` '.'WHERE `virtuemart_order_id` = '.$virtuemart_order_id;\r\n $db->setQuery($q);\r\n if (!($paymentTable = $db->loadObject())) {\r\n vmWarn(500, $q.\" \".$db->getErrorMsg());\r\n //return '';\r\n }\r\n \r\n $this->getPaymentCurrency($paymentTable);\r\n\r\n $html = '<table class=\"adminlist\">'.\"\\n\";\r\n $html .= $this->getHtmlHeaderBE();\r\n $html .= $this->getHtmlRowBE('STANDARD_PAYMENT_NAME', $paymentTable->payment_name);\r\n $html .= '</table>'.\"\\n\";\r\n /*$html .= '<div style=\"font-family:Arial;font-size:10pt;width: 200px;border: 1px solid #2e99d4;\">\r\n\t\t\t\t\t<img src=\"https://ifthenpay.com/mb.png\" style=\"height:80px;width:80px;display: block;margin-left: auto;margin-right: auto;\">\r\n\t\t\t\t\t<p style=\"line-height: 1.8;padding: 2px 20px;\">Entidade:&nbsp;&nbsp;<span style=\"float: right\"><b>'.$paymentTable->entity.'</b></span><br>\r\n\t\t\t\t\tReferência:&nbsp;&nbsp;<span style=\"float: right\"><b>'.$paymentTable->referencia.'</b></span><br>\r\n\t\t\t\t\tValor:&nbsp;&nbsp;<span style=\"float: right\"><b>'.number_format($paymentTable->value, 2).'</b></span></p>\r\n\t\t\t\t</div>';*/\r\n\t\t\t\t\r\n return $html;\r\n }", "title": "" }, { "docid": "b53b7013780b9d1c9b8318dcc03c99de", "score": "0.6327097", "text": "public function payment_fields() {\n\t\tparent::payment_fields();\n\t\t?>\n\t\t<p class=\"form-row form-row-wide\">\n\t\t\t<label for=\"social-security-number\">\n\t\t\t\t<?php echo __( 'Social Security Number', 'swedbank-pay-woocommerce-payments' ); ?>\n\t\t\t\t<abbr class=\"required\">*</abbr>\n\t\t\t</label>\n\t\t\t<input type=\"text\" class=\"input-text required-entry\" name=\"social-security-number\" id=\"social-security-number\" value=\"\" autocomplete=\"off\">\n\t\t</p>\n\t\t<?php\n\t}", "title": "" }, { "docid": "307daecb0f23e1e2a78b59727a155c22", "score": "0.6314228", "text": "public function option_payments_confirm() \n\t{\n\t\tglobal $userpanel; // PHP Globals\r\n\r\n\t\t$CTM_HTML = NULL;\n\t\t$CTM_HTML .= \"\t<script type=\\\"text/javascript\\\">\r\n\t$(function()\r\n\t{\r\n\t\t$(\\\"#selectMethod\\\").change(function()\r\n\t\t{\r\n\t\t\tif($(\\\"#selectMethod option:selected\\\").val().length < 1)\r\n\t\t\t{\r\n\t\t\t\tCTM.Message(\\\"<strong>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['SelectMethod']}</strong>\\\", 1, \\\"showErrorMessage\\\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$.fancybox(\r\n\t\t\t\t{\r\n\t\t\t\t\tajax :\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttype : \\\"GET\\\",\r\n\t\t\t\t\t\tdata : \\\"ajaxLoadSet=true\\\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thref : \\\"?app=core&module=userpanel&option=invoices&section=show&id={$userpanel['payments']['confirm_payment']['invoice_id']}&do=payment&method=\\\"+$(\\\"#selectMethod\\\").val()\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t//$.facebox({ ajax: \\\"?app=core&module=userpanel&option=invoices&section=show&id={$userpanel['payments']['confirm_payment']['invoice_id']}&do=payment&method=\\\"+$(\\\"#selectMethod\\\").val()+\\\"&ajaxLoadSet=true\\\" });\r\n\t\t\t\t//CTM.AjaxLoad(\\\"?app=core&module=userpanel&option=invoices&section=show&id={$userpanel['payments']['confirm_payment']['invoice_id']}&do=payment&method=\\\"+$(\\\"#selectMethod\\\").val(), \\\"payment_div_content\\\");\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\t</script>\r\n <div id=\\\"payment_div_content\\\" style=\\\"width: 700px\\\">\r\n <div class=\\\"box-content\\\">\r\n <div class=\\\"header\\\"><span>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Title']}</span></div>\r\n <div align=\\\"center\\\" style=\\\"display:block; padding:5px 10px;\\\">\r\n {$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['SelectMethod']}<br /><br />\r\n <select name=\\\"selectMethod\\\" id=\\\"selectMethod\\\" class=\\\"selectField\\\">\r\n <option value=\\\"\\\" disabled=\\\"disabled\\\" selected=\\\"selected\\\">{$this->lang->words['Words']['Select']}</option>\r\n \".$this->loop__option_payments_confirm__0x12().\"\r\n </select>\r\n </div>\r\n </div>\r\n <div id=\\\"showErrorMessage\\\"></div>\r\n\t</div>\";\n\t\treturn $CTM_HTML;\n\t}", "title": "" }, { "docid": "9da8d39d18ff4919a417bc657c82c721", "score": "0.63046694", "text": "public function payment_fields(){\n\t\t// Print the payment gateway description, if we have.\n\t\techo ( ! empty( $this->get_description() ) ) ? wpautop( wptexturize( $this->get_description() ) ) : '';\n\n\t\t// Get the months list.\n\t\t$months = cf_get_months_array();\n\n\t\tob_start();\n\t\t?>\n\t\t<div id=\"archway_payment_gateway_method\">\n\t\t\t<div class=\"form-group card-number-field\">\n\t\t\t\t<label for=\"archway-card-number\"><?php esc_html_e( 'Card Number', 'wc-archway-payment-gateway' ); ?></label>\n\t\t\t\t<input type=\"text\" name=\"archway-card-number\" class=\"form-control\" id=\"archway-card-number\" maxlength=\"19\" placeholder=\"1234-1234-1234-1234\">\n\t\t\t</div>\n\t\t\t<div class=\"form-group cvv-field\">\n\t\t\t\t<label for=\"archway-card-cvv\"><?php esc_html_e( 'CVV', 'wc-archway-payment-gateway' ); ?></label>\n\t\t\t\t<input type=\"password\" name=\"archway-card-cvv\" class=\"form-control\" id=\"archway-card-cvv\" maxlength=\"3\" placeholder=\"CVV\">\n\t\t\t</div>\n\t\t\t<div class=\"form-group expiration-date-field\">\n\t\t\t\t<label><?php esc_html_e( 'Expiration', 'wc-archway-payment-gateway' ); ?></label>\n\t\t\t\t<select name=\"archway-card-expiry-month\" id=\"archway-card-expiry-month\">\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( ! empty( $months ) && is_array( $months ) ) {\n\t\t\t\t\t\tforeach( $months as $month_num => $month_name ) {\n\t\t\t\t\t\t\techo wp_kses(\n\t\t\t\t\t\t\t\t'<option value=\"'. $month_num .'\">'. $month_name .'</option>',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'option' => array(\n\t\t\t\t\t\t\t\t\t\t'value' => array(),\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\t?>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"archway-card-expiry-year\" id=\"archway-card-expiry-year\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$current_year = gmdate( 'Y' );\n\t\t\t\t\tfor ( $year = $current_year; $year <= ( $current_year + 20 ); $year++ ) {\n\t\t\t\t\t\techo wp_kses(\n\t\t\t\t\t\t\t'<option value=\"'. $year .'\">' . $year . '</option>',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'option' => array(\n\t\t\t\t\t\t\t\t\t'value' => array(),\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?>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class=\"form-group card-holder-field\">\n\t\t\t\t<label for=\"archway-card-holder\"><?php esc_html_e( 'Card Holder', 'wc-archway-payment-gateway' ); ?></label>\n\t\t\t\t<input type=\"text\" name=\"archway-card-holder\" class=\"form-control\" id=\"archway-card-holder\" placeholder=\"<?php esc_html_e( 'Please input your name', 'wc-archway-payment-gateway' ); ?>\">\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\techo ob_get_clean();\n\t}", "title": "" }, { "docid": "ff8df6b6eca245eec89d39c92e58f0ce", "score": "0.6295645", "text": "public function payment_fields() {\n\t\t$selected = null;\n\t\tif( !empty( $_POST['mp_card_type'] ) ) {\n\t\t\t$selected = $_POST['mp_card_type'];\n\t\t} elseif( !empty( $_POST['post_data'] ) ) {\n\t\t\tparse_str( $_POST['post_data'], $post_data );\n\t\t\tif( !empty( $post_data['mp_card_type'] ) )\n\t\t\t\t$selected = $post_data['mp_card_type'];\n\t\t}\n\t\t?>\n\t\t<div class=\"mp_payment_fields\">\n\t\t\n\t\t<?php if( 'yes' == $this->get_option('enabled_BANK_WIRE') ) : ?>\n\t\t\t<div class=\"mp_pay_method_wrap\">\n\t\t\t<div class=\"mp_card_dropdown_wrap\">\n\t\t\t<input type=\"radio\" name=\"mp_payment_type\" class=\"mp_payment_type card\" value=\"card\" checked=\"checked\" />\n\t\t\t<label for=\"mp_payment_type\"><?php _e( 'Use a credit card', 'mangopay' ); ?>&nbsp;</label>\n\t\t<?php else: ?>\n\t\t\t<label for=\"mp_card_type\"><?php _e( 'Credit card type:', 'mangopay' ); ?>&nbsp;</label>\n\t\t<?php endif; ?>\n\t\t\n\t\t<select name=\"mp_card_type\" id=\"mp_card_type\">\n\t\t<?php foreach( $this->available_card_types as $type=>$label ) : if( 'yes' == $this->get_option('enabled_'.$type) ) : ?>\n\t\t\t<?php if( 'BANK_WIRE' == $type ) continue; ?>\n\t\t\t<option value=\"<?php echo $type; ?>\" <?php selected( $type, $selected ); ?>><?php _e( $label, 'mangopay' ); ?></option>\n\t\t<?php endif; endforeach; ?>\n\t\t</select>\n\t\t\n\t\t<?php if( 'yes' == $this->get_option('enabled_BANK_WIRE') ) : ?>\n\t\t\t</div>\n\t\t\t<div class=\"mp_spacer\">&nbsp;</div>\n\t\t\t<div class=\"mp_direct_dropdown_wrap\">\n\t\t\t<input type=\"radio\" name=\"mp_payment_type\" value=\"bank_wire\" />\n\t\t\t<label for=\"mp_payment_type\"><?php _e( 'Use a direct bank wire', 'mangopay' ); ?></label>\n\t\t\t</div>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\t\t\n\t\t<script>\n\t\t(function($) {\n\t\t\t$(document).ready(function() {\n\t\t\t\t$('#mp_card_type').on('change click', function( e ){\n\t\t\t\t\t$('.mp_payment_type.card').attr('checked','checked');\n\t\t\t\t});\n\t\t\t});\n\t\t})( jQuery );\n\t\t</script>\n\t\t\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "fbed54687549c4ec9339984906827d76", "score": "0.62775445", "text": "function payment_fields() {\r\n $plugin_dir = plugin_dir_url(__FILE__);\r\n // Description of payment method from settings\r\n if ($this->description) { ?>\r\n <p><?php\r\n echo $this->description; ?>\r\n </p><?php\r\n } ?>\r\n\r\n <ul class=\"woocommerce-error\" style=\"display:none\" id=\"twocheckout_error_creditcard\">\r\n <li>Credit Card details are incorrect, please try again.</li>\r\n </ul>\r\n\r\n <fieldset>\r\n\r\n <input id=\"sellerId\" type=\"hidden\" maxlength=\"16\" width=\"20\" value=\"<?php echo $this->seller_id ?>\">\r\n <input id=\"publishableKey\" type=\"hidden\" width=\"20\" value=\"<?php echo $this->publishable_key ?>\">\r\n <input id=\"token\" name=\"token\" type=\"hidden\" value=\"\">\r\n\r\n <!-- Credit card number -->\r\n <p class=\"form-row form-row-first\">\r\n <label for=\"ccNo\"><?php echo __( 'Credit Card number', 'twocheckout' ) ?> <span class=\"required\">*</span></label>\r\n <input type=\"text\" class=\"input-text\" id=\"ccNo\" autocomplete=\"off\" value=\"\" />\r\n\r\n </p>\r\n\r\n <div class=\"clear\"></div>\r\n\r\n <!-- Credit card expiration -->\r\n <p class=\"form-row form-row-first\">\r\n <label for=\"cc-expire-month\"><?php echo __( 'Expiration date', 'twocheckout') ?> <span class=\"required\">*</span></label>\r\n <select id=\"expMonth\" class=\"woocommerce-select woocommerce-cc-month\">\r\n <option value=\"\"><?php _e( 'Month', 'twocheckout' ) ?></option><?php\r\n $months = array();\r\n for ( $i = 1; $i <= 12; $i ++ ) {\r\n $timestamp = mktime( 0, 0, 0, $i, 1 );\r\n $months[ date( 'n', $timestamp ) ] = date( 'F', $timestamp );\r\n }\r\n foreach ( $months as $num => $name ) {\r\n printf( '<option value=\"%02d\">%s</option>', $num, $name );\r\n } ?>\r\n </select>\r\n <select id=\"expYear\" class=\"woocommerce-select woocommerce-cc-year\">\r\n <option value=\"\"><?php _e( 'Year', 'twocheckout' ) ?></option>\r\n <?php\r\n $years = array();\r\n for ( $i = date( 'y' ); $i <= date( 'y' ) + 15; $i ++ ) {\r\n printf( '<option value=\"20%u\">20%u</option>', $i, $i );\r\n }\r\n ?>\r\n </select>\r\n </p>\r\n <div class=\"clear\"></div>\r\n\r\n <!-- Credit card security code -->\r\n <p class=\"form-row\">\r\n <label for=\"cvv\"><?php _e( 'Card security code', 'twocheckout' ) ?> <span class=\"required\">*</span></label>\r\n <input type=\"text\" class=\"input-text\" id=\"cvv\" autocomplete=\"off\" maxlength=\"4\" style=\"width:55px\" />\r\n <span class=\"help\"><?php _e( '3 or 4 digits usually found on the signature strip.', 'twocheckout' ) ?></span>\r\n </p>\r\n\r\n <div class=\"clear\"></div>\r\n\r\n </fieldset>\r\n\r\n <script type=\"text/javascript\">\r\n var formName = \"order_review\";\r\n var myForm = document.getElementsByName('checkout')[0];\r\n if(myForm) {\r\n myForm.id = \"tcoCCForm\";\r\n formName = \"tcoCCForm\";\r\n }\r\n jQuery('#' + formName).on(\"click\", function(){\r\n jQuery('#place_order').unbind('click');\r\n jQuery('#place_order').click(function(e) {\r\n e.preventDefault();\r\n retrieveToken();\r\n });\r\n });\r\n\r\n function successCallback(data) {\r\n clearPaymentFields();\r\n jQuery('#token').val(data.response.token.token);\r\n jQuery('#place_order').unbind('click');\r\n jQuery('#place_order').click(function(e) {\r\n return true;\r\n });\r\n jQuery('#place_order').click();\r\n }\r\n\r\n function errorCallback(data) {\r\n if (data.errorCode === 200) {\r\n TCO.requestToken(successCallback, errorCallback, formName);\r\n } else if(data.errorCode == 401) {\r\n clearPaymentFields();\r\n jQuery('#place_order').click(function(e) {\r\n e.preventDefault();\r\n retrieveToken();\r\n });\r\n jQuery(\"#twocheckout_error_creditcard\").show();\r\n\r\n } else{\r\n clearPaymentFields();\r\n jQuery('#place_order').click(function(e) {\r\n e.preventDefault();\r\n retrieveToken();\r\n });\r\n alert(data.errorMsg);\r\n }\r\n }\r\n\r\n var retrieveToken = function () {\r\n jQuery(\"#twocheckout_error_creditcard\").hide();\r\n if (jQuery('div.payment_method_twocheckout:first').css('display') === 'block') {\r\n jQuery('#ccNo').val(jQuery('#ccNo').val().replace(/[^0-9\\.]+/g,''));\r\n TCO.requestToken(successCallback, errorCallback, formName);\r\n } else {\r\n jQuery('#place_order').unbind('click');\r\n jQuery('#place_order').click(function(e) {\r\n return true;\r\n });\r\n jQuery('#place_order').click();\r\n }\r\n }\r\n\r\n function clearPaymentFields() {\r\n jQuery('#ccNo').val('');\r\n jQuery('#cvv').val('');\r\n jQuery('#expMonth').val('');\r\n jQuery('#expYear').val('');\r\n }\r\n\r\n </script>\r\n\r\n <?php if ($this->sandbox == 'yes'): ?>\r\n <script type=\"text/javascript\" src=\"https://sandbox.2checkout.com/checkout/api/script/publickey/<?php echo $this->seller_id ?>\"></script>\r\n <script type=\"text/javascript\" src=\"https://sandbox.2checkout.com/checkout/api/2co.js\"></script>\r\n <?php else: ?>\r\n <script type=\"text/javascript\" src=\"https://www.2checkout.com/checkout/api/script/publickey/<?php echo $this->seller_id ?>\"></script>\r\n <script type=\"text/javascript\" src=\"https://www.2checkout.com/checkout/api/2co.js\"></script>\r\n <?php endif ?>\r\n <?php\r\n }", "title": "" }, { "docid": "ca1f0f456d3d729f51c7ffa31fd1f3bf", "score": "0.6275753", "text": "public function __construct() {\r\n \r\n $this->id = 'payd_gateway'; // payment gateway plugin ID\r\n $this->icon = apply_filters( 'woocommerce_noob_icon', plugins_url('/icon.png', __FILE__ ) );; // URL of the icon that will be displayed on checkout page near your gateway name\r\n $this->has_fields = false; // in case you need a custom credit card form\r\n $this->method_title = 'Payd Gateway';\r\n $this->method_description = 'Description of payd payment gateway'; // will be displayed on the options page\r\n \r\n // gateways can support subscriptions, refunds, saved payment methods,\r\n // but in this tutorial we begin with simple payments\r\n $this->supports = array(\r\n 'products'\r\n );\r\n \r\n // Method with all the options fields\r\n $this->init_form_fields();\r\n \r\n // Load the settings.\r\n $this->init_settings();\r\n $this->title = $this->get_option( 'title' );\r\n $this->description = $this->get_option( 'description' );\r\n $this->enabled = $this->get_option( 'enabled' );\r\n $this->testmode = 'yes' === $this->get_option( 'testmode' );\r\n $this->private_key = $this->testmode ? $this->get_option( 'test_private_key' ) : $this->get_option( 'private_key' );\r\n //$this->publishable_key = $this->testmode ? $this->get_option( 'test_publishable_key' ) : $this->get_option( 'publishable_key' );\r\n \r\n // This action hook saves the settings\r\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\r\n \r\n // We need custom JavaScript to obtain a token\r\n //add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );\r\n\r\n }", "title": "" }, { "docid": "43675a3b98949a64dedaff73ab8b1a53", "score": "0.62528664", "text": "public function admin_options() {\n\t\t$this->checks();\n\t\t?>\n\t\t<h3><?php __( 'Dinpay Credit Card', 'woocommerce-ddbillcc' ); ?></h3>\n\t\t<p><?php __( 'Dinpay Credit Card works by sending the user to Dinpay Account to enter their payment information.', 'woocommerce-ddbillcc' ); ?></p>\n\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table>\n\t\t<?php \n\t}", "title": "" }, { "docid": "03bfaf93677fbc9f9b24c407cde7a8c4", "score": "0.62510717", "text": "function wpbs_submenu_page_settings_tab_payment()\n{\n if (!wpbs_is_pricing_enabled()) {\n return false;\n }\n\n $payment_tabs = array(\n 'general_settings' => __('General Settings', 'wp-booking-system'),\n 'taxes' => __('Taxes', 'wp-booking-system'),\n );\n\n $payment_tabs = apply_filters('wpbs_submenu_page_settings_payment_tabs', $payment_tabs);\n\n include 'views/view-payment-settings.php';\n\n}", "title": "" }, { "docid": "a10e725e8155e3666310308cddd6e2d2", "score": "0.62297916", "text": "public function payment_fields() \n\t\t{\n\t\t\tif ( $this->description) echo wpautop( wptexturize( $this->description ) );\n\t\t}", "title": "" }, { "docid": "91a6fcc376a72d5541ac4b3f9714b5b6", "score": "0.6227908", "text": "public function getPaymentFormHTML()\r\n {\r\n require_once(_KARYBU_PATH_ . 'modules/shop/shop.locales.php');\r\n $countries = require_once(_KARYBU_PATH_ . 'modules/shop/shop.countries.php');\r\n\r\n $cart = Context::get('cart');\r\n $billing_address = $cart->getBillingAddress();\r\n $logged_info = Context::get('logged_info');\r\n\r\n $countryCode = array_search($billing_address->country, $countries);\r\n\r\n $passphrase = new Passphrase($this->sha_in_passphrase);\r\n $shaComposer = new AllParametersShaComposer($passphrase);\r\n $shaComposer->addParameterFilter(new ShaInParameterFilter);\r\n\r\n $paymentRequest = new PaymentRequest($shaComposer);\r\n $paymentRequest->setOgoneUri($this->getGatewayType());\r\n $paymentRequest->setPspid($this->pspid);\r\n $paymentRequest->setOrderid($cart->cart_srl);\r\n\r\n $paymentRequest->setCurrency($cart->getCurrency());\r\n $paymentRequest->setLanguage(getLocale($countryCode, Context::getLangType()));\r\n\r\n $paymentRequest->setOwnerAddress($billing_address->address);\r\n $paymentRequest->setOwnerZip($billing_address->postal_code);\r\n $paymentRequest->setOwnerTown($billing_address->city);\r\n\r\n $paymentRequest->setOwnerCountry($countryCode);\r\n\r\n //$paymentRequest->setPaymentMethod('CreditCard');\r\n //$paymentRequest->setBrand('VISA');\r\n\r\n $paymentRequest->setCn($cart->getCustomerFirstname() . \" \" . $cart->getCustomerLastname());\r\n //$paymentRequest->setEmail($cart->getExtra('email'));\r\n $paymentRequest->setEmail($logged_info->email_address);\r\n\r\n // $this->getNotifyUrl()\r\n // $this->getOrderConfirmationPageUrl()\r\n $paymentRequest->setAccepturl($this->getOrderConfirmationPageUrl());\r\n\r\n $vid = Context::get('vid');\r\n $shopUrl = getNotEncodedFullUrl('', 'vid', $vid);\r\n $checkoutUrl = getNotEncodedFullUrl('', 'vid', $vid, 'act', 'dispShopCheckout');\r\n $placeOrderUrl = getNotEncodedFullUrl('', 'vid', $vid, 'act', 'dispShopPlaceOrder');\r\n\r\n $paymentRequest->setDeclineurl($checkoutUrl);\r\n $paymentRequest->setExceptionurl($checkoutUrl);\r\n $paymentRequest->setCancelurl($checkoutUrl);\r\n\r\n //$paymentRequest->setBackurl($placeOrderUrl);\r\n //$paymentRequest->setHomeurl($shopUrl);\r\n //$paymentRequest->setCatalogurl($shopUrl);\r\n\r\n //$paymentRequest->setDynamicTemplateUri($shopUrl);\r\n\r\n //$paymentRequest->setOrderDescription(\"Your order\");\r\n\r\n $paymentRequest->setAmount($cart->getTotal() * 100); // in cents\r\n\r\n $paymentRequest->validate();\r\n\r\n $formGenerator = new SimpleFormGenerator;\r\n $formGenerator->showSubmitButton(false);\r\n $html = $formGenerator->render($paymentRequest);\r\n\r\n return $html;\r\n }", "title": "" }, { "docid": "3f8bc8de64f0adc6f8b5e5724488a466", "score": "0.6215076", "text": "public static function admin_config_form() {\n\t\t$html = '';\n\n\t\t$html .= '<tr>';\n\t\t$html .= '\t<td class=\"wpsc_CC_details\">';\n\t\t$html .= '\t\t' . __( 'Configuration', 'pronamic_ideal' );\n\t\t$html .= '\t</td>';\n\t\t$html .= '\t<td>';\n\t\t$html .= Pronamic_WP_Pay_Admin::dropdown_configs( array(\n\t\t\t'name' => Pronamic_WP_Pay_Extensions_WPeCommerce_Extension::OPTION_PRONAMIC_CONFIG_ID,\n\t\t\t'echo' => false,\n\t\t) );\n\t\t$html .= '\t</td>';\n\t\t$html .= '</tr>';\n\n\t\t$config_id = get_option( Pronamic_WP_Pay_Extensions_WPeCommerce_Extension::OPTION_PRONAMIC_CONFIG_ID );\n\n\t\t$gateway = Pronamic_WP_Pay_Plugin::get_gateway( $config_id );\n\n\t\tif ( $gateway ) {\n\t\t\t$payment_method_field = $gateway->get_payment_method_field();\n\n\t\t\tif ( $payment_method_field ) {\n\t\t\t\t$choices = $payment_method_field['choices'];\n\n\t\t\t\t$name = Pronamic_WP_Pay_Extensions_WPeCommerce_Extension::OPTION_PRONAMIC_PAYMENT_METHOD;\n\n\t\t\t\t$payment_method = get_option( $name );\n\n\t\t\t\t$options = Pronamic_WP_HTML_Helper::select_options_grouped( $choices, $payment_method );\n\t\t\t\t// Double quotes are not working, se we replace them with an single quote\n\t\t\t\t$options = str_replace( '\"', '\\'', $options );\n\n\t\t\t\t$html .= '<tr>';\n\t\t\t\t$html .= '\t<td class=\"wpsc_CC_details\">';\n\t\t\t\t$html .= '\t\t' . __( 'Payment Method', 'pronamic_ideal' );\n\t\t\t\t$html .= '\t</td>';\n\t\t\t\t$html .= '\t<td>';\n\t\t\t\t$html .= sprintf( \"<select name='%s' id='%s'>\", $name, $name );\n\t\t\t\t$html .= sprintf( '%s', $options );\n\t\t\t\t$html .= sprintf( '</select>' );\n\t\t\t\t$html .= '\t</td>';\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "8ed5ab174ab68b92567aaf67b48402e2", "score": "0.62080115", "text": "public function admin_options(){\r\n echo '<h3>'.__('PayUmoney payment', 'payumbolt').'</h3>';\r\n echo '<p>'.__('PayUmoney most popular payment gateways for online shopping in India').'</p>';\r\n\t echo '<script src=\"https://code.jquery.com/jquery-3.2.1.min.js\"></script>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n\r\n }", "title": "" }, { "docid": "17b0a9ee2642b07138e84ab29f2b54fb", "score": "0.62025934", "text": "function payment_fields(){\r\n if($this -> description) echo wpautop(wptexturize($this -> description));\r\n }", "title": "" }, { "docid": "c5b024c6c08a70a8f6df7ec72a84f8e9", "score": "0.61729175", "text": "public function admin_options() {\n?>\n\t\t<h3><?php _e( 'Payment Express', 'woocommerce-gateway-payment-express-pxhybrid' ); ?></h3>\n\t\t<p><?php _e( 'Allows your customers to pay via Payment Express PxPay (Supports PxPay1 & 2). The extension also uses PxPost for recurring billing support with the WooCommerce Subscriptions extension.', 'woocommerce-gateway-payment-express-pxhybrid' ); ?></p>\n\n\t\t<table class=\"form-table\">\n<?php\n\t\t\t/* Generate the HTML For the settings form. */\n\t\t\t$this->generate_settings_html();\n?>\n\t\t</table><!--/.form-table-->\n<?php\n\t}", "title": "" }, { "docid": "45acf29a46678169a43da1ca3595bd8f", "score": "0.61523825", "text": "public function show(Payment $payment)\n {\n \n }", "title": "" }, { "docid": "340023728bf4db647e36af3994110bb1", "score": "0.6151082", "text": "function payment_fields() {\n if ($this->description)\n echo wpautop(wptexturize($this->description));\n }", "title": "" }, { "docid": "30b8d603564a4ff48ce035426339ba57", "score": "0.61490136", "text": "public function payment_fields() {\n \n\t\t\t// ok, let's display some description before the payment form\n\t\t\tif ( $this->description ) {\n\t\t\t\t// you can instructions for test mode, I mean test card numbers etc.\n\t\t\t\tif ( $this->testmode ) {\n\t\t\t\t\t$this->description .= ' TEST MODE ENABLED. In test mode, you can use the card numbers listed in <a href=\"#\" target=\"_blank\" rel=\"noopener noreferrer\">documentation</a>.';\n\t\t\t\t\t$this->description = trim( $this->description );\n\t\t\t\t}\n\t\t\t\t// display the description with <p> tags etc.\n\t\t\t\techo wpautop( wp_kses_post( $this->description ) );\n\t\t\t}\n\t\t \n\t\t\t// I will echo() the form, but you can close PHP tags and print it directly in HTML\n\t\t\techo '<fieldset id=\"wc-' . esc_attr( $this->id ) . '-cc-form\" class=\"wc-credit-card-form wc-payment-form\" style=\"background:transparent;\">';\n\t\t \n\t\t\t// Add this action hook if you want your custom payment gateway to support it\n\t\t\tdo_action( 'woocommerce_credit_card_form_start', $this->id );\n\t\t \n\t\t\t// I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc\n\t\t\techo '<div class=\"form-row form-row-wide\"><label>Card Number <span class=\"required\">*</span></label>\n\t\t\t\t<input id=\"misha_ccNo\" type=\"text\" autocomplete=\"off\">\n\t\t\t\t</div>\n\t\t\t\t<div class=\"form-row form-row-first\">\n\t\t\t\t\t<label>Expiry Date <span class=\"required\">*</span></label>\n\t\t\t\t\t<input id=\"misha_expdate\" type=\"text\" autocomplete=\"off\" placeholder=\"MM / YY\">\n\t\t\t\t</div>\n\t\t\t\t<div class=\"form-row form-row-last\">\n\t\t\t\t\t<label>Card Code (CVC) <span class=\"required\">*</span></label>\n\t\t\t\t\t<input id=\"misha_cvv\" type=\"password\" autocomplete=\"off\" placeholder=\"CVC\">\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>';\n\t\t \n\t\t\tdo_action( 'woocommerce_credit_card_form_end', $this->id );\n\t\t \n\t\t\techo '<div class=\"clear\"></div></fieldset>';\n\t\t \n\t\t}", "title": "" }, { "docid": "e2bab51300b990213434f97444245ac4", "score": "0.6141035", "text": "public function renderPaymentView()\n {\n $formType = $this->formFactory->create('pagosonline_view');\n\n $this->environment->display('PagosonlineBundle:Pagosonline:view.html.twig', array(\n 'pagosonline_form' => $formType->createView(),\n ));\n\n }", "title": "" }, { "docid": "e3ccde000593f9550aab32100f63fc5a", "score": "0.61397564", "text": "public function payment_fields() {\n\t\t\tif ( $this->description ) {\n\t\t\t\techo wpautop( wptexturize( $this->description ) );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "afec398d69ef7584858cf99b0018bc58", "score": "0.61395264", "text": "public function admin_options() {\n\t\t// Make sure to empty the log file if not in test mode.\n\t\tif ( $this->settings['testmode'] != 'yes' ) {\n\t\t\t$this->log( '' );\n\t\t\t$this->log( '', true );\n\t\t}\n\n \t?>\n \t<h3><?php _e( 'PayFast', 'woothemes' ); ?></h3>\n \t<p><?php printf( __( 'PayFast works by sending the user to %sPayFast%s to enter their payment information.', 'woothemes' ), '<a href=\"http://payfast.co.za/\">', '</a>' ); ?></p>\n\n \t<?php\n \tif ( 'ZAR' == get_option( 'woocommerce_currency' ) ) {\n \t\t?><table class=\"form-table\"><?php\n\t\t\t// Generate the HTML For the settings form.\n \t\t$this->generate_settings_html();\n \t\t?></table><!--/.form-table--><?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'woothemes' ); ?></strong> <?php echo sprintf( __( 'Choose South African Rands as your store currency in <a href=\"%s\">Pricing Options</a> to enable the PayFast Gateway.', 'woocommerce' ), admin_url( '?page=woocommerce&tab=catalog' ) ); ?></p></div>\n\t\t<?php\n\t\t} // End check currency\n\t\t?>\n \t<?php\n }", "title": "" }, { "docid": "98c78f51a3645832162663501a2017c6", "score": "0.6137272", "text": "public function payModules()\n {\n $payments = Mage::getSingleton('payment/config')->getActiveMethods();\n\t$methods = array(array('value'=>'', 'label'=>Mage::helper('adminhtml')->__('--Please Select--')));\n\tforeach ($payments as $paymentCode=>$paymentModel) {\n $paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');\n $methods[$paymentCode] = array(\n 'label' => $paymentTitle,\n 'value' => $paymentCode,\n );\n }\n echo '<pre>';\n print_r($methods);\n echo '</pre>';\n\n }", "title": "" }, { "docid": "80ceffcbe3f875d395d364f046a73d3e", "score": "0.6118132", "text": "public function displayPaymentReturn()\n {\n if (Validate::isUnsignedId($this->id_order) && Validate::isUnsignedId($this->id_module)) {\n $params = array();\n $order = new Order($this->id_order);\n $currency = new Currency($order->id_currency);\n\n if (Validate::isLoadedObject($order)) {\n $params['total_to_pay'] = $order->getOrdersTotalPaid();\n $params['currency'] = $currency->sign;\n $params['objOrder'] = $order;\n $params['currencyObj'] = $currency;\n\n return Hook::exec('displayPaymentReturn', $params, $this->id_module);\n }\n }\n return false;\n }", "title": "" }, { "docid": "a684b019d6c3036a88f3515889675c7e", "score": "0.6113089", "text": "function getPaymentHTML() {\n\t\t\n\t\tif ($GLOBALS['xoopsModuleConfig']['feecomphensate']) {\n\t\t\t$invoice_transaction_handler = xoops_getmodulehandler('invoice_transactions', 'xpayment');\n\t\t\t$feepercentile = $invoice_transaction_handler->getFeePercentile('paypal', $this->_invoice->getVar('grand'))/100;\n\t\t\t$html .= '<div>'._XPY_MF_FEE.number_format(($this->_invoice->getVar('grand')*$feepercentile),2).' '.$this->_invoice->getVar('currency').'</div>';\n\t\t\t$handling = ($this->_invoice->getVar('grand')*$feepercentile);\n\t\t}\n\t\t\n\t\t$html .= '<div>'._XPY_MF_TOTAL.number_format($handling+$this->_invoice->getVar('grand'),2).' '.$this->_invoice->getVar('currency').'</div><br/>';\n\t\t\n\t\tif ($this->_gateway->getVar('testmode')==true)\n\t\t\t$html .= '<form action=\"'.$this->_gateway->_options['sandbox'].'\" name=\"gateway\" id=\"gateway\" method=\"post\">';\n\t\telse \n\t\t\t$html .= '<form action=\"'.$this->_gateway->_options['url'].'\" name=\"gateway\" id=\"gateway\" method=\"post\">';\n\n\t\t$html .= '<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">';\n\t\t$html .= '<input type=\"hidden\" name=\"no_note\" value=\"1\">';\n\t\t$html .= '<input type=\"hidden\" name=\"return\" value=\"'.XOOPS_URL.'/modules/xpayment/return.php\">';\n\t\t$html .= '<input type=\"hidden\" name=\"cancel_url\" value=\"'.XOOPS_URL.'/modules/xpayment/cancel.php\">';\n\t\t$html .= '<input type=\"hidden\" name=\"notify_url\" value=\"'.XOOPS_URL.'/modules/xpayment/ipn.php\">';\n\t\t$html .= '<input type=\"hidden\" name=\"image_url\" value=\"'.$this->_gateway->_options['image'].'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"currency_code\" value=\"'.$this->_invoice->getVar('currency').'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"custom\" value=\"'.$this->calcCustom().'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"invoice\" value=\"'.$this->_invoice->getVar('iid').'-'.substr(md5(XOOPS_LICENSE_KEY.date('Ymdhmi')),mt_rand(0,28),3).'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"business\" value=\"'.$this->_gateway->_options['email'].'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"weight_unit\" value=\"'.$this->_invoice->getVar('weight_unit').'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"weight\" value=\"'.$this->_invoice->getVar('weight').'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"item_number\" value=\"'.strtoupper($this->_invoice->getVar('items').substr(md5($this->_invoice->getVar('iid')),0,2).substr(md5($this->_invoice->getVar('iid')),29,2)).'\">';\n\t\t$invoice_items_handler = xoops_getmodulehandler('invoice_items', 'xpayment');\n\t\tif ($invoice_items_handler->getCount(new Criteria('iid', $this->_invoice->getVar('iid')))==1) {\n\t\t\t$items = $invoice_items_handler->getObjects(new Criteria('iid', $this->_invoice->getVar('iid')), false);\n\t\t\tif (is_object($items[0]))\n\t\t\t\t$html .= '<input type=\"hidden\" name=\"item_name\" value=\"'.$items[0]->getVar('cat').' : '.$items[0]->getVar('name').'\">';\n\t\t\telse \n\t\t\t\t$html .= '<br/>'._XPY_MF_ITEMNAME.'<input type=\"text\" size=\"25\" maxlen=\"128\" name=\"item_name\" value=\"'.$this->_invoice->getVar('items')._XPY_PAYPAL_LINEITEMSDRAWNBY.$this->_invoice->getVar('drawfor').'\"><br/>';\n\t\t} else {\n\t\t\t$html .= '<br/>'._XPY_MF_ITEMNAME.'<input type=\"text\" size=\"25\" maxlen=\"128\" name=\"item_name\" value=\"'.$this->_invoice->getVar('items')._XPY_PAYPAL_LINEITEMSDRAWNBY.$this->_invoice->getVar('drawfor').'\"><br/>';\n\t\t}\n\t\t$html .= '<input type=\"hidden\" name=\"amount\" value=\"'.number_format($this->_invoice->getVar('amount'), 2).'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"shipping\" value=\"'.number_format($this->_invoice->getVar('shipping'),2).'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"handling\" value=\"'.number_format($this->_invoice->getVar('handling')+$handling, 2).'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"tax\" value=\"'.number_format($this->_invoice->getVar('tax'),2).'\">';\n\t\t$html .= '<br/><input type=\"submit\" value=\"'.$this->_gateway->_options['paywith'].'\">';\n\t\t$html .= '</form>';\n\t\t\n\t\treturn $html;\n\t\t\n\t}", "title": "" }, { "docid": "b7d0476a925ef55ea279cb68d47310ed", "score": "0.6112943", "text": "function payment_fields() {\n \tif ( isset( $this->settings['description'] ) && ( '' != $this->settings['description'] ) ) {\n \t\techo wpautop( wptexturize( $this->settings['description'] ) );\n \t}\n }", "title": "" }, { "docid": "341289a7d76a16d4faed8fbdf24f918b", "score": "0.6104715", "text": "function plgVmOnShowOrderBEPayment($virtuemart_order_id, $virtuemart_payment_id) { \n if (!($this->_currentMethod = $this->selectedThisByMethodId($virtuemart_payment_id))) {\n return NULL; // Another method was selected, do nothing\n }\n if (!($paymentTable = $this->getDataByOrderId($virtuemart_order_id))) {\n return NULL;\n }\n \n $user = JFactory::getUser(); \n VmConfig::loadJLang('com_virtuemart');\n\n $db = JFactory::getDBO();\n $q1 = 'SELECT * FROM `#__virtuemart_orders` where virtuemart_order_id = ' . $virtuemart_order_id;\n $db->setQuery($q1);\n $ship = $db->loadObjectList ();\n $shipment = $ship[0]->order_shipment;\n $shipmenttax = $ship[0]->order_shipment_tax;\n $total_ship_amount = $shipment + $shipmenttax;\n $obcurr = CurrencyDisplay::getInstance();\n \n $resObj = unserialize($paymentTable->response_obj);\n $html = '<table class=\"adminlist table\">' . \"\\n\";\n $html .= $this->getHtmlHeaderBE();\n $html .= $this->getHtmlRowBE('COM_VIRTUEMART_PAYMENT_NAME', self::getPaymentName($virtuemart_payment_id));\n $html .= $this->getHtmlRowBE('VELOCITY_PAYMENT_ORDER_TOTAL', $resObj['Amount'] . \" \" . self::VELOCITY_DEFAULT_PAYMENT_CURRENCY);\n $html .= $this->getHtmlRowBE('VELOCITY_COST_PER_TRANSACTION', $resObj['FeeAmount']);\n $html .= $this->getHtmlRowBE('VMPAYMENT_VELOCITY_CASH_BACK_AMOUNT', $resObj['CashBackAmount']);\n $html .= $this->getHtmlRowBE(vmText::sprintf('VMPAYMENT_VELOCITY_REFUND_LINK','JavaScript:void(0)'), '');\n $html .= $this->getHtmlRowBE(vmText::sprintf('VMPAYMENT_VELOCITY_REFUND_BLOCK', str_replace('administrator/' , '', JURI::base()) . 'plugins/vmpayment/velocity/velocityRefund.php', $virtuemart_order_id, $user->id, $obcurr->roundForDisplay($total_ship_amount), self::VELOCITY_DEFAULT_PAYMENT_CURRENCY));\n \n $code = \"velocity_response_\";\n foreach ($paymentTable as $key => $value) {\n if (substr($key, 0, strlen($code)) == $code) {\n $html .= $this->getHtmlRowBE($key, $value);\n }\n }\n $html .= '</table>' . \"\\n\";\n return $html;\n }", "title": "" }, { "docid": "3043c9f883b3b4528a0248047ade11cf", "score": "0.6081689", "text": "public function __construct ()\n {\n\n $this->id = 'mobilemoney'; // payment gateway plugin ID\n $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\n $this->has_fields = true; // in case you need a custom credit card form\n $this->method_title = 'Mobile Money Gateway';\n $this->method_description = 'Description of mobile money payment gateway'; // will be displayed on the options page\n\n // gateways can support subscriptions, refunds, saved payment methods,\n // but in this tutorial we begin with simple payments\n $this->supports = [\n 'products'\n ];\n\n // Method with all the options fields\n $this->init_form_fields();\n\n // Load the settings.\n $this->init_settings();\n $this->title = $this->get_option('title');\n $this->description = $this->get_option('description');\n $this->enabled = $this->get_option('enabled');\n $this->testmode = 'yes' === $this->get_option('testmode');\n $this->private_key = $this->testmode ? $this->get_option('test_private_key') : $this->get_option('private_key');\n $this->publishable_key = $this->testmode ? $this->get_option('test_publishable_key') : $this->get_option('publishable_key');\n\n // This action hook saves the settings\n add_action('woocommerce_update_options_payment_gateways_' . $this->id, [$this, 'process_admin_options']);\n\n // We need custom JavaScript to obtain a token\n add_action('wp_enqueue_scripts', [$this, 'payment_scripts']);\n\n // You can also register a webhook here\n //add_action( 'woocommerce_api_{webhook name}', array( $this, 'webhook' ) );\n\n }", "title": "" }, { "docid": "9a3195c59836105d5393689dab40ffd6", "score": "0.6079859", "text": "public function option_payments_confirm_form() \n\t{\n\t\tglobal $userpanel; // PHP Globals\r\n\r\n\t\t$CTM_HTML = NULL;\n\t\t$CTM_HTML .= \"\t<script type=\\\"text/javascript\\\">\r\n\t$(function()\r\n\t{\r\n\t\t$(\\\"#confirmNow\\\").click(function()\r\n\t\t{\r\n\t\t\tmessage = \\\"\\\";\r\n\t\t\r\n\t\t\tif($(\\\"#Date\\\").val().length < 1) message += \\\"&raquo; {$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['DateVoid']}<br />\\\\\\n\\\";\r\n\t\t\tif($(\\\"#Hour\\\").val().length < 1) message += \\\"&raquo; {$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['HourVoid']}<br />\\\\\\n\\\";\r\n\t\t\tif($(\\\"#Value\\\").val().length < 1) message += \\\"&raquo; {$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['ValueVoid']}<br />\\\\\\n\\\";\r\n\t\t\tif($(\\\"#Local option:selected\\\").val().length < 1) message += \\\"&raquo; {$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['LocalVoid']}<br />\\\\\\n\\\";\r\n\t\t\t\".(count($userpanel['payments']['confirm_payment']['method_fields']) > 0 ? \"\".$this->loop__option_payments_confirm_form__0x13().\"\" : NULL).\"\r\n\t\t\r\n\t\t\tif(message != \\\"\\\")\r\n\t\t\t{\r\n\t\t\t\tbeginMessage = \\\"<strong>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['VoidMessage']}</strong><br /><br />\\\";\r\n\t\t\t\tCTM.Message(beginMessage+message, 1, \\\"Command\\\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSexy.confirm(\\\"{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['Warning']}\\\", {onComplete : function(setClose)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(setClose)\r\n\t\t\t\t\t\tCTM.AjaxLoad(\\\"?app=core&module=userpanel&option=invoices&section=show&id={$userpanel['payments']['confirm_payment']['invoice_id']}&do=payment&method={$userpanel['payments']['confirm_payment']['method_id']}&write=true\\\",'Command','confirmPayment');\r\n\t\t\t\t}});\r\n\t\t\t}\r\n\t\t});\r\n\t\t$('#file_upload').uploadify(\r\n\t\t{\r\n\t\t\t'buttonText' : \\\"{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Annex']['Button']}\\\",\r\n\t\t\t'uploader' : \\\"{$this->vars['board_url']}{$this->vars['style_dirs']['js']}uploadify/uploadify.swf\\\",\r\n\t\t\t'script' : \\\"{$this->vars['board_url']}?run=uploadify\\\",\r\n\t\t\t'cancelImg' : \\\"{$this->vars['board_url']}{$this->vars['style_dirs']['js']}uploadify/cancel.png\\\",\r\n\t\t\t'folder' : \\\"{$this->settings['WEBDATA']['UPLOADS']['DIRECTORY']['PAYMENT_ANNEX']}\\\",\r\n\t\t\t'fileExt' : '*.jpg;*.jpeg;*.png;*.gif;',\r\n\t\t\t'fileDesc' : 'Images (*.jpg, *.jpeg, *.png, *.gif)',\r\n\t\t\t'auto' : false,\r\n\t\t\t'sizeLimit' : \\\"{$this->settings['WEBDATA']['UPLOADS']['FILESIZE']['PAYMENT_ANNEX']}\\\",\r\n\t\t\t'onSelect' : function(event,ID,fileObj)\r\n\t\t\t{\r\n\t\t\t\t$(\\\"#u_sendFile\\\").val(1);\r\n\t\t\t},\r\n\t\t\t'onComplete': function(event, queueID, fileObj, response, data)\r\n\t\t\t{\r\n\t\t\t\t$(\\\"#u_fileUploaded\\\").val(response);\r\n\t\t\t\t\r\n\t\t\t\tCTM.AjaxLoad(\\\"?app=core&module=userpanel&option=invoices&section=show&id={$userpanel['payments']['confirm_payment']['invoice_id']}&do=payment&method={$userpanel['payments']['confirm_payment']['method_id']}&write=true\\\",'Command','confirmPayment');\r\n\t\t\t\t\r\n\t\t\t\t$(\\\"#u_ready\\\").val(1);\r\n\t\t\t},\r\n\t\t\t'onCancel' : function(event,ID,fileObj)\r\n\t\t\t{\r\n\t\t\t\t$(\\\"#u_ready\\\").val(1);\r\n\t\t\t\t$(\\\"#u_sendFile\\\").val(0)\r\n\t\t\t\t$(\\\"#u_fileUploaded\\\").val(\\\"\\\");\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\tfunction startUpload(uploadName, tmp_session)\r\n\t{\r\n\t\t$(\\\"#u_ready\\\").val(0);\r\n\t\t\r\n\t\t$('#file_upload').uploadifySettings('scriptData',{'fileSyntax':'.gif|.png|.jpg|.jpeg','fileName':uploadName,'fileSize':'{$this->settings['WEBDATA']['UPLOADS']['FILESIZE']['PAYMENT_ANNEX']}','tmp_session':tmp_session},false);\r\n\t\t$('#file_upload').uploadifyUpload();\r\n\t}\r\n\t</script>\r\n <div class=\\\"box-content\\\" style=\\\"width: 700px\\\">\r\n \t<div class=\\\"header\\\"><span>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Title']}</span></div>\r\n <p>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['MethodSelected']} <strong>{$userpanel['payments']['confirm_payment']['method_name']}</strong></p>\r\n <form name=\\\"confirmPayment\\\" id=\\\"confirmPayment\\\" class=\\\"frm\\\">\r\n \t<input type=\\\"hidden\\\" name=\\\"u_sendFile\\\" id=\\\"u_sendFile\\\" value=\\\"0\\\" />\r\n <input type=\\\"hidden\\\" name=\\\"u_fileUploaded\\\" id=\\\"u_fileUploaded\\\" value=\\\"\\\" />\r\n <input type=\\\"hidden\\\" name=\\\"u_ready\\\" id=\\\"u_ready\\\" value=\\\"1\\\" />\r\n \r\n <h3>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['Title']}</h3>\r\n <table width=\\\"100%\\\" border=\\\"0\\\" class=\\\"tableBackColumn\\\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['Date']}</td>\r\n\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"Date\\\" id=\\\"Date\\\" value=\\\"Ex: 01/01/\\\" onfocus=\\\"CTM.clearField(this)\\\" /></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['Hour']}</td>\r\n\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"Hour\\\" id=\\\"Hour\\\" value=\\\"Ex: 00:00\\\" onfocus=\\\"CTM.clearField(this)\\\" /></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['Value']}</td>\r\n\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"Value\\\" id=\\\"Value\\\" value=\\\"R$ 0,00\\\" onfocus=\\\"CTM.clearField(this)\\\" /></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['Local']}</td>\r\n\t\t\t\t\t<td>\r\n \t<select name=\\\"Local\\\" id=\\\"Local\\\">\r\n <option value=\\\"{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['LocalField']['Attendant']}\\\">{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['LocalField']['Attendant']}</option>\r\n <option value=\\\"{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['LocalField']['ElectronicBox']}\\\">{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['LocalField']['ElectronicBox']}</option>\r\n <option value=\\\"{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['LocalField']['BankTransfer']}\\\">{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['BuyData']['LocalField']['BankTransfer']}</option>\r\n </select>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n \r\n \".(count($userpanel['payments']['confirm_payment']['method_fields']) > 0 ? \"<h3>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['PaymentData']}</h3>\r\n <table width=\\\"100%\\\" border=\\\"0\\\" class=\\\"tableBackColumn\\\">\r\n\t\t\t\t\".$this->loop__option_payments_confirm_form__0x14().\"\r\n\t\t\t</table>\" : NULL).\"\r\n \r\n <h3>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Annex']['Title']}</h3>\r\n <table width=\\\"100%\\\" border=\\\"0\\\" class=\\\"tableBackColumn\\\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td><input id=\\\"file_upload\\\" name=\\\"file_upload\\\" type=\\\"file\\\" /></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n \r\n <h3>{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Message']}</h3>\r\n <table width=\\\"100%\\\" border=\\\"0\\\" class=\\\"tableBackColumn\\\">\r\n\t\t\t\t<tr align=\\\"center\\\">\r\n\t\t\t\t\t<td><textarea name=\\\"Message\\\" id=\\\"Message\\\" rows=\\\"10\\\" cols=\\\"55\\\"></textarea></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n \r\n <input type=\\\"button\\\" value=\\\"{$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Button']}\\\" id=\\\"confirmNow\\\" class=\\\"btn\\\" />\r\n\t\t</form>\r\n\t</div>\r\n <div id=\\\"Command\\\"></div>\";\n\t\treturn $CTM_HTML;\n\t}", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.60775214", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" }, { "docid": "b00cbf0163ad58437eb4840de210aa5f", "score": "0.6076949", "text": "public function show(Payment $payment)\n {\n\n }", "title": "" }, { "docid": "65d77b059d22994ca5cdcad0c43ac9a4", "score": "0.6048761", "text": "function payment_fields() {\r\n\t\tif ($this->description) echo wpautop(wptexturize($this->description));\r\n\t}", "title": "" }, { "docid": "b124df22b639ce6fae83551297fb8905", "score": "0.60481966", "text": "public function onLoadPaymentWidget()\n {\n $this->vars['paymentWidget'] = $this->paymentWidget;\n return $this->makePartial('$/prestasafe/erp/models/paymenttype/_popup_payment.htm');\n }", "title": "" }, { "docid": "aafd40dfc8fe9ce19ccd14f581d104dd", "score": "0.60350907", "text": "public function admin_options() {\n\t\tparent::admin_options();\n\t\t?>\n\t\t<script>\n\t\t(function($) {\n\t\t\t$(document).ready(function() {\n\t\t\t\tif( $('#woocommerce_mangopay_enabled').is(':checked') ){\n\t\t\t\t\t//enable checkboxes\n\t\t\t\t\tcheckboxSwitch( true );\n\t\t\t\t} else {\n\t\t\t\t\t//disable checkboxes\n\t\t\t\t\tcheckboxSwitch( false );\n\t\t\t\t}\n\t\t\t\t$('#woocommerce_mangopay_enabled').on( 'change', function( e ){\n\t\t\t\t\tcheckboxSwitch($(this).is(':checked'));\n\t\t\t\t});\n\t\t\t\t$('.mp_payment_method.readonly').live('click', function( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t//console.log('clicked');\n\t\t\t\t});\n\t\t\t});\n\t\t\tfunction checkboxSwitch( current ) {\n\t\t\t\t//console.log( current );\n\t\t\t\tif( current ) {\n\t\t\t\t\t//console.log( 'yes' );\n\t\t\t\t\t$('.mp_payment_method').removeAttr('readonly').removeClass('readonly');\n\t\t\t\t} else {\n\t\t\t\t\t//console.log( 'no' );\n\t\t\t\t\t$('.mp_payment_method').attr('readonly', true).addClass('readonly');\n\t\t\t\t}\n\t\t\t}\n\t\t})( jQuery );\n\t\t</script>\n\t\t<?php\n\t}", "title": "" }, { "docid": "6f4e3d76cba61e4793991f52ae98037c", "score": "0.60300404", "text": "public function display_payment_form($amount, $user, $product_id, $transaction_id) {\n\n\n\n\n $payment_vars = isset($_REQUEST['tranzila_payment_args'])?$_REQUEST['tranzila_payment_args']:array();\n\n if(empty($payment_vars)) {\n echo '<p id=\"tranzila_oops_message\">';\n _ex('Woops, someting went wrong. Please try your purchase again.', 'ui', 'memberpress');\n echo '</p>';\n }\n\n //Show a message?\n ?>\n <p id=\"tranzila_redirecting_message\"><img src=\"<?php echo includes_url('js/thickbox/loadingAnimation.gif'); ?>\" width=\"250\" />\n <br/>\n <?php _ex('You are being redirected to Tranzila.. please wait', 'ui', 'memberpress'); ?></p>\n <?php\n $page_url = $this->settings->tranzila_page_url.$this->settings->terminal_name.\"/\";\n //Output the form YO\n echo '<form id=\"mepr_tranzila_form\" action=\"'.$page_url.'\" method=\"post\">';\n foreach($payment_vars as $key => $val) {\n\n ?>\n\n <input type=\"hidden\" name=\"<?php echo $key; ?>\" value=\"<?php echo esc_attr($val); ?>\" />\n <?php\n\n }\n echo '</form>';\n\n //Javascript to force the form to submit\n ?>\n <script type=\"text/javascript\">\n setTimeout(function() {\n document.getElementById(\"mepr_tranzila_form\").submit();\n }, 1000); //Let's wait one second to let some stuff load up\n </script>\n <?php\n }", "title": "" }, { "docid": "f75cecd1271d806603e3c1afb682e8c3", "score": "0.6024274", "text": "public static function make_payment_button() {\n\t\t// Return early if cart total is <= 0\n\t\t// @link https://github.com/wp-plugins/ithemes-exchange/blob/1.11.8/core-addons/transaction-methods/paypal-standard/init.php#L359-L362\n\t\t// @link https://github.com/wp-plugins/ithemes-exchange/blob/1.11.8/api/cart.php#L781-L809\n\t\t$cart_total = it_exchange_get_cart_total( false );\n\t\tif ( $cart_total <= 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Cart total > 0\n\t\t$payment_form = '';\n\n\t\t$gateway = Plugin::get_gateway( self::get_gateway_configuration_id() );\n\n\t\tif ( $gateway ) {\n\t\t\t$gateway->set_payment_method( self::get_gateway_payment_method() );\n\n\t\t\t$payment_form .= '<form action=\"' . it_exchange_get_page_url( 'transaction' ) . '\" method=\"post\">';\n\t\t\t$payment_form .= '<input type=\"hidden\" name=\"it-exchange-transaction-method\" value=\"' . self::$slug . '\" />';\n\t\t\t$payment_form .= $gateway->get_input_html();\n\t\t\t$payment_form .= wp_nonce_field( 'pronamic-ideal-checkout', '_pronamic_ideal_nonce', true, false );\n\t\t\t$payment_form .= '<input type=\"submit\" name=\"pronamic_ideal_process_payment\" value=\"' . self::get_gateway_button_title() . '\" />';\n\t\t\t$payment_form .= '</form>';\n\t\t}\n\n\t\treturn $payment_form;\n\t}", "title": "" }, { "docid": "e55facb6fae373bb33e36c764ed437be", "score": "0.6018817", "text": "public function admin_options()\n {\n echo '<h3>'.__('SALT Payments Gateway', 'tech').'</h3>';\n echo '<p>'.__('SALT Payments: Simple, secure, and frictionless commerce').'</p>';\n echo '<table class=\"form-table\">';\n $this->generate_settings_html();\n echo '</table>';\n\n }", "title": "" }, { "docid": "43284792ae06f96f56aaf87f4b356b07", "score": "0.60167664", "text": "public function displayPaymentReturn()\n\t{\n\t\t$params = $this->displayHook();\n\n\t\tif ($params && is_array($params))\n\t\t\treturn Hook::exec('displayPaymentReturn', $params, (int)$this->id_module);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b92ff724598c7d991d78b3f4efbad019", "score": "0.6015929", "text": "public function show(PaymentMethod $paymentMethod)\n {\n\n }", "title": "" }, { "docid": "8b29bb1fc286908dbfbf376f74b013c0", "score": "0.60105217", "text": "function field_gateway($args) {\n $options = get_option($args['tab_key']);?>\n\n <input type=\"hidden\" name=\"<?php echo $args['tab_key']; ?>[<?php echo $args['key']; ?>]\" value=\"<?php echo $args['key']; ?>\" />\n\n <select name=\"<?php echo $args['tab_key']; ?>[<?php echo $args['key'] . \"_payment_method\"; ?>]\" >';\n <option value=\"\"<?php if(isset($options[$args['key'] . \"_payment_method\"]) && $options[$args['key'] . \"_payment_method\"] == ''){echo 'selected=\"selected\"';}?>>Välj nedan</option>\n <option value=\"CARD\"<?php if(isset($options[$args['key'] . \"_payment_method\"]) && $options[$args['key'] . \"_payment_method\"] == 'CARD'){echo 'selected=\"selected\"';}?>>Kortbetalning</option>\n <option value=\"BANK\"<?php if(isset($options[$args['key'] . \"_payment_method\"]) && $options[$args['key'] . \"_payment_method\"] == 'BANK'){echo 'selected=\"selected\"';}?>>Bankgiro/Postgiro</option>\n </select>\n <?php\n $str = '';\n if(isset($options[$args['key'] . \"_book_keep\"])){\n if($options[$args['key'] . \"_book_keep\"] == 'on'){\n $str = 'checked = checked';\n }\n }\n ?>\n <span>Bokför automatiskt: </span>\n <input type=\"checkbox\" name=\"<?php echo $args['tab_key']; ?>[<?php echo $args['key'] . \"_book_keep\"; ?>]\" <?php echo $str; ?> />\n\n <?php\n }", "title": "" }, { "docid": "b20e484d58c1f59d5310072d17e209c6", "score": "0.5994438", "text": "function products_merchant_option_display() {\n\t$defaults = products_get_defaults();\n\t$options = get_option( 'ap_products_settings', $defaults );\n\t?>\n\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Merchant', 'products' ); ?></th>\n\t\t<td>\n\t\t\t<select name=\"ap_products_settings[products-merchant]\" id=\"merchant\">\n\t\t\t<?php\n\t\t\t\t$selected = $options['products-merchant'];\n\t\t\t\tforeach ( products_merchant_options() as $option ) {\n\t\t\t\t\t$label = $option['label'];\n\t\t\t\t\t$value = $option['value'];\n\t\t\t\t\techo '<option value=\"' . $value . '\" ' . selected( $selected, $value ) . '>' . $label . '</option>';\n\t\t\t\t} ?>\n\t\t\t</select><br />\n\t\t\t<label class=\"description\" for=\"ap_products_settings[products-merchant]\"><?php _e( 'Select which merchant you will be using for your purchases.', 'products' ); ?></label>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "title": "" }, { "docid": "f145ac8ecd1f353314bd3ae7c918ed80", "score": "0.5993039", "text": "public function payment_fields() {\n\n\t\tif ( $this->supports_payment_form() ) {\n\n\t\t\t$this->get_payment_form_instance()->render();\n\n\t\t} else {\n\n\t\t\tparent::payment_fields();\n\t\t}\n\t}", "title": "" }, { "docid": "a86d3760b036aa400e17fc5e90bec881", "score": "0.59916115", "text": "public function renderPaymentScripts()\n {\n $this->environment->display('PagosonlineBundle:Pagosonline:scripts.html.twig', array(\n 'currency' => $this->paymentBridgeInterface->getCurrency(),\n ));\n }", "title": "" }, { "docid": "a36ef4888086f0fe31c698561eef6c97", "score": "0.5988405", "text": "function hookPayment($params) \t{\n\t\tglobal $smarty;\n\t\t\n\t\t$smarty->assign(array('this_path' => $this->_path, 'this_path_ssl' => Configuration::get('PS_FO_PROTOCOL').$_SERVER['HTTP_HOST'].__PS_BASE_URI__.\"modules/{$this->name}/\"));\n\t\t\n\t\treturn $this->display(__FILE__, 'payment.tpl');\n\t}", "title": "" }, { "docid": "cb171347f814b6cdec2e567779ba69fa", "score": "0.5985903", "text": "public function ShowPaymentPage()\n {\n $content = PaymentPage::first();\n\n return view('backend.backend-pages.other.admin-payment', [\n 'content' => $content,\n ]);\n }", "title": "" }, { "docid": "aecc3b04f2aa5deccccd6f860ae7edce", "score": "0.5959197", "text": "public function __construct() {\n\n\n \t\t\t$this->id = 'moowpg'; // payment gateway plugin ID\n\t\t\t$this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\n\t\t\t$this->has_fields = true; // in case you need a custom credit card form\n\t\t\t$this->method_title = 'My Own Woocommerce Payment Gateway';\n\t\t\t$this->method_description = 'Take credit card payments on your store.'; // will be displayed on the options page\n\t\t \n\t\t\t// gateways can support subscriptions, refunds, saved payment methods,\n\t\t\t// but in this tutorial we begin with simple payments\n\t\t\t$this->supports = array(\n\t\t\t\t'products'\n\t\t\t);\n\t\t \n\t\t\t// Method with all the options fields\n\t\t\t$this->init_form_fields();\n\t\t \n\t\t\t// Load the settings.\n\t\t\t$this->init_settings();\n\t\t\t$this->title = $this->get_option( 'title' );\n\t\t\t$this->description = $this->get_option( 'description' );\n\t\t\t$this->enabled = $this->get_option( 'enabled' );\n\t\t\t$this->testmode = 'yes' === $this->get_option( 'testmode' );\n\t\t\t$this->private_key = $this->testmode ? $this->get_option( 'test_private_key' ) : $this->get_option( 'private_key' );\n\t\t\t$this->publishable_key = $this->testmode ? $this->get_option( 'test_publishable_key' ) : $this->get_option( 'publishable_key' );\n\t\t \n\t\t\t// This action hook saves the settings\n\t\t\tadd_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n\t\t \n\t\t\t// We need custom JavaScript to obtain a token\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );\n\t\t \n\t\t\t// You can also register a webhook here\n\t\t\t// add_action( 'woocommerce_api_{webhook name}', array( $this, 'webhook' ) );\n \n\t\t\n \n \t\t}", "title": "" }, { "docid": "3eabbc0a81085adf15d7d3db2be05197", "score": "0.5955395", "text": "public function meta_box_payment()\n\t\t{\n\t\t\tglobal $post, $woocommerce;\t\n\t\t\t$order = new WC_QuickPay_Order( $post->ID );\t\n\t\t\t\n\t\t\t$transaction_id\t= $order->get_transaction_id();\n\n\t\t\tif( $transaction_id )\n\t\t\t{\t\n\t\t\t\ttry \n\t\t\t\t{\n // Subscription\n if( $order->contains_subscription() ) \n {\n $transaction = new WC_QuickPay_API_Subscription();\n $transaction->get( $transaction_id );\n $status = $transaction->get_current_type() . ' (' . __( 'subscription', 'woo-quickpay' ) . ')';\n }\n // Payment\n else\n {\n $transaction = new WC_QuickPay_API_Payment();\n $transaction->get( $transaction_id ); \n $status = $transaction->get_current_type();\n }\n\t\t\t\t\t\n\n\t\t\t\t\techo \"<p class=\\\"woocommerce-quickpay-{$status}\\\"><strong>\" . __( 'Current payment state', 'woo-quickpay' ) . \": \" . $status . \"</strong></p>\";\n\n if( $transaction->is_action_allowed( 'standard_actions' ) ) \n {\n echo \"<h4><strong>\" . __( 'Standard actions', 'woo-quickpay' ) . \"</strong></h4>\";\n echo \"<ul class=\\\"order_action\\\">\";\n\n if( $transaction->is_action_allowed( 'capture' ) ) {\n echo \"<li class=\\\"left\\\"><a class=\\\"button\\\" data-action=\\\"capture\\\" data-confirm=\\\"\". __( 'You are about to CAPTURE this payment', 'woo-quickpay' ) . \"\\\">\" . __( 'Capture', 'woo-quickpay' ) . \"</a></li>\";\n }\n\n if( $transaction->is_action_allowed( 'cancel' ) ) {\n echo \"<li class=\\\"right\\\"><a class=\\\"button\\\" data-action=\\\"cancel\\\" data-confirm=\\\"\". __( 'You are about to CANCEL this payment', 'woo-quickpay' ) . \"\\\">\" . __( 'Cancel', 'woo-quickpay' ) . \"</a></li>\";\t\t\t\t\t\n }\n\n echo\t\"<li>&nbsp;</li>\";\n echo \"</ul>\";\t\t\t\n\n\n echo \"<br />\";\n }\n\n\t\t\t\t\tif( WC_QuickPay_Helper::option_is_enabled( $this->s( 'quickpay_splitcapture' ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$currency = $this->get_gateway_currency( $order );\n\n\t\t\t\t\t\tif( $api->is_action_allowed( 'splitcapture', $state ) AND $balance < WC_QuickPay_Helper::price_multiply( $order->get_total() ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<div class=\\\"quickpay-split-container\\\">\";\n\t\t\t\t\t\t\t\techo \"<h4><strong>\" . __( 'Split payment', 'woo-quickpay' ) . \"</strong></h4>\";\n\t\t\t\t\t\t\t\techo \"<div class=\\\"totals_groups\\\">\";\n\t\t\t\t\t\t\t\t\techo \"<h4><span class=\\\"inline_total\\\">{$currency}</span>\" . __( 'Currency', 'woo-quickpay' ) . \"</h4>\";\n\t\t\t\t\t\t\t\t\techo \"<h4><span class=\\\"quickpay-balance inline_total\\\">\" . WC_QuickPay_Helper::price_normalize( $balance ) .\"</span>\" . __( 'Balance', 'woo-quickpay' ) . \"</h4>\";\n\t\t\t\t\t\t\t\t\techo \"<h4><span class=\\\"quickpay-remaining inline_total\\\">\" . WC_QuickPay_Helper::price_normalize( WC_QuickPay_Helper::price_multiply( $order->get_total() ) - $balance ) .\"</span>\" . __( 'Remaining', 'woo-quickpay' ) . \"</h4>\";\n\t\t\t\t\t\t\t\t\techo \"<h4><span class=\\\"quickpay-remaining inline_total\\\"><input type=\\\"text\\\" style=\\\"width:50px;text-align:right;\\\" id=\\\"quickpay_split_amount\\\" name=\\\"quickpay_split_amount\\\" /></span><strong>\" . __( 'Amount to capture', 'woo-quickpay' ) . \"</strong></h4>\";\n\t\t\t\t\t\t\t\techo \"</div>\";\n\n\t\t\t\t\t\t\t\techo \"<ul>\n\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t<span><a id=\\\"quickpay_split_button\\\" data-action=\\\"split_capture\\\" style=\\\"display:none;\\\" class=\\\"button\\\" data-notify=\\\"\", __( 'You are about to SPLIT CAPTURE this payment. This means that you will capture the amount stated in the input field. The payment state will remain open.', 'woo-quickpay' ), \"\\\" href=\\\"\" . admin_url( 'post.php?post={$post->ID}&action=edit&quickpay_action=splitcapture' ) . \"\\\">\" . __( 'Split Capture', 'woo-quickpay' ) . \"</a></span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span><a id=\\\"quickpay_split_finalize_button\\\" data-action=\\\"split_finalize\\\" style=\\\"display:none;\\\" class=\\\"button\\\" data-notify=\\\"\", __( 'You are about to SPLIT CAPTURE and FINALIZE this payment. This means that you will capture the amount stated in the input field and that you can no longer capture money from this transaction.', 'woo-quickpay' ), \"\\\" href=\\\"\" . admin_url( 'post.php?post={$post->ID}&action=edit&quickpay_action=splitcapture&quickpay_finalize=yes' ) . \"\\\">\" . __( 'Split and finalize', 'woo-quickpay' ) . \"</a></span>\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\techo \"</div>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tprintf('<p><small><strong>%s:</strong> %d</small>', __( 'Transaction ID', 'woo-quickpay'), $transaction_id );\n\n\t\t\t\t\t$transaction_order_id = $order->get_transaction_order_id();\n\t\t\t\t\tif( isset( $transaction_order_id ) && ! empty( $transaction_order_id) ) {\n\t\t\t\t\t\tprintf('<p><small><strong>%s:</strong> %s</small>', __( 'Transaction Order ID', 'woo-quickpay'), $transaction_order_id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch( QuickPay_API_Exception $e ) \n\t\t\t\t{\n\t\t\t\t\t$e->write_to_logs();\n\t\t\t\t\t$e->write_standard_warning();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Show payment ID and payment link for orders that have not yet\n\t\t\t// been paid. Show this information even if the transaction ID is missing.\n\t\t\t$payment_id = $order->get_payment_id();\n\t\t\tif( isset( $payment_id ) && ! empty( $payment_id ) ) {\n\t\t\t\tprintf('<p><small><strong>%s:</strong> %d</small>', __( 'Payment ID', 'woo-quickpay'), $payment_id);\n\t\t\t}\n\n\t\t\t$payment_link = $order->get_payment_link();\n\t\t\tif( isset( $payment_link ) && ! empty( $payment_link )) {\n\t\t\t\tprintf('<p><small><strong>%s:</strong> <br /><input type=\"text\" style=\"%s\"value=\"%s\" readonly /></small></p>', __( 'Payment Link', 'woo-quickpay'), 'width:100%', $payment_link);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3779f395c23475192f7c761ff3d00a99", "score": "0.5953716", "text": "public function payment_fields()\n {\n\n }", "title": "" }, { "docid": "3a9a31c4aab0e2dcbb89b59cd31f2fcb", "score": "0.59526235", "text": "function KPLCPostpaidMenu() {\n\n //Proceed to enter the merchant's account\n\n $this->EnterMerchantAccountMenu();\n }", "title": "" }, { "docid": "89f30867df304ac874761074b4879a71", "score": "0.59499276", "text": "protected function fcPayoneAddPaymentSpecifics($oPayment, $oForm)\n {\n $blShowContinueButton = false;\n if (!$oForm->getMandate()) {\n $blShowContinueButton = true;\n }\n $this->context->smarty->assign('blFcPayoneShowContinueButton', $blShowContinueButton);\n }", "title": "" }, { "docid": "59499ae64eefc8d29e5809662c6c374c", "score": "0.59455067", "text": "function payment_fields()\n\t\t{\n\t\t\tif($this->description)\n\t\t\t\techo wpautop(wptexturize($this->description));\n\t\t}", "title": "" }, { "docid": "ee6139af3cb3428e8b275bebfee404dd", "score": "0.59432375", "text": "public function payment_fields() {\n\techo apply_filters( 'wc_stripe_description', wpautop(wp_kses_post( wptexturize(trim($this->stripe_description) ) ) ) );\n\t$this->form();\n}", "title": "" }, { "docid": "4b60c1d82283aeebe76f167b743f63bf", "score": "0.59256625", "text": "function uc_payment_method_omnikassa($op, &$order) {\n switch ($op) {\n case 'order-view':\n $node = db_query('SELECT reference, brand, ident FROM {uc_payment_omnikassa} WHERE order_id = :id AND accepted = 1 AND response = 0 ORDER BY received DESC', array(':id' => $order->order_id))->fetchAssoc();\n\n // If we have no node, there are no payments/they all failed.\n if (!$node) {\n $build['#markup'] = t('No succesful payment.');\n }\n else {\n\n // The transaction reference and brand default to \"Unknown\" if... well, unknown.\n if (empty($node['reference'])) {\n $node['reference'] = t('Unknown');\n }\n if (empty($node['brand'])) {\n $node['brand'] = t('Unknown');\n }\n\n // Add the brand (iDeal, VISA, etc).\n $build['#markup'] = t('Paid with @brand', array('@brand' => $node['brand']));\n\n // If applicable, add the masked account number.\n if (!empty($node['ident'])) {\n $build['#markup'] .= '<br />' . t('Account number: @ident', array('@ident' => $node['ident']));\n }\n\n // Add the transaction reference.\n $build['#markup'] .= '<br />' . t('Transaction ID: @reference', array('@reference' => $node['reference']));\n }\n\n // Add the \"show more\" part.\n $num = db_query('SELECT * FROM {uc_payment_omnikassa} WHERE order_id = :id', array(':id' => $order->order_id))->rowCount();\n if ($num > (int)(boolean) $node)\n {\n $build['#markup'] .= '<br />' . l(t('View all transactions'), 'admin/store/orders/' . $order->order_id . '/transactions');\n }\n\n return $build;\n\n case 'settings':\n // The test mode checkbox.\n $form['uc_omnikassa_test'] = array(\n '#type' => 'checkbox',\n '#title' => t('OmniKassa test environment enabled.'),\n '#description' => t('Use the test server, instead of the live server. This can be used to test various situations (failed payments, etc) to see how the module handles this. See the technical document (available from the rabobank website) for more details.'),\n '#default_value' => variable_get('uc_omnikassa_test', TRUE),\n );\n\n // The merchant details. Only shown when NOT in test mode.\n $form['uc_merchant_details'] = array(\n '#type' => 'container',\n '#states' => array(\n 'invisible' => array(\n ':input[name=\"uc_omnikassa_test\"]' => array('checked' => TRUE),\n ),\n ),\n );\n $form['uc_merchant_details']['uc_omnikassa_merchantid'] = array(\n '#type' => 'textfield',\n '#title' => t('OmniKassa merchant id'),\n '#description' => t('The merchant id for the OmniKassa account you want to receive payments.'),\n '#default_value' => variable_get('uc_omnikassa_merchantid', ''),\n );\n $form['uc_merchant_details']['uc_omnikassa_key'] = array(\n '#type' => 'textfield',\n '#title' => t('Secret key'),\n '#description' => t('The secret key of your OmniKassa account.'),\n '#default_value' => variable_get('uc_omnikassa_key', ''),\n );\n $form['uc_merchant_details']['uc_omnikassa_key_version'] = array(\n '#type' => 'textfield',\n '#title' => t('OmniKassa key version'),\n '#description' => t('The key version of your secret key.'),\n '#default_value' => variable_get('uc_omnikassa_key_version', ''),\n );\n\n $form['uc_omnikassa_currency'] = array(\n '#type' => 'select',\n '#title' => t('Currency code'),\n '#description' => t('Transactions can only be processed in one of the listed currencies.'),\n '#options' => array(\n '978' => t('Euro'), \n '840' => t('American Dollar'),\n '756' => t('Swiss Franc'),\n '826' => t('Pound'),\n '124' => t('Canadian Dollar'),\n '392' => t('Yen'),\n '036' => t('Australian Dollar'),\n '578' => t('Norwegian Crown'),\n '752' => t('Swedish Crown'),\n '208' => t('Danish Crown'),\n ), \n '#default_value' => variable_get('uc_omnikassa_currency', '978'),\n );\n $form['uc_omnikassa_payment_methods'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Payment methods'),\n '#description' => t('Which payment methods do you want OmniKassa to provide?'),\n '#options' => array(\n 'IDEAL' => 'iDeal',\n 'MINITIX' => 'MiniTix', \n 'VISA' => 'Visa',\n 'MASTERCARD' => 'MasterCard',\n 'MAESTRO' => 'Maestro',\n 'INCASSO' => 'Automatische Incasso',\n 'ACCEPTGIRO' => 'Acceptgiro',\n 'REMBOURS' => 'Rembours',\n ),\n '#default_value' => variable_get('uc_omnikassa_payment_methods', array('IDEAL', 'MINITIX', 'VISA', 'MASTERCARD', 'MAESTRO')),\n );\n $form['uc_omnikassa_timeout'] = array(\n '#type' => 'textfield',\n '#title' => t('Payment timeout'),\n '#description' => t('After how many minutes do you want the payment to time out?'),\n '#precision' => 1,\n '#minimum' => 1,\n '#maximum' => 60,\n '#default_value' => variable_get('uc_omnikassa_timeout', '10'),\n );\n\n $form['uc_omnikassa_checkout_button'] = array(\n '#type' => 'textfield',\n '#title' => t('Order review submit button text'),\n '#description' => t('Provide OmniKassa specific text for the submit button on the order review page.'),\n '#default_value' => variable_get('uc_omnikassa_checkout_button', t('Submit Order')),\n );\n\n return $form;\n }\n}", "title": "" }, { "docid": "4219c0b54d2be2e813c2331a6e13a6f1", "score": "0.59217316", "text": "function colabs_dashboard_paypal_button($the_id) {\n\tnocache_headers();\n global $wpdb;\n\t\n\n // figure out the number of days this ad was listed for\n \n\t $prun_period = get_option('colabs_prun_period');\n\t\t$order_id = $wpdb->get_var( $wpdb->prepare( \"SELECT id FROM \".$wpdb->prefix.\"colabs_orders WHERE property_id=$the_id;\" ) );\n\t\t$item_name = sprintf( __('Property listing on %s for %s days', 'colabsthemes'), get_bloginfo('name'), $prun_period);\n\t\t$item_number = $wpdb->get_var( $wpdb->prepare( \"SELECT order_key FROM \".$wpdb->prefix.\"colabs_orders WHERE property_id=$the_id;\" ) );\n\t\t$amount = $wpdb->get_var( $wpdb->prepare( \"SELECT cost FROM \".$wpdb->prefix.\"colabs_orders WHERE property_id=$the_id;\" ) );\n\t\t$notify_url = get_bloginfo('url').'/index.php?invoice='.$item_number.'&amp;pid='.$the_id;\n\t\t$return = CL_DASHBOARD_URL.'?oid='.$order_id.'&amp;pid='.$the_id;\n\t\t$cbt = __('Click here to publish your property on','colabsthemes').' '.get_bloginfo('name');\n\t\n\n?>\n\n <form name=\"paymentform\" action=\"<?php if (get_option('colabs_use_paypal_sandbox') == 'true') echo 'https://www.sandbox.paypal.com/cgi-bin/webscr'; else echo 'https://www.paypal.com/cgi-bin/webscr'; ?>\" method=\"post\">\n\n <input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />\n <input type=\"hidden\" name=\"business\" value=\"<?php echo get_option('colabs_property_paypal_email'); ?>\" />\n <input type=\"hidden\" name=\"item_name\" value=\"<?php echo esc_attr( $item_name ); ?>\" /> \n <input type=\"hidden\" name=\"amount\" value=\"<?php echo esc_attr( $amount ); ?>\" />\n <input type=\"hidden\" name=\"no_shipping\" value=\"1\" />\n <input type=\"hidden\" name=\"no_note\" value=\"1\" />\n\t <input type=\"hidden\" name=\"item_number\" value=\"<?php echo esc_attr( $item_number ); ?>\" />\n\t <input type=\"hidden\" name=\"currency_code\" value=\"<?php echo esc_attr( get_option('colabs_property_paypal_currency') ); ?>\" />\n <input type=\"hidden\" name=\"custom\" value=\"<?php echo esc_attr( $the_id ); ?>\" />\n <input type=\"hidden\" name=\"cancel_return\" value=\"<?php echo home_url(); ?>\" />\n <input type=\"hidden\" name=\"return\" value=\"<?php echo esc_attr( $return ); ?>\" />\n <input type=\"hidden\" name=\"rm\" value=\"2\" />\n <input type=\"hidden\" name=\"cbt\" value=\"<?php echo esc_attr( $cbt ); ?>\" />\n <input type=\"hidden\" name=\"charset\" value=\"UTF-8\" />\n\n <?php if ( get_option('colabs_enable_paypal_ipn') == 'yes' ) { ?>\n <input type=\"hidden\" name=\"notify_url\" value=\"<?php echo esc_attr( $notify_url ); ?>\" />\n\t <?php } ?>\n\n <input type=\"image\" src=\"<?php bloginfo('template_directory'); ?>/images/paypal.png\" name=\"submit\" />\n\n </form>\n\n<?php\n}", "title": "" }, { "docid": "b1f52ba49554eaa74b8be8b4921cda72", "score": "0.59188783", "text": "public function payment_fields()\n {\n $nmmSettings = new NMM_Settings(get_option(NMM_REDUX_ID));\n\n $validCryptos = $nmmSettings->get_valid_selected_cryptos();\n\n foreach ($validCryptos as $crypto) {\n $cryptoId = $crypto->get_id();\n\n if ($nmmSettings->hd_enabled($cryptoId)) {\n $mpk = $nmmSettings->get_mpk($cryptoId);\n $hdMode = $nmmSettings->get_hd_mode($cryptoId);\n $hdRepo = new NMM_Hd_Repo($cryptoId, $mpk, $hdMode);\n\n $count = $hdRepo->count_ready();\n\n if ($count < 1) {\n try {\n NMM_Hd::force_new_address($cryptoId, $mpk, $hdMode);\n } catch (\\Exception $e) {\n NMM_Util::log(__FILE__, __LINE__, 'UNABLE TO GENERATE HD ADDRESS FOR ' . $crypto->get_name() . ' ADMIN MUST BE NOTIFIED. REMOVING CRYPTO FROM PAYMENT OPTIONS' . $e->getTraceAsString());\n unset($validCryptos[$cryptoId]);\n }\n }\n }\n }\n\n $selectOptions = $this->get_select_options_for_valid_cryptos($validCryptos);\n\n woocommerce_form_field(\n 'nmm_currency_id',\n array(\n 'type' => 'select',\n 'label' => 'Choose a cryptocurrency',\n 'required' => true,\n 'default' => 'BTC',\n 'options' => $selectOptions,\n )\n );\n }", "title": "" }, { "docid": "b151c633c111422d4bb0757d26184ea0", "score": "0.5907078", "text": "function action_add_payment_methods_available() {\r\n\t$show_payment_methods = get_option( 'show_payment_methods_in_product_page' );\r\n\tif (!empty($show_payment_methods)) {\r\n\t\t$available_payment_methods = WC()->payment_gateways->get_available_payment_gateways();\r\n\t\tif (!empty($available_payment_methods)) {\r\n\t\t\techo '<div>\r\n\t\t\t<p style=\"margin-bottom:0;\"><strong>Mètodes de pagament acceptats:</strong></p>\r\n\t\t\t<ul>';\r\n\t\t\tforeach( $available_payment_methods as $method ) {\r\n\t\t\t\techo '<li>' . $method->title . '</li>';\r\n\t\t\t}\r\n\t\t\techo '</ul>\r\n\t\t\t</div>';\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "e22dc657c16145478937bf4c890dc2f6", "score": "0.59036374", "text": "public function show(Payment_Method $payment_Method)\n {\n //\n }", "title": "" }, { "docid": "84b222fc6b0d9e3fc28b924f393e5993", "score": "0.5885257", "text": "public function admin_options() {\n\t\t?>\n\t\t<h3><?php _e('Authorize.net','woothemes'); ?></h3>\t \t\n \t<p><?php _e( 'Authorize.net works by adding credit card fields on the checkout and then sending the details to Authorize.net for verification.', 'woothemes' ); ?></p>\n \t<table class=\"form-table\">\n \t\t<?php $this->generate_settings_html(); ?>\n\t\t</table><!--/.form-table--> \t\n \t<?php\n }", "title": "" }, { "docid": "c5f14406ebbe119b985ddc88dbc2dde2", "score": "0.58816177", "text": "private function wcGatewayInit() {\n\t\t\n\t\t$form_fields = array();\n\t\t\n\t\t$form_fields['enabled'] = array(\n\t\t\t'title'\t\t=> __( 'Enable/Disable', 'mangopay' ),\n\t\t\t'type'\t\t=> 'checkbox',\n\t\t\t'label'\t\t=> __( 'Enable MANGOPAY Payment', 'mangopay' ),\n\t\t\t'default'\t=> 'yes'\n\t\t);\n\t\t\n\t\t/** Fields to choose available credit card types **/\n\t\t$first = true;\n\t\tforeach( $this->available_card_types as $type=>$label ) {\n\t\t\t$default = 'no';\n\t\t\tif( 'CB_VISA_MASTERCARD'==$type )\n\t\t\t\t$default = 'yes';\n\t\t\t$star = '<span class=\"note star\" title=\"' . __('Needs activation','mangopay') . '\">*</span>';\n\t\t\tif( in_array( $type, $this->default_card_types ) )\n\t\t\t\t$star = '';\n\t\t\t$title = $first?__( 'Choose available credit card types:', 'mangopay' ):'';\n\t\t\tif( 'BANK_WIRE' == $type )\n\t\t\t\t$title = __( 'Choose available direct payment types:', 'mangopay' );\n\t\t\t$form_fields['enabled_' . $type] = array(\n\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t'type'\t\t=> 'checkbox',\n\t\t\t\t'label'\t\t=> sprintf( __( 'Enable %s payment', 'mangopay' ), __( $label, 'mangopay' ) ) . $star,\n\t\t\t\t'default'\t=> $default,\n\t\t\t\t'class'\t\t=> 'mp_payment_method'\n\t\t\t);\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\t$args = array(\n\t\t\t'sort_column' => 'menu_order',\n\t\t\t'sort_order' => 'ASC',\n\t\t);\n\t\t$options = array( NULL=>' ' );\n\t\t$pages = get_pages( $args );\n\t\tforeach( $pages as $page ) {\n\t\t\t$prefix = str_repeat( '&nbsp;', count( get_post_ancestors( $page ) )*3 );\n\t\t\t$options[$page->ID] = $prefix . $page->post_title;\n\t\t}\n\t\t\n\t\t$form_fields['custom_template_page_id'] = array(\n\t\t\t'title'\t\t\t\t=> __( 'Use this page for payment template', 'mangopay' ),\n\t\t\t'description'\t\t=> __( 'The page needs to be secured with https', 'mangopay' ),\n\t\t\t'id'\t\t\t\t=> 'custom_template_page_id',\n\t\t\t'type'\t\t\t\t=> 'select',\n\t\t\t'label'\t\t\t\t=> __( 'Use this page for payment template', 'mangopay' ),\n\t\t\t'default'\t\t\t=> '',\n\t\t\t'class'\t\t\t\t=> 'wc-enhanced-select-nostd',\n\t\t\t'css'\t\t\t\t=> 'min-width:300px;',\n\t\t\t'desc_tip' \t\t\t=> __( 'Page contents:', 'woocommerce' ) . ' [' . apply_filters( 'mangopay_payform_shortcode_tag', 'mangopay_payform' ) . ']',\n\t\t\t'placeholder'\t\t=> __( 'Select a page&hellip;', 'woocommerce' ),\n\t\t\t'options'\t\t\t=> $options,\n\t\t\t'custom_attributes'\t=> array( 'placeholder'\t=> __( 'Select a page&hellip;', 'woocommerce' ) )\n\t\t);\n\n\t\t$this->id\t\t\t\t\t= 'mangopay';\n\t\t$this->icon\t\t\t\t\t= ''; //plugins_url( '/img/card-icons.gif', dirname( __FILE__ ) );\n\t\t$this->has_fields\t\t\t= true;\t\t// Payment on third-party site with redirection\n\t\t$this->method_title\t\t\t= __( 'MANGOPAY', 'mangopay' );\n\t\t$this->method_description\t= __( 'MANGOPAY', 'mangopay' );\n\t\t$this->method_description\t.= '<br/>' . __( 'Payment types marked with a * will need to be activated for your account. Please contact MANGOPAY.', 'mangopay' );\n\t\t$this->title\t\t\t\t= __( 'Online payment', 'mangopay' );\n\t\t$this->form_fields\t\t\t= $form_fields;\n\t\t$this->supports \t\t\t= array( 'refunds' );\t// || default_credit_card_form\n\t}", "title": "" }, { "docid": "49b29aeffda5115b7ffbd0b55860fa57", "score": "0.5879986", "text": "public function show(PaymentMethod $paymentMethod)\n {\n //\n }", "title": "" }, { "docid": "6a5068827d614dacb1b91b70ea3ee4a8", "score": "0.5878534", "text": "function compare_pay_with_bank(){\r\n\t$bank_account_name = compare_get_option( 'bank_account_name' );\r\n\t$bank_name = compare_get_option( 'bank_name' );\r\n\t$bank_account_number = compare_get_option( 'bank_account_number' );\r\n\t$bank_sort_number = compare_get_option( 'bank_sort_number' );\r\n\t$bank_iban_number = compare_get_option( 'bank_iban_number' );\r\n\t$bank_bic_swift_number = compare_get_option( 'bank_bic_swift_number' );\r\n\treturn '<div class=\"alert alert-info no-margin\">\r\n\t\t'.__( 'Make your payment directly into our bank account. Please use your Store name as the payment reference. Your order won’t be processed until the funds have cleared in our account.', 'compare' ).'\r\n\t\t<h4>'.__( 'Our Bank Details', 'compare' ).'</h4>\r\n\t\t'.$bank_account_name.' - '.$bank_name.'\r\n\t\t<ul class=\"list-unstyled list=inline\">\r\n\t\t\t<li>\r\n\t\t\t\t'.__( 'ACCOUNT NUMBER', 'compare' ).':\r\n\t\t\t\t'.$bank_account_number.'\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t\t'.__( 'SORT CODE', 'compare' ).':\r\n\t\t\t\t'.$bank_sort_number.'\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t\t'.__( 'IBAN', 'compare' ).':\r\n\t\t\t\t'.$bank_iban_number.'\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t\t'.__( 'BIC', 'compare' ).':\r\n\t\t\t\t'.$bank_bic_swift_number.'\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\t</div>';\r\n}", "title": "" }, { "docid": "4bb3191a74ba8e8935e58723a3af93a6", "score": "0.58752126", "text": "public function paidPayment()\n {\n }", "title": "" }, { "docid": "78e95c259c6a25ce73b57dc39be812d7", "score": "0.5872703", "text": "public function admin_options() {\n global $woocommerce; ?>\n\n <h3><?php echo $this->method_title; ?></h3>\n <p><?php _e( 'Bring Fraktguiden is a shipping method using Bring.com to calculate rates.', self::TEXT_DOMAIN ); ?></p>\n\n <table class=\"form-table\">\n\n <?php if ( $this->is_valid_for_use() ) :\n $this->generate_settings_html();\n else : ?>\n <div class=\"inline error\"><p>\n <strong><?php _e( 'Gateway Disabled', self::TEXT_DOMAIN ); ?></strong>\n <br/> <?php printf( __( 'Bring shipping method requires <strong>weight &amp; dimensions</strong> to be enabled. Please enable them on the <a href=\"%s\">Catalog tab</a>. <br/> In addition, Bring also requires the <strong>Norweigian Krone</strong> currency. Choose that from the <a href=\"%s\">General tab</a>', self::TEXT_DOMAIN ), 'admin.php?page=woocommerce_settings&tab=catalog', 'admin.php?page=woocommerce_settings&tab=general' ); ?>\n </p></div>\n <?php endif; ?>\n\n </table> <?php\n }", "title": "" }, { "docid": "5b98f4fc3b8b24a69b31626dfcbf4008", "score": "0.586959", "text": "public function payment_fields() {\n\t\t$this->credit_card_form( array( 'fields_have_names' => true ));\n\t}", "title": "" }, { "docid": "9a3b0a1d326965ab7d9a4bbb0ecf9535", "score": "0.58627623", "text": "public function set_paypal_express_checkout(){\n }", "title": "" }, { "docid": "7a246bd33c07731994b90b8f97c31a61", "score": "0.5850387", "text": "function payment_fields() {\n\t\t?>\n\t\t<fieldset>\n\n\t\t\t<p class=\"form-row form-row-first\">\n\t\t\t\t<label for=\"ccnum\"><?php echo __(\"Credit Card number\", 'woocommerce') ?> <span class=\"required\">*</span></label>\n\t\t\t\t<input type=\"text\" class=\"input-text\" id=\"ccnum\" name=\"ccnum\" />\n\t\t\t</p>\n\t\n\t\t\t<p class=\"form-row form-row-last\">\n\t\t\t\t<label for=\"cardtype\"><?php echo __(\"Card type\", 'woocommerce') ?> <span class=\"required\">*</span></label>\n\t\t\t\t<select name=\"cardtype\" id=\"cardtype\" class=\"woocommerce-select\">\n\t\t\t\t\t<?php \n\t\t\t\t foreach($this->cardtypes as $type) :\n\t\t\t\t\t ?>\n\t\t\t\t\t <option value=\"<?php echo $type ?>\"><?php _e($type, 'woocommerce'); ?></option>\n\t\t\t\t <?php\n\t\t\t endforeach;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\n\t\t\t<div class=\"clear\"></div>\n\n\t\t\t<p class=\"form-row form-row-first\">\n\t\t\t\t<label for=\"cc-expire-month\"><?php echo __(\"Expiration date\", 'woocommerce') ?> <span class=\"required\">*</span></label>\n\t\t\t\t<select name=\"expmonth\" id=\"expmonth\" class=\"woocommerce-select woocommerce-cc-month\">\n\t\t\t\t\t<option value=\"\"><?php _e('Month', 'woocommerce') ?></option>\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$months = array();\n\t\t\t\t\t\tfor ($i = 1; $i <= 12; $i++) {\n\t\t\t\t\t\t $timestamp = mktime(0, 0, 0, $i, 1);\n\t\t\t\t\t\t $months[date('n', $timestamp)] = date('F', $timestamp);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($months as $num => $name) {\n\t\t\t\t printf('<option value=\"%u\">%s</option>', $num, $name);\n\t\t\t\t }\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"expyear\" id=\"expyear\" class=\"woocommerce-select woocommerce-cc-year\">\n\t\t\t\t\t<option value=\"\"><?php _e('Year', 'woocommerce') ?></option>\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$years = array();\n\t\t\t\t\t\tfor ($i = date('y'); $i <= date('y') + 15; $i++) {\n\t\t\t\t\t\t printf('<option value=\"20%u\">20%u</option>', $i, $i);\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t<?php if ($this->cvv == 'yes') { ?>\n\t\t\n\t\t\t<p class=\"form-row form-row-last\">\n\t\t\t\t<label for=\"cvv\"><?php _e(\"Card security code\", 'woocommerce') ?> <span class=\"required\">*</span></label>\n\t\t\t\t<input type=\"text\" class=\"input-text\" id=\"cvv\" name=\"cvv\" maxlength=\"4\" style=\"width:45px\" />\n\t\t\t</p>\n\t\t\t<?php } ?>\n\t\t\t\n\t\t\t<div class=\"clear\"></div>\n\t\t</fieldset>\n\t\t<?php \n }", "title": "" }, { "docid": "1a17355b52aad28101d1a48b6a3114c9", "score": "0.5845311", "text": "function uc_omnikassa_uc_payment_method() {\n // Build the title string.\n $title = '<img src=\"' . drupal_get_path('module', 'uc_omnikassa') . '/images/omnikassa.gif\" class=\"uc-omnikassa-cctype\" />';\n $title .= ' ' . t('Rabobank OmniKassa');\n\n // Available payment types.\n $title .= '<br /><span id=\"omnikassa-includes\">' . t('Includes:');\n $payment_types = array_filter(variable_get('uc_omnikassa_payment_methods'));\n foreach ($payment_types as $type) {\n $type = strtolower($type);\n $title .= ' ' . theme('image', array(\n 'path' => drupal_get_path('module', 'uc_omnikassa') . \"/images/$type.gif\",\n 'attributes' => array('class' => array('uc-omnikassa-cctype', \"uc-omnikassa-cctype-$type\")),\n ));\n }\n\n $methods[] = array(\n 'id' => 'omnikassa',\n 'name' => t('OmniKassa'),\n 'title' => $title,\n 'review' => t('OmniKassa'),\n 'desc' => t('Redirect users to submit payments through OmniKassa.'),\n 'callback' => 'uc_payment_method_omnikassa',\n 'redirect' => 'uc_omnikassa_form',\n 'weight' => 1,\n 'checkout' => FALSE,\n 'no_gateway' => TRUE,\n );\n\n return $methods;\n}", "title": "" }, { "docid": "a549b9892198994a47ad33e6d30ea09b", "score": "0.58443844", "text": "public function payment()\n {\n return view('payment');\n }", "title": "" }, { "docid": "372cef9c68427de8b82fb6bb3ec1eef6", "score": "0.58421296", "text": "function paymentBox() {\r\n\t\t$order = new order((int)$_GET['oID']);\r\n\r\n\t\tfor ($i=1; $i<13; $i++) {\r\n \t$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));\r\n\t\t}\r\n\r\n\t\t$today = getdate(); \r\n\r\n\t\tfor($i=$today['year']; $i < $today['year']+10; $i++) {\r\n\t\t\t$expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));\r\n\t\t}\r\n\r\n\t\treturn $this->makeForm(array(array('title' => \"Card Owner Type\",\r\n\t\t\t\t\t\t\t\t\t\t 'field' => tep_draw_pull_down_menu('authnet_cc_type',array(\r\n\t\t\t\t\t\t\t\t\t\t\t\tarray('id'=>'Visa','text'=>'Visa'), \r\n\t\t\t\t\t\t\t\t\t\t\t\tarray('id'=>'MasterCard','text'=>'MasterCard'), \r\n\t\t\t\t\t\t\t\t\t\t\t\tarray('id'=>'Amex','text'=>'Amex'), \r\n\t\t\t\t\t\t\t\t\t\t\t\tarray('id'=>'Discover','text'=>'Discover')\r\n\t\t\t\t\t\t\t\t\t\t\t), (!empty($order->info['cc_type']) ? $order->info['cc_type'] : '')\r\n\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tarray('title' => \"Name On Card\", \r\n\t\t\t\t\t\t\t\t\t\t\t\t 'field' => tep_draw_input_field('authnet_cc_owner', $order->info['cc_owner'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t),\r\n\r\n array('title' => \"Card Number\",\r\n 'field' => tep_draw_input_field('authnet_cc_num', $order->info['cc_number'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t),\r\n\r\n array('title' => \"Card Expiration Date\",\r\n 'field' => tep_draw_pull_down_menu('authnet_exp_month', $expires_month, substr($order->info['cc_expires'], 0, 2)) . '&nbsp;' . tep_draw_pull_down_menu('authnet_exp_year', $expires_year, substr($order->info['cc_expires'], 2, 4))),\r\n array('title' => \"Card Verification Code (CVV)\",\r\n 'field' => tep_draw_input_field('authnet_cvv2')),\r\n\t\t\t\t\t\t\t\t\t));\r\n }", "title": "" }, { "docid": "54881b87d4652ae23cd4af8496bed139", "score": "0.5834794", "text": "public function before_checkout_button(){\n\t $gateway = new static();\n\t if( $gateway->enabled == \"no\" ) return;\n\t // Check if mCASH Express is enabled, if not, return\n\t if( $gateway->express !== \"yes\" ) return;\t \n\t if( $gateway->show_express_on == \"top\" ) return; \n\t echo \"<a class=\\\"mcsh-express-checkout\\\" href=\\\"\" . add_query_arg('wc-api', 'mcash_woocommerce_express') . \"\\\">\" . __('Buy now', 'mcash-woocommerce-plugin') . \"<img src=\\\"\" . MCASH_PLUGIN_URL . \"images/mcashlogo.svg\\\" alt=\\\"mCASH logo\\\" /></a>\"; \n }", "title": "" }, { "docid": "8617b0b5e35d27c0224ca26bff3cfc9f", "score": "0.5832911", "text": "function paynowwebcheckoutmodule_config()\n{\n return array(\n // the friendly display name for a payment gateway should be\n // defined here for backwards compatibility\n 'FriendlyName' => array(\n 'Type' => 'System',\n 'Value' => 'Paynow - Web Checkout',\n ),\n // a text field type allows for single line text input\n 'integrationID' => array(\n 'FriendlyName' => 'Integration ID',\n 'Type' => 'text',\n 'Size' => '5',\n 'Default' => '',\n 'Description' => 'Enter your integration ID here',\n ),\n // a text field type allows for single line text input\n 'integrationKey' => array(\n 'FriendlyName' => 'Integration Key',\n 'Type' => 'text',\n 'Size' => '32',\n 'Default' => '',\n 'Description' => 'Enter your integration key here',\n )\n );\n}", "title": "" }, { "docid": "c8c625da86dc5da4490f3d98cec66570", "score": "0.5821051", "text": "public function getPaymentMode()\n {\n return $this->paymentMode;\n }", "title": "" }, { "docid": "e689bbfe8b8754187f81901cdeb6266b", "score": "0.5812361", "text": "public function configure()\r\n {\r\n $output = '';\r\n\r\n $fields = array(\r\n 'PSFPAY_GATE_ZIBAL_MERCHANT',\r\n 'PSFPAY_GATE_ZIBAL_ACTIVE',\r\n 'PSFPAY_GATE_ZIBAL_DIRECT',\r\n 'PSFPAY_GATE_ZIBAL_TITLE',\r\n 'PSFPAY_GATE_ZIBAL_TEXT_CONFIRM_PAYMENT',\r\n );\r\n\r\n $soption = array(\r\n array(\r\n 'id' => 'active_on',\r\n 'value' => 1,\r\n 'label' => $this->l('Enabled','zibal')\r\n ),\r\n array(\r\n 'id' => 'active_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Disabled','zibal')\r\n )\r\n );\r\n\r\n $result = $this->is_currency();\r\n if ( $result === true ) {\r\n if ( Tools::isSubmit('submit'.$this->module->name) )\r\n {\r\n foreach ($this->configs as $key => $defaultValue)\r\n Configuration::updateValue($key, Tools::getValue($key,$defaultValue), true);\r\n\r\n $output .= $this->displayConfirmation($this->l('تنظیمات با موفقیت به روز شد !','zibal'));\r\n }\r\n } else {\r\n $output .= $result;\r\n Configuration::updateValue('PSFPAY_GATE_ZIBAL_ACTIVE', 0);\r\n }\r\n\r\n $fields_form[0]['form'] = array(\r\n 'legend' => array(\r\n 'title' => $this->l('تنظیمات درگاه زیبال','zibal'),\r\n ),\r\n 'input' => array(\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('وضعیت','zibal'),\r\n 'name' => 'PSFPAY_GATE_ZIBAL_ACTIVE',\r\n 'values' => $soption,\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'label' => $this->l('عنوان درگاه','zibal'),\r\n 'name' => 'PSFPAY_GATE_ZIBAL_TITLE'\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'label' => $this->l('کد مرچنت','zibal'),\r\n 'name' => 'PSFPAY_GATE_ZIBAL_MERCHANT'\r\n ),\r\n array(\r\n 'type' => 'textarea',\r\n 'name' => 'PSFPAY_GATE_ZIBAL_TEXT_CONFIRM_PAYMENT',\r\n 'label' => $this->l('پیام موفق آمیز بودن پرداخت و ثبت سفارش','zibal'),\r\n 'desc' => $this->l('شناسه سفارش: {id_order} ، شماره پیگیری سفارش: {reference_order} ، شماره پیگیری پرداخت: {reference_payment}','zibal'),\r\n 'autoload_rte' \t=> true\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('درگاه مستقیم','zibal'),\r\n 'name' => 'PSFPAY_GATE_ZIBAL_DIRECT',\r\n 'desc' => $this->l('در صورتیکه درگاه مستقیم برای شما فعال باشد این گزینه کارایی دارد','zibal'),\r\n 'values' => $soption,\r\n ),\r\n ),\r\n 'submit' => array(\r\n 'title' => $this->l('Save','zibal'),\r\n 'class' => 'btn btn-default pull-right'\r\n )\r\n );\r\n\r\n $form = new PrestapayForm($this->module);\r\n $form->setFieldsByArray($fields);\r\n\r\n return\t$output.$form->generateForm( $fields_form ).$this->getAds();\r\n }", "title": "" }, { "docid": "e4b9f17cff2527b7f35708a53dc96302", "score": "0.58092254", "text": "function generate_html($purpose = null, $reference = null, $amount = null) {\r\n\t\t$pd_options = get_option($this->plugin_options);\r\n\r\n\t\t// Set overrides for purpose and reference if defined\r\n\t\t$purpose = (!$purpose) ? $pd_options['purpose'] : $purpose;\r\n\t\t$reference = (!$reference) ? $pd_options['reference'] : $reference;\r\n\t\t$amount = (!$amount) ? $pd_options['amount'] : $amount;\r\n\t\t\r\n\t\t# Build the button\r\n\t\t$GTPayment_btn =\t'<form action=\"https://www.gtpayment.com/paymentype.do\" method=\"post\">';\r\n\t\t$GTPayment_btn .=\t'<div class=\"GTPayment-donations\">';\r\n\t\t$GTPayment_btn .=\t'<input type=\"hidden\" name=\"member\" value=\"' .$pd_options['GTPayment_account']. '\" />';\r\n\r\n\t\t// Optional Settings\r\n\t\tif ($pd_options['cancel_page'])\r\n\t\t\t$GTPayment_btn .=\t'<input type=\"hidden\" name=\"ucancel\" value=\"' .$pd_options['cancel_page']. '\" />';\r\n\t\tif ($pd_options['return_page'])\r\n\t\t\t$GTPayment_btn .=\t'<input type=\"hidden\" name=\"ureturn\" value=\"' .$pd_options['return_page']. '\" />'; // Return Page\r\n\t\tif ($purpose)\r\n\t\t\t$GTPayment_btn .=\t'<input type=\"hidden\" name=\"product\" value=\"' .$purpose. '\" />';\t// Purpose\r\n\t\tif ($reference)\r\n\t\t\t$GTPayment_btn .=\t'<input type=\"hidden\" name=\"productid\" value=\"' .$reference. '\" />';\t// LightWave Plugin\r\n\t\tif ($amount)\r\n\t\t\t$GTPayment_btn .= '<input type=\"hidden\" name=\"price\" value=\"' .$amount. '\" />';\r\n\r\n\t\t// More Settings\r\n\t\tif (isset($pd_options['currency_code']))\r\n\t\t\t$GTPayment_btn .= '<input type=\"hidden\" name=\"membercurrency\" value=\"' .$pd_options['currency_code']. '\" />';\r\n\t\tif (isset($pd_options['button_localized']))\r\n\t\t\t{ $button_localized = $pd_options['button_localized']; } else { $button_localized = 'en-US'; }\r\n\t\t\t\r\n\t\t$GTPayment_btn .= '<input type=\"hidden\" name=\"lang\" value=\"' .$button_localized. '\" />';\r\n\t\t// Settings not implemented yet\r\n\t\t//\t\t$GTPayment_btn .= '<input type=\"hidden\" name=\"amount\" value=\"20\" />';\r\n\r\n\t\t// Get the button URL\r\n\t\tif ( $pd_options['button'] == \"custom\" )\r\n\t\t\t$button_url = $pd_options['button_url'];\r\n\t\telse\r\n\t\t\t$button_url = str_replace('en_US', $button_localized, $this->donate_buttons[$pd_options['button']]);\r\n\r\n\t\t$GTPayment_btn .=\t'<input type=\"image\" src=\"' .$button_url. '\" name=\"submit\" alt=\"GTPayment - Global Trading Payment\" />';\r\n\t\t$GTPayment_btn .=\t'</div>';\r\n\t\t$GTPayment_btn .=\t'</form>';\r\n\t\t\r\n\t\treturn $GTPayment_btn;\r\n\t}", "title": "" } ]
707578a441653ca1bc7edecf3d6cb7a6
Identifies if server streams multiple server messages Generated from protobuf field optional bool server_streaming = 6 [default = false];
[ { "docid": "7ca62df0730e0af800c9929245d72d13", "score": "0.6349969", "text": "public function setServerStreaming($var) {}", "title": "" } ]
[ { "docid": "9ca9a926e9c5f2fd8f7c773c87825c46", "score": "0.64154816", "text": "public function getServerStreaming() {}", "title": "" }, { "docid": "044c3d18a8fc7192646d266efa0c9608", "score": "0.6213405", "text": "public function hasStreamingConfig(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "4e990816d2a86304fcd5623907914a4e", "score": "0.60855734", "text": "function useStreaming()\n{\n $params = readConfigParams(array('master_slave_sub_mode'));\n\n if (isMasterSlaveMode() && $params['master_slave_sub_mode'] == 'stream') {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "717b2fa41e13048632887f8fb6546777", "score": "0.5838968", "text": "public function setClientStreaming($var) {}", "title": "" }, { "docid": "0a78d6f4b04e75b1f6141a6f9097349c", "score": "0.57051325", "text": "function serverStreaming($stub)\n{\n $sizes = [31415, 9, 2653, 58979];\n\n $request = new Grpc\\Testing\\StreamingOutputCallRequest();\n $request->setResponseType(Grpc\\Testing\\PayloadType::COMPRESSABLE);\n foreach ($sizes as $size) {\n $response_parameters = new Grpc\\Testing\\ResponseParameters();\n $response_parameters->setSize($size);\n $request->getResponseParameters()[] = $response_parameters;\n }\n\n $call = $stub->StreamingOutputCall($request);\n $i = 0;\n foreach ($call->responses() as $value) {\n hardAssert($i < 4, 'Too many responses');\n $payload = $value->getPayload();\n hardAssert(\n $payload->getType() === Grpc\\Testing\\PayloadType::COMPRESSABLE,\n 'Payload '.$i.' had the wrong type');\n hardAssert(strlen($payload->getBody()) === $sizes[$i],\n 'Response '.$i.' had the wrong length');\n $i += 1;\n }\n hardAssertIfStatusOk($call->getStatus());\n}", "title": "" }, { "docid": "2c3cbb7f4b47bbe777d8599bef88f88c", "score": "0.5519812", "text": "public function getClientStreaming() {}", "title": "" }, { "docid": "9aa43303e26d4fa6ae0770762a252f3d", "score": "0.5199119", "text": "public function hasSink(){\n return $this->_has(16);\n }", "title": "" }, { "docid": "df3fa426fe9f30f10f56871fc6caa352", "score": "0.5087839", "text": "public function setRequestStreaming($var) {}", "title": "" }, { "docid": "6ff65d8c934687d04446b7d04e71811d", "score": "0.5071221", "text": "public function getMessageServer() {\n\t\tif ($servers = $this->servers ?? false) {\n\t\t\t$this->callWorkerFunction([Danmaku::class, 'setDestination'], [$servers]);\n\t\t\t$this->callWorkerFunction([Danmaku::class, 'connect']);\n\t\t}\n\t}", "title": "" }, { "docid": "218f3daff90edd83a629d428b70ba913", "score": "0.5009439", "text": "function clientStreaming($stub)\n{\n $request_lengths = [27182, 8, 1828, 45904];\n\n $requests = array_map(\n function ($length) {\n $request = new Grpc\\Testing\\StreamingInputCallRequest();\n $payload = new Grpc\\Testing\\Payload();\n $payload->setBody(str_repeat(\"\\0\", $length));\n $request->setPayload($payload);\n\n return $request;\n }, $request_lengths);\n\n $call = $stub->StreamingInputCall();\n foreach ($requests as $request) {\n $call->write($request);\n }\n list($result, $status) = $call->wait();\n hardAssertIfStatusOk($status);\n hardAssert($result->getAggregatedPayloadSize() === 74922,\n 'aggregated_payload_size was incorrect');\n}", "title": "" }, { "docid": "e8151b579f81e11c37fe9a0155380b3c", "score": "0.5002472", "text": "function mailForAllMessages($player) {\n if($player->messages_mail > 1) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "e5a9767fae8265d8efc56e9803e8fbbd", "score": "0.49755952", "text": "public function setResponseStreaming($var) {}", "title": "" }, { "docid": "2f9a9b2606aa7a188f1ae8918648fdf7", "score": "0.48215106", "text": "public function hasLastRequestSeqFromServer()\n {\n return $this->last_request_seq_from_server !== null;\n }", "title": "" }, { "docid": "2ba6bb4f5b10f98ae27bfc51676f4ae6", "score": "0.47856027", "text": "public static function isBatchSending()\n {\n /** @var \\Bugsnag\\Client $instance */\n return $instance->isBatchSending();\n }", "title": "" }, { "docid": "5b65b4f876cc0e5eae3bf41b77bdb5ca", "score": "0.4780926", "text": "public function serverUpdate() {\r\n $notifs_count = 0;\r\n $output = \"\";\r\n $notifs = $this->app_model->getNotifications();\r\n if (count($notifs) > 0) {\r\n header(\"Content-Type: text/event-stream\");\r\n header(\"Cache-Control: no-cache\");\r\n header(\"Connection: keep-alive\");\r\n $retry = 60000; //reconnects in 60s \r\n echo \"retry:\" . $retry . \"\\n\";\r\n echo \"data:\" . json_encode($notifs);\r\n echo \"\\n\\n\";\r\n ob_flush();\r\n flush();\r\n }\r\n }", "title": "" }, { "docid": "64aca1efb33941cb15c7b23542ebfacb", "score": "0.47565866", "text": "function beforeWorkerStart(\\swoole_http_server $server)\n {\n $server->on(\"message\",function (\\swoole_websocket_server $server, \\swoole_websocket_frame $frame){\n Logger::console(\"receive data\".$frame->data);\n $server->push($frame->fd,\"you say \".$frame->data);\n });\n $server->on(\"handshake\",function (\\swoole_http_request $request, \\swoole_http_response $response){\n Logger::console(\"handshake\");\n //自定定握手规则,没有设置则用系统内置的(只支持version:13的)\n if (!isset($request->header['sec-websocket-key']))\n {\n //'Bad protocol implementation: it is not RFC6455.'\n $response->end();\n return false;\n }\n if (0 === preg_match('#^[+/0-9A-Za-z]{21}[AQgw]==$#', $request->header['sec-websocket-key'])\n || 16 !== strlen(base64_decode($request->header['sec-websocket-key']))\n )\n {\n //Header Sec-WebSocket-Key is illegal;\n $response->end();\n return false;\n }\n\n $key = base64_encode(sha1($request->header['sec-websocket-key']\n . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',\n true));\n $headers = array(\n 'Upgrade' => 'websocket',\n 'Connection' => 'Upgrade',\n 'Sec-WebSocket-Accept' => $key,\n 'Sec-WebSocket-Version' => '13',\n 'KeepAlive' => 'off',\n );\n foreach ($headers as $key => $val)\n {\n $response->header($key, $val);\n }\n $response->status(101);\n $response->end();\n// SwooleHttpServer::getInstance()->getServer()->push($request->fd,\"hello world\");\n });\n $server->on(\"close\",function ($ser,$fd){\n Logger::console(\"client {$fd} close\");\n });\n }", "title": "" }, { "docid": "68ab78df2431092cfb129683cd83433f", "score": "0.47500968", "text": "private function _checkState() {\n //prepare readable sockets\n $read = $this->_clients;\n $read[] = $this->_stream;\n\n //start reading\n $write = array();\n $except = array();\n if (@stream_select($read, $write, $except, 0)) {\n //new client\n if (in_array($this->_stream, $read)) {\n $client = stream_socket_accept($this->_stream);\n\n if ($client) {\n $this->_clients[] = $client;\n $this->_triggerEvent(new Server\\Event\\Connect(), $client);\n $read[] = $client;\n }\n }\n\n //message from existing client\n foreach ($read as $socket) {\n if ($socket === $this->_stream) {\n continue;\n }\n\n $data = Utils::receiveMessage($socket);\n $event = new Server\\Event\\Receive();\n $this->_prepareEvent($event, $data);\n $this->_triggerEvent($event, $socket);\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "87400ae4c5c225920d4961fab7964813", "score": "0.47467697", "text": "function isStreamerMode() {\r\n return request()->get('isStreamerMode');\r\n}", "title": "" }, { "docid": "68ad30968cd7f29b28560fbbbf9aca21", "score": "0.47280234", "text": "public static function getall_server() { return is_array(self::$server) ? self::$server : array(); }", "title": "" }, { "docid": "46de26c08a750818772c649fa0e2bf14", "score": "0.4716597", "text": "public function withChunks(): bool\n {\n return (bool) $this->request->input('chunks', false);\n }", "title": "" }, { "docid": "b07ff9e935ecee62cdd28eff91046f87", "score": "0.4680399", "text": "public function GenerateLiveStreamId()\n {\n $unbreakable = $this->GetUsername() . \"-:-\" . MAGIC_STRING . \"-\" . microtime(true);\n $unbreakable = \"live_stream_\" . hash(\"sha256\", $unbreakable);\n if ($this->_db->ExecuteStmt(Statements::UPDATE_USER_DATA_LIVE_STREAM_ID, $this->_db->BuildStmtArray(\"si\", $unbreakable, $this->GetId())))\n {\n $this->_liveStreamId = $unbreakable;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "43673a7553c3a4ea58470f3d0ac49498", "score": "0.4670985", "text": "public function getStreamNumbers() \n {\n return $this->_streamNumbers; \n }", "title": "" }, { "docid": "f9e0c5996a864be6015a7c1565213f39", "score": "0.46540537", "text": "public function hasServeNodes(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "d9bd2e0cbf4b31e26374486bd43633a6", "score": "0.46344766", "text": "public function hasMsgs(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "c3668be54f2b06611b1d4dba474e4f2d", "score": "0.46282732", "text": "public function setSniffMessages($flag);", "title": "" }, { "docid": "fd4e4bda25b0063577e808adf26b2f89", "score": "0.46252692", "text": "public function messageStream(Response $response,?String $message,Sessions $sessions){\n return $response->json(['message_sent' => \"hello\"]);\n}", "title": "" }, { "docid": "1c79b05c58763beddcc0a3463355fce7", "score": "0.45998123", "text": "public function is_allow_multi_on_poll() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d8028d6372be37703bfa2a3bf2e311ed", "score": "0.45984644", "text": "public function serverChatMessages(): HasMany\n {\n return $this->hasMany(ServerChatMessage::class);\n }", "title": "" }, { "docid": "764a189d733c5288c72d59630e86ebd9", "score": "0.45750827", "text": "protected function getHandlerParamsStream() : array{\n $params = [];\n if( !empty($conf = $this->handlerParamsConfig['stream']) ){\n $params[] = $conf->stream;\n $params[] = Logger::toMonologLevel($this->getLevel()); // min level that is handled;\n $params[] = true; // bubble\n $params[] = 0666; // permissions (default 644)\n }\n\n return $params;\n }", "title": "" }, { "docid": "ca7adc4e16be3084ce4b1097877fe421", "score": "0.45413876", "text": "public function serverArray(): array\n {\n return $this->server;\n }", "title": "" }, { "docid": "e84a0de7eb0b82abbe700df03d973257", "score": "0.45338923", "text": "function ReadyToReceiveSubscribtions(){\r\n\t\treturn $this->ListID && $this->GroupID;\r\n\t}", "title": "" }, { "docid": "0c5b2873db2c808cf24deebe692175be", "score": "0.45312554", "text": "function bbp_is_single_reply()\n{\n}", "title": "" }, { "docid": "38a76079321914b1f669ed8c547a7dfd", "score": "0.4524977", "text": "public function broadcastOn()\n {\n return ['chatSession'];\n }", "title": "" }, { "docid": "323f66598eb32206e8bf931f24978b28", "score": "0.4512307", "text": "function streamIsLive($username = '') {\n\t\t$file = \"https://api.twitch.tv/kraken/streams?channel=$username\";\n\t\t$json_array = json_decode(file_get_contents($file), true);\n\n\t\tif (empty($json_array['streams'])) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "a1f94babf50acf6925d8af0f7ed82242", "score": "0.4505934", "text": "public function getResponseStreaming() {}", "title": "" }, { "docid": "332126fd679d78bff27a954b03568b3c", "score": "0.4505595", "text": "public function getRequestStreaming() {}", "title": "" }, { "docid": "884f882f37d4910755dcc7b85f0e9168", "score": "0.45008108", "text": "public function isMultiple(): bool\n {\n return $this->multiple;\n }", "title": "" }, { "docid": "884f882f37d4910755dcc7b85f0e9168", "score": "0.45008108", "text": "public function isMultiple(): bool\n {\n return $this->multiple;\n }", "title": "" }, { "docid": "884f882f37d4910755dcc7b85f0e9168", "score": "0.45008108", "text": "public function isMultiple(): bool\n {\n return $this->multiple;\n }", "title": "" }, { "docid": "95297a9fbcf71103c6c18ac2b3789b31", "score": "0.44769552", "text": "public function isMultiple() {\n return true;\n }", "title": "" }, { "docid": "95297a9fbcf71103c6c18ac2b3789b31", "score": "0.44769552", "text": "public function isMultiple() {\n return true;\n }", "title": "" }, { "docid": "de01a9057c783a4d2f78680685a76a14", "score": "0.44728822", "text": "public function broadcastOn()\n {\n // channel waar op kan worden geabboneerd om de broadcast messages te ontvangen\n return ['scan-game'];\n }", "title": "" }, { "docid": "c7544dfb88512ce76b0209949612b107", "score": "0.44367015", "text": "public function isBuffering();", "title": "" }, { "docid": "3ca56bcb635f3bb01ce3931bb174eb78", "score": "0.4433953", "text": "public function has_messages($message_type = NULL)\n {\n return ($this->count($message_type) > 0);\n }", "title": "" }, { "docid": "b0f7649823a8bc90c7b30f8ce794aa34", "score": "0.44220322", "text": "public function startServerStreamingCall(Call $call, array $options);", "title": "" }, { "docid": "835981b112e2486c5373f97fd2c2b281", "score": "0.4414719", "text": "function filterSendRecv($cmd, $args, $tmpFile)\n{\n if ($cmd !== ITAC_SENDMSG && $cmd !== ITAC_RECVMSG) return false;\n if (strpos($args, 'FROM') === 0){\n\n } elseif (strpos($args, 'BY') === 0) {\n\n } else {\n return false;\n }\n\n // for SEND RECV types\n file_put_contents($tmpFile,\n sprintf(\"array('%s', '%s', '%s', '%s'),\\n\", $func, $from, $to, $len),\n FILE_APPEND);\n $duplex[\"$from-$to\"] = null;\n if (array_key_exists(\"$to-$from\", $duplex)) {\n $duplex[\"$to-$from\"] = $to; // found duplex\n }\n}", "title": "" }, { "docid": "db3c37174a83812e6fafb64bc8dfc6c1", "score": "0.4401274", "text": "public function hasChunksList()\n {\n return $this->chunks !== null;\n }", "title": "" }, { "docid": "17a649e0b3fec8776ea7f28e2df99661", "score": "0.43975174", "text": "public function getMultiple() : bool;", "title": "" }, { "docid": "0dcefe1a6d6b9658eae46a0be43ce160", "score": "0.4384437", "text": "protected function getWebsocketConnections():array\n {\n return array_filter(iterator_to_array($this->server->connections), function ($fd){\n return $this->server->isEstablished($fd);\n });\n }", "title": "" }, { "docid": "88b4082b6a955005c5a1dbe081e0c128", "score": "0.43814775", "text": "public function onMessage(WebSocketServer $server, Frame $frame): void\n {\n $data = json_decode($frame->data);\n if(redis()->sIsMember('websocket', $data->fd)){\n $server->push(intval($data->fd), $frame->fd . ' say ' . $data->content);\n }else{\n $server->push($frame->fd, $data->fd . '不存在');\n }\n\n }", "title": "" }, { "docid": "07a39034c9a9f77a4362c87518dd90bb", "score": "0.43756416", "text": "protected function setServer(): bool\n {\n $host = $this->config->getString(\"dicerobot.server.host\");\n $port = $this->config->getInt(\"dicerobot.server.port\");\n\n try {\n $this->server = new SwooleServer($host, $port);\n } catch (Exception $e) {\n $this->logger->emergency(\"Server exited unexpectedly. Code {$e->getCode()}, message: {$e->getMessage()}.\");\n\n $this->emergencyStop();\n\n return false;\n }\n\n $this->server->set([\n \"http_parse_post\" => false,\n \"http_parse_cookie\" => false\n ]);\n\n return true;\n }", "title": "" }, { "docid": "824e1b14634166686c500f94d9d688b8", "score": "0.43715453", "text": "public function getStreamLargeObjects()\n {\n return $this->readOneof(102);\n }", "title": "" }, { "docid": "751b5d07491d03b2a2525909bbc19273", "score": "0.4367879", "text": "public function testIsMultiple(): void\n {\n $request = new ServerRequest();\n\n $request = $request->withEnv('REQUEST_METHOD', 'GET');\n $this->assertTrue($request->is(['get', 'post']));\n\n $request = $request->withEnv('REQUEST_METHOD', 'POST');\n $this->assertTrue($request->is(['get', 'post']));\n\n $request = $request->withEnv('REQUEST_METHOD', 'PUT');\n $this->assertFalse($request->is(['get', 'post']));\n }", "title": "" }, { "docid": "c0f3e7bb9d70c40764c99e37f26eeda5", "score": "0.4355401", "text": "public function isSupported($server)\n {\n return in_array((string) $server, $this->server_types->supported);\n }", "title": "" }, { "docid": "8f7ed0ee713dfe6bc85e24d4b172fffd", "score": "0.43548056", "text": "public static function has_server(string $var) { return isset(self::$server[$var]) ? true : false; }", "title": "" }, { "docid": "0a6e27d72db1596dfd4eaa7af59e2bca", "score": "0.4350779", "text": "function getGameStreams($game = '') {\n\t\t$streamsArray = [];\n\t\t$queryString = urlencode($game);\n\t\t$file = \"https://api.twitch.tv/kraken/search/streams?q=\" . $queryString;\n\t\t\n\t\t// File Check\n\t\tif ($file) {\n\t\t\t$json_array = json_decode(file_get_contents($file), true);\n\n\t\t\tif ($json_array['streams'] != NULL) {\n\t\t\t\tforeach ($json_array['streams'] as $stream) {\n\t\t\t\t\t$streamsArray[] = $stream;\n\t\t\t\t}\n\n\t\t\t\t// Return active streams\n\t\t\t\treturn $streamsArray;\n\t\t\t} else {\n\t\t\t\t// No active streams\n\t\t\t\treturn false;\n\t\t\t}\t\t\n\t\t} else {\n\t\t\t// Error in finding the file\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "c2695260b14a2d5c458880ea4de431cd", "score": "0.43496466", "text": "public function hasMetaMessage()\n {\n return !is_null($this->metadata['message']);\n }", "title": "" }, { "docid": "757404dc8ec3e66cfb26ed29b17a4b13", "score": "0.43457624", "text": "public static function service_supports_multiaddr() {\n return static::max_batch_size() > 1;\n }", "title": "" }, { "docid": "ffe5f40edce470189db17b87da9d3462", "score": "0.43435967", "text": "public function getStreamsByGame()\n {\n if(isset($this->model_params['games']))\n {\n $streams_manager = new MediasManager;\n $this->model_params['games'] = str_replace(\" \", \"%20\", $this->model_params['games']);\n $this->model_params['games'] = str_replace(\"&amp;\", \"%26\", $this->model_params['games']);\n foreach($this->model_params['source_array'] as $source)\n {\n if($source == \"Twitch\")\n {\n\t\t\t\t\t$twitch = new Twitch;\n $twitch->getStreamsFromPlatform($twitch->getApiUrl('get_streams_by_game', ['limit_val' => 100, 'offset_val' => 0, 'game_val' => $this->model_params['games']]), array('Client-ID: '. $twitch->getApiKeys()['client_id']));\n $twitch->getStreamsFromPlatform($twitch->getApiUrl('get_streams_by_game', ['limit_val' => 100, 'offset_val' => 100, 'game_val' => $this->model_params['games']]), array('Client-ID: '. $twitch->getApiKeys()['client_id']));\n\t\t\t\t\t$streams_manager->setMediasArray($twitch->getStreams());\n }\n elseif($source==\"Smashcast\")\n {\n\t\t\t\t\t$smashcast = new Smashcast;\n $smashcast->getStreamsFromPlatform($smashcast->getApiUrl('get_streams_by_game', ['limit_val' => 100, 'offset_val' => 0, 'game_val' => $this->model_params['games']]));\n\t\t\t\t\t$streams_manager->setMediasArray($smashcast->getStreams());\n }\n }\n $this->model_data['streams_to_display'] = $streams_manager->getMediasToDisplay($this->model_params['streams_limit'], $this->model_params['streams_offset'], $this->model_params['source_array']);\n }\n }", "title": "" }, { "docid": "4bd7c1a846afe77dc84a0f8a8ba630eb", "score": "0.43410584", "text": "public function getstreams(){\n\t\tlist($domain,$node) = explode('/', $GLOBALS['env-def'][$GLOBALS['env']]['stream-pub']);\n\t\t$streams = WcsHelper::getWsStreamInfoByApi($domain);\n\t\t$streams = $streams['content'];\n\t\t$streams = json_decode($streams,true);\n\t\tforeach ($streams['dataValue'] as $stream){\n\t\t\t$this->streams[] = basename($stream['streamname']);\n\t\t}\n\t\treturn $this->streams;\n\t}", "title": "" }, { "docid": "9a039515202c23e7b3e0c9a74aab3a95", "score": "0.4337929", "text": "public function server(): ?array;", "title": "" }, { "docid": "146707647a0e2ec04194f122c9680689", "score": "0.43354616", "text": "public function hasBufferedMessages(): bool\n {\n return null !== $this->buffer && $this->buffer->hasMessages();\n }", "title": "" }, { "docid": "77ed8dcc27880a8233a2929dca13f807", "score": "0.43136778", "text": "public function hasMessageSequence()\n {\n return $this->message_sequence !== null;\n }", "title": "" }, { "docid": "6161a036dfb742348bd258a964d3c43e", "score": "0.43046805", "text": "public function getStreamNames()\n {\n return $this->_streamNames;\n }", "title": "" }, { "docid": "94e319753f6dc6deae066496595cfe24", "score": "0.43033758", "text": "public function broadcastOn()\n {\n //$friendId = '1';\n $channel = 'userchannel'.$this->friendId;\n //return [$channel];\n return [$channel];\n }", "title": "" }, { "docid": "d1cf2405128a2022b45cfff3fd580c9f", "score": "0.43024012", "text": "public function getIsReceive()\n {\n return $this->is_receive;\n }", "title": "" }, { "docid": "4c274b7c23871d1c1686c8eace8b9970", "score": "0.43000364", "text": "function clientCompressedStreaming($stub)\n{\n $request_len = 27182;\n $request2_len = 45904;\n $response_len = 73086;\n $falseBoolValue = new Grpc\\Testing\\BoolValue(['value' => false]);\n $trueBoolValue = new Grpc\\Testing\\BoolValue(['value' => true]);\n\n // 1. Probing for compression-checks support\n\n $payload = new Grpc\\Testing\\Payload([\n 'body' => str_repeat(\"\\0\", $request_len),\n ]);\n $request = new Grpc\\Testing\\StreamingInputCallRequest([\n 'payload' => $payload,\n 'expect_compressed' => $trueBoolValue, // lie\n ]);\n\n $call = $stub->StreamingInputCall();\n $call->write($request);\n list($result, $status) = $call->wait();\n hardAssert(\n $status->code === GRPC\\STATUS_INVALID_ARGUMENT,\n 'Received unexpected StreamingInputCall status code: ' .\n $status->code\n );\n\n // 2. write compressed message\n\n $call = $stub->StreamingInputCall([\n 'grpc-internal-encoding-request' => ['gzip'],\n ]);\n $request->setExpectCompressed($trueBoolValue);\n $call->write($request);\n\n // 3. write uncompressed message\n\n $payload2 = new Grpc\\Testing\\Payload([\n 'body' => str_repeat(\"\\0\", $request2_len),\n ]);\n $request->setPayload($payload2);\n $request->setExpectCompressed($falseBoolValue);\n $call->write($request, [\n 'flags' => 0x02 // GRPC_WRITE_NO_COMPRESS\n ]);\n\n // 4. verify response\n\n list($result, $status) = $call->wait();\n\n hardAssertIfStatusOk($status);\n hardAssert(\n $result->getAggregatedPayloadSize() === $response_len,\n 'aggregated_payload_size was incorrect'\n );\n}", "title": "" }, { "docid": "aa939e877883f8801bdfe847e32cb334", "score": "0.42876092", "text": "public function isMultiple()\n {\n return $this->get('multiple', false) == true;\n }", "title": "" }, { "docid": "fcf7819baa92a18831f4ff8e9de60e44", "score": "0.42802826", "text": "public function hasMessageId(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "3424c2c7d70148aa0a28cc1eb9dab63a", "score": "0.4278432", "text": "public function _353( &$server ) {\n \n $server->Message->chan = $server->Message->argv[0];\n $msg = &$server->Message->msg;\n\n foreach (explode(' ',$msg) as $thisnick) {\n preg_match('/(?:[\\+&@%~])?([^!]+)(?:!(.+)@([^@]+))?/',\n\t\t $thisnick,$matches);\n \n // $Server->Chanlist_Set( $chan, $matches[1] );\n\n }\n }", "title": "" }, { "docid": "5c1a10fccf811526b3a2006233e50777", "score": "0.42689607", "text": "public function getServer() {\n return isset($this->webserver) ? $this->webserver : FALSE;\n }", "title": "" }, { "docid": "8d213eed7a959c92e1026da691bba35c", "score": "0.42659354", "text": "function xchat_server_push() \n{\n\t\n\theader('Content-Type: text/event-stream');\n\n\t// Should transfer this\n\trequire_once XCHAT_DIR . '/src/Message.php';\n\trequire_once XCHAT_DIR . '/src/MessageCrud.php';\n\t\n\t$message = new XChat\\Message\\Message();\n\t$message->set_receiver_id(1);\n\t\n\t$sender = new XChat\\Message\\Crud( $message );\n\t$user_messages = $sender->get_user_messages();\n\n\t$data = array( 'messages' => $user_messages );\n\n\techo \"data: \" . json_encode( $data ) . \"\\n\\n\";;\n\t\n\treturn 0;\n\n}", "title": "" }, { "docid": "1fb9b4be60a1e051434f650253fac83b", "score": "0.42615053", "text": "function sendMessages ()\n\t{\n\t\tif ($this->httpConnection == NULL)\n\t\t return false;\n\n\t\t$this->textBuffer .= \"MESSAGES2.0\\r\\n\";\n\n\t\tforeach ($this->messageList as $sm) {\n\t\t $s = \"$sm->messageID $sm->phoneNumber $sm->delay \"\n\t\t\t\t\t\t. \"$sm->validityPeriod \";\n\t\t $s .= $sm->deliveryReport ? \"1 \" : \"0 \";\n\t\t $s .= \"$sm->message\\r\\n\";\n\t\t $this->textBuffer .= $s;\n\t\t}\n\n\t\t$ok = true;\n\t\t$this->textBuffer .= \".\\r\\n\";\n\t\tif (!$this->flushBuffer () || !$this->openInputConnection ()\n\t\t\t|| (int) ($this->readResponseCode () / 100) != 1)\n\t\t $ok = false;\n\n\t\t$this->close ();\n\n\t\treturn $ok;\n\t}", "title": "" }, { "docid": "e6da092dd4272ed650773b52dcfe5c07", "score": "0.42598686", "text": "public function isMultiRequest(): bool\n {\n return $this->client instanceof MultiCurl;\n }", "title": "" }, { "docid": "07ff263d4ed33e84eeddc14c22f67a85", "score": "0.42576346", "text": "public function hasServerTime()\n {\n return $this->server_time !== null;\n }", "title": "" }, { "docid": "ee997586c25cc7f5b06c207be2024cdd", "score": "0.42569658", "text": "public function has_server()\n\t{\n\t\treturn count($_SERVER)>0 ? TRUE : FALSE;\n\t}", "title": "" }, { "docid": "a21a77370727ff85a85d673198afee77", "score": "0.42559487", "text": "public function getStreams()\n {\n return $this->streams;\n }", "title": "" }, { "docid": "147df7e5019e4b46a1189708e03a93b2", "score": "0.42549026", "text": "private function hasMessage($client, $data) {\n\t\t@$datas = split(\" \", $data);\n\t\t\n\t\tswitch($datas[0]) {\n\t\t\n\t\t\tcase '/time':\n\t\t\t\t$this->sendSystemMessage($client, date('d/m/Y H:i:s'));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase '/quit':\n\t\t\t\t$this->remove($client);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase '/system':\n\t\t\t\t$msg = '';\n\t\t\t\tfor($i=1;$i<count($datas);$i++) {$msg.=$datas[$i].' ';}\n\t\t\t\t$this->sendSystemMessage('*', $msg);\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase '/shutdown':\n\t\t\t\tfor($i = 5; $i>0 ; $i--) {\n\t\t\t\t\t$this->sendSystemMessage('*', \"Le serveur va s'éteindre dans \".$i.\"s\");\n\t\t\t\t\tsleep(1);\n\t\t\t\t}\n\t\t\t\t$this->stop();\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->sendMessage('*', $client->infos['pseudo'], $client->infos['color'], $data);\n\t\t}\n\t}", "title": "" }, { "docid": "bf141d830fee8f6f9b7702aaa4147a6a", "score": "0.4254817", "text": "public function haveTrailer(){\n \t$streams = $this->vodStreams;\n \tforeach ($streams as $stream){\n \t\tif($stream->stream_type == 2){\n \t\t\treturn true;\n \t\t}\n \t}\n \treturn false;\n }", "title": "" }, { "docid": "544fadd77fcfc21394e039bb9123b00f", "score": "0.42428383", "text": "public function testShouldSendBatchOnMultiChannel()\n {\n $multiChannel = $this->client->channel('channel-1', 'channel-2');\n $response = $multiChannel->send('event', 'payload');\n\n $batch = Message::batch([\n Message::text('channel-1/event', 'payload'),\n Message::text('channel-2/event', 'payload')\n ]);\n\n $this->assertEquals(\n $batch->encode(),\n $response->response\n );\n }", "title": "" }, { "docid": "23e529877046602fae696f0fe4710334", "score": "0.4221136", "text": "public function isServerSide()\n {\n return isset($this->jsInitParameters['ajax']) ? true : false;\n }", "title": "" }, { "docid": "23f670d84a2ca4a46e96a073bce6ec70", "score": "0.4220791", "text": "public function getStreamCount()\n {\n return $this->stream_count;\n }", "title": "" }, { "docid": "f20e838621ae4f60b1bebb2492e4854d", "score": "0.42202625", "text": "function get_sockets( $tag = null )\n\t/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ \n {\n $sockets = [];\n\n //We might edit connected_servers during the process\n\n reset($this->connected_servers);\n while( list($key, $connected) = each($this->connected_servers) ) {\n //foreach( $this->connected_servers as $key => $connected ) {\n\n if( $this->servers[$key]->type === SERVER_TYPE_SOLDAT )\n {\n if( $this->servers[$key]->ping() === false ) {\n\n //release_game_server() -> server_disconnect() is the 'nice' behavior\n //bypass it here to kill() the server instead\n $this->game_server_kill( $key ); \n\n continue; //server dc'ed probably\n } \n //Could store ping here...\n } \n \n $sockets[] = $this->servers[$key]->sock;\n }\n\n return array_values( $sockets );\n }", "title": "" }, { "docid": "1138ed7b94ac70581be9ccccdf935d44", "score": "0.42195138", "text": "public function isVariadic()\n {\n return $this->variadic;\n }", "title": "" }, { "docid": "3cdf44437bd651b3bdc7dc776697bfa8", "score": "0.42171448", "text": "public function isSent()\n {\n \n }", "title": "" }, { "docid": "cfb51fa4c3144b650ba698d85979a806", "score": "0.42165765", "text": "function wsOnMessage($clientID, $message, $messageLength, $binary) {\n\tglobal $Server;\n\n \n \n\t$ip = long2ip( $Server->wsClients[$clientID][6] );\n\n\t// check if message length is 0\n\tif ($messageLength == 0) {\n\t\t$Server->wsClose($clientID);\n\t\treturn;\n\t}\n\n// \n\n//\n// JSON with PHP test\n\t$result = json_decode($message);\n $Server->log( \"Decoded JSON: $result->action\");\n \n // check action type\n if( $result->action == 'login') \n {\n \n \n // add user to logger user list\n $newUser = new User($result->username, $clientID, $result->location_id, \"\");\n $Server->loggedUsers[$clientID] = $newUser;\n $Server->loggedUsers[$clientID]->printUser();\n \n // add him to broadcast list according to location id\n //$Server->broadcastHash\n if (array_key_exists($result->location_id, $Server->broadcastHash)) \n {\n echo \"The Location list exists element is in the array\";\n $Server->broadcastHash[$result->location_id][$clientID] = $result->username;\n }\n else \n {\n echo \"Creating new array\";\n $Server->broadcastHash[$result->location_id] = array($clientID => $result->username);\n }\n \n // build login JSON\n $numClients = sizeof($Server->broadcastHash[$result->location_id]);\n $loggedUser = $result->username;\n $loginMsg = \"$loggedUser has joined the room\";\n $loginJSON = \"{ \\\"action\\\" : \\\"message\\\",\n \\\"message\\\" : {\\\"username\\\" : \\\"Server\\\", \\\"text\\\": \\\"$loginMsg\\\"}, \n \\\"location_id\\\" : \\\"$result->location_id\\\", \n \\\"number_of_clients\\\" : \\\"$numClients\\\" }\";\n $numClientsJSON = \"{ \\\"action\\\" : \\\"serverupdate\\\",\n \\\"message\\\" : {\\\"username\\\" : \\\"Server\\\", \\\"text\\\": \\\"\\\"}, \n \\\"location_id\\\" : \\\"$result->location_id\\\", \n \\\"number_of_clients\\\" : \\\"$numClients\\\" }\";\n \n $distributionList = $Server->broadcastHash[$result->location_id];\n foreach ( $distributionList as $id => $username)\n {\n // send joined room update to everyone else\n if( $id != $clientID){\n $Server->wsSend($id, $loginJSON);\n }\n $Server->wsSend($id, $numClientsJSON);\n }\n \n echo \"\\n\";\n echo \"\\n\\n-------------------------Sending LOGIN msgs to ------------------------- \\n\";\n print_r($distributionList);\n print_r($Server->broadcastHash);\n print_r($Server->wsClients);\n echo \"---------------------------------------------------------------------------------\\n\";\n }\n else if( $result->action == 'message')\n {\n if (array_key_exists($result->location_id, $Server->broadcastHash)) \n {\n $distributionList = $Server->broadcastHash[$result->location_id];\n echo \"\\n \\n -------------------------Sending MESSAGES to ------------------------- $result->location_id \\n\";\n print_r($distributionList);\n print_r($Server->wsClients);\n echo \"---------------------------------------------------------------------------------\\n\";\n //The speaker is the only person in the room. Don't let them feel lonely.\n if ( sizeof($distributionList) == 1 )\n\t\t $Server->wsSend($clientID, \"There isn't anyone else in the room, but I'll still listen to you. --Your Trusty Server\");\n else {\n //Send the message to everyone but the person who said it\n foreach ( $distributionList as $id => $username)\n {\n if ( $id != $clientID )\n {\n $Server->wsSend($id, $message);\n }\n }\n }\n }\n }\n else if ( $result->action == 'logout') \n {\n wsLogout($clientID, null);\n }\n \n \n\t\n\t\n// End of JSON PHP test\n\n\t\n\n\n\n\t//if ( sizeof($Server->wsClients) == 1 )\n\t\t//$Server->wsSend($clientID, \"There isn't anyone else in the room, but I'll still listen to you. --Your Trusty Server\");\n\t//else\n\t\t//Send the message to everyone but the person who said it\n\t\t//foreach ( $Server->wsClients as $id => $client )\n\t\t\t//if ( $id != $clientID )\n\t\t\t\t//$Server->wsSend($id, \"Visitor $clientID ($ip) said \\\"$message\\\"\");\n}", "title": "" }, { "docid": "d25fd06a1e21f8c0280b6aa0d07f1533", "score": "0.42041868", "text": "private function setYtAutostartLive(array &$updateArr = []): bool\n {\n $monitor = new \\Google_Service_YouTube_MonitorStreamInfo();\n $monitor->setEnableMonitorStream(true);\n $monitor->setBroadcastStreamDelayMs('10');\n $this->googleYoutubeLiveBroadcastContentDetails->setMonitorStream($monitor);\n $this->googleYoutubeLiveBroadcastContentDetails->setEnableAutoStart(true);\n $this->googleYoutubeLiveBroadcastContentDetails->setEnableAutoStop(true);\n $this->googleYoutubeLiveBroadcastContentDetails->setEnableEmbed(false);\n $this->googleYoutubeLiveBroadcastContentDetails->setEnableDvr(true);\n $this->googleYoutubeLiveBroadcastContentDetails->setRecordFromStart(true);\n $this->googleYoutubeLiveBroadcastContentDetails->setEnableContentEncryption(false);\n $this->googleYoutubeLiveBroadcast->setContentDetails($this->googleYoutubeLiveBroadcastContentDetails);\n $updateArr[] = 'contentDetails';\n return true;\n }", "title": "" }, { "docid": "7c277679b5a1fac22f1e31dad92333cf", "score": "0.42026255", "text": "public function stream_stat() {\n \n return array();\n \n }", "title": "" }, { "docid": "ed6e93cfcc8476ed758c5d0cbfcd5d28", "score": "0.41999027", "text": "public function onServerInfo(array $params = array())\r\n {\r\n /*\r\n * $params is data structure with server vars, player list etc..:\r\n * \r\n */\r\n \r\n $server_playlist_res = $this->db->getSingle(\"SELECT server_playlist_id FROM [prefix]servers_playlists WHERE server_id = :server_id AND is_active = 1\", \r\n array(':server_id' => $params['server']['id']));\r\n if ( !$server_playlist_res ) return;\r\n \r\n $this->rcon = $params['rcon'];\r\n $this->commands = new Rcon_Commands($this->rcon);\r\n $this->status = $params['status'];\r\n $this->server = $params['server'];\r\n \r\n \r\n $this->server = array_merge($this->server, $server_playlist_res);\r\n $this->custom_playlist = $this->getCustomPlaylist();\r\n \r\n $playlist = $this->status['playlist'];\r\n $playlist_name = Rcon_Constants::$playlists[$playlist];\r\n $gametype = $this->status['g_gametype'];\r\n $gametype_name = Rcon_Constants::$gametypes[$gametype];\r\n $map = $this->status['mapname'];\r\n $map_name = Rcon_Constants::$maps[$map];\r\n $servername = $this->status['sv_hostname'];\r\n \r\n /*echo \"Now playing on $servername:\\n\";\r\n echo \"Playlist: $playlist_name ($playlist)\\n\";\r\n echo \"Gametype: $gametype_name ($gametype)\\n\";\r\n echo \"Map: $map_name ($map)\\n\";\r\n echo \"Players: \", count($this->status['players']), \"\\n\";*/\r\n \r\n $this->rotate();\r\n }", "title": "" }, { "docid": "01fb94771a9380464c57267117922b62", "score": "0.41966692", "text": "public function isMultiple();", "title": "" }, { "docid": "01fb94771a9380464c57267117922b62", "score": "0.41966692", "text": "public function isMultiple();", "title": "" }, { "docid": "c2c54f63e5e39fb8a7366371ac311600", "score": "0.41956523", "text": "public function broadcastWith()\n {\n return [\n 'server' => [\n 'id' => $this->server->id,\n 'connection_status' => (int) $this->server->connection_status,\n ],\n ];\n }", "title": "" }, { "docid": "aa2786816a4bb313a0b1e05c4c0838eb", "score": "0.41931778", "text": "function pingPong($stub)\n{\n $request_lengths = [27182, 8, 1828, 45904];\n $response_lengths = [31415, 9, 2653, 58979];\n\n $call = $stub->FullDuplexCall();\n for ($i = 0; $i < 4; ++$i) {\n $request = new Grpc\\Testing\\StreamingOutputCallRequest();\n $request->setResponseType(Grpc\\Testing\\PayloadType::COMPRESSABLE);\n $response_parameters = new Grpc\\Testing\\ResponseParameters();\n $response_parameters->setSize($response_lengths[$i]);\n $request->getResponseParameters()[] = $response_parameters;\n $payload = new Grpc\\Testing\\Payload();\n $payload->setBody(str_repeat(\"\\0\", $request_lengths[$i]));\n $request->setPayload($payload);\n\n $call->write($request);\n $response = $call->read();\n\n hardAssert($response !== null, 'Server returned too few responses');\n $payload = $response->getPayload();\n hardAssert(\n $payload->getType() === Grpc\\Testing\\PayloadType::COMPRESSABLE,\n 'Payload '.$i.' had the wrong type');\n hardAssert(strlen($payload->getBody()) === $response_lengths[$i],\n 'Payload '.$i.' had the wrong length');\n }\n $call->writesDone();\n hardAssert($call->read() === null, 'Server returned too many responses');\n hardAssertIfStatusOk($call->getStatus());\n}", "title": "" }, { "docid": "365275b66ea700d16cfafa84e0fe5f16", "score": "0.41904548", "text": "public function isShared(): bool\n {\n return $this->shared;\n }", "title": "" }, { "docid": "7039438f8f4d233fc54c5c1cd845f1a8", "score": "0.41881374", "text": "#[\\Relay\\Attributes\\RedisCommand]\n public function sentinels(string $master): array|false {}", "title": "" }, { "docid": "24fe4c13b0b6cdfa88050b4d3566a1af", "score": "0.41830078", "text": "function matchShowMaplist(){\n\tglobal $_debug,$_match_conf,$_match_map,$_ChallengeList;\n\t\n\t$maxi = $_match_conf['ShowNextMaps'] - $_match_map + 1;\n\tif($maxi < 1)\n\t\treturn;\n\n\t$msg = localeText(null,'server_message').'Next challenges: ';\n\t$msg .= stringMapList($maxi);\n\t\n\t// send message in offical chat\n\taddCall(null,'ChatSendServerMessage', $msg);\n}", "title": "" }, { "docid": "691e1bcb3ce3bbf0e7fc8e49fbf8586f", "score": "0.41777575", "text": "protected function serverIsOwnedByUser()\n {\n return in_array($this->forgeserver, Auth::user()->servers()->pluck('forge_id')->toArray());\n }", "title": "" }, { "docid": "7c1f1c81dfa076c392a9664094468b50", "score": "0.41718563", "text": "public function messages_waiting() {\n $messages = false;\n foreach ( $this->flash_types as $type ) {\n if ( !empty($_SESSION['flash_' . $type]) ) {\n $messages = true; // Found a message waiting.\n }\n }\n return $messages;\n }", "title": "" }, { "docid": "6ba181abcf29c1171d835404f360aad1", "score": "0.417135", "text": "public static function hasMessages()\n {\n return Checker::isArray(MessageCollection::Messages(), false);\n }", "title": "" }, { "docid": "34ddb4e1fea6104bd9ee8901a35474da", "score": "0.41703966", "text": "function onStart(\\swoole_http_server $server)\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": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.77839273", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7728085", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "64a6a51cb4e4b962408e448d0c1399e9", "score": "0.7471288", "text": "public function actionCreate()\r\n {\r\n $model = new Resource();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "c26739dc5816352d835ac0fb7c3766d6", "score": "0.7425876", "text": "public function create()\n\t{\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n\n $data = array(\n 'page_title' => 'New resource'\n );\n \n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/create_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.73920715", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "9332c37244dbc51a6ec587579d9cd246", "score": "0.7285692", "text": "public function create()\n {\n //\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7277869", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7277869", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7277869", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "68d9805b3cff8bc6655ed77f2eb8b54c", "score": "0.7275227", "text": "public function create()\n {\n return view(\"Student/addform\");\n //\n }", "title": "" }, { "docid": "78824716ffe303654b7c00562ec87847", "score": "0.7272611", "text": "public function create() {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"create\";\n $viewData[\"supplier\"] = new Supplier();\n\n $viewData[\"supplier\"]->supplier_number = NumberSeries::getNextNumber(Supplier::MODULE_CODE);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "aa37b9385ad38984404b3f4097565c00", "score": "0.7251492", "text": "public function newAction()\n {\n $request = $this->container->get('request');\n $options = $request->get('options');\n $alias = $request->get('alias');\n\n $metadata = $this->getMetadata($options['class']);\n $entity = $this->newEntityInstance($metadata);\n\n $fields = $this->getFields($metadata, $options, 'new');\n $type = $this->getCustomFormType($options, 'new');\n\n $form = $this->createCreateForm($entity, $alias, $fields, $type);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'list_action' => DatatablesRoutingLoader::PREF . $alias . '_index',\n 'heading' => $this->getHeading()\n )\n );\n }", "title": "" }, { "docid": "56ed6a0676abf46597af78526cddcbf9", "score": "0.72132087", "text": "public function create()\n {\n return view( 'forms/car' );\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.72018224", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "570432e9bac5bbbd5f03f49d8c84f384", "score": "0.717624", "text": "public function create()\n {\n return view('core.admin.form.create');\n }", "title": "" }, { "docid": "53df6b1c8be4874a39d1af8e3c545f04", "score": "0.7167916", "text": "public function create()\n {\n return view(\"fichecontroller.form\");\n }", "title": "" }, { "docid": "3da56af402e3cb2da0fb1d9bfcaaee54", "score": "0.7166964", "text": "public function create()\n {\n //\n\n return view('form.create');\n }", "title": "" }, { "docid": "7cda6fe62fc1ec4947ab520926c7eca6", "score": "0.71462214", "text": "public function create()\n {\n return View::make(self::CID.'.form');\n }", "title": "" }, { "docid": "95739848366d87216fcc63cf6199aa8c", "score": "0.71389294", "text": "public function create()\n {\n \treturn view('form');\n }", "title": "" }, { "docid": "56dd0677c79549ae44b2b1cc8d7bd0db", "score": "0.7137489", "text": "public function create()\n {\n return view('backEnd.formisian.create');\n }", "title": "" }, { "docid": "53163536d5d151380894ed516baf152c", "score": "0.71336555", "text": "public function actionCreate() {\n $this->render('create');\n }", "title": "" }, { "docid": "7d27d715128bcec59bea3173b77f3e80", "score": "0.71284366", "text": "public function create()\n {\n \n return view('admin.forms.create');\n }", "title": "" }, { "docid": "8e8000021c431ea72dcb74907ce2583e", "score": "0.71163374", "text": "public function create()\n {\n return view('crud.new');\n }", "title": "" }, { "docid": "f26dda2bfcba89d5cc0857ab1ea11689", "score": "0.7113136", "text": "public function create()\n {\n return view($this->sPath.'/form', ['sPageTitle' => $this->sName]);\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71129704", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71129704", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "74cc4ed8fa057c0f0734c751db297540", "score": "0.71049047", "text": "public function create()\n {\n return view('curso.form');\n }", "title": "" }, { "docid": "e9992fc965026962aebdc354dcc64fda", "score": "0.7098111", "text": "public function create()\n {\n return view('linguas.form');\n }", "title": "" }, { "docid": "76b4745b537106a5513b06d8ab3e4928", "score": "0.70737946", "text": "public function create()\n {\n //\n return view('submit.create');\n }", "title": "" }, { "docid": "0f2dac59601869fb2c54ce811c4650aa", "score": "0.70652246", "text": "public function create()\n {\n return view('pages.forms.addProduct');\n }", "title": "" }, { "docid": "9f2e24c9a8128c23335ea37006c86534", "score": "0.70590717", "text": "public function create_form() {\n\n\t\treturn $this->render('user-create-form.php', array(\n\t\t\t'page_title' => 'Create Account',\n\t\t));\n\t}", "title": "" }, { "docid": "aa383de8753c002453b606201fb9311d", "score": "0.7056531", "text": "public function create()\n {\n\n return view('forms.catalogue');\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.7051732", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "cd26d7c620bd493d734a18664ac56a6d", "score": "0.7044666", "text": "public function create()\n\t{\n\t\treturn view('formation/create');\n\t}", "title": "" }, { "docid": "a23e51d12b5252adcb8123deec223f18", "score": "0.7041721", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "59db2ec2bb6338f023d72461ca432a6e", "score": "0.7012135", "text": "public function create()\n {\n //form showing by modal, without controller or ajax\n }", "title": "" }, { "docid": "b7740989974ec89d90c4ded59d8de5c3", "score": "0.70060855", "text": "public function create()\n {\n \n return view ('studentform');\n }", "title": "" }, { "docid": "06f183ff6cd0bb720144b6bfd1f60c58", "score": "0.7002643", "text": "public function create()\n {\n return view('admin.catalog.edit_form', [\n 'route_base_url' => 'catalog',\n 'model_name' => '\\App\\Models\\Catalog'\n ]);\n }", "title": "" }, { "docid": "67dbcb9d8cbfbf80f7870af19e54acc7", "score": "0.69951683", "text": "public function create()\n {\n return view('student_form');\n }", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.6985662", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "3dc360473dabcb08b5169d4443b754b3", "score": "0.69829607", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "61be6e0a3d99f1e507e44604564e975a", "score": "0.69788283", "text": "public function create()\n {\n return view('bookForm');\n }", "title": "" }, { "docid": "d992b460ca7fa75fae06c92431ea0040", "score": "0.69753784", "text": "public function create()\n {\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formTitle\", \"Create category\");\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "8d7b1185b59117c1c7138b85525adfa3", "score": "0.6975256", "text": "public function create()\n {\n return view(\"add\");\n }", "title": "" }, { "docid": "faad50701ca209b09853100eea7791d6", "score": "0.69616985", "text": "public function ShowForm()\n\t{\n\t\treturn view('marcas.new');\n\t}", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.696135", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69613016", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "f15b831e674279eeed6c926d7fc775f4", "score": "0.6960874", "text": "public function showForm()\n {\n return view('backend.employee.new');\n\n }", "title": "" }, { "docid": "94b9216c661234b749248be69f855da2", "score": "0.69601494", "text": "public function makeCreateForm()\n {\n return View::make('backend.role.create')\n ->with('module', $this->module);\n }", "title": "" }, { "docid": "7423ea0a2f037cdf0d82c0bfb1da7d29", "score": "0.6957521", "text": "public function create()\n {\n return view('backend.book.bookadd');\n }", "title": "" }, { "docid": "53c6bc1f60b19320300c4fabee6ed361", "score": "0.695474", "text": "public function actionCreate() {\n $model = new Forms();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post())) {\n $model->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "ec1387b33a439043065a5a57c6b204dc", "score": "0.69543934", "text": "public function create()\n {\n $title = trans('student.new');\n $this->generateParams();\n $custom_fields = CustomFormUserFields::getCustomUserFields('student');\n return view('layouts.create', compact('title', 'custom_fields'));\n }", "title": "" }, { "docid": "f0580571ff41736a9b6d64685969976e", "score": "0.69511646", "text": "public function create()\n {\n return view('forms.addJobForm');\n\n }", "title": "" }, { "docid": "234165e0547ce18212545035d0a268e8", "score": "0.6936995", "text": "public function create()\r\n {\r\n return view('backend/frame_management/create_form');\r\n }", "title": "" }, { "docid": "ba70ddc190000d3806bc08fdef63dba4", "score": "0.69345707", "text": "public function create()\n {\n return view('news.forms.create');\n }", "title": "" }, { "docid": "a9ea97d1b5f9c3b156c14f4c667cf591", "score": "0.69335115", "text": "public function create()\n {\n $data = array();\n $data['btn'] = trans('main.save');\n return view('employee.form', $data);\n }", "title": "" }, { "docid": "04fb02f1ffa4d6ad9db381edaa1ef950", "score": "0.69328636", "text": "public function create()\n {\n return view('marketing.eduzz.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\n }", "title": "" }, { "docid": "854d474e9079854ad8a7ee81f9143ba1", "score": "0.6930883", "text": "public function create()\n {\n return view('inventory.form');\n }", "title": "" }, { "docid": "2b4c0cd22a57111ee2cfd13aac73f31c", "score": "0.69308573", "text": "public function create()\n {\n $title = trans('global.company_add');\n return view('Admin.company_form', ['company' => new Company(),'title'=>$title]);\n }", "title": "" }, { "docid": "70b9293351aa11656c59414a77fe44bf", "score": "0.6922022", "text": "public function create()\n {\n\t $title = 'TITC - Payment Receipts Form';\n\n return view('layouts.register', compact( 'title' ) );\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.6921667", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "e7d77bd3e3281032dc80c6bc78add9d9", "score": "0.6921503", "text": "public function create()\n {\n return $this->showView('create');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6918444", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "e2b0a02abbe886e85fd9672421e15054", "score": "0.6917087", "text": "public function create()\n {\n return view('clientenatural.create');\n }", "title": "" }, { "docid": "bfe25b751c8db9345d0c10f2b43ea766", "score": "0.69148946", "text": "public function create()\n {\n //the create form\n return view('cmsCRUD.create');\n }", "title": "" }, { "docid": "005d56adb8003598d74448ff694072a8", "score": "0.6914735", "text": "public function showNewForm()\n {\n return view('admin.user_new_form');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.691445", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "829518d17ea777e3ce8044bf5b54b566", "score": "0.6912805", "text": "public function create()\n {\n return view('demo.form');\n }", "title": "" }, { "docid": "92df450167a97fdf17ebd5b83c28b09a", "score": "0.69119483", "text": "public function create()\n\t{\n\t\t\n\t\treturn View::make('back.Conceptos.create');\n\t}", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.69066787", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "d440c94efd1950e00b13ca9c0042a9b5", "score": "0.6904", "text": "public function create()\n\t{\n\t\treturn View::make('furnizori.create');\n\t}", "title": "" }, { "docid": "fe5a9905dc7a54f058401299c6181831", "score": "0.6898068", "text": "public function create() {\n return view(\"create\");\n }", "title": "" }, { "docid": "50b63a26044f8f6e8ce183a0f169edb5", "score": "0.6896771", "text": "public function create()\n {\n //Form in views\\forms\\add-teacher\n }", "title": "" }, { "docid": "c17c042b94a24f7301adf6c1bccdccb4", "score": "0.6894834", "text": "public function create()\n {\n return view('akun.form');\n }", "title": "" }, { "docid": "7851cc68e170265f04d4bef0fc5bc722", "score": "0.6894498", "text": "public function create()\n {\n $this->data['mode'] = 'create';\n $this->data['headline'] = 'Create New Product';\n $this->data['button'] = 'Save';\n\n $this->data['categories'] = Category::arrayForSelect();\n \n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "3da29d431813cb53ced72193b8b7a8b3", "score": "0.68932766", "text": "public function create()\n {\n return view('info_bank_forms.create');\n }", "title": "" }, { "docid": "80e9174a5ea2d8d5de9a229c71015305", "score": "0.68925565", "text": "public function newAction() {\n $entity = new RutaSugerida();\n $form = $this->createCreateForm($entity);\n\n return $this->render('DataBaseBundle:RutaSugerida:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6df26b4d414a58d611f86b22b775e1e1", "score": "0.6891161", "text": "public function create(){\n\t\treturn view('person.new');\n\t}", "title": "" }, { "docid": "a951f648a57c67c0069eeda1c6d6aa92", "score": "0.6888676", "text": "public function create()\n\t{\t\t\n\t\treturn view('syllabi.create');\n\t}", "title": "" }, { "docid": "8f40254b10bc1c3e9879e99a307263d1", "score": "0.688856", "text": "public function create()\n {\n return view(\"contratistas.create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68875104", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "4e920599445d082e866e30214e83ff15", "score": "0.68822986", "text": "public function create()\n {\n return view('company.create'); //return empty form\n }", "title": "" }, { "docid": "f77ac1ad153be30f346944682eb2f804", "score": "0.6881937", "text": "public function create()\n {\n return view('programas.form');\n }", "title": "" }, { "docid": "e87ea28de0e147839885d202fdcf87c3", "score": "0.6878945", "text": "public function create()\n {\n //return view('dashboard.state.form');\n }", "title": "" }, { "docid": "b65c57b64c6e408c0c27dff7f53b5b58", "score": "0.6878472", "text": "public function create()\n {\n return view('pemilih::create');\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.6877351", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "fb1106685e49c1f3cab227154413b8f7", "score": "0.68746567", "text": "public function create()\n {\n return view('forms');\n }", "title": "" }, { "docid": "aba2162f4c6ac04e84bdec140bd9b6d8", "score": "0.68739957", "text": "public function create()\n {\n return view('vitri.create');\n }", "title": "" }, { "docid": "e893ea639bb3313c113e9ac5cb2ad8d1", "score": "0.68724656", "text": "public function actionCreate()\n {\n $model = new ResourceManagement();\n $transaction = Yii::$app->getDb()->beginTransaction();\n if (Yii::$app->request->isPost) {\n try{\n if (!$model->load(Yii::$app->request->post()) || !$model->save()) {\n throw new Exception(Yii::t('app', $model->getFirstErrorMessage()));\n }\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }catch (Exception $e) {\n $transaction->rollBack();\n Helper::Alert(Yii::t('app', $e->getMessage()));\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "aa511d4b629c0b0d4a199ccd11db45cb", "score": "0.68713707", "text": "public function onCreateForm(CreateFormResourceEvent $event)\n {\n //see the Form/ExampleType.php file. There is a required field for every resource.\n $form = $this->container->get('form.factory')->create(new ExampleType, new Example());\n //Use the following resource form.\n //Be carefull, the resourceType is case sensitive.\n //If you don't want to use the default form, feel free to create your own.\n //Make sure the submit route is\n //action=\"{{ path('claro_resource_create', {'resourceType':resourceType, 'parentInstanceId':'_nodeId'}) }}\".\n //Anything else different won't work.\n //The '_nodeId' isn't a mistake, it's a placeholder wich will be replaced with js later on.\n\n $content = $this->container->get('templating')->render(\n 'ClarolineCoreBundle:Resource:createForm.html.twig', array(\n 'form' => $form->createView(),\n 'resourceType' => 'claroline_example'\n )\n );\n\n $event->setResponseContent($content);\n $event->stopPropagation();\n }", "title": "" }, { "docid": "3b6a16ce171a9e1a615b3e03450c34a3", "score": "0.6870778", "text": "public function create()\n {\n return view('red.create');\n }", "title": "" }, { "docid": "0262071f01deb3bd4ca7aa624b922b9c", "score": "0.68701696", "text": "public function newAction()\n {\n if(!$this->get('security.context')->isGranted('ROLE_ADMIN')){\n throw new AccessDeniedException('Accès limité aux administrateurs!');\n }\n\n $entity = new Associate();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MPTimeSheetBundle:Associate:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "2a2d5c7decbde95e55524a71972f118f", "score": "0.6868119", "text": "public function createAction() : object\n {\n // $userSecurity = new UserSecurity($this->di);\n // $userSecurity->auth();\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ask a question\",\n ]);\n }", "title": "" }, { "docid": "73084f7d2ba247149c11e34d765ee5b5", "score": "0.6866952", "text": "public function create()\n {\n return view('templates.forms');\n }", "title": "" }, { "docid": "e8a872ac2676790caa81e881be3f96da", "score": "0.6866344", "text": "public function create()\n\t{\n\t\t\n\t\treturn view('arbitro.create');\n\t}", "title": "" }, { "docid": "1fc26c3847b4a579aa5212f09fb5a3ad", "score": "0.68662137", "text": "public function create()\n {\n //\n return view(\"pages.buku.form\");\n }", "title": "" }, { "docid": "dcf8643d4f6c419eed0299851fa5f08e", "score": "0.6863021", "text": "public function create()\r\n {\r\n Breadcrumb::title(trans('admin_brochures.create'));\r\n return view('admin.brochures.create_edit');\r\n }", "title": "" }, { "docid": "0c86a3bb52729202de25828ebfccd4f9", "score": "0.6861267", "text": "public function create()\n {\n return view('honnbus.create');\n }", "title": "" }, { "docid": "f7d9d429540409085821ae3a8cc377e9", "score": "0.68603665", "text": "public function create()\n {\n //\n\treturn view ('rumah.create');\n }", "title": "" }, { "docid": "aa9c9003594623fb293be41c632aad2d", "score": "0.6859125", "text": "public function create()\n {\n return view('webcontrol.admin.add');\n }", "title": "" }, { "docid": "80b998be62865ab78afc4c0bdaef8639", "score": "0.68588364", "text": "public function create()\n {\n //adicionar\n $action = route('professor.store');\n return view('admin.professores.form', compact('action'));\n }", "title": "" } ]
906cb74248f6d96f4faebad5a36fc754
Construct the plugin object
[ { "docid": "606e143e172c29ea00d5161cc3bca2ed", "score": "0.6591985", "text": "public function __construct()\n\t\t{\n\t\t\t// Initialize Settings\n\t\t\trequire_once(sprintf(\"%s/settings.php\", dirname(__FILE__)));\n\t\t\t$PSP_Plugin_Template_Settings = new PSP_Plugin_Template_Settings();\n\n\t\t\t// Register custom post types\n\t\t\trequire_once(sprintf(\"%s/lib/post_type_template.php\", dirname(__FILE__)));\n\t\t\t$Post_Type_Template = new Post_Type_Template();\n\n\t\t\t// Register taxonomies\n\t\t\trequire_once(sprintf(\"%s/lib/post_type_taxonomies.php\", dirname(__FILE__)));\n\n\t\t\t// Register shortcodes\n\t\t\trequire_once(sprintf(\"%s/lib/post_type_shortcode.php\", dirname(__FILE__)));\n\n\t\t\t$plugin = plugin_basename(__FILE__);\n\t\t\tadd_filter(\"plugin_action_links_$plugin\", array( $this, 'plugin_settings_link' ));\n\t\t}", "title": "" } ]
[ { "docid": "91b0ad41e32bb21961041a9698b37979", "score": "0.7882998", "text": "public function plugin_construction() {\t\r\n\t\r\n\t}", "title": "" }, { "docid": "1a7c7c994dfc8f6b77c2bca47cb354ee", "score": "0.77677405", "text": "static\tpublic \tfunction\tinit() {\n\t\t\t/**\n\t\t\t * Implement any processes that need to happen before the plugin is instantiated. \n\t\t\t */\n\t\t\t\n\t\t\t//Instantiate the plugin and return it. \n\t\t\treturn new self();\n\t\t}", "title": "" }, { "docid": "cac2ccb354d7150604c56c9391604229", "score": "0.745727", "text": "public function __construct()\r\n\t\t{\r\n\r\n\t\t\t$this->plugin = VIRAQUIZ_PLUGIN;\r\n\r\n\t\t}", "title": "" }, { "docid": "d63b44ad88de046ada11f3ef8e6de6a6", "score": "0.73399484", "text": "public function __construct(){\n\t\t// Define constant\n\t\t$this->define_constants();\n\t\t// Run the plugin\n\t\t$this->run_etc();\n\t}", "title": "" }, { "docid": "235360723c1100f06dea17663ba207e3", "score": "0.71579397", "text": "public function init_plugin()\n {\n }", "title": "" }, { "docid": "b3b2d8588a74a71328aba47e119fc90b", "score": "0.7094888", "text": "public function __construct( $plugin )\n {\n\n parent::__construct( $plugin );\n\n }", "title": "" }, { "docid": "59bc928e2de569411da9022697c13b3a", "score": "0.7094101", "text": "public function __construct() {\n\t\t$this->plugin_name = 'akamai';\n\n\t\t$this->load_dependencies();\n\t\t$this->define_admin_hooks();\n\t}", "title": "" }, { "docid": "7117b0c314ea0845a5a50c984593986c", "score": "0.70648384", "text": "public function __construct() {\n\t\t$this->plugin_name = 'rtmedia-transcoding';\n\t\t$this->load_dependencies();\n\t\t$this->define_admin_hooks();\n\t\t$this->define_process_hooks();\n\t}", "title": "" }, { "docid": "50c868c7f83e8d2f80e09a82898e8e4f", "score": "0.7048217", "text": "protected function __construct() {\r\n\t\t$this->constants = new PDT_Constants( $this );\r\n\t\t$this->bootstrap = new PDT_Bootstrap( $this );\r\n\t\t\r\n\t\tif ( !defined('WP_CONTENT_URL') )\r\n\t\t\tdefine( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up\r\n\r\n\t\t/**\r\n\t\t * Allows for the plugins directory to be moved from the default location.\r\n\t\t *\r\n\t\t * @since 2.6.0\r\n\t\t */\r\n\t\tif ( !defined('WP_PLUGIN_URL') )\r\n\t\t\tdefine( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash\r\n\r\n\t\t/**\r\n\t\t * Allows for the mu-plugins directory to be moved from the default location.\r\n\t\t *\r\n\t\t * @since 2.8.0\r\n\t\t */\r\n\t\tif ( !defined('WPMU_PLUGIN_URL') )\r\n\t\t\tdefine( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // full url, no trailing slash\r\n\r\n\r\n\t\t$this->basename = plugin_basename( __FILE__ );\r\n\t\t$this->url = plugin_dir_url( __FILE__ );\r\n\t\t$this->path = plugin_dir_path( __FILE__ );\r\n\r\n\t\t$this->plugin_classes();\r\n\t}", "title": "" }, { "docid": "125bb747e07249d36364bc5c733f71f9", "score": "0.7020869", "text": "public function __construct()\n {\n $reflectionObject = new ReflectionObject($this);\n\n /* The class filename. */\n $this->_filename = $reflectionObject->getFileName();\n\n /* The class name. */\n $this->_name = $reflectionObject->getName();\n\n /* The package. */\n $this->_package = strtolower(preg_replace('/_Plugin/', '', $this->_name));\n\n /* The plugin root url. */\n $this->_url = plugin_dir_url($this->_filename);\n\n /* The plugin root path. */\n $this->_path = str_replace('\\\\', '/', plugin_dir_path($this->_filename));\n\n /* The options group */\n $this->_option_group = strtolower($this->_name . '_options');\n\n /* The admin settings page slug */\n $this->_settings_slug = $this->_package . '_settings';\n\n /* The serialized settings filename */\n $this->_serialized_settings_filename = $this->get_setting('upload_root_folder', wp_get_upload_dir()['basedir']) . DIRECTORY_SEPARATOR . strtolower(str_replace(' ', '_', sprintf('%s_%s.txt', get_bloginfo('name'), $this->_settings_slug)));\n\n /* The asset version. */\n add_action('plugins_loaded', function () {\n if (!function_exists('get_plugin_data')) {\n require_once ABSPATH . 'wp-admin/includes/plugin.php';\n }\n $this->_asset_version = $this->get_plugin_data()['Version'];\n });\n\n /* Define encryption parameters. */\n $this->encryption_parameters();\n\n /* Create the autoloader. */\n $this->autoloader();\n\n /* Register activation hook. */\n register_activation_hook($this->_filename, array($this, 'activation'));\n\n /* Register deactivation hook. */\n register_deactivation_hook($this->_filename, array($this, 'deactivation'));\n\n /* Register uninstall hook. */\n register_uninstall_hook($this->_filename, 'uninstall');\n\n /* Load the admin files. */\n add_action('admin_menu', array($this, 'wp_plugin_admin'), 1);\n\n // Add plugin quick links to the WordPress admin toolbar.\n add_action('admin_bar_menu', array($this, 'admin_bar_menu'), 100);\n\n // Plugin localisation\n add_action('plugins_loaded', array($this, 'load_plugin_textdomain'));\n\n // Plugin updates\n add_action('plugins_loaded', array($this, 'plugin_update'));\n\n // Register the shutdown function.\n register_shutdown_function(array(&$this, 'error_shutdown_function'));\n }", "title": "" }, { "docid": "236e00f5a212797f7562c41eb42152e1", "score": "0.6871799", "text": "protected function __construct() {\n\t\t\t// Full path to main file\n\t\t\t$this->plugin_file= __FILE__;\n\t\t\t$this->plugin_dir = dirname( $this->plugin_file );\n\t\t\t$this->options = $this->get_saved_options();\n\t\t}", "title": "" }, { "docid": "753c973aedd50231a366d62bef5fb79e", "score": "0.68546206", "text": "public function __construct() {\n if (defined('MTII_UTILITIES_VERSION')) {\n $this->version = MTII_UTILITIES_VERSION;\n } else {\n $this->version = '1.0.0';\n }\n $this->plugin_name = 'mtii_utilities';\n\n $this->load_dependencies();\n $this->set_locale();\n $this->define_admin_hooks();\n $this->define_public_hooks();\n }", "title": "" }, { "docid": "5fbf06143d97a33a990b1cbe3e6b3a1e", "score": "0.68086827", "text": "public function __construct()\n {\n\n $this->plugin_name = 'myfossil-resources';\n $this->version = '0.0.1';\n\n $this->load_dependencies();\n $this->set_locale();\n $this->define_admin_hooks();\n $this->define_public_hooks();\n\n }", "title": "" }, { "docid": "5bb4336a3ddaa3248a7bcd0dd0c3eda8", "score": "0.68060046", "text": "public function __construct() {\n\t\t/*Define Autoloader class for plugin*/\n\t\t$autoloader_path = 'includes/class-autoloader.php';\n\t\t/**\n\t\t * Include autoloader class to load all of classes inside this plugin\n\t\t */\n\t\trequire_once trailingslashit( plugin_dir_path( __FILE__ ) ) . $autoloader_path;\n\n\t\t/*Define required constant for plugin*/\n\t\tConstant::define_constant();\n\n\t\t/**\n\t\t * Register activation hook.\n\t\t * Register activation hook for this plugin by invoking activate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is activated.\n\t\t */\n\t\tregister_activation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->activate(\n\t\t\t\t\tnew Activator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register deactivation hook.\n\t\t * Register deactivation hook for this plugin by invoking deactivate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is deactivated.\n\t\t */\n\t\tregister_deactivation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->deactivate(\n\t\t\t\t\tnew Deactivator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register uninstall hook.\n\t\t * Register uninstall hook for this plugin by invoking uninstall\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is uninstalled.\n\t\t */\n\t\tregister_uninstall_hook(\n\t\t\t__FILE__,\n\t\t\tarray( 'Restaurant_Booking_Plugin', 'uninstall' )\n\t\t);\n\t}", "title": "" }, { "docid": "5313c558117d5d9454cc5f49ed1c7f79", "score": "0.67754394", "text": "public function __construct() {\n\t\t\n\t\t$this->pluginLoader = new Zend_Loader_PluginLoader ();\n\t}", "title": "" }, { "docid": "404706cd76a0209a5978ffdf86bb7633", "score": "0.67714363", "text": "public function __construct() {\n // hook plugin activation\n register_activation_hook(__FILE__, array(&$this, 'activatePlugin'));\n\n // hook admin functions\n if (is_admin()) {\n add_action('admin_menu', array(&$this, 'adminMenu'));\n add_action('plugins_loaded', array(&$this, 'downloadBackup'));\n }\n\n // compute base dir + url\n $plugin_dir_path = plugin_dir_path(__FILE__);\n $plugin_dir_url = plugin_dir_url(__FILE__);\n\n $base_url = is_multisite() ? network_home_url() : home_url();\n\n if (stripos($plugin_dir_url, $base_url) !== false) {\n $plugin_dir_url = str_replace($base_url, '', $plugin_dir_url);\n }\n\n if (stripos($plugin_dir_path, $plugin_dir_url) !== false) {\n $this->base_dir = str_replace($plugin_dir_url, '', $plugin_dir_path);\n } elseif (defined('ABSPATH')) {\n $this->base_dir = rtrim(ABSPATH, DIRECTORY_SEPARATOR);\n } else {\n wp_die('Could not determine base path from ' . $plugin_dir_path);\n }\n }", "title": "" }, { "docid": "2b4603980283fe2f13db42e1d355945e", "score": "0.6763431", "text": "public function __construct() {\n\t\t// TODO Auto-generated Constructor\n\t\t$this->pluginLoader = new Zend_Loader_PluginLoader ();\n\t\t\n\t}", "title": "" }, { "docid": "7c8e27d524211e8d8b1d4619271ffb36", "score": "0.67549354", "text": "protected function __construct()\n {\n parent::__construct();\n $this->initCommands = array();\n $this->additionalCode = array();\n $this->plugins = array();\n\n $this->fns['name'] = $this->fns['prototype'] = $this->fns['body'] = array();\n\n $this->fTheme = fTheme::getInstance();\n $this->fTheme->onBuild('Singleton', 'fjQuery', 'build', 99);\n }", "title": "" }, { "docid": "992a0ea278ada73491512f729401a8d7", "score": "0.6751951", "text": "public function __construct() {\n\n $this->plugin_slug = 'online-magazine';\n $this->version = '1.0.0';\n\n $this->load_dependencies();\n $this->define_admin_hooks();\n $this->define_public_hooks();\n\n }", "title": "" }, { "docid": "d610d00e6e100b9d0fa730946f0957c9", "score": "0.6745632", "text": "public function __construct() {\n\n\t\t\t// Load the required libraries, classes and option fields.\n\t\t\t$this->load_libraries();\n\t\t\t$this->load_classes();\n\n\t\t\t// Setup the plugin updater.\n\t\t\t$this->updater = new PluginUpdateChecker_2_0( base64_decode( 'aHR0cHM6Ly9rZXJubC51cy9hcGkvdjEvdXBkYXRlcy81NmMwZjNkMjMyMGY2YzY1MDNjOGY2MTA/Y29kZT0=' ), ASCRIPTA_ENGINE_FILE, 'ascripta', 1 );\n\n\t\t}", "title": "" }, { "docid": "50829070b071f86dfeb1a2b453805039", "score": "0.6744415", "text": "public function __construct( $plugin ) {\n\t\t$this->plugin = $plugin;\n\t}", "title": "" }, { "docid": "a297746f24349029bd6972d3e4c4a492", "score": "0.6721211", "text": "public function __construct() {\n if (defined('JUNGLEHUNTER_VERSION')) {\n $this->version = JUNGLEHUNTER_VERSION;\n } else {\n $this->version = '1.0.0';\n }\n $this->plugin_name = 'junglehunter';\n\n $this->load_dependencies();\n $this->define_admin_hooks();\n $this->define_rest_hooks();\n }", "title": "" }, { "docid": "fceced814232a3142b14b002ebb44fa5", "score": "0.6697969", "text": "public function __construct() {\n\n\t\t$this->pluginName = 'ssm/core';\n\t\t$this->loader = new Loader();\n\n $this->defineConstants();\n\n\t}", "title": "" }, { "docid": "1dd90940b0aee9e4f56e19b7b3f96e3a", "score": "0.6695378", "text": "public function construct() {\r\n\t}", "title": "" }, { "docid": "569dbd3769e3d41ab497b46d361f4524", "score": "0.66864926", "text": "public function __construct() {\n\t\t$this->basename = plugin_basename( __FILE__ );\n\t\t$this->directory_path = plugin_dir_path( __FILE__ );\n\t\t$this->directory_url = plugins_url( dirname( $this->basename ) );\n\t}", "title": "" }, { "docid": "4d8ef954457ac736eaa48baa6321a585", "score": "0.66834044", "text": "public function __construct() {\n $this->pluginLoader = new Zend_Loader_PluginLoader();\n }", "title": "" }, { "docid": "1c08b8bac8baea94f9805165d3687d88", "score": "0.66776454", "text": "function _construct() {}", "title": "" }, { "docid": "e49c02e48929af5f0a6ad491ab97ccbb", "score": "0.66640115", "text": "public function __construct()\n {\n $sPluginClass = preg_replace(\"/Widget$/\", 'Plugin', get_class($this));\n $this->oPlugin = new $sPluginClass;\n\t\tparent::__construct\n (\n\t\t\t$this->oPlugin->pluginId() . '_widget',\n\t\t\t__($this->oPlugin->pluginName() . ' Widget', $this->oPlugin->textDomain()),\n\t\t\t['description' => __($this->oPlugin->pluginDescription(), $this->oPlugin->textDomain())]\n\t\t);\n\t}", "title": "" }, { "docid": "d25e788370bbaff2a966d18b4521f446", "score": "0.66573125", "text": "public function __construct () {\r\n\t\t\t\t\r\n\t\t\t// Textdomain\r\n\t\t\tself::$textdomain = $this->get_textdomain();\r\n\t\t\t// Textdomain Path\r\n\t\t\tself::$textdomainpath = $this->get_domain_path();\r\n\t\t\t// Initialize the localization\r\n\t\t\t$this->load_plugin_textdomain();\r\n\t\t\t\t\r\n\t\t\t// The Plugins Basename\r\n\t\t\tself::$plugin_base_name = plugin_basename( __FILE__ );\r\n\t\t\t// The Plugins URL\r\n\t\t\tself::$plugin_url = $this->get_plugin_header( 'PluginURI' );\r\n\t\t\t// The Plugins Name\r\n\t\t\tself::$plugin_name = $this->get_plugin_header( 'Name' );\r\n\t\t\t\t\r\n\t\t\t// Load the features\r\n\t\t\t$this->load_features();\r\n\t\t}", "title": "" }, { "docid": "692c3b35448171d17e9286ec286f4443", "score": "0.6648281", "text": "public function __construct() {\n parent::__construct();\n $this->template_factory = new Flexi_TemplateFactory($this->getPluginPath() . '/templates');\n $this->assets = $this->getPluginURL() . '/assets/';\n }", "title": "" }, { "docid": "a8ae7b4235800262ea8f8edf599b1d37", "score": "0.6641834", "text": "protected function construct() {}", "title": "" }, { "docid": "c1405423d98032db25cd3cb90536981c", "score": "0.6633173", "text": "public function plugin ()\n {\n return new Plugin($this->url, $this->port);\n }", "title": "" }, { "docid": "0ca4a4b535d1ea9699cd1dde53d047eb", "score": "0.66297776", "text": "private function __construct() {\n\n\t\t// Setup static plugin_data\n\t\tself::$plugin_data = array(\n\t\t\"name\" => \"WPE Blog Styles Pro\",\n\t\t\"slug\" => \"blog-styles-pro-menu\",\n\t\t\"version\" => \"1.1.4\",\n\t\t\"author\" => \"WP Expanse\",\n\t\t\"description\" => \"WPE Blog Styles Pro is a very simple, yet powerful stylesheet manager. Give your blog a consistent, elegant, and proffesional design.\",\n\t\t\"logo\" => plugins_url( 'images/logo.png', __FILE__ ),\n\t\t\"url-author\" => \"http://wpexpanse.com/\",\n\t\t\"url-blog\" => \"http://wpexpanse.com/blog/\",\n\t\t\"url-main\" => \"http://wpexpanse.com/wpe-blog-styles-pro/\",\n\t\t\"url-docs\" => \"http://wpexpanse.com/wpe-blog-styles-pro-documentation/\",\n\t\t\"this-root\" => plugins_url( '', __FILE__ ).\"/\",\n\t\t\"this-dir\" => plugin_dir_path( __FILE__ ),\n\t\t\"shared-root\" => plugins_url().\"/wpe-shared-data/\",\n\t\t\"shared-dir\" => plugin_dir_path( __DIR__ ).\"wpe-shared-data/\",\n\t\t\"shared-bsp-root\" => plugins_url().'/wpe-shared-data/wpe-blog-styles/',\n\t\t\"shared-bsp-dir\" => plugin_dir_path( __DIR__ ).\"wpe-shared-data/wpe-blog-styles/\",\n\t\t\"shared-core\" => \"wpe-core/\",\n\t\t\"library-root\" => plugins_url( '/library/', __FILE__ ),\n\t\t\"library-dir\" => plugin_dir_path( __FILE__ ).\"library/\"\n\t\t);\n\n\n\t\t/* Initiate the BSP main Init class First */\n\t\trequire_once 'includes/wpe-bsp-admin-init.php';\n\t\tself::$admin_init = new WEXPANSE_BSP_Admin_Init();\n\n\t\t/* Initiate WPE CORE */\n self::$admin_init->init_wpe_core();\n\n\t\t// BSP Core Classes & Class Extensions\n\t\trequire_once 'includes/wpe-bsp-admin-functions.php';\n\t\trequire_once 'includes/wpe-bsp-functions.php';\n\t\trequire_once 'includes/wpe-bsp-ui.php';\n\t\t\n\t\t// Initiate Classes\n\t\tself::$admin_functions = new WEXPANSE_BSP_Admin_Functions();\n\t\tself::$functions = new WEXPANSE_BSP_Functions();\n\t\tself::$less = new Less_Parser(array( 'compress'=>true ));\n\t\tself::$helpers = new WPEXPANSE_Shared_Helpers();\n\t\tself::$ui = new WPEXPANSE_BSP_UI();\n\n\t\t// If BSP theme Library out of date or doesn't exist then create it\n\t\tself::$admin_init->detect_library_version();\n\n\t\t// Register the activation hook\n\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\n\t\t// Register the deactivation hook\n\t\tregister_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\n\t}", "title": "" }, { "docid": "fb3f36ea01d65d6208dc664d3a53c354", "score": "0.6618863", "text": "protected function __construct() {\n\t\t// Actions.\n\t\tadd_action( 'admin_menu', array( $this, 'create_plugin_page' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\n\t\tadd_action( 'wp_ajax_ocdi_import_demo_data', array( $this, 'import_demo_data_ajax_callback' ) );\n\t\tadd_action( 'wp_ajax_ocdi_import_customizer_data', array( $this, 'import_customizer_data_ajax_callback' ) );\n\t\tadd_action( 'wp_ajax_ocdi_after_import_data', array( $this, 'after_all_import_data_ajax_callback' ) );\n\t\tadd_action( 'after_setup_theme', array( $this, 'setup_plugin_with_filter_data' ) );\n\t\tadd_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );\n\t}", "title": "" }, { "docid": "f0bb5b9e0854174a70573b400be25865", "score": "0.66021526", "text": "public function __construct() {\n\t\tif ( defined( 'TTR66_VERSION' ) ) {\n\t\t\t$this->version = TTR66_VERSION;\n\t\t} else {\n\t\t\t$this->version = '1.0.0';\n\t\t}\n\t\t$this->plugin_name = 'TTR66';\n\n\t\t$this->load_dependencies();\n\t\t$this->define_admin_hooks();\n\t}", "title": "" }, { "docid": "9242dc70254c8cdcdeabc2a59e89494b", "score": "0.6587439", "text": "function __construct( $plugin, $args ) {\r\n $this->plugin = $plugin;\r\n $this->name = ! empty( $args['name'] ) ? $args['name'] : get_class( $this );\r\n }", "title": "" }, { "docid": "2d8b6c08be2d5f6c85ae4bb26def1ef1", "score": "0.658237", "text": "protected function __construct() {\n\t\t$this->basename = plugin_basename( __FILE__ );\n\t\t$this->url = plugin_dir_url( __FILE__ );\n\t\t$this->path = plugin_dir_path( __FILE__ );\n\n\t\t$this->plugin_classes();\n\t\t$this->hooks();\n\n\t\tadd_action( 'init', array( $this, 'register_discogs_shortcodes' ), 0 );\n\t\tadd_action( 'init', array( $this, 'setup_scripts_and_styles' ), 0 );\n\n\t}", "title": "" }, { "docid": "65a178a9c5c83671a6a41536db5192cd", "score": "0.65772873", "text": "public function construct() {\n\n }", "title": "" }, { "docid": "e51c14ca259724bba39f843deba609a6", "score": "0.6577095", "text": "public function __construct()\n {\n $this->pluginLoader = new Zend_Loader_PluginLoader();\n }", "title": "" }, { "docid": "130418f7cb2e409a53c4b649aee236c7", "score": "0.6575175", "text": "function _construct(){ }", "title": "" }, { "docid": "e69b522249ff1112a13460b34883a02a", "score": "0.65480405", "text": "public function __construct() {\n\n\t\t$this->plugin = Advanced_Ads_Corner_Plugin::get_instance();\n\t\tadd_action( 'plugins_loaded', array( $this, 'wp_admin_plugins_loaded' ) );\n\t}", "title": "" }, { "docid": "0ebe8f0f552cb8da5464706ec15cad25", "score": "0.65286934", "text": "public function __construct(Loader $plugin){\n $this->plugin = $plugin;\n }", "title": "" }, { "docid": "0671c7d3c492e6b8f0aaf6c29d94d9e6", "score": "0.6504207", "text": "function JPlugin(& $subject) {\n\t\tparent::__construct($subject);\n\t}", "title": "" }, { "docid": "371b30df548e1fb776cb62c9070920e7", "score": "0.6501654", "text": "function __construct() {\n $list = plugin_list('helper');\n if(in_array('ckgedit',$list)) {\n $this->ckgedit_loaded=true;\n $this->helper = plugin_load('helper', 'ckgedit');\n }\n else if(in_array('ckgdoku',$list)) {\n $this->ckgedit_loaded=true;\n $this->helper = plugin_load('helper', 'ckgdoku');\n }\n }", "title": "" }, { "docid": "66b1e43132642391a5f2398232e1d932", "score": "0.6480042", "text": "function __construct() {\r\n\t\t$this->plugin_construction();\r\n\t\t\t\r\n\t\t// load the settings into the into the $this->options variable, apply defaults if not set.\r\n\t\t$this->plugin_load_settings();\r\n\t\t\r\n\t\t// Set the plugins basename\r\n\t\t//$this->filename = plugin_basename(__FILE__);\r\n\t\t$this->filename = $this->slug . \"/\" . $this->slug . \".php\";\r\n\t\t\r\n\t\t// full file and path to the plugin file\r\n\t\t$this->plugin_file = WP_PLUGIN_DIR .'/'.$this->filename ;\r\n\r\n\t\t// store the path to the plugin\r\n\t\t$this->plugin_path = WP_PLUGIN_DIR.'/'.str_replace(basename( $this->filename),\"\",plugin_basename($this->filename));\r\n\t\t\t\r\n\t\t// store the url to the plugin\r\n\t\t$this->plugin_url = plugin_dir_url( $this->plugin_file );\r\n\t\r\n\t\t$this->framework_file = __FILE__;\r\n\t\t$this->framework_path = str_replace(basename( $this->framework_file),\"\",$this->framework_file);\r\n\t\t$this->framework_url = str_replace(ABSPATH,trailingslashit(get_option( 'siteurl' )),$this->framework_path);\r\n\t\r\n\t\t// Save the custom post data with the post\r\n\t\tadd_action('save_post', array(&$this,'plugin_save_post_meta')); \r\n\t\t\t\r\n\t\t// Register some custom post types\r\n\t\tadd_action('init', array($this,'plugin_register_post_types'));\r\n\t\t\r\n\t\t// Add filters and actions\r\n\t\tadd_action( 'admin_init', array($this,'plugin_register_options') );\r\n\t\tadd_action( 'admin_init', array($this,'plugin_define_options_meta_boxes') );\r\n\t\t\r\n\t\tadd_action('admin_init', array(&$this,'plugin_register_default_meta_boxes') ); // Add the support and forum sidebar metaboxes to options page\r\n\t\t\t\r\n\t\t\r\n\t\t// Add the plugins options page\r\n\t\tadd_action( 'admin_menu', array($this,'plugin_add_options_page') );\r\n\r\n\t\t// Set plugin page to two columns\r\n\t\tadd_filter('screen_layout_columns', array(&$this, 'plugin_layout_columns'), 10, 2);\r\n\t\t\r\n\t\tadd_action('admin_init', array(&$this,'plugin_register_admin_scripts') );\t // Register the scripts and styles for the plugin options page\r\n\t\t\t\r\n\t\t// Ensure there is an add to editor button for attachment uploads\r\n\t\tadd_filter('get_media_item_args', array(&$this, 'allow_img_insertion') );\r\n\r\n\t\t\t\t\r\n\t\t// Register the activation hook\r\n\t\tregister_activation_hook($this->filename, array( $this, 'plugin_activate' ) );\r\n\t\tregister_deactivation_hook($this->filename, array( $this, 'plugin_deactivate' ) );\r\n\t\t\r\n\t\t// Setup the ajax callback for autocomplete widget\r\n\t\tadd_action('wp_ajax_suggest_action', array(&$this,'plugin_suggest_callback'));\r\n\t\t\r\n\t\tadd_action('admin_menu', array(&$this, 'plugin_define_post_meta_boxes')); // Add meta boxes for the custom post types\r\n\t\t\r\n\t\t\tadd_filter('wp_insert_post_data', array(&$this, 'plugin_generate_title'), 99, 2);\r\n\t}", "title": "" }, { "docid": "54731fdcbf992d7dbc6ea7904414331c", "score": "0.6479268", "text": "public function __construct()\n {\n \tglobal $psp;\n\n \t$this->the_plugin = $psp;\n\t\t\t$this->module_folder = $this->the_plugin->cfg['paths']['plugin_dir_url'] . 'modules/remote_support/';\n\t\t\t$this->module = $this->the_plugin->cfg['modules']['remote_support'];\n\n\t\t\tif (is_admin()) {\n\t add_action('admin_menu', array( &$this, 'adminMenu' ));\n\t\t\t}\n\n\t\t\t// load the ajax helper\n\t\t\trequire_once( $this->the_plugin->cfg['paths']['plugin_dir_path'] . 'modules/remote_support/ajax.php' );\n\t\t\tnew pspRemoteSupportAjax( $this->the_plugin );\n }", "title": "" }, { "docid": "f12380df2bce8dec7b14a9230c1f9ae3", "score": "0.64763266", "text": "private function __construct() {\n\n\t\t\t// Load plugin text domain\n\t\t\tadd_action( 'init', array( $this, 'plugin_textdomain' ) );\n\n\t\t /*\n\t\t * Add the options page and menu item.\n\t\t * Uncomment the following line to enable the Settings Page for the plugin:\n\t\t */\n\t\t //add_action( 'admin_menu', array( $this, 'plugin_admin_menu' ) );\n\n\t\t /*\n\t\t\t * Register admin styles and scripts\n\t\t\t * If the Settings page has been activated using the above hook, the scripts and styles\n\t\t\t * will only be loaded on the settings page. If not, they will be loaded for all\n\t\t\t * admin pages.\n\t\t\t *\n\t\t\t * add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_styles' ) );\n\t\t\t * add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );\n\t\t\t */\n\n\t\t\t// Register site stylesheets and JavaScript\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_styles' ) );\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_scripts' ) );\n\n\t\t\t// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.\n\t\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\t\tregister_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\n\t\t /*\n\t\t * TODO:\n\t\t *\n\t\t * Define the custom functionality for your plugin. The first parameter of the\n\t\t * add_action/add_filter calls are the hooks into which your code should fire.\n\t\t *\n\t\t * The second parameter is the function name located within this class. See the stubs\n\t\t * later in the file.\n\t\t *\n\t\t * For more information:\n\t\t * http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters\n\t\t */\n\t\t add_action( 'TODO', array( $this, 'action_method_name' ) );\n\t\t add_filter( 'TODO', array( $this, 'filter_method_name' ) );\n\n\t\t}", "title": "" }, { "docid": "81654d4da11d7593f38e17af53eb8a4b", "score": "0.6476025", "text": "public function initFactory()\n {\n $this->generatePluginListing();\n $this->loadDrivers();\n return $this;\n }", "title": "" }, { "docid": "f86d4722fa31c226241c25e0ec9078a7", "score": "0.64757484", "text": "public function __construct() {\r\n\r\n\t\t$this->plugin_name = 'blossomthemes-email-newsletter';\r\n\t\t$this->version = '1.0.0';\r\n\r\n\t\t$this->load_dependencies();\r\n\t\t$this->set_locale();\r\n\t\t$this->define_admin_hooks();\r\n\t\t$this->define_public_hooks();\r\n\r\n\t}", "title": "" }, { "docid": "604560a88135fdc89cffa44f0f05bb71", "score": "0.64608455", "text": "public function __construct() {\n\n\t\t\t// Define in extension\n\t\t\t\n\t\t}", "title": "" }, { "docid": "7c1013ee852a93b927077fefd3c13e8e", "score": "0.64405936", "text": "function __construct() {\n\t\t$request = Request::getInstance();\n\t\t$plugin = Plugin::getInstance();\n\t\t$plugin->triggerEvents('load' . $request->getController());\n\t}", "title": "" }, { "docid": "fd9888b7f6ecf795ff4f63e8524985d2", "score": "0.6438593", "text": "private function __construct()\n {\n\n /*\n * @TODO :\n *\n * - Uncomment following lines if the admin class should only be available for super admins\n */\n /* if( ! is_super_admin()) {\n return;\n } */\n\n /*\n * Call $plugin_slug from public plugin class.\n */\n $plugin = Dokan_Upshot::get_instance();\n $this->plugin_slug = $plugin->get_plugin_slug();\n\n $enable_option = get_option( 'dokan_product_subscription', array( 'enable_pricing' => 'off' ) );\n if( !isset( $enable_option['enable_pricing'] ) || $enable_option['enable_pricing'] != 'on' )\n {\n return;\n }\n\n // Load admin style sheet and JavaScript.\n add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );\n add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );\n\n // Add the options page and menu item.\n add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );\n\n // Add an action link pointing to the options page.\n $plugin_basename = plugin_basename( plugin_dir_path( realpath( dirname( __FILE__ ) ) ) . $this->plugin_slug . '.php' );\n add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );\n\n /*\n * Define custom functionality.\n *\n * Read more about actions and filters:\n * http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters\n */\n //add_action( 'plugins_loaded', array( $this, 'schedule_task' ));\n add_action( 'admin_init', array( $this, 'register_mysettings' ) );\n\n\n }", "title": "" }, { "docid": "0c1c2abb7dd87399db30883bb769976a", "score": "0.64201444", "text": "public function __construct()\n\t\t{\n\t\t\t// get 'blogname' field from database, if empty default to 'My Blog'\n\t\t\t$this->thingName = !empty(get_option('blogname')) ? get_option('blogname') : 'My Blog';\n\n\t\t\t// look up settings and populate instance array\n\t\t\t$this->getSettings();\n\n\t\t\t// this will be used for Thingdom calls and will always contain a static value unless this is the first invocation of the plugin\n\t\t\t$this->secret = $this->settings['secret'];\n\n\t\t\t// fire off method to update Thingdom status variables\n\t\t\t$this->updateStatus();\n\n\t\t\t// get other plugin options and build array\n\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action('admin_menu', array($this, 'registerMenu'));\n\n\t\t\t\tif(!empty($this->secret)) {\n\t\t\t\t\t// register all Thingdom-specific admin actions based on plugin configuration\n\t\t\t\t\tif($this->settings['posts'] == 1 || $this->settings['pages'] == 1) {\t\t\t\t\t\t\n\t\t\t\t\t\tadd_action('transition_comment_status', array($this, 'updateComment'), 10, 3);\n\t\t\t\t\t\tadd_action('transition_post_status', array($this, 'postHandler'), 10, 3);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!empty($this->secret)) {\n\t\t\t\t// register all Thingdom-specific non-admin actions based on plugin configuration\n\t\t\t\tif($this->settings['comments'] == 1) {\n\t\t\t\t\tadd_action('comment_post', array($this, 'newComment'), 10, 1);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "39af1303801afc4c9e3c7313aa0b4079", "score": "0.6416553", "text": "public function __construct() {\n\t\tif ( defined( 'MP_BOOKS_VERSION' ) ) {\n\t\t\t$this->version = MP_BOOKS_VERSION;\n\t\t} else {\n\t\t\t$this->version = '1.0.0';\n\t\t}\n\t\t$this->plugin_name = 'mp-books';\n\n\t\t$this->load_dependencies();\n\t\t$this->set_locale();\n\t\t$this->define_admin_hooks();\n\t\t$this->define_public_hooks();\n\n\t}", "title": "" }, { "docid": "474fbb4e0fff9c5668c79c1d250aaa2e", "score": "0.6390529", "text": "public function __construct(){\r\n include_once plugin_dir_path( __FILE__ ).'core/gaia-media.php';\r\n include_once plugin_dir_path( __FILE__ ).'core/taxonomy_gaia.php';\r\n //instanciation des class contenu dans les fichiers\r\n new Gaia_media();\r\n new Taxonomy_gaia();\r\n }", "title": "" }, { "docid": "732e43e8b7db72628843ec40185758dc", "score": "0.6382919", "text": "function __construct() {\n\t\t$settings = new CSS_Tricks_Can_He_Loginz_Settings();\n\n\t\t// The meta_key for our plugin options in the database.\n\t\t$settings_slug = $settings -> settings_slug;\n\t\t\n\t\t// The array of settings for this plugin.\n\t\t$settings_array = $settings -> settings_array;\n\n\t\t// The admin UI text for the settings page.\n\t\t$plugin_label = esc_html__( 'CSS-Tricks Can He Loginz Settings', 'css-tricks-can-he-loginz' );\n\n\t\t// Pass this stuff to the client plugin, which will automatically draw a settings page.\n\t\tparent::__construct( $settings_slug, $settings_array, $plugin_label );\n\n\t}", "title": "" }, { "docid": "43394b3ebf29f185549522f20055d245", "score": "0.63606465", "text": "public function __construct() {\n require_once __DIR__ . '/vendor/autoload.php';\n $this->define_constants();\n register_activation_hook( __FILE__, array( $this, 'activate' ) ); \n add_action( 'plugins_loaded', array( $this, 'init_plugin' ) ); \n }", "title": "" }, { "docid": "c2cbd6ab91db969ae1f47e90e89964c4", "score": "0.6342932", "text": "public function plugin_setup() {\n $this->plugin_url = plugins_url('/', __FILE__);\n $this->plugin_path = plugin_dir_path(__FILE__);\n $this->load_language('psr4-wordpress-plugin');\n\n\n spl_autoload_register([$this, 'autoload']);\n // Example: Modify the Contents\n Actions\\Post::addEmojiToContents();\n }", "title": "" }, { "docid": "ebe0b8f0b7ccd96ae9e733db724f1648", "score": "0.6339828", "text": "public static function init() {\r\n\t\tself :: $uri = plugin_dir_url( __FILE__ );\r\n\t\tself :: $dir = plugin_dir_path( __FILE__ );\r\n\t\tself :: etruel_del_post_copies_locale();\r\n\t\tif(is_admin()) $plugin_data = get_plugin_data( __FILE__ );\r\n\t\tself :: $name = $plugin_data['Name'];\r\n\t\tself :: $version = $plugin_data['Version'];\r\n\r\n\t\tnew self( TRUE ); // call __construct\r\n\t}", "title": "" }, { "docid": "a0c30614e226f5a4231165e26f7bb24f", "score": "0.6328489", "text": "public function __construct() {\n $this->settings = craft()->plugins->getPlugin('Mobi2Go')->getSettings();\n }", "title": "" }, { "docid": "7af2064481e009ef6437c22faad3d68e", "score": "0.63266", "text": "function __construct( $slug ) {\n\t\t\n\t\t$this->slug = $slug;\n\t\t$this->response = array();\n\t\t\n\t\t// get all plugins managed by this plugin\n\t\t// talk about a swirling vortex of DOOM!\n\t\t$this->plugins = get_option( 'pue-plugins', array() );\n\t\t\n\t\t$this->response['slug'] = $slug;\n\t\t$this->plugin_head();\n\t\t$this->plugin_package();\n\t}", "title": "" }, { "docid": "44484c65da798967f5947c71b3ec1bf2", "score": "0.6313807", "text": "private function __construct() {\n\t\t$plugin = Tribe__Events__Main::instance();\n\n\t\tadd_action( 'admin_menu', array( $this, 'register_menu_item' ) );\n\t\tadd_action( 'current_screen', array( $this, 'action_request' ) );\n\t\tadd_action( 'init', array( $this, 'init' ) );\n\n\t\t// check if the license is valid each time the page is accessed\n\t\tadd_action( 'tribe_aggregator_page_request', array( $this, 'check_for_license_updates' ) );\n\n\t\t// filter the plupload default settings to remove mime type restrictions\n\t\tadd_filter( 'plupload_default_settings', array( $this, 'filter_plupload_default_settings' ) );\n\n\t\t// Setup Tabs Instance\n\t\t$this->tabs = Tribe__Events__Aggregator__Tabs::instance();\n\n\t\ttribe_notice( 'tribe-aggregator-legacy-import-plugins-active', array( $this, 'notice_legacy_plugins' ), 'type=warning' );\n\t}", "title": "" }, { "docid": "02453b7895d082bf41d1c580f73e7add", "score": "0.63094", "text": "public static function Initialize()\n {\n self::$cli_parser = new CommandLine\\Parser;\n\n // Set Application details\n self::$cli_parser->application_name = \"peg-custom\";\n self::$cli_parser->application_version = \"1.0\";\n self::$cli_parser->application_description = t(\"PHP Extension Generator (http://github.com/peg-org/peg-custom)\");\n\n // Create commands\n self::$help_command = new Command\\Help;\n self::$init_command = new Command\\Init;\n self::$parse_command = new Command\\Parse;\n self::$generate_command = new Command\\Generate;\n\n // Register command operations\n self::$cli_parser->RegisterCommand(self::$help_command);\n self::$cli_parser->RegisterCommand(self::$init_command);\n self::$cli_parser->RegisterCommand(self::$parse_command);\n self::$cli_parser->RegisterCommand(self::$generate_command);\n\n // Initialize the plugin loader and try to load any plugins.\n self::$plugin_loader = new \\Peg\\Lib\\Plugins\\Loader();\n\n if(self::ValidExtension())\n {\n self::$plugin_loader->Start(self::GetCwd() . \"/plugins\");\n\n if(file_exists(self::GetCwd() . \"/peg.conf\"))\n {\n Settings::SetBackEnd(new \\Peg\\Lib\\Config\\INI);\n Settings::Load(self::GetCwd(), \"peg.conf\");\n }\n else\n {\n Settings::SetBackEnd(new \\Peg\\Lib\\Config\\JSON);\n Settings::Load(self::GetCwd(), \"peg.json\");\n }\n }\n }", "title": "" }, { "docid": "dbac046139b4ac8bb0e2c646f9494faa", "score": "0.6307577", "text": "function adminer_object() {\r\n include_once \"./plugins/plugin.php\";\r\n \r\n // autoloader\r\n foreach (glob(\"plugins/*.php\") as $filename) {\r\n include_once \"./$filename\";\r\n }\r\n \r\n $plugins = array(\r\n // specify enabled plugins here\r\n // new AdminerDumpXml,\r\n // new AdminerTinymce,\r\n // new AdminerFileUpload(\"data/\"),\r\n // new AdminerSlugify,\r\n // new AdminerTranslation,\r\n // new AdminerForeignSystem,\r\n // new AdminerLoginPasswordLess(password_hash(\"\", PASSWORD_DEFAULT)),\r\n );\r\n \r\n /* It is possible to combine customization and plugins:\r\n class AdminerCustomization extends AdminerPlugin {\r\n }\r\n return new AdminerCustomization($plugins);\r\n */\r\n class AdminerCustomization extends AdminerPlugin {\r\n function login($login, $password) {\r\n // validate user submitted credentials\r\n return true;\r\n }\r\n }\r\n return new AdminerCustomization($plugins);\r\n \r\n // return new AdminerPlugin($plugins);\r\n}", "title": "" }, { "docid": "397c85b4035619582eb121bf0b8de11b", "score": "0.630131", "text": "public function __construct() {\n\t\t\t$this->pluginDir\t\t= basename(dirname(__FILE__));\n\t\t\t$this->pluginPath\t\t= WP_PLUGIN_DIR . '/' . $this->pluginDir;\n\t\t\t$this->pluginUrl \t\t= WP_PLUGIN_URL.'/'.$this->pluginDir;\t\n\t\t\t\n\t\t\t$opts = array(\n\t\t\t\t'url' => $this->pluginUrl, \n\t\t\t\t'view' => 'wp-cb-wysiwyg/wysiwyg-view.php',\t\t\t\t\n\t\t\t\t'description' => __('Provides Wordpress Wysiwyg CB Module.', 'carrington-build'),\n\t\t\t\t'icon' => 'wp-cb-wysiwyg/wysiwyg-icon.png'\n\t\t\t);\n\t\t\t\n\t\t\t// use if this module is to have no user configurable options\n\t\t\t// Will suppress the module edit button in the admin module display\n\t\t\t# $this->editable = false \n\t\t\t\n\t\t\tparent::__construct('cfct-wysiwyg', __('WP Wysiwyg', 'carrington-build'), $opts);\n\t\t}", "title": "" }, { "docid": "340e0ddb2f6b85da1d828878852fb0f0", "score": "0.6288788", "text": "private function __construct()\n {\n\t if (!defined('PLUGIN_NAME_VERSION'))\n\t\t define('PLUGIN_NAME_VERSION', '1.0.0');\n\n\t $this->version = PLUGIN_NAME_VERSION;\n }", "title": "" }, { "docid": "ee8186f161761501ee47fd8b82fa975b", "score": "0.628852", "text": "function Plugin_Base()\n\t{\n\t\t// $web may actually be null if this is a page plugin loaded from\n\t\t// the commandline execution profile.\n\t\t$this->web =& Registry::get('pronto:web');\n\t\t$this->depends = new stdClass;\n\n\t\tif(method_exists($this, '__init__')) {\n\t\t\t$this->__init__();\n\t\t}\n\t}", "title": "" }, { "docid": "b9e24ad6922c48e9c40fcdf21e094b12", "score": "0.62767553", "text": "public function __construct() {\n\t\t\t// Initialize Settings\n\t\t\trequire_once(sprintf(\"%s/settings.php\", dirname(__FILE__))); //引入 当前目录替代%s返回的目录文件 ,dirname(__FILE__)表示当前文件的绝对路径\n\t\t\t$WP_Canvas_Best_Settings = new WP_Canvas_Best_Settings(); //生成设置实例。\n\n\t\t\t$plugin = plugin_basename(__FILE__); //插件当前文件名赋值,plugin_basename(__FILE__)表示插件当前文件的文件名称。\n\t\t\tadd_filter(\"plugin_action_links_$plugin\", array( $this, 'plugin_settings_link' )); //设置过滤钩子(名称,挂载的函数), array( $this, 'plugin_settings_link' )表示将函数引用到当前实例\n\t\t}", "title": "" }, { "docid": "8bba3198830da5a5ff1a38e6b06990ce", "score": "0.6267175", "text": "function __construct($plugin, $profile) {\n $this->plugin = $plugin;\n $this->profile = $profile;\n }", "title": "" }, { "docid": "520b9480b47517d0923420e7bc45dfa4", "score": "0.62659174", "text": "public function __construct()\n {\n \tglobal $psp;\n\n \t$this->the_plugin = $psp;\n\t\t\t$this->module_folder = $this->the_plugin->cfg['paths']['plugin_dir_url'] . 'modules/google_pagespeed/';\n\t\t\t$this->module = $this->the_plugin->cfg['modules']['google_pagespeed'];\n\n\t\t\tif (is_admin()) {\n\t add_action('admin_menu', array( &$this, 'adminMenu' ));\n\t\t\t}\n\t\t\t\n\t\t\t// load the ajax helper\n\t\t\trequire_once( $this->the_plugin->cfg['paths']['plugin_dir_path'] . 'modules/google_pagespeed/ajax.php' );\n\t\t\tnew pspPageSpeedInsightsAjax( $this->the_plugin );\n }", "title": "" }, { "docid": "b6eb8b3b9abc18c9a4cc16927e0a51d2", "score": "0.6241281", "text": "public function plugin_classes() {\n\t\t$this->options = new Options( $this ) ;\n\t\t$this->helpers = new Helpers( $this );\n\t\t$this->core = new Core( $this );\n\t}", "title": "" }, { "docid": "094dcce6e69ab13b670ff67b88790d20", "score": "0.62338567", "text": "public function __construct() {\n\n\t\tif ( defined( 'SERVICE_TRACKER_VERSION' ) ) {\n\t\t\t$this->version = SERVICE_TRACKER_VERSION;\n\t\t} else {\n\t\t\t$this->version = '1.0.0';\n\t\t}\n\t\t$this->plugin_name = 'service-tracker';\n\n\t\tif ( ! class_exists( 'WooCommerce' ) ) {\n\t\t\t$this->add_client_role();\n\t\t}\n\n\t\t$this->load_dependencies();\n\t\t$this->set_locale();\n\t\t$this->define_admin_hooks();\n\t\t$this->api();\n\t\t$this->define_public_hooks();\n\t\t$this->public_user_content();\n\t}", "title": "" }, { "docid": "1450f3077aaf8c58569e38baa9cc272a", "score": "0.6233538", "text": "public static function init() {\n\t\treturn new self;\n\t}", "title": "" }, { "docid": "9efd789d8d28c7e21433c84241b0de02", "score": "0.6220886", "text": "function __construct() \n {\n $this->plugin_path = plugin_dir_path( __FILE__ ); // has trailing /\n $this->plugin_url = plugin_dir_url( __FILE__ );\n // Set up activation hooks\n register_activation_hook( __FILE__, array(&$this, 'activate') );\n register_deactivation_hook( __FILE__, array(&$this, 'deactivate') );\n // Set up l10n\n // load_plugin_textdomain( 'plugin-name-locale', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\n add_action( 'wp_enqueue_scripts', array( $this, 'queScripts'));\n \n add_action('admin_init', array( $this, 'adminInit'));\n add_action('admin_menu', array( $this, 'addMenu'));\n \n // Add your own hooks/filters\n add_action( 'init', array( $this, 'init') );\n add_filter( 'eStore_below_cart_checkout_filter', array( $this, 'addBeanstreamButton'));\n }", "title": "" }, { "docid": "ef533514ce266c4561a05ef99542ab6c", "score": "0.62204266", "text": "function __construct()\r\n \t{\t\r\n \t\tif ( ! defined( 'TMM_ABSPATH' ) ) {\r\n\t\t\tdefine( 'TMM_ABSPATH', dirname( __FILE__ ) . '/' );\r\n\t\t}\r\n\t\tif ( ! defined( 'TMM_REALPATH' ) ) {\r\n\t\t\tdefine( 'TMM_REALPATH', plugin_dir_url( __FILE__ ) );\r\n\t\t}\r\n \t\t\r\n \t\t$this->includes();\r\n \t}", "title": "" }, { "docid": "a7661dc0f43b64a90b112dcfc6c41b7a", "score": "0.62162817", "text": "function __construct() {\n\t\t// Register site styles and scripts\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_styles' ) );\n\t\t\n\t\t// Check for API Settings\n\t if ( function_exists('ccbpress_is_api_connected') && ccbpress_is_api_connected() ) {\n\t\t\t// Load the shortcodes\n\t\t\tinclude_once( plugin_dir_path( __FILE__ ) . 'lib/shortcodes/group_info.php' );\n } else {\n\t //add_action( 'admin_notices', 'ccbpress_show_api_setting_warning' );\n }\n\n\t\t// Show a warning if the license is not active\n\t\tif ( get_option( 'ccbpress_license_status' ) != 'valid' ) {\n\t\t\t//add_action( 'admin_notices', 'ccbpress_show_license_warning' );\n\t\t}\n\t}", "title": "" }, { "docid": "91b24beb4d2b8b11f9a0c05b02e9cb59", "score": "0.6204293", "text": "public function __construct() {\n\t\t$options = get_option( 'tbcv_settings' );\n\t\t$this->status = isset( $options['status'] ) ? $options['status'] : '';\n\t\t$this->plugin_url = plugin_dir_url( __FILE__ );\n\n\t\tadd_action( 'plugins_loaded', array( $this, 'i18n' \t ), 3 );\n\t\tadd_action( 'plugins_loaded', array( $this, 'includes' ), 3 );\n\n\t\tif ( $this->status ) {\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) \t\t );\n\t\t\tadd_filter( 'comment_text', \t array( $this, 'add_voting' ), 10, 2 );\n\t\t}\n\t}", "title": "" }, { "docid": "365ae870f275a1073b2d4fb6412a2425", "score": "0.61891216", "text": "public function __construct() {\n\t\tif ( defined( 'BITWISE_SIDEBAR_CONTENT_VERSION' ) ) {\n\t\t\t$this->version = BITWISE_SIDEBAR_CONTENT_VERSION;\n\t\t} else {\n\t\t\t$this->version = '1.0.0';\n\t\t}\n\t\t$this->plugin_name = 'bitwise-sidebar-content';\n\n\t\t$this->load_dependencies();\n\t\t$this->set_locale();\n\t\t$this->define_admin_hooks();\n\t\t$this->define_public_hooks();\n\t}", "title": "" }, { "docid": "0a77b6bfab2f81251ad31ee60a459f80", "score": "0.61865836", "text": "public function plugin_classes() {\r\n\t\t$this->filesystem = new PDT_Filesystem( $this );\r\n\t\t$this->auth = new PDT_Auth( $this );\r\n\t\t$this->api = new PDT_Api( $this );\r\n\t\t$this->plugins = new PDT_Plugins( $this );\r\n\t\t$this->installed = new PDT_Installed( $this );\r\n\t\t$this->cases = new PDT_Cases( $this );\r\n\t\t$this->clues = new PDT_Clues( $this );\r\n\t\t$this->detective = new PDT_Detective( $this );\r\n\t}", "title": "" }, { "docid": "d6bf50648a6e0f9f8eacf3b45568b8e6", "score": "0.61853135", "text": "function __construct() {\n\n\t\t// vars\n\t\t$this->settings = array(\n\t\t\t'version'\t=> '1.0.0',\n\t\t\t'url'\t\t=> plugin_dir_url( __FILE__ ),\n\t\t\t'path'\t\t=> plugin_dir_path( __FILE__ )\n\t\t);\n\n\n\t\t// set text domain\n\t\t// https://codex.wordpress.org/Function_Reference/load_plugin_textdomain\n\t\tload_plugin_textdomain( 'acf-wp_polls_redux', false, plugin_basename( dirname( __FILE__ ) ) . '/lang' );\n\n\n\t\t// include field\n\t\tadd_action('acf/include_field_types', \tarray($this, 'include_field_types')); // v5\n\t\tadd_action('acf/register_fields', \t\tarray($this, 'include_field_types')); // v4\n\n\t}", "title": "" }, { "docid": "0edb16e5fc31b4615a71de95039cb7ac", "score": "0.61842424", "text": "public function initializeObject()\n\t{\n\t\t$this->pluginConfiguration = $this->configurationManager->getConfiguration('Settings');\n\n\t\t//t3lib_utility_Debug::debug($this->pluginConfiguration);\n\n\t\t//t3lib_utility_Debug::debug($this->generateUid('prefix', 'suffix'));\n\t\t//$GLOBALS['TYPO3_DB']->debugOutput = TRUE;\n\t\t//echo '---' . $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery . '---';\n\t}", "title": "" }, { "docid": "b12bb5f44121fda58ac9b4a3f2e85658", "score": "0.6181397", "text": "public function __construct() {\r\n\t\t\tadd_action( 'admin_notices', array($this, 'prosperity') );\r\n\t\t\tadd_action( 'admin_head', array($this, 'prosperity_css') );\t\t\t\r\n\t\t\tadd_shortcode( 'Prosperity', array($this, 'Prosperity_Handler') );\r\n\t\t\tadd_action( 'admin_menu', array($this, 'add_Prosperity_menu') );\r\n\t\t\tadd_action('widgets_init', array($this, 'RegisterProsperityWidget') );\r\n\t\t\tadd_filter('plugin_row_meta', array($this, 'create_prosperity_plugin_links'), 10, 2);\t\t\t\r\n\t\t}", "title": "" }, { "docid": "feab324e7420ae95d15e1781f2ead3d2", "score": "0.6180454", "text": "function __construct() {\n\n\t\t// vars\n\t\t$this->settings = array(\n\t\t\t'version'\t=> '1.0.0',\n\t\t\t'url'\t\t=> plugin_dir_url( __FILE__ ),\n\t\t\t'path'\t\t=> plugin_dir_path( __FILE__ )\n\t\t);\n\n\n\t\t// set text domain\n\t\t// https://codex.wordpress.org/Function_Reference/load_plugin_textdomain\n\t\tload_plugin_textdomain( 'acf-vimeo_pro_data', false, plugin_basename( dirname( __FILE__ ) ) . '/lang' );\n\n\n\t\t// include field\n\t\tadd_action('acf/include_field_types', \tarray($this, 'include_field_types')); // v5\n\t\tadd_action('acf/register_fields', \t\tarray($this, 'include_field_types')); // v4\n\n\t}", "title": "" }, { "docid": "24345245eba39c062dd200840388df1e", "score": "0.61776453", "text": "function __construct() ;", "title": "" }, { "docid": "3db07555309e3dfa1bbbd6c6ac4755ab", "score": "0.6172459", "text": "public function __construct(){\n\n \n\n \n // Loads the optionpanel/framework.php\n $this->include_redux_core();\n \n \n \n //optionpanel/config.php\n $this->inlcude_redux_config();\n \n $this->get_domain_list();\n \n /**\n * This code loads the cache status from ArvanCloud\n * And set the default values in plugin option\n */\n $this->call_cache_status();\n\n /**\n * Called when options in plugin options saved\n */\n \n add_action('redux/options/arvan/saved', array($this, 'redux_after_saved'));\n \n \n \n /**\n * Include javascripts\n */\n add_action('admin_enqueue_scripts', array($this, 'arvan_wp_enqueue_scripts'));\n \n \n /**\n * Will be called when Total Purge button clicked in plugin option\n */\n add_action(\"wp_ajax_nopriv_arvan_total_purge\", array($this,\"arvan_total_purge_ajax_nopriv\"));\n add_action(\"wp_ajax_arvan_total_purge\", array($this,\"arvan_total_purge_ajax\"));\n \n \n /**\n * To purge specific post url cache\n */\n add_action(\"publish_post\", array($this,\"arvan_save_post_action\"),1,3);\n\n }", "title": "" }, { "docid": "ec10ec7a2991aa6f9301166d7189e235", "score": "0.61723274", "text": "public function __construct(){\n // Initialize Settings\n require_once(sprintf(\"%s/settings.php\", dirname(__FILE__)));\n $KEYSPECS_Settings = new KEYSPECS_Settings($this);\n\n // Get options\n $this->options = get_option('KEYSPECS_settings');\n\n // Register styles\n add_action('wp_enqueue_scripts', array($this, 'register_public_styles'));\n\n // Register special pages\n add_action( 'init', array($this, 'crypto_url_vars') );\n add_action( 'template_redirect', array($this, 'crypto_redirect') );\n add_filter( 'wp_title', array($this, 'crypto_title'), 15, 3 );\n add_action( 'wp_ajax_nopriv_keyspecs_ajax', array($this, 'keyspecs_ajax_request'));\n\n // Register Settings\n self::$plugin_file = KEYSPECS_Plugin_MAIN_FILE_PATH;\n $this->plugin_name = strtolower(plugin_basename(dirname(self::$plugin_file)));\n $this->plugin_basename = plugin_basename(self::$plugin_file);\n $this->plugin_path = plugin_dir_path(self::$plugin_file);\n $this->plugin_url = plugin_dir_url(self::$plugin_file);\n }", "title": "" }, { "docid": "fa7dd94ad1d4f572b1d6d56f74695766", "score": "0.6171376", "text": "public function __construct() {\n\n register_activation_hook( __FILE__, array( $this, 'activate' ) );\n register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\n $this->file_includes();\n\n // Localize our plugin\n add_action( 'init', array( $this, 'localization_setup' ) );\n add_action( 'init', array( $this, 'init_post_types' ) );\n add_action( 'init', array( $this, 'init' ) );\n add_action( 'admin_notices', array( $this, 'required_plugin_notice' ) );\n\n add_filter( 'template_include', array( $this, 'template_loader' ), 20 );\n\n // Loads frontend scripts and styles\n add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\n add_filter( 'body_class', array($this, 'body_class') );\n\n add_filter( 'parent_file', array($this, 'fix_parent_menu' ) );\n }", "title": "" }, { "docid": "05ef949e48d1cae04466012ca5d45a2f", "score": "0.6163694", "text": "public function __construct( $plugin, $options = array() )\n\t{\n\t\t$this->plugin = $plugin;\n\t\t\n\t\tif ( count( $options ) > 0 )\n\t\t{\n\t\t\t$this->set( $options );\n\t\t}\n\t}", "title": "" }, { "docid": "18d40fc81b9a21e74627c4d1a71083be", "score": "0.6162084", "text": "public function __construct() {\n add_action('admin_menu', array($this, 'create_plugin_settings_page'));\n\n add_action( 'admin_init', array( $this, 'setup_sections' ) );\n add_action( 'admin_init', array( $this, 'setup_fields' ) );\n\n add_action('publish_page', array( $this , 'start_build'));\n add_action('publish_post', array( $this , 'start_build'));\n add_action('deleted_post', array( $this , 'start_build'));\n add_action('trashed_post', array( $this , 'start_build'));\n add_action('untrashed_post', array( $this , 'start_build'));\n add_action('save_post', array( $this , 'start_build'));\n }", "title": "" }, { "docid": "5e730ce6cb5a93cfd764e90e82eef5a2", "score": "0.6161568", "text": "function adminer_object(): AdminerPlugin\n {\n // include_once base_path('/adminer/plugins/plugin.php');\n\n $plugins = [];\n // autoloader\n foreach (glob(__DIR__ . '/../resources/adminer/plugins/*.php') as $filename) {\n include_once \"$filename\";\n }\n\n foreach (config('adminer-plugins.plugins') as $plugin) {\n $plugins[] = new $plugin;\n }\n\n /* It is possible to combine customization and plugins:\n class AdminerCustomization extends AdminerPlugin {\n }\n return new AdminerCustomization($plugins);\n */\n\n return new AdminerPlugin($plugins);\n }", "title": "" }, { "docid": "2517a3f3c64a251e43e83df1dbba97bd", "score": "0.61586636", "text": "public function __construct() {\n\t\tif ( defined( 'APS_VERSION' ) ) {\n\t\t\t$this->version = APS_VERSION;\n\t\t} else {\n\t\t\t$this->version = '1.0.0';\n\t\t}\n\t\t$this->plugin_name = APS_NAME;\n\n\t\t$this->load_dependencies();\n\t\t$this->set_locale();\n\t\t$this->define_admin_hooks();\n\t\t$this->load_aps_gateway();\n\t\t$this->load_ajax_routes();\n\t\t$this->load_wc_hooks();\n\t\t$this->define_public_hooks();\n\t}", "title": "" }, { "docid": "c2a58816e440aa96dd2145edf4cb7e93", "score": "0.61570674", "text": "function initializePlugin() {\n $plugin = new \\WordPress\\ThammIT\\Plugins\\TiWpShortcodes\\TiWpShortcodes;\n\n /**\n * Initialize the plugin\n */\n $plugin->init();\n}", "title": "" }, { "docid": "f51bc630393b6c349a32f11b2d320839", "score": "0.61492443", "text": "function create_plugin_class()\n\t{\n\t\t$argstring='';\n\t\t\t\n\t\t$numargs = func_num_args(); \n\t\t$classname = func_get_arg(0); \n\t\t\n\t\tif ($numargs > 1) { \n\t\t\t$arg_list = func_get_args();\n\n\t\t\tfor ($x=1; $x<$numargs; $x++) {\n\t\t\t\t$argstring .= '$arg_list['.$x.']';\n\t\t\t\tif ($x != $numargs-1) $argstring .= ',';\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (class_exists($classname))\n\t\t\treturn eval (\"return new $classname($argstring);\");\n\t\telse\n\t\t\tthrow new ClassNotFoundException(sprintf(_echo('plugins:exception:classnotfound'), $classname)); \n\t\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "169f12d5f90b2e1112ce3df70d6f6ad6", "score": "0.6143274", "text": "function __construct() {\n\n\t\t}", "title": "" }, { "docid": "0c29d37c3b0b486b3012d35af1d55741", "score": "0.61420625", "text": "public function __construct ( ) {\n\t\t# Parent Construct\n\t\t$result = parent::__construct(); // will handle priorities for us\n\t\t\n\t\t# Return result\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "3cb5d961a735ef5b2ba907681545698f", "score": "0.6141796", "text": "function __construct()\r\n\t\t{\r\n\t\t$MiniComponents =jomres_singleton_abstract::getInstance('mcHandler');\r\n\t\tif ($MiniComponents->template_touch)\r\n\t\t\t{\r\n\t\t\t$this->template_touchable=false; return;\r\n\t\t\t}\r\n\t\t$ePointFilepath = get_showtime('ePointFilepath'); \r\n\t\tif (file_exists($ePointFilepath.'language'.JRDS.get_showtime('lang').'.php'))\r\n\t\t\trequire_once($ePointFilepath.'language'.JRDS.get_showtime('lang').'.php');\r\n\t\telse\r\n\t\t\t{\r\n\t\t\tif (file_exists($ePointFilepath.'language'.JRDS.'en-GB.php'))\r\n\t\t\t\trequire_once($ePointFilepath.'language'.JRDS.'en-GB.php');\r\n\t\t\t}\r\n\t\t\r\n\t\tif (get_showtime('task') == \"asamodule_report\")\r\n\t\t\t{\r\n\t\t\t$showtime = jomres_singleton_abstract::getInstance('showtime');\r\n\t\t\t\r\n\t\t\t$asamodule_plugin_information = get_showtime('asamodule_plugin_information');\r\n\t\t\t\r\n\t\t\t$asamodule_plugin_information['j06000number_of_properties'] = \r\n\t\t\t\tarray(\r\n\t\t\t\t\t\"asamodule_task\"=>\"number_of_properties\",\r\n\t\t\t\t\t\"asamodule_info\"=>\"Designed to be used with asamodule, and will show the number of published properties on the site.\",\r\n\t\t\t\t\t\"asamodule_example_link\"=>JOMRES_SITEPAGE_URL_NOSEF.'&tmpl='.get_showtime(\"tmplcomponent\").'&topoff=1&task=number_of_properties',\r\n\t\t\t\t\t\"asamodule_manual_link\"=>''\r\n\t\t\t\t\t);\r\n\t\t\tset_showtime('asamodule_plugin_information',$asamodule_plugin_information);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "d8c3e4d542a7ad317d78884984e27290", "score": "0.6141526", "text": "public function __construct( $plugin_path, $api_url, $plugin_pages = [] ) {\n\n $plugin_data = get_file_data( $plugin_path, [\n 'name' => 'Plugin Name',\n 'version' => 'Version',\n 'author' => 'Author',\n ], 'plugin' );\n\n $this->plugin['name'] = $plugin_data['name'];\n $this->plugin['version'] = $plugin_data['version'];\n $this->plugin['author'] = $plugin_data['author'];\n $this->plugin['machine_name'] = str_replace( ' ', '-', strtolower( $this->plugin['name'] ) );\n $this->plugin['path'] = $plugin_path;\n $this->plugin['slug'] = plugin_basename( $this->plugin['path'] );\n $this->plugin['api_url'] = $api_url;\n $this->plugin['license'] = trim( get_option( $this->plugin['machine_name'].'_license_key' ) );\n $this->plugin['license_status'] = get_option( $this->plugin['machine_name'].'_license_status' );\n\n if ( is_string( $plugin_pages ) ) {\n $plugin_pages = [ 'page ' => $plugin_pages ];\n } elseif ( ! is_array( $plugin_pages ) ) {\n $plugin_pages = [];\n }\n add_action( 'admin_init', function () use ( $plugin_pages ) {\n\n $page_match = false;\n\n foreach ( $plugin_pages as $param => $value ) {\n if ( is_string( $value ) ) {\n $value = [ $value ];\n } elseif ( ! is_array( $value ) ) {\n $value = [];\n }\n if ( isset( $_GET[ $param ] ) && in_array( $_GET[ $param ], $value ) ) {\n $page_match = true;\n break;\n }\n }\n\n // Enqueue Scripts\n if ( $page_match ) {\n add_action( 'admin_print_scripts', [ $this, 'enqueue_scripts' ] );\n add_action( 'admin_print_styles', [ $this, 'enqueue_styles' ] );\n }\n\n add_action( 'admin_print_scripts-plugins.php', [ $this, 'enqueue_scripts' ] );\n add_action( 'admin_print_styles-plugins.php', [ $this, 'enqueue_styles' ] );\n\n // License GUI\n if ( $this->plugin['license_status'] !== 'valid' ) {\n\n if ( $page_match ) {\n\n add_action( 'admin_notices', [ $this, 'display_admin_notice' ] );\n\n }\n add_action('after_plugin_row_' . $this->plugin['slug'], [ $this, 'insert_license_row' ], 10, 3);\n\n } else {\n\n add_filter('plugin_action_links_' . $this->plugin['slug'], [ $this, 'insert_license_link'], 9, 2);\n add_action('after_plugin_row_' . $this->plugin['slug'], [ $this, 'insert_license_operation_row' ], 10, 3);\n\n }\n\n // Add Ajax Actions\n add_action( 'wp_ajax_'.$this->plugin['machine_name'].'-edd-client-operations', [ $this, 'edd_operations' ] );\n\n // Trigger Plugin Update\n $this->plugin_updater();\n\n }, 100 );\n\n }", "title": "" }, { "docid": "7cabc42c9ff16e24298f4ffbc002ee9c", "score": "0.61359215", "text": "function __construct() {\n\t\t$this->plugin_file = __FILE__;\n\t\t$this->plugin_basename = plugin_basename( $this->plugin_file );\n\n\t\tadd_action( 'admin_init', array( $this, 'settings_fields' ) );\n\t\tadd_action( 'admin_menu', array( $this, 'add_page' ) );\n\t\tadd_action( 'network_admin_menu', array( $this, 'add_page' ) );\n\n\t\tadd_action( 'wp_ajax_set_github_oauth_key', array( $this, 'ajax_set_github_oauth_key' ) );\n\t}", "title": "" }, { "docid": "ec2ed964aee514610ff7914595b4cf57", "score": "0.61356264", "text": "public function getPlugin();", "title": "" }, { "docid": "f48ab46931373edc0760864e81c1c277", "score": "0.6132557", "text": "function __construct(){\n\t\t$this->options();\n\t}", "title": "" } ]
1353592cb8936c03deb5664323ac1c67
Standard code module initialisation function.
[ { "docid": "daaae24b496c5940fe3da1722274aae2", "score": "0.0", "text": "function init__database__sqlserver_odbc()\n{\n safe_ini_set('odbc.defaultlrl', '20M');\n}", "title": "" } ]
[ { "docid": "a8c584796457cd21598cf65235c207c9", "score": "0.7518407", "text": "protected function init_module() {\n \n }", "title": "" }, { "docid": "a779aa65608b01a91319b332b8ea722f", "score": "0.74303335", "text": "protected function initModule()\n\t{\n\t}", "title": "" }, { "docid": "e323f4245a957f3b60795686362d18ed", "score": "0.739288", "text": "public static function init() {}", "title": "" }, { "docid": "e323f4245a957f3b60795686362d18ed", "score": "0.739288", "text": "public static function init() {}", "title": "" }, { "docid": "0e6e864e80a98aa08db362cf9785424f", "score": "0.7286766", "text": "protected function init()\n {}", "title": "" }, { "docid": "b2f5bc89f8dbda60e3ed92ccd99fad8b", "score": "0.72600776", "text": "public static function init();", "title": "" }, { "docid": "49283f9d55063e312f3d62d3cce8cbc5", "score": "0.72464013", "text": "public static function init() {\n\t\t}", "title": "" }, { "docid": "e6edfc644597e0970ebb34ec3c414efe", "score": "0.72319174", "text": "private function init()\n\t{\n\t}", "title": "" }, { "docid": "e23cc9548323c177cb36860168e166b3", "score": "0.72201467", "text": "public function init()\n {}", "title": "" }, { "docid": "34716a1c698d6b3a5e0ca611187bf081", "score": "0.72167164", "text": "public static function initializeModule()\n\t{\n\t}", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.7211693", "text": "public abstract function init();", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.7211693", "text": "public abstract function init();", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.7211693", "text": "public abstract function init();", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.7211693", "text": "public abstract function init();", "title": "" }, { "docid": "6936945723eb66c64dbe797f5e67e981", "score": "0.72115654", "text": "public static function init()\n {\n }", "title": "" }, { "docid": "3d18bdfc2f5f9d640c05ddd39a45b95f", "score": "0.7181676", "text": "private function init() {\n\t}", "title": "" }, { "docid": "a9bfc87063389e44429b718d0ee157d0", "score": "0.71584433", "text": "protected function _init() {\n\t}", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.71527946", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.71527946", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.71527946", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.71527946", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.71527946", "text": "public function init();", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.71519345", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.71517867", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.715144", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.715144", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.715144", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.715144", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.715144", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.715144", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.715144", "text": "public function init() {}", "title": "" }, { "docid": "f00ebff73e8f51c80a447f2f087d8800", "score": "0.71335804", "text": "private function init(): void\n {\n }", "title": "" }, { "docid": "6f643fd9c36d4a3f0677b1523d929010", "score": "0.7126612", "text": "public function init():void;", "title": "" }, { "docid": "2e3aa6beb45e19ba71d0d2f8f93c08aa", "score": "0.712557", "text": "public static function init() {\n }", "title": "" }, { "docid": "230a74c75c729b6900789f83bc5f3149", "score": "0.7123303", "text": "protected static function init()\n {\n }", "title": "" }, { "docid": "dab5b5b93863e68831681217ad46d1a0", "score": "0.711797", "text": "public static function init() {\r\n }", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.7116409", "text": "protected function _init() {}", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.71088463", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.71088463", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.71088463", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.71088463", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.71088463", "text": "abstract public function init();", "title": "" }, { "docid": "ab1079b9938ce6d67b10b0983acffc11", "score": "0.7091868", "text": "abstract function init();", "title": "" }, { "docid": "38b0f4aa6243dbff42aec3c4ebfdfecd", "score": "0.7088234", "text": "public function init() : void;", "title": "" }, { "docid": "8129873557f4a9f698c3b6a8c22a6d70", "score": "0.7083751", "text": "public function init(): void\n {\n }", "title": "" }, { "docid": "8129873557f4a9f698c3b6a8c22a6d70", "score": "0.7083751", "text": "public function init(): void\n {\n }", "title": "" }, { "docid": "8129873557f4a9f698c3b6a8c22a6d70", "score": "0.7083751", "text": "public function init(): void\n {\n }", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.70702344", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "1fdefe9519a892c3eeaf2c16410a9ecf", "score": "0.7069776", "text": "public function init(): void;", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.7053015", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.7053015", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.70480037", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.70480037", "text": "public function init(){}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.7028082", "text": "protected function init(){}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.7028082", "text": "protected function init(){}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "fc2cb30f88246079d8d6f73536b750a0", "score": "0.7027685", "text": "public function init()\n\t{\n\t}", "title": "" }, { "docid": "eb90722980c60dab4756b0fff60da66e", "score": "0.70261437", "text": "protected function init()\n\t{\n\t}", "title": "" }, { "docid": "eb90722980c60dab4756b0fff60da66e", "score": "0.70261437", "text": "protected function init()\n\t{\n\t}", "title": "" }, { "docid": "87478a429c66c2fda0aae29acc7769a9", "score": "0.7022796", "text": "private function initialize() : void {}", "title": "" }, { "docid": "00f36365359757cc8cf8a17b692194ac", "score": "0.7015701", "text": "public static function initialize()\n {\n }", "title": "" }, { "docid": "570702f4ba8fc6d2d83babe1e9ae710c", "score": "0.7014016", "text": "public function init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "570702f4ba8fc6d2d83babe1e9ae710c", "score": "0.7014016", "text": "public function init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "0cffc2055bb997228184c12d8e17c87e", "score": "0.70115983", "text": "protected function _initModules()\n {\n }", "title": "" }, { "docid": "9fa9f711e898e75457cddf2a75212cf4", "score": "0.7011049", "text": "protected function init()\n\t{\n\n\t}", "title": "" }, { "docid": "e8187eb5954f3be9beb5d4dbfe979ab7", "score": "0.7009982", "text": "public static function init() {\n /**\n * Nothin' yet!\n */\n }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.70078397", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.70078397", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.70077866", "text": "protected function init() {}", "title": "" }, { "docid": "2babdb86d84180576499bdb27da1d274", "score": "0.70034164", "text": "protected abstract function init();", "title": "" }, { "docid": "d17c75e733c23d9cb67c8bb1e73aa3b1", "score": "0.69986427", "text": "public function init() {\r\n\t}", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.6996448", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.6996448", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.6996448", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.6996448", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.6996448", "text": "abstract protected function init();", "title": "" }, { "docid": "1d96e30678a1351fec45ed748953260c", "score": "0.69935113", "text": "protected function initialise()\n {\n }", "title": "" }, { "docid": "1d96e30678a1351fec45ed748953260c", "score": "0.69935113", "text": "protected function initialise()\n {\n }", "title": "" }, { "docid": "97714cc2110a06f1b52a422dfb12e886", "score": "0.69896305", "text": "public function init()\n\t{\n\n\t}", "title": "" }, { "docid": "97714cc2110a06f1b52a422dfb12e886", "score": "0.69896305", "text": "public function init()\n\t{\n\n\t}", "title": "" }, { "docid": "97714cc2110a06f1b52a422dfb12e886", "score": "0.69896305", "text": "public function init()\n\t{\n\n\t}", "title": "" }, { "docid": "1cee203facd56bde67d1b4a51a73dd98", "score": "0.6984056", "text": "abstract static protected function init();", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "b19dde3fb455414ee1cacc152afcce8d", "score": "0.69832015", "text": "public function init() {\n\t}", "title": "" }, { "docid": "d4597f53705403274f5a06a57062ddb4", "score": "0.6978356", "text": "protected function init()\n {\n\n }", "title": "" } ]
87d9bd9318500fd31020473da11a11c3
Need to register client and manage it properly to get client id ( uncheck Disable implicit OAuth ). Follow to get access token strickly. Get end point url from See some examples
[ { "docid": "3059fbdb9e85661ef1536a0efd4475ee", "score": "0.0", "text": "public function facebook_profile_connect() {\n\t\t$api_access_token = $this->get_api_key();\n\t\t$facebook_page_name = $this->get_facebook_page_name();\n\t\t$endpoint_url = \"https://graph.facebook.com/\".$facebook_page_name .\"/?fields=picture,username&access_token=\".$api_access_token;\n\t\t$file_get_contents = file_get_contents($endpoint_url);\n\n\t\t//var_dump(json_decode($file_get_contents) );\n\t\tif( false === $file_get_contents ) {\n\t\t\treturn \"facebook Access Token error!!!\";\n\t\t}\n\t\treturn json_decode($file_get_contents);\n\n\t}", "title": "" } ]
[ { "docid": "32cbcf3ab7a8f07f65cf69a2f2b87a04", "score": "0.7082342", "text": "public abstract function getAccessTokenEndpoint();", "title": "" }, { "docid": "2bd9acd58af0828f4e956b6d878792f0", "score": "0.69641054", "text": "public function oauth_url();", "title": "" }, { "docid": "495518dc90d8ee9f93a1eb9f203cb7ae", "score": "0.6903106", "text": "function getClient(){\r\n\t\t$uri1 = $this->uri->segment(1);\r\n\t\t$uri2 = $this->uri->segment(2);\r\n\t\t$uri3 = $this->uri->segment(3);\r\n\t\t$uri4 = $this->uri->segment(4);\r\n\t\theader( \"Access-Control-Allow-Origin: *\" );\r\n\t\t$client = new Google_Client();\r\n\t\t$client->setApplicationName('Google Calendar API PHP Quickstart');\r\n\t\t$client->setScopes(Google_Service_Calendar::CALENDAR);\r\n\t\t$client->setAuthConfig('credentials.json');\r\n\t\t$client->setAccessType('offline');\r\n\t\t$client->setPrompt('select_account consent');\r\n\t\r\n\t\t$tokenPath = 'token.json';\r\n\t\tif (file_exists($tokenPath)) {\r\n\t\t\t$accessToken = json_decode(file_get_contents($tokenPath), true);\r\n\t\t\t$client->setAccessToken($accessToken);\r\n\t\t}\r\n\t\tif ($client->isAccessTokenExpired()) {\r\n\t\t\tif ($client->getRefreshToken()) {\r\n\t\t\t\t$client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\r\n\t\t\t} else {\r\n\t\t\t// if($uri3 == NULL){\r\n\t\t\t// \t$authUrl = $client->createAuthUrl();\r\n\t\t\t// \tredirect($authUrl);\r\n\t\t\t// }\r\n\t\t\t$authCode = trim('4/yAEEwfkVupL579X0lGxkRYmuXy_gOByPpNdacfPtm7nhOhiUHwR1o7VX4pWS5Friv0fL9B-z2q0VumGw77NpqlY');\r\n\t\t\t\t$accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\r\n\t\t\t\t$client->setAccessToken($accessToken);\r\n\t\r\n\t\t\t\tif (array_key_exists('error', $accessToken)) {\r\n\t\t\t\t\tthrow new Exception(join(', ', $accessToken));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!file_exists(dirname($tokenPath))) {\r\n\t\t\t\tmkdir(dirname($tokenPath), 0700, true);\r\n\t\t\t}\r\n\t\t\tfile_put_contents($tokenPath, json_encode($client->getAccessToken()));\r\n\t\t}\r\n\t\treturn $client;\r\n\t}", "title": "" }, { "docid": "6200ba03e610f3c602cb1c54882312dc", "score": "0.67861164", "text": "private function get_woo_oauth_client_url() : string {\n $current = \\wp_parse_url( Utility::get_current_admin_url() );\n\n parse_str( $current['query'], $query_string );\n\n $query_string[ OAuth::WOO_OAUTH_CLIENT_CREATION_CMD ] = true;\n\n $current['query'] = http_build_query( $query_string );\n\n return Utility::unparse_url( $current );\n }", "title": "" }, { "docid": "7ca921aa943824a0883fe92e7c9d16c6", "score": "0.6656693", "text": "public function client() {\r\n $localConfig = array();\r\n if (isset($this->service->settings['discovery']['application_name'])) {\r\n $localConfig['application_name'] = $this->service->settings['discovery']['application_name'];\r\n }\r\n if (isset($this->service->settings['discovery']['auth_class'])) {\r\n $localConfig['authClass'] = $this->service->settings['discovery']['auth_class'];\r\n }\r\n if (isset($this->service->settings['discovery']['oauth2_revoke_uri'])) {\r\n $localConfig['oauth2_revoke_uri'] = $this->service->settings['discovery']['oauth2_revoke_uri'];\r\n }\r\n if (isset($this->service->settings['discovery']['oauth2_token_uri'])) {\r\n $localConfig['oauth2_token_uri'] = $this->service->settings['discovery']['oauth2_token_uri'];\r\n }\r\n if (isset($this->service->settings['discovery']['oauth2_auth_url'])) {\r\n $localConfig['oauth2_auth_url'] = $this->service->settings['discovery']['oauth2_auth_url'];\r\n }\r\n if (isset($this->service->settings['discovery']['oauth2_federated_signon_certs_url'])) {\r\n $localConfig['oauth2_federated_signon_certs_url'] = $this->service->settings['discovery']['oauth2_federated_signon_certs_url'];\r\n }\r\n if (isset($this->service->settings['discovery']['client_id'])) {\r\n $localConfig['oauth2_client_id'] = $this->service->settings['discovery']['client_id'];\r\n }\r\n if (isset($this->service->settings['discovery']['client_secret'])) {\r\n $localConfig['oauth2_client_secret'] = $this->service->settings['discovery']['client_secret'];\r\n }\r\n if (isset($this->service->settings['discovery']['redirect_uri'])) {\r\n $localConfig['oauth2_redirect_uri'] = $this->service->settings['discovery']['redirect_uri'];\r\n }\r\n if (isset($this->service->settings['discovery']['keyfile'])) {\r\n $key_file = $this->service->settings['discovery']['keyfile'];\r\n }\r\n if (isset($this->service->settings['discovery']['keyfile_pass'])) {\r\n $keyfile_pass = $this->service->settings['discovery']['keyfile_pass'];\r\n }\r\n if (isset($this->service->settings['discovery']['iss'])) {\r\n $localConfig['oauth2_client_id'] = $this->service->settings['discovery']['iss'];\r\n }\r\n if (isset($this->service->settings['discovery']['scope'])) {\r\n $scope = $this->service->settings['discovery']['scope'];\r\n }\r\n if (isset($this->service->settings['discovery']['prn'])) {\r\n $prn = $this->service->settings['discovery']['prn'];\r\n }\r\n if (isset($this->service->settings['discovery']['grant_type'])) {\r\n $grant_type = $this->service->settings['discovery']['grant_type'];\r\n }\r\n\r\n // Once the Google library loads, this will be populated with the default settings.\r\n global $apiConfig;\r\n // If local configuration settings are found, merge it's values with the default configuration.\r\n if (!empty($localConfig)) {\r\n $apiConfig = array_merge($apiConfig, $localConfig);\r\n }\r\n\r\n $client = new Google_Client();\r\n\r\n if (variable_get('rescued_debug_mode', FALSE)) {\r\n // Disabling SSL cert verificaiton for local dev testing on self signed cert.\r\n $client::$io->setOptions(array(CURLOPT_SSL_VERIFYPEER => FALSE));\r\n $client::$io->setOptions(array(CURLOPT_SSL_VERIFYHOST => FALSE));\r\n }\r\n\r\n // Set your cached access token. Remember to replace $_SESSION with a\r\n // real database or memcached.\r\n if (isset($_SESSION['token'])) {\r\n $client->setAccessToken($_SESSION['token']);\r\n }\r\n\r\n // Load the key in PKCS 12 format (you need to download this from the Mobile\r\n // Client Admin Interface when the OAuth 2.0 service account client was created.\r\n $key = file_get_contents($key_file);\r\n // TODO: Throw an error is this doesn't load.\r\n\r\n // TODO: Add support for OAuth 2.0 \"Web Server\" Scenario Type\r\n $oauth = new Google_AssertionCredentials(\r\n $apiConfig['oauth2_client_id'],\r\n $scope,\r\n $key,\r\n $keyfile_pass,\r\n $grant_type,\r\n FALSE\r\n );\r\n\r\n /** @var Xtuple\\Xdruple\\Session\\RescuedSession $session */\r\n $session = extensions_get_session('Xtuple\\Xdruple\\Session\\RescuedSession');\r\n\r\n // Set OAuth 2.0 JWT Delegated user.\r\n if ($role_user = $session->getRescued('user')) {\r\n if (isset($_SESSION['oauth_user']) && $_SESSION['oauth_user'] !== $role_user) {\r\n unset($_SESSION['access_token']);\r\n unset($_SESSION['oauth_user']);\r\n }\r\n\r\n $oauth->prn = $role_user;\r\n $_SESSION['oauth_user'] = $role_user;\r\n }\r\n elseif (isset($prn)) {\r\n if (isset($_SESSION['oauth_user']) && $_SESSION['oauth_user'] !== $prn) {\r\n unset($_SESSION['access_token']);\r\n unset($_SESSION['oauth_user']);\r\n }\r\n $oauth->prn = $prn;\r\n $_SESSION['oauth_user'] = $prn;\r\n }\r\n\r\n $client->setAssertionCredentials($oauth);\r\n\r\n $config = array(\r\n 'url' => $this->service->url,\r\n );\r\n\r\n $service = new Rescued_ApiService($client, $config);\r\n\r\n if (!isset($this->client)) {\r\n $options['exceptions'] = TRUE;\r\n if (!empty($this->service->settings['options'])) {\r\n $options += $this->service->settings['options'];\r\n }\r\n try {\r\n $this->client = $service;\r\n } catch (DiscoveryServiceException $e) {\r\n throw new WSClientException('Error initializing RESCUED client for service %name', array('%name' => $this->service->name));\r\n }\r\n }\r\n\r\n return $this->client;\r\n }", "title": "" }, { "docid": "6fcdf563313d081d27958f6786ea4654", "score": "0.65083385", "text": "public function action_client()\n\t{\n\t\t$client = Model_OAuth2_Client::create_client($this->request->post('redirect_uri'));\n\n\t\t$this->template->title = \"Client\";\n\t\t$this->template->content = View::factory('welcome/client');\n\t\t$this->template->content->client = $client;\n\t}", "title": "" }, { "docid": "3a5c3e17ea63894f8b29d0ea88f873b3", "score": "0.6471762", "text": "public function getExternalOAuth();", "title": "" }, { "docid": "17841f73cbe457f99d6e09f6a7a15d13", "score": "0.6407627", "text": "public function getAccessTokenEndpoint()\n {\n return new Uri('https://login.microsoftonline.com/common/oauth2/token');\n }", "title": "" }, { "docid": "e1162eb4bce12f55cb9f53ed59bd7985", "score": "0.63815886", "text": "public function getAuthEndpointUrl() {\n return $this->getLoginUrl() . '/services/oauth2/authorize';\n }", "title": "" }, { "docid": "8d1fa0dcc13ebac78d41799d03b7a00c", "score": "0.6379676", "text": "public static function getAccessToken($tokenendpoint, $grant_type, $clientid, $clientsecret, $code, $redirect_url) {\n $ch = curl_init($tokenendpoint);\n curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );\n curl_setopt( $ch, CURLOPT_ENCODING, \"\" );\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n curl_setopt( $ch, CURLOPT_AUTOREFERER, true );\n curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );\n curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );\n curl_setopt( $ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Authorization: Basic '.base64_encode($clientid.\":\".$clientsecret),\n 'Accept: application/json'\n ));\n curl_setopt( $ch, CURLOPT_POSTFIELDS, 'redirect_uri='.urlencode($redirect_url).'&grant_type='.$grant_type.'&client_id='.$clientid.'&client_secret='.$clientsecret.'&code='.$code);\n $content = curl_exec($ch);\n if(curl_error($ch)){\n echo \"<b>Response : </b><br>\";print_r($content);echo \"<br><br>\";\n exit( curl_error($ch) );\n }\n if(!is_array(json_decode($content, true))){\n echo \"<b>Response : </b><br>\";print_r($content);echo \"<br><br>\";\n exit(\"Invalid response received.\");\n }\n $content = json_decode($content,true);\n\n if (isset($content[\"error\"])) {\n if (is_array($content[\"error\"])) {\n $content[\"error\"] = $content[\"error\"][\"message\"];\n }\n exit($content[\"error\"]);\n }\n else if(isset($content[\"error_description\"])){\n exit($content[\"error_description\"]);\n }\n else if(isset($content[\"access_token\"])) {\n $access_token = $content[\"access_token\"];\n } else {\n exit('Invalid response received from OAuth Provider. Contact your administrator for more details.');\n }\n return $access_token;\n }", "title": "" }, { "docid": "2273a44f9be325d7b426c2c7513dfa2a", "score": "0.6319782", "text": "public function getOAuthClientId(): ?string;", "title": "" }, { "docid": "7dfe4c1254d3317868b2021f65b180de", "score": "0.6220021", "text": "public function accessTokenURL() { return 'https://foursquare.com/oauth2/access_token'; }", "title": "" }, { "docid": "52825ac01b0710c4c3b14b6d5d5039ec", "score": "0.6219745", "text": "public function requestURL() {\r\n\t\t\t$u = $this->oauth_url . 'authorize?response_type=code';\r\n\t\t\t$c = '&client_id=' . urlencode($this->client_id);\r\n\t\t\t$r = '&redirect_uri=' . urlencode($this->redirect_url);\r\n\t\t\t$s = '&scope=' . urlencode('activity location'); # Assuming we want both activity and locations\r\n\t\t\t$url = $u . $c . $s . $r;\r\n\t\t\treturn $url;\r\n\t\t}", "title": "" }, { "docid": "17ba146b6ff57af029ab8cc7f4427ece", "score": "0.62034976", "text": "protected function getAccessTokenUrl()\n {\n return $this->buildUrl('/oauth2.0/token');\n }", "title": "" }, { "docid": "5fd8751071470aaaf1ba5b8ed094e925", "score": "0.61756206", "text": "public function url_access_token()\n\t{\n\t\treturn 'https://runkeeper.com/apps/token';\n\t}", "title": "" }, { "docid": "5cd5c61fe4cdcdc0043a2e2c86649b66", "score": "0.61725134", "text": "public function getAuthorizationUrl(): string;", "title": "" }, { "docid": "5cd5c61fe4cdcdc0043a2e2c86649b66", "score": "0.61725134", "text": "public function getAuthorizationUrl(): string;", "title": "" }, { "docid": "49b7803858020cead390979206af36a8", "score": "0.6123106", "text": "function requestToken($baseurl, $config) {\r\n $req = $baseurl.'/v1/oauth2/token';\r\n $header = array(\r\n 'Accept: application/json',\r\n 'Content-Type: application/x-www-form-urlencoded'\r\n );\r\n $params = array(\r\n 'grant_type' => 'client_credentials'\r\n );\r\n $c = curl_init();\r\n curl_setopt($c, CURLOPT_URL, $req);\r\n curl_setopt($c, CURLOPT_HTTPHEADER, $header);\r\n curl_setopt($c, CURLOPT_USERPWD, $config['client_id'].':'.$config['secret']);\r\n curl_setopt($c, CURLOPT_POST, true);\r\n curl_setopt($c, CURLOPT_POSTFIELDS, http_build_query($params));\r\n curl_setopt($c, CURLOPT_SSLVERSION, 6);\r\n curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 1);\r\n curl_setopt($c, CURLOPT_CAINFO, 'cert/cacert.pem');\r\n curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE);\r\n $result = json_decode(curl_exec($c));\r\n if (isset($result->access_token)){\r\n $_SESSION['pp_token'] = $result->access_token;\r\n }\r\n curl_close($c);\r\n}", "title": "" }, { "docid": "482b4c8921285d2047bbc7bbd796a5a3", "score": "0.6119811", "text": "public function connectAction()\n {\n // will redirect to Facebook!\n return $this->get('oauth2.registry')\n ->getClient('google_main')// key used in config.yml\n ->redirect();\n }", "title": "" }, { "docid": "a73f00cf3b898429b2d6c7ba1db0ca00", "score": "0.60484725", "text": "public function getOauthClientId()\n {\n return $this->oauth_client_id;\n }", "title": "" }, { "docid": "9f6cc96168bee31c0e15ae6c5770cd34", "score": "0.6048314", "text": "protected function getOpenIdUrl()\n {\n return $this->buildUrl('/oauth2.0/me');\n }", "title": "" }, { "docid": "19e56434f8ecbe240a8c3cdc59166718", "score": "0.6023385", "text": "function get_access()\n {\n global $get_verifier_url, $scopes;\n\n /** @var SyncListApi $api */\n $api = $this->synclist_api;\n $keys = $api->api_keys('etsy', 'hanksminerals');\n $oauth = new OAuth($keys->keystring, $keys->shared_secret);\n\n //$oauth->setCAPath('/home/droid/cacert.pem');\n $oauth->disableSSLChecks();\n\n $req_token = $oauth->getRequestToken(\"https://openapi.etsy.com/v2/oauth/request_token?scope=\" . implode('%20', $scopes), $get_verifier_url);\n\n $this->session->flash($req_token['oauth_token_secret']);\n\n if ($req_token['login_url']) {\n header(\"Location: {$req_token['login_url']}\");\n } else {\n trigger_error(\"failed\");\n }\n }", "title": "" }, { "docid": "80384d51114b68d986ae4b92e334f5cf", "score": "0.6021425", "text": "function accessTokenURL() {\n\t\treturn 'https://api.twitter.com/oauth/access_token';\n\t}", "title": "" }, { "docid": "03400685c0dded5d3b304f99022a41d4", "score": "0.60201263", "text": "protected function getTokenUrl()\n {\n return static::MOLLIE_API_URL.'/oauth2/tokens';\n }", "title": "" }, { "docid": "ee98ed4e9b005dc49a3a59e540cdfe26", "score": "0.6017748", "text": "public function getCallbackUrl(): string;", "title": "" }, { "docid": "2647f27a675763081234220f34476638", "score": "0.6012801", "text": "public abstract function getAuthorizationUrl(OAuthConfig $config);", "title": "" }, { "docid": "9eb18ece5c13d9fcbed28a5b93b34ee3", "score": "0.6006605", "text": "public function getAuthorizationUrl();", "title": "" }, { "docid": "fe620776843fc10b0c2e0fd19e5d6518", "score": "0.6004638", "text": "abstract protected function getTokenUrl();", "title": "" }, { "docid": "7c69b93bea47532f69448ca060fcc16f", "score": "0.60007733", "text": "function gcc_get_oauth_link() {\n\t$options = ggc_get_options();\n\n\t$link = add_query_arg(\n\t\tarray(\n\t\t\t'response_type'\t\t=> 'code',\n\t\t\t'client_id'\t\t\t=> $options['api-client-id'],\n\t\t\t'redirect_uri'\t\t=> add_query_arg( array( 'page' => 'google-glass-comments' ), admin_url( 'edit-comments.php' ) ),\n\t\t\t'scope'\t\t\t\t=> 'https://www.googleapis.com/auth/glass.timeline',\n\t\t\t'state'\t\t\t\t=> 'ggc-oauth-setup',\n\t\t\t'access_type'\t\t=> 'online',\n\t\t\t'approval_prompt'\t=> 'force'\n\t\t),\n\t\t\"https://accounts.google.com/o/oauth2/auth\"\n\t);\n\treturn $link;\n}", "title": "" }, { "docid": "0a11db2cc0fea20df4bdc7c94731b059", "score": "0.59988594", "text": "abstract public function url_access_token();", "title": "" }, { "docid": "f1c8d8d6d35b974f32b3adfe6a3c6de6", "score": "0.5997491", "text": "private function get_client() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "c226f7106f655cf6227033a69537dae2", "score": "0.59946054", "text": "public function getAuthTokenUrl() {\n return $this->getLoginUrl() . '/services/oauth2/token';\n }", "title": "" }, { "docid": "52cfc365fe2e6587005539b9c70b4610", "score": "0.5980665", "text": "function getClient($redirect_on_oauth_failure = false, &$config = null, $client_id = null, $client_secret = null, $access_token = null, $redirect_url = null) \n{\n \n if ((empty($client_id)) && (!empty($config))) {\n $client_id = $config->get('client_id');\n }\n if ((empty($client_secret)) && (!empty($config))) {\n $client_secret = $config->get('client_secret');\n }\n \n $client = new \\Google_Client();\n $client->setAccessType('offline'); // default: offline\n $client->setIncludeGrantedScopes(true);\n $client->addScope(\\Google_Service_Calendar::CALENDAR);\n $client->setApplicationName(EVENT_GCAL_APPNAME);\n //$client->setAuthConfig($client_secret_path);\n $client->setClientId(isset($client_id) ? $client_id : EVENT_GCAL_CLIENTID_DEFAULT);\n $client->setClientSecret(isset($client_secret) ? $client_secret : EVENT_GCAL_CLIENTSECRET_DEFAULT);\n \n // Check access token\n if (empty($access_token)) {\n // Check whether to redirect\n if ($redirect_on_oauth_failure) {\n if (empty($redirect_url)) {\n $redirect_url = getRedirectUrl();\n }\n $client->setRedirectUri($redirect_url);\n $authUrl = $client->createAuthUrl();\n if (headers_sent()) {\n echo \"<div>Google Calendar authentication failure. Please click <a href='{$authUrl}'>here</a> to re-authorise.</div>\";\n return $authUrl;\n } else {\n header(\"Location: {$authUrl}\");\n exit();\n }\n } else {\n // No access token, return null for failure\n return null;\n }\n } else {\n $client->setAccessToken($access_token);\n }\n \n // Check expiry\n if ($client->isAccessTokenExpired()) {\n // Refresh token\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n $access_token = $client->getAccessToken();\n if ($config == null) {\n $config = \\Drupal::service('config.factory')->getEditable('event_gcal.settings'); //$config = \\Drupal::config('event_gcal.settings');\n }\n // Write refreshed token to config\n $config->set('access_token', $access_token)->save();\n }\n \n return $client; \n}", "title": "" }, { "docid": "f1585f3145aa2013f3fea2afaaa2afce", "score": "0.59489536", "text": "public function getAuthorizationEndpoint()\n {\n return new Uri('https://login.microsoftonline.com/common/oauth2/authorize');\n }", "title": "" }, { "docid": "9ff9a5670cd6ea9869c12e28ba1c9036", "score": "0.59396875", "text": "public function getAuthUrl() {\n return $this->authUrl . '?client_id=' . $this->clientId . '&redirect_uri=' . $this->redirectUri . '&response_type=code';\n }", "title": "" }, { "docid": "8c70877da99dbbf1e097a31b74d219aa", "score": "0.59370244", "text": "public function getAuthorizationUrl()\n\t{\n\t\t$url = new Uri($this->authorizationServerUrl);\n\t\treturn Uri::withQueryValues($url, [\n\t\t\t'response_type' => 'code',\n\t\t\t'client_id' => $this->clientId,\n\t\t\t'redirect_uri' => $this->redirectUri,\n\t\t\t'state' => $this->csrfTokenRepository->generateCSRFToken(),\n\t\t]);\n\t}", "title": "" }, { "docid": "c23a5f7468d40c57e162be4d91b6b2fd", "score": "0.5933908", "text": "protected static function requestAccessToken() {\n $post_data = [\n 'grant_type' => 'password',\n 'client_id' => self::$client_id,\n 'client_secret' =>self::$client_secret,\n 'username' => self::$user_id,\n 'password' => self::$password \n ];\n $api_end_point = \"api/oauth/token\";\n $result= Request::sendRequest($api_end_point, $post_data);\n self::saveTokens($result);\n }", "title": "" }, { "docid": "889aed42d4cc01aadf7bbbab9fc12b15", "score": "0.5933764", "text": "function getOAuthServerBaseURI();", "title": "" }, { "docid": "a002d2dfac9cc041b3c0ff9cd601f0a2", "score": "0.593183", "text": "public function getClient() {\n $client = new Google_Client();\n $client->setAccessType('offline');\n $client->setScopes($this->scopes);\n $client->setAuthConfig($this->client_secret_path);\n $client->setApplicationName($this->application_name);\n\n if (file_exists($this->token_path)) {\n $access_token = json_decode(file_get_contents($this->token_path), true);\n } else {\n \n\t // Request authorization from the user.\n\t $auth_url = $client->createAuthUrl();\n\t printf(\"Abra o link abaixo em seu navegador para gerar o TOKEN de acesso:\\n%s\\n\", $auth_url);\n\t \n\t if(is_null($this->token)){\n \t\tdie();\n \t}\n\t\t \n \t // Exchange authorization code for an access token.\n\t $access_token = $client->fetchAccessTokenWithAuthCode($this->token);\n\n\t // Store the credentials to disk.\n\t if(!file_exists(dirname($this->token_path))) {\n\t mkdir(dirname($this->token_path), 0700, true);\n\t }\n\t \n\t file_put_contents($this->token_path, json_encode($access_token));\n }\n \n $client->setAccessToken($access_token);\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n file_put_contents($this->token_path, json_encode($client->getAccessToken()));\n }\n \n //\n return $client;\n }", "title": "" }, { "docid": "b2512c7b737e219716e2c49059d958b4", "score": "0.59300447", "text": "public function accessTokenURL()\n\t{\n\t\treturn $this->host . 'api_component_token';\n\t}", "title": "" }, { "docid": "1a2f893454c420da1741f1206bfc8101", "score": "0.5922198", "text": "function getClient()\n{\n $client = new Google_Client();\n $client->setApplicationName('Google Calendar API PHP Quickstart');\n $client->setScopes(Google_Service_Calendar::CALENDAR_READONLY);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n // The file token.json stores the user's access and refresh tokens, and is\n // created automatically when the authorization flow completes for the first\n // time.\n $tokenPath = 'token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n\n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "9547e4b9d7b02402082ee2f6c758ebbe", "score": "0.5918262", "text": "public function auth()\n {\n// go(function () use (&$body){\n//\n// });\n $data['client_secret'] = $this->config['baidu']['client_secret'];\n $data['client_id'] = $this->config['baidu']['client_id'];\n $data['grant_type'] = 'client_credentials';\n $client = new Client(self::BaiduDomain,80);\n $client->set(['timeout'=>$this->config['outTime']]);\n $client->post('/oauth/2.0/token',$data);\n $body = $client->getBody();\n $client->close();\n $this->config['baidu']['access_token'] = json_decode($body,true)['access_token'];\n return $this->config['baidu']['access_token'];\n }", "title": "" }, { "docid": "cb62ad46106d3c4bf5e478f41ed48f11", "score": "0.59132475", "text": "public function getClient(){\n return $this->getModule('REST')->client;\n }", "title": "" }, { "docid": "66284518a07b63d635c14dc0c171fc70", "score": "0.5912128", "text": "public function testClientUrl()\n {\n $this->testLogin();\n\n $this->get('api/client/clienturl')->seeJson([\n 'clienturl' => 'http://localhost/client/habbo-client',\n ]);\n }", "title": "" }, { "docid": "62a8c6c1b27c138d10b921d1bea77421", "score": "0.5899155", "text": "protected function getAuthEndpoint()\n\t{\n\t\treturn 'https://connect.stripe.com/oauth/authorize';\n\t}", "title": "" }, { "docid": "507dcebbeef3304f26fe52c0737ce2be", "score": "0.5894987", "text": "public function connect() {\n \n // Call the class Google_Client\n $this->client = new \\Google_Client();\n \n // Offline because we need to get refresh token\n $this->client->setAccessType('offline');\n \n // Name of the google application\n $this->client->setApplicationName($this->appName);\n \n // Set the client_id\n $this->client->setClientId($this->clientId);\n \n // Set the client_secret\n $this->client->setClientSecret($this->clientSecret);\n \n // Redirects to same url\n $this->client->setRedirectUri($this->scriptUri);\n \n // Set the api key\n $this->client->setDeveloperKey($this->apiKey);\n \n // Set approval prompt to force\n $this->client->setApprovalPrompt('force');\n \n // Load required scopes\n $this->client->setScopes(array(\n 'https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/userinfo.profile'\n ));\n \n // Generate redirect url\n $authUrl = $this->client->createAuthUrl();\n \n // Redirect\n header('Location:' . $authUrl);\n \n }", "title": "" }, { "docid": "25229e72f31c3cd61cfcf6e8504f7a50", "score": "0.58920705", "text": "private function createTokenUrl() {\n $tokenUrl = parse_url($this->tokenEndpoint);\n\n $param = array(\n Constants::constant('OAuth2')['Parameters']['AAD_API_VERSION'] => '1.0'\n );\n\n foreach($param as $key => $value) {\n $pStr[] = $key.'='.$value;\n }\n\n $tokenUrl['query'] = implode($pStr, '&');\n\n return $tokenUrl;\n }", "title": "" }, { "docid": "dfaa6a24438e945ffbaf53fe34f65dbd", "score": "0.5891922", "text": "function GetAuthToken($client_id,$client_secret)\n{\n\t$oauthurl = \"https://id.twitch.tv/oauth2/token\";\n\t$c = curl_init();\n\tcurl_setopt($c, CURLOPT_URL, \"https://id.twitch.tv/oauth2/token?client_id=$client_id&client_secret=$client_secret&grant_type=client_credentials\");\n\tcurl_setopt($c, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($c, CURLOPT_POST, true);\n\t$reponse = curl_exec($c);\n\t$retour = json_decode($reponse, true);\n\tcurl_close($c);\n\t$oauthtoken = $retour['access_token'];\n\treturn $oauthtoken;\n}", "title": "" }, { "docid": "3a2d87aaa4de5299c9c4ee807f31a6a3", "score": "0.5885183", "text": "public function getClientId();", "title": "" }, { "docid": "3a2d87aaa4de5299c9c4ee807f31a6a3", "score": "0.5885183", "text": "public function getClientId();", "title": "" }, { "docid": "b199e2191ceaef6b4a9d1a5c058c068c", "score": "0.5877021", "text": "public function connect() {\n \n // Call the class Google_Client\n $this->client = new \\Google_Client();\n \n // Offline because we need to get refresh token\n $this->client->setAccessType('offline');\n \n // Name of the google application\n $this->client->setApplicationName($this->appName);\n \n // Set the client_id\n $this->client->setClientId($this->clientId);\n \n // Set the client_secret\n $this->client->setClientSecret($this->clientSecret);\n \n // Redirects to same url\n $this->client->setRedirectUri($this->scriptUri);\n \n // Set the api key\n $this->client->setDeveloperKey($this->apiKey);\n \n // Load required scopes\n $this->client->setScopes(array('https://www.googleapis.com/auth/blogger https://www.googleapis.com/auth/userinfo.profile'));\n \n // Get the redirect url\n $authUrl = $this->client->createAuthUrl();\n \n // Redirect\n header('Location:' . $authUrl);\n \n }", "title": "" }, { "docid": "521c60667706c27289dc4336fb29c444", "score": "0.58720994", "text": "abstract protected function getAuthUrl();", "title": "" }, { "docid": "819fa9e03e719624d2098619e0a0ff80", "score": "0.5870916", "text": "public function setClientInfo()\n {\n // get the default client information\n\n $clients = config('acceptedoauthclients.clients');\n $theClient = $clients[$this->referrer];\n if (!empty($theClient)) {\n $this->client = $theClient;\n }\n\n //make sure that the config value is set properly\n if (empty($this->client['client_id'])) {\n return response(json_encode(false));\n }\n return true;\n }", "title": "" }, { "docid": "f20e90c00e8ce7b892e28c6df9f6632c", "score": "0.5870171", "text": "protected function getAccessEndpoint()\n\t{\n\t\treturn 'https://connect.stripe.com/oauth/token';\n\t}", "title": "" }, { "docid": "9dda32f5a8933f8f5984e818642970aa", "score": "0.58666456", "text": "public function connect() {\n \n // Call the class Google_Client\n $this->client = new \\Google_Client();\n\n // Offline because we need to get refresh token\n $this->client->setAccessType('offline');\n\n // Name of the google application\n $this->client->setApplicationName($this->appName);\n\n // Set the client_id\n $this->client->setClientId($this->clientId);\n\n // Set the client_secret\n $this->client->setClientSecret($this->clientSecret);\n\n // Redirects to same url\n $this->client->setRedirectUri($this->scriptUri);\n\n // Set the api key\n $this->client->setDeveloperKey($this->apiKey);\n\n // Set approval prompt to force\n $this->client->setApprovalPrompt('force');\n\n // Load required scopes\n $this->client->setScopes(array(\n \"https://www.googleapis.com/auth/plus.business.manage\"\n ));\n\n // Generate redirect url\n $authUrl = $this->client->createAuthUrl();\n\n // Redirect\n header('Location:' . $authUrl);\n\n }", "title": "" }, { "docid": "d7466f791499a0f6949fc0dbf280af49", "score": "0.58533746", "text": "abstract public function getOAuthServiceName();", "title": "" }, { "docid": "a61eecba3b3f4f087eb2072cd5e49908", "score": "0.58499026", "text": "protected function getAccessTokenUrl()\n {\n return 'https://api.weixin.qq.com/sns/oauth2/access_token';\n }", "title": "" }, { "docid": "408cc882b3a2e2d556d3e9f6630c6a1f", "score": "0.58447295", "text": "private function requestToken()\n {\n $headers = ['Content-Type: application/x-www-form-urlencoded'];\n\n $postData = [];\n $postData[\"grant_type\"] = 'client_credentials';\n $postData[\"client_id\"] = AsposeApp::$appSID;\n $postData[\"client_secret\"] = AsposeApp::$apiKey;\n\n\n // form data\n $postData = http_build_query($postData);\n\n\n $url = $this->config->getHost() . '/oauth2/token';\n $url = str_replace('/v1.1', '', $url);\n\n $curl = curl_init();\n // set timeout, if needed\n if ($this->config->getCurlTimeout() !== 0) {\n curl_setopt($curl, CURLOPT_TIMEOUT, $this->config->getCurlTimeout());\n }\n // set connect timeout, if needed\n if ($this->config->getCurlConnectTimeout() != 0) {\n curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->config->getCurlConnectTimeout());\n }\n\n // return the result on success, rather than just true\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\n // disable SSL verification, if needed\n if ($this->config->getSSLVerification() === false) {\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n }\n\n if ($this->config->getCurlProxyHost()) {\n curl_setopt($curl, CURLOPT_PROXY, $this->config->getCurlProxyHost());\n }\n\n if ($this->config->getCurlProxyPort()) {\n curl_setopt($curl, CURLOPT_PROXYPORT, $this->config->getCurlProxyPort());\n }\n\n if ($this->config->getCurlProxyType()) {\n curl_setopt($curl, CURLOPT_PROXYTYPE, $this->config->getCurlProxyType());\n }\n\n if ($this->config->getCurlProxyUser()) {\n curl_setopt($curl, CURLOPT_PROXYUSERPWD, $this->config->getCurlProxyUser() . ':' .$this->config->getCurlProxyPassword());\n }\n\n if (!empty($queryParams)) {\n $url = ($url . '?' . http_build_query($queryParams));\n }\n\n\n if ($this->config->getAllowEncoding()) {\n curl_setopt($curl, CURLOPT_ENCODING, '');\n }\n\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);\n\n curl_setopt($curl, CURLOPT_URL, $url);\n\n // Set user agent\n curl_setopt($curl, CURLOPT_USERAGENT, $this->config->getUserAgent());\n\n // debugging for curl\n if ($this->config->getDebug()) {\n error_log(\"[DEBUG] HTTP Request body ~BEGIN~\".PHP_EOL.print_r($postData, true).PHP_EOL.\"~END~\".PHP_EOL, 3, $this->config->getDebugFile());\n\n curl_setopt($curl, CURLOPT_VERBOSE, 1);\n curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a'));\n } else {\n curl_setopt($curl, CURLOPT_VERBOSE, 0);\n }\n\n // obtain the HTTP response headers\n curl_setopt($curl, CURLOPT_HEADER, 1);\n\n // Make the request\n $response = curl_exec($curl);\n $http_header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n $http_body = substr($response, $http_header_size);\n $data = json_decode($http_body);\n\n $this->getConfig()->setAccessToken($data->access_token);\n\n }", "title": "" }, { "docid": "8e38e09e4f4e20fac466d6b2cbd56442", "score": "0.58388996", "text": "public function getCallbackUrl();", "title": "" }, { "docid": "e78dc2b36b73e8a2e9f54ef2cf119183", "score": "0.5824612", "text": "public function testGenerateTokenUrl()\n {\n \n $actual = $this->oauth->generateTokenUrl();\n \n $this->assertRegExp('/https:\\/\\/api.payvment.com\\/oauth\\/accesstoken\\?client_id=\\d+\\&client_secret=.*\\&code=\\w+/', $actual);\n \n \n }", "title": "" }, { "docid": "1af983b83f31a995aeba462f2669692c", "score": "0.582", "text": "function client_id()\n{\n $oauthClientId = request()->attributes->get('oauth_client_id');\n if (! empty($oauthClientId)) {\n return $oauthClientId;\n }\n\n // Otherwise, try to get the client from the legacy X-DS-REST-API-Key header.\n $client_secret = request()->header('X-DS-REST-API-Key');\n $client = Client::where('client_secret', $client_secret)->first();\n if ($client) {\n return $client->client_id;\n }\n\n // If not an API request, use Client ID from `/authorize` call or just 'northstar'.\n return session('authorize_client_id', 'northstar');\n}", "title": "" }, { "docid": "b96bef49b03da0d48fe770f3c7218822", "score": "0.5815915", "text": "function userTokenRoute()\n{\n if (!auth_check()) return;\n\n return config('ebay.endpoints.user_token') . '?client_id=' .\n config('ebay.client_id') . '&redirect_uri=' . config('ebay.redirect_uri')\n . '&response_type=' . config('ebay.response_type') . '&scope=' . config('ebay.scope');\n\n}", "title": "" }, { "docid": "0fcc46e3a201ea99778e1ba6837fa6af", "score": "0.5812373", "text": "function getClientId();", "title": "" }, { "docid": "0fcc46e3a201ea99778e1ba6837fa6af", "score": "0.5812373", "text": "function getClientId();", "title": "" }, { "docid": "de1d3bb9f0dbe84cca603af8cab91790", "score": "0.58106375", "text": "public function getOauthConnections();", "title": "" }, { "docid": "22586239d47f9b3681f621f9fd073c2f", "score": "0.5793293", "text": "function getClientId()\n {\n return \"3MVG9i1HRpGLXp.rWT8Mzhvq8DKCXYYhpZFtVygLxLKO73NSup_szrPEBXgYnSpVBfN.NVcNmV1e4dfhATTrt\";\n\n }", "title": "" }, { "docid": "f3ffa70525567b0cad199285705a766e", "score": "0.578324", "text": "public function getBaseAuthorizationUrl()\n {\n return $this->accountsServer . '/oauth/v2/auth';\n }", "title": "" }, { "docid": "a0c4fb29ee2432a0d1df24d2030bbc38", "score": "0.57827795", "text": "public function url_authorize()\n\t{\n\t\treturn 'https://runkeeper.com/apps/authorize';\n\t}", "title": "" }, { "docid": "d0b4bf00c5c69a7c57724833af4632f9", "score": "0.57674664", "text": "public function getAuthCallbackUrl() {\n return Url::fromRoute('salesforce.oauth_callback', [], [\n 'absolute' => TRUE,\n 'https' => TRUE,\n ])->toString();\n }", "title": "" }, { "docid": "4a7f3f14070cde6fe753ac8c5233ca29", "score": "0.5765785", "text": "public function GetAccessToken($client_id, $redirect_uri, $client_secret, $code) {\t\r\n\t\t\r\n\t\t//Secure POST server URL\r\n\t\t$url = 'https://accounts.google.com/o/oauth2/token';\t\t\t\r\n\t\t\r\n\t\t//Define our post parameters, by creating a parametet string containing our client information and auth code.\r\n\t\t$curlPost = \r\n\t\t\t'client_id=' . $client_id \r\n\t\t\t. '&redirect_uri=' \r\n\t\t\t. $redirect_uri \r\n\t\t\t. '&client_secret=' \r\n\t\t\t. $client_secret \r\n\t\t\t. '&code='. $code \r\n\t\t\t. '&grant_type=authorization_code';\r\n\t\t\r\n\t\t//Initalise a PHP cURL operation. cURL is the method of making POST requests from within an ApacURLRequeste server.\r\n\t\t$cURLRequest = curl_init();\t\t\r\n\t\t\r\n\t\t//Pass the URL to the cURL URL parameter.\r\n\t\tcurl_setopt($cURLRequest, CURLOPT_URL, $url);\t\t\r\n\t\t\r\n\t\t//Tell the cURL request to output the return value as a string during the exec method.\r\n\t\tcurl_setopt($cURLRequest, CURLOPT_RETURNTRANSFER, 1);\t\r\n\t\t\r\n\t\t//Tell the cURL request to use a basic HTTP POST request header.\r\n\t\tcurl_setopt($cURLRequest, CURLOPT_POST, 1);\r\n\t\t\r\n\t\t//Tell the cURL request to include our post data we contructed earlier.\r\n\t\tcurl_setopt($cURLRequest, CURLOPT_POSTFIELDS, $curlPost);\t\r\n\t\t\r\n\t\t//Save our cURL response as an array, decoded from the JSON string that Google returns. This includes our access token.\r\n\t\t$data = json_decode(curl_exec($cURLRequest), true);\r\n\t\t\r\n\t\t//Get the POST HTTP code. This tells us about how the server responded to our request.\r\n\t\t$http_code = curl_getinfo($cURLRequest,CURLINFO_HTTP_CODE);\t\r\n\t\t\r\n\t\t//If the server responded with anything other than a '200' (success) code, then break and tell the user what went wrong.\r\n\t\tif($http_code != 200) \r\n\t\t\tthrow new Exception('Error : Failed to receieve access token');\r\n\t\t\r\n\t\t//Return the data array.\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "669fcb4de023438944d49caf06c4c867", "score": "0.5764999", "text": "function get_google_api_client() {\n global $api_client_id, $api_client_secret, $api_simple_key, $base_url;\n // Set your cached access token. Remember to replace $_SESSION with a\n // real database or memcached.\n session_start();\n\n $client = new Google_Client();\n\n $client->setUseObjects(true);\n $client->setApplicationName('Google Mirror API PHP Quick Start');\n\n // These are set in config.php\n $client->setClientId($api_client_id);\n $client->setClientSecret($api_client_secret);\n //$client->setDeveloperKey($api_simple_key);\n $client->setRedirectUri($base_url.\"/oauth2callback.php\");\n\n $client->setScopes(array(\n 'https://www.googleapis.com/auth/glass.timeline',\n 'https://www.googleapis.com/auth/glass.location',\n 'https://www.googleapis.com/auth/userinfo.profile'));\n\n return $client;\n}", "title": "" }, { "docid": "8409536ac5dda25bbfe746378e9117c3", "score": "0.5754464", "text": "public function getAuthorizationUrl() {\n return $this->client->getAuthorizationUrl();\n }", "title": "" }, { "docid": "0db8e853271a7314f57436cafc34b704", "score": "0.5735232", "text": "public function loginCallback(){\n\t\t//$this->client->revokeToken();\n\t\t$oauth2 = new Google_Oauth2Service($this->client);\n\t\t$code = Input::get(\"code\");\n\t\tif(!$code){\n\t\t\techo \"invalid request\";\n\t\t\tdie();\n\t\t}\n\t\t//var_dump($code); die();\n\t\t$this->client->authenticate($code);\n\t\t$accessToken = $this->client->getAccessToken();\n \t\t$userData = $oauth2->userinfo->get();\n \t\t//$plus = new Google_Service_Plus($this->client);\n \t\t//$me = $plus->people->get('me');\n \t\t//print_r($me); die();\n \t\t//print_r($userData); die();\n \t\treturn array($accessToken,$userData);\n\t}", "title": "" }, { "docid": "8b03c70a67e6f7d0b34abd9ff7e6743c", "score": "0.5718381", "text": "public function makeAuthorizationUrl() \n {\n return $url = 'https://api.constantcontact.com/mashery/account/'. $this->appKey ;\n }", "title": "" }, { "docid": "ca5bcf5c557407d8fe69660dbbdff8e7", "score": "0.5715484", "text": "public function requestTokenURL() { return 'https://api.twitter.com/oauth/request_token'; }", "title": "" }, { "docid": "1b3a706eb242eef27040b803c4618206", "score": "0.5704835", "text": "public function getAccessToken()\n {\n //Setting necessary header options\n $this->headers[] = 'Content-type: application/json; charset=utf-8';\n $this->headers[] = 'Authorization: basic '.$this->auth_code;\n\n //parameters\n $this->entries=array(\n \"grant_type\"=>\"client_credentials\",\n \"scope\"=>\"PatronApi\"\n );\n\n //url to call with curl\n $this->endpoint = $this->auth_code_url;\n\n $this->apicredentials = $this->executeURL();\n }", "title": "" }, { "docid": "6a2f3632144389b4eee1443266d0eb63", "score": "0.5697684", "text": "function getClient() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfig(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n\n // Load previously authorized credentials from a file.\n $credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);\n if (file_exists($credentialsPath)) {\n $accessToken = json_decode(file_get_contents($credentialsPath), true);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n $client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n file_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "e0bb51e73ed57d4612ce076bfabeeef9", "score": "0.56894845", "text": "function getClient( $email ) {\n //$google_config = new Google_Config();\n //$google_config->setLoggerClass('Google_Logger_File');\n\n // FORCE CURL TO USE IPv4. This avoids SSL errors...\n //$google_config->setClassConfig( 'Google_IO_Curl', 'options',\n //\tarray( 'CURLOPT_IPRESOLVE' => 'CURL_IPRESOLVE_V4',\n /*'CURLOPT_VERBOSE' => 'TRUE' */\n //\t)\n //);\n\n $client = new Google_Client( /*$google_config*/ );\n $client->setApplicationName( APPLICATION_NAME );\n $client->setScopes( SCOPES );\n $client->setAuthConfigFile( CLIENT_SECRET_PATH );\n $client->setAccessType( \"offline\" );\n\n // HACK TO GET IT WORKING ON FREAKING WINDOWS\n $guzzleClient = new \\GuzzleHttp\\Client(array( 'curl' => array( CURLOPT_SSL_VERIFYPEER => false, ), ));\n $client->setHttpClient($guzzleClient);\n\n // Load previously authorized credentials from a file.\n $credentialsPath = expandHomeDirectory(CREDENTIALS_PATH).$email;\n if( file_exists( $credentialsPath ) ) {\n $accessToken = file_get_contents( $credentialsPath );\n //$refreshToken = file_get_contents( $credentialsPath . \".refresh\" );\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl( );\n printf( \"\\n\\nOpen the following link in your browser:\\n--\\n%s\\n\\n\", $authUrl );\n print 'Enter verification code: ';\n $authCode = trim( fgets( STDIN ) );\n\n // Exchange authorization code for an access token.\n $accessToken = $client->authenticate( $authCode );\n $refreshToken = $client->getRefreshToken( );\n\n // Store the credentials to disk.\n if( !file_exists( dirname( $credentialsPath ) ) ) {\n mkdir( dirname( $credentialsPath ), 0700, true );\n }\n file_put_contents( $credentialsPath, json_encode( $accessToken ) );\n //file_put_contents( $credentialsPath . \".refresh\", $refreshToken );\n printf( \"Credentials saved to %s\\n\", $credentialsPath );\n }\n $client->setAccessToken( $accessToken );\n\n // Refresh the token if it's expired.\n if( $client->isAccessTokenExpired( ) ) {\n //$client->refreshToken( $refreshToken );\n $client->refreshToken( $client->getRefreshToken( ) );\n\n //file_put_contents( $credentialsPath, json_encode( $client->getAccessToken( ) ) );\n }\n return $client;\n}", "title": "" }, { "docid": "b45c2c3e1f4f16abc8a9af51217b56ff", "score": "0.5687185", "text": "public function getBaseAccessTokenUrl(array $params)\n {\n return sprintf('https://ugyvedkapu.hu/%soauth/token', ($this->env == 'dev') ? 'app_dev.php/' : ''); \n }", "title": "" }, { "docid": "f942aed2b39635cb6b85895a88e4d264", "score": "0.5684325", "text": "function eh_get_api_url()\n\t{\n\t\treturn \"https://api-\".$_SESSION['eh_credentials']['region_code'].\".elastichosts.com/\";\n\t}", "title": "" }, { "docid": "3025b846e3529353cd480f6bdbbd1016", "score": "0.5678532", "text": "public static function getSignInUrl() {\n\t\t// Initialise the OAuth object\n\t\t$conn = self::buildTwitterConnection();\n\t\t\n\t\t// Get temporary credentials for authorisation. \n\t\t// The callback URL is actually ignored by the 1.1 version of the Twitter API.\n\t\t$callbackUrl = 'http://contacts.tobysullivan.net/index.php?r=auth/callback';\n\t\t$temp_creds = $conn->getRequestToken($callbackUrl);\n\n\t\t// Store temp credentials for use in callback\n\t\tYii::app()->session['oauth_token'] = $temp_creds['oauth_token'];\n\t\tYii::app()->session['oauth_token_secret'] = $temp_creds['oauth_token_secret'];\n\t\t\n\t\t// Get the callback URL\n\t\t$redirectUrl = $conn->getAuthorizeURL($temp_creds);\n\t\t\n\t\treturn $redirectUrl;\n\t}", "title": "" }, { "docid": "0979c833ffd0cfa748504538cee65c78", "score": "0.5675908", "text": "public function getQueryStringIdentifier()\n {\n return 'client_credentials';\n }", "title": "" }, { "docid": "35d96c1a81dd0d4531f16d93c6d0427d", "score": "0.5671971", "text": "private function _requestToken() \n {\n if($this->accessToken == null) \n {\n $requestUrl = $this->config->getApiBaseUrl() . \"/connect/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->config->getAppSid() . \"&client_secret=\" . $this->config->getAppKey();\n try {\n $headers = [];\n $headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\"; \n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n \n $this->accessToken = $result[\"access_token\"]; \n } catch (RequestException $e) {\n $responseBody = $e->getResponse()->getBody();\n $content = $responseBody->getContents();\n $error = json_decode($content);\n\n $errorCode = $e->getCode();\n $errorMessage = $error->error != null \n ? $error->error\n : $e->getMessage();\n \n throw new ApiException($errorMessage, $errorCode);\n }\n }\n }", "title": "" }, { "docid": "e5fbd954a772b23023ee012feb22bd60", "score": "0.5671638", "text": "function getClient() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfigFile(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n\n // Load previously authorized credentials from a file.\n $credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);\n if (file_exists($credentialsPath)) {\n $accessToken = file_get_contents($credentialsPath);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->authenticate($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, $accessToken);\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n $client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $client->refreshToken($client->getRefreshToken());\n file_put_contents($credentialsPath, $client->getAccessToken());\n }\n return $client;\n}", "title": "" }, { "docid": "a39b0ffc63d0329fd2d192988e27a9de", "score": "0.56670004", "text": "public function GetOauthRequestToken($oauth_callback);", "title": "" }, { "docid": "b2eff302ddce4bd8033b26198610e857", "score": "0.56654596", "text": "protected function getApiTokenUrl()\n {\n return \"api/Token\";\n }", "title": "" }, { "docid": "a27b2808873365046346c973bb622762", "score": "0.56542933", "text": "public function getClient($client_id);", "title": "" }, { "docid": "bcda928553a251739e5f932d7d518105", "score": "0.56542355", "text": "public static function em_settings_user_auth(){\n\t\t$api = static::get_api_class(); /* @var OAuth_API $api */\n\t\ttry{\n\t\t\t$api_client = $api::get_client(false); /* @var OAuth_API_Client $api_client */\n\t\t\t$service_name = $api::get_service_name();\n\t\t\t$option_name = $api::get_option_name();\n\t\t\t//get tokens if client is configured\n\t if( !is_wp_error($api_client) ){ //oauth is not configured correctly...\n\t $oauth_url = $api_client->get_oauth_url();\n\t //we don't need to verify connections at this point, we just need to know if there are any\n\t\t if( $api_client->authorization_scope == 'user' ){\n\t $user_id = get_current_user_id();\n\t\t\t $access_tokens = $api::get_user_tokens();\n\t\t }else{\n\t\t \t$user_id = null;\n\t\t\t\t\t$access_tokens = $api::get_site_tokens();\n\t\t }\n\t\t $oauth_accounts = array();\n\t\t $connected = $reconnect_required = false;\n\t foreach( $access_tokens as $account_id => $oauth_account ){\n\t try {\n\t $api_client->load_token( $account_id, $user_id );\n\t $verification = true;\n\t } catch ( EM_Exception $e ) {\n\t $verification = false;\n\t }\n\t $oauth_account['id'] = !empty($oauth_account['email']) ? $oauth_account['email'] : $account_id;\n\t $disconnect_url_args = array( 'action' => 'em_oauth_'. $api::get_option_name(), 'callback' => 'disconnect', 'account' => $account_id, 'nonce' => wp_create_nonce('em-oauth-'. $option_name .'-disconnect-'.$account_id) );\n\t $oauth_account['disconnect'] = add_query_arg( $disconnect_url_args, admin_url( 'admin-ajax.php' ) );\n\t if( !$verification ){\n\t $oauth_account['reconnect'] = true;\n\t $reconnect_required = true;\n\t }else{\n\t $connected = true;\n\t }\n\t $oauth_accounts[] = $oauth_account;\n\t }\n\t if( $connected ){\n\t $button_url = add_query_arg( array( 'action' => 'em_oauth_'. $option_name, 'callback' => 'disconnect', 'nonce' => wp_create_nonce('em-oauth-'. $option_name .'-disconnect') ), admin_url( 'admin-ajax.php' ) );\n\t $button_text = count($oauth_accounts) > 1 ? __('Disconnect All', 'events-manager') : __('Disonnect', 'events-manager');\n\t $button_class = 'button-secondary';\n\t }else{\n\t $button_url = $oauth_url;\n\t $button_text = __('Connect', 'events-manager');\n\t $button_class = 'button-primary';\n\t }\n\t }\n\t\t\t?>\n\t\t\t<div class=\"em-oauth-service-info\">\n\t\t\t\t<?php if( $api::get_authorization_scope() == 'user'): ?>\n\t\t\t\t<h4><?php echo $service_name; ?></h4>\n\t\t\t\t<?php else: ?>\n\t\t\t\t<h4><?php esc_html_e('Account Connection', 'events-manager-zoom'); ?></h4>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if( $connected || $reconnect_required ): ?>\n\t\t\t\t\t<p><?php echo esc_html(sprintf(_n('You are successfully connected to the following %s account:', 'You are successfully connected to the following %s accounts:', count($oauth_accounts), 'events-manager-zoom'), $service_name)); ?></p>\n\t\t\t\t\t<ul clss=\"em-oauth-service-accounts\">\n\t\t\t\t\t\t<?php foreach ( $oauth_accounts as $oauth_account ): ?>\n\t\t\t\t\t\t\t<li class=\"em-oauth-service-account em-oauth-account-<?php echo empty($oauth_account['reconnect']) ? 'connected':'disconnected'; ?>\">\n\t\t\t\t\t\t\t\t<img src=\"<?php echo esc_url($oauth_account['photo']); ?>\" width=\"25\" height=\"25\">\n\t\t\t\t\t\t\t\t<div class=\"em-oauth-account-description\">\n <span class=\"em-oauth-account-label\">\n <?php if( !empty($oauth_account['reconnect']) ): ?><span class=\"dashicons dashicons-warning\"></span><?php endif; ?>\n\t <?php echo esc_html($oauth_account['name']) .' <em>('. esc_html($oauth_account['id']) .')</em>'; ?>\n </span>\n\t\t\t\t\t\t\t\t\t<span class=\"em-oauth-account-actions\">\n <?php if( count($oauth_accounts) > 1 ): ?>\n\t <a href=\"<?php echo esc_url($oauth_account['disconnect']); ?>\"><?php esc_html_e('Disconnect', 'events-manager'); ?></a>\n <?php elseif( !empty($oauth_account['reconnect']) ): ?>\n\t <a href=\"<?php echo esc_url($oauth_url); ?>\"><?php esc_html_e('Reconnect', 'events-manager'); ?></a> |\n <a href=\"<?php echo esc_url($oauth_account['disconnect']); ?>\"><?php esc_html_e('Remove', 'events-manager'); ?></a>\n <?php endif; ?>\n </span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<a class=\"<?php echo $button_class; ?> em-oauth-connect-button\" href=\"<?php echo esc_url($button_url); ?>\"><?php echo esc_html($button_text); ?></a>\n\t\t\t\t\t\t<?php if( $api::supports_multiple_tokens() ): ?>\n\t\t\t\t\t\t<a class=\"button-secondary\" href=\"<?php echo esc_url($oauth_url); ?>\"><?php esc_html_e('Connect additional account') ?></a>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</p>\n\t\t\t\t\t<?php do_action('em_settings_user_auth_after_connect_additional_'.$option_name); ?>\n\t\t\t\t\t<p><em><?php esc_html_e('If you are experiencing errors when trying to use any of these accounts, try disconnecting and connecting again.', 'events-manager'); ?></em></p>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<p><em><?php echo sprintf(esc_html__('Connect to import events and locations from %s.','events-manager'), $service_name); ?></em></p>\n\t\t\t\t\t<a class=\"<?php echo $button_class; ?> em-oauth-connect-button\" href=\"<?php echo esc_url($button_url); ?>\"><?php echo esc_html($button_text); ?></a>\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}catch( EM_Exception $ex ){\n\t\t\t?>\n\t\t\t<div class=\"em-oauth-service-info\">\n\t\t\t\t<p><em><?php echo $ex->get_message(); ?></em></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "643aac9acf95ca84d5ca91b60ab58b47", "score": "0.564564", "text": "private function get_kassa_oauth_url() : string {\n $url = Utility::add_query_parameter( KIS_KASSA_OAUTH_URL, 'domain', Utility::get_server_name() );\n $url = Utility::add_query_parameter( $url, 'woo_return_url', Utility::get_current_admin_url() );\n $url = Utility::add_query_parameter( $url, 'kassa_oauth', '1' );\n $url = Utility::add_query_parameter( $url, 'rest_url', get_rest_url() );\n if (\\get_option( static::WOO_AUTH_PARAMS ) === 'yes' ) {\n $url = Utility::add_query_parameter( $url, 'auth_params', 1);\n };\n \n // You probably don't want to change this, but here's a filter for you my friend.\n return apply_filters( 'woocommerce_kis_kassa_oauth_url', $url );\n }", "title": "" }, { "docid": "91e43f4a3e656c43dc4521e4f1ea2226", "score": "0.56422955", "text": "public function testListOauthOpenshiftIoV1OAuthClient()\n {\n\n }", "title": "" }, { "docid": "94ba0fbc44927a6283564d019beb828a", "score": "0.5639512", "text": "protected function getAccessEndpoint()\n\t{\n\t\tif (static::SANDBOX) {\n\t\t\treturn 'https://api.sandbox.paypal.com/v1/identity/openidconnect/tokenservice';\n\t\t} else {\n\t\t\treturn 'https://api.paypal.com/v1/identity/openidconnect/tokenservice';\n\t\t}\n\t}", "title": "" }, { "docid": "296d79da72a05816e84923fd9d2de340", "score": "0.56292945", "text": "public function testCreateOauthOpenshiftIoV1OAuthClient()\n {\n\n }", "title": "" }, { "docid": "8e5bb827d1de07db66571798d6cea3ca", "score": "0.56252736", "text": "public function testCreateOauthOpenshiftIoV1OAuthClientAuthorization()\n {\n\n }", "title": "" }, { "docid": "c090ff7c0ef9804ea80225bd3d5ba5e4", "score": "0.56213236", "text": "function getClient() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfig(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n\n // Load previously authorized credentials from a file.\n $credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);\n\n if (file_exists($credentialsPath)) {\n $accessToken = json_decode(file_get_contents($credentialsPath), true);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n\n #echo 'Before:' . PHP_EOL;\n\t#echo 'accessToken: ' ;\n\t#print_r($accessToken) . PHP_EOL;\n\t#echo 'getAccessToken: ' . json_encode($client->getAccessToken()) . PHP_EOL;\n\t#echo 'getRefreshToken: ' . $client->getRefreshToken() . PHP_EOL;\n\n $client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired.\n #echo 'After:' . PHP_EOL;\n\t#echo 'accessToken: ' ;\n\t#print_r($accessToken) . PHP_EOL;\n\t#echo 'getAccessToken: ' . json_encode($client->getAccessToken()) . PHP_EOL;\n\t#echo 'getRefreshToken: ' . $client->getRefreshToken() . PHP_EOL;\n\n if ($client->isAccessTokenExpired()) {\n\t$_RefreshToken = $client->getRefreshToken();\n $client->fetchAccessTokenWithRefreshToken($_RefreshToken);\n\t$_AccessToken = $client->getAccessToken();\n\t$_AccessToken['refresh_token'] = $_RefreshToken;\n file_put_contents($credentialsPath, json_encode($_AccessToken));\n\n #$client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n #file_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "e9b5201f5740f1f34c09d361c868c655", "score": "0.5620387", "text": "abstract protected function getAccessToken();", "title": "" }, { "docid": "3fac3fb0d8dd618e9e3f982544b0deac", "score": "0.5613303", "text": "public function authorizeUrl()\n {\n return $this->twitter->oauth_authorize();\n }", "title": "" }, { "docid": "7fd12b4abbfa045ec1b3962acf8a0a1a", "score": "0.5608207", "text": "function GetSSOCallbackURL() {\n if(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {\n $protcol = 'https://';\n } else {\n $protocol = 'http://';\n }\n \n return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?action=eveonlinecallback';\n}", "title": "" }, { "docid": "c2ac825280d9e1198e8bb2c82e77e4cc", "score": "0.5605064", "text": "public function getAuthTokenUrl() \n {\n return $this->getBaseApiUrl() . '/v1/authentication';\n }", "title": "" }, { "docid": "a72f8fe651939b7aaddc5784a8543a60", "score": "0.56023747", "text": "public function begin_oauth() {\n\n\t\ttry {\n\n\t\t\tif ( '1.0' === $this->get_oauth_version() ) {\n\n\t\t\t\t$response = $this->get_api()->oauth_get_request_token( add_query_arg( 'wc-api', strtolower( get_class( $this->get_plugin() ) ) . '_auth_legacy', home_url() ) );\n\n\t\t\t\tif ( setcookie( 'wc_' . $this->get_id() . '_oauth_token_secret', $response->get_token_secret(), 0, '/' ) ) {\n\t\t\t\t\t$url = add_query_arg( 'oauth_token', $response->get_token(), 'https://appcenter.intuit.com/Connect/Begin' );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Framework\\SV_WC_Plugin_Exception( 'Could not set token secret cookie.' );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t$url = add_query_arg( array(\n\t\t\t\t\t'client_id' => $this->get_consumer_key(),\n\t\t\t\t\t'scope' => 'com.intuit.quickbooks.payment',\n\t\t\t\t\t'redirect_uri' => urlencode( $this->get_auth_redirect_uri() ),\n\t\t\t\t\t'response_type' => 'code',\n\t\t\t\t\t'state' => hash_hmac( 'sha256', md5( wp_salt(), true ), $this->get_consumer_secret() ),\n\t\t\t\t), 'https://appcenter.intuit.com/connect/oauth2' );\n\t\t\t}\n\n\t\t\twp_redirect( $url );\n\t\t\texit;\n\n\t\t} catch ( Framework\\SV_WC_Plugin_Exception $e ) {\n\n\t\t\t$this->handle_oauth_connect_error( $e );\n\t\t}\n\t}", "title": "" }, { "docid": "3ce042b4eb9e9da4d35af58d137ed865", "score": "0.56017435", "text": "public function GetOAuthAuthorizationUrl() {\n return $this->GetOAuthHandler()->GetAuthorizationUrl($this->oauthInfo,\n $this->GetAuthServer());\n }", "title": "" }, { "docid": "396fec26500868877985c3de4d83acd9", "score": "0.55970293", "text": "public function setTokenGeneratorEndpoint(string $url);", "title": "" } ]
3b531fa697f9fd63537ffca2769aa63f
Unsets Idempotency Key. A value you specify that uniquely identifies this update request. If you are unsure whether a particular update was applied to an order successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate updates to the order. The latest order version is returned. For more information, see [Idempotency]( patterns/idempotency).
[ { "docid": "1358e75a527c55e03c640f98fbccf30d", "score": "0.821184", "text": "public function unsetIdempotencyKey(): void\n {\n $this->idempotencyKey = [];\n }", "title": "" } ]
[ { "docid": "c0789480683dd938af1d400a32e00145", "score": "0.8100706", "text": "public function removeIdempotencyKey()\n {\n unset($this->idempotency);\n }", "title": "" }, { "docid": "4fe9a96af147847fcd337e8ed99cf61f", "score": "0.72828585", "text": "public function unsetIdempotencyKey(): self\n {\n $this->instance->unsetIdempotencyKey();\n return $this;\n }", "title": "" }, { "docid": "7c503410a8bba13f575276a6a9fe8c64", "score": "0.67813075", "text": "public function setIdempotencyKey(string $idempotencyKey): void\n {\n $this->idempotencyKey = $idempotencyKey;\n }", "title": "" }, { "docid": "f929040680b9ebf1975276d05d41c54b", "score": "0.6638962", "text": "public function setIdempotencyKey(?string $idempotencyKey): void\n {\n $this->idempotencyKey = $idempotencyKey;\n }", "title": "" }, { "docid": "f929040680b9ebf1975276d05d41c54b", "score": "0.6638962", "text": "public function setIdempotencyKey(?string $idempotencyKey): void\n {\n $this->idempotencyKey = $idempotencyKey;\n }", "title": "" }, { "docid": "2b8f0a676e24ed7ae33d1b714947621d", "score": "0.65665615", "text": "public function setIdempotencyKey(?string $idempotencyKey): void\n {\n $this->idempotencyKey['value'] = $idempotencyKey;\n }", "title": "" }, { "docid": "2b8f0a676e24ed7ae33d1b714947621d", "score": "0.65665615", "text": "public function setIdempotencyKey(?string $idempotencyKey): void\n {\n $this->idempotencyKey['value'] = $idempotencyKey;\n }", "title": "" }, { "docid": "a20edad2af4d428f064f6ba44c763b9d", "score": "0.6016245", "text": "public function unsetUniqueKey() {\n\t\t$this->unique_key = [];\n\t}", "title": "" }, { "docid": "a46336b0eacec23c11f48bbaafa9016c", "score": "0.5917754", "text": "public function getIdempotencyKey(): string\n {\n return $this->idempotencyKey;\n }", "title": "" }, { "docid": "b45af9dc24b8cbf2255f81656c770442", "score": "0.5825547", "text": "public function idempotencyKey(string $key)\n {\n $this->idempotency = $key;\n\n return $this;\n }", "title": "" }, { "docid": "0439b74bbb1e21794d6b0b53c0ea8713", "score": "0.5722494", "text": "public function __unset(string|int $key): void;", "title": "" }, { "docid": "476f5933fbd881d9ff14a0fa6c9b74d3", "score": "0.5698932", "text": "public static function forget( $key );", "title": "" }, { "docid": "ba783b626c2ec98cf79483d059a17ea1", "score": "0.56733596", "text": "public function forget( $key );", "title": "" }, { "docid": "74fb42ab7b6defd72dbb5713fbb856b7", "score": "0.56290513", "text": "public function unset( $key );", "title": "" }, { "docid": "a74a39f181b853dcc59039d21cf7bffb", "score": "0.5581431", "text": "public function getIdempotencyKey(): ?string\n {\n return $this->idempotencyKey;\n }", "title": "" }, { "docid": "a74a39f181b853dcc59039d21cf7bffb", "score": "0.5581431", "text": "public function getIdempotencyKey(): ?string\n {\n return $this->idempotencyKey;\n }", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.55804265", "text": "public function forget($key);", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.55804265", "text": "public function forget($key);", "title": "" }, { "docid": "9f110ff50a2c3f54baffeaf1a01e9413", "score": "0.5569561", "text": "public function unset($key);", "title": "" }, { "docid": "77b52bce9eed6f56d8f6241922e569de", "score": "0.5557025", "text": "public function __unset(string $key): void;", "title": "" }, { "docid": "2099fcff3c96a2ff2415a2df1cffc5b9", "score": "0.5534075", "text": "public function getIdempotencyKey() : string\n {\n return $this->getParameter('idempotencyKey');\n }", "title": "" }, { "docid": "601eb65383f00ce4dd53a4e6353c37a6", "score": "0.5526715", "text": "public function unsetValue($key);", "title": "" }, { "docid": "f3c9a023507321f5e8804c1bb98ba11f", "score": "0.54675573", "text": "public function idempotent($idempotencyKey)\n {\n $this->config->setIdempotencyKey($idempotencyKey);\n\n return $this;\n }", "title": "" }, { "docid": "73ebd99d4a8ba7e9e11efed461f0d2ec", "score": "0.5414109", "text": "public function decr($key) { }", "title": "" }, { "docid": "ae8de9c80d4631d9bc0d5dc556923c79", "score": "0.5384215", "text": "public function decr($key) {}", "title": "" }, { "docid": "664db7e4a66a9800ec3f56ab4a16b219", "score": "0.5361161", "text": "public static function offsetUnset($key){\n\t\t\t\\Illuminate\\Cache\\Repository::offsetUnset($key);\n\t\t}", "title": "" }, { "docid": "be1ee9b190335f40f32e9ccd688bc2ea", "score": "0.533312", "text": "public function unsetOrderId(): void\n {\n $this->orderId = [];\n }", "title": "" }, { "docid": "df1a56c55312980d9c97418c6442da42", "score": "0.53330696", "text": "public function __unset( string $key):void\n\t{\n\t\tunset($this->attributes[$key]);\n\t}", "title": "" }, { "docid": "e8c31ecac815d7de54e89af6d12cbe05", "score": "0.53260434", "text": "function unset_key($array_key)\n\t{\n\t\tif(!empty($this->final_output[$array_key]))\n\t\t{\n\t\t\tunset($this->final_output[$array_key]);\n\t\t}\n\t}", "title": "" }, { "docid": "7bf59e9c618e2bb4c25764b2f0e74dc4", "score": "0.5289629", "text": "public function decr($key);", "title": "" }, { "docid": "2629b48623f78703f6d226edad85666e", "score": "0.52852345", "text": "private function itemUnset(mixed $key): void\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "3e31c2fd154b1a690db7f685a3662867", "score": "0.5269134", "text": "public function __unset($key) {\n\t\t$this->remove($key); \n\t}", "title": "" }, { "docid": "3e31c2fd154b1a690db7f685a3662867", "score": "0.5269134", "text": "public function __unset($key) {\n\t\t$this->remove($key); \n\t}", "title": "" }, { "docid": "4def3ab518f7b523b050934e2c7f7967", "score": "0.5266113", "text": "public static function offsetUnset($key){\n \\Illuminate\\Cache\\Repository::offsetUnset($key);\n }", "title": "" }, { "docid": "e0a86c645528e539d2d305dae2536d43", "score": "0.5259415", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "e0a86c645528e539d2d305dae2536d43", "score": "0.5259415", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "dc226863db492cb23d9338a026d9f137", "score": "0.52569795", "text": "public function __unset($key) {\n\t\t$this->remove($key);\n\t}", "title": "" }, { "docid": "4ec3c4deddff06ecf0f49e507d64ac7a", "score": "0.52408236", "text": "public function getIdempotencyKey(): ?string\n {\n if (count($this->idempotencyKey) == 0) {\n return null;\n }\n return $this->idempotencyKey['value'];\n }", "title": "" }, { "docid": "4ec3c4deddff06ecf0f49e507d64ac7a", "score": "0.52408236", "text": "public function getIdempotencyKey(): ?string\n {\n if (count($this->idempotencyKey) == 0) {\n return null;\n }\n return $this->idempotencyKey['value'];\n }", "title": "" }, { "docid": "290d234736b2cd56d9fcdd76128ca2d8", "score": "0.5236914", "text": "public function __unset($key)\n {\n }", "title": "" }, { "docid": "290d234736b2cd56d9fcdd76128ca2d8", "score": "0.5236347", "text": "public function __unset($key)\n {\n }", "title": "" }, { "docid": "290d234736b2cd56d9fcdd76128ca2d8", "score": "0.5236347", "text": "public function __unset($key)\n {\n }", "title": "" }, { "docid": "ae7c5e1cb1f4e0e49a9c7842fc1e4bb2", "score": "0.5231133", "text": "public static function deleteVersionKey() {\n EfrontConfiguration :: setValue('version_key', '');\n EfrontConfiguration :: setValue('version_users', '');\n EfrontConfiguration :: setValue('version_serial', '');\n EfrontConfiguration :: setValue('version_type', '');\n //EfrontConfiguration :: setValue('version_paypal', '');\n //EfrontConfiguration :: setValue('version_hcd', '');\n }", "title": "" }, { "docid": "8920d9f20a12e6a8d39b3cae414c6e56", "score": "0.5221222", "text": "public static function offsetUnset($key)\n {\n \\Illuminate\\Cache\\Repository::offsetUnset($key);\n }", "title": "" }, { "docid": "fa546752b3cc88c56d958bcec1815616", "score": "0.51868933", "text": "abstract public function forget($key);", "title": "" }, { "docid": "fa546752b3cc88c56d958bcec1815616", "score": "0.51868933", "text": "abstract public function forget($key);", "title": "" }, { "docid": "57ebbde286853bcae3fe06b4def0eba5", "score": "0.5183194", "text": "public function removeExchangeItemByKey($key);", "title": "" }, { "docid": "563643d951c38a6dc5e2abac9bb38b57", "score": "0.51608825", "text": "public function unsetData($key);", "title": "" }, { "docid": "774caade9697edc47a70a74e349beeaa", "score": "0.51598257", "text": "public function offsetUnset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "7367f2d4ca0d0700b3a9d4e7c24fe1f7", "score": "0.51585615", "text": "abstract protected function unsetValue($key);", "title": "" }, { "docid": "9c2fadc04fa6421982344348186556bf", "score": "0.51569766", "text": "public function __unset(string $key) {\n\t\t\tunset($this->data[$key], $this->index[$key]);\n\n\t\t\tif ($this->autoPersist)\n\t\t\t\t$this->persist();\n\t\t}", "title": "" }, { "docid": "26536fa3675005fec0949a1250b0f8ca", "score": "0.51512265", "text": "public function forget($key)\n\t{\n\t\t$this->table()->where('key', '=', $this->key.$key)->delete();\n\t}", "title": "" }, { "docid": "4936881c9296aadcaafc6ffeaae57197", "score": "0.5146574", "text": "public function idempotencyKey(?string $value): self\n {\n $this->instance->setIdempotencyKey($value);\n return $this;\n }", "title": "" }, { "docid": "d3ca7c7d42530e8d70fc8b7f346a5ccd", "score": "0.51447296", "text": "public function __UNSET ($objKey) {\n // Check\n if (isset ($this\n ->objContainer[$objKey])) {\n // Return\n unset ($this\n ->objContainer[$objKey]);\n } else {\n // Throws\n throw new OffsetKeyNotSetException;\n }\n }", "title": "" }, { "docid": "b5a343d59f85e2f587089fc3017c4f17", "score": "0.5138302", "text": "public function setIdempotencyKey(string $value) : AbstractRequest\n {\n return $this->setParameter('idempotencyKey', $value);\n }", "title": "" }, { "docid": "d47f8ba75e6a5dea55de227c03135806", "score": "0.5121963", "text": "public function unset(string $key): self\n {\n $data = $this->getData(true);\n\n return $this->setData(\n Arr::except($data, $key)\n );\n }", "title": "" }, { "docid": "45618f99309f2f2f869dcdeab5ca1a36", "score": "0.50880134", "text": "function erase($key) {\n\n $current_session = self::confirm();\n\n $_SESSION[$current_session['key']][$key] = null;\n\n unset($_SESSION[$current_session['key']][$key]);\n }", "title": "" }, { "docid": "46c91db311a1663e7dd8e0d86c121fdf", "score": "0.5082345", "text": "public function unsetData($key = null);", "title": "" }, { "docid": "90de36e3fc09acfcff0704918ff22a94", "score": "0.50775766", "text": "public function offsetUnset($key)\n {\n $this->forget($key);\n }", "title": "" }, { "docid": "90de36e3fc09acfcff0704918ff22a94", "score": "0.50775766", "text": "public function offsetUnset($key)\n {\n $this->forget($key);\n }", "title": "" }, { "docid": "03eddde547ee05751d9e451138d932c9", "score": "0.50718874", "text": "public function __unset( $key )\n\t{\n\t\t$this->_smarty->clear_assign( $key );\n\t}", "title": "" }, { "docid": "475ae812090a25a442b0df0aaa2a8049", "score": "0.5054247", "text": "public function __unset($key)\n {\n $cfg = App::make(ProviderContract::class);\n \n if (is_a($this, Model::class) && ! config('easycfg.autosave')) {\n $this->_cupoftea_easy_cfg[$key] = null;\n \n if (! $this->_cupoftea_easy_cfg_observing) {\n $this->saved(function ($model) use ($cfg) {\n foreach ($model->_cupoftea_easy_cfg as $key => $value) {\n if ($value === null) {\n $cfg->delete($key, get_class($model), $model->primaryKey);\n } else {\n $cfg->set($key, $value, get_class($model), $model->primaryKey);\n }\n }\n });\n \n $this->_cupoftea_easy_cfg_observing = true;\n }\n } else {\n if (isset($this->id) || isset($this->primaryKey)) {\n return $cfg->delete($key, get_class($this), isset($this->primaryKey) ? $this->primaryKey : $this->id);\n } else {\n return $cfg->delete($key, get_class($this));\n }\n }\n }", "title": "" }, { "docid": "485f67c8aa877ffaf52988e58dcaaf60", "score": "0.50470513", "text": "public function cancelPaymentByIdempotencyKey(\n \\Square\\Models\\CancelPaymentByIdempotencyKeyRequest $body\n ): ApiResponse {\n //prepare query string for API call\n $_queryBuilder = '/v2/payments/cancel';\n\n //validate and preprocess url\n $_queryUrl = ApiHelper::cleanUrl($this->config->getBaseUri() . $_queryBuilder);\n\n //prepare headers\n $_headers = [\n 'user-agent' => BaseApi::USER_AGENT,\n 'Square-Version' => $this->config->getSquareVersion(),\n 'Accept' => 'application/json',\n 'content-type' => 'application/json',\n 'Authorization' => sprintf('Bearer %1$s', $this->config->getAccessToken())\n ];\n $_headers = ApiHelper::mergeHeaders($_headers, $this->config->getAdditionalHeaders());\n\n //json encode body\n $_bodyJson = Request\\Body::Json($body);\n\n $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl);\n\n //call on-before Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n // Set request timeout\n Request::timeout($this->config->getTimeout());\n\n // and invoke the API call request to fetch the response\n try {\n $response = Request::post($_queryUrl, $_headers, $_bodyJson);\n } catch (\\Unirest\\Exception $ex) {\n throw new ApiException($ex->getMessage(), $_httpRequest);\n }\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n if (!$this->isValidResponse($_httpResponse)) {\n return ApiResponse::createFromContext($response->body, null, $_httpContext);\n }\n\n $mapper = $this->getJsonMapper();\n $deserializedResponse = $mapper->mapClass(\n $response->body,\n 'Square\\\\Models\\\\CancelPaymentByIdempotencyKeyResponse'\n );\n return ApiResponse::createFromContext($response->body, $deserializedResponse, $_httpContext);\n }", "title": "" }, { "docid": "3f77d4602a61f7c1b03e27fb15e1a884", "score": "0.50458944", "text": "public function removeKey($key);", "title": "" }, { "docid": "c0d9b77f34b791a211e43acc088b407f", "score": "0.50187314", "text": "public function forget($key)\n\t{\n\t\tapc_delete(Config::get('cache.key').$key);\n\t}", "title": "" }, { "docid": "0796dbee86c03184067a8707e82e0ec8", "score": "0.49997437", "text": "public function untrack_keyphrase($keyphrase_id)\n {\n }", "title": "" }, { "docid": "732b54c4a81a6ff354e09c90de3a8293", "score": "0.49917817", "text": "public function offsetUnset($key)\n {\n $this->__unset($key);\n }", "title": "" }, { "docid": "5809e29021ab9546f441b2c8c1c3464b", "score": "0.4988203", "text": "public static function offsetUnset($key){\n \\Illuminate\\Config\\Repository::offsetUnset($key);\n }", "title": "" }, { "docid": "4bcd57d1c5f4925541bbf58dd1cfe327", "score": "0.49818838", "text": "public function forget($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "29090f68374975699dbda4d93dbd2693", "score": "0.4974306", "text": "public function __unset($key): void\n {\n $this->offsetUnset($key);\n }", "title": "" }, { "docid": "b0cd08e432a8db2f20742737a2f64eda", "score": "0.49736968", "text": "public final function resetKeyVersionNumber()\r\n\t\t {\r\n\t\t\t \t$intNewKey = time();\r\n\t\t\t\t$this->mc->set('VERION_KEY', $intNewKey);\t\r\n\t\t\t\treturn ($intNewKey);\r\n\t\t }", "title": "" }, { "docid": "910de7767bd95aff62a23644bc6e12a9", "score": "0.4973482", "text": "public function forget($key)\n {\n return apcu_delete($this->prefix . $key);\n }", "title": "" }, { "docid": "f68025207f65946d85ad3af03c39d2db", "score": "0.49711248", "text": "function delete_key() {\n\n\t\tcheck_ajax_referer( 'delete-key', 'security' );\n\n\t\tglobal $wpdb;\n\n\t\t$key_id = intval( $_POST['key_id'] );\n\t\t$order_id \t= intval( $_POST['order_id'] );\n\n\t\t$wpdb->query(\"\n\t\t\tDELETE FROM {$wpdb->prefix}woocommerce_software_licences\n\t\t\tWHERE key_id = $key_id\n\t\t\");\n\n\t\t$wpdb->query(\"\n\t\t\tDELETE FROM {$wpdb->prefix}woocommerce_software_activations\n\t\t\tWHERE key_id = $key_id\n\t\t\");\n\n\t\tdie();\n\t}", "title": "" }, { "docid": "251893b8d4694717864e6810848b4b95", "score": "0.4969611", "text": "public function __unset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "4019e5dceacea01394bfce2099694571", "score": "0.49665633", "text": "public function resetKey($email);", "title": "" }, { "docid": "ce8db85041d44b8094b72b8df3628a16", "score": "0.49545532", "text": "function db_API_killKey($key)\n{\n $key = db_esc($key);\n db_run(\"DELETE FROM \".TBL_APIKEYS.\" WHERE code='$key'\");\n}", "title": "" }, { "docid": "e726311764b34f3dada8cda674cfdc48", "score": "0.49435234", "text": "public function unsetOption( $sKey ) { $this->_optionList->unsetOption( $sKey ); }", "title": "" }, { "docid": "390448665d625df954fa08cd704c9a0c", "score": "0.49434894", "text": "public function offsetUnset( $key ) {\n\t\t$this->session->remove( $key );\n\t}", "title": "" }, { "docid": "fa8589b640833d583a2d79c47229532d", "score": "0.49434742", "text": "public function offsetUnset($key) {\n\t\t$this->remove($key);\n\t}", "title": "" }, { "docid": "fc8df4a4019eafbbecc356c097883789", "score": "0.49419543", "text": "public function offsetUnset($key): void \n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "30227115d1c40b50d4ce968f04f5be6b", "score": "0.4925453", "text": "public function offsetUnset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "12347078f533dce60b8b17059573b253", "score": "0.49240428", "text": "public function clearUnguardedAttributes(): static;", "title": "" }, { "docid": "a22050117b0c982886215f7658c8c3ef", "score": "0.4919619", "text": "public function unset(string $key)\n {\n unset($_SESSION[$key]);\n }", "title": "" }, { "docid": "e857634b8d1f8d706eeda908db36b56a", "score": "0.49151498", "text": "public function offsetUnset($key);", "title": "" }, { "docid": "8ccac290a2058c9a03c4f5bd5e50288b", "score": "0.49103218", "text": "public function unset($key)\n {\n unset($_SESSION[$key]);\n }", "title": "" }, { "docid": "b28643f851c7090b725ff2676d81d6fc", "score": "0.4909048", "text": "public function __unset($key)\n {\n $this->offsetUnset($key);\n }", "title": "" }, { "docid": "195b7895ce5370d874f7d16148dc4ed0", "score": "0.4908034", "text": "public function offsetUnset($key)\n\t{\n\t\tunset($this->items[$key]);\n\t}", "title": "" }, { "docid": "55464ee7fe7b67b50a6df508588319f4", "score": "0.49060106", "text": "public function forget(string $key)\n {\n if (array_key_exists($key, $this->value)) {\n unset($this->value[$key]);\n $this->store();\n }\n }", "title": "" }, { "docid": "764dc8ef3172e742072b43869ef95c3a", "score": "0.4904468", "text": "public static function unset($key) {\n unset($_SESSION[$key]);\n }", "title": "" }, { "docid": "b650ee2e9e8f27050cf9db57ae4f30b2", "score": "0.48975807", "text": "public function offsetUnset($key)\n {\n }", "title": "" }, { "docid": "b650ee2e9e8f27050cf9db57ae4f30b2", "score": "0.48975807", "text": "public function offsetUnset($key)\n {\n }", "title": "" }, { "docid": "bbd615130f3091ee11d2207f5d1bc403", "score": "0.48844564", "text": "public function __unset($key) {\n unset( $this->output[$key] );\n }", "title": "" }, { "docid": "b481e86d76e18edf36bd11f73b16910c", "score": "0.48732933", "text": "public function decrBy($key, $value) {}", "title": "" }, { "docid": "ed7343696f507f76429a4eed80851786", "score": "0.4866313", "text": "public function del($key) {}", "title": "" }, { "docid": "284bee190180139801f6b57325c4d92d", "score": "0.4861785", "text": "public function offsetUnset($key)\n {\n $this->remove($key);\n }", "title": "" }, { "docid": "37da2e4bf13309ac91a308699b34fa8e", "score": "0.48616764", "text": "public abstract function removeKey($key);", "title": "" }, { "docid": "ddb825fee7a6c6c3212b6a9b89c734a0", "score": "0.4848562", "text": "public function forget()\n {\n $this->store->remove($this->getKey());\n }", "title": "" }, { "docid": "7f71489c3ab4183dc6a8937500726090", "score": "0.4837357", "text": "public function forget($key)\n {\n unset($this->messages[$key]);\n }", "title": "" }, { "docid": "508ce4a2de6c7171d153380c70202051", "score": "0.4831947", "text": "public function unsetParam(string $key): void\n {\n $this->request->unsetParam($key);\n }", "title": "" } ]
5b1a67066e5cd227de992d130be3bb4d
Restrict (post) content based on content restriction rules
[ { "docid": "2753754f2ccce02ceedc7a594317720e", "score": "0.6915024", "text": "public function restrict_content( $content ) {\n\t\tglobal $post;\n\n\t\t$restricted = false;\n\t\t$message = '';\n\n\t\t// check if content is restricted - and this function is not being recursively called\n\t\t// from `get_the_excerpt`, which internally applies `the_content` to the excerpt, which\n\t\t// then calls this function, ... until the stack is full and I want to go home and not\n\t\t// deal with this anymore...\n\t\tif ( wc_memberships_is_post_content_restricted() && ! doing_filter( 'get_the_excerpt' ) ) {\n\n\t\t\t$restricted = true;\n\n\t\t\t// check if user has access to restricted content\n\t\t\tif ( ! current_user_can( 'wc_memberships_view_restricted_post_content', $post->ID ) ) {\n\n\t\t\t\t// user does not have access, filter the content\n\t\t\t\t$content = '';\n\n\t\t\t\tif ( ! in_array( $post->ID, $this->content_restriction_applied, true ) ) {\n\n\t\t\t\t\tif ( 'yes' === get_option( 'wc_memberships_show_excerpts' ) ) {\n\t\t\t\t\t\t$content = get_the_excerpt();\n\t\t\t\t\t}\n\n\t\t\t\t\t$message = '<div class=\"woocommerce\"><div class=\"woocommerce-info wc-memberships-restriction-message wc-memberships-message wc-memberships-content-restricted-message\">' . wc_memberships()->get_frontend_instance()->get_content_restricted_message( $post->ID ) . '</div></div>';\n\n\t\t\t\t\t$content .= $message;\n\t\t\t\t}\n\n\t\t\t// check if user has access to delayed content\n\t\t\t} elseif ( ! current_user_can( 'wc_memberships_view_delayed_post_content', $post->ID ) ) {\n\n\t\t\t\t// user does not have access, filter the content\n\t\t\t\t$content = '';\n\n\t\t\t\tif ( ! in_array( $post->ID, $this->content_restriction_applied, true ) ) {\n\n\t\t\t\t\tif ( 'yes' === get_option( 'wc_memberships_show_excerpts' ) ) {\n\t\t\t\t\t\t$content = get_the_excerpt();\n\t\t\t\t\t}\n\n\t\t\t\t\t$message = '<div class=\"woocommerce\"><div class=\"woocommerce-info wc-memberships-restriction-message wc-memberships-content-delayed-message\">' . wc_memberships()->get_frontend_instance()->get_content_delayed_message( get_current_user_id(), $post->ID ) . '</div></div>';\n\n\t\t\t\t\t$content .= $message;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// indicates that the content for this post has already been filtered\n\t\t\t$this->content_restriction_applied[] = $post->ID;\n\t\t}\n\n\t\t/**\n\t\t * Filter the restricted content\n\t\t *\n\t\t * @since 1.6.0\n\t\t * @param string $content HTML content\n\t\t * @param bool $restricted Whether the content is restricted\n\t\t * @param string $message The restriction message applied, could be empty string\n\t\t * @param \\WP_Post $post The post being restricted\n\t\t */\n\t\treturn apply_filters( 'wc_memberships_the_restricted_content', $content, $restricted, $message, $post );\n\t}", "title": "" } ]
[ { "docid": "c666070aca0c79dd427344bcb96e46d7", "score": "0.6967426", "text": "function pr_page_restrict ( $pr_page_content ) {\n\tglobal $user_ID, $post;\n\tget_currentuserinfo ();\n\t$pr_check = pr_get_opt('method') == 'all';\n\t$pr_check = $pr_check || (\n\t\t( is_array(pr_get_opt('pages')) || is_array(pr_get_opt('posts')) ) \n\t\t&& ( count(pr_get_opt('pages')) + count(pr_get_opt('posts')) > 0 )\n\t);\n\tif ( ! $user_ID && $pr_check ) :\n\t\t// current post is in either page / post restriction array\n\t\t$is_restricted = ( in_array($post->ID, pr_get_opt('pages')) || in_array($post->ID, pr_get_opt('posts')) ) && pr_get_opt ( 'method' ) != 'none';\n\t\t// content is restricted OR everything is restricted\n\t\tif ( $is_restricted || pr_get_opt('method') == 'all' ):\n\t\t\t$pr_page_content = pr_get_page_content();\n\t\telseif ( ( in_array($post->ID, pr_get_opt('pages')) || in_array($post->ID, pr_get_opt('posts')) ) && ( is_archive () || is_search () ) ) :\n $pr_page_content = '<p>' . pr_get_opt ( 'message' ) . '</p>';\n $pr_page_content = str_replace('login', '<a href=\"' . get_bloginfo ( 'wpurl' ) . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']) . '\">login</a>', $pr_page_content);\n\t\tendif;\n\tendif;\n\treturn $pr_page_content;\n}", "title": "" }, { "docid": "b66721b59c1d93f8a35fc7eabb313c6e", "score": "0.68014205", "text": "function wp_postandpage($content){\n\t\t\t\n\t\t\tglobal $post;\n\t\t\t\n\t\t\tif(strstr($content,'[wprestriction]')){\n\t\t\t\t$messages = get_option('wprestriction');\n\t\t\t\tif(is_user_logged_in()){\t\t\t\t\t\n\t\t\t\t\t//restricted users\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$rusers = get_post_meta($post->ID,'restricted_users',true);\n\t\t\t\t\tif(!is_array($rusers)){\n\t\t\t\t\t\t$rusers = array('','');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//current user\n\t\t\t\t\tglobal $current_user;\n\t\t\t\t\tget_currentuserinfo();\n\t\t\t\t\t$user = $current_user->ID;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(in_array($user,$rusers)){\n\t\t\t\t\t\treturn $messages['usersmessage'];\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn $this->contents($content);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$message = $messages['usersmessage'];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn $messages['visitorsmessage'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b1f4072b4e58643a9f0b6662e062c6e3", "score": "0.6638314", "text": "function allow_html_content() {\n\n\t\t// using publish_posts for now - means author+\n\t\tif ( current_user_can( 'publish_posts' ) ) {\n\n\t\t\t// remove html filtering on content. Note - this has possible consequences...\n\t\t\t// see: http://wordpress.org/extend/plugins/unfiltered-mu/\n\t\t\tkses_remove_filters();\n\n\t\t}\n\t}", "title": "" }, { "docid": "2d6397b7c3f95f4e9a7276344223e8a3", "score": "0.63634044", "text": "function quest_filter_content( $content ){\n\t\tglobal $post;\n\t\tif ( get_page_template_slug( $post->ID ) !== 'page-builder.php' ) {\n\t\t\treturn $content;\n\t\t}\n\t\t$cnt = preg_match_all( \"/<[^<]+data-process='true'[^>]+>/\", $content, $matches );\n\n\t\tif ( $cnt === false || $cnt < 1 ) {\n\t\t\treturn $content;\n\t\t}\n\n\t\tforeach ( $matches[0] as $key => $col ) {\n\t\t\t$module = quest_get_module_type( $col ); \n\t\t\t$cls = 'PT_PageBuilder_' . ucwords( $module ) . '_Module';\n\n\t\t\tif ( ! class_exists( $cls ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$handler = new $cls ( );\n\n\t\t\t$content = $handler->filterContent( $content, $col );\n\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "6896695521c843bf3dac3732a8766198", "score": "0.62176776", "text": "public function resellerContentRestriction()\n {\n $data['media_type'] = MediaType::all();\n return view('reseller.resellerContentRestriction', $data);\n }", "title": "" }, { "docid": "63d2739b25cae124256ceb7da92ba8fe", "score": "0.6059763", "text": "public function noRightsToEditContent()\n {\n $blNoRights = false;\n \n if (isset($_GET['post']) && is_numeric($_GET['post'])) {\n $oPost = $this->getPost($_GET['post']);\n $blNoRights = !$this->getAccessHandler()->checkObjectAccess($oPost->post_type, $oPost->ID);\n }\n \n if (isset($_GET['attachment_id']) && is_numeric($_GET['attachment_id']) && !$blNoRights) {\n $oPost = $this->getPost($_GET['attachment_id']);\n $blNoRights = !$this->getAccessHandler()->checkObjectAccess($oPost->post_type, $oPost->ID);\n }\n \n if (isset($_GET['tag_ID']) && is_numeric($_GET['tag_ID']) && !$blNoRights) {\n $blNoRights = !$this->getAccessHandler()->checkObjectAccess(self::TERM_OBJECT_TYPE, $_GET['tag_ID']);\n }\n\n if ($blNoRights) {\n wp_die(TXT_UAM_NO_RIGHTS);\n }\n }", "title": "" }, { "docid": "729a842b34d427a69e52808cad0c9ef3", "score": "0.6021703", "text": "function filterQuestionView($theContent)\n\t{\n\t\tglobal $post;\n\t\t$postID = get_the_ID();\n\t\t$thisPostType = get_post_type( $postID );\n\t\t// hide the question title AND the question content so it can only be viewed from shortcode or from quiz\n\t\tif($thisPostType==\"ek_question\") \n\t\t{\n\t\t\t$theContent = '<style>\n\t\t\t.entry-title, .nav-links { \n\t\t\tdisplay:none; \n\t\t\t}\n\t\t\t</style>Forbidden';\n\t\t}\n\t\t\n\t\treturn $theContent;\n\t}", "title": "" }, { "docid": "c9a4d78e51bbcf50ca8922f3a71dfedd", "score": "0.59808713", "text": "protected function restrict() {\n $this->restrict_to_permission('manage_ads');\n }", "title": "" }, { "docid": "14526c6df6debdd2656149582c3ee638", "score": "0.59296364", "text": "public function filter($content){ }", "title": "" }, { "docid": "5d9b647d7f2fa47c74e72bd09bb9367b", "score": "0.58980674", "text": "private function get_user_content_access_conditions() {\n\n\t\tif ( empty( $this->user_content_access_conditions ) ) {\n\n\t\t\t// Avoid filter loops\n\t\t\tremove_filter( 'pre_get_posts', array( $this, 'exclude_restricted_posts' ) );\n\n\t\t\t// Find restricted posts from restriction rules\n\t\t\t$rules = wc_memberships()->get_rules_instance()->get_rules( array(\n\t\t\t\t'rule_type' => array( 'content_restriction', 'product_restriction' ),\n\t\t\t) );\n\n\t\t\t$restricted = $granted = array(\n\t\t\t\t'posts' => array(),\n\t\t\t\t'post_types' => array(),\n\t\t\t\t'terms' => array(),\n\t\t\t\t'taxonomies' => array(),\n\t\t\t);\n\n\t\t\t$conditions = array(\n\t\t\t\t'restricted' => $restricted,\n\t\t\t\t'granted' => $granted,\n\t\t\t);\n\n\t\t\t// shop managers/admins can access everything\n\t\t\tif ( is_user_logged_in() && current_user_can( 'wc_memberships_access_all_restricted_content' ) ) {\n\n\t\t\t\treturn $this->user_content_access_conditions = $conditions;\n\t\t\t}\n\n\t\t\t// Get all the content that is either restricted or granted for the user\n\t\t\tif ( ! empty( $rules ) ) {\n\n\t\t\t\t$user_id = get_current_user_id();\n\n\t\t\t\tforeach ( $rules as $rule ) {\n\n\t\t\t\t\t// skip rule if the plan is not published\n\t\t\t\t\tif ( 'publish' !== get_post_status( $rule->get_membership_plan_id() ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// skip non-view product restriction rules\n\t\t\t\t\tif ( 'product_restriction' === $rule->get_rule_type() && 'view' !== $rule->get_access_type() ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// check if user is an active member of the plan\n\t\t\t\t\t$plan_id = $rule->get_membership_plan_id();\n\t\t\t\t\t$is_member = $user_id > 0 && wc_memberships()->get_user_memberships_instance()->is_user_active_member( $user_id, $plan_id );\n\t\t\t\t\t$has_access = false;\n\n\t\t\t\t\t// check if user has scheduled access to the content\n\t\t\t\t\tif ( $is_member ) {\n\n\t\t\t\t\t\t$user_membership = wc_memberships()->get_user_memberships_instance()->get_user_membership( $user_id, $plan_id );\n\n\t\t\t\t\t\t/** This filter is documented in includes/class-wc-memberships-capabilities.php **/\n\t\t\t\t\t\t$from_time = apply_filters( 'wc_memberships_access_from_time', $user_membership->get_start_date( 'timestamp' ), $rule, $user_membership );\n\n\t\t\t\t\t\t// sanity check: bail out if there's no valid set start date\n\t\t\t\t\t\tif ( ! $from_time || ! is_numeric( $from_time ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$inactive_time = $user_membership->get_total_inactive_time();\n\t\t\t\t\t\t$current_time = current_time( 'timestamp', true );\n\t\t\t\t\t\t$rule_access_time = $rule->get_access_start_time( $from_time );\n\n\t\t\t\t\t\t$has_access = $rule_access_time + $inactive_time <= $current_time;\n\t\t\t\t\t}\n\n\t\t\t\t\t$condition = $has_access ? 'granted' : 'restricted';\n\n\t\t\t\t\t// find posts that are either restricted or granted access to\n\t\t\t\t\tif ( 'post_type' === $rule->get_content_type() && $rule->has_objects() ) {\n\n\t\t\t\t\t\t$post_type = $rule->get_content_type_name();\n\t\t\t\t\t\t$post_ids = array();\n\n\t\t\t\t\t\t// leave out posts that have restrictions disabled\n\t\t\t\t\t\tforeach ( $rule->get_object_ids() as $post_id ) {\n\n\t\t\t\t\t\t\tif ( 'yes' !== get_post_meta( $post_id, '_wc_memberships_force_public', true ) ) {\n\n\t\t\t\t\t\t\t\t$post_ids[] = $post_id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if there are no posts left, continue to next rule\n\t\t\t\t\t\tif ( empty( $post_ids ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( ! isset( $conditions[ $condition ][ 'posts' ][ $post_type ] ) ) {\n\t\t\t\t\t\t\t$conditions[ $condition ][ 'posts' ][ $post_type ] = array();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$conditions[ $condition ][ 'posts' ][ $post_type ] = array_unique( array_merge( $conditions[ $condition ][ 'posts' ][ $post_type ], $post_ids ) );\n\n\t\t\t\t\t} elseif ( 'post_type' === $rule->get_content_type() ) {\n\n\t\t\t\t\t\t// find post types that are either restricted or granted access to\n\t\t\t\t\t\t$conditions[ $condition ][ 'post_types' ] = array_unique( array_merge( $conditions[ $condition ][ 'post_types' ], (array) $rule->get_content_type_name() ) );\n\n\t\t\t\t\t} elseif ( 'taxonomy' === $rule->get_content_type() && $rule->has_objects() ) {\n\n\t\t\t\t\t\t// find taxonomy terms that are either restricted or granted access to\n\t\t\t\t\t\t$taxonomy = $rule->get_content_type_name();\n\n\t\t\t\t\t\tif ( ! isset( $conditions[ $condition ][ 'terms' ][ $taxonomy ] ) ) {\n\t\t\t\t\t\t\t$conditions[ $condition ][ 'terms' ][ $taxonomy ] = array();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$conditions[ $condition ][ 'terms' ][ $taxonomy ] = array_unique( array_merge( $conditions[ $condition ][ 'terms' ][ $taxonomy ], $rule->get_object_ids() ) );\n\n\t\t\t\t\t} elseif ( 'taxonomy' === $rule->get_content_type() ) {\n\n\t\t\t\t\t\t$conditions[ $condition ][ 'taxonomies' ] = array_unique( array_merge( $conditions[ $condition ][ 'taxonomies' ], (array) $rule->get_content_type_name() ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// loop over granted content and check if the user has access to delayed content\n\t\t\tforeach ( $conditions['granted'] as $content_type => $values ) {\n\n\t\t\t\tif ( empty( $values ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ( $values as $key => $value ) {\n\n\t\t\t\t\tswitch ( $content_type ) {\n\n\t\t\t\t\t\tcase 'posts':\n\n\t\t\t\t\t\t\tforeach ( $value as $post_key => $post_id ) {\n\n\t\t\t\t\t\t\t\tif ( ! current_user_can( 'wc_memberships_view_delayed_post_content', $post_id ) ) {\n\t\t\t\t\t\t\t\t\tunset( $conditions['granted'][ $content_type ][ $key ][ $post_key ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'post_types':\n\n\t\t\t\t\t\t\tif ( ! current_user_can( 'wc_memberships_view_delayed_post_type', $value ) ) {\n\t\t\t\t\t\t\t\tunset( $conditions['granted'][ $content_type ][ $key ] );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'taxonomies':\n\n\t\t\t\t\t\t\tif ( ! current_user_can( 'wc_memberships_view_delayed_taxonomy', $value ) ) {\n\t\t\t\t\t\t\t\tunset( $conditions['granted'][ $content_type ][ $key ] );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'terms':\n\n\t\t\t\t\t\t\tforeach ( $value as $term_key => $term ) {\n\n\t\t\t\t\t\t\t\tif ( ! current_user_can( 'wc_memberships_view_delayed_taxonomy_term', $key, $term ) ) {\n\t\t\t\t\t\t\t\t\tunset( $conditions['granted'][ $content_type ][ $key ][ $term_key ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// remove restricted items that should be granted for the current user\n\t\t\t// content types are high-level restriction items - posts, post_types, terms, and taxonomies\n\t\t\tforeach ( $conditions['restricted'] as $content_type => $object_types ) {\n\n\t\t\t\tif ( empty( $conditions['granted'][ $content_type ] ) || empty( $object_types ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// object types are child elements of a content type,\n\t\t\t\t// e.g. for the posts content type, object types are post_types( post and product)\n\t\t\t\t// for a term content type, object types are taxonomy names (e.g. category)\n\t\t\t\tforeach ( $object_types as $object_type_name => $object_ids ) {\n\n\t\t\t\t\tif ( empty( $conditions['granted'][ $content_type ][ $object_type_name ] ) || empty( $object_ids ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( is_array( $object_ids ) ) {\n\n\t\t\t\t\t\t// if the restricted object ID is also granted, remove it from restrictions\n\t\t\t\t\t\tforeach ( $object_ids as $object_id_index => $object_id ) {\n\n\t\t\t\t\t\t\tif ( in_array( $object_id, $conditions['granted'][ $content_type ][ $object_type_name ] ) ) {\n\t\t\t\t\t\t\t\tunset( $conditions['restricted'][ $content_type ][ $object_type_name ][ $object_id_index ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// post type handling\n\t\t\t\t\t\tif ( in_array( $object_ids, $conditions['granted'][ $content_type ] ) ) {\n\t\t\t\t\t\t\tunset( $conditions['restricted'][ $content_type ][ array_search( $object_ids, $conditions['restricted'][ $content_type ] ) ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// grant access to posts that have restrictions disabled\n\t\t\tglobal $wpdb;\n\n\t\t\t$public_posts = $wpdb->get_results( \"\n\t\t\t\tSELECT p.ID, p.post_type FROM $wpdb->posts p\n\t\t\t\tLEFT JOIN $wpdb->postmeta pm\n\t\t\t\tON p.ID = pm.post_id\n\t\t\t\tWHERE pm.meta_key = '_wc_memberships_force_public'\n\t\t\t\tAND pm.meta_value = 'yes'\n\t\t\t\" );\n\n\t\t\tif ( ! empty( $public_posts ) ) {\n\n\t\t\t\tforeach ( $public_posts as $post ) {\n\n\t\t\t\t\tif ( ! isset( $conditions['granted']['posts'][ $post->post_type ] ) ) {\n\t\t\t\t\t\t$conditions['granted']['posts'][ $post->post_type ] = array();\n\t\t\t\t\t}\n\n\t\t\t\t\t$conditions['granted']['posts'][ $post->post_type ][] = $post->ID;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// gather da results\n\t\t\t$this->user_content_access_conditions = $conditions;\n\n\t\t\t// add the filter back\n\t\t\tadd_filter( 'pre_get_posts', array( $this, 'exclude_restricted_posts' ) );\n\t\t}\n\n\t\treturn $this->user_content_access_conditions;\n\t}", "title": "" }, { "docid": "4b1328f94006cbd0abe5cd883b41b03e", "score": "0.5821909", "text": "public static function allowContentItem($postdata) {\n if ( ! isset($postdata['content_item_return_url']) ) return false;\n if ( isset($postdata['accept_media_types']) ) {\n $web_mimetype = 'text/html';\n $m = new Mimeparse;\n $web_allowed = $m->best_match(array($web_mimetype), $postdata['accept_media_types']);\n if ( $web_mimetype != $web_allowed ) return false;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c1796d1df87a822ceae999192d6d8d4e", "score": "0.5802341", "text": "function esw_author_cap_filter($allowedposttags) {\n if (!current_user_can( 'publish_posts'))\n return $allowedposttags;\n\n // Here add tags and attributes you want to allow\n $allowedposttags['iframe']=array(\n 'width' => array(),\n 'height' => array(),\n 'frameborder' => array(),\n 'src' => array(),\n );\n\n return $allowedposttags;\n}", "title": "" }, { "docid": "6c95e1e91aa2e5632008b0ed90e2076f", "score": "0.5738874", "text": "function it_exchange_membership_buddypress_addon_is_content_restricted( $restricted ) {\n\n\tif ( $restricted ) {\n\t\treturn $restricted;\n\t}\n\n\t$bb_page_ids = bp_core_get_directory_page_ids();\n\t$members = $bb_page_ids['members'] ? get_post( $bb_page_ids['members'] ) : null;\n\n\tif ( bp_is_user() ) {\n\t\t$evaluator = new IT_Exchange_Membership_Rule_Evaluator_Service(\n\t\t\tnew IT_Exchange_Membership_Rule_Factory(), new IT_Exchange_User_Membership_Repository()\n\t\t);\n\n\t\t$customer = it_exchange_get_current_customer();\n\n\t\tif ( $evaluator->evaluate_content( $members, $customer ? $customer : null ) ) {\n\t\t\t$restricted = true;\n\t\t}\n\t}\n\n\treturn $restricted;\n}", "title": "" }, { "docid": "c31fb9137047b3bed1498608a7bf163b", "score": "0.5682932", "text": "function blogpostcontentvalid( $content ) {\r\n // we should check for invalid html such as weird tags\r\n // including <html>, <body>, <title>, <script>, <frame>, <iframe>,\r\n // <style>, <object>, <embed>, etc.\r\n return true;\r\n }", "title": "" }, { "docid": "00da3de69d313a9d4d01c2b7909db940", "score": "0.56031626", "text": "public function filter(){\n\t\t \n\t\t $this->content = $filtered_content;\n\t }", "title": "" }, { "docid": "4c7d4c584a9d772309498c9e419b662c", "score": "0.5597181", "text": "function wlfw_apply_content_filters() {\n\tif( get_option(SM_SITEOP_PREFIX.'disable_all_page_titles') == 'true' && is_page()) \n\t\tadd_filter('wlfw_before_title_output', '__return_false');\n}", "title": "" }, { "docid": "252f5a36931cfe245b781b98355077c1", "score": "0.5581265", "text": "function block_non_author(){\n\t$active_on_post_types = ['post'];//array of post types you want to protect\n\t$active_on_user_roles = ['editor'];//array of user roles you want to block\n\tglobal $post;\n\t$screen = get_current_screen();\n\t$user = wp_get_current_user();\n\tif($screen->parent_base == 'edit' && in_array($screen->post_type,$active_on_post_types ) && in_array($user->roles[0],$active_on_user_roles ) && $post->post_author != $user->ID){\n\t\tdie('you are not the author of this post');//block with a massage\n\t\t// wp_redirect(home_url( '/wp-admin' ));//redirect to dashboard\n\t}\n}", "title": "" }, { "docid": "0d5bae58aa0f58923b30a7b3e221014e", "score": "0.554394", "text": "function validate_content()\r\n{\r\n if (!empty($_POST['content'])) {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "51cb8d8d84e9ce295f64acd94f7bc9e4", "score": "0.5460653", "text": "protected function contentRules(): array\n {\n return [\n 'content' => [\n 'required',\n 'string',\n 'between:10,1500',\n ],\n ];\n }", "title": "" }, { "docid": "847e8b191baa5eec5187b35023ec39f6", "score": "0.5444356", "text": "function allow_post_tags( $allowedposttags ){\n $allowedposttags['script'] = array(\n 'type' => true,\n 'src' => true,\n 'height' => true,\n 'width' => true,\n );\n\n $allowedposttags['iframe'] = array(\n 'src' => true,\n 'width' => true,\n 'height' => true,\n 'class' => true,\n 'frameborder' => true,\n 'webkitAllowFullScreen' => true,\n 'mozallowfullscreen' => true,\n 'allowFullScreen' => true\n );\n\n return $allowedposttags;\n}", "title": "" }, { "docid": "66ad48fe38540f8e651013b142d60fd0", "score": "0.5443246", "text": "Public Static function allowPost($page_owner = null, $user = null) {\n if (elgg_is_admin_logged_in() ) {\n return true;\n }\n\n if (!$user) {\n $user = elgg_get_logged_in_user_entity();\n }\n\n if (!$user) {\n return false;\n }\n\n if ($page_owner instanceof \\ElggGroup) {\n return self::allowPostOnGroups() && $page_owner->canEdit()?true:false;\n }\n else {\n return $user->news_staff?true:false;\n }\n\n return false;\n }", "title": "" }, { "docid": "2c731eaf02ce0e657ddad9615ad57e87", "score": "0.5443072", "text": "public function test_check_restrict_file_rule() {\n\t\t$test = new WD_Protect_Core_Dir();\n\t\t$htaccess_path = wp_defender()->get_plugin_path() . 'tests/hardener/sample-htaccess/wp-content/';\n\n\t\t/**\n\t\t * case 1:blank\n\t\t */\n\t\t$content = file( $htaccess_path . 'case1' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t//fix for case 1\n\t\t$this->check_wp_content( $htaccess_path . 'case1' );\n\t\t/**\n\t\t * case 2.1 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case21' );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case21' );\n\t\t/**\n\t\t * case 2.2 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case22' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) != false );\n\t\t$this->check_wp_content( $htaccess_path . 'case22' );\n\t\t/**\n\t\t * case 2.3 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case23' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case23' );\n\n\t\t/**\n\t\t * case 3 we have a mixed file, with rules\n\t\t */\n\t\t$content = file( $htaccess_path . 'case3' );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) != false );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) != false );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) != false );\n\t\t/**\n\t\t * case 4.1 we have one rule mixed\n\t\t */\n\t\t$content = file( $htaccess_path . 'case41' );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case41' );\n\t\t/**\n\t\t * case 4.2 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case42' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) != false );\n\t\t$this->check_wp_content( $htaccess_path . 'case42' );\n\t\t/**\n\t\t * case 4.3 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case43' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case43' );\n\t}", "title": "" }, { "docid": "533c0b92317e14f3619a85bdc4139764", "score": "0.54379356", "text": "Public Static function allowPostOnGroups() {\n $post_on_groups = self::getParams('post_on_groups');\n\n if ($post_on_groups === self::NEWS_YES) {\n return true;\n } \n\n return false;\n }", "title": "" }, { "docid": "8c7323b7c68ebafef2cb961f4383183e", "score": "0.5426215", "text": "public function beforeFilter()\r\n\t{\r\n\t\tparent::beforeFilter();\r\n\t\t$allow = array('get_content', 'index');\r\n\t\t$this->Auth->allow($allow);\r\n\t}", "title": "" }, { "docid": "001611de5a1dfc4f7d59304ae17dbb3c", "score": "0.5399145", "text": "function acf_allow_unfiltered_html()\n{\n}", "title": "" }, { "docid": "3a044b9594f75be2113a4443afcae6af", "score": "0.5393645", "text": "function filterLanguage($content) {\n\t\t$words = $this->getForbiddenWords();\n\t\tif($words != \"\"){\n\t\t\t$words = explode(\",\",$words);\n\t\t\tforeach($words as $word){\n\t\t\t\t$content = str_ireplace(trim($word),\"*\",$content);\n\t\t\t}\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "51295d449d7498efbab9e4fe03951406", "score": "0.539162", "text": "public function hasContent();", "title": "" }, { "docid": "7f9f050e1a2dab3cb5048be632fdb2b2", "score": "0.5368409", "text": "public function allowed();", "title": "" }, { "docid": "610af451414fcc9c3c257cf426df412a", "score": "0.5357939", "text": "function check_wp_content( $file_to_fix ) {\n\t\t$test = new WD_Protect_Core_Dir();\n\t\t$htaccess_path = wp_defender()->get_plugin_path() . 'tests/sample-htaccess/wp-content/';\n\t\tcopy( $file_to_fix, $htaccess_path . 'htaccess' );\n\n\t\t$test->protect_content( $htaccess_path . 'htaccess' );\n\t\t$content = file( $htaccess_path . 'htaccess' );\n\t\t//recheck\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) != false );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) != false );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) != false );\n\t\tunlink( $htaccess_path . 'htaccess' );\n\t}", "title": "" }, { "docid": "18f1160d89ad3e64b7a3376fdcaaa9e2", "score": "0.53549993", "text": "public function hide_restricted_content_comments( $content ) {\n\n\t\tif ( 'hide_content' !== get_option( 'wc_memberships_restriction_mode' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) {\n\t\t\tglobal $post, $wp_query;\n\n\t\t\tif ( in_array( $post->post_type, array( 'product', 'product_variation' ), true ) ) {\n\t\t\t\t// product is restricted\n\t\t\t\t$restricted = wc_memberships_is_product_viewing_restricted() && ! current_user_can( 'wc_memberships_view_restricted_product', $post->ID );\n\t\t\t} else {\n\t\t\t\t// post is restricted\n\t\t\t\t$restricted = wc_memberships_is_post_content_restricted() && ! current_user_can( 'wc_memberships_view_restricted_post_content', $post->ID );\n\t\t\t}\n\n\t\t\tif ( $restricted ) {\n\n\t\t\t\t$wp_query->comment_count = 0;\n\t\t\t\t$wp_query->current_comment = 999999;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b34915a7d6953cbdf2dc8d9a84e5e285", "score": "0.5353399", "text": "protected function addContentRules()\n {\n if(isset($this->_rules[$this->meta_type]))\n {\n $this->rules[$this->meta_type] = $rules;\n }\n }", "title": "" }, { "docid": "cc59017cbe41e91a6a0f87a24c7a3aee", "score": "0.5338276", "text": "function restrict_manage_posts() {\n $taxonomies = apply_filters('wputh_get_taxonomies', array());\n $this->taxonomies = $this->verify_taxonomies($taxonomies);\n $pt = get_post_type();\n foreach ($this->taxonomies as $tax_id => $tax) {\n if (!isset($tax['wputh__admin_filter']) || !$tax['wputh__admin_filter']) {\n continue;\n }\n if (!isset($tax['post_type']) || ($tax['post_type'] != $pt && !in_array($pt, $tax['post_type']))) {\n continue;\n }\n $tax_obj = get_taxonomy($tax_id);\n if (!$tax_obj || !is_object($tax_obj)) {\n continue;\n }\n $terms = get_terms(array(\n 'taxonomy' => $tax_id,\n 'hide_empty' => false\n ));\n if (count($terms) <= 1) {\n continue;\n }\n echo '<select name=\"' . $tax_id . '\" class=\"\">';\n echo '<option value=\"\">' . $tax_obj->labels->all_items . '</option>';\n foreach ($terms as $term) {\n echo '<option ' . (isset($_GET[$tax_id]) && $_GET[$tax_id] == $term->slug ? 'selected=\"selected\"' : '') . ' value=\"' . esc_attr($term->slug) . '\">' . esc_html($term->name) . '</option>';\n }\n echo '</select>';\n }\n }", "title": "" }, { "docid": "e5b4b69c7f8f5d03d5a3f9bb2ddf6db4", "score": "0.5305869", "text": "function content($content)\r\n\t{\r\n\t\tglobal $post;\r\n\r\n\t\t//\tCheck if we user selected the disable ads on this page\r\n\t\t$post_meta_value = get_post_meta($post->ID, 'aswp_disable_ads', TRUE);\r\n\r\n\t\tif ($post_meta_value === '1')\r\n\t\t{\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t//\tIf content is empty, do nothing\r\n\t\tif ($content == '')\r\n\t\t{\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t//\tLoad options\r\n\t\t$options = get_option('aswp_options');\r\n\r\n\t\t//\tDisable ads for everyone\r\n\t\tif (isset($options['options']['aswp_disable_ads_everyone']) == TRUE && $options['options']['aswp_disable_ads_everyone'] === '1')\r\n\t\t{\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t//\tDisable ads for admins only\r\n\t\tif (isset($options['options']['aswp_disable_ads_admin']) == TRUE && $options['options']['aswp_disable_ads_admin'] === '1' && current_user_can('manage_options') == TRUE)\r\n\t\t{\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t//\tEnable ads for admins only\r\n\t\tif (isset($options['options']['aswp_enable_ads_admin']) == TRUE && $options['options']['aswp_enable_ads_admin'] === '1' && current_user_can('manage_options') == FALSE)\r\n\t\t{\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t//\tCheck if we have publisher ID, if not, stop here\r\n\t\tif (isset($options['options']['aswp_publisher_id']) == FALSE || $options['options']['aswp_publisher_id'] === '')\r\n\t\t{\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t//\tCheck if we have manual shortcode in the content\r\n\t\tif (preg_match('/\\[aswp id\\=\\\"([0-9]+)\\\"\\]/', $content) === 1)\r\n\t\t{\r\n\t\t\t$this->manual_ad_placement = TRUE;\r\n\t\t}\r\n\r\n\t\t//\tGet all the ads from table\r\n\t\t$all_ads = $this->wpdb->get_results(\r\n\t\t\t\"\r\n\t\t\tSELECT *\r\n\t\t\tFROM `\".$this->wpdb->prefix.ASWP_DATA_TABLE.\"`\r\n\t\t\t\", ARRAY_A\r\n\t\t);\r\n\r\n\t\t//\tGet random ads\r\n\t\t$useable_ads = array();\r\n\t\t$useable_ads = $this->get_random_ads($all_ads);\r\n\r\n\t\t//\tGenerate the ads js code\r\n\t\t$ads_with_js_code = $this->create_ads_js_code($useable_ads);\r\n\r\n\t\t//\tIf FALSE is returned, do nothing\r\n\t\tif ($ads_with_js_code === FALSE)\r\n\t\t{\r\n\t\t\treturn $content;\r\n\t\t}\r\n\r\n\t\t$content_with_ads = $content;\r\n\r\n\t\tif ($this->manual_ad_placement == FALSE)\r\n\t\t{\r\n\t\t\t//\tInsert ads into proper places\r\n\t\t\t$content_with_ads = $this->ad_placement($content, $ads_with_js_code);\r\n\t\t}\r\n\r\n\t\t$content = $content_with_ads;\r\n\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "098b5ad7eeb986c6c9ab3015f633966c", "score": "0.53051305", "text": "public function beforeParse($content) {\n return $this->_censor($content);\n }", "title": "" }, { "docid": "a41690f8c23d4e7e95d6bbc1f5639d80", "score": "0.52943635", "text": "public function validate(Content $content);", "title": "" }, { "docid": "3c9d8baf201135a8fb6c3c749426361b", "score": "0.5272769", "text": "public static function allowLink($postdata) {\n return self::allowContentItem($postdata);\n }", "title": "" }, { "docid": "af25e5828b7319fb4fd55d28b671c21a", "score": "0.52657425", "text": "public function getHTMLRestrictions();", "title": "" }, { "docid": "c758323e3fb22c6407cf151579791aae", "score": "0.5258784", "text": "public function is_allowed_to_edit_content_object()\n {\n return true;\n }", "title": "" }, { "docid": "dfdf45d45e24b81b57c1fdee53c64fe6", "score": "0.52549905", "text": "protected function getContentFilter()\n {\n return null;\n }", "title": "" }, { "docid": "1dcb61772d721be69183f4ff0bb15597", "score": "0.5245784", "text": "function postContent() {\n\t\t\n\t\t\n\t\t\n\t\t\n\t }", "title": "" }, { "docid": "a8b2aeb9ad04b4f8940ce5368e708005", "score": "0.52310747", "text": "function advanced_boxex(){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\tadd_meta_box('page-post-restriction',__('Users (checked are restricted)'),array($this,'restriction'),'page','side','high');\n\t\t\tadd_meta_box('page-post-restriction',__('Users (checked are restricted)'),array($this,'restriction'),'post','side','high');\t\t\n\t\t}", "title": "" }, { "docid": "2fd19991984d8c3fc07923cbded47d85", "score": "0.5214297", "text": "private static function check_disallowed_words( $author, $email, $url, $content, $ip, $user_agent ) {\n\t\tif ( function_exists( 'wp_check_comment_disallowed_list' ) ) {\n\t\t\treturn wp_check_comment_disallowed_list( $author, $email, $url, $content, $ip, $user_agent );\n\t\t} else {\n\t\t\treturn wp_blacklist_check( $author, $email, $url, $content, $ip, $user_agent );\n\t\t}\n\t}", "title": "" }, { "docid": "d7a06731709aab2a92f63f7aa65ad8d9", "score": "0.5211795", "text": "function imic_content_filter($content) {\n $block = join(\"|\", array(\"htable\", \"thead\", \"tbody\", \"trow\", \"thcol\", \"tcol\",\"agents\",\"testimonial\",\"pricingtable\",\"headingss\",\"reason\",\"price\",\"interval\",\"row\",\"url\",\"imic_button\",\"icon\", \"paragraph\", \"divider\", \"heading\", \"alert\", \"blockquote\", \"dropcap\", \"code\", \"label\", \"container\", \"span\", \"one_full\", \"one_half\", \"one_third\", \"one_fourth\", \"one_sixth\", \"progress_bar\", \"imic_count\", \"imic_tooltip\", \"list\", \"list_item\", \"list_item_dt\", \"list_item_dd\", \"accordions\", \"accgroup\", \"acchead\", \"accbody\", \"toggles\", \"togglegroup\", \"togglehead\", \"togglebody\", \"tabs\", \"tabh\", \"tab\", \"tabc\", \"tabrow\", \"modal_box\", \"imic_form\"));\n // opening tag\n $rep = preg_replace(\"/(<p>)?\\[($block)(\\s[^\\]]+)?\\](<\\/p>|<br \\/>)?/\", \"[$2$3]\", $content);\n // closing tag\n $rep = preg_replace(\"/(<p>)?\\[\\/($block)](<\\/p>|<br \\/>)?/\", \"[/$2]\", $rep);\n return $rep;\n }", "title": "" }, { "docid": "34d2d9596cc6fe0af84a852c482b8b52", "score": "0.52089036", "text": "function WPDiggThis_ContentFilter($content)\r\n{\t\t\r\n\t// if on single post or page display the button\r\n\tif (is_single() || is_page())\r\n\t\treturn WPDiggThis_Button().$content;\t\t\r\n\telse\r\n\t\treturn $content.WPDiggThis_Link();\t\t\r\n}", "title": "" }, { "docid": "ecc0dae1a89af755f91dd7a0c64520f6", "score": "0.5169055", "text": "function restrict_author_allpost_visibility($query) {\n\n\t\t// Don't run if not on an admin screen\n if( !$query->is_admin )\n return $query;\n\n\t\t$current_screen = get_current_screen();\n\t\t// Don't run following condition if screen obj is empty - causes errors\n\t\tif (empty($current_screen)) {\n\t\t\treturn $query;\n\t\t}\n\t\t// Check to see if on one of the 'All Posts' pages\n\t\tif ($current_screen->id !== 'edit-post' &&\n\t\t\t\t$current_screen->id !== 'edit-projects' &&\n\t\t\t\t$current_screen->id !== 'edit-series' )\n\t\t\t{\n\t\t\t\treturn $query;\n\t\t\t}\n\n\t\t// Only apply to Author profiles\n if( !current_user_can( 'edit_others_posts' ) ) {\n\t\t\t$current_user = wp_get_current_user();\n\n\t\t\t$query->is_author = true;\n\t\t\t$query->set('author_name', $current_user->user_nicename);\n }\n return $query;\n}", "title": "" }, { "docid": "a635f090d0c784cc6a2a286bfeb8745e", "score": "0.5152544", "text": "function jss_wrap_content($content){\n\tif ( is_singular() && current_user_can('publish_posts')){\n\t\t$content = '<div id=\"laika-editor\">' . $content . '</div>';\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "1009c45dd359930a93edab7be0d5330b", "score": "0.51409984", "text": "public function seamlessContentFields()\n {\n ?>\n <script type=\"text/javascript\">\n (function($) {\n \n $(document).ready(function() {\n if ($('#postdivrich').length && $('#seamless').length) {\n $('#postdivrich').appendTo($('#seamless .acf-input'))\n }\n });\n \n })(jQuery); \n </script>\n <style type=\"text/css\">\n .acf-field #wp-content-editor-tools {\n background: transparent;\n padding-top: 0;\n }\n </style>\n <?php \n }", "title": "" }, { "docid": "274d8144bb4f2c905753faddbdc608b7", "score": "0.5135884", "text": "function allow_save_post($post)\n {\n }", "title": "" }, { "docid": "17576496a07e4d4457b186f5cb2e880e", "score": "0.5133609", "text": "public function contentWithinLimits($content)\n {\n $limit = $this->options['size_limit'] ?? 64;\n\n return mb_strlen($content) / 1000 <= $limit;\n }", "title": "" }, { "docid": "4a55beb765a1813bb4df7369092d2d03", "score": "0.5128565", "text": "function wpfme_writing_encouragement( $content ) {\n global $post_type;\n if($post_type == \"post\"){\n $encArray = array(\n // Placeholders for the posts editor\n \"Test post message one.\",\n \"Test post message two.\",\n \"<h1>Test post heading!</h1>\"\n );\n return $encArray[array_rand($encArray)];\n }\n else{ $encArray = array(\n // Placeholders for the pages editor\n \"Test page message one.\",\n \"Test page message two.\",\n \"<h1>Test Page Heading</h1>\"\n );\n return $encArray[array_rand($encArray)];\n }\n}", "title": "" }, { "docid": "27a0f92de123f756ad909bb98c0b3eff", "score": "0.51166445", "text": "protected function contentGetPageListRestrictions($filter, &$restrictions, &$join)\n {\n $dbtables = DBUtil::getTables();\n $pageTable = $dbtables['content_page'];\n $pageColumn = $dbtables['content_page_column'];\n $pageCategoryTable = $dbtables['content_pagecategory'];\n $pageCategoryColumn = $dbtables['content_pagecategory_column'];\n\n if (!empty($filter['category'])) {\n $c = (int) $filter['category'];\n $restrictions[] = \"($pageCategoryColumn[categoryId] = $c OR $pageColumn[categoryId] = $c)\";\n $join .= \"LEFT JOIN $pageCategoryTable ON $pageCategoryColumn[pageId] = $pageColumn[id]\\n\";\n }\n\n if (!empty($filter['pageId'])) {\n $restrictions[] = \"$pageColumn[id] = \" . (int) $filter['pageId'];\n }\n\n if (!empty($filter['urlname'])) {\n $restrictions[] = \"$pageColumn[urlname] = '\" . DataUtil::formatForStore($filter['urlname']) . \"'\";\n }\n\n // if not specified always filter\n if (!array_key_exists('checkActive', $filter) || (!empty($filter['checkActive']) && $filter['checkActive'])) {\n $restrictions[] = \"$pageColumn[active] = 1 AND ($pageColumn[activeFrom] <= NOW() OR $pageColumn[activeFrom] IS NULL) AND ($pageColumn[activeTo] > NOW() OR $pageColumn[activeTo] IS NULL)\";\n }\n\n // only filter explicitely, active check is done above\n if (array_key_exists('checkInMenu', $filter) && $filter['checkInMenu']) {\n $restrictions[] = \"$pageColumn[inMenu] = 1\";\n }\n\n if (!empty($filter['superParentId'])) {\n // get the setLeft/Right of the selected parent for filtering\n $pageData = DBUtil::selectObjectByID('content_page', $filter['superParentId'], 'id', array('setLeft', 'setRight'));\n if ($pageData) {\n $where = \" $pageColumn[setLeft] >= $pageData[setLeft] AND $pageColumn[setRight] <= $pageData[setRight]\";\n $restrictions[] = $where;\n }\n }\n\n if (!empty($filter['parentId'])) {\n $restrictions[] = \" $pageColumn[parentPageId]= \" . (int) $filter['parentId'];\n }\n\n if (isset($filter['expandedPageIds']) && is_array($filter['expandedPageIds'])) {\n $pageIdStr = '-1';\n foreach (array_keys($filter['expandedPageIds']) as $pageId) {\n $pageIdStr .= ',' . (int) $pageId;\n }\n\n // Only select pages that do not have a collapsed (not expanded) page above it\n $restriction = \"\nNOT EXISTS (SELECT 1 FROM $pageTable parentPage\n WHERE parentPage.$pageColumn[setLeft] < $pageTable.$pageColumn[setLeft]\n AND $pageTable.$pageColumn[setRight] < parentPage.$pageColumn[setRight]\n AND parentPage.$pageColumn[id] NOT IN ($pageIdStr))\";\n\n // MySQL 4.x users should remove the line below\n $restrictions[] = $restriction;\n }\n\n if (!empty($filter['where'])) {\n $restrictions[] = $filter['where'];\n }\n }", "title": "" }, { "docid": "496ffb87c4b905e470d7a0f88f03142c", "score": "0.51127607", "text": "function rcCheckFeed()\n{\n\tadd_filter('the_content', 'rcIsFeed');\n}", "title": "" }, { "docid": "6f696f0cea03cd78ef792156a95438d9", "score": "0.5107899", "text": "private function own($context, $content_id)\n {\n $content_id = trim($content_id);\n if (!$content_id) {\n\n return false;\n }\n $content_bean = R::load(Database::PUBLICATION, $content_id);\n if (!$content_bean->id)\n {\nDebug::show('warning. content id '.$content_id.' is not found.');\n return false;\n }\n if ($context->user()->login !== $content_bean[Database::PUBLICATION_POSTBY])\n {\nDebug::show('warning. '. $context->user()->login. ' does not own content ' .$content_id);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "64c803c0fbc65a0793b20a37540614f6", "score": "0.51032156", "text": "public function filter_the_content ( $content = '' )\n {\n $post = get_wp_post();\n\n // Return the rendered layout content if BlockPress is enabled\n if ( $this->is_enabled( $post ) )\n {\n // If post password required and it doesn't match the cookie.\n if ( post_password_required( $post ) )\n {\n return get_the_password_form( $post );\n }\n\n $content = $this->render_layout( $post );\n\n // What is this strange line that they have in `the_content` ?\n $content = str_replace( ']]>', ']]&gt;', $content );\n\n return $content;\n }\n // Otherwise just return the regular content\n else\n {\n return $content;\n }\n }", "title": "" }, { "docid": "82a6d3062b03a309036630af4e75450c", "score": "0.5102592", "text": "function canAdd()\r\n\t{\r\n\t\t$user\t=& JFactory::getUser();\r\n\r\n\t\tif (FLEXI_ACCESS && ($user->gid < 25))\r\n\t\t{\r\n\t\t\tif \t((!FAccess::checkComponentAccess('com_content', 'submit', 'users', $user->gmid)) && (!FAccess::checkAllContentAccess('com_content','add','users',$user->gmid,'content','all'))) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "4b869f6398128b534fc02bf0bf98ae5e", "score": "0.5100055", "text": "public function allow_contributor_uploads()\r\n\t{\r\n\t\t$w = 0;\r\n\t\t$e = 0;\r\n\t\t\r\n\t\t$edit_p = current_user_can( 'edit_published_posts' );\r\n\t\t$delete_p = current_user_can( 'delete_published_posts');\r\n\t\t\r\n\t\tif ( !current_user_can('upload_files') ) $w = 1; \r\n\t\tif( ( !$edit_p || !$delete_p ) && !$this->settings['block_edits'] ) $e = 1;\r\n\t\telse if( ( $edit_p || $delete_p ) && $this->settings['block_edits'] ) $e = 1;\r\n\t\t\r\n\t\tif( $w || $e ) $contributor = get_role('contributor');\r\n\t\tif( $w )$contributor->add_cap('upload_files');\r\n\t\t\r\n\t\tif( !$this->settings['block_edits'] && $e ) {\r\n\t\t\t$contributor->add_cap( 'edit_published_posts' );\r\n\t\t\t$contributor->add_cap( 'delete_published_posts' );\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->settings['block_edits'] && $e ) {\r\n\t\t\t$contributor->remove_cap( 'edit_published_posts' );\r\n\t\t\t$contributor->remove_cap( 'delete_published_posts' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "aea67a7a2bbe16537301b6b49cbba81b", "score": "0.50962514", "text": "public function pre_filter_rest_content( $response, $post, $request ) {\n\t\t$context = $request->get_param( 'context' );\n\t\tif ( 'edit' === $context ) {\n\t\t\t$data = $response->get_data();\n\t\t\t$content = wp_unslash( $data['content']['raw'] );\n\t\t\t$data['content']['raw'] = $this->filter_out_local( $content );\n\n\t\t\t$response->set_data( $data );\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "acf6360916053afd97a95345aa5fa20f", "score": "0.50882375", "text": "public function filter_post_content_out( $content )\n\t{\n\t\t$content = str_ireplace( array('<!-- jambo -->', '<!-- contactform -->'), $this->get_jambo_form()->get(), $content );\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "a9ece0f9015d87267d288ab398e4325d", "score": "0.508734", "text": "protected function process(&$content)\n {\n // validate given account number\n if (preg_match('#^\\b(UA|MO)-\\d{4,10}-\\d{1,4}\\b$#i', $this->conf['account'])) {\n $accountCheckPassed = 1;\n } else {\n $accountCheckPassed = 0;\n }\n $this->content = $content;\n $con = $content;\n $session = $GLOBALS['TSFE']->fe_user->fetchUserSession();\n if (!($this->pageRenderer instanceof PageRenderer)) {\n $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);\n }\n if ($session) {\n $GLOBALS['TSFE']->fe_user->setKey('ses', 'privacyPopup', 1);\n if ($GLOBALS['TSFE']->loginUser) {\n $this->tracking = $GLOBALS ['TSFE']->fe_user->getKey('user', 'tracking');\n } else {\n $this->tracking = $GLOBALS ['TSFE']->fe_user->getKey('ses', 'tracking');\n }\n // $this->pageRenderer->addJsInlineCode(\"privacyPopup\",'var privacyPopup_open = \"' .$this->tracking.'\"');\n $this->pageRenderer->addJsInlineCode('privacyPopup', 'var privacyPopup_open = \"' . $GLOBALS['TSFE']->fe_user->getKey('ses', 'privacyPopup') . '\"');\n\n if ($this->tracking === null) {\n /*\n * Init choise\n */\n $GLOBALS ['TSFE']->fe_user->setKey('ses', 'tracking', 1);\n $GLOBALS['TSFE']->fe_user->storeSessionData();\n } elseif ($this->tracking != 1) {\n\n /*\n * Disable tracking\n */\n $accountCheckPassed = 0;\n }\n } else {\n $this->pageRenderer->addJsInlineCode('privacyPopup', 'var privacyPopup_open = privacyPopup_open || \"0\"');\n\n session_start();\n $GLOBALS ['TSFE']->fe_user->setKey('ses', 'tracking', 1);\n $GLOBALS['TSFE']->fe_user->storeSessionData();\n }\n\n if ($accountCheckPassed) {\n switch ($this->conf['type']) {\n case 'mobile':\n $this->insertMobileGaCode($con);\n break;\n case 'sync':\n $content = $this->insertSyncGaCode($con);\n break;\n case 'universal':\n if ($this->conf['UAdualtag'] == 1) {\n /**\n * The analytics.js snippet is part of Universal Analytics,\n * which is currently in public beta. New users should use analytics.js.\n * Existing ga.js users should create a new web property for analytics.js\n * and dual tag their site. It is perfectly safe to include both ga.js and\n * analytics.js snippets on the same page.\n */\n $con2 = $this->insertUniversalGaCode($con);\n $content = $this->insertAsyncGaCode($con2);\n } else {\n $content = $this->insertUniversalGaCode($con);\n }\n break;\n case 'async':\n default:\n // Async is default\n $content = $this->insertAsyncGaCode($con);\n }\n } elseif ($this->tracking != 0) {\n $errorMessage = '<!--';\n $errorMessage .= ' Ooops: Syntaxcheck of Google Analytics Account Number failed!';\n $errorMessage .= ' Maybe misspelled entry in config.tx_tp3mods.account.';\n $errorMessage .= ' You used ' . htmlspecialchars($this->conf['account']);\n $errorMessage .= ' Please use the following format UA-xxxx-y ,';\n $errorMessage .= ' or for mobile tracking, use MO-xxxx-y.';\n $errorMessage .= '-->';\n $this->content = $this->insertTrackerCode($con, $errorMessage, 'headEnd');\n }\n return $this->content;\n }", "title": "" }, { "docid": "0ac30503f17b38b673430f6ffafd44e4", "score": "0.5086318", "text": "public function my_allow()\n\t\t{\n\t\t}", "title": "" }, { "docid": "3d1a7e1e5df98f6cd313bcc85868c91a", "score": "0.5085716", "text": "public static function wcap_custom_restrict_callback() {\n\t\t}", "title": "" }, { "docid": "39e09b4d0a82a4f5f62488bfe0d801f6", "score": "0.5075437", "text": "function filter_ads($content) \r\n\t{\r\n\t\tglobal $MyAdsense_settings;\r\n\r\n\t\tif (is_array($MyAdsense_settings['ads']))\r\n\t\t{\r\n\t\t\t$content=str_replace(\"<!--MyAdsense-->\",MyAdsense::get_ad_inline(),$content);\r\n\t\t\tforeach ( $MyAdsense_settings['ads'] as $ad_name => $ad )\r\n\t\t\t{\t\r\n \t\t\t$content = str_replace(\"<!--MyAdsense#\" . $ad_name . \"-->\", MyAdsense::get_ad_inline( $ad_name ), $content);\r\n \t\t\t}\r\n\t\t}\r\n \t\treturn $content;\r\n\t}", "title": "" }, { "docid": "85b439086f1e5f3db7c9ef96fcc046a1", "score": "0.50731236", "text": "function rmCheckContent($content) {\n if (isset($content[5120])) return array(false, __('Content not allow longer than 5120 byte', 'replymail'));\n $content = wp_filter_kses($content);\n return $content;\n}", "title": "" }, { "docid": "3c331003a4dfacdcd9a7a153c232058d", "score": "0.50701493", "text": "public function enableContentBulider(){\n\t\t\tglobal $kc;\n\t\t \n\t\t $kc->add_content_type( 'opal_service' );\t\n\t\t $kc->add_content_type( 'team' );\t\t\t\n\t\t}", "title": "" }, { "docid": "ee7cc3df07379ce8b7d7b2dce365ee57", "score": "0.5062558", "text": "function content($args, &$request) {\n\t\t$this->setupTemplate();\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$press =& $request->getPress();\n\t\t$templateMgr->assign('announcementsEnabled', $press->getSetting('enableAnnouncements')?true:false);\n\t\t$templateMgr->display('management/content/content.tpl');\n\t}", "title": "" }, { "docid": "6effb867e1561b5056dcd0b5514dd761", "score": "0.5054384", "text": "function vm_restrict_admin_pages()\n{\n $current_screen_id = get_current_screen()->id;\n\n // determine which screens are off limits\n $restricted_screens = array(\n 'tools',\n 'edit-comments',\n );\n\n // Restrict page access\n foreach ($restricted_screens as $restricted_screen) {\n\n // compare current screen id against each restricted screen\n if ($current_screen_id === $restricted_screen) {\n wp_die('Nemáte povolení přistupovat na tuto stránku.');\n }\n }\n}", "title": "" }, { "docid": "3a9d28955a671d706d284ab5cb781035", "score": "0.50520843", "text": "function getPageContent($uid) {\r\n\t\t// get content elements for this page\r\n\t\t$fields = '*';\r\n\t\t$table = 'tt_content';\r\n\t\t$where = 'pid = ' . intval($uid);\r\n\t\t$where .= ' AND (' . $this->whereClauseForCType. ')';\r\n\r\n\t\t// don't index elements which are hidden or deleted, but do index\r\n\t\t// those with time restrictons, the time restrictens will be \r\n\t\t// copied to the index\r\n\t\t//$where .= t3lib_BEfunc::BEenableFields($table);\r\n\t\t$where .= ' AND hidden=0';\r\n\r\n\t\tif (TYPO3_VERSION_INTEGER >= 7000000) {\r\n\t\t\t$where .= TYPO3\\CMS\\Backend\\Utility\\BackendUtility::deleteClause($table);\r\n\t\t} else {\r\n\t\t\t$where .= t3lib_BEfunc::deleteClause($table);\r\n\t\t}\r\n\r\n\t\t// get tags from page\r\n\t\t$tags = $this->pageRecords[$uid]['tags'];\r\n\r\n\t\t// Get access restrictions for this page\r\n\t\t$pageAccessRestrictions = $this->getInheritedAccessRestrictions($uid);\r\n\r\n\t\t$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($fields, $table, $where);\r\n\t\tif(count($rows)) {\r\n\t\t\tforeach($rows as $row) {\r\n\r\n\t\t\t\t// skip this content element if the page itself is hidden or a\r\n\t\t\t\t// parent page with \"extendToSubpages\" set is hidden\r\n\t\t\t\tif ($pageAccessRestrictions['hidden']) continue;\r\n\t\t\t\tif ($row['sys_language_uid'] > 0 && $this->cachedPageRecords[$row['sys_language_uid']][$row['pid']]['hidden']) continue;\r\n\r\n\t\t\t\t// combine group access restrictons from page(s) and content element\r\n\t\t\t\t$feGroups = $this->getCombinedFeGroupsForContentElement($pageAccessRestrictions['fe_group'], $row['fe_group']);\r\n\r\n\t\t\t\t// skip this content element if either the page or the content\r\n\t\t\t\t// element is set to \"hide at login\"\r\n\t\t\t\t// and the other one has a frontend group attached to it\r\n\t\t\t\tif ($feGroups == DONOTINDEX) continue;\r\n\r\n\t\t\t\t// get content for this content element\r\n\t\t\t\t$content = '';\r\n\r\n\t\t\t\t// index header\r\n\t\t\t\t// add header only if not set to \"hidden\"\r\n\t\t\t\tif ($row['header_layout'] != 100) {\r\n\t\t\t\t\t$content .= strip_tags($row['header']) . \"\\n\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// index content of this content element and find attached or linked files.\r\n\t\t\t\t// Attached files are saved as file references, the RTE links directly to\r\n\t\t\t\t// a file, thus we get file objects.\r\n\t\t\t\tif (in_array($row['CType'], $this->fileCTypes)) {\r\n\t\t\t\t\t$fileObjects = $this->findAttachedFiles($row);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$fileObjects = $this->findLinkedFilesInRte($row);\r\n\t\t\t\t\t$content .= $this->getContentFromContentElement($row) . \"\\n\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// index the files fond\r\n\t\t\t\t$this->indexFiles($fileObjects, $row, $pageAccessRestrictions['fe_group]'], $tags) . \"\\n\";\r\n\r\n\t\t\t\t// Combine starttime and endtime from page, page language overlay\r\n\t\t\t\t// and content element.\r\n\t\t\t\t// TODO:\r\n\t\t\t\t// If current content element is a localized content\r\n\t\t\t\t// element, fetch startdate and enddate from original conent\r\n\t\t\t\t// element as the localized content element cannot have it's\r\n\t\t\t\t// own start- end enddate\r\n\t\t\t\t$starttime = $pageAccessRestrictions['starttime'];\r\n\r\n\t\t\t\tif ($this->cachedPageRecords[$row['sys_language_uid']][$row['pid']]['starttime'] > $starttime) {\r\n\t\t\t\t\t$starttime = $this->cachedPageRecords[$row['sys_language_uid']][$row['pid']]['starttime'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($row['starttime'] > $starttime) {\r\n\t\t\t\t\t$starttime = $row['starttime'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$endtime = $pageAccessRestrictions['endtime'];\r\n\r\n\t\t\t\tif ($endtime == 0 || ($this->cachedPageRecords[$row['sys_language_uid']][$row['pid']]['endtime'] && $this->cachedPageRecords[$row['sys_language_uid']][$row['pid']]['endtime'] < $endtime)) {\r\n\t\t\t\t\t$endtime = $this->cachedPageRecords[$row['sys_language_uid']][$row['pid']]['endtime'];\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tif ($endtime == 0 || ($row['endtime'] && $row['endtime'] < $endtime)) {\r\n\t\t\t\t\t$endtime = $row['endtime'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// prepare additionalFields (to be added via hook)\r\n\t\t\t\t$additionalFields = array();\r\n\r\n\t\t\t\t// make it possible to modify the indexerConfig via hook\r\n\t\t\t\t$indexerConfig = $this->indexerConfig;\r\n\r\n\t\t\t\t// hook for custom modifications of the indexed data, e. g. the tags\r\n\t\t\t\tif(is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentIndexEntry'])) {\r\n\t\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentIndexEntry'] as $_classRef) {\r\n\t\t\t\t\t\tif (TYPO3_VERSION_INTEGER >= 7000000) {\r\n\t\t\t\t\t\t\t$_procObj = & TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getUserObj($_classRef);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$_procObj->modifyContentIndexEntry(\r\n\t\t\t\t\t\t\t$row['header'],\r\n\t\t\t\t\t\t\t$row,\r\n\t\t\t\t\t\t\t$tags,\r\n\t\t\t\t\t\t\t$row['uid'],\r\n\t\t\t\t\t\t\t$additionalFields,\r\n\t\t\t\t\t\t\t$indexerConfig\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// compile title from page title and content element title\r\n\t\t\t\t// TODO: make changeable via hook\r\n\t\t\t\t$title = $this->cachedPageRecords[$row['sys_language_uid']][$row['pid']]['title'];\r\n\t\t\t\tif ($row['header'] && $row['header_layout'] != 100) {\r\n\t\t\t\t\t$title = $title . ' - ' . $row['header'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// save record to index\r\n\t\t\t\t$this->pObj->storeInIndex(\r\n\t\t\t\t\t$indexerConfig['storagepid'], \t // storage PID\r\n\t\t\t\t\t$title, \t// page title inkl. tt_content-title\r\n\t\t\t\t\t'content', \t // content type\r\n\t\t\t\t\t$row['pid'] . '#c' . $row['uid'], \t// target PID: where is the single view?\r\n\t\t\t\t\t$content, \t// indexed content, includes the title (linebreak after title)\r\n\t\t\t\t\t$tags, \t// tags\r\n\t\t\t\t\t'', \t// typolink params for singleview\r\n\t\t\t\t\t'', \t// abstract\r\n\t\t\t\t\t$row['sys_language_uid'], \t// language uid\r\n\t\t\t\t\t$starttime, \t // starttime\r\n\t\t\t\t\t$endtime, \t // endtime\r\n\t\t\t\t\t$feGroups, \t// fe_group\r\n\t\t\t\t\tfalse, \t// debug only?\r\n\t\t\t\t\t$additionalFields \t// additional fields added by hooks\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// count elements written to the index\r\n\t\t\t\t$this->counter++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "f8022859573408aa443a30374226d1f2", "score": "0.50518167", "text": "function ea_disable_gutenberg( $can_edit, $post_type ) {\n\n if( ! ( is_admin() && !empty( $_GET['post'] ) ) )\n return $can_edit;\n\n if( ea_disable_editor( $_GET['post'] ) )\n $can_edit = false;\n\n return $can_edit;\n\n }", "title": "" }, { "docid": "c22c2ae9060ca9b16d0241cd55e94b04", "score": "0.50500566", "text": "function comments_allowed(){\r\n\t\tglobal $bdb;\r\n\t\t$result = $bdb->get_result(\"SELECT allow_comments FROM \".PREFIX.\"_content WHERE id = '\".$this->page_id.\"'\");\r\n\t\treturn ($result->allow_comments == 1) ? true : false; \r\n\t}", "title": "" }, { "docid": "f5134c553bbc5ea6042699481b740035", "score": "0.5043602", "text": "function pkalrp_filter_content_autolink( $content ) {\n\t$options = get_option( 'alrp_al_options' );\n\t$gen_options = get_option( 'alrp_gs_options' );\n\t//Edited the function to only work on everything except pages\n\tif ( ( $options['enable'] )&&( $options['tag']||$options['keyword'] ) && !is_page() ) {\n\n\t\tglobal $post;\n\t\t$cache_key = 'alrp_al_keys_'.$post->ID;\n\t\t$all_keys = pkalrp_get_cached_results( $cache_key );\n\t\tif ( !empty( $all_keys ) ) {\n\t\t\techo '<!-- ALRP: Autolinks served from the cache -->';\n\t\t\t$content_tmp = str_replace(array('<p>','</p>'),array('#pstarttag#','#pendtag#'), $content);\n\t\t\t$content_tmp = preg_replace_callback( '/\\<pre(.+?)\\/pre\\>/is', 'pkalrp_base64encode_pre', $content_tmp );\n\t\t\t$content_tmp = preg_replace_callback( '/\\<code(.+?)\\/code\\>/is', 'pkalrp_base64encode_code', $content_tmp );\n\t\t\tforeach ( $all_keys as $key ) {\n\t\t\t\t$regexp = '/(?!(?:[^<\\[]+[>\\]]|[^>\\]]+<\\/[a-z][1-9]>|[^>\\]]+<\\/[a-z]>))\\b('.preg_quote($key['keyword'],'/').')\\b/imsU';\n\t\t\t\tif ( $gen_options['enabletip'] ){\n\t\t\t\t\t$replacement = \"<a class=\\\"alrptip\\\" href=\\\"\".$key['permalink'].\"\\\">\\$0#alrp#\".base64_encode( $key['title'] ).\"#/alrp#</a>\";\n\t\t\t\t} else {\n\t\t\t\t\t$replacement = \"<a class=\\\"alrptip\\\" href=\\\"\".$key['permalink'].\"\\\">\\$0</a>\";\n\t\t\t\t}\n\t\t\t\t$content_tmp = preg_replace( $regexp, $replacement, $content_tmp, $options['rglimit'] );\n\t\t\t}\n\t\t\tif ( !empty( $content_tmp ) ) {\n\t\t\t\t$content_tmp = str_replace(array('#pstarttag#','#pendtag#'),array('<p>','</p>'), $content_tmp);\n\t\t\t\tif ( $gen_options['enabletip'] ) $content_tmp = preg_replace_callback( '/\\#alrp\\#(.+?)\\#\\/alrp\\#/is', 'pkalrp_base64decode', $content_tmp );\n\t\t\t\t$content_tmp = preg_replace_callback( '/\\#pre\\#(.+?)\\#\\/pre\\#/is', 'pkalrp_base64decode_pre', $content_tmp );\n\t\t\t\t$content_tmp = preg_replace_callback( '/\\#code\\#(.+?)\\#\\/code\\#/is', 'pkalrp_base64decode_code', $content_tmp );\n\t\t\t\t$content = &$content_tmp;\n\t\t\t}\n\t\t} else {\n\t\t\techo '<!-- ALRP: Autolinks NOT served from the cache -->';\n\t\t\t$searches = pkalrp_get_related_posts_autolinks( $post, $options, $content );\n\n\t\t\tif ( !empty( $searches ) ) {\n\t\t\t\t/**\n\t\t\t\t * collecting all the keywords used by all the related posts ( unique keyword only )\n\t\t\t\t **/\n\t\t\t\t$a_all_keywords_with_args = array(); $a_keywords_with_args = array();\n\t\t\t\tforeach ( $searches as $search ) {\n\n\t\t\t\t\t$permalink = get_permalink( $search->ID );\n\t\t\t\t\t$link_title = str_replace( '#title', $search->post_title, $options['title'] );\n\n\t\t\t\t\t$meta_keywords = ''; $tags = '';\n\n\t\t\t\t\tif ( $options['keyword'] ) {\n\t\t\t\t\t\t$meta_keywords = get_post_meta( $search->ID, 'keywords', true );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $options['tag'] ) {\n\t\t\t\t\t\t$terms = wp_get_post_tags( $search->ID, array( 'orderby' => 'name', 'order' => 'ASC', 'fields' => 'names' ) );\n\t\t\t\t\t\tif ( !empty( $terms ) ) $tags = trim( implode( ',', $terms ),', ' );\n\t\t\t\t\t}\n\n\t\t\t\t\t$keywords = trim(str_replace(array(', ',' ,',',,'),',',$meta_keywords.','.$tags),', ');\n\t\t\t\t\tif ( !empty( $keywords ) )\n\t\t\t\t\t\t$a_keywords_with_args = array_fill_keys(explode( ',', $keywords ), $link_title.'#alrp#'.$permalink);\n\n\t\t\t\t\tif ( is_array($a_keywords_with_args) )\t\n\t\t\t\t\t\t$a_all_keywords_with_args = array_merge($a_all_keywords_with_args, $a_keywords_with_args);\n\n\t\t\t\t}\n\n\t\t\t\tif ( !empty( $a_all_keywords_with_args ) ) {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * foreach keyword, if found in post content, turn it into internal link\n\t\t\t\t\t **/\n\t\t\t\t\t$a_final_data= array();\n\t\t\t\t\t$content_tmp = str_replace(array('<p>','</p>'),array('#pstarttag#','#pendtag#'), $content);\n\t\t\t\t\t$content_tmp = preg_replace_callback( '/\\<pre(.+?)\\/pre\\>/is', 'pkalrp_base64encode_pre', $content_tmp );\n\t\t\t\t\t$content_tmp = preg_replace_callback( '/\\<code(.+?)\\/code\\>/is', 'pkalrp_base64encode_code', $content_tmp );\n\n\t\t\t\t\tforeach ( $a_all_keywords_with_args as $key => $val ) {\n\t\t\t\t\t\t$args = explode('#alrp#', $val);\n\n\t\t\t\t\t\t$regexp = '/(?!(?:[^<\\[]+[>\\]]|[^>\\]]+<\\/[a-z][1-9]>|[^>\\]]+<\\/[a-z]>))\\b('.preg_quote($key,'/').')\\b/imsU';\n\t\t\t\t\t\tif ($gen_options['enabletip']){\n\t\t\t\t\t\t\t$replacement = '<a class=\"alrptip\" href=\"'.$args[1].'\">$0#alrp#'.base64_encode( $args[0] ).'#/alrp#</a>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$replacement = '<a class=\"alrptip\" href=\"'.$args[1].'\">$0</a>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$content_tmp = preg_replace( $regexp, $replacement, $content_tmp, $options['rglimit'], $count );\n\n\t\t\t\t\t\tif ( 0 < $count ) $a_final_data[] = array( 'keyword' => $key, 'permalink' => $args[1], 'title' => $args[0] );\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpkalrp_set_cached_results( $cache_key, $a_final_data );\n\n\t\t\t\t\tif ( !empty( $content_tmp ) ) {\n\t\t\t\t\t\t$content_tmp = str_replace(array('#pstarttag#','#pendtag#'),array('<p>','</p>'), $content_tmp);\n\t\t\t\t\t\tif ( $gen_options['enabletip'] ) $content_tmp = preg_replace_callback( '/\\#alrp\\#(.+?)\\#\\/alrp\\#/is', 'pkalrp_base64decode', $content_tmp );\n\t\t\t\t\t\t$content_tmp = preg_replace_callback( '/\\#pre\\#(.+?)\\#\\/pre\\#/is', 'pkalrp_base64decode_pre', $content_tmp );\n\t\t\t\t\t\t$content_tmp = preg_replace_callback( '/\\#code\\#(.+?)\\#\\/code\\#/is', 'pkalrp_base64decode_code', $content_tmp );\n\t\t\t\t\t\t$content = &$content_tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "bdb381b94ce2c7ec5e85df3aced07062", "score": "0.50394416", "text": "public function filter_post_content( $content, $post )\n\t{\n\t\t// If we're on the publish page, replacement will be destructive.\n\t\t// We don't want that, so return here.\n\t\t$handler = Controller::get_handler();\n\t\tif ( isset( $handler->action ) && $handler->action == 'admin' && isset($handler->handler_vars['page']) && $handler->handler_vars['page'] == 'publish' ) {\n\t\t\treturn $content;\n\t\t}\n\n\t\t// If there are no spoilers, save the trouble and just return it as is.\n\t\tif ( strpos( $content, '<spoiler' ) === false ) {\n\t\t\treturn $content;\n\t\t}\n\n\t\t$this->current_id = $post->id;\n\n\t\t$this->post = $post;\n\t\t$return = preg_replace_callback( '/(<spoiler(\\s+message=[\\'\"](.*)[\\'\"])?>)(.*)(<\\/spoiler>)/Us', array($this, 'add_spoiler'), $content );\n\n\t\tif ( !$this->has_spoilers ) {\n\t\t\treturn $content;\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "1b827eb0a26a9f19d5c3667d0fc8dddd", "score": "0.5037896", "text": "function cn_include_content($pid)\n{\n $thepageinquestion = get_post($pid);\n $content = $thepageinquestion->post_content;\n $content = apply_filters('the_content', $content);\n echo $content;\n}", "title": "" }, { "docid": "b996ef78c838d103f9b15ebbc57c8cf4", "score": "0.5033927", "text": "protected function validateContent()\n\t{\n\t\t$type = $this->post['type'];\n\t\t$content = $this->post['content'];\n\t\t// https://www.oreilly.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n\t\t// https://www.regular-expressions.info/ip.html\n\t\t$regexpIPv4 = '/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/';\n\t\t// https://ihateregex.io/expr/ipv6/\n\t\t$regexpIPv6 = '/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/';\n\t\t// https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html\n\t\t$regexpDomain = '/^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+[a-z]{2,}$/';\n\n\t\tif( in_array($type, ['A']) )\n\t\t{\n\t\t\tif( !preg_match($regexpIPv4, $content) ) $this->errors['content'] = \"Content $content nieje validný pre typ $type záznamu.\";\n\t\t}\n\t\telseif ( in_array($type, ['AAAA']) )\n\t\t{\n\t\t\tif( !preg_match($regexpIPv6, $content) ) $this->errors['content'] = \"Content $content nieje validný pre typ $type záznamu.\";\n\t\t}\n\t\telseif ( in_array($type, ['MX', 'ANAME', 'CNAME', 'NS', 'SRV']) )\n\t\t{\n\t\t\tif( !preg_match($regexpDomain, $content) ) $this->errors['content'] = \"Content $content nieje validný pre typ $type záznamu.\";\n\t\t}\n\t\telseif ( in_array($type, ['TXT']) )\n\t\t{\n\t\t\tif( empty($content) ) $this->errors['content'] = \"Content $content nieje validný pre typ $type záznamu.\";\n\t\t}\n\t}", "title": "" }, { "docid": "2a6f0e8b9ad2f985501ce853c20fe14c", "score": "0.50258994", "text": "function check_permissions() {\n\t// if page is accessible to logged in users only\n\tif (get_field('access') == 'loggedin') {\n\t\t// if the user is not logged in, send them to the login page\n\t\tif (!is_user_logged_in()) {\n\t\t\t$redirect_url = urlencode( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\t\t$redirect = 'Location: ' . get_bloginfo('url') . '/login?redirect=' . $redirect_url;\n\t\t\theader($redirect);\n\t\t\texit;\n\t\t} else {\n\t\t\tif (is_front_page()) {\n\t\t\t\t$redirect = 'Location: ' . get_field('logged_in_user_redirect');\n\t\t\t\theader($redirect);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (is_front_page() && is_user_logged_in()) {\n\t\t\t$redirect = 'Location: ' . get_field('logged_in_user_redirect');\n\t\t\theader($redirect);\n\t\t\texit;\n\t\t}\n\t}\n\n\tglobal $allowedPosts;\n\tglobal $allowedPostsStrings;\n\tglobal $post;\n\n\t$allowedPosts = array();\n\n\t$args = array(\n\t\t'post_type' => array( 'post', 'page', ),\n\t\t'post_status' => array( 'publish' ),\n\t\t'posts_per_page' => '-1',\n\t\t'meta_query' => array(\n\t\t\t'relation' => 'OR',\n\t\t\tarray(\n\t\t\t\t'key' => 'access',\n\t\t\t\t'value' => 'everyone',\n\t\t\t\t'compare' => '=',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'relation' => 'AND',\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'access',\n\t\t\t\t\t'value' => 'loggedin',\n\t\t\t\t\t'compare' => '=',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'logged_in_roles',\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t);\n\n\t$posts = get_posts( $args );\n\n\t$user = wp_get_current_user();\n\tif (!in_array('all', get_field('logged_in_roles'))) {\n\t\tif ( in_array( 'administrator', (array) $user->roles ) ) {\n\n\t\t\tif ( !empty($posts) ) {\n\t\t\t\tforeach ($posts as $post) {\n\t\t\t\t\tsetup_postdata($post);\n\t\t\t\t\tif (in_array('administrator', get_field('logged_in_roles'))) {\n\t\t\t\t\t\tarray_push($allowedPosts, $post->ID);\n\t\t\t\t\t}\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else if ( in_array( 'editor', (array) $user->roles ) ) {\n\n\t\t\tif ( !empty($posts) ) {\n\t\t\t\tforeach ($posts as $post) {\n\t\t\t\t\tsetup_postdata($post);\n\t\t\t\t\tif (in_array('editor', get_field('logged_in_roles'))) {\n\t\t\t\t\t\tarray_push($allowedPosts, $post->ID);\n\t\t\t\t\t}\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\tif (empty($allowedPosts)) {\n\t\t$allowedPostsStrings = \"-1\";\n\t}\n}", "title": "" }, { "docid": "587ba456a1a69297aa4ceb4dd006f401", "score": "0.501893", "text": "public function should_send_post( $post_id )\n\t{\n\t\t$post = get_post( $post_id );\n\n\t\t// exclude sponsor posts (we only filter this on GO/pC / does not apply to underwritten reports)\n\t\tif ( apply_filters( 'go_sponsor_posts_is_sponsor_post', FALSE, $post_id ) )\n\t\t{\n\t\t\treturn FALSE;\n\t\t} // end if\n\n\t\t// check for valid post types\n\t\t$valid_post_types = array(\n\t\t\t'go-datamodule',\n\t\t\t'go-events-event',\n\t\t\t'go-events-session',\n\t\t\t'go-report',\n\t\t\t// 'go-report-section', // temporarily disabled, need to come up with a better plan\n\t\t\t'go_shortpost',\n\t\t\t'go_webinar',\n\t\t\t'post',\n\t\t);\n\n\t\tif ( ! in_array( $post->post_type, $valid_post_types ) )\n\t\t{\n\t\t\treturn FALSE;\n\t\t} // end if\n\n\t\t//only include events and sessions from the events property\n\n\t\tif ( 'events' == go_config()->get_property_slug() )\n\t\t{\n\t\t\tif ( 'go-events-event' != $post->post_type && 'go-events-session' != $post->post_type )\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}// end if\n\t\t}// end if\n\n\t\t// only include charts from the research property\n\t\tif (\n\t\t\t'go-datamodule' == $post->post_type &&\n\t\t\t'research' != go_config()->get_property_slug()\n\t\t)\n\t\t{\n\t\t\treturn FALSE;\n\t\t} // end if\n\n\t\t// exclude report subsections that are about the author or about gigaom research\n\t\tif (\n\t\t\t'go-report-section' == $post->post_type &&\n\t\t\t'research' == go_config()->get_property_slug()\n\t\t)\n\t\t{\n\t\t\tif (\n\t\t\t\t0 === stripos( $post->post_title, 'about gigaom' ) || // match \"About Gigaom...\"\n\t\t\t\t(\n\t\t\t\t\t0 === stripos( $post->post_title, 'about ' ) && // match \"About Keren Elazari\"\n\t\t\t\t\t5 < $post->menu_order // exclude early sections, which might begin with \"about\" for other reasons\n\t\t\t\t)\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}//end if\n\t\t}//end if\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "eb49aeab057a0c55e89a501873533816", "score": "0.5004828", "text": "private function get_user_restricted_posts( $post_type = null ) {\n\t\treturn $this->get_user_content_for_access_condition( 'restricted', 'posts', $post_type );\n\t}", "title": "" }, { "docid": "621fcb9b3a8d764847d7b0637464354d", "score": "0.5003648", "text": "function render_inpost_after_content() {\n\tif ( ! is_single() || get_post_type() != 'post' ) {\n\t\treturn;\n\t}\n\n\tif ( ! fulcrum_is_parent_post() ) {\n\t\treturn;\n\t}\n\n\trender_inpost_navigation();\n\n\trender_promotions();\n}", "title": "" }, { "docid": "ff0d3bd05bf7f7177febf05dc942d631", "score": "0.50006455", "text": "abstract protected function _apply(&$content);", "title": "" }, { "docid": "a893a75b66c6a81d0d45415db598eb9a", "score": "0.49979097", "text": "public function canModeratePost()\n {\n if (user()->can('forum-moderate-junk-post')\n || user()->can('forum-moderate-junked-post')\n || user()->can('forum-moderate-delete-post')\n || user()->can('forum-moderate-thread')\n )\n return true;\n return false;\n }", "title": "" }, { "docid": "77b03afecb7743ebeb70d0008a517114", "score": "0.49955314", "text": "function blogpostvalid( $name ) {\r\n // in a few words, no HTML is allowed so just check\r\n // if it contains html tags\r\n return true;\r\n }", "title": "" }, { "docid": "57a2cb81c8a519ac17d84d94a1eb30d2", "score": "0.4993112", "text": "public function prepareContent();", "title": "" }, { "docid": "e93e55490bb603a7401c406a1c7c2b7f", "score": "0.4986779", "text": "static function filter_the_content( $content ){\n\t\tglobal $post;\n\t\tif( !$post ){\n\t\t\treturn $content;\n\t\t}\n\t\t\n\t\t// check if plugin embedding is allowed\n\t\tif( !cvwp_is_embed_allowed() ){\n\t\t\tif( __cvwp_disallow_plugin_embeds() ){\n\t\t\t\t$message = cvwp_plugin_message( 'Automatic video embedding prevented by plugin filter set in theme or other plugin.' );\n\t\t\t}else{\n\t\t\t\t$message = cvwp_plugin_message( 'Automatic video embedding prevented by plugin options.' );\n\t\t\t}\t\n\t\t\treturn $message . \"\\n\" . $content;\n\t\t}\n\t\t\n\t\t// get post options\n\t\t$options = cvwp_get_post_options( $post->ID );\n\t\t\n\t\tif( !cvwp_has_video() ){\n\t\t\treturn $content;\n\t\t}\n\n\t\t/**\n\t\t * Filter to allow videos to be embedded by the plugin.\n\t\t * @var boolean\n\t\t */\n\t\t$allow = apply_filters( 'cvwp_allow_video_embed' , true, $post, $options['embed_position'] );\n\n\t\tif( !$allow ){\n\t\t\t$message = cvwp_plugin_message( 'Automatic video embedding prevented by plugin filter.' );\n\t\t\treturn $message . \"\\n\" . $content;\n\t\t}\n\n\t\tif( !in_array( $options['embed_position'] , array('above_content', 'below_content') ) ){\n\t\t\t/**\n\t\t\t * Apply a filter on content that allows its modification.\n\t\t\t * The plugin uses this filter to add the video URL on AMP pages if location is not\n\t\t\t * above or below the content (in which case, AMP doesn't embed the video URL)\n\t\t\t *\n\t\t\t * @param string $content\n\t\t\t * @param WP_Post $post\n\t\t\t * @param array $options\n\t\t\t */\n\t\t\t$content = apply_filters( 'cvwp_video_outside_content', $content, $post, $options['embed_position'] );\n\t\t\treturn $content;\n\t\t}\n\n\t\t/**\n\t\t * Filter that allows altering the embedding of the video\n\t\t * @var string HTML\n\t\t */\n\t\t$output = apply_filters( 'cvwp_video_embed_html', cvwp_video_output( '', '', true, false ), $post, $options['embed_position'] );\n\n\t\tif( 'above_content' == $options['embed_position'] ){\n\t\t\t$content = $output . \"\\n\" . $content;\n\t\t}else{\n\t\t\t$content .= \"\\n\" . $output;\n\t\t}\n\t\t\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "aae060ad87da7e6e4722f79e05a437fb", "score": "0.4979697", "text": "private function current_user_can_view_content_results($content) {\n if (!get_option('h5p_track_user', TRUE)) {\n return FALSE;\n }\n\n return $this->current_user_can_edit($content);\n }", "title": "" }, { "docid": "43a2fc40f60ac20910d72ffae606cb2d", "score": "0.4977812", "text": "public function restrict() {\n\t\tif (!$this->is_logged_in()) {\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "title": "" }, { "docid": "92edd550ffb5448108b97a888ead2238", "score": "0.49733388", "text": "public function kt_taxonomy_filter_restrict_manage_posts() {\n global $typenow;\n $types = array_keys($this->parameters);\n if (in_array($typenow, $types)) {\n // create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list\n $filters = $this->parameters[$typenow];\n foreach ($filters as $tax_slug) {\n // retrieve the taxonomy object\n $tax_obj = get_taxonomy($tax_slug);\n $tax_name = $tax_obj->labels->name;\n\n // output html for taxonomy dropdown filter\n echo \"<select name='\" . strtolower($tax_slug) . \"' id='\" . strtolower($tax_slug) . \"' class='postform'>\";\n echo \"<option value=''>{$this->showAllText}</option>\";\n $this->generate_taxonomy_options($tax_slug, 0, 0, (isset($_GET[strtolower($tax_slug)]) ? $_GET[strtolower($tax_slug)] : null));\n echo \"</select>\";\n }\n }\n }", "title": "" }, { "docid": "bbb9a78c376c8e3995f8490f7c465951", "score": "0.49718678", "text": "function effect() {\n\t\tif (!$this->_context) return AUTHORIZATION_DENY;\n\n\t\t// Certain roles are allowed to see unpublished content.\n\t\t$userRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);\n\t\tif (count(array_intersect(\n\t\t\t$userRoles,\n\t\t\tarray(\n\t\t\t\tROLE_ID_MANAGER,\n\t\t\t\tROLE_ID_EDITOR,\n\t\t\t\tROLE_ID_SITE_ADMIN,\n\t\t\t\tROLE_ID_ASSISTANT,\n\t\t\t\tROLE_ID_SECTION_EDITOR\n\t\t\t)\n\t\t))>0) {\n\t\t\treturn AUTHORIZATION_PERMIT;\n\t\t}\n\n\t\tif ($this->_context->getSetting('publishingMode') == PUBLISHING_MODE_NONE) {\n\t\t\treturn AUTHORIZATION_DENY;\n\t\t}\n\n\t\treturn AUTHORIZATION_PERMIT;\n\t}", "title": "" }, { "docid": "5a717bb6c50feaecf19e37983a7f47ab", "score": "0.49712652", "text": "function cherry_ads_post_before_content() {\n\tcherry_ads( 'post_before_content' );\n}", "title": "" }, { "docid": "e81f9f411460a1c116637ee714f2b87a", "score": "0.494635", "text": "public function supports(string $content): bool;", "title": "" }, { "docid": "0acfd4f7073afaaf403b183fdb889895", "score": "0.4941802", "text": "public function enforcePageRestrictions($query, $action = 'view')\n {\n // Prevent drafts being visible to others.\n $query = $query->where(function ($query) {\n $query->where('draft', '=', false);\n if ($this->currentUser) {\n $query->orWhere(function ($query) {\n $query->where('draft', '=', true)->where('created_by', '=', $this->currentUser->id);\n });\n }\n });\n\n if ($this->isAdmin) return $query;\n $this->currentAction = $action;\n return $this->pageRestrictionQuery($query);\n }", "title": "" }, { "docid": "cf62ef7db6168f228553ad328d0c074e", "score": "0.49353704", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Tutorial_SimpleNews::manage_post');\n }", "title": "" }, { "docid": "c98ebd775c3ed17684182dd043450d39", "score": "0.49335316", "text": "function pdclogin_restrict_mgt( $atts, $content = null ) {\n\tglobal $current_user;\n\tget_currentuserinfo();\t\n\t$user_id = $current_user->ID;\n\t$role = get_user_meta( $user_id, 'main_role', true );\n\t$a = shortcode_atts( array(\n 'role' => 'helper',\n ), $atts );\n\t\n\tif ( current_user_can( 'manage_options' ) ) :\n\t\treturn sprintf( '[%s %s]', __( 'only for', 'pdclogin' ), esc_attr( $a['role'] ) ) . do_shortcode( $content ) . sprintf( '[%s]', __( 'end restriction', 'pdclogin' ) );\n\telse :\n\t\n\t\tif ( $a['role'] === $role ) :\n\t\t\treturn do_shortcode( $content );\n\t\telse :\n\t\t\treturn '';\n\t\tendif;\n\tendif;\n}", "title": "" }, { "docid": "68ced5a7f1c935124c826382fb27c45d", "score": "0.49281472", "text": "function canHandle($publishedMonograph, $submissionFile) {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "43ccee57ed8046afbe0d71dd3d5224a4", "score": "0.4921685", "text": "function fed_admin_menu_restrictive_words_check( $slug ) {\n\t$restrictive_menu = array(\n\t\t'payment',\n\t\t'chat',\n\t\t'post'\n\t);\n\n\t$restrictive_menu = apply_filters( 'fed_restrictive_menu_names', $restrictive_menu );\n\t//var_dump($restrictive_menu);\n\n\tif ( in_array( $slug, $restrictive_menu, false ) ) {\n\t\twp_send_json_error( array( 'message' => 'Sorry, You cannot use the restrictive slug name \"' . $slug . '\"' ) );\n\t}\n}", "title": "" }, { "docid": "b474c743422d8bb34785493876893ab6", "score": "0.49197587", "text": "public static function restrict_manage_posts() {\n\t\t\t$classname = get_called_class();\n\t\t\tif ( static::is_current_posttype() ) {\n\t\t\t\tforeach ( static::$meta_keys as $key => $fieldmeta ) {\n\t\t\t\t\tif ( array_key_exists( 'postlist', $fieldmeta ) ) {\n\t\t\t\t\t\tif ( array_key_exists( 'filter', $fieldmeta['postlist'] )\n\t\t\t\t\t\t&& true === $fieldmeta['postlist']['filter'] ) {\n\t\t\t\t\t\t\t$fieldkey = $classname . '_' . $key;\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<select name=\"<?php echo esc_attr( $fieldkey ); ?>\">\n\t\t\t\t\t\t\t\t<option value=\"\"><?php echo esc_html( 'Filter by ' . $key . ':' ); ?></option>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$current_v = static::http_get_param( $fieldkey );\n\t\t\t\t\t\t\t\t// TODO - Promote creation of a select htmlthis to genericbase.\n\t\t\t\t\t\t\t\tswitch ( $fieldmeta['type'] ) {\n\t\t\t\t\t\t\t\t\tcase 'related_post':\n\t\t\t\t\t\t\t\t\t\tforeach ( $fieldmeta['classname']::get_all() as $value ) {\n\t\t\t\t\t\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t'<option value=\"%s\"%s>%s</option>',\n\t\t\t\t\t\t\t\t\t\t\t\tesc_attr( $value->ID ),\n\t\t\t\t\t\t\t\t\t\t\t\tselected( $value->ID, $current_v, false ),\n\t\t\t\t\t\t\t\t\t\t\t\tesc_html( $value->title )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase 'related_tax':\n\t\t\t\t\t\t\t\t\t\tforeach ( $fieldmeta['classname']::get_all() as $value ) {\n\t\t\t\t\t\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t'<option value=\"%s\"%s>%s</option>',\n\t\t\t\t\t\t\t\t\t\t\t\tesc_attr( $value->ID ),\n\t\t\t\t\t\t\t\t\t\t\t\tselected( $value->ID, $current_v, false ),\n\t\t\t\t\t\t\t\t\t\t\t\tesc_html( $value->name )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tthrow( new Exception( 'Not implemented' ) );\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</select>\n\t\t\t\t\t\t\t<?php\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}", "title": "" }, { "docid": "4fc91834b415ca66bed07d4e6df38155", "score": "0.4919483", "text": "function auto_content_type($page)\r\n{\r\n\tglobal $flag_preserver;\r\n\tif (!isset($flag_preserver))\r\n\t {\r\n\t\t$flag_preserver = preg_match(\"/header\\s*\\(\\s*.content\\-type:/isx\",$page['texte']) || (isset($page['entetes']['Content-Type']));\r\n\t }\r\n}", "title": "" }, { "docid": "0540c5fb479c4dec2c015827acb1d813", "score": "0.49168137", "text": "public static function meta_filter($content) {\r\n //$theme_uri = url::base() . WEBROOT . '/themes/' . Kohana::config('core.theme') . '/';\r\n\r\n // stylesheet\n \r\n\t\t//$content = preg_replace('/(<link.*href=\")(.*)(\\.css\".*>)/i','${1}' . $theme_uri . '${2}${3}', $content);\n \r\n // javascript\r\n\t\t/*\r\n $content = preg_replace('/(<script\\s(?:type|language)=[\"|\\']text\\/javascript[\"|\\']\\ssrc=[\"|\\'])(?:\\.\\/|\\.\\.\\/)?(js\\/[a-z0-9A-Z_\\-\\.]+\\.(?:js|vbs)[\"|\\']><\\/script>)/i', '${1}' . $theme_uri . '${2}', $content);\r\n\t\t*/\r\n\r\n // images\r\n\t\t/*\r\n $content = preg_replace('/((?:background|src)\\s*=\\s*[\"|\\'])(?:\\.\\/|\\.\\.\\/)?(images\\/.*?[\"|\\'])/is', '${1}' . $theme_uri . '${2}', $content);\r\n $content = preg_replace('/((?:background|background-image):\\s*?url\\()(?:\\.\\/|\\.\\.\\/)?(images\\/)/is', '${1}' . $theme_uri . '${2}', $content);\r\n\t\t*/\r\n\r\n\n // flash\n \r\n\t\t//$content = preg_replace('/((?:data|value|src)\\s*=\\s*[\"|\\'])(?:\\.\\/|\\.\\.\\/)?(swf\\/.*?[\"|\\'])/is', '${1}' . $theme_uri . '${2}', $content);\n//(<object.*data=\")(swf/bcastr4.swf?xml=bcastr.xml\" width=\"960\" height=\"450\" id=\"vcastr3\">\n//\t\t<param name=\"movie\" value=\"swf/bcastr4.swf?xml=bcastr.xml\" />\n //$content = preg_replace('', '');\r\n // strip much space\r\n #$content = preg_replace('/ +/', ' ', $content);\r\n return $content;\r\n }", "title": "" }, { "docid": "85ad7a3206c34459208de259e5611eae", "score": "0.4913208", "text": "function wfPageProtection() {\n global $wgParser;\n\n global $wgMessageCache, $wgPageProtectionMessages;\n foreach( $wgPageProtectionMessages as $key => $value ) {\n\t$wgMessageCache->addMessages( $wgPageProtectionMessages[$key], $key );\n }\n\n $wgParser->setHook( PROTECT_TAG, \"protectPage\" );\n\n global $wgHooks;\n $wgHooks['AlternateEdit'][] = 'protectedEdit';\n $wgHooks['ArticleSave'][] = 'protectSave';\n\n}", "title": "" }, { "docid": "758eb30dfa08b9734b2d6f90d042de02", "score": "0.4910527", "text": "function ipr_is_post_restricted( $postid ){\n\n\t$is_restricted = get_post_meta(get_the_id(), 'hide-post-checkbox')[0];\n\t\n\treturn $is_restricted == 'yes';\n}", "title": "" }, { "docid": "7077043156f44317dc8a253b24b998ee", "score": "0.49103856", "text": "function the_content_limit($max_char, $more_link_text = 'Leer más', $stripteaser = 0, $more_file = '') {\n $content = get_the_content($more_link_text, $stripteaser, $more_file);\n $content = apply_filters('the_content', $content);\n $content = str_replace(']]>', ']]&gt;', $content);\n $content = strip_tags($content);\nif ((strlen($content)>$max_char) && ($espacio = strpos($content, \" \", $max_char ))) {\n $content = substr($content, 0, $espacio);\n $content = $content;\n // echo \"<p>\";\n echo $content;\n echo \"...\";\n echo \"&nbsp;<a href='\";\n the_permalink();\n echo \"'></a>\";\n // echo \"</p>\";\n }\n else {\n // echo \"<p>\";\n echo $content;\n echo \"...\";\n echo \"&nbsp;<a href='\"; the_permalink(); echo \"'></a>\";\n // echo \"</p>\";\n }\n }", "title": "" }, { "docid": "b758a924c5056fa4964bd8e1b5fb6766", "score": "0.49036735", "text": "function dashboard_restrict_sidemenu(){\n\t// Check user permissions (restrictions not applied to admin)\n\tif( !current_user_can( 'manage_options' ) ){\n\t\t// remove_menu_page( 'upload.php' ); //media option\n\t\tremove_menu_page( 'edit.php?post_type=page' ); //pages option - Note: editors (lecturers/tutors lose ability for editing pages here)\n\t\tremove_menu_page( 'edit-comments.php' ); //comments option\n\t\tremove_menu_page( 'tools.php' ); //tools option\n\t}\n}", "title": "" } ]
11f29e4f22809a18b1e309fad7734a32
TODO: Implement find() method.
[ { "docid": "b59d92d7ac874527249072a0ac493da3", "score": "0.0", "text": "public function find(string $id): Category\n {\n }", "title": "" } ]
[ { "docid": "f5cac3d84d9e7e944232b3ba8d361b97", "score": "0.8684654", "text": "public function find();", "title": "" }, { "docid": "be525c8b8faaf698c67f041f59d0c675", "score": "0.86133796", "text": "abstract public function find();", "title": "" }, { "docid": "be525c8b8faaf698c67f041f59d0c675", "score": "0.86133796", "text": "abstract public function find();", "title": "" }, { "docid": "742cb5698d071cab12854e7a9c7f33c8", "score": "0.78652847", "text": "public function Find()\n {\n //TODO Suche mit den werten machen\n }", "title": "" }, { "docid": "742cb5698d071cab12854e7a9c7f33c8", "score": "0.78652847", "text": "public function Find()\n {\n //TODO Suche mit den werten machen\n }", "title": "" }, { "docid": "48fec4332765e3e2a30c8fb4325ec2c0", "score": "0.7824535", "text": "public static function basicFind()\n {\n return parent::find();\n }", "title": "" }, { "docid": "0b016a2ded2f78d272d664ff34f650bd", "score": "0.75070065", "text": "public function find() {\n return parent::find();\n }", "title": "" }, { "docid": "0b016a2ded2f78d272d664ff34f650bd", "score": "0.75070065", "text": "public function find() {\n return parent::find();\n }", "title": "" }, { "docid": "0b016a2ded2f78d272d664ff34f650bd", "score": "0.75070065", "text": "public function find() {\n return parent::find();\n }", "title": "" }, { "docid": "119ca623990d3a5ef3deb43a374460d3", "score": "0.7487728", "text": "public function find($data);", "title": "" }, { "docid": "119ca623990d3a5ef3deb43a374460d3", "score": "0.7487728", "text": "public function find($data);", "title": "" }, { "docid": "71d89b4fee2534ad93c3857743e85680", "score": "0.7381162", "text": "public function find()\r\n\t{\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "e2d1e2f3d2ab02037988706e1a6ec331", "score": "0.7375033", "text": "public function find( $name );", "title": "" }, { "docid": "354e1ea12b799e34ba19ba61d16aee7b", "score": "0.73011184", "text": "public function find($value) {}", "title": "" }, { "docid": "f2de0e862e49812f4394f12d64ec1fca", "score": "0.72873074", "text": "public function find($name);", "title": "" }, { "docid": "41a846eb894f31570adbbcaefb4df7a9", "score": "0.7241287", "text": "public function find($object);", "title": "" }, { "docid": "77cad9197915bf10c2fa495dfd441d28", "score": "0.7201452", "text": "public function find(){\r\n $res = parent::find();\r\n\r\n if($this->entity_exists()){\r\n $res = ($this->loaded()) ? ($this->entity($res)) : (false);\r\n }\r\n\r\n return $res;\r\n }", "title": "" }, { "docid": "bd69b7a7b7a52bdffa72d6a6df98ef19", "score": "0.70569307", "text": "function find($id);", "title": "" }, { "docid": "bd69b7a7b7a52bdffa72d6a6df98ef19", "score": "0.70569307", "text": "function find($id);", "title": "" }, { "docid": "b68a233f6e8aeed7464aca85d4eeafde", "score": "0.70229715", "text": "public function find($key)\n {\n }", "title": "" }, { "docid": "597c09bfcbe2bffc795421a64e62cba5", "score": "0.69472456", "text": "public function find()\n {\n return $this->query->get()->fetchObject(static::class, [$this->di])->loaded(true);\n }", "title": "" }, { "docid": "7f24d324afe9b1324460cca2f1255cf3", "score": "0.69324565", "text": "public function find($key);", "title": "" }, { "docid": "4742155e37a08eeed508f01c8136efb1", "score": "0.69172245", "text": "public function find($search);", "title": "" }, { "docid": "18e8657c4e9cfd733c83eb8c7815aa2b", "score": "0.68817073", "text": "static function find() : Model\r\n {\r\n }", "title": "" }, { "docid": "dd91364bafc429e1bc64367ab65994be", "score": "0.68375397", "text": "public function find()\n {\n $this->query['type'] = Query::TYPE_FIND;\n return $this;\n }", "title": "" }, { "docid": "2cb78c40d0547f167346598b1ba45adf", "score": "0.6740508", "text": "public function find(...$arguments)\n {\n return $this->children()->find(...$arguments);\n }", "title": "" }, { "docid": "1216284df2cbdd5651da1f9090bd2d91", "score": "0.6721274", "text": "public function findByID($id);", "title": "" }, { "docid": "f3b2ec3f1b18abbbb39fc5c0505f9670", "score": "0.6653585", "text": "public function find()\n { \n if(!empty($this->attributes)) { \n if (array_key_exists('id', $this->attributes)) { \n $this->update();\n } else {\n $this->insert();\n }\n }\n }", "title": "" }, { "docid": "bd4ad04a62b39436d3d3943dbf9af559", "score": "0.6613094", "text": "public function find()\n {\n return $this->_doQuery(false);\n }", "title": "" }, { "docid": "86509ab553eb17c0be53cacb0a4b22a0", "score": "0.6575935", "text": "public function find($identifier);", "title": "" }, { "docid": "2cb36965884777701def78d8551726b7", "score": "0.6558113", "text": "public static function find($parameters = null)\n { \n return parent::find($parameters);\n }", "title": "" }, { "docid": "5c809805b5728f82273417288b1ec1b6", "score": "0.6550256", "text": "public function find(AbstractNode $node): Collection;", "title": "" }, { "docid": "898aecc82e61686053181b1f12fd441b", "score": "0.6526677", "text": "public static function find() {\n $class = get_called_class();\n $args = func_get_args();\n if(count($args) == 1 && is_numeric($args[0])) {\n if(!isset(static::$_cache[$class])) {\n static::$_cache[$class] = array();\n }\n \n if(isset(static::$_cache[$class][$args[0]])) {\n return static::$_cache[$class][$args[0]];\n } else {\n $activeRecord = call_user_func_array('parent::find', $args);\n static::$_cache[$class][$activeRecord->id] = $activeRecord;\n return $activeRecord;\n }\n } else {\n return call_user_func_array('parent::find', $args);\n }\n }", "title": "" }, { "docid": "838ff997eff3f4a8fd9ef968d8856b99", "score": "0.6521715", "text": "public function findOneByDefault();", "title": "" }, { "docid": "5784be135f0f889069390f0142d41879", "score": "0.65100515", "text": "function findById($id)\n {\n }", "title": "" }, { "docid": "7051b4e45d6f0d48ffa00aee43774974", "score": "0.649379", "text": "public function find( $id );", "title": "" }, { "docid": "7051b4e45d6f0d48ffa00aee43774974", "score": "0.649379", "text": "public function find( $id );", "title": "" }, { "docid": "5f0054e0337cade909e769a8a47afd9a", "score": "0.6485877", "text": "public static function find($uniqueID);", "title": "" }, { "docid": "10c67e0ecf1ec3580b4eda40ae6d6a23", "score": "0.6479996", "text": "public function testFindCheck()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "929f4307de7d3b998bd5fa29c271d760", "score": "0.6479077", "text": "public static function find() {\n $instance = new self();\n return $instance;\n }", "title": "" }, { "docid": "78cc87821623d6dd9b666c48847cd7f9", "score": "0.6472713", "text": "function find($where, $fields) {\n\t\treturn self::getCollection()->find($where,$fields);\n\t}", "title": "" }, { "docid": "b80c78cda2e303c86bf67888fe7b0bb1", "score": "0.64579046", "text": "public static function find($parameters = null){\n return parent::find($parameters);\n }", "title": "" }, { "docid": "795afb4f8088e6b060a63b5548dea8ad", "score": "0.64502573", "text": "abstract function findSingle(): array;", "title": "" }, { "docid": "11e91d6ef4f55c04710f4130893c2abf", "score": "0.6433323", "text": "public function testFind()\n {\n $data = $this->Model->get(1);\n\n $this->assertEquals(1, $data->createdBy->id);\n $this->assertEquals(1, $data->modifiedBy->id);\n\n $this->assertEquals(8, count($data->createdBy->toArray()));\n $this->assertEquals(8, count($data->modifiedBy->toArray()));\n }", "title": "" }, { "docid": "ab8e994ea80775d1f258a9b3fc2a0e47", "score": "0.6417496", "text": "public static function find($parameters = null)\n {\n return parent::find($parameters);\n }", "title": "" }, { "docid": "de43b3c7931e78c29bfb8cfabde00c73", "score": "0.636398", "text": "function find ($find = null) {\n $found = array ();\n\t\t\tif ($find === null) { // don't find stuff\n\t\t\t\t$found = array_keys ($this->db);\n\t\t\t} else { // find stuff\n\t\t\t\tforeach ((array) $this->db as $alias => $value) {\n\t\t\t\t\tif (is_array ($value) || is_object ($value)) {\n\t\t\t\t\t\t$valstr = serialize ($value); // just to make it simpler to search\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$valstr = $value;\n\t\t\t\t\t}\n\t\t\t\t\tif (stripos ($valstr, $find) !== false) {\n\t\t\t\t\t\t$found[$alias] = $value; // add something to find\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n return $found;\n }", "title": "" }, { "docid": "8e1cec1ddf0ae58665e3d9bd0d8cf159", "score": "0.63610893", "text": "public function find(string $id);", "title": "" }, { "docid": "34c3641720d192a0df8ad2e83b0fe97a", "score": "0.63563985", "text": "public function find()\n {\n return collect([$this->query->find($this->option('find'))]);\n }", "title": "" }, { "docid": "99c72d98918f980ba2dad84c8229becf", "score": "0.63222516", "text": "public function find_one()\n {\n $result = $this->find_all(1);\n \treturn $result[0];\n }", "title": "" }, { "docid": "e59c6f436361b7827bea0dc8fd7702b7", "score": "0.6319936", "text": "public static function hasFind(){\n return self::$find;\n }", "title": "" }, { "docid": "b01ee3c73552e015c83c88d5f0bf2bee", "score": "0.63143027", "text": "public function find(ValueObject $object);", "title": "" }, { "docid": "cb8a86ae85a5f4f92b90b1ac39f9be70", "score": "0.63037646", "text": "public static function find( $parameters = NULL ) {\n\t\treturn parent::find( $parameters );\n\t}", "title": "" }, { "docid": "b01a62bee6770416438079158bcfd39c", "score": "0.63032395", "text": "public function find($code)\n {\n return parent::find($code);\n }", "title": "" }, { "docid": "ccb8917f71908df73641375afee33419", "score": "0.63010263", "text": "public function find($query);", "title": "" }, { "docid": "ccb8917f71908df73641375afee33419", "score": "0.63010263", "text": "public function find($query);", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.63002557", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.63002557", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.63002557", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.63002557", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.63002557", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.63002557", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.63002557", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.62872946", "text": "public function find($id);", "title": "" }, { "docid": "bde1e5423f7329507bb697262aca3478", "score": "0.6284352", "text": "protected function _find($id) {\n return parent::_find($this->type(), $id);\n }", "title": "" }, { "docid": "a4cceb1a41d749577616082e9383f431", "score": "0.62739515", "text": "public static function find($parameters = null)\n {\n return parent::find($parameters);\n }", "title": "" }, { "docid": "a4cceb1a41d749577616082e9383f431", "score": "0.62739515", "text": "public static function find($parameters = null)\n {\n return parent::find($parameters);\n }", "title": "" }, { "docid": "7b61ce0b9f56c70b719b355436565511", "score": "0.62508744", "text": "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "title": "" }, { "docid": "7b61ce0b9f56c70b719b355436565511", "score": "0.62508744", "text": "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "title": "" }, { "docid": "7b61ce0b9f56c70b719b355436565511", "score": "0.62508744", "text": "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "title": "" }, { "docid": "7b61ce0b9f56c70b719b355436565511", "score": "0.62508744", "text": "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "title": "" }, { "docid": "7b61ce0b9f56c70b719b355436565511", "score": "0.62508744", "text": "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "title": "" }, { "docid": "7b61ce0b9f56c70b719b355436565511", "score": "0.62508744", "text": "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "title": "" }, { "docid": "252714baecafa521986176876b7171af", "score": "0.62392914", "text": "function & iterFind($sub=null,$pred=null,$obj=null) {\r\n\t\t// Import Package Utility\r\n\t\tinclude_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);\r\n\r\n\t\t$if = new IterFind($this,$sub,$pred,$obj);\r\n\t\treturn $if;\r\n\t}", "title": "" }, { "docid": "7fc2dd4a1db62042f648b5e07a639b2a", "score": "0.62348443", "text": "public function findResult($name)\n {\n }", "title": "" }, { "docid": "b0e84b5a3353c1385a9ea7ace430e256", "score": "0.62180585", "text": "public static function find($id);", "title": "" }, { "docid": "b0e84b5a3353c1385a9ea7ace430e256", "score": "0.62180585", "text": "public static function find($id);", "title": "" }, { "docid": "2a80b8990710fd66dee1431b5fd260ee", "score": "0.6197826", "text": "public static function find($parameters = null) {\n return parent::find($parameters);\n }", "title": "" }, { "docid": "2a80b8990710fd66dee1431b5fd260ee", "score": "0.6197826", "text": "public static function find($parameters = null) {\n return parent::find($parameters);\n }", "title": "" }, { "docid": "442e4a9d8c60df279eabc3019ff8aa45", "score": "0.61967856", "text": "public function find(): array\n {\n return [$this->load()];\n }", "title": "" } ]
ce4f06179e8ca222d3bb7b6e302ee0da
If desired, you may override the template being used return a string containing the directory path, or false for no override.
[ { "docid": "b9c4358cdee14c239b460538dd66fe34", "score": "0.70727575", "text": "function getOverrideTemplate(){\n\t\treturn false;\n\t\t//return SERVER_RES_DIR.'template.html';\n\t}", "title": "" } ]
[ { "docid": "302e3351b542fa9771f5a1adfcc38ccc", "score": "0.6896173", "text": "public function getTemplatePath()\n {\n return $this->getOption('base_dir');\n }", "title": "" }, { "docid": "ba5ca1389eecf274c3722b456caf9cc3", "score": "0.68502367", "text": "public abstract function getTemplatesDirectory() : string;", "title": "" }, { "docid": "f4d42a5aa7c1552d8ccd0af756d09c12", "score": "0.6781919", "text": "public function getTemplateDirectory()\n\t{\n\t\treturn $this->_view_tpldir;\n\t}", "title": "" }, { "docid": "0a66270cda68ff8cadec38cea0dad868", "score": "0.67501634", "text": "function template_directory($filepath=false)\n {\n return theme_directory($filepath).'/templates';\n }", "title": "" }, { "docid": "ce0509ea35d5be8de8dd378f20fcc97c", "score": "0.6600743", "text": "public function getTemplatePath();", "title": "" }, { "docid": "e8911eb495d016a7040725f44883f2a8", "score": "0.65664136", "text": "function get_template_path()\r\n\t{\r\n\t\t$template_dir = $this->config['template_dir'];\r\n\t\t$template_path = $template_dir . $this->current . \".tpl\";\r\n\t\t\r\n\t\t//check the existence\r\n\t\tif (!file_exists($template_path)) {\r\n\t\t\t$main = $this->config['application_main'];\r\n\t\t\t$template_path = $template_dir . $main . \".tpl\";\r\n\t\t}\r\n\t\treturn $template_path;\r\n\t}", "title": "" }, { "docid": "4ca198b399ff03f82fb720512c776fc2", "score": "0.65655893", "text": "public function getTemplateDir()\n {\n return dirname(__DIR__) . '/template';\n }", "title": "" }, { "docid": "af0ef8f8b26efd6f07e650fb09aab6f8", "score": "0.64686435", "text": "function setTemplatePath() {\n\t\t\tif ($this->fconf['tmpl_path'] && t3lib_div::validPathStr($this->fconf['tmpl_path'])) {\n\t\t\t\t$tmpl_path = t3lib_div::getFileAbsFileName(t3lib_div::fixWindowsFilePath($this->fconf['tmpl_path']));\n\t\t\t\tif (!file_exists($tmpl_path)) $tmpl_path = t3lib_extMgm::extPath('chc_forum').'pi1/templates/';\n\t\t\t} else {\n\t\t\t\t$tmpl_path = t3lib_extMgm::extPath('chc_forum').'pi1/templates/';\n\t\t\t}\n\t\t\treturn $tmpl_path;\n\t\t}", "title": "" }, { "docid": "3d53e31fdb0a9e127102560a3253d05a", "score": "0.6454334", "text": "public function getTemplateDir()\n {\n return sfConfig::get('app_site_listing_template_dir', sfConfig::get('sf_root_dir') . '/templates/listing');\n }", "title": "" }, { "docid": "97df2a0ecb0ac250d9f6f251ca0d2f97", "score": "0.64496416", "text": "function bpdw_get_template_directory() {\n\treturn trailingslashit( dirname(__FILE__) ) . 'templates';\n}", "title": "" }, { "docid": "17bc43647a5d86ba1623176954fe1aa0", "score": "0.6442841", "text": "protected function getTemplatePath() {\n\t\tglobal $configuration;\n\t\t$root = getcwd();\n\t\treturn $root . DIRECTORY_SEPARATOR . $configuration['templatePath'] . DIRECTORY_SEPARATOR;\n\t}", "title": "" }, { "docid": "2759cc1a688f2e8d9b17f5a2e30a3a65", "score": "0.6418374", "text": "public function getTemplatePath()\n\t{\n\t\treturn P::m($this->rootDirectory, (string)$this->tests['template']);\n\t}", "title": "" }, { "docid": "3e535c57992e61c1cc5eaae0a4c5537f", "score": "0.640053", "text": "function template_dir() {\n\t\techo get_template_directory_uri();\n\t}", "title": "" }, { "docid": "8fd443de5bae71e3a4471d6bd8e2840b", "score": "0.6376918", "text": "function getCurrentTemplatePath() {\n\t\treturn 'templates/' . $this->templateName . '/';\n\t}", "title": "" }, { "docid": "0ec857a649ac6c8a21501ae87c32bf86", "score": "0.63698626", "text": "function getTemplateDir() {\r\n\t\treturn dirname(dirname(__FILE__)).'/template/';\r\n\t}", "title": "" }, { "docid": "2f74c36ce11e8ac34d382050e05e196e", "score": "0.63373405", "text": "protected function getTemplatePath()\r\n\t{\r\n\t\treturn str_replace( base_path() . \"/\", \"\", __DIR__) . \"/templates/widget.txt\";\r\n\t}", "title": "" }, { "docid": "771259457cd0f999b1fd3534fecb0679", "score": "0.6330486", "text": "function template_path() {\n\t\tglobal $_mp_document_root;\n\t\t\n\t\t$template_set = $_SESSION[\"settings\"][\"template\"];\n\t\t$path = $_mp_document_root . \"/templates/\" . $template_set . \"/\" \n\t\t\t . $this->_template_name . \".template.html\";\n\t\t\t \n\t\treturn $path;\n\t}", "title": "" }, { "docid": "a50d2063231d6823d35dc5b72d053a2e", "score": "0.6328676", "text": "protected function getPathTemplate() {\r\n\t\ttry {\r\n\t\t\t$pathTemplatesForms\t= LBoxConfigSystem::getInstance()->getParamByPath(\"metarecords/templates/path\");\r\n\t\t\treturn LBoxUtil::fixPathSlashes(\"$pathTemplatesForms/\". $this->filenameTemplate);\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9b10b03afccafaddec9a28a761f25c79", "score": "0.63164246", "text": "private function isDefaultTemplateSet()\n {\n $user_config = UserConfigManager::getConfig();\n\n // If the default template is not set in the user configuration.\n if (!$user_config[\"global\"][\"default_template\"]) {\n // TODO: set error.\n p(\"Error: since no default template is passed to the \\\"view()\\\" method, one must declared in \\\"app/config/global::\\$global[\\\"default_template\\\"]\\\"\", \"error\");\n die;\n } // If it is set, return it.\n else {\n $template_path = \"./app/view/templates/\" . $user_config[\"global\"][\"default_template\"] . \"/\";\n\n // If it does not exist.\n if (!is_dir($template_path)) {\n // TODO: set error.\n p(\"Error: \\\"\" . $user_config[\"global\"][\"default_template\"] . \"\\\" default template set in \\\"app/config/global::\\$global[\\\"default_template\\\"]\\\" does not exist in \\\"app/view/templates/\\\".\", \"error\");\n die;\n } // If it exists, returns it.\n else {\n return $user_config[\"global\"][\"default_template\"];\n }\n }\n }", "title": "" }, { "docid": "7d0ad03dbcb70f5b0aed0594a61c2455", "score": "0.6289148", "text": "function get_current_template_path()\n {\n return 'templates/' . $this->template_name . '/';\n }", "title": "" }, { "docid": "8549c562e7d7d27f9cb2eb1a368aee0e", "score": "0.6275948", "text": "public function template_path(){\n\t\t\n\t\treturn plugins_url().$this->path_template;\n\t\t\n\t\t}", "title": "" }, { "docid": "9afa81bae068c5015d1bbda8fda98b9c", "score": "0.6272673", "text": "public function buildLayoutPath()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$core_file \t= dirname(__FILE__) . '/' . $this->_name . '/tmpl/default.php';\n\n\t\t// Let's check if we have an template override\n\t\t$override = JPATH_BASE . '/' . 'templates' . '/' . $app->getTemplate() . '/html/plugins/'\n\t\t\t. $this->_type . '/' . $this->_name . '/' . 'default.php';\n\n\t\tif (JFile::exists($override))\n\t\t{\n\t\t\treturn $override;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $core_file;\n\t\t}\n\t}", "title": "" }, { "docid": "a7a7e2fd01dde3a7085cce988702be00", "score": "0.6245279", "text": "public function get_template_path()\n {\n return $this->_config['template_path'];\n }", "title": "" }, { "docid": "c07f02a5cf39a7cf8e0e10635bee12ce", "score": "0.6225944", "text": "function i4_lms_get_theme_template_dir_name() {\n return trailingslashit(apply_filters('i4_lms_templates_dir', 'i4_lms_templates'));\n}", "title": "" }, { "docid": "1434b27b9ca2d0d262c05dbec6078505", "score": "0.6218727", "text": "private function _getTemplatePath()\r\n {\r\n return $this->adapter->getTemplatePath($this->templateName);\r\n }", "title": "" }, { "docid": "ff94488b0c5379ad5aeb1a735b046de5", "score": "0.61914325", "text": "public function template_path() {\n return $this->plugin_path() . '/templates/';\n }", "title": "" }, { "docid": "e919b39f76d50f2ee83bd5cb7bdb9530", "score": "0.6170495", "text": "function bpdw_docs_get_template_directory() {\n\treturn BP_DOCS_INCLUDES_PATH . '/templates';\n}", "title": "" }, { "docid": "d941495d6b356306cd986dbe0ec00ab3", "score": "0.61671174", "text": "function _tpl( $return = false ) {\n\t$result = esc_url( get_template_directory_uri() );\n\n\tif ( $return ) {\n\t\treturn $result;\n\t} else {\n\t\techo $result;\n\t}\n}", "title": "" }, { "docid": "61c293e5ddd6354921f902b22e995710", "score": "0.6148462", "text": "public function get_templates_dir() {\n\t\treturn AFFILIATEWP_PLUGIN_DIR . 'templates';\n\t}", "title": "" }, { "docid": "0de9c53a86934bc0b0cf53ced2dc53d6", "score": "0.6144806", "text": "private function getTemplatesDir() {\n\t\treturn $this->templatesDir;\n\t}", "title": "" }, { "docid": "ff707290bcb396b2e779031114fc3ec4", "score": "0.613089", "text": "private function get_template_directory() {\n\t\tif ( null === $this->template_directory ) {\n\t\t\t$this->template_directory = wp_normalize_path(\n\t\t\t\tget_template_directory()\n\t\t\t);\n\t\t}\n\n\t\treturn $this->template_directory;\n\t}", "title": "" }, { "docid": "d16513abd82317a413a18c97d32933aa", "score": "0.61060363", "text": "public function is_directory() {\n return true;\n }", "title": "" }, { "docid": "9d02dca7a2a72360cf19e2bae5f3a2d3", "score": "0.60904056", "text": "function yapepGetTemplateFileName($tpl_name) {\n\tif (file_exists (PROJECT_PATH . 'template/' . $tpl_name) && strstr (realpath (PROJECT_PATH . 'template/' . $tpl_name), PROJECT_PATH . 'template/') && is_file (PROJECT_PATH . 'template/' . $tpl_name)) {\n\t\treturn (PROJECT_PATH . 'template/' . $tpl_name);\n\t}\n\tif (file_exists (SYS_PATH . 'template/' . $tpl_name) && strstr (realpath (SYS_PATH . 'template/' . $tpl_name), SYS_PATH . 'template/') && is_file (SYS_PATH . 'template/' . $tpl_name)) {\n\t\treturn (SYS_PATH . 'template/' . $tpl_name);\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "9d60612d1f629d46bbeb7ca95ade4c87", "score": "0.6076759", "text": "protected function getTemplatePath()\n\t{\n\t\treturn App::get('template')->path . '/html/com_users/' . $this->view->getName();\n\t}", "title": "" }, { "docid": "2cb0ad6bba0d359f5b5eac98fd267f15", "score": "0.60457474", "text": "public function template_path() {\n\t\t\treturn apply_filters( 'portfolio_template_path', 'thim-portfolio/' );\n\t\t}", "title": "" }, { "docid": "f8a5a99c7da439e6776905997731df73", "score": "0.60271454", "text": "public function getTemplatePath($template);", "title": "" }, { "docid": "7c3e5d7d261f663327f7d71bc8c75353", "score": "0.6002769", "text": "public function getTemplatePath() {\r\n\t\treturn $this->templatePath;\r\n\t}", "title": "" }, { "docid": "45a265f6505da53b06543076caeca875", "score": "0.59953725", "text": "protected function getTemplateFileName()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "a55c50d5d7b1e19bd58d019799efadb5", "score": "0.59690917", "text": "private function templateExists($theme_path, $template, $returnPath = FALSE) {\n $oDirectory = new \\RecursiveDirectoryIterator($theme_path);\n $oIterator = new \\RecursiveIteratorIterator($oDirectory);\n foreach($oIterator as $oFile) {\n if ($oFile->getFilename() == $template) {\n if($returnPath) {\n return $oFile->getPath();\n }\n return TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "e08ba8c1456a95405ba8ad47273df032", "score": "0.5965991", "text": "public function getTemplatePath(){\n\t\treturn $this->_templatePath;\n\t}", "title": "" }, { "docid": "93807a5b08c4b9f0c81095a3f723c58d", "score": "0.5944957", "text": "public function template($template)\n {\n $paths = (array) $this->_config['template_path'];\n\n foreach ($paths as $path) {\n $full_path = realpath($path.DIRECTORY_SEPARATOR.$template);\n $real_path = realpath($path);\n\n // Only templates inside the template_path directories are\n // allowed to be executed\n if (file_exists($full_path)\n && is_readable($full_path)\n && substr($full_path, 0, strlen($real_path)) == $real_path)\n {\n return $full_path;\n }\n }\n\n // File not found in any path\n return false;\n }", "title": "" }, { "docid": "0aa28a899237b04cbc24b44d6c91649b", "score": "0.59403414", "text": "function comp_tpl_path($component_name)\n{\n global $rewrite;\n\n if ($rewrite->admin_mod)\n {\n return \"components/\".$component_name.\"/admin/view/\";\n }\n else\n {\n if (file_exists(\"templates/default/components/\".$component_name.\"/\"))\n {\n return \"templates/default/components/\".$component_name.\"/\";\n }\n else\n {\n return \"components/\".$component_name.\"/view/\";\n }\n }\n}", "title": "" }, { "docid": "c38ac018f1b1793becf6c01cb53e44ea", "score": "0.593153", "text": "public function formatFullPath()\n\t{\n\t\t$path = $this->path->value;\n\t\tif ($path) {\n\t\t\tswitch ($this->location->value)\n\t\t\t{\n\t\t\t\tcase 'shared':\n\t\t\t\t\t$path = rtrim(COMMON_TEMPLATE_DIR, '/').'/'.$path;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'shared-cms':\n\t\t\t\t\t$path = rtrim(CMS_COMMON_TEMPLATE_DIR, '/').'/'.$path;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->template_dir->value) {\n\t\t\t\t\t\t$path = rtrim(APP_BASE_DIR, '/').'/'.trim($this->template_dir->value, '/').'/'.ltrim($path,'/');\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ($path);\n\t}", "title": "" }, { "docid": "f21b9cf5c6e1198ec026d98e291443cd", "score": "0.5916703", "text": "public function isDir(): bool\n {\n return false;\n }", "title": "" }, { "docid": "85882616ac1c9d36fa29fac86a1d5ffd", "score": "0.5909272", "text": "function i4_lms_get_templates_dir() {\n return I4_PLUGIN_DIR . 'templates';\n}", "title": "" }, { "docid": "4fb5a3a2e8efc5d900f305dcab551a43", "score": "0.5876294", "text": "protected function filename()\n {\n return 'templates';\n }", "title": "" }, { "docid": "ff5b041d2a094cb1dd7833b9f0fff7af", "score": "0.58737934", "text": "public function is_dir()\n {\n return true;\n }", "title": "" }, { "docid": "a5a01262d791bc8e54b71ff25c359669", "score": "0.5866648", "text": "public function viewPath()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'templates/';\n }", "title": "" }, { "docid": "61d8ca0ef5d15db1f6bc4737da44da7e", "score": "0.5857076", "text": "public function getStaticDirectory() {\n\t\t$templateName = _get('template_name', 'webapp01');\n\t\t_set('template_name', $templateName);\n\t\t$this->baseDir = _get('template_basedir', 'local/templates/');\n\n\t\treturn $this->baseDir . $templateName;\n\t}", "title": "" }, { "docid": "0e56099795cc20ecbd184538de2ab1b6", "score": "0.58568543", "text": "protected function assets_override_directory_exists() {\n\t\tif ( file_exists( get_stylesheet_directory() . \"/config-$this->config->slug/\" ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "266adf603e3d019e26988c85b5ffd600", "score": "0.5854289", "text": "public static function getOverrideFilename () {\n \n if (isset(self::$options['template'])) {\n $filename = conf::pathHtdocs() . \"/template/\" . self::$options[template];\n } \n \n if (isset(self::$options['module'])) {\n $filename = conf::pathModules() . '/' . self::$options['module'];\n }\n \n $filename.= '/' . self::$options['folder'];\n if (isset(self::$options['view'])) {\n $filename.= '/' . self::$options['view'];\n } else {\n $filename.= '/' . self::$view; \n }\n \n if (isset(self::$options['ext'])) {\n $filename.= '.' . self::$options['view'];\n } else {\n $filename.= '.' . 'inc'; \n }\n return $filename;\n }", "title": "" }, { "docid": "bf042a034331eb3b8a08705dc7df5666", "score": "0.5854033", "text": "public function getIsTemplate() : bool\n {\n return $this->isTemplate;\n }", "title": "" }, { "docid": "1b678356ffe19b08d4382aa5864f0428", "score": "0.58539224", "text": "function getTemplatePath() {\n\t\treturn $this->_templatePath;\n\t}", "title": "" }, { "docid": "7b3db5da6b10996472843d1f75dfbd4f", "score": "0.5849931", "text": "public function getDefaultPath() {\n\t\tif(!$this->_router) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->path = __ROOT__.DS.'view'.DS.$this->class.DS.(empty($this->_router->getRoute()) ? '' : $this->_router->getRoute().DS).$this->_router->getMethod().'.php';\n\t}", "title": "" }, { "docid": "36ba65cb0b6c19f4772a6d4a73db57ed", "score": "0.58302194", "text": "protected function getTemplateFolder() : string\n {\n return 'groups';\n }", "title": "" }, { "docid": "8de142087944628a4b7192c786ae8978", "score": "0.58249056", "text": "private function get_default_template_path()\n {\n return RFFramework()->path() . '/templates/widgets/' . $this->widget_name;\n }", "title": "" }, { "docid": "8213970b7a6199be190fc45eff785976", "score": "0.5822077", "text": "function ffw_faqs_get_theme_template_dir_name() {\n return trailingslashit( apply_filters( 'ffw_faqs_templates_dir', 'ffw_faqs_templates' ) );\n}", "title": "" }, { "docid": "7cb522ce9418762ee0b473076f99b932", "score": "0.5809474", "text": "static public function templateExist($template){\n\t\t$template = str_replace(array('/','\\\\'),DIRECTORY_SEPARATOR,$template);\n\t\treturn (stream_resolve_include_path($template.'.php')!==false) ;\n\t}", "title": "" }, { "docid": "0ef05fc09f255ddb4eb43a860e260a95", "score": "0.5805486", "text": "public function add_template_dir() {\n\t\t$_V['template'] = str_replace(' ', '', AFilter::text(ARequest::get('template')));\n\t\tif(!is_dir(TPL_PATH . D_S . $_V['template'])) {\n\t\t\t$this->error(L('TEMPLATE_INEXISTENCE'), Url::U('template/list_template'));\n\t\t}\n\n\t\t$_V['current_dir'] = ARequest::get('dir');\n\t\tif(!TemplateModl::check_dirStr($_V['current_dir'])) {\n\t\t\t$this->error(L('DIR_INEXISTENCE'), Url::U('template/list_template'));\n\t\t}\n\n\t\t$this->assign('_V', $_V);\n\n\t\tif(M('Template')->check_lock($_V['template'], $_V['current_dir'])) {\n\t\t\t$this->error(L('DEFAULT_TEMPLATE_IS_LOCKED'), Url::U('template/list_template_file?template=' . $_V['template'] . '&dir=' . $_V['current_dir']));\n\t\t}\n\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "0e112845194949823cafee8bf4ba65a9", "score": "0.57983154", "text": "function getTemplateFile ()\n\t{\n\t\t//\n\t\t// Allow the template to override a specific file.\n\t\t// If this file exist (the file in the template directory),\n\t\t// it will be loaded, otherwise the default (in the plugin\n\t\t// directory) will be loaded\n\t\t//\n\t\t$renderer = 'templates/'.$this->getTemplate ().'/'.\n\t\t\t$this->getRenderer ();\n\t\tif (!(file_exists ($renderer)))\n\t\t{\n\t\t\t$renderer = 'framework/view/'.$this->getRenderer ();\n\t\t}\n\t\treturn $renderer;\n\t}", "title": "" }, { "docid": "2265eeaa73eb63244f4b226da4bb3e85", "score": "0.5796547", "text": "public function view_project_template( $template ) {\r\n\r\n global $post;\r\n\r\n if (!isset($this->templates[get_post_meta( \r\n $post->ID, '_wp_page_template', true \r\n )] ) ) {\r\n \r\n return $template;\r\n \r\n } \r\n\r\n $file = plugin_dir_path(__FILE__). get_post_meta( \r\n $post->ID, '_wp_page_template', true \r\n );\r\n \r\n // Just to be safe, we check if the file exist first\r\n if( file_exists( $file ) ) {\r\n return $file;\r\n } \r\n else { echo $file; }\r\n\r\n return $template;\r\n\r\n }", "title": "" }, { "docid": "cf6fbfd281856848851ba30f12ca4487", "score": "0.57933277", "text": "public function getTemplateFile() {\n return dirname(__FILE__) . '/templates/mgr.tpl';\n // return $this->flexibility5->config['templatesPath'] . 'mgr.tpl';\n }", "title": "" }, { "docid": "840abf95106393bb4b379053c10b0655", "score": "0.5784889", "text": "public function getTemplateFile()\n\t{\n\t\tforeach ($this->files as $file) {\n\t\t\tif (is_file($file)) {\n\t\t\t\treturn $file;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "16da8bb7111d2378dd6b4a7e0d924bd0", "score": "0.5784221", "text": "function dynamik_get_custom_template_paths( $template_file_name, $template_type )\r\n{\r\n if( $template_type == 'page_template' )\r\n {\r\n return CHILD_DIR . '/my-templates/' . $template_file_name . '.php';\r\n }\r\n else\r\n {\r\n return CHILD_DIR . '/' . $template_file_name . '.php';\r\n }\r\n}", "title": "" }, { "docid": "86e6510e0e5b3e634de17929166ec4c2", "score": "0.57832617", "text": "public function template_path() {\n\t\treturn apply_filters( 'woocommerce_gzd_template_path', 'woocommerce-germanized-pro/' );\n\t}", "title": "" }, { "docid": "2234271eabdae39a707e7737dc2a98ed", "score": "0.5776297", "text": "public function get_theme_template_dir_name() {\n\t\t/**\n\t\t * Filters the theme template directory name.\n\t\t *\n\t\t * @since 1.0\n\t\t *\n\t\t * @param string $directory Theme template directory name.\n\t\t */\n\t\treturn apply_filters( 'affwp_theme_template_dir_name', 'affiliatewp' );\n\t}", "title": "" }, { "docid": "ccd6bb7a5151139d01d25d21a2d79e52", "score": "0.5775241", "text": "function defaultTemplate(){\r\n $this->addLocations(); // add addon files to pathfinder\r\n return array($this->template_file);\r\n }", "title": "" }, { "docid": "0a03876def296b9af7862a89cefee42e", "score": "0.57728416", "text": "protected function GetTemplate()\n\t{\n\t\tif (isset($this->params['short']) && ($this->params['short'] === true)) {\n\t\t\treturn 'shortlog.tpl';\n\t\t}\n\t\treturn 'log.tpl';\n\t}", "title": "" }, { "docid": "efdba832f94b01483e500adc3222bad0", "score": "0.5762338", "text": "protected function getTemplateFile(): string\n\t{\n\t\treturn __DIR__.'/templates/entity.template';\n\t}", "title": "" }, { "docid": "3bd6e06bf11a0601506d94d6a7276e6b", "score": "0.5759787", "text": "public function getAutoRunTemplatePath($properties = array())\n {\n $path = $this->_autoRunTemplatePath;\n\n if (!empty($properties['runTemplateLocation'])) {\n $path = $properties['runTemplateLocation'];\n }\n\n if (!$path) {\n $this->errors[] = \"No autoRunTemplatePath found\";\n return false;\n }\n\n // Replace variable: #datadir#\n // with actual package datadir\n // this enables predefined templates for e.g. redhat & bsd\n if (false !== strpos($path, '#datadir#')) {\n $dataDir = $this->getDataDir();\n if (false === $dataDir) {\n return false;\n }\n $path = str_replace('#datadir#', $dataDir, $path);\n }\n\n return $path;\n }", "title": "" }, { "docid": "79c12f44c306b8d7731c856d682107fd", "score": "0.5740261", "text": "protected function getTemplate()\r\n {\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH,\r\n $this->templatePath,\r\n $this->templateFile . $this->templateExtention\r\n )\r\n );\r\n }", "title": "" }, { "docid": "9fb89796b99742fab6adc4d21c8c3596", "score": "0.57358575", "text": "public function check_is_file( $template ='' ) {\n\t\t$filename = dirname(dirname(__FILE__)).'/views/'.$template;\n\t\tif(is_file($filename)){\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "80915ccf8ddf650c3df5f81e681f77df", "score": "0.5732652", "text": "public function isIsTemplate()\n {\n return $this->is_template;\n }", "title": "" }, { "docid": "cdbf6d4b66cde5dce21b80409d52e441", "score": "0.5720536", "text": "private function getFileTemplate(): string\n {\n return $this->fileTemplate;\n }", "title": "" }, { "docid": "d9e08e83f710ed2e011da09348fb78c3", "score": "0.5718576", "text": "public function getRelPathNow()\n {\n $uploadDir = wp_upload_dir();\n if (isset($uploadDir['subdir']))\n return ltrim($uploadDir['subdir'], '/'); \n else\n return false;\n }", "title": "" }, { "docid": "8742d2e70779fc90ce3cba9b882ac4a1", "score": "0.5717999", "text": "protected function hasDefaultTemplate() {\n\t\tif (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',5,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\tif ($_SESSION[APPCONFIG]->getValue('appearance','disable_default_template'))\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "d5d939948548fb3e737879fc62330d67", "score": "0.5708712", "text": "private function setTemplateFolderPath(){\n $this->TemplateFolderPath = dirname(__DIR__) . DIRECTORY_SEPARATOR . \"frontend\" . DIRECTORY_SEPARATOR . \"templates\" . DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "4d54dd60f39eed6f75ca810f88b101ef", "score": "0.57035553", "text": "function tpl_override_output_filter( $tpl_output, &$smarty ) {\n\t$templatefile\t=\t$smarty->template_resource;\n\t\n\t// Find the filename of it\n\t$tparts\t\t\t=\texplode( '/', $templatefile );\n\t$templatefile\t=\tarray_pop( $tparts );\n\t\n\t// Check for override directory\n\t$tparts[]\t\t=\t'custom';\n\tarray_unshift( $tparts, 'templates' );\n\t$newpath\t\t=\tROOTDIR . DIRECTORY_SEPARATOR . implode( DIRECTORY_SEPARATOR, $tparts );\n\t\n\t// If no override directory exists send back\n\tif (! is_dir( $newpath ) ) return $tpl_output;\n\t\n\t// Check for a custom file in place\n\t$newfilepath\t=\t$newpath . DIRECTORY_SEPARATOR . $templatefile;\n\tif (! file_exists( $newfilepath ) ) return $tpl_output;\n\t\n\t// Final checks\n\tif (! @is_readable( $newfilepath ) ) return $tpl_output;\n\t\n\t// Grab and go\n\t$tpl_output = $smarty->fetch( 'file:' . $newfilepath );\n\t\n\treturn $tpl_output;\n}", "title": "" }, { "docid": "9cc5a0f2a5ca7e072af836a2cc679fae", "score": "0.57019717", "text": "public function view_project_template( $template ) {\n\n global $post;\n\n if (!isset($this->templates[get_post_meta( \n $post->ID, '_wp_page_template', true \n )] ) ) {\n\n return $template;\n\n } \n\n $file = plugin_dir_path(__FILE__). get_post_meta( \n $post->ID, '_wp_page_template', true \n );\n\n // Just to be safe, we check if the file exist first\n if( file_exists( $file ) ) {\n return $file;\n } \n else { echo $file; }\n\n return $template;\n }", "title": "" }, { "docid": "cef81f3596f9e9c50d531053d45e1044", "score": "0.5694976", "text": "public function view_project_template( $template ) {\n\t\tglobal $post;\n\t\tif (!isset($this->templates[get_post_meta( \n\t\t\t\t\t$post->ID, '_wp_page_template', true \n\t\t\t\t)] ) ) {\n\t\t\t\t\t\n\t\t\treturn $template;\n\t\t\t\t\t\t\n\t\t} \n\t\t$file = plugin_dir_path(__FILE__). get_post_meta( \n\t\t\t\t\t$post->ID, '_wp_page_template', true \n\t\t\t\t);\n\t\t\t\t\n\t\t// Just to be safe, we check if the file exist first\n\t\tif( file_exists( $file ) ) {\n\t\t\treturn $file;\n\t\t} \n\t\telse { echo $file; }\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "589cb1afc1cd7ad9da66b18a3ae01324", "score": "0.56737643", "text": "protected function checkFileSystemTemplatingConfigured() {\n\t\tif (trim($this->template_dir_orig) == '') {\n\t\t\tthrow new \\Exception('Templates directory is not set');\n\t\t}\n\t\tif (!is_dir($this->template_dir_orig)) {\n\t\t\tthrow new \\Exception(sprintf('Templates directory %s not found',$this->template_dir_orig));\n\t\t}\n\t\t// compile dir is not needed\n\t\tif ($this->caching) {\n\t\t\t// if cache is On the cache path must be present\n\t\t\tif (!is_dir($this->cache_dir)) {\n\t\t\t\tthrow new \\Exception(sprintf('Templates cache directory %s not found',$this->cache_dir));\n\t\t\t}\n\t\t\tif (!is_writable($this->cache_dir)) {\n\t\t\t\tthrow new \\Exception(sprintf('Templates cache directory %s is not writable',$this->cache_dir));\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f9d3d6d2f320882e9dd3380eba82be49", "score": "0.5668961", "text": "protected function getTsTemplatePathAndFilename()\n {\n if ($this->settings['listConfig'][$this->listIdentifier]['controller'][$this->request->getControllerName()][$this->request->getControllerActionName()]['template']) {\n return $this->settings['listConfig'][$this->listIdentifier]['controller'][$this->request->getControllerName()][$this->request->getControllerActionName()]['template'];\n }\n return $this->settings['controller'][$this->request->getControllerName()][$this->request->getControllerActionName()]['template'];\n }", "title": "" }, { "docid": "23f742f8fd11776b662916a396b42aeb", "score": "0.5666332", "text": "function theme_directory($filepath=false)\n {\n global $options;\n return ($filepath) ? THEMES_PATH.DS.$options->theme : BASE_URL.'/themes/'.$options->theme;\n }", "title": "" }, { "docid": "3ef1ecc6e8c05429d73ac0490680948e", "score": "0.5633013", "text": "public function custom_template_directory( $directory, $template ) {\n\t\tif ( false !== strpos( $template, 'address-update' ) ) { //Will pass if address-update is in the template path\n\t\t\treturn 'address-update-email';\n\t\t}\n\t\n\t return $directory;\n\t}", "title": "" }, { "docid": "9d25d4bddc663d88460bfe171996eedc", "score": "0.562697", "text": "protected function getViewDirectory() {\n return $this->viewDirectory;\n }", "title": "" }, { "docid": "009e95bc8face6b0c33d79a06dedfc3b", "score": "0.5626311", "text": "public function isDirectory(): bool\n {\n return $this->type === static::DIRECTORY;\n }", "title": "" }, { "docid": "5e404d7fd48d1355d5cb2860b9f07109", "score": "0.5621984", "text": "public function select_default_folder( ){\n\t\t\n\t\tglobal $elearning;\n\t\treturn $elearning->plugin_path().$this->path_template;\n\t\t\n\t\t}", "title": "" }, { "docid": "221593fe3dc7cf25e4d0132b5be7a80c", "score": "0.56180125", "text": "function alsp_isFrontPart($template) {\n\t$custom_template = str_replace('.tpl.php', '', $template) . '-custom.tpl.php';\n\t$templates = array(\n\t\t\t$custom_template,\n\t\t\t$template\n\t);\n\n\tforeach ($templates AS $template_to_check) {\n\t\t// check if it is exact path in $template\n\t\tif (is_file($template_to_check)) {\n\t\t\treturn $template_to_check;\n\t\t} elseif (is_file(get_stylesheet_directory() . '/alsp-listing/templates/' . $template_to_check)) { // theme or child theme templates folder\n\t\t\treturn get_stylesheet_directory() . '/alsp-listing/templates/' . $template_to_check;\n\t\t} elseif (is_file(ALSP_TEMPLATES_PATH . $template_to_check)) { // native plugin's templates folder\n\t\t\treturn ALSP_TEMPLATES_PATH . $template_to_check;\n\t\t}\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "55116904c4698a1869ce1f9862677fff", "score": "0.5611766", "text": "protected function getTemplate()\n {\n return 'template';\n }", "title": "" }, { "docid": "98d0510bd89dd6c2a1df4c26010b6ebc", "score": "0.5602479", "text": "public function getTemplatePathname() : string {\n\t\treturn $this->templateBasePath . '/dropdown-split-link.mustache';\n\t}", "title": "" }, { "docid": "fef7a38c07edfde2c7a21ec0fee3a301", "score": "0.55982536", "text": "public function setTemplateDir($path);", "title": "" }, { "docid": "05d1b39c7d30d4a88c7784e26b00973e", "score": "0.55929196", "text": "public function view_project_template( $template ) {\n\n global $post;\n\n if (!isset($this->templates[get_post_meta( \n\t\t\t\t\t$post->ID, '_wp_page_template', true \n\t\t\t\t)] ) ) {\n\t\t\t\t\t\n return $template;\n\t\t\t\t\t\t\n } \n\n $file = plugin_dir_path(__FILE__). get_post_meta( \n\t\t\t\t\t$post->ID, '_wp_page_template', true \n\t\t\t\t);\n\t\t\t\t\n // Just to be safe, we check if the file exist first\n if( file_exists( $file ) ) {\n return $file;\n } \n\t\t\t\telse { echo $file; }\n\n return $template;\n\n }", "title": "" }, { "docid": "59b789e006061dba933166eea8420ade", "score": "0.55915195", "text": "public function get_base_template_file() {\n\t\t// Print the lookup folders as relative paths.\n\t\t$this->set(\n\t\t\t'lookup_folders',\n\t\t\tarray_map(\n\t\t\t\tstatic function ( array $folder ) {\n\t\t\t\t\t$folder['path'] = str_replace( WP_CONTENT_DIR, '', $folder['path'] );\n\t\t\t\t\t$folder['path'] = str_replace( WP_PLUGIN_DIR, '/plugins', $folder['path'] );\n\t\t\t\t\treturn $folder;\n\t\t\t\t},\n\t\t\t\t$this->get_template_path_list()\n\t\t\t),\n\t\t\tfalse\n\t\t);\n\n\t\tif ( $this->view instanceof View_Interface ) {\n\t\t\t$this->set( 'view_slug', $this->view->get_slug(), false );\n\t\t\t$this->set( 'view_label', $this->view->get_label(), false );\n\t\t\t$this->set( 'view_class', get_class( $this->view ), false );\n\t\t}\n\n\t\treturn parent::get_template_file( 'base' );\n\t}", "title": "" }, { "docid": "0cc28a05c2c10535b5664999fc19409b", "score": "0.55744195", "text": "protected function GetTemplate()\n\t{\n\t\tif ($this->params['searchtype'] == GitPHP_Controller_Search::FileSearch) {\n\t\t\treturn 'searchfiles.tpl';\n\t\t}\n\t\treturn 'search.tpl';\n\t}", "title": "" }, { "docid": "4114c0f68a57e0faa9568641bfc9ab8d", "score": "0.5573098", "text": "protected function getTemplate()\n {\n\n // get requested controller and action\n $controllerName = strtolower( $this->params( 'controller' ) );\n $actionName = $this->params( 'action' );\n\n // Get the template path stack from the service manager\n $resolver = $this->getEvent()->getApplication()->getServiceManager()->get( 'Zend\\View\\Resolver\\TemplatePathStack' );\n\n if ( FALSE === $resolver->resolve( '/zf2-static-pages/pages/'.$actionName) ) {\n return FALSE;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "029545270400150dd1f9035021b4ddc2", "score": "0.55713546", "text": "public function isTmpFile()\n {\n return Str::contains($this->getPath(), rtrim(sys_get_temp_dir(), '/'));\n }", "title": "" }, { "docid": "e85064c35b1163bd4990a8e176f050b5", "score": "0.55550396", "text": "public final function getViewDir()\r\n\t{\r\n\t\treturn $this->fromBaseDir($this->getConfig()->getValue('path.view', self::DEFAULT_VIEW_DIR));\r\n\t}", "title": "" }, { "docid": "106132e2a07cfc8504d8912f0d9c9335", "score": "0.55544853", "text": "protected function GetTemplate()\n\t{\n\t\tif (isset($this->params['js']) && $this->params['js']) {\n\t\t\treturn 'treelist.tpl';\n\t\t}\n\t\treturn 'tree.tpl';\n\t}", "title": "" }, { "docid": "1a5439e69009a19c0fe8405425983360", "score": "0.55512494", "text": "function theme_path(string $path = ''): string|false\n {\n return realpath(theme_system()->getThemesDirectory() . DIRECTORY_SEPARATOR . $path);\n }", "title": "" } ]
e8581a684bd2092fdaa1ed65489b132a
Set the margin which will be interpretated differently depending on the context.
[ { "docid": "4000edf883b9284f024898ed6ccc0094", "score": "0.6872388", "text": "function SetMargin($aMarg)\n {\n $this->margin = $aMarg;\n }", "title": "" } ]
[ { "docid": "8164cb53e3852ecaca02815355d06926", "score": "0.7024921", "text": "public function margin($value) {\n return $this->setProperty('margin', $value);\n }", "title": "" }, { "docid": "8164cb53e3852ecaca02815355d06926", "score": "0.7024921", "text": "public function margin($value) {\n return $this->setProperty('margin', $value);\n }", "title": "" }, { "docid": "89d19dec0322b51ef6e539f70cf5ae0c", "score": "0.6983388", "text": "public function testSetPageMargins()\n {\n $this->pdfKiwi->setPageMargins('10mm', '5mm', '20mm', '8mm');\n $this->assertEquals($this->fields->getValue($this->pdfKiwi), [\n 'email' => '[email protected]',\n 'token' => 'ca4e46cf6f31155e25dd1168ecbc38f9',\n 'options' => [\n 'margin_top' => '10mm',\n 'margin_right' => '5mm',\n 'margin_bottom' => '20mm',\n 'margin_left' => '8mm'\n ]\n ]);\n }", "title": "" }, { "docid": "955e24f8168da16a4d30a3369f2435cd", "score": "0.6822165", "text": "function setAllMargins($value) {\n $this->fields['margin_top'] = $value;\n $this->fields['margin_right'] = $value;\n $this->fields['margin_bottom'] = $value;\n $this->fields['margin_left'] = $value;\n }", "title": "" }, { "docid": "e4e0e49640c88ed4daf35c879ae3ce4b", "score": "0.6810015", "text": "public function marginProvider()\n {\n return [[new \\Urbania\\AppleNews\\Format\\Margin()], [1]];\n }", "title": "" }, { "docid": "0f70b99fce539424c71545121dd5537b", "score": "0.6794531", "text": "public function setMargins($margin)\n {\n $this->cmd->marginTop\n = $this->cmd->marginBottom\n = $this->cmd->marginLeft\n = $this->cmd->marginRight\n = $margin;\n\n return $this;\n }", "title": "" }, { "docid": "234afb6cd6ae48f27684d3b6083ab983", "score": "0.6708752", "text": "public function margin($margin = null)\n {\n if (!isset($this->margin)) {\n $this->margin = new Setting\\Margin();\n }\n\n if (null !== $margin) {\n $this->margin->setValues($margin);\n }\n\n return $this->margin;\n }", "title": "" }, { "docid": "7fcffdd82e2cfe8fa1950602f6856ba3", "score": "0.6580607", "text": "function setHorizontalMargin($value) {\n $this->fields['margin_right'] = $this->fields['margin_left'] = $value;\n }", "title": "" }, { "docid": "fa71d346e0d1e63b361c0f7624397b1e", "score": "0.65334845", "text": "public function margin($margin = null)\n {\n if (!isset($this->margin)) {\n $this->margin = new Margin();\n }\n\n if (null !== $margin) {\n $this->margin->setValues($margin);\n }\n\n return $this->margin;\n }", "title": "" }, { "docid": "365df5c3aef705eeaf9ba4aab35346ea", "score": "0.650449", "text": "public function getMargin()\n {\n return $this->margin;\n }", "title": "" }, { "docid": "ae9b3701814a0fd881376a8c9ee42be6", "score": "0.64643824", "text": "function woodmart_override_section_margin_control( $control_stack ) {\n\t\t$control = Plugin::instance()->controls_manager->get_control_from_stack( $control_stack->get_unique_name(), 'margin' );\n\n\t\t$control['allowed_dimensions'] = [ 'top', 'right', 'bottom', 'left' ];\n\t\t$control['placeholder'] = [\n\t\t\t'top' => '',\n\t\t\t'right' => '',\n\t\t\t'bottom' => '',\n\t\t\t'left' => '',\n\t\t];\n\t\t$control['selectors'] = [\n\t\t\t'{{WRAPPER}}' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t];\n\n\t\t$control_stack->update_responsive_control( 'margin', $control );\n\t}", "title": "" }, { "docid": "26aa26286e7f5e32501c6eb42573197c", "score": "0.6441083", "text": "public function margin(int $margin)\n {\n if ($margin > 0) {\n $this->constraints['margin'] = $margin;\n }\n\n return $this;\n }", "title": "" }, { "docid": "c81151f23b8235ed03b890fd2abe022a", "score": "0.63018847", "text": "public static function margin( $value ) {\n\t\treturn self::padding_margin( $value, 'margin' );\n\t}", "title": "" }, { "docid": "12a3bfc6a811bb7d428e1f09d964c918", "score": "0.6203851", "text": "function setPageMargins($top, $right, $bottom, $left) {\n $this->fields['margin_top'] = $top;\n $this->fields['margin_right'] = $right;\n $this->fields['margin_bottom'] = $bottom;\n $this->fields['margin_left'] = $left;\n }", "title": "" }, { "docid": "5c75f3762f08dbbbc45ec0432723c88f", "score": "0.6074591", "text": "function SetMargins($left, $top, $right=null)\n{\n\t$this->lMargin = $left;\n\t$this->tMargin = $top;\n\tif($right===null)\n\t\t$right = $left;\n\t$this->rMargin = $right;\n}", "title": "" }, { "docid": "4c5ca1e5d672adbbec0d3596fe7bcdab", "score": "0.6041295", "text": "function setVerticalMargin($value) {\n $this->fields['margin_top'] = $this->fields['margin_bottom'] = $value;\n }", "title": "" }, { "docid": "c0f289a85caee301080b344cee53cfe6", "score": "0.59920883", "text": "protected function tbMarkMarginX()\n {\n\n\n if (isset($this->aTableType['TB_ALIGN'])) {\n $tb_align = $this->aTableType['TB_ALIGN'];\n } else {\n $tb_align = '';\n }\n\n //set the table align\n switch ($tb_align) {\n case 'C':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth()) / 2;\n break;\n case 'R':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth());\n break;\n default:\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'];\n break;\n }//\n\n }", "title": "" }, { "docid": "a61c4d033628f2c5e26bd9534f80a8cb", "score": "0.5934321", "text": "private function set_margin($result){\n if(sizeof($result)==4){\n return 'remove_margin_top';\n }\n else return '';\n }", "title": "" }, { "docid": "e2a4365cc07f6b8a57f85d245e4d2733", "score": "0.58862275", "text": "function SetMarginColor($aColor)\n {\n $this->margin_color = $aColor;\n }", "title": "" }, { "docid": "530d71f91a688e7b9bd01e756d07c825", "score": "0.58344024", "text": "function SetMargin($lm, $rm, $tm, $bm)\n {\n $this->img->SetMargin($lm, $rm, $tm, $bm);\n }", "title": "" }, { "docid": "22489950216d9c74e6c41948cfb65e95", "score": "0.5831391", "text": "public function getMarginToSwitch()\n {\n return $this->marginToSwitch;\n }", "title": "" }, { "docid": "c5daeb077853cad69f726c8f4e425977", "score": "0.5807944", "text": "public function setObjectMargin($cells) {\n $this->objectMargin = $cells;\n }", "title": "" }, { "docid": "fe09211a1a8e3041f2e461e476cbff5b", "score": "0.576466", "text": "protected function canvasSpacingX()\n {\n $this->canvas['spacing']['x'] = 0;\n\n if ($this->intermediate['width'] < $this->canvas['width']) {\n $difference = $this->canvas['width'] - $this->intermediate['width'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['x'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['x'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['x'] = 1;\n }\n }\n }\n }", "title": "" }, { "docid": "1df4e0e3e27ef70673315fd4dbf4224d", "score": "0.57373726", "text": "public function setMargin(Margin $margin): Component\n {\n $this->getSizing()->setMargin($margin);\n return $this;\n }", "title": "" }, { "docid": "b8216bab564c7abe3705ab12dd6aa12d", "score": "0.57351035", "text": "public static function getMarginTestSets()\n {\n return array(\n 'margin full' => array(\n // style\n new ezcDocumentPcssStyleMeasureBoxValue(\n array(\n 'top' => 1,\n 'left' => 2,\n 'bottom' => 3,\n 'right' => 4\n )\n ),\n // expected attributes\n array(\n // NS, attribute name, value\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-top', '1mm' ),\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-left', '2mm' ),\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-bottom', '3mm' ),\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-right', '4mm' ),\n )\n ),\n 'margin missings' => array(\n // style\n new ezcDocumentPcssStyleMeasureBoxValue(\n array(\n 'top' => 1,\n 'right' => 4\n )\n ),\n // expected attributes\n array(\n // NS, attribute name, value\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-top', '1mm' ),\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-right', '4mm' ),\n )\n ),\n 'margin empty' => array(\n // style\n new ezcDocumentPcssStyleMeasureBoxValue(\n array(\n 'top' => 1,\n 'left' => 0,\n 'bottom' => 3,\n 'right' => null\n )\n ),\n // expected attributes\n array(\n // NS, attribute name, value\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-top', '1mm' ),\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-left', '0mm' ),\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-bottom', '3mm' ),\n array( ezcDocumentOdt::NS_ODT_FO, 'margin-right', '0mm' ),\n )\n ),\n );\n }", "title": "" }, { "docid": "3f85e2981b24589ae98163571bfaddaf", "score": "0.5596266", "text": "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "title": "" }, { "docid": "61547a2c070fc15c05b40c171722d9bf", "score": "0.55938184", "text": "public function setMarginTop(?int $marginTop) : self\n {\n $this->initialized['marginTop'] = true;\n $this->marginTop = $marginTop;\n return $this;\n }", "title": "" }, { "docid": "435b2d40b91c5e39e6f052861ee126e4", "score": "0.5568439", "text": "function SetTitleMargin($aMargin) {\n $this->title_margin=$aMargin;\n }", "title": "" }, { "docid": "c979bcaff91bc1fb3373d1507f80ebc6", "score": "0.55274886", "text": "public function setMarginLeft(?int $marginLeft) : self\n {\n $this->initialized['marginLeft'] = true;\n $this->marginLeft = $marginLeft;\n return $this;\n }", "title": "" }, { "docid": "a101b91284036ed00c2030c81310c05b", "score": "0.5497393", "text": "function SetTitleMargin($aMargin)\n {\n $this->title_margin = $aMargin;\n }", "title": "" }, { "docid": "6109457cbdcc781793687d3cdac05c68", "score": "0.54931974", "text": "public function testPropertyMargin($value)\n {\n $object = new ConditionalComponentLayout();\n $object->setMargin($value);\n\n $this->assertEquals($value, $object->getMargin());\n }", "title": "" }, { "docid": "32a9348c587146339256a9a326e53db8", "score": "0.54748446", "text": "public function setMargins( $left, $right = '', $top = '', $bottom = '' )\n {\n if ( $left < 0 )\n {\n $this->currentMarginLeft = $this->paperWidth + $left;\n }\n else\n {\n $this->currentMarginLeft = $left;\n }\n\n if ( $right !== '' )\n {\n if ( $right < 0 )\n {\n $this->currentMarginRight = $this->paperWidth + $right;\n }\n else\n {\n $this->currentMarginRight = $right;\n }\n }\n\n if ( $top !== '' )\n {\n if ( $top < 0 )\n {\n $this->currentMarginTop = $this->paperHeight + $top;\n }\n else\n {\n $this->currentMarginTop = $top;\n }\n }\n\n if ( $bottom !== '' )\n {\n if ( $bottom < 0 )\n {\n $this->currentMarginBottom = $this->paperHeight + $bottom;\n }\n else\n {\n $this->currentMarginBottom = $bottom;\n }\n }\n }", "title": "" }, { "docid": "d32de998c00c059c66b48e14a34f8695", "score": "0.54400986", "text": "public function setMarginToSwitch($marginToSwitch)\n {\n if ($marginToSwitch < 0) {\n throw new InvalidArgumentException('Margin to switch must not be negative');\n }\n\n $this->marginToSwitch = $marginToSwitch;\n }", "title": "" }, { "docid": "94b556dac76d29d68ada10dc4bdae2c7", "score": "0.5416038", "text": "public function getObjectMargin() {\n return $this->objectMargin;\n }", "title": "" }, { "docid": "fbf8b9818c0f611c725fa460d5d8a9fa", "score": "0.53944707", "text": "private function imageMargins($margin, $padding, $fontSize){\r\n\r\n $distance = 0;\r\n\r\n //let us look at the margin\r\n if($margin != 0){\r\n $temp = $this->_wordMLUnits($margin, $fontSize);\r\n $distance += (int) round($temp[0]);\r\n }\r\n\r\n //let us look at the padding\r\n if($padding != 0){\r\n $temp = $this->_wordMLUnits($padding, $fontSize);\r\n $distance += (int) round($temp[0]);\r\n }\r\n\r\n return (int) round($distance * 635 * 0.75);//we are multypling by the scaling factor between twips and emus. The factor of 0.75 is ours to keep the extra scaling ratio we use on images\r\n }", "title": "" }, { "docid": "6cef75a4b79b0d0df5b95126ef495604", "score": "0.53943574", "text": "public function GetMargin()\n {\n\t //Calcul la marge\n\t $retour = 0;\n \t\t$retour = ($this->getPrice() * $this->getqty_ordered()) - ($this->getData(mage::helper('purchase/MagentoVersionCompatibility')->getSalesOrderItemCostColumnName()) * $this->getqty_ordered());\n \t\t\n \treturn $retour;\n }", "title": "" }, { "docid": "65a68f1abd9f09f7f09c469cb838f549", "score": "0.53509855", "text": "public function setNetMarginAttribute($value) {\n $parts = explode('%', $value);\n if (is_numeric($parts[0]) && $parts[1] === '') {\n $this->attributes['net_margin'] = ($this->fromFloat($parts[0]) / 100);\n }\n }", "title": "" }, { "docid": "228d86d51c81c5d87433890359096a2c", "score": "0.52297693", "text": "function SetTickLabelMargin($aMargin)\n {\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25056);//('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.');\n $this->tick_label_margin = $aMargin;\n }", "title": "" }, { "docid": "7010b31effc85e8470f54b4a20a0de2f", "score": "0.52215546", "text": "public function setSpacingBefore(float $spacing) {\n $this->spacingBefore = $spacing;\n }", "title": "" }, { "docid": "d385b2698dbfbb60b8197110316b9725", "score": "0.52113986", "text": "public function setMargin(\n int $top,\n int $right,\n int $bottom,\n int $left\n ): void {\n $this->margin = [$top, $right, $bottom, $left];\n }", "title": "" }, { "docid": "0282f97e4230267ebd377fe3aab35eb4", "score": "0.5206001", "text": "public function getMargins(?string $segment = null)\n {\n if (! $segment) {\n return $this->get(\"user.margins\");\n }\n\n return $this->get(\"user.margins.segment\", [\"segment\" => $segment]);\n }", "title": "" }, { "docid": "c82fb26957197a012f26a26b9f49cdd2", "score": "0.51756084", "text": "function _sr_margin_chart(){\r\r\n\t$date_min = strtotime( wwex_report_charts_start_date() );\r\r\n\t$date_max = time();\r\r\n\t\r\r\n\t$results = _sr_query_margin_results(array($date_min, $date_max));\r\r\n\t\r\r\n\t$formated_results = _sr_margin_format_results( $results );\r\r\n\treturn $formated_results;\r\r\n}", "title": "" }, { "docid": "c5e04acc55675e45bbe0b3161936c988", "score": "0.51397383", "text": "function test_margin_modification($exchange, $marginModification) {\n $format = array(\n info => array(),\n type => 'add',\n amount => 0.1,\n total => 0.29934828,\n code => 'USDT',\n symbol => 'ADA/USDT:USDT',\n status => 'ok',\n );\n $keys = is_array($format) ? array_keys($format) : array();\n for ($i = 0; $i < count($keys); $i++) {\n assert (is_array($marginModification) && array_key_exists($keys[$i], $marginModification));\n }\n assert (gettype($marginModification['info']) === 'array');\n if ($marginModification['type'] !== null) {\n assert ($marginModification['type'] === 'add' || $marginModification['type'] === 'reduce' || $marginModification['type'] === 'set');\n }\n if ($marginModification['amount'] !== null) {\n assert ((is_float($marginModification['amount']) || is_int($marginModification['amount'])));\n }\n if ($marginModification['total'] !== null) {\n assert ((is_float($marginModification['total']) || is_int($marginModification['total'])));\n }\n if ($marginModification['code'] !== null) {\n assert (gettype($marginModification['code']) === 'string');\n }\n if ($marginModification['symbol'] !== null) {\n assert (gettype($marginModification['symbol']) === 'string');\n }\n if ($marginModification['status'] !== null) {\n assert ($exchange->in_array($marginModification['status'], array( 'ok', 'pending', 'canceled', 'failed' )));\n }\n}", "title": "" }, { "docid": "e58d650f5ec0c548b744a1780e708aba", "score": "0.5136131", "text": "function dokanee_additional_spacing() {\n\t\t// No longer needed\n\t}", "title": "" }, { "docid": "1173da9c1629908796a37e3c039a7062", "score": "0.5117801", "text": "public function testGettingLeftAndRightMarginsUsingIntegerArgsShouldSuccess()\n {\n $s = new S('something');\n $this->assertEquals(' something ', $s->margin(5, 5));\n $this->assertEquals(' something ', $s->margin(5, 10));\n }", "title": "" }, { "docid": "dd1b48e26d33ed3b04242759bda74626", "score": "0.51069045", "text": "public function testSetHeaderSpacing()\n {\n $this->pdfKiwi->setHeaderSpacing('NAN');\n $this->assertEquals($this->fields->getValue($this->pdfKiwi), [\n 'email' => '[email protected]',\n 'token' => 'ca4e46cf6f31155e25dd1168ecbc38f9',\n 'options' => []\n ]);\n\n // - If it's a number (float or not), the option is set\n $this->pdfKiwi->setHeaderSpacing(2.5);\n $this->assertEquals($this->fields->getValue($this->pdfKiwi), [\n 'email' => '[email protected]',\n 'token' => 'ca4e46cf6f31155e25dd1168ecbc38f9',\n 'options' => [\n 'header_spacing' => 2.5\n ]\n ]);\n }", "title": "" }, { "docid": "cacd305eec5259207fdf8b18554085ae", "score": "0.50361615", "text": "function defaultProfitMargin_HH()\n {\n return 25;\n }", "title": "" }, { "docid": "89b26f80117b2cfe3084b08b586e793b", "score": "0.50217324", "text": "public function setMarginBottom(?int $marginBottom) : self\n {\n $this->initialized['marginBottom'] = true;\n $this->marginBottom = $marginBottom;\n return $this;\n }", "title": "" }, { "docid": "13e074a46d4e19e74d333d2f0cdf3c8b", "score": "0.50215155", "text": "public function testCellMargin()\n {\n $object = new Table();\n $parts = array('Top', 'Left', 'Right', 'Bottom');\n\n $value = 240;\n $object->setCellMargin($value);\n foreach ($parts as $part) {\n $get = \"getCellMargin{$part}\";\n $values[] = $value;\n $this->assertEquals($value, $object->$get());\n }\n $this->assertEquals($values, $object->getCellMargin());\n $this->assertTrue($object->hasMargin());\n }", "title": "" }, { "docid": "eb990392bcbba17cd26f21f30103953e", "score": "0.50158346", "text": "public function setSpaceBetween($space = 0)\n {\n if(is_numeric($space) && $space >= 0)\n {\n $this->setOption('spaceBetween', $space);\n }\n }", "title": "" }, { "docid": "e8098c92ede491c999f60ccf1d8d1ea3", "score": "0.4987077", "text": "public function SetTitleMargin($aMargin)\n\t{\n\t\t$this->title_margin = $aMargin;\n\t}", "title": "" }, { "docid": "ca8bb935a845153f11d085c60f5d7013", "score": "0.49601886", "text": "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "title": "" }, { "docid": "a4f249c3a358a88b2b05da4222b0ae5a", "score": "0.49464494", "text": "function setXCbox($imgs = array(),$margin = array()){\n\t\t\n\t\tif(isset($imgs['c']) && isset($imgs['o'])){\n\t\t\t$this->boxC = $imgs['c'];\n\t\t\t$this->boxO = $imgs['o'];\n\t\t}\n\t\tif(isset($margin['l']) && isset($margin['r'])){\n\t\t\t$this->boxImgMarginL = $margin['l'];\n\t\t\t$this->boxImgMarginR = $margin['r'];\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0d2921a0d8621fab6e724f99fbb54aeb", "score": "0.49201274", "text": "public function testPropertyIgnoreDocumentMargin($value)\n {\n $object = new ConditionalComponentLayout();\n $object->setIgnoreDocumentMargin($value);\n\n $this->assertEquals($value, $object->getIgnoreDocumentMargin());\n }", "title": "" }, { "docid": "59eb69099e07c29378b4ba70c9ac6682", "score": "0.48948202", "text": "function set_style_context($dtree){\n global $default_dom;\n $default_dom=$dtree;\n $default_dom->move_root();\n}", "title": "" }, { "docid": "f9331161f8033c5df47bd20199651c90", "score": "0.4812921", "text": "private function create_image_margin($imagemargin)\n\t{\n\t\t$pat = \"/.*\\\"bottom\\\".*?\\\"(\\d*)\\\".*\\\"left\\\".*?\\\"(\\d*)\\\".*\\\"right\\\".*?\\\"(\\d*)\\\".*\\\"top\\\".*?\\\"(\\d*)\\\".*\\\"unit\\\".*?\\\"([^\\\"]*)/\";\n\t\tpreg_match($pat, $imagemargin, $match);\n\n\t\t$margin = [];\n\t\t$margin['top'] = (!empty($match[4]) ? $match[4].\"\".$match[5] : \"0\");\n\t\t$margin['right'] = (!empty($match[3]) ? $match[3].\"\".$match[5] : \"0\");\n\t\t$margin['bottom'] = (!empty($match[1]) ? $match[1].\"\".$match[5] : \"0\");\n\t\t$margin['left'] = (!empty($match[2]) ? $match[2].\"\".$match[5] : \"0\");\n\n\t\treturn $margin;\n\t}", "title": "" }, { "docid": "ff3a7727ac5f064a06d01e39dc7e51af", "score": "0.48113137", "text": "function set_containing_block($x = null, $y = null, $w = null, $h = null)\n {\n parent::set_containing_block($x, $y, $w, $h);\n //$w = $this->get_containing_block(\"w\");\n if (isset($h)) {\n $this->_bottom_page_margin = $h;\n } // - $this->_frame->get_style()->length_in_pt($this->_frame->get_style()->margin_bottom, $w);\n }", "title": "" }, { "docid": "025623373d600cc9b789a81af0e204b8", "score": "0.47732145", "text": "function changeMargin($baseFactorAmount = 0, $factor_type, $factor_mop, $targetTotalAmount = '')\n {\n if ($baseFactorAmount !== 0 && !empty($baseFactorAmount) && $baseFactorAmount !== null && $baseFactorAmount !== '') {\n if ($factor_type == '#') {\n return intval($factor_mop . $baseFactorAmount);\n } elseif ($factor_type == '%') {\n $calculated_value = ($factor_mop . (($baseFactorAmount / 100) * $targetTotalAmount));\n return $calculated_value;\n }\n } else {\n return;\n }\n }", "title": "" }, { "docid": "fa14169af95060dc0d2bd35a624a5806", "score": "0.47707924", "text": "private function OldMarginRateInitialSet(&$symbol, $obj)\n {\n $symbol->MarginLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY];\n $symbol->MarginShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL];\n\n $marginLimitLong = 0; \n $marginStopLong = 0; \n $marginStopLimitLong = 0; \n\n $marginLimitShort = 0; \n $marginStopShort = 0; \n $marginStopLimitShort = 0; \n\n if($symbol->MarginLong!=0)\n {\n $marginLimitLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY_LIMIT] / $symbol->MarginLong;\n $marginStopLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP] / $symbol->MarginLong;\n $marginStopLimitLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP_LIMIT] / $symbol->MarginLong;\n }\n\n if($symbol->MarginShort!=0)\n {\n $marginLimitShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL_LIMIT] / $symbol->MarginShort;\n $marginStopShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP] / $symbol->MarginShort;\n $marginStopLimitShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP_LIMIT] / $symbol->MarginShort;\n }\n\n $symbol->MarginLimit = max($marginLimitLong, $marginLimitShort);\n $symbol->MarginStop = max($marginStopLong, $marginStopShort);\n $symbol->MarginStopLimit = max($marginStopLimitLong, $marginStopLimitShort);\n }", "title": "" }, { "docid": "edf3671a675e7a29f39642b0a859a6cc", "score": "0.47647738", "text": "public function setMarginRight(?int $marginRight) : self\n {\n $this->initialized['marginRight'] = true;\n $this->marginRight = $marginRight;\n return $this;\n }", "title": "" }, { "docid": "881eed9622a27e98d4f07ca7be65826f", "score": "0.47600186", "text": "public function setIndent($v) { $this->_indent = (int)$v; }", "title": "" }, { "docid": "aa19adcb42a3418ffc1d874dc641b899", "score": "0.4741776", "text": "public function spacingBefore() {\n return $this->spacingBefore;\n }", "title": "" }, { "docid": "a4b3635c5a9b55ee89631e5c70ee8cb6", "score": "0.47384408", "text": "public function ignoreDocumentMarginProvider()\n {\n return [[\"none\"], [\"left\"], [\"right\"], [\"both\"], [true], [false]];\n }", "title": "" }, { "docid": "ac7ba19a283dad40d1b5a109cf518d87", "score": "0.47209626", "text": "function SetAligns($a) \r\n{\r\n $this->aligns=$a; \r\n}", "title": "" }, { "docid": "a476faf825ae339048f3716297316bbe", "score": "0.470305", "text": "public function testSetFooterSpacing()\n {\n $this->pdfKiwi->setFooterSpacing('NAN');\n $this->assertEquals($this->fields->getValue($this->pdfKiwi), [\n 'email' => '[email protected]',\n 'token' => 'ca4e46cf6f31155e25dd1168ecbc38f9',\n 'options' => []\n ]);\n\n // - If it's a number (float or not), the option is set\n $this->pdfKiwi->setFooterSpacing(2.5);\n $this->assertEquals($this->fields->getValue($this->pdfKiwi), [\n 'email' => '[email protected]',\n 'token' => 'ca4e46cf6f31155e25dd1168ecbc38f9',\n 'options' => [\n 'footer_spacing' => 2.5\n ]\n ]);\n }", "title": "" }, { "docid": "93efd28e724ec970f2fc0e0bc716f1bc", "score": "0.46934217", "text": "public function getMarginLeft() : ?int\n {\n return $this->marginLeft;\n }", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.46830428", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.46830428", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.46830428", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.46830428", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c499b03aa3eddd96426f03daaec39bf3", "score": "0.46813554", "text": "function SetAligns($a)\r\n{\r\n $this->aligns=$a;\r\n}", "title": "" }, { "docid": "c499b03aa3eddd96426f03daaec39bf3", "score": "0.46813554", "text": "function SetAligns($a)\r\n{\r\n $this->aligns=$a;\r\n}", "title": "" }, { "docid": "dd3feda6d0501fc5bbaf352a11142543", "score": "0.4673793", "text": "private function OldMarginRateInitialSet(&$symbol, $obj)\n {\n $symbol->MarginLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY];\n $symbol->MarginShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL];\n\n $marginLimitLong = 0;\n $marginStopLong = 0;\n $marginStopLimitLong = 0;\n\n $marginLimitShort = 0;\n $marginStopShort = 0;\n $marginStopLimitShort = 0;\n\n if ($symbol->MarginLong != 0) {\n $marginLimitLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY_LIMIT] / $symbol->MarginLong;\n $marginStopLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP] / $symbol->MarginLong;\n $marginStopLimitLong = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP_LIMIT] / $symbol->MarginLong;\n }\n\n if ($symbol->MarginShort != 0) {\n $marginLimitShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL_LIMIT] / $symbol->MarginShort;\n $marginStopShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP] / $symbol->MarginShort;\n $marginStopLimitShort = $symbol->MarginRateInitial[MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP_LIMIT] / $symbol->MarginShort;\n }\n\n $symbol->MarginLimit = max($marginLimitLong, $marginLimitShort);\n $symbol->MarginStop = max($marginStopLong, $marginStopShort);\n $symbol->MarginStopLimit = max($marginStopLimitLong, $marginStopLimitShort);\n }", "title": "" }, { "docid": "ece728e4ade4823ddbe9572e2d9dee48", "score": "0.4667685", "text": "function set_unit_spacing( $on = true ) {\n\t\t$this->settings['unitSpacing'] = $on;\n\t}", "title": "" }, { "docid": "d483eda932f47d404326bc8d00968ab6", "score": "0.46641183", "text": "public function spacerSetting()\n {\n ?>\n <div class=\"isc-main-title\">\n <h3>Spacer Setting</h3>\n </div>\n <div class=\"isc-main-content\">\n <form class=\"isc-form\" action=\"\" method=\"post\">\n <table class=\"form-table\">\n <tbody>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"isc-input-height\"><?php _e( 'Spacer height in pixels' ); ?></label>\n </th>\n <td>\n <input type=\"text\" id=\"isc-input-height\" name=\"isc_height\" value=\"\" />\n </td>\n </tr>\n </tbody>\n </table>\n <?php \n $this->buttonInsert( 'spacer' );\n ?>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "a6153d5422e1371046b6eccec648dd82", "score": "0.4643035", "text": "function Set90AndMargin($lm = 0, $rm = 0, $tm = 0, $bm = 0)\n {\n $lm = $lm == 0 ? floor(0.2 * $this->img->width) : $lm;\n $rm = $rm == 0 ? floor(0.1 * $this->img->width) : $rm;\n $tm = $tm == 0 ? floor(0.2 * $this->img->height) : $tm;\n $bm = $bm == 0 ? floor(0.1 * $this->img->height) : $bm;\n\n $adj = ($this->img->height - $this->img->width) / 2;\n $this->img->SetMargin($tm - $adj, $bm - $adj, $rm + $adj, $lm + $adj);\n $this->img->SetCenter(floor($this->img->width / 2), floor($this->img->height / 2));\n $this->SetAngle(90);\n if (empty($this->yaxis) || empty($this->xaxis)) {\n JpgraphError::RaiseL(25009);//('You must specify what scale to use with a call to Graph::SetScale()');\n }\n $this->xaxis->SetLabelAlign('right', 'center');\n $this->yaxis->SetLabelAlign('center', 'bottom');\n }", "title": "" }, { "docid": "43e833dfde2bf9bcdb664f0331d8720a", "score": "0.46330836", "text": "function normalize_margin_padding( $rule, $value, &$rules, &$values ) {\n $parts = preg_split( \"/ +/\", trim( $value ) );\n if ( !isset( $parts[ 1 ] ) ) $parts[ 1 ] = $parts[ 0 ];\n if ( !isset( $parts[ 2 ] ) ) $parts[ 2 ] = $parts[ 0 ];\n if ( !isset( $parts[ 3 ] ) ) $parts[ 3 ] = $parts[ 1 ];\n $rules[ 0 ] = $rule . '-top';\n $values[ 0 ] = $parts[ 0 ];\n $rules[ 1 ] = $rule . '-right';\n $values[ 1 ] = $parts[ 1 ];\n $rules[ 2 ] = $rule . '-bottom';\n $values[ 2 ] = $parts[ 2 ];\n $rules[ 3 ] = $rule . '-left';\n $values[ 3 ] = $parts[ 3 ];\n }", "title": "" }, { "docid": "ac5d3520ccd92ae718ee5060aba7ae40", "score": "0.46309295", "text": "public function getMarginPosition($currencyPair) {\n return $this->request->exec([\n 'command' => 'getMarginPosition',\n 'currencyPair' => strtoupper($currencyPair)\n ]);\n }", "title": "" }, { "docid": "bd1dce49f3040da5afa7d5658ca03430", "score": "0.46290314", "text": "public function getMarginByID($idProduct,$buyPrice,$marginType){\n\t\t$wholeSalePrice = $buyPrice * 1.3;\n\t\t$price = ceil( $wholeSalePrice * 2) / 2 ;\n\t\treturn \t$price;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "e5b79e7200d018e73b9736dad32d48a5", "score": "0.46285316", "text": "public function setIndent($new)\r\n\t{\r\n\t\t$this->indent = $new;\r\n\t}", "title": "" }, { "docid": "1152ddce624a8fce2a074f8e96d66578", "score": "0.46262607", "text": "function get_margin_height()\n {\n $style = $this->_frame->get_style();\n\n if ($style->list_style_type === \"none\") {\n return 0;\n }\n\n return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING;\n }", "title": "" }, { "docid": "9a9c4aa87145477901b7199005e7a2a7", "score": "0.46189615", "text": "public function testGettingLeftMarginUsingIntegerArgsShouldSuccess()\n {\n $s = new S('something');\n $this->assertEquals(' something', $s->margin(5));\n }", "title": "" }, { "docid": "bbefb8df5664ec006eb5b3ba571ef18f", "score": "0.4597557", "text": "private function tcPrSpacing($properties) {\r\n $top = $left = $bottom = $right = array(0, 'auto');\r\n\r\n if(!empty($properties['margin_top'])){\r\n $top = $this->_wordMLUnits($properties['margin_top'], $properties['font_size']);\r\n }\r\n if(!empty($properties['padding_top'])){\r\n $temp = $this->_wordMLUnits($properties['padding_top'], $properties['font_size']);\r\n if($temp[0] > $top[0]) $top = $temp;\r\n }\r\n\r\n if(!empty($properties['margin_bottom'])){\r\n $bottom = $this->_wordMLUnits($properties['margin_bottom'], $properties['font_size']);\r\n }\r\n //let us look now at the padding bottom\r\n if(!empty($properties['padding_bottom'])){\r\n $temp = $this->_wordMLUnits($properties['padding_bottom'], $properties['font_size']);\r\n if($temp[0] > $bottom[0]) $bottom = $temp;\r\n }\r\n\r\n $spacing ='<w:tcMar>';\r\n $spacing .= '<w:top w:w=\"'.$top[0].'\" w:type=\"'.$top[1].'\"/>';\r\n //$spacing .= '<w:left w:w=\"\" w:type=\"\"/>';\r\n $spacing .= '<w:bottom w:w=\"'.$bottom[0].'\" w:type=\"'.$bottom[1].'\"/>';\r\n //$spacing .= '<w:right w:w=\"\" w:type=\"\"/>';\r\n $spacing .= '</w:tcMar>';\r\n return $spacing;\r\n }", "title": "" }, { "docid": "326695c9cf75338b3a46b046ab75592b", "score": "0.45879588", "text": "function the_row_margins( $row ) {\n\t\t$content = '';\n\t\t$margins = $row['margins'];\n\t\tif( !empty($margins) ) {\n\t\t\tforeach( $margins as $key => $margin ) {\n\t\t\t\tif( !empty($margin) ) {\n\t\t\t\t\t$content .= ' data-' . $key . '=\"' . intval($margin) . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$paddings = $row['paddings'];\n\t\tif( !empty($paddings) ) {\n\t\t\tforeach( $paddings as $key => $padding ) {\n\t\t\t\tif( !empty($padding) ) {\n\t\t\t\t\t$content .= ' data-' . $key . '=\"' . intval($padding) . '\"';\n\t\t\t\t\t$paddingSet = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( isset($paddingSet) ) {\n\t\t\t$content .= ' data-target=\"' . $row['paddings']['padding-target'] . '\"';\n\t\t}\n\t\t\n\t\techo $content;\n\t}", "title": "" }, { "docid": "c25667af800803b63674461cca9240a6", "score": "0.45733276", "text": "public function setItemMarginTop($itemMarginTop) {\n $this->itemMarginTop = $itemMarginTop;\n return $this;\n }", "title": "" }, { "docid": "03a09a77352cb50500d873b34423cc92", "score": "0.45733088", "text": "function _setDefaults() {\r\n \r\n $this->setCSS(\"width\",\"200px\");\r\n $this->setCSS(\"min-height\",\"14px\");\r\n \r\n }", "title": "" }, { "docid": "4a3142aecc9a33803dfa447008ae6326", "score": "0.456048", "text": "function StrokeMargin($aImg)\n {\n return true;\n }", "title": "" }, { "docid": "2b2724ac432f548ca44106c7791d94fe", "score": "0.4556858", "text": "public function getAdditionalCssReturnsMarginLeftIfBannerHasMarginLeftTest() {\n\t\t$pid = 110;\n\t\t$bannerUid = $this->testingFramework->createRecord('tx_sfbanners_domain_model_banner', array('pid' => $pid,\n\t\t\t'margin_left' => 10));\n\n\t\t/* Get banner from Repository */\n\t\t$this->demand->setStartingPoint($pid);\n\t\t$banners = $this->bannerRepository->findDemanded($this->demand);\n\n\t\t$expected = '.banner-' . $bannerUid . ' { margin: 0px 0px 0px 10px; }' . chr(10) . chr(13);\n\t\t$result = $this->bannerService->getAdditionalCss($banners);\n\t\t$this->assertEquals($expected, $result);\n\t}", "title": "" }, { "docid": "77ab62ce997e5ef87c37ba515dec9998", "score": "0.45391163", "text": "function SetAligns($a)\r\n{\r\n\t$this->aligns=$a;\r\n}", "title": "" }, { "docid": "77ab62ce997e5ef87c37ba515dec9998", "score": "0.45391163", "text": "function SetAligns($a)\r\n{\r\n\t$this->aligns=$a;\r\n}", "title": "" }, { "docid": "07e381e5a493b7798ee1c562903bbd5a", "score": "0.45385185", "text": "public function inset($value) { $this->inset_val = $value; }", "title": "" }, { "docid": "8dbf530dc310f82e458465d70b55d3ce", "score": "0.45099542", "text": "public function testGettingRightMarginUsingIntegerArgsShouldSuccess()\n {\n $s = new S('something');\n $this->assertEquals('something ', $s->margin(0, 5));\n }", "title": "" }, { "docid": "961e81e15ee75d83b16cdacac65c99e2", "score": "0.4483701", "text": "public function setItemMarginBottom($itemMarginBottom) {\n $this->itemMarginBottom = $itemMarginBottom;\n return $this;\n }", "title": "" }, { "docid": "a8d2b9ae61c33f3818a7221e86134ac2", "score": "0.44714922", "text": "public function getMargin(\\Magento\\Quote\\Model\\Quote\\Item $item)\n {\n $margin = $this->marginCalculationHelper->itemMargin($item);\n if ($margin) {\n return $margin;\n }\n\n return null;\n }", "title": "" }, { "docid": "c5fc083819e4812abd48757af3a08a5e", "score": "0.44689858", "text": "public function __construct(\n $margin = 20,\n $orientation = 'P',\n $unit = 'mm',\n $format = 'A4'\n ) {\n parent::__construct($orientation, $unit, $format);\n $this->AliasNbPages('{{{nb}}}');\n $this->SetMargins($margin, $margin);\n $this->SetAutoPageBreak(TRUE, $margin);\n }", "title": "" }, { "docid": "ebe86a44cde52ec270266200289f0688", "score": "0.44642118", "text": "function Table_Align(){\r\n\t\t//check if the table is aligned\r\n\t\tif (isset($this->tb_table_type['TB_ALIGN'])) $tb_align = $this->tb_table_type['TB_ALIGN']; else $tb_align='';\r\n\r\n\t\t//set the table align\r\n\t\tswitch($tb_align){\r\n\t\t\tcase 'C':\r\n\t\t\t\t$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN'] + ($this->PageWidth() - $this->Get_Table_Width())/2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'R':\r\n\t\t\t\t$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN'] + ($this->PageWidth() - $this->Get_Table_Width()));\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN']);\r\n\t\t\t\tbreak;\r\n\t\t}//if (isset($this->tb_table_type['TB_ALIGN'])){\r\n\t}", "title": "" }, { "docid": "73d61f4b8bf709666e4e9317a4b87cd2", "score": "0.44631246", "text": "public function __construct()\n\t{\n\t\t$this->height = rand( 8, 21 );\n\t\t$this->width = rand( 7, 13 );\n\n\t\t/* Left Margin */\n\t\t$leftMargins = [0, 0, 0, 1, 2 ];\n\t\t$this->leftMargin = Utils::randomElement( $leftMargins );\n\t}", "title": "" }, { "docid": "9f4d4b4e742bfe29db842728e30cddf9", "score": "0.44533387", "text": "public function filterByQttbconfmarkupmargin($qttbconfmarkupmargin = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($qttbconfmarkupmargin)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigQtTableMap::COL_QTTBCONFMARKUPMARGIN, $qttbconfmarkupmargin, $comparison);\n }", "title": "" }, { "docid": "1aed71605783fb394a0496a6c40decef", "score": "0.44417912", "text": "private function pPrSpacing($properties) {\r\n $before = 0;\r\n $after = 0;\r\n $line = 240;\r\n //let us look at the margin top\r\n if(!empty($properties['margin_top'])){\r\n $temp = $this->_wordMLUnits($properties['margin_top'], $properties['font_size']);\r\n $before += (int) round($temp[0]);\r\n }\r\n //let us look now at the padding top\r\n if(!empty($properties['padding_top'])){\r\n $temp = $this->_wordMLUnits($properties['padding_top'], $properties['font_size']);\r\n $before += (int) round($temp[0]);\r\n }\r\n //let us look at the margin bottom\r\n if(!empty($properties['margin_bottom'])){\r\n $temp = $this->_wordMLUnits($properties['margin_bottom'], $properties['font_size']);\r\n $after += (int) round($temp[0]);\r\n }\r\n //let us look now at the padding bottom\r\n if(!empty($properties['padding_bottom'])){\r\n $temp = $this->_wordMLUnits($properties['padding_bottom'], $properties['font_size']);\r\n $after += (int) round($temp[0]);\r\n }\r\n\r\n $before = max(0, $before);\r\n $after = max(0, $after);\r\n\r\n //we now check the line height property\r\n\r\n if(isset($properties['line_height'])){\r\n $line = (int) round($properties['line_height'] * 16.6667);\r\n }\r\n\r\n $spacing ='<w:spacing w:before=\"'.$before.'\" w:after=\"'.$after.'\" ';\r\n $spacing .= 'w:line=\"'.$line.'\" w:lineRule=\"auto\"';\r\n $spacing .= ' />';\r\n return $spacing;\r\n }", "title": "" }, { "docid": "2b46ea47399231746d864108b91eb046", "score": "0.4412544", "text": "abstract function setLayout();", "title": "" } ]
34935881d9cb7c19dcf585a0df44be24
GET VIDEO INFORMATION AND VALIDATION The methods below are used by the ValidationActivity We capture as much info as possible on the input video Execute FFMpeg to get video information
[ { "docid": "4d826728e1e2640a2eeb7ebc534874dc", "score": "0.0", "text": "public function get_asset_info($pathToInputFile)\n {\n $assetInfo = array();\n \n // Execute FFMpeg to validate and get information about input video\n $out = $this->executer->execute(\"ffmpeg -i $pathToInputFile\", 1, \n array(2 => array(\"pipe\", \"w\")),\n false, false, \n false, 1);\n \n if (!$out['outErr'] && !$out['out'])\n throw new CTException(\"Unable to execute FFMpeg to get information about '$pathToInputFile'! FFMpeg didn't return anything!\",\n self::EXEC_VALIDATE_FAILED);\n \n // FFmpeg writes on STDERR ...\n $ffmpegInfoOut = $out['outErr'];\n \n // get Duration\n if (!$this->get_duration($ffmpegInfoOut, $assetInfo))\n throw new CTException(\"Unable to extract video duration !\",\n self::GET_DURATION_FAILED);\n \n // get Video info\n if (!$this->get_video_info($ffmpegInfoOut, $assetInfo))\n throw new CTException(\"Unable to find video information !\",\n self::GET_VIDEO_INFO_FAILED);\n \n // get Audio Info\n if (!$this->get_audio_info($ffmpegInfoOut, $assetInfo))\n throw new CTException(\"Unable to find audio information !\",\n self::GET_AUDIO_INFO_FAILED);\n\n return ($assetInfo);\n }", "title": "" } ]
[ { "docid": "57088a25fa3cd2eeeafa6deb30464380", "score": "0.6761309", "text": "private function getVideoInfo() {\n return file_get_contents($this->getRequestedUrl());\n }", "title": "" }, { "docid": "a50cc6f2fb7df036b2630fe029c44bfc", "score": "0.67484814", "text": "function getMediaInfo( $filename )\n{\n $bin_ffprobe = Config::get( 'app.bin_ffprobe' );\n $cmd = $bin_ffprobe.' '.$filename.' 2>&1';\n\n $output = `$cmd`;\n\n $info = array();\n\n // get media type\n $info['type'] = 'unknown';\n if( preg_match_all( '#^\\s*Stream.*(Video|Audio).*$#m', $output, $matches ) )\n {\n $streamTypes = $matches[1];\n unset( $matches );\n if( in_array( 'Video', $streamTypes ) ) $info['type'] = 'video';\n elseif( in_array( 'Audio', $streamTypes ) ) $info['type'] = 'audio';\n }\n\n // get media duration\n $info['duration'] = false;\n if( preg_match( '#^\\s*Duration:\\s(\\d\\d):(\\d\\d):(\\d\\d)\\.(\\d\\d),#m', $output, $matches ) )\n {\n $duration = $matches[1]*3600 + $matches[2]*60 + $matches[3];\n if( $matches[4] >= 50 ) $duration++;\n $info['duration'] = $duration;\n }\n\n // get video rotation\n $info['rotate'] = false;\n if( $info['type'] == 'video' )\n {\n if( preg_match( '#^\\s*rotate\\s*:\\s(\\d+)\\s*$#m', $output, $matches ) )\n {\n $info['rotate'] = $matches[1];\n } else {\n $info['rotate'] = 0;\n }\n }\n\n return $info;\n}", "title": "" }, { "docid": "6381ba2bd8bbd624f23ca0e631ab11d7", "score": "0.66339546", "text": "function get_video_info( $file )\n{\n\t$cmd = $this->_CMD_FFMPEG . sprintf( $this->_PARAM_INFO, $file );\n\n\t$this->clear_msg_array();\n\t$ret_array = $this->cmd_excute( $cmd );\n\tif ( !$ret_array ) {\n\t\treturn false;\n\t}\n\n\t$line_duration = null;\n\t$line_audio = null;\n\t$line_video = null;\n\t$audio_codec = null;\n\t$video_codec = null;\n\t$duration = 0;\n\t$width = 0;\n\t$height = 0;\n\n\tforeach( $ret_array as $line )\n\t{\n\t\tif ( preg_match( \"/duration.*(\\d+):(\\d+):(\\d+)/i\", $line, $match ) ) {\n\t\t\t$line_duration = $line;\n\t\t\t$duration = intval($match[1])*3600 + intval($match[2])*60 + intval($match[3]);\n\t\t}\n\t\tif ( preg_match( \"/stream.*audio:(.*)/i\", $line, $match ) ) {\n\t\t\t$line_audio = $line;\n\t\t\t$arr = explode( ',', $match[1] );\n\t\t\tif ( isset($arr[0]) ) {\n\t\t\t\t$audio_codec = trim($arr[0]);\n\t\t\t}\n\t\t}\n\t\tif ( preg_match( \"/stream.*video:(.*)\\s(\\d+)x(\\d+)/i\", $line, $match ) ) {\n\t\t\t$line_video = $line;\n\t\t\t$width = intval($match[2]);\n\t\t\t$height = intval($match[3]);\n\t\t\t$arr = explode( ',', $match[1] );\n\t\t\tif ( isset($arr[0]) ) {\n\t\t\t\t$video_codec = trim($arr[0]);\n\t\t\t}\n\t\t}\n\t}\n\n\t$arr = array(\n\t\t'line_duration' => $line_duration ,\n\t\t'line_audio' => $line_audio ,\n\t\t'line_video' => $line_video ,\n\t\t'audio_codec' => $audio_codec ,\n\t\t'video_codec' => $video_codec ,\n\t\t'is_h264_aac' => $this->is_h264_aac( $video_codec, $audio_codec ) ,\n\t\t'duration' => $duration ,\n\t\t'width' => $width ,\n\t\t'height' => $height ,\n\t);\n\treturn $arr;\n}", "title": "" }, { "docid": "8402ef14555f457f8da30abb6f7f08af", "score": "0.6539844", "text": "function process_video($video)\n{\n $type='';\n \n \n //if youtube\n if((strstr($video, 'youtube.com/watch?')==true||strstr($video, 'youtube.com/v/')==true))\n {\n //if regular video\n if(strstr($video, 'youtube.com/v/')==false)\n {\n if(strpos($video, 'v=')!=false)\n {\n //original: youtube.com/watch?annotation_id=annotation_370587&v=X_QNBwvBV4Y\n //after: X_QNBwvBV4Y\n $video=substr($video, (strpos($video, 'v=')+2), 11);\n\n $valid_video=true;\n $type='youtube';\n }\n else\n $valid_video=false;\n }\n \n //if embedded video\n else\n {\n $video=substr($video, (strpos($video, 'v/')+2), 11);\n \n $valid_video=true;\n $type='youtube';\n }\n }\n \n //if vimeo\n else if(strstr($video, 'vimeo.com/')==true)\n {\n //if regular video\n if(strstr($video, 'vimeo.com/video/')==false)\n {\n //original: http://vimeo.com/42480177\n //after: 42480177\n $video=substr($video, (strpos($video, '.com/')+5));\n \n //cleans out parameters\n $temp_video=explode('?', $video);\n $video=$temp_video[0];\n\n $valid_video=true;\n $type='vimeo';\n }\n \n //if embedded video\n else\n {\n //original: http://play.vimeo.com/video/42480177?badge=0\n //after: 42480177\n $video=substr($video, (strpos($video, '.com/video/')+11));\n \n //cleans out parameters\n $temp_video=explode('?', $video);\n $video=$temp_video[0];\n\n $valid_video=true;\n $type='vimeo';\n }\n }\n else\n $valid_video=false;\n \n $final=array();\n $final[0]=$valid_video;\n $final[1]=$type;\n $final[2]=$video;\n \n \n return $final;\n \n}", "title": "" }, { "docid": "35c3d6452509fa4299559c9d5d2ea681", "score": "0.64978737", "text": "function getVideoInfo($videoFile, $cmdOut = '')\n\t{\n\t\t$data = array();\n\n\t\tif (!is_file($videoFile) && empty($cmdOut))\n\t\t\treturn $data;\n\n\t\tif (!$cmdOut) {\n\t\t\t//$cmd\t= $this->converter . ' -v 10 -i ' . $videoFile . ' 2>&1';\n\t\t\t// Some FFmpeg version only accept -v value from -2 to 2 \n\t\t\t$cmd\t= $this->ffmpeg . ' -i ' . $videoFile . ' 2>&1';\n\t\t\t$cmdOut\t= shell_exec($cmd);\n\t\t}\n\n\t\tif (!$cmdOut) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tpreg_match_all('/Duration: (.*)/', $cmdOut , $matches);\n\t\tif (count($matches) > 0 && isset($matches[1][0]))\n\t\t{\n\t\t\tCFactory::load( 'helpers' , 'videos' );\n\t\t\t\n\t\t\t$parts = explode(', ', trim($matches[1][0]));\n\t\t\t\n\t\t\t$data['bitrate']\t\t\t= intval(ltrim($parts[2], 'bitrate: '));\n\t\t\t$data['duration']['hms']\t= substr($parts[0], 0, 8);\n\t\t\t$data['duration']['exact']\t= $parts[0];\n\t\t\t$data['duration']['sec']\t= $videoFrame = cFormatDuration($data['duration']['hms'], 'seconds');\n\t\t\t$data['duration']['excess']\t= intval(substr($parts[0], 9));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->debug) {\n\t\t\t\techo '<pre>FFmpeg failed to read video\\'s duration</pre>';\n\t\t\t\techo '<pre>' . $cmd . '<pre>';\n\t\t\t\techo '<pre>' . $cmdOut . '</pre>';\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tpreg_match('/Stream(.*): Video: (.*)/', $cmdOut, $matches);\n\t\tif (count($matches) > 0 && isset($matches[0]) && isset($matches[2]))\n\t\t{\n\t\t\t$data['video']\t= array();\n\n\t\t\tpreg_match('/([0-9]{1,5})x([0-9]{1,5})/', $matches[2], $dimensions_matches);\n\t\t\t$data['video']['width']\t\t= floatval($dimensions_matches[1]);\n\t\t\t$data['video']['height']\t= floatval($dimensions_matches[2]);\n\n\t\t\tpreg_match('/([0-9\\.]+) (fps|tb)/', $matches[0], $fps_matches);\n\n\t\t\tif (isset($fps_matches[1]))\n\t\t\t\t$data['video']['frame_rate']= floatval($fps_matches[1]);\n\n\t\t\tpreg_match('/\\[PAR ([0-9\\:\\.]+) DAR ([0-9\\:\\.]+)\\]/', $matches[0], $ratio_matches);\n\t\t\tif(count($ratio_matches))\n\t\t\t{\n\t\t\t\t$data['video']['pixel_aspect_ratio']\t= $ratio_matches[1];\n\t\t\t\t$data['video']['display_aspect_ratio']\t= $ratio_matches[2];\n\t\t\t}\n\n\t\t\tif (!empty($data['duration']) && !empty($data['video']))\n\t\t\t{\n\t\t\t\t$data['video']['frame_count'] = ceil($data['duration']['sec'] * $data['video']['frame_rate']);\n\t\t\t\t$data['frames']\t\t\t\t= array();\n\t\t\t\t$data['frames']['total']\t= $data['video']['frame_count'];\n\t\t\t\t$data['frames']['excess']\t= ceil($data['video']['frame_rate'] * ($data['duration']['excess']/10));\n\t\t\t\t$data['frames']['exact']\t= $data['duration']['hms'] . '.' . $data['frames']['excess'];\n\t\t\t}\n\n\t\t\t$parts\t\t\t= explode(',', $matches[2]);\n\t\t\t$other_parts\t= array($dimensions_matches[0], $fps_matches[0]);\n\n\t\t\t$formats = array();\n\t\t\tforeach ($parts as $key => $part)\n\t\t\t{\n\t\t\t\t$part = trim($part);\n\t\t\t\tif (!in_array($part, $other_parts))\n\t\t\t\t\tarray_push($formats, $part);\n\t\t\t}\n\t\t\t$data['video']['pixel_format']\t= $formats[1];\n\t\t\t$data['video']['codec']\t\t\t= $formats[0];\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "4eb3013696dbc5c91ff0bcf4fd198e5a", "score": "0.6332748", "text": "public function getVideoInfo($input){\n $conversion_config= ConversionModel::get_config();\n $cmd=shell_exec(\"\".$conversion_config->mediainfo_path.\" \".$input.\"\");\n var_dump(json_encode($cmd));\n }", "title": "" }, { "docid": "1c6e9f1bc7d8824081c309113730c11e", "score": "0.6277909", "text": "function urlVideoController($vid)\r\n {\r\n if (file_exists($vid)) {\r\n\r\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\r\n $mime_type = finfo_file($finfo, $vid); \r\n finfo_close($finfo);\r\n if (preg_match('/video\\/*/', $mime_type)) {\r\n\r\n $video_attributes = _get_video_attributes($vid, $this -> ffmpeg_path);\r\n\r\n print_r('Codec: ' . $video_attributes['codec'] . '<br/>');\r\n\r\n print_r('Dimension: ' . $video_attributes['width'] . ' x ' . $video_attributes['height'] . ' <br/>');\r\n\r\n print_r('Duration: ' . $video_attributes['hours'] . ':' . $video_attributes['mins'] . ':'\r\n . $video_attributes['secs'] . '.' . $video_attributes['ms'] . '<br/>');\r\n\r\n print_r('Size: ' . _human_filesize(filesize($vid)));\r\n } else {\r\n return 'Video uzantısıdır.';\r\n }\r\n } else {\r\n return 'Video uzantısı değildir.';\r\n }\r\n }", "title": "" }, { "docid": "b90c4dfe1b10822dcf08bb8652c33fee", "score": "0.61509746", "text": "function getDetails() {\n\t\t\treturn $this->API->getVideo($this->ID);\n\t\t}", "title": "" }, { "docid": "7fb0313b34acb70e248d09cd0c5a6f37", "score": "0.6085355", "text": "public function video_test()\n {\n// echo '<video src=\"'.$file.'\" controls = \"true\"></video>';\n\n\n $res = array();\n $no = exec('cat '.UPLOAD_PATH.'/txt_upload/content_stat/2018/04/27/20180427151759000000_1_2.txt 2>&1', $res);\n //p($no);\n p($res);\n }", "title": "" }, { "docid": "de5567d42a64df98de83195d589f3fe5", "score": "0.6076764", "text": "function video_details($videoid=null,$sessionid=null) {\n \n $videoDetails = $this->sendRequest('viddler.videos.getDetails','sessionid='.$sessionid.'&video_id='.$videoid);\n \n return $videoDetails;\n }", "title": "" }, { "docid": "e3e16cd7ac9a9fda9398da5e324ee38e", "score": "0.6034939", "text": "function bb_video($arguments = array()) {\n\t\t$content = $this->parseArray(array('[/video]'), array());\n\n\t\t$params['width'] = 570;\n\t\t$params['height'] = 360;\n\t\t$params['iframe'] = true;\n\t\t$previewthumb = '';\n\n\t\t$type = null;\n\t\t$id = null;\n\t\t$matches = array();\n\n\t\t//match type and id\n\t\tif (strstr($content, 'youtube.com') OR strstr($content, 'youtu.be')) {\n\t\t\t$type = 'YouTube';\n\t\t\tif (preg_match('#(?:youtube\\.com/watch\\?v=|youtu.be/)([0-9a-zA-Z\\-_]{11})#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//www.youtube.com/embed/' . $id . '?autoplay=1';\n\t\t\t$previewthumb = 'https://img.youtube.com/vi/' . $id . '/0.jpg';\n\t\t} elseif (strstr($content, 'vimeo')) {\n\t\t\t$type = 'Vimeo';\n\t\t\tif (preg_match('#vimeo\\.com/(?:clip\\:)?(\\d+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//player.vimeo.com/video/' . $id . '?autoplay=1';\n\n\t\t\t$videodataurl = 'https://vimeo.com/api/v2/video/' . $id . '.php';\n\t\t\t$data = '';\n\t\t\t$downloader = new UrlDownloader;\n\t\t\tif ($downloader->isAvailable()) {\n\t\t\t\t$data = $downloader->file_get_contents($videodataurl);\n\t\t\t}\n\t\t\tif ($data) {\n\t\t\t\t$data = unserialize($data);\n\t\t\t\t$previewthumb = $data[0]['thumbnail_medium'];\n\t\t\t}\n\t\t} elseif (strstr($content, 'dailymotion')) {\n\t\t\t$type = 'DailyMotion';\n\t\t\tif (preg_match('#dailymotion\\.com/video/([a-z0-9]+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//www.dailymotion.com/embed/video/' . $id . '?autoPlay=1';\n\t\t\t$previewthumb = 'https://www.dailymotion.com/thumbnail/video/' . $id;\n\t\t} elseif (strstr($content, 'godtube')) {\n\t\t\t$type = 'GodTube';\n\t\t\tif (preg_match('#godtube\\.com/watch/\\?v=([a-zA-Z0-9]+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['id'] = $id;\n\t\t\t$params['iframe'] = false;\n\n\t\t\t$previewthumb = 'https://www.godtube.com/resource/mediaplayer/' . $id . '.jpg';\n\t\t}\n\n\t\tif (empty($type) OR empty($id)) {\n\t\t\treturn '[video] Niet-ondersteunde video-website (' . htmlspecialchars($content) . ')';\n\t\t}\n\t\tif ($this->light_mode) {\n\t\t\treturn $this->lightLinkBlock('video', $content, $type . ' video', '', $previewthumb);\n\t\t}\n\t\treturn $this->video_preview($params, $previewthumb);\n\t}", "title": "" }, { "docid": "28c0da6927b633ddb892b84a0b205478", "score": "0.59929854", "text": "function log_file_info()\r\n\t{\r\n\t\t$details = $this->input_details;\r\n\t\tif(is_array($details))\r\n\t\t{\r\n\t\t\tforeach($details as $name => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->log($name,$value);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$this->log .=\" Unknown file details - Unable to get video details using FFMPEG \\n\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "74ef085116dba028b1dd095a254df586", "score": "0.5991473", "text": "function video() {\n\t\t\treturn $this->API->getVideo($this->VideoID);\n\t\t}", "title": "" }, { "docid": "1f8f02293f28250d801b5d34c3752268", "score": "0.59044695", "text": "function get_video_resolution($ffmpeg_fullpath, $file)\n {\n $video_resolution = array(\n 'width' => 0,\n 'height' => 0,\n );\n\n $cmd = $ffmpeg_fullpath . ' -i ' . escapeshellarg($file) . \" 2>&1 | grep Stream | grep -oP ', \\K[0-9]+x[0-9]+'\";\n $output = run_command($cmd, true);\n\n $video_resolution_pieces = explode('x', $output);\n if(2 === count($video_resolution_pieces))\n {\n $video_resolution['width'] = $video_resolution_pieces[0];\n $video_resolution['height'] = $video_resolution_pieces[1];\n }\n\n return $video_resolution;\n }", "title": "" }, { "docid": "cde16cf8c09b2c3d7c5a11fb6c69b377", "score": "0.5888349", "text": "function get_video_details($video=null){\n\t\tif(!is_null($video) || !empty($video)){\n\n\t\t\t$embed = wp_oembed_get($video, array('width'=>600, 'height'=>400 ));\n\t\t\tif($embed){\n\t\t\t\t$thumbnail \t= getinfo_videostream($video);\n\t\t\t}\n\t\t\t\tif($embed):\n\t\t\t\t\treturn json_encode(array('iframe'=>$embed, 'thumbnail'=> $thumbnail, 'error'=>false));\n\t\t\t\telse:\n\t\t\t\t\treturn json_encode(array('error'=> true));\n\t\t\t\tendif;\n\t\t}\n\t}", "title": "" }, { "docid": "98d326c57d446130768b4f8d910849e5", "score": "0.5881257", "text": "public function getVideoLinkData() {\n\n $meta = [\n 'video_id' => $this->app->param('video_id', null),\n 'video_provider' => $this->app->param('video_provider', null),\n ];\n\n if (!$meta['video_id']) return ['error' => 'video_id is missing'];\n if (!$meta['video_provider']) return ['error' => 'video_provider is missing'];\n\n return $this->app->module('videolinkfield')->getVideoLinkData($meta);\n\n }", "title": "" }, { "docid": "8bb95dfbb9158a080dc3d1d97a458e80", "score": "0.58753186", "text": "function videoprofile() {\n $this->data['welcome'] = $this;\n $id = @$_GET['action'];\n $vid = base64_decode($id);\n if ($vid) {\n if (isset($_POST['submit']) && $_POST['submit'] == \"Update\") {\n $this->form_validation->set_rules($this->validation_rules['update_video']);\n if ($this->form_validation->run()) {\n $post = $_POST;\n $post['content_id'] = $vid;\n $post['status'] = $this->input->post('status') == 'on' ? 1 : 0;\n // $post['feature_video'] = $this->input->post('feature_video') == 'on' ? 1 : 0;\n $post_key = $_POST['tags'];\n $this->Ads_model->_saveVideo($post);\n $this->Ads_model->_setKeyword($post_key, $vid);\n $msg = $this->loadPo($this->config->item('success_record_update'));\n $this->log($this->user, $msg);\n $this->session->set_flashdata('message', $this->_successmsg($msg));\n redirect('ads');\n } else {\n $this->data['result'] = (array) $this->Ads_model->edit_profile($vid); \n $this->data['thumbnails_info'] = $this->Ads_model->get_thumbs($vid);\n $this->data['content_id'] = $vid;\n $this->data['category'] = $this->Ads_model->get_category($this->uid);\n //$this->data['genre'] = $this->Genre_model->getAllGenre();\n // $this->data['setting'] = $this->videos_model->getsetting($vid);\n // $this->data['countryData'] = $this->videos_model->getCountryList();\n $this->show_ads_view('ads/videoEditBasic', $this->data);\n }\n } else {\n $this->data['result'] = (array) $this->Ads_model->edit_profile($vid);\n $this->data['result']['keywords'] = $this->Ads_model->_getKeyword($vid);\n $this->data['thumbnails_info'] = $this->Ads_model->get_thumbs($vid);\n $this->data['content_id'] = $vid;\n $this->data['category'] = $this->Ads_model->get_category($this->uid); \n //$this->data['setting'] = $this->Ads_model->getsetting($vid);\n //$this->data['countryData'] = $this->Ads_model->getCountryList();\n $this->show_ads_view('ads/videoEditBasic', $this->data);\n }\n }\n }", "title": "" }, { "docid": "b6cc426b68bccfe7273d64bfffab281b", "score": "0.5871423", "text": "public function getVideoDetails()\n {\n return $this->videoDetails;\n }", "title": "" }, { "docid": "4715313eb47524159fb3de8f8434de85", "score": "0.5862278", "text": "public function videos();", "title": "" }, { "docid": "efaf287f64b6c0b40d7278a91f1fc744", "score": "0.5767824", "text": "function getVideo($params)\n {\n\t\t\t $city_name=$params['pass'][2];\n\t\t\t\t\t$company_url=$params['pass'][5];\n\t\t\t\t\tApp::import('model','City');\n\t\t\t\t\t$this->City=new City();\n\t\t\t\t\t$city=$this->City->query(\"Select id from cities where page_url='$city_name'\");\n\t\t\t\t\tif(count($city)>0)\n\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t$city_id=$city[0]['cities']['id'];\n\t\t\t\t\t\t\t\tApp::import('model','AdvertiserProfile');\n\t\t\t\t\t\t\t\t$this->ad_profile=new AdvertiserProfile();\n\t\t\t\t\t\t\t $pro=$this->ad_profile->query(\"Select id from advertiser_profiles where city='$city_id' and page_url='$company_url'\");\n\t\t\t\t\t\t\t\tif(count($pro)>0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$pro_id=$pro[0]['advertiser_profiles']['id'];\n\t\t\t\t\t\t\t\tApp::import('model','Video');\n\t\t\t\t\t\t\t\t$this->video=new Video();\n\t\t\t\t\t\t\t\t$video=$this->video->query(\"Select utube_link,file_name from videos where advertiser_profile_id='$pro_id'\");\n\t\t\t\t\t\t\t\treturn $video; \n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t }", "title": "" }, { "docid": "fa04708bf2009555da7637cbc92ff2e8", "score": "0.5758964", "text": "public function run($param)\n {\n $value = '';\n\n if (array_key_exists(0, $param)) {\n $url = $param[0];\n if (strpos($url, ' ') !== false) {\n $url = rawurlencode(str_replace('%2F', '/', $url)); // In case was not properly encoded as URL\n }\n if ((url_is_local($url)) && (is_file(get_custom_file_base() . '/' . rawurldecode($url)))) {\n $test = $GLOBALS['SITE_DB']->query_select_value_if_there('videos', 'id', array('url' => $url));\n if (!is_null($test)) {\n $value = strval($test);\n } else {\n require_code('galleries2');\n require_code('exif');\n\n require_lang('galleries');\n\n $file = rawurldecode(basename($url));\n\n $ret = get_video_details(get_custom_file_base() . '/' . rawurldecode($url), $file, true);\n if ($ret !== false) {\n list($width, $height, $length) = $ret;\n if (is_null($width)) {\n $width = intval(get_option('default_video_width'));\n }\n if (is_null($height)) {\n $height = intval(get_option('default_video_height'));\n }\n if (is_null($length)) {\n $length = 0;\n }\n $exif = get_exif_data(get_custom_file_base() . '/' . rawurldecode($url), $file);\n\n $title = array_key_exists(1, $param) ? $param[1] : '';\n if ($title == '') {\n $title = $exif['UserComment'];\n }\n\n $cat = array_key_exists(2, $param) ? $param[1] : '';\n if ($cat == '') {\n $cat = 'root';\n }\n\n $allow_rating = array_key_exists(3, $param) ? ((intval($param[3]) == 1) ? 1 : 0) : 1;\n $allow_comments = array_key_exists(4, $param) ? ((intval($param[4]) == 1) ? 1 : 0) : 1;\n $allow_trackbacks = array_key_exists(5, $param) ? ((intval($param[5]) == 1) ? 1 : 0) : 1;\n\n $id = add_video($title, $cat, '', $url, '', 1, $allow_rating, $allow_comments, $allow_trackbacks, do_lang('VIDEO_WAS_AUTO_IMPORTED'), $length, $width, $height);\n store_exif('video', strval($id), $exif);\n }\n }\n }\n }\n\n return $value;\n }", "title": "" }, { "docid": "46287dd030fbdfa688bfa89217a3797f", "score": "0.5748422", "text": "private function getFromInput($video_id,$status){\n $video = DB::table(\"videos_feed\")\n ->where(\"video_id\",\"=\",$video_id)\n ->where(\"status\",\"=\",$status)\n ->first();\n\n if (!is_null($video)) {\n //update the video feed status as it has been started and in progress mode\n DB::table(\"videos_feed\")\n ->where(\"video_id\", \"=\", $video->video_id)\n ->update(['status' => 1, 'no_of_times' => ($video->no_of_times + 1)]);\n\n $dataV['name'] = $video->name;\n $dataV['size'] = $video->size;\n $dataV['client_id'] = $video->client_id;\n $dataV['vimeo_id'] = $video->video_id;\n $dataV['time_started'] = Carbon::now();\n $dataV['time_ended'] = 'in-process';\n $dataV['elapsed_time'] = 'in-process';\n $dataV['status'] = '0';\n DB::table('vimeo_videos')\n ->insert($dataV);\n\n $fromUrl = $video->video_main_url;\n try {\n // lets make a directory.\n try{\n exec(mkdir('/var/www/example/'.$video->client_id, 0777));\n }catch (\\Exception $ex){\n //if already created\n Log::info($ex->getMessage());\n }\n // start downloading the exact video.\n exec('wget \"' . $fromUrl . '\" -O /var/www/example/'.$video->client_id.'/'. $video->video_id.'.mp4', $output);\n \\Log::info($output);\n $ended_time = Carbon::now();\n // now time to update ended time and elapsed time.\n\n $totalDuration = $ended_time->diffInSeconds($dataV['time_started']);\n DB::table('vimeo_videos')\n ->where(\"vimeo_id\",\"=\",$video->video_id)->update(['time_ended' => $ended_time, 'elapsed_time' => $totalDuration, 'status' => 2]);\n\n DB::table(\"videos_feed\")\n ->where(\"video_id\", \"=\", $video->video_id)\n ->update(['status' => 2]);\n\n } catch (\\Exception $ex) {\n Log::info($ex->getMessage());\n DB::table('vimeo_videos')\n ->where(\"vimeo_id\",\"=\",$video->video_id)->update(['fail_reason' => $ex->getMessage()]);\n\n DB::table(\"videos_feed\")\n ->where(\"video_id\", \"=\", $video->video_id)\n ->update(['status' => 3]);\n }\n\n }\n\n }", "title": "" }, { "docid": "9578d2a066e44648cb30aa7e1eb31489", "score": "0.5738781", "text": "public function watchVideo() {\n\n\t\t\t$detect = new MobileDetect();\n\n\t\t\tif ($detect->isMobile()) {\n\t\t\t\t$height = 'style=\"height:70%; width:70% \"';\n\t\t\t} else {\n\t\t\t\t$height = 'height=\"360\" width=\"640\" ';\n\t\t\t}\n\t\t\t$this->content =\n\t\t\t\t\t'<video id=\"video\" '.$height.' preload=\"none\" >\n\t\t\t\t\t\t<!-- Pseudo HTML5 -->\n \t\t\t\t\t\t<source src=\"'.$this->download.'\" />\n\t\t\t\t\t</video>';\n\n\n\t\t}", "title": "" }, { "docid": "379726f36c3ad3c305e660d1a0c00341", "score": "0.57375497", "text": "public function processAction($video_id, $filetype){\n $ffmpeg_path = Engine_Api::_()->getApi('settings', 'core')->video_ffmpeg_path;\n if( !$ffmpeg_path || !file_exists($ffmpeg_path)) {\n throw new Video_Model_Exception('Ffmpeg not found');\n }\n if( !is_executable($ffmpeg_path) ) {\n throw new Video_Model_Exception('Ffmpeg found, but is not executable');\n }\n\n // Get the video object\n $video = Engine_Api::_()->getItem('video', $video_id);\n $video->status = 2;\n $video->save();\n\n $db = Engine_Api::_()->getDbtable('videos', 'video')->getAdapter();\n $db->beginTransaction();\n\n try\n {\n // Set up correct file names\n $org_location = APPLICATION_PATH.'/temporary/video/'.$video->video_id.\".\".$filetype;\n $flv_filename = APPLICATION_PATH . '/temporary/video/'.$video->video_id.'_vconverted.flv';\n $img_filename = APPLICATION_PATH . '/temporary/video/'.$video->video_id.'_vthumb.jpg';\n\n // process conversion\n $command = \"$ffmpeg_path -i $org_location -ab 64k -ar 44100 -qscale 5 -vcodec flv -f flv -r 25 -s 480x386 -v 2 -y $flv_filename 2>&1\";\n $shell = $org_location.$flv_filename;\n $shell .= shell_exec($command);\n\n if(APPLICATION_ENV == 'development'){\n // open video log file\n $writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/temporary/log/video.log');\n $logger = new Zend_Log($writer);\n\n // write to the log\n $logger->info($shell);\n }\n\n $success = false;\n\n if (!preg_match(\"/Unknown format/i\", $shell) && !preg_match(\"/Unsupported codec/i\", $shell) && !preg_match(\"/video:0kB/i\", $shell) && !preg_match(\"/patch welcome/i\", $shell)){\n $success = true;\n }\n\n // If video conversion was a success\n if ($success){\n // Get duration of the video to caculate where to get the thumbnail\n $duration = $shell;\n $search='/Duration: (.*?)[.]/';\n $duration=preg_match($search, $duration, $matches, PREG_OFFSET_CAPTURE);\n $duration = $matches[1][0];\n list($hours, $minutes, $seconds) = preg_split('[:]', $duration);\n $duration = ceil($seconds + $minutes*(60) + $hours*(3600));\n $success = false;\n\n if(APPLICATION_ENV == 'development'){\n $log_filename = APPLICATION_PATH . '/temporary/video/'.$video->video_id.\"_development_video_log2.txt\";\n $f = fopen($log_filename, \"w\");\n fwrite($f, $shell);\n fclose($f);\n }\n\n // process thumbnail\n $command = \"$ffmpeg_path -i $flv_filename -f image2 -ss 4.00 -v 2 -vframes 1 $img_filename\";\n $shell = shell_exec($command);\n\n\n // after thumbnail is made store it, the code below is using the wrong file path.\n // need to get the correct address\n $video_params = Array('parent_id'=>$video->video_id, 'parent_type'=>$video->getType(), 'user_id'=>$video->owner_id);\n try\n {\n $videoFile = Engine_Api::_()->storage()->create($flv_filename, $video_params);\n }\n catch (Exception $e)\n {\n $video->status = 7;\n $video->save();\n $db->commit();\n\n // delete the files from temp dir\n unlink($org_location);\n unlink($flv_filename);\n unlink($img_filename);\n\n return;\n }\n $image = Engine_Image::factory();\n $image->open($img_filename)\n ->resize(120, 240)\n ->write($img_filename)\n ->destroy();\n try\n {\n $thumbFileRow = Engine_Api::_()->storage()->create($img_filename, $video_params);\n }\n catch (Exception $e)\n {\n $video->status = 7;\n $video->save();\n $db->commit();\n\n // delete the files from temp dir\n unlink($org_location);\n unlink($flv_filename);\n unlink($img_filename);\n\n return;\n }\n\n\n // Video processing was a success!\n // Save the information\n $video->photo_id = $thumbFileRow->file_id;\n $video->file_id = $videoFile->file_id;\n $video->duration = $duration;\n $video->status = 1;\n $video->save();\n\n // delete the files from temp dir\n unlink($org_location);\n unlink($flv_filename);\n unlink($img_filename);\n }\n else {\n if (preg_match(\"/Unsupported codec/i\", $shell)){\n $video->status = 3;\n }\n else if (preg_match(\"/video:0kB/i\", $shell)){\n $video->status = 5;\n }\n else $video->status = 3;\n\n $video->save();\n\n // output a log file to the temp directory with the filename as the id of the video in question\n //APPLICATION_PATH . '/temporary/video/'.$video->video_id.\".\".$file_ext;\n $log_filename = APPLICATION_PATH . '/temporary/video/'.$video->video_id.\"_failed.txt\";\n $f = fopen($log_filename, \"w\");\n fwrite($f, $shell);\n fclose($f);\n\n // @todo add video failed notification to member\n }\n $db->commit();\n }\n catch( Exception $e )\n {\n $db->rollBack();\n return;\n }\n\n // insert action in a seperate transaction if video status is a success\n if ($video->status == 1){\n $db->beginTransaction();\n try {\n $owner = $video->getOwner();\n\n // new action\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($owner, $video, 'video_new');\n if ($action!=null) Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n\n // notify the owner\n Engine_Api::_()->getDbtable('notifications', 'activity')->addNotification($owner, $owner, $video, 'video_processed');\n\n $db->commit();\n } catch( Exception $e ) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "e460d65cdb1c35bdae0d397beede1684", "score": "0.5713765", "text": "static function nev_check_for_ffmpeg(){\n $nonce = $_POST['nonce'];\n if( !wp_verify_nonce($nonce, 'nev_nonce') ){\n header(\"HTTP/1.0 403 Security Check.\");\n exit;\n }\n\n if( empty( $_POST[ 'ffmpeg_path' ] ) ){\n header(\"HTTP/1.0 403 Provided path is empty.\");\n exit;\n }\n \n if (!is_user_logged_in()){\n header(\"HTTP/1.0 403 Security Check.\");\n exit;\n\t\t\t}\n\n $nev_ffmpeg_path = (string) stripslashes_deep( $_POST[ 'ffmpeg_path' ] );\n\n exec('command -v ' . $nev_ffmpeg_path . 'ffmpeg', $cmd_output, $cmd_status);\n\n if( $cmd_status === 0 ){\n update_site_option( 'nev_ffmpeg_path', $nev_ffmpeg_path );\n echo json_encode( array( 'success' => true, 'status_code' => $cmd_status, 'output' => $cmd_output[0] ) );\n }else{\n echo json_encode( array( 'status_code' => $cmd_status, 'output' => $cmd_output[0] ) );\n }\n\n exit;\n }", "title": "" }, { "docid": "1951a87ced43a8bba889ec8e8001e263", "score": "0.5709525", "text": "function findvideo( &$chctx, $channel, $busname )\r\n{\r\n\tglobal $conn ;\r\n\r\n $ret = false ;\r\n\t$searchtime = $chctx['ve'];\r\n\t@$st = new DateTime($searchtime);\r\n\tif( empty($st) ) {\r\n\t\t$st=new DateTime(\"2000-01-01\");\r\n\t}\r\n\r\n\t// find video ending after $chctx['ve']\r\n\t$sql = \"SELECT time_start, time_end, TIMESTAMPDIFF(SECOND, time_start, time_end ) AS length, path FROM videoclip WHERE vehicle_name = '$busname' AND channel = $channel AND time_end > '$searchtime' ORDER BY time_start\" ;\r\n\r\n\theader(\"X-log-findvideo: \".$sql);\r\n\t\r\n\tif( $result = $conn->query($sql, MYSQLI_USE_RESULT) ) {\r\n\t\twhile( $row=$result->fetch_array() ) {\r\n\t\t\tif( vfile_exists ( $row['path'] ) ) {\r\n\t\t\t\r\n\t\t\t\t$chctx['v'] = $row['path'] ;\t\t\t// video file\r\n\t\t\t\t$chctx['vt'] = $row['time_start'] ;\t\t// video file time\r\n\t\t\t\t$chctx['ve'] = $row['time_end'] ;\t\t// video file end time\r\n\t\t\t\t$chctx['vl'] = $row['length'] ;\t\t\t// video file time length\r\n\t\t\t\t$chctx['vs'] = vfile_size($chctx['v']) ;\t// video file size\r\n\t\t\t\t\r\n\t\t\t\tif( $chctx['vs']<1000 ) {\r\n\t\t\t\t\t// file size too small ?\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$chctx['no'] = $chctx['hs'] ;\t\t\t// next frame offset\r\n\t\t\t\t$chctx['nt'] = 0 ;\t\t\t\t\t\t// next frame time (ms diff from file time)\r\n\r\n\t\t\t\t$chctx['nh'] = 1 ;\t\t\t\t\t\t// indicate new header should be output\r\n\t\t\t\t\r\n\t\t\t\t$chctx['k'] = substr_replace( $chctx['v'], \"k\", -3 ) ;\t\t// key file\r\n\t\t\t\t$chctx['ko'] = 0 ;\t\t\t\t\t\t\t\t\t\t\t// key file offset\r\n\t\t\t\t\r\n\t\t\t\tif( ($kfile = vfile_open($chctx['k'])) ) {\r\n\t\t\t\t\t$line = vfile_gets( $kfile ) ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$off = 0 ;\r\n\t\t\t\t\t$dms = 0 ; \r\n\t\t\t\t\tif( sscanf( $line, \"%d,%d\", $dms, $off )==2 ) {\r\n\t\t\t\t\t\t$chctx['hs'] = $off ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// detect offset\r\n\t\t\t\t\tvfile_seek($kfile,0);\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile( $lines = vfile_readlines( $kfile, 1000 ) ) {\r\n\t\t\t\t\t\tfor( $i=0; $i<count($lines); $i++ ) {\r\n\t\t\t\t\t\t\tif( sscanf( $lines[$i]['text'], \"%d,%d\", $dms, $off )==2 ) {\r\n\t\t\t\t\t\t\t\t$chctx['no'] = $off ;\r\n\t\t\t\t\t\t\t\t$chctx['nt'] = $dms ;\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$ft = new DateTime( $chctx['vt'] );\t\t\r\n\t\t\t\t\t\t\t\t$di = new DateInterval( 'PT'.((integer)($dms/1000)).'S') ;\r\n\t\t\t\t\t\t\t\t$ft->add( $di );\r\n\t\t\t\t\t\t\t\tif( $ft >= $st ) {\r\n\t\t\t\t\t\t\t\t\t// detect offset\r\n\t\t\t\t\t\t\t\t\t$chctx['ko'] = $lines[$i]['npos'] ;\r\n\t\t\t\t\t\t\t\t\t$ret = true ;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif( $ret ) break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvfile_close( $kfile );\r\n\t\t\t\t\tif( $ret ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\t\t// no usable key file\r\n\t\t\t\t\t// do something\r\n\t\t\t\t\t$ft = new DateTime( $chctx['vt'] );\r\n\t\t\t\t\tif( $st <= $ft ) {\r\n\t\t\t\t\t\t$chctx['no'] = $chctx['hs'] ;\t\t\t// next frame offset\r\n\t\t\t\t\t\t$chctx['nt'] = 0 ;\t\t\t\t\t\t// next frame time (ms diff from file time)\r\n\t\t\t\t\t\t$ret = true ;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$diffs = $st->getTimestamp() - $ft->getTimestamp();\r\n\t\t\t\t\t\tif( $diffs < $chctx['vl'] ) {\r\n\t\t\t\t\t\t\t$chctx['no'] = (integer)( $diffs * $chctx['vs'] / $chctx['vl'] ) + $chctx['hs'] ;\r\n\t\t\t\t\t\t\t$chctx['no'] &= ~3 ;\r\n\t\t\t\t\t\t\t$chctx['nt'] = 0 ;\t\t\t\t\t\t// next frame time (ms diff from file time)\r\n\t\t\t\t\t\t\t$ret = true ;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$result->free();\r\n\t}\r\n\r\n\treturn $ret ;\r\n}", "title": "" }, { "docid": "b871564db86c15120e3f38e184540762", "score": "0.57051915", "text": "public function getVideo()\n {\n \n return $this->video;\n }", "title": "" }, { "docid": "fc8c568fb4b0f34ae2ca4a660a6c9d13", "score": "0.5695646", "text": "function GetVideoElem($video_info)\n{\n\t$video_xref = $video_info[\"xref\"];\n\t$video_desc = $video_info[\"vname\"];\n\t$items = explode('\\\\',$video_xref);\n\t$items_ct = count($items);\n $video_path = $_SESSION[\"web_video_basepath\"] .\"/\".$items[$items_ct-3] .\"/\". $items[$items_ct-2].\"/\". $items[$items_ct-1];\n\techo \"<div class=\\\"video\\\">\\n\";\n\t//echo \"<video id='vidvid' controls>\\n\";\n //echo \"<source src=\\\"\".$video_path.\"\\\" type=\\\"video/mp4\\\">\\n\";\n //echo \"</video>\\n\";\n\techo \"<a href=\\\"\".$video_path.\"\\\" id=\\\"player\\\" style=\\\"display:block;width:320px;height:220px\\\" ></a>\";\n\techo \"<script>\\n\";\n\techo \"flowplayer(\\\"player\\\", \\\"flowplayer-3.2.16.swf\\\")\";\n\techo \"</script>\\n\";\n\t//echo \"<div id=\\\"vid_desc\\\">$video_desc</div>\\n\";\n\techo \"<div id=\\\"vid_desc\\\"></div>\\n\";\n echo \"</div>\\n\";\n}", "title": "" }, { "docid": "3f11800d1758775f434eeafafd9bd307", "score": "0.5691754", "text": "function si_get_video_image($url){\r\n\tif(preg_match('/youtube/', $url)) {\t\t\t\r\n\t\tif(preg_match('/[\\\\?\\\\&]v=([^\\\\?\\\\&]+)/', $url, $matches)) {\r\n\t\t\treturn \"http://img.youtube.com/vi/\".$matches[1].\"/default.jpg\"; \r\n\t\t}\r\n\t}\r\n\telseif(preg_match('/vimeo/', $url)) {\t\t\t\r\n\t\tif(preg_match('~^http://(?:www\\.)?vimeo\\.com/(?:clip:)?(\\d+)~', $url, $matches))\t{\r\n\t\t\t\t$id = $matches[1];\t\r\n\t\t\t\tif (!function_exists('curl_init')) die('CURL is not installed!');\r\n\t\t\t\t$url = \"http://vimeo.com/api/v2/video/\".$id.\".php\";\r\n\t\t\t\t$ch = curl_init();\r\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\t\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\r\n\t\t\t\t$output = unserialize(curl_exec($ch));\r\n\t\t\t\t$output = $output[0][\"thumbnail_medium\"]; \r\n\t\t\t\tcurl_close($ch);\r\n\t\t\t\treturn $output;\r\n\t\t}\r\n\t}\t\t\r\n}", "title": "" }, { "docid": "7060049a18d943b9f0da35c4dbaeb0a0", "score": "0.56915754", "text": "public static function video( $params )\n\t{\n\t}", "title": "" }, { "docid": "2e775177a723d603e145a5acf7f0abf7", "score": "0.5673656", "text": "function upload($query){\n $extension = \"ffmpeg\";\n $extension_soname = $extension . \".\" . PHP_SHLIB_SUFFIX;\n $extension_fullname = '/usr/local/bin/ffmpeg' . \"/\" . $extension_soname;\n\n // load extension\n if(!extension_loaded($extension)) {\n dl($extension_soname) or die(\"Can't load extension $extension_fullname\\n\");\n }\n\n try\n { \n $this->val($query);\n\n \n\n //extension_loaded('ffmpeg') or die('Error in loading ffmpeg');\n $ext = pathinfo($query['fileName'], PATHINFO_EXTENSION);\n $rand = rand(1000,9999);\n $path = \"../video\";\n $newName = $rand . \"_\" . time() .'.' . $ext; \n $thumbName = $rand . \"_\" . time() .'.jpg';\n move_uploaded_file($query['file'], $path.'/'.$newName);\n $path = realpath($path.'/'.$newName); \n $thumbPath = '../video/'.$thumbName; //tuve q modificar la ruta pq si no no lo guardaba en la BD , no se pq...\n\n\n function getThumbImage($route, $thumbRoute){ // ver pq se ejecuta antes de instanciarla esta puta function\n\n/*\n $ffmpeg = FFMpeg\\FFMpeg::create();\n $video = $ffmpeg->open($route);\n $frame = $video->frame(FFMpeg\\Coordinate\\TimeCode::fromSeconds(1));\n $imageName = $frame->save($thumbRoute.uniqid().'jpg');\n*/\n\n $movie = new ffmpeg_movie($route,false);\n $videoDuration = $movie->getDuration();\n $frameCount = $movie->getFrameCount();\n $frameRate = $movie->getFrameRate();\n $videoTitle = $movie->getTitle();\n $author = $movie->getAuthor() ;\n $copyright = $movie->getCopyright();\n $frameHeight = $movie->getFrameHeight();\n $frameWidth = $movie->getFrameWidth();\n\n $capPos = ceil($frameCount/4);\n\n if($frameWidth>120)\n {\n $cropWidth = ceil(($frameWidth-120)/2);\n }\n else\n {\n $cropWidth =0;\n }\n if($frameHeight>90)\n {\n $cropHeight = ceil(($frameHeight-90)/2);\n }\n else\n {\n $cropHeight = 0;\n }\n if($cropWidth%2!=0)\n {\n $cropWidth = $cropWidth-1;\n }\n if($cropHeight%2!=0)\n {\n $cropHeight = $cropHeight-1;\n }\n\n $frameObject = $movie->getFrame($capPos);\n\n\n if($frameObject)\n {\n $imageName = $thumbRoute;\n $tmbPath = $imageName;\n $frameObject->resize(480,270,0,0,0,0); //120 x90\n imagejpeg($frameObject->toGDImage(),$tmbPath);\n }\n else\n {\n $imageName=\"\";\n }\n \n return $imageName;\n }\n \n getThumbImage($path, $thumbPath);\n\n $title = $query['title'];\n $caption = $query['caption'];\n $pet_id = $query['pet_id'];\n $path = $newName;\n $thumbPath = $thumbName;\n\n\n \n $query = array(\n 'video'=>$path, \n 'title'=>$title, \n 'caption'=>$caption, \n 'thumbnail'=>$thumbPath, //tuve q modificar la ruta pq si no no lo guardaba en la BD , no se pq...\n 'pet_id'=> $pet_id\n );\n\n $this->table->upload($query);\n return true;\n }\n\n catch(Exception $e)\n {\n $this->err = $e->getMessage();\n return false;\n }\n }", "title": "" }, { "docid": "8404000b6f9153fe80c414a0dc86c537", "score": "0.5648251", "text": "private function prepare()\n {\n $errors = $this->validate();\n if (! $errors['valid']) {\n return $errors;\n }\n\n $this->title = filter_var($this->title, \\FILTER_SANITIZE_STRING);\n $this->description = filter_var($this->description, \\FILTER_SANITIZE_STRING);\n \n $videoInfo = self::parseVideoUrl($this->url);\n $this->videosource = $videoInfo['source'];\n $this->videoid = $videoInfo['id'];\n \n switch ($this->videosource) {\n case 'youtube':\n $this->image = \"video-{$this->videoid}.png\";\n $ch = curl_init(\"http://img.youtube.com/vi/{$this->videoid}/0.jpg\");\n curl_setopt($ch, \\CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, \\CURLOPT_RETURNTRANSFER, 1);\n $image = curl_exec($ch);\n $image = ImageWorkshop::initFromString($image);\n $image->save(self::UPLOAD_DIR, $this->image, true);\n break;\n }\n \n $result = array(\n 'title' => $this->title,\n 'videoid' => $this->videoid,\n 'videosource' => $this->videosource,\n 'description' => $this->description,\n 'image' => $this->image\n );\n \n return $result;\n }", "title": "" }, { "docid": "034f0a6502936191417f51ce45b33c9d", "score": "0.5645298", "text": "function get_video_info_by_id ($video_id) {\n $video = get_post($video_id, OBJECT);\n return get_video_arr($video);\n}", "title": "" }, { "docid": "d20c3b4cdc8e5e750b6650cb60fc3b1d", "score": "0.5618377", "text": "function video_detailsbyurl($videourl=null,$sessionid=null) {\n if($videourl && !strpos($videourl, 'explore')) $videourl = str_replace('viddler.com/', 'viddler.com/explore/', $url);\n \n $videoDetails = $this->sendRequest('viddler.videos.getDetails','sessionid='.$sessionid.'&url='.$videourl);\n \n return $videoDetails;\n }", "title": "" }, { "docid": "2915cc24fb1fa6e22fd718a466c960d6", "score": "0.5583567", "text": "function convert($file=NULL,$for_iphone=false)\r\n\t{\r\n\t\tglobal $db;\r\n\t\tif($file)\r\n\t\t\t$this->input_file = $file;\r\n\t\t\r\n\t\t$this->log .= \"\\r\\nConverting Video\\r\\n\";\r\n\t\t$fileDetails = json_encode($this->input_details);\r\n\t\tfile_put_contents(\"/home/sajjad/Desktop/inputFileDetails.txt\", $fileDetails);\r\n\r\n\t\t$p = $this->configs;\r\n\r\n\t\t\r\n\t\t$i = $this->input_details;\r\n\t\t\r\n\t\t# Prepare the ffmpeg command to execute\r\n\t\tif(isset($p['extra_options']))\r\n\t\t\t$opt_av .= \" -y {$p['extra_options']} \";\r\n\r\n\t\t# file format\r\n\t\tif(isset($p['format']))\r\n\t\t\t$opt_av .= \" -f {$p['format']} \";\r\n\t\t\t//$opt_av .= \" -f mp4 \";\r\n\t\t\t\r\n\t\t# video codec\r\n\t\tif(isset($p['video_codec']))\r\n\t\t\t$opt_av .= \" -vcodec \".$p['video_codec'];\r\n\t\telseif(isset($i['video_codec']))\r\n\t\t\t$opt_av .= \" -vcodec \".$i['video_codec'];\r\n\t\tif($p['video_codec'] == 'libx264')\r\n\t\t\t$opt_av .= \" -vpre normal \";\r\n # video rate\r\n if($p['use_video_rate'])\r\n {\r\n if(isset($p['video_rate']))\r\n $vrate = $p['video_rate'];\r\n elseif(isset($i['video_rate']))\r\n $vrate = $i['video_rate'];\r\n if(isset($p['video_max_rate']) && !empty($vrate))\r\n $vrate = min($p['video_max_rate'],$vrate);\r\n if(!empty($vrate))\r\n $opt_av .= \" -r $vrate \";\r\n }\r\n \r\n # video bitrate\r\n if($p['use_video_bit_rate'])\r\n {\r\n if(isset($p['video_bitrate']))\r\n $vbrate = $p['video_bitrate'];\r\n elseif(isset($i['video_bitrate']))\r\n $vbrate = $i['video_bitrate'];\r\n if(!empty($vbrate))\r\n $opt_av .= \" -b:v $vbrate \";\r\n }\r\n \r\n \r\n\t\t# video size, aspect and padding\r\n\t\t\r\n\t\t$this->calculate_size_padding( $p, $i, $width, $height, $ratio, $pad_top, $pad_bottom, $pad_left, $pad_right );\r\n\t\t$use_vf = config('use_ffmpeg_vf');\r\n\t\tif($use_vf=='no')\r\n\t\t{\r\n\t\t$opt_av .= \" -s {$width}x{$height} -aspect $ratio -padcolor 000000 -padtop $pad_top -padbottom $pad_bottom -padleft $pad_left -padright $pad_right \";\r\n\t\t}else\r\n\t\t{\r\n\t\t\t$opt_av .= \"-s {$width}x{$height} -aspect $ratio -vf pad=0:0:0:0:black\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t# audio codec, rate and bitrate\r\n\t\tif($p['use_audio_codec'])\r\n\t\t{\r\n\t\t\tif(!empty($p['audio_codec']) && $p['audio_codec'] != 'None'){\r\n\t\t\t\t$opt_av .= \" -acodec {$p['audio_codec']}\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t# audio bitrate\r\n\t\tif($p['use_audio_bit_rate'])\r\n\t\t{\r\n\t\t\tif(isset($p['audio_bitrate']))\r\n\t\t\t\t$abrate = $p['audio_bitrate'];\r\n\t\t\telseif(isset($i['audio_bitrate']))\r\n\t\t\t\t$abrate = $i['audio_bitrate'];\r\n\t\t\tif(!empty($abrate))\r\n\t\t\t{\r\n\t\t\t\t$abrate_cmd = \" -ab $abrate \";\r\n\t\t\t\t$opt_av .= $abrate_cmd;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t# audio bitrate\r\n\t\tif(!is_numeric($this->input_details['audio_rate']))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$opt_av .= \" -an \";\r\n\t\t}elseif($p['use_audio_rate'])\r\n\t\t{\r\n\t\t\tif(!$this->validChannels($this->input_details))\r\n\t\t\t{\r\n\t\t\t\t$arate = $i['audio_rate'];\r\n\t\t\t\t$opt_av .= $arate_cmd = \" -ar $arate \";\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tif(isset($p['audio_rate']))\r\n\t\t\t\t\t$arate = $p['audio_rate'];\r\n\t\t\t\telseif(isset($i['audio_rate']))\r\n\t\t\t\t\t$arate = $i['audio_rate'];\r\n\t\t\t\tif(!empty($arate))\r\n\t\t\t\t\t$opt_av .= $arate_cmd = \" -ar $arate \";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmp_file = time().RandomString(5).'.tmp';\r\n\t\t\r\n\t\t//$opt_av .= '-'.$this->vconfigs['map_meta_data'].\" \".$this->output_file.\":\".$this->input_file;\r\n\t\r\n\t\t$this->raw_command = $command = $this->ffmpeg.\" -i \".$this->input_file.\" $opt_av \".$this->output_file.\" 2> \".TEMP_DIR.\"/\".$tmp_file;\r\n\t\t\r\n\t\t//Updating DB\r\n\t\t//$db->update($this->tbl,array('command_used'),array($command),\" id = '\".$this->row_id.\"'\");\r\n\t\t\r\n\t\tif(!$for_iphone)\r\n\t\t{\r\n\t\t\t$output = $this->exec($command);\r\n\t\t\tif(file_exists(TEMP_DIR.'/'.$tmp_file))\r\n\t\t\t{\r\n\t\t\t\t$output = $output ? $output : join(\"\", file(TEMP_DIR.'/'.$tmp_file));\r\n\t\t\t\tunlink(TEMP_DIR.'/'.$tmp_file);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t#FFMPEG GNERETAES Damanged File\r\n\t\t\t#Injecting MetaData ysing FLVtool2 - you must have update version of flvtool2 ie 1.0.6 FInal or greater\r\n\t\t\tif($this->flvtoolpp && file_exists($this->output_file) && @filesize($this->output_file)>0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tmp_file = time().RandomString(5).'flvtool2_output.tmp';\r\n\t\t\t\t\t$flv_cmd = $this->flvtoolpp.\" \".$this->output_file.\" \".$this->output_file.\" 2> \".TEMP_DIR.\"/\".$tmp_file;\r\n\t\t\t\t\t$flvtool2_output = $this->exec($flv_cmd);\r\n\t\t\t\t\tif(file_exists(TEMP_DIR.'/'.$tmp_file))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flvtool2_output = $flvtool2_output ? $flvtool2_output : join(\"\", file(TEMP_DIR.'/'.$tmp_file));\r\n\t\t\t\t\t\tunlink(TEMP_DIR.'/'.$tmp_file);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$output .= $flvtool2_output;\r\n\t\t\t\t\t\r\n\t\t\t}elseif($this->flvtool2 && file_exists($this->output_file) && @filesize($this->output_file)>0)\r\n\t\t\t{\r\n\t\t\t\t$tmp_file = time().RandomString(5).'flvtool2_output.tmp';\r\n\t\t\t\t$flv_cmd = $this->flvtool2.\" -U \".$this->output_file.\" 2> \".TEMP_DIR.\"/\".$tmp_file;\r\n\t\t\t\t$flvtool2_output = $this->exec($flv_cmd);\r\n\t\t\t\tif(file_exists(TEMP_DIR.'/'.$tmp_file))\r\n\t\t\t\t{\r\n\t\t\t\t\t$flvtool2_output = $flvtool2_output ? $flvtool2_output : join(\"\", file(TEMP_DIR.'/'.$tmp_file));\r\n\t\t\t\t\tunlink(TEMP_DIR.'/'.$tmp_file);\r\n\t\t\t\t}\r\n\t\t\t\t$output .= $flvtool2_output;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->log('Conversion Command',$command);\r\n\t\t\t$this->log .=\"\\r\\n\\r\\nConversion Details\\r\\n\\r\\n\";\r\n\t\t\t$this->log .=$output;\r\n\t\t\t$this->output_details = $this->get_file_info($this->output_file);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Generating Mp4 for iphone\r\n\t\tif($this->generate_iphone && $for_iphone)\r\n\t\t{\r\n\t\t\t$this->log .=\"\\r\\n\\r\\n== Generating Iphone Video ==\\r\\n\\r\\n\";\r\n\t\t\t$tmp_file = 'iphone_log.log';\r\n\t\t\t$iphone_configs = \"\";\r\n\t\t\t$iphone_configs .= \" -acodec libfaac \";\r\n\t\t\t$iphone_configs .= \" -vcodec mpeg4 \";\r\n\t\t\t$iphone_configs .= \" -r 25 \";\r\n\t\t\t$iphone_configs .= \" -b 600k \";\r\n\t\t\t$iphone_configs .= \" -ab 96k \";\r\n\t\t\t\r\n\t\t\tif($this->input_details['audio_channels']>2)\r\n\t\t\t{\r\n\t\t\t\t$arate = $i['audio_rate'];\r\n\t\t\t\t$iphone_configs .= $arate_cmd = \" -ar $arate \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$p['video_width'] = '480';\r\n\t\t\t$p['video_height'] = '320';\r\n\t\t\t\r\n\t\t\t$this->calculate_size_padding( $p, $i, $width, $height, $ratio, $pad_top, $pad_bottom, $pad_left, $pad_right );\r\n\t\t\t$iphone_configs .= \" -s {$width}x{$height} -aspect $ratio\";\r\n\t\t\t\r\n\r\n\t\t\t$command = $this->ffmpeg.\" -i \".$this->input_file.\" $iphone_configs \".$this->raw_path.\"-m.mp4 2> \".TEMP_DIR.\"/\".$tmp_file;\r\n\t\t\t$this->exec($command);\r\n\t\t\t\r\n\t\t\tif(file_exists(TEMP_DIR.'/'.$tmp_file))\r\n\t\t\t{\r\n\t\t\t\t$output = $output ? $output : join(\"\", file(TEMP_DIR.'/'.$tmp_file));\r\n\t\t\t\tunlink(TEMP_DIR.'/'.$tmp_file);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(file_exists($this->raw_path.\"-m.mp4\") && filesize($this->raw_path.\"-m.mp4\")>0)\r\n\t\t\t{\r\n\t\t\t\t$this->has_mobile = 'yes';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->log('== iphone Conversion Command',$command);\r\n\t\t\t$this->log .=\"\\r\\n\\r\\nConversion Details\\r\\n\\r\\n\";\r\n\t\t\t$this->log .=$output;\r\n\t\t\t\r\n\t\t\t$this->log .=\"\\r\\n\\r\\n== Generating Iphone Video Ends ==\\r\\n\\r\\n\";\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ec82b1d04ed2c257b4e014edacac6c28", "score": "0.5578474", "text": "function _getInfo(){\n\t\t\n\t\t$parsedXml = $this->_readXML();\n\t\tCakeLog::write('mediainfo',print_r($parsedXml,true));\n\t\tif(!empty($parsedXml['Mediainfo']['File']['track'][0]['Complete_name'])){\n\t\t\t$this->mediaParams['filename']= $parsedXml['Mediainfo']['File']['track'][0]['Complete_name'];\n\t\t\t//Duration can be an array so check and get the first value \n\t\t\t$this->mediaParams['runtime'] = (is_array($parsedXml['Mediainfo']['File']['track'][0]['Duration']))?$parsedXml['Mediainfo']['File']['track'][0]['Duration'][0]:$parsedXml['Mediainfo']['File']['track'][0]['Duration'];\n\t\t\t$this->mediaParams['fps'] = floatval($parsedXml['Mediainfo']['File']['track'][1]['Frame_rate']);\n\t\t\t$this->mediaParams['height']= $parsedXml['Mediainfo']['File']['track'][1]['Height'];\n\t\t\t$this->mediaParams['width']\t= $parsedXml['Mediainfo']['File']['track'][1]['Width'];\n\t\t\t$this->mediaParams['video_codec'] = $parsedXml['Mediainfo']['File']['track'][1]['Codec_ID'];\n\t\t\t$this->mediaParams['video_bitrate'] = $parsedXml['Mediainfo']['File']['track'][1]['Bit_rate'];\n\t\t\t$this->mediaParams['audio_bitrate'] = $parsedXml['Mediainfo']['File']['track'][2]['Bit_rate'];\n\t\t\t$this->mediaParams['format'] = $parsedXml['Mediainfo']['File']['track'][1]['Format'];\n\t\t} else {\n\t\t\t$this->mediaParams = array();\n\t\t}\n\t\treturn $this->mediaParams;\n\t}", "title": "" }, { "docid": "c53e28346343c9721cbebbcf5420df42", "score": "0.5577008", "text": "public function convertAction()\n {\n $id = $this->params('id');\n $module = $this->params('module');\n\n // Check id\n if (!$id) {\n $message = __('Please select video');\n $this->jump(['action' => 'index'], $message, 'error');\n }\n\n // Get video\n $video = Pi::api('video', 'video')->getVideo($id);\n\n // Get server\n $serverList = Pi::registry('serverList', 'video')->read();\n $server = $serverList[$video['video_server']];\n\n // Set video path\n $sourcePath = Pi::path(sprintf('%s/%s', $video['video_path'], $video['video_file']));\n\n // Check file exist\n if (!Pi::service('file')->exists($sourcePath)) {\n $message = __('Video file not exist');\n $this->jump(['action' => 'index'], $message, 'error');\n }\n\n // Set convert dimension\n $dimensionList = Pi::api('convert', 'video')->getDimensionList();\n\n // Convert\n $convertResult = [];\n foreach ($dimensionList as $dimensionSingle) {\n\n // Set convert name\n $convertName = sprintf(\n '%s-%s.mp4',\n pathinfo($video['video_file'], PATHINFO_FILENAME),\n $dimensionSingle['name']\n );\n\n // Set save path\n $convertPath = Pi::path(sprintf('%s/%s', $video['video_path'], $convertName));\n\n // Check file exist\n if (Pi::service('file')->exists($convertPath)) {\n Pi::service('file')->remove($convertPath);\n }\n\n // Set ffmpeg settings\n $ffmpeg = FFMpeg::create();\n $ffprobe = FFProbe::create();\n $format = new X264('libfdk_aac', 'libx264');\n $dimension = new Dimension((int)$dimensionSingle['width'], (int)$dimensionSingle['height']);\n $duration = (int)$ffprobe->format($sourcePath)->get('duration');\n\n // do convert\n $convert = $ffmpeg->open($sourcePath);\n $convert->filters()->resize($dimension)->synchronize();\n $convert->save($format, $convertPath);\n\n $convertResult[] = [\n 'duration' => $duration,\n 'name' => $convertName,\n 'path' => $convertPath,\n ];\n }\n\n // upload\n $uploadResult = [];\n foreach ($convertResult as $convertSingle) {\n // Set ftp connection\n $ftp = sprintf(\n 'ftp://%s/%s',\n $server['uri'],\n $convertSingle['name']\n );\n\n // Open file\n $fp = fopen($convertSingle['path'], 'r');\n\n // Start upload by curl\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $ftp);\n curl_setopt($ch, CURLOPT_UPLOAD, 1);\n curl_setopt($ch, CURLOPT_INFILE, $fp);\n curl_setopt($ch, CURLOPT_INFILESIZE, filesize($convertSingle['path']));\n curl_setopt($ch, CURLOPT_USERPWD, sprintf('%s:%s', $server['username'], $server['password']));\n curl_exec($ch);\n $chResult = curl_errno($ch);\n curl_close($ch);\n\n // Check result\n if ($chResult == 0) {\n $message = 'File uploaded successfully.';\n $status = 1;\n } else {\n $message = 'File upload error.';\n $status = 0;\n }\n\n // Set result\n $uploadResult[] = [\n 'status' => $status,\n 'message' => $message,\n 'file' => $convertResult,\n ];\n }\n\n // Set single result\n $result = array_shift($uploadResult);\n $result['file'] = array_shift($result['file']);\n\n // Set update values\n $values = [\n 'time_update' => time(),\n 'video_status' => 1,\n 'video_duration' => $result['file']['duration'],\n 'video_file' => $result['file']['name'],\n ];\n\n // Save\n $row = $this->getModel('video')->find($id);\n $row->assign($values);\n $row->save();\n\n // Jump\n $message = __('Video convert and upload successfully');\n $this->jump(['action' => 'index'], $message);\n }", "title": "" }, { "docid": "9481ac0f69efcdefe347d70a7a41a33b", "score": "0.5555045", "text": "protected function exec() {\n $file = $this->params->get_filtered(\"file\", ['Trim', 'NEString', 'DefaultNull']);\n $temp_dir = $this->params->get_filtered(\"dir\", ['Trim', 'NEString', 'DefaultNull']);\n $target_dir = \\Config\\Config::F()->PROTECTED_VIDEOTUTORIALS_BASE . $this->params->get('id');\n $target_name_basis = str_ireplace(\"-\", \"\", $this->params->get('uid'));\n $target_name = \"{$target_name_basis}.webm\";\n $target = $target_dir . DIRECTORY_SEPARATOR . $target_name;\n try {\n //$params = ['file' => $full_path, 'id' => $w->result_id, 'uid' => $conv['uid'], 'mime' => $mime,'dir'=>$x];\n try {\n if ($file && file_exists($file)) {\n $target_dir = \\Config\\Config::F()->PROTECTED_VIDEOTUTORIALS_BASE . $this->params->get('id');\n if (!(file_exists($target_dir) && is_dir($target_dir) && is_writeable($target_dir))) {\n @mkdir($target_dir, 0777, true);\n }\n if (!(file_exists($target_dir) && is_dir($target_dir) && is_writeable($target_dir))) {\n \\Errors\\common_error::RF(\"cant create target dir %s\", $target_dir);\n }\n $target_name_basis = str_ireplace(\"-\", \"\", $this->params->get('uid'));\n $target_name = \"{$target_name_basis}.mp4\";\n $target = $target_dir . DIRECTORY_SEPARATOR . $target_name;\n \\Helpers\\Helpers::rm_files_by_regex($target_dir, [\"/^{$target_name_basis}/i\"]);\n if (file_exists($target) && is_file($target) && is_writeable($target)) {\n @unlink($target);\n }\n //ffmpeg -i example.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis example.webm -hide_banner\n //ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 128k -c:a libopus output.webm\n $qual = 30;\n $cmd = \"ffmpeg -i {$file} -c:v libvpx-vp9 -crf {$qual} -b:v 0 -b:a 64k -c:a libopus {$target} -hide_banner\";\n $cmd=\"ffmpeg -i {$file} -c:v h264 -b:a 64k -c:a aac {$target} -hide_banner\";\n $this->log($cmd,'command');\n ob_start();\n $rv = 0;\n passthru($cmd, $rv);\n $output = ob_get_clean();\n $rv === 0 ? 0 : \\Errors\\common_error::R($output);\n $this->log(\"$output\",'info');\n \\DB\\SQLTools\\SQLBuilder::F()->push(\"UPDATE video__group__item SET video=:Pn, mime=:Pm WHERE id=:Pi AND uid=:Pu;\")\n ->push_param(\":Pn\", $target_name)\n ->push_param(\":Pm\", \"video/mp4\")\n ->push_param(\":Pi\", $this->params->get(\"id\"))\n ->push_param(\":Pu\", $this->params->get('uid'))->execute();\n } else {\n \\Errors\\common_error::RF(\"input file not found:`%s`\", $file);\n }\n } catch (\\Throwable $se) {\n \\DB\\SQLTools\\SQLBuilder::F()->push(\"UPDATE video__group__item SET video='error' WHERE id=:P AND uid=:PP\")\n ->push_param(\":P\", $this->params->get('id'))\n ->push_param(\":PP\", $this->params->get('uid'))->execute();\n throw $se;\n }\n } catch (\\Throwable $e) {\n $this->log($e->getMessage(), 'error');\n if ($target && file_exists($target) && is_file($target) && is_writeable($target)) {\n @unlink($target);\n }\n }\n if ($file && file_exists($file) && is_file($file) && is_writeable($file)) {\n @unlink($file);\n }\n if ($temp_dir && file_exists($temp_dir) && is_dir($temp_dir) && is_writable($temp_dir)) {\n if ($this->dir_empty($temp_dir)) {\n @rmdir($temp_dir);\n }\n }\n }", "title": "" }, { "docid": "3bbca84537ec6562120acbafd8cb2fe7", "score": "0.55537117", "text": "public function executeVideo() {\n\n\t\t$this->headerHeading = 'Video with others!';\n\t\t$this->headerTagline = 'HTML5 video tag experiment, way of the future.';\n\t\t\n\t\treturn View::SUCCESS;\n\t\t\n\t}", "title": "" }, { "docid": "da51b82ffceab699dc4e1770d058ab9c", "score": "0.55530226", "text": "function videos_data()\n { //getting videos data function starts\n return $this->get_videosdata();\n }", "title": "" }, { "docid": "127f717d7343a58e0ca3813a9f87d42d", "score": "0.55359125", "text": "private function callback($matches) {\n\t// so we can get correct dimensions for the video\n\t//\n\tglobal $CFG;\n\t$ensembleURL = $CFG->filter_ensemble_url;//'https://ensemble.illinois.edu';\n // Let's get other potential parameters, eh?\n\t$embedInfo = explode('&',$matches[count($matches) - 1]);\n\t$videoID = $embedInfo[0];\n\t$otherParams = '';\n\t$width = 0;\n\t$height = 0;\n\tif (sizeof($embedInfo) > 1)\n\t{\n\t for ($i=1; $i<sizeof($embedInfo); $i++)\n\t {\n\t $atvalpair = explode('=',$embedInfo[$i]);\n\t // get rid of amp; at start of attribute string\n\t if (substr($atvalpair[0],0,4) == 'amp;')\n\t {\n\t\t$atvalpair[0] = substr($atvalpair[0],4);\n\t }\n\t if ($atvalpair[0] == 'height' || $atvalpair[0] == 'videoHeight')\n\t {\n\t $height = $atvalpair[1];\n\t } else if ($atvalpair[0] == 'width' || $atvalpair[0] == 'videoWidth')\n\t {\n\t $width = $atvalpair[1];\n } else\n {\n\t $otherParams = $otherParams . ' data-' . $atvalpair[0] . '=\"' . $atvalpair[1] . '\"';\n\t }\n }\n\t}\n\t$ensemble_query_URL = $ensembleURL . '/app/simpleAPI/video/show.xml/' . $videoID;\n\t$c = new curl();\n\t$response = $c->get($ensemble_query_URL);\n\t$xml = simplexml_load_string($response);\n\tif (!$width) // We want to allow people to set 0 height\n\t{\n\t\t$dimensions = $xml->videoEncodings->dimensions;\n\t\tif ($dimensions == 'x')\n\t\t{\n\t\t\t$dimarray = array('480','0');\n\t\t} else {\n\t\t\t$dimarray = explode('x',(string)$dimensions);\n\t\t}\n\t\t$width = (string)$dimarray[0];\n\t\t$height = (string)$dimarray[1];\n\t\t// Let's make high def stuff sanely sized in the page\n\t\tif ((int)$width > 640)\n\t\t{\n\t\t\t$width = '640';\n\t\t\t$height = (string)floor((float)$width/((float)$dimarray[0]/(float)$height));\n\t\t}\n\t\t// Cleanup forced audio sizing...\n\t\tif ($height == '26') {\n\t\t\t$height = '0';\n\t\t}\n\t}\n\treturn '<div webkitallowFullScreen=\"true\" mozallowFullScreen=\"true\" msallowFullScreen=\"true\" data-videoId=\"' . $videoID . '\" data-autoplay=\"false\" data-captions=\"false\" data-videoWidth=\"' . $width . '\" data-videoHeight=\"' . $height . '\" ' . $otherParams . ' ><script type=\"text/javascript\" src=\"' . $ensembleURL .'/app/atlasplayer/atlasplayer.js\" defer=\"defer\"></script></div>' ;\n\t// end callback\n\t}", "title": "" }, { "docid": "28bba16ffa94702441155d0a5c807ec2", "score": "0.5531409", "text": "public function store(Request $request)\n {\n $user = User::where('api_token', $request->token)->firstOrFail();\n\n // Validate file size\n $file = $request->file('file');\n if ($file->getClientSize() > $file->getMaxFilesize()\n || $file->getClientSize() === 0) {\n return response('File size too large. Max file size is'.$file->getMaxFileSize().' MB.', 400);\n }\n\n // Validate file type\n $validator = Validator::make($request->all(), [\n 'file' => 'required|mimes:mp4',\n ]\n );\n\n if ($validator->fails()) {\n $errors = '';\n foreach ($validator->errors()->get('file') as $error) {\n $errors .= $error . '<br>';\n }\n return response()->json($errors, 400);\n }\n\n // Setup ffmpeg\n $ffprobe = \\FFMpeg\\FFProbe::create([\n 'ffmpeg.binaries' => $this->ffmpeg_path,\n 'ffprobe.binaries' => $this->ffmprope_path,\n ]);\n\n // Get video metadata\n try {\n $info = $ffprobe\n ->streams($request->file)\n ->videos()\n ->first();\n //Log::info(var_export($info, true)); // show all info\n } catch (\\Exception $e) {\n return response()->json('Please try again. Make sure you are uploading a valid file.', 400);\n }\n\n $frame_rate = $info->get('r_frame_rate');\n // Need to eval frame rate ('30000/1001') to get float\n $fps = eval(\"return $frame_rate;\");\n\n // Store meta data of the video\n $video = new OriginalVideo;\n $video->name = $request->name;\n $video->fps = $fps;\n $video->num_frames = $info->get('nb_frames');\n $video->width = $info->get('width');\n $video->height = $info->get('height');\n $video->user_id = $user->id;\n\n // Process and recreate video\n if ($video->save()) {\n $path = $request\n ->file('file')\n ->storeAs('public/original_videos', $video->id.'.mp4');\n $this->extractImages($request->file, $video->id, $fps);\n $this->processImages($video->id);\n $this->createVideo($video->id, $fps);\n return new OriginalVideoResource($video);\n } else {\n Log::warning('Failed to save video.');\n }\n return response('Failed to process video.', 400);\n }", "title": "" }, { "docid": "d6ca9240752106ebba51b70061e7630e", "score": "0.55304587", "text": "public function getVideo()\n {\n return $this->video;\n }", "title": "" }, { "docid": "d6ca9240752106ebba51b70061e7630e", "score": "0.55304587", "text": "public function getVideo()\n {\n return $this->video;\n }", "title": "" }, { "docid": "c6ad6936128103a56079941c2941e16d", "score": "0.55242616", "text": "function gmp_get_video( $height='', $width='', $inlineCSS=true, $imagesize='video' ){\n \n $video = '';\n \n if( genesis_get_custom_field('_gmp_video_uri') ){\n $video = gmp_video_from_uri( genesis_get_custom_field('_gmp_video_uri'), $height, $width );\n \n $video = '<div class=\"gmp-fit-video\">'. gmp_format_video( $video ) .'</div>';\n }\n elseif( genesis_get_custom_field('_gmp_video_embed') ){\n $video = '<div class=\"gmp-fit-video\">'. gmp_format_video( htmlspecialchars_decode( genesis_get_custom_field('_gmp_video_embed') ) ) . '</div>';\n }\n elseif( genesis_get_custom_field('_gmp_video_file') ){\n $video = gmp_video_from_file( genesis_get_custom_field('_gmp_video_file'), $height, $width, $inlineCSS, $imagesize );\n }\n \n return $video;\n}", "title": "" }, { "docid": "1518324186bc183d46f04023917c4b01", "score": "0.55099154", "text": "public function get_media()\n {\n try\n {\n \n $i_media_id = intval($this->input->post('media_id'));\n $width = intval($this->input->post('width'))<=0?'472':intval($this->input->post('width'));\n $height = intval($this->input->post('height'))<=0?'378':intval($this->input->post('height'));\n \n \n $media_info = $this->my_videos_model->get_video_by_id($i_media_id);\n \n if($media_info == '') {\n echo json_encode( array('result'=>'error') );\n exit;\n }\n \n \n /* ******************** Get photo details ************************ */\n \n \n \n try {\n $this->load->library('embed_video');\n $config['zend_library_path'] = APPPATH .\"libraries/Zend/\";\n $config['video_url'] = $media_info;\n \n $this->embed_video->initialize($config);\n $this->embed_video->prepare();\n \n \n $image_source = $this->embed_video->get_player($width,$height);\n }\n catch(Exception $e) {\n //$data['video_exists'] = false;\n $image_source = 'This video has been deleted.';\n }\n \n \n $result_arr['result'] = 'success';\n $result_arr['s_image_source'] = $image_source; \n \n $result_arr['i_media_id'] = $i_media_id;\n \n echo json_encode($result_arr);\n \n \n \n } \n catch(Exception $err_obj)\n {\n \n } \n \n }", "title": "" }, { "docid": "33fb3c716860e3124b6555e2a2fc1074", "score": "0.5491413", "text": "private function craft_ffmpeg_cmd_video(\n $pathToInputFile,\n $pathToOutputFiles,\n $inputAssetInfo, \n $outputDetails)\n {\n // Check if a size is provided to override preset size\n $size = $this->set_output_video_size($inputAssetInfo, $outputDetails);\n \n $videoCodec = $outputDetails->{'preset_values'}->{'video_codec'};\n if (isset($outputDetails->{'video_codec'}))\n $videoCodec = $outputDetails->{'video_codec'};\n \n $audioCodec = $outputDetails->{'preset_values'}->{'audio_codec'};\n if (isset($outputDetails->{'audio_codec'}))\n $audioCodec = $outputDetails->{'audio_codec'};\n\n $videoBitrate = $outputDetails->{'preset_values'}->{'video_bitrate'};\n if (isset($outputDetails->{'video_bitrate'}))\n $videoBitrate = $outputDetails->{'video_bitrate'};\n \n $audioBitrate = $outputDetails->{'preset_values'}->{'audio_bitrate'};\n if (isset($outputDetails->{'audio_bitrate'}))\n $audioBitrate = $outputDetails->{'audio_bitrate'};\n\n $frameRate = $outputDetails->{'preset_values'}->{'frame_rate'};\n if (isset($outputDetails->{'frame_rate'}))\n $frameRate = $outputDetails->{'frame_rate'};\n \n if (isset($outputDetails->{'preset_values'}->{'video_codec_options'}))\n $formattedOptions = \n $this->set_output_video_codec_options($outputDetails->{'preset_values'}->{'video_codec_options'});\n \n // Process options for watermark\n if (isset($outputDetails->{'watermark'}) && $outputDetails->{'watermark'})\n $watermarkOptions = \n $this->get_watermark_options($pathToInputFile,\n $outputDetails->{'watermark'});\n \n // Create FFMpeg arguments\n $ffmpegArgs = \" -i $pathToInputFile -y -threads 0\";\n $ffmpegArgs .= \" -s $size\";\n $ffmpegArgs .= \" -vcodec $videoCodec\";\n $ffmpegArgs .= \" -acodec $audioCodec\";\n $ffmpegArgs .= \" -b:v $videoBitrate\";\n $ffmpegArgs .= \" -b:a $audioBitrate\";\n $ffmpegArgs .= \" -r $frameRate\";\n $ffmpegArgs .= \" $formattedOptions\";\n $ffmpegArgs .= \" $watermarkOptions\";\n \n // Append output filename to path\n $pathToOutputFiles .= \"/\" . $outputDetails->{'output_file_info'}['basename'];\n // Final command\n $ffmpegCmd = \"ffmpeg $ffmpegArgs $pathToOutputFiles\";\n \n return ($ffmpegCmd);\n }", "title": "" }, { "docid": "9f54ba58adad58a35fe56cbca756fb39", "score": "0.5482041", "text": "public function get_media()\n {\n try\n {\n \n $i_media_id = intval($this->input->post('media_id'));\n $width = intval($this->input->post('width'))<=0?'560':intval($this->input->post('width'));\n $height = intval($this->input->post('height'))<=0?'345':intval($this->input->post('height'));\n \n \n $media_info = $this->landing_page_cms_model->get_all_videos(\" where v.id={$i_media_id}\");\n #echo utf8_accents_to_ascii($media_info['s_video_url']);\n \n if($media_info == '') {\n echo json_encode( array('result'=>'error') );\n exit;\n }\n \n //$this->data['current_media_id'] = $i_media_id;\n \n /* ******************** Get photo details ************************ */\n \n \n \n try {\n $this->load->library('embed_video');\n $config['zend_library_path'] = APPPATH .\"libraries/Zend/\";\n $config['video_url'] = $media_info[0]['s_url'];\n \n $this->embed_video->initialize($config);\n $this->embed_video->prepare();\n \n \n $image_source = $this->embed_video->get_player($width,$height);\n }\n catch(Exception $e) {\n //$data['video_exists'] = false;\n $image_source = 'This video has been deleted.';\n }\n \n\n\n//pr($media_info);\n\n\n $result_arr['result'] = 'success';\n $result_arr['s_image_source'] = $image_source; \n \n $result_arr['i_media_id'] = $i_media_id;\n \n $result_arr['title'] = $media_info[0]['s_title'];\n $result_arr['desc'] = $media_info[0]['s_desc'];\n $result_arr['posted_on'] = $media_info[0]['dt_posted_on'];\n $result_arr['category'] = $media_info[0]['cat_name'];\n \n \n \n //pr($result_arr);\n \n echo json_encode($result_arr );\n \n \n \n } \n catch(Exception $err_obj)\n {\n \n } \n \n }", "title": "" }, { "docid": "0c122e7912eb483c6eb7fc170aa83b50", "score": "0.5479052", "text": "public function videoDetail()\n {\n $id = intval($_GET['id']);\n $table = (isset($_GET['from']) && $_GET['from']=='daily') ? 'daily_video' : 'video';\n $video = M($table)->where(array('id'=>$id))->find();\n //$videoInfo = D('Article')->getVideoInfoByLink($video['link']);\n //print_r($video);\n //$this->assign('videoInfo', $videoInfo);\n $this->assign('video', $video);\n $this->assign('cssFile', 'v');\n $this->display('video');\n }", "title": "" }, { "docid": "37bc07ff9a5b12c7cecdfe2516c7c31e", "score": "0.54690313", "text": "function videoContentDetail($url)\r\n {\r\n $host = explode('.', str_replace('www.', '', strtolower(parse_url($url, PHP_URL_HOST))));\r\n $host = isset($host[0]) ? $host[0] : $host;\r\n switch ($host) {\r\n case 'vimeo':\r\n $video_id = substr(parse_url($url, PHP_URL_PATH), 1);\r\n $hash = json_decode(file_get_contents(\"http://vimeo.com/api/v2/video/{$video_id}.json\"));\r\n return array(\r\n 'provider' => 'Vimeo',\r\n 'title' => $hash[0]->title,\r\n 'description' => str_replace(array(\"<br>\", \"<br/>\", \"<br />\"), NULL, $hash[0]->description),\r\n 'description_nl2br' => str_replace(array(\"\\n\", \"\\r\", \"\\r\\n\", \"\\n\\r\"), NULL, $hash[0]->description),\r\n 'thumbnail' => $hash[0]->thumbnail_large,\r\n 'video' => \"https://vimeo.com/\" . $hash[0]->id,\r\n 'embed_video' => \"https://player.vimeo.com/video/\" . $hash[0]->id,\r\n );\r\n break;\r\n case 'youtube':\r\n preg_match(\"/v=([^&#]*)/\", parse_url($url, PHP_URL_QUERY), $video_id);\r\n $video_id = $video_id[1];\r\n $hash = json_decode(file_get_contents(\"http://gdata.youtube.com/feeds/api/videos/{$video_id}?v=2&alt=jsonc\"));\r\n return array(\r\n 'provider' => 'YouTube',\r\n 'title' => $hash->data->title,\r\n 'description' => str_replace(array(\"<br>\", \"<br/>\", \"<br />\"), NULL, $hash->data->description),\r\n 'description_nl2br' => str_replace(array(\"\\n\", \"\\r\", \"\\r\\n\", \"\\n\\r\"), NULL, nl2br($hash->data->description)),\r\n 'thumbnail' => $hash->data->thumbnail->hqDefault,\r\n 'video' => \"http://www.youtube.com/watch?v=\" . $hash->data->id,\r\n 'embed_video' => \"http://www.youtube.com/v/\" . $hash->data->id,\r\n );\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "aecd16701fd095020f12fc80e00ea400", "score": "0.5455166", "text": "function dailymotionComProcessDescription($option)\r\n\t{\r\n\t\tif (!defined('HWDVIDSPATH')) { define('HWDVIDSPATH', dirname(__FILE__).'/../../'); }\r\n\t\t$c = hwd_vs_Config::get_instance();\r\n\r\n\t\t$code = hwd_vs_tp_dailymotionCom::dailymotionComGetCode($option);\r\n\t\t$code = $code[1];\r\n\r\n\t\t$watchvideourl = \"http://www.dailymotion.com/video/\".$code;\r\n\t\t$watchvideourl = hwd_vs_tools::get_final_url( $watchvideourl );\r\n\r\n\t\tif (function_exists('curl_init')) {\r\n\t\t\t// get title with CURL\r\n\t\t\t$curl_handle=curl_init();\r\n\t\t\tcurl_setopt($curl_handle,CURLOPT_URL,$watchvideourl);\r\n\t\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\r\n\t\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\r\n\t\t\t$buffer = curl_exec($curl_handle);\r\n\t\t\tcurl_close($curl_handle);\r\n\r\n\t\t\tpreg_match('/<meta name=\"description\" lang=\"([^\"]+)/', $buffer, $lang);\r\n\r\n\t\t\tif (!empty($buffer)) {\r\n\r\n\t\t\t\tpreg_match('/<meta name=\"description\" lang=\"'.$lang[1].'\" content=\"([^\"]+)/', $buffer, $match);\r\n\t\t\t\tif (!empty($match[1])) {\r\n\t\t\t\t\t$ext_v_descr[0] = 1;\r\n\t\t\t\t\t$ext_v_descr[1] = $match[1];\r\n\t\t\t\t\t$ext_v_descr[1] = strip_tags($ext_v_descr[1]);\r\n\t\t\t\t\t$ext_v_descr[1] = trim($ext_v_descr[1]);\r\n\t\t\t\t\t$ext_v_descr[1] = hwdEncoding::XMLEntities($ext_v_descr[1]);\r\n\t\t\t\t\t$ext_v_descr[1] = hwdEncoding::charset_decode_utf_8($ext_v_descr[1]);\r\n\t\t\t\t\t$ext_v_descr[1] = addslashes($ext_v_descr[1]);\r\n\t\t\t\t\t$ext_v_descr[1] = hwd_vs_tools::truncateText($ext_v_descr[1], 300);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($ext_v_descr[0] == '1') {\r\n\t\t\tif ($ext_v_descr[1] == '') {\r\n\t\t\t\t$ext_v_descr[1] = _HWDVIDS_UNKNOWN;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$ext_v_descr[0] = 0;\r\n\t\t\t$ext_v_descr[1] = _HWDVIDS_UNKNOWN;\r\n\t\t}\r\n\r\n\t\treturn $ext_v_descr;\r\n\t}", "title": "" }, { "docid": "19e57f92a5d1ad0d21aedbc868aa61c8", "score": "0.5450628", "text": "public function upload_video(){\n\t\t$this->User_Model->setId($this->currentUser['user_id']);\n\t\tif(!$this->User_Model->canUploadVideos()){\n\t\t\t$this->load->helper('json_helper');\n\t\t\tdisplay_json(array(\n\t\t\t\t'error' => $this->lang->s('Uploading videos is not allowed on your account')\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\n\t\t$this->uploadMaxSize = UPLOADS_MAX_SIZE_VIDEO;\n\t\t$this->allowedTypes = array(\n\t\t\t'video/x-msvideo',\n\t\t\t'video/mp4',\n\t\t\t'video/mpeg',\n\t\t\t'video/3gpp',\n\t\t\t'video/quicktime',\n\t\t\t'video/ogg',\n\t\t\t'video/webm'\n\t\t);\n\n\t\t$this->elfinderConnector();\n\t\treturn;\n\t}", "title": "" }, { "docid": "b4b2f9a5f13e79f3de156e025925b78c", "score": "0.5446139", "text": "public function getVideo($id)\n\t{\n\t\t$video['info'] = $this->find($id)->current();\n\t\t\n\t\t// ... Country\n\t\t$country_info = $video['info']->findManyToManyRowset('Application_Model_DbTable_Country',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Application_Model_DbTable_CountryOfFilm',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Item','Country');\n\t\t\n\t\t// ... Genre\n\t\t$genre_info = $video['info']->findManyToManyRowset('Application_Model_DbTable_Genre',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Application_Model_DbTable_GenreOfFilm',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Item','Genre');\n\t\t\n\t\t// ... Actor\n\t\t$actor_info = $video['info']->findManyToManyRowset('Application_Model_DbTable_Actor',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Application_Model_DbTable_ActorInFilm',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Item','Actor');\n\t\t\n\t\t// ... Director\n\t\t$director_info = $video['info']->findManyToManyRowset('Application_Model_DbTable_Director',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Application_Model_DbTable_DirectorOfFilm',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Item','Director');\n\t\t\n\t\t$video['country_info']\t= $country_info->toArray();\n\t\t$video['genre_info']\t= $genre_info->toArray();\n\t\t$video['actor_info']\t= $actor_info->toArray();\n\t\t$video['director_info']\t= $director_info->toArray();\n\t\t\n\t\tif($video['info']['serial'] == 'yes'){\n\t\t\t// ... Serial\n\t\t\t$more_info = $video['info']->findDependentRowset('Application_Model_DbTable_Serial','Item');\n\t\t\t$more_info = $more_info[0];\n\t\t\t// ... Season\n\t\t\t$season_info = $more_info->findDependentRowset('Application_Model_DbTable_Season','SerSeas');\n\t\t\t\n\t\t\tforeach($season_info as $skey => $svalue){\n\t\t\t\t// ... Episode\n\t\t\t\t$episode_info[$skey] = $svalue->findDependentRowset('Application_Model_DbTable_Episode','SeasEp');\n\t\t\t\t\n\t\t\t\tforeach($episode_info[$skey] as $ekey => $evalue){\n\t\t\t\t\t// ... File\n\t\t\t\t\t$file_info[$skey][$ekey] = $evalue->findParentRow('Application_Model_DbTable_File','File');\n\t\t\t\t\t$file_info[$skey][$ekey] = $file_info[$skey][$ekey]->toArray();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$episode_info[$skey] = $episode_info[$skey]->toArray();\n\t\t\t}\n\n\t\t\tif(!(count($season_info)>0)){\n\t\t\t\t$episode_info = null;\n\t\t\t\t$file_info = null;\n\t\t\t}\n\t\t\t\n\t\t\t$video['more_info']\t\t= $more_info->toArray();\n\t\t\t$video['season_info']\t= $season_info->toArray();\n\t\t\t$video['episode_info']\t= $episode_info;\n\t\t\t$video['file_info']\t\t= $file_info;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t// ... Movie\n\t\t\t$more_info = $video['info']->findDependentRowset('Application_Model_DbTable_Movie','Item');\n\t\t\t$more_info = $more_info[0];\n\t\t\t// ... File\n\t\t\t$file_info = $more_info->findParentRow('Application_Model_DbTable_File','File');\n\t\t\t$video['more_info'] = $more_info->toArray();\n\t\t\t$video['file_info'] = $file_info->toArray();\n\t\t}\n\t\t\n\t\t// ... Comment and User\n\t\t$comment_info['comment'] = $video['info']->findDependentRowset('Application_Model_DbTable_Comment','Item');\n\t\tforeach($comment_info['comment'] as $ckey => $cvalue){\n\t\t\t$comment_info['user'][$ckey] = $cvalue->findParentRow('Application_Model_DbTable_User','User');\n\t\t\t$comment_info['user'][$ckey] = $comment_info['user'][$ckey]->toArray();\n\t\t}\n\t\t$comment_info['comment'] = $comment_info['comment']->toArray();\n\t\t$video['comment_info']\t= $comment_info;\n\n\t\t/*echo var_dump($video);\n\t\tdie;*/\n\t\treturn $video;\n\t}", "title": "" }, { "docid": "3b01008954f903996a67a38c34c1ac61", "score": "0.5446124", "text": "function gmp_video( $height='', $width='', $inlineCSS=true, $imagesize='video' ){\n echo gmp_get_video( $height, $width, $inlineCSS=true, $imagesize='video' );\n}", "title": "" }, { "docid": "48534988028fd479a77e350107789f9d", "score": "0.541444", "text": "static function nev_checkVideoStatusAJAX(){\n $nonce = $_POST['nonce'];\n if( !wp_verify_nonce($nonce, 'nev_nonce') ){\n header(\"HTTP/1.0 403 Security Check.\");\n die('Security Check');\n }\n $html5_encoding = (bool) get_site_option( 'nev_html5_encoding' );\n\t\t\t$videoComponent = nev_core::get_last_video();\n // Check if video conversion is over\n if($html5_encoding == false){\n \tif (file_exists($videoComponent->videofile)) {\n \t\tnev_core::upload_media($videoComponent->id,$videoComponent);\n \t\techo json_encode( array( 'converted' => true) );\n \t\texit;\n \t}\n } else {\n \tif( $videoComponent->converted ){\n \t\tnev_core::upload_media($videoComponent->id,$videoComponent);\n \t\t$video = nev_core::get_last_video();\n \t\t$videofile = explode(',', $video->videofile);\n \tif( file_exists($videofile[0]) ) {\n \techo json_encode( array( 'converted' => true ) );\n \texit;\n \t}\n \t} else {\n \techo json_encode( array( 'converted' => false ) );\n \texit;\n \t}\n }\n exit;\n }", "title": "" }, { "docid": "6084139502b21819ec8e3e3fd8c6b534", "score": "0.5414067", "text": "private function isVideo() {\n if ($this->type == self::TYPE_VIDEO) {\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "4f6487d760057bdcc37a98cd7bcaf2ca", "score": "0.54114985", "text": "public function step2()\n {\n $this->checkIfLogged();\n\n //print \"<pre>\"; print_r($this->data);\tprint \"</pre>\"; die();\n $this->pageTitle = 'saving data...';\n\n // get YouTube code from url or simple code\n if (strpos($this->data['Video']['tubecode'], \"http\") !== false) {\n\n //$str1=\"http://www.youtube.com/watch?v=0bREy8pQX3U\";\n //$str2 =\"0bREy8pQX3U\";\n\n $arCodeTmp = explode(\"?v=\", trim($this->data['Video']['tubecode']));\n $newVideoCode = trim($arCodeTmp[1]);\n $arCodeTmpSec = explode(\"&\", trim($newVideoCode));\n $newVideoCodeF = trim($arCodeTmpSec[0]);\n\n if ($newVideoCodeF && strlen($newVideoCodeF) === 11) {\n $Videotubecode = $newVideoCodeF;\n } else {\n $this->flash('Wrong Video Tube code!', '/videos/step1/');\n }\n } else if (strlen(trim($this->data['Video']['tubecode'])) === 11) {\n $Videotubecode = trim($this->data['Video']['tubecode']);\n } else {\n $this->flash('Wrong Video Tube code!', '/videos/step1/');\n //$this->data['Video']['tubecode'] = \"onBxK4y9s_U\"; // default?\n }\n\n if ($this->data['Video'][\"category_id\"]) {\n $form_data = array(\n 'Video' => array(\n 'category_id' => $this->data['Video'][\"category_id\"],\n 'bandname' => $this->data['Video']['bandname'],\n 'songtitle' => $this->data['Video']['songtitle'],\n 'tubecode' => $Videotubecode,\n 'tags' => $this->data['Video']['tags'],\n 'date' => date(\"Y-m-d\"),\n 'ip1' => $REMOTE_ADDR,\n 'ip2' => $_SERVER['REMOTE_ADDR'],\n 'user_id' => $this->Session->read(\"User.id\")\n )\n );\n\n if ($this->Video->save($form_data)) {\n //Displays a Message on success\n //$this->flash(''.$lbls[\"registred_ok\"].'Your video has been saved succesfully', '/videos');\n $this->redirect('/videos');\n }\n } else {\n $this->flash('Wrong data!','/videos/step1/');\n }\n #####################################################################################\n //print \"<pre>\"; print_r($this->data);\tprint \"</pre>\";// die();\n return false;\n\n }", "title": "" }, { "docid": "9a6d810f9e2167e7e67f66fe64952ed0", "score": "0.5393774", "text": "public function testCreateVideo()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "aea0b8ee41d59194df5f07c5880e3319", "score": "0.536928", "text": "function sotf_VideoFile($path, $fileinfo='')\n\t{\n\t\tglobal $config;\n\t\t\n\t\t$parent = get_parent_class($this);\n\n\t\tparent::$parent($path);\t\t// Call the constructor of the parent class. lk. super()\n\t\t\n\t\tif(!in_array(sotf_File::getExtension($path),$config['skipGetID3FileTypes'])){\n\t\t\t// CHANGED BY BUDDHAFLY 06-02-14\n\t\t\t$getID3 = new getID3();\n\t\t\t$fileinfo = $getID3->analyze($path);\n\t\t\tgetid3_lib::CopyTagsToComments($fileinfo);\n\t\t\t//print_r_html($fileinfo);\n\t\t\t//$fileinfo = GetAllFileInfo($this->path);\n\t\t}\n\t\telse $fileinfo['video']=true;\n\t\t \n \t\t if($fileinfo) $this->allInfo = $fileinfo; //was $fileInfo\n\n\t\t//if ($audioinfo[\"fileformat\"] == 'mp3' || $audioinfo[\"fileformat\"] == 'ogg') {\n\n //debug(\"finfo\", $fileinfo);\n\t\n\n if(!in_array(sotf_File::getExtension($path),$config['skipGetID3FileTypes'])) {\n\n \t $videoinfo = $fileinfo['video'];\n\n\t\t\t$this->type = \"video\";\n\n\t\t\t//$this->format = $fileinfo[\"fileformat\"];\n\n\t\t\t$this->format = $videoinfo[\"dataformat\"];\n\t\t\t\n\t\t\tif($this->format == \"quicktime\") $this->format = \"mov\";\n\t\t\t\n\t\t\tif($fileinfo['quicktime']['ftyp']['signature']==\"3gp4\") $this->format = \"3gp\";\n\t\t\telse if($this->format == \"mpeg4\") $this->format = \"mp4\";\n\t\t\t\n\t\t\tif($this->format == \"asf\") $this->format = \"wmv\";\n\t\t\tif($this->format == \"mpeg\") $this->format = \"mpg\";\n\t\t\t\n\t\t\t\n\t\t\tif ($videoinfo[\"bitrate_mode\"] == 'vbr') $this->bitrate = \"VBR\";\n\n \t\t$this->bitrate = round($fileinfo[\"bitrate\"]/1000);\n\n\t\t\t$this->average_bitrate = round($fileinfo[\"bitrate\"]/1000);\n\n\n\t\t\t\n\t\t\t$this->duration = round($fileinfo[\"playtime_seconds\"]);\n\n\t\t\t$this->mimetype = $this->determineMimeType($this->format);\n\t\t\t\n\t\t\t$this->codec = $videoinfo[\"codec\"];\n\t\n\t\t\t$this->frame_rate = round($videoinfo[\"frame_rate\"]);\n\t\n\t\t\t$this->resolution_x = $videoinfo[\"resolution_x\"];\n\t\n\t\t\t$this->resolution_y = $videoinfo[\"resolution_y\"];\n\t\t\t\n\t\t\t$this->lossless = $videoinfo[\"lossless\"];\n\t\n\t\t\t$this->pixel_aspect_ratio = $videoinfo[\"pixel_aspect_ratio\"];\n\t\t\t\n\t\t\t\n\t\t\tif(isset($fileinfo['audio'])){\n\t\t\t $audioinfo = $fileinfo['audio'];\n\t\t\t if($audioinfo[\"sample_rate\"])$this->samplerate = $audioinfo[\"sample_rate\"];\n\t\t\t else $this->samplerate = 0;\n\t\t\t if($audioinfo[\"channels\"]) $this->channels = $audioinfo[\"channels\"];\n\t\t\t else $this->channels = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t$this->samplerate = 0;\n\t\t\t$this->channels = 0;\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t\telse if (isset($fileinfo['video'])){\n\t\t\t$this->type = \"video\";\n\t\t\t$this->format = sotf_File::getExtension($path);\n\t\t\t$this->mimetype = $config['mimetypes']['format'];\n\t\t\t$this->bitrate = 0;\n\t\t\t$this->samplerate = 0;\n\t\t\t$this->channels = 0;\n\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "13cc44c4accfb11bfce18f06cb2f9fb8", "score": "0.5365365", "text": "public function getVideoDownloadLink() {\n\n $decode_to_arr = json_decode($this->getVideoInfo(), true);\n $this->video_title = $decode_to_arr[\"video\"][\"title\"];\n $link_array = $decode_to_arr[\"request\"][\"files\"][\"progressive\"];\n $final_link_arr = array();\n\n //Create array containing the detail of video\n for($i = 0; $i < count($link_array); $i++) { $link_array[$i][\"title\"] = $this->video_title;\n $mime = explode(\"/\", $link_array[$i][\"mime\"]);\n $link_array[$i][\"format\"] = $mime[1];\n }\n return $link_array;\n }", "title": "" }, { "docid": "1377d1651deb4411cc33329312c845d3", "score": "0.536481", "text": "function si_get_video($postid,$width = 620,$height=360) {\t\r\n\t$video_url = get_post_meta($postid, 'si_youtube_vimeo_url', true);\t\r\n\tif(preg_match('/youtube/', $video_url)) {\t\t\t\r\n\t\tif(preg_match('/[\\\\?\\\\&]v=([^\\\\?\\\\&]+)/', $video_url, $matches)) {\r\n\t\t\t$output = '<iframe width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.youtube.com/embed/'.$matches[1].'?wmode=transparent&showinfo=0&rel=0\" frameborder=\"0\" allowfullscreen></iframe> ';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$output = __('Sorry that seems to be an invalid YouTube URL.', 'si_theme');\r\n\t\t}\t\t\t\r\n\t}\r\n\telseif(preg_match('/vimeo/', $video_url)) {\t\t\t\r\n\t\tif(preg_match('~^http://(?:www\\.)?vimeo\\.com/(?:clip:)?(\\d+)~', $video_url, $matches))\t{\t\t\t\t\r\n\t\t\t$output = '<iframe src=\"http://player.vimeo.com/video/'.$matches[1].'?title=0&amp;byline=0&amp;portrait=0\" width=\"'.$width.'\" height=\"'.$height.'\" frameborder=\"0\" webkitAllowFullScreen allowFullScreen></iframe>'; \t\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$output = __('Sorry that seems to be an invalid Vimeo URL.', 'si_theme');\r\n\t\t}\t\t\t\r\n\t}\r\n\telse {\r\n\t\t$output = __('Sorry that seems to be an invalid YouTube or Vimeo URL.', 'si_theme');\r\n\t}\t\r\n\techo $output;\t\r\n}", "title": "" }, { "docid": "069a7ea5b94c75d72e7dfef8d5496a36", "score": "0.53598225", "text": "private function _prepare() {\n\t\t//set Params for logging\n\t\t$this->params['cmd'] = Yii::app()->params['cmd.video.play'];\n\t\t$createdTime = date(\"Y-m-d H:i:s\",time());\n\t\t$this->params['createdDatetime'] = $createdTime; //set time for log user_transaction\n\t\t\n\t\t//return ERROR if params invalided\n\t\tif (!(($this->params['msisdn']) &&\n ($this->params['itemCode']) && //Code\n (isset($this->params['source'])))\n \t){\n $this->result['error'] = 'invalid_params'; \n return $this->result['error'];\n } \n\n \n\t\t//get video Object\n\t\t$this->videoObj = BmVideoModel::model()->getVideoByCode($this->params['itemCode']);\n\t\tif ($this->videoObj) {\n\t\t\t$this->result['error'] = $this->defineBiz(); //0 \n\t\t}else {\n\t\t\t$this->result['error'] = 'video_not_exist';\n\t\t\t$this->params['obj1_name'] = '[code]['.$this->params['itemCode'].'] '.$this->result['error']; \n\t\t}\n bmCommon::logFile('['.$this->params['msisdn'].'][play video]['.$this->params['obj1_name'].']['.$this->params['itemCode'].']','userActivity','play');\n\t\t//save activity\n\t\ttry {\n //log Db\n BmUserActivityModel::model()->add($this->params);\n\t\t\t//log to gamification\n\t\t\t/*if($this->userSubscribe){\n\t\t\t\ttry {\n\t\t\t\t\t$params = $this->params;\n\t\t\t\t\t$userId = isset($params['user_id']) ? $params['user_id'] : 0;\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'msisdn' => $params['msisdn'],\n\t\t\t\t\t\t'user_id' => $userId,\n\t\t\t\t\t\t'source' => $params[\"source\"],\n\t\t\t\t\t\t'transaction' => 'play_video',\n\t\t\t\t\t\t'content_id' => $this->videoObj->id,\n\t\t\t\t\t\t'content_name'=>$params['obj1_name'],\n\t\t\t\t\t\t'log_point'=> 1,\n\t\t\t\t\t);\n\t\t\t\t\t$paramsGM = array(\n\t\t\t\t\t\t\"params\" => $data\n\t\t\t\t\t);\n\t\t\t\t\t$resGM = Yii::app()->gearman->client()->doBackground('doLogGami', json_encode($paramsGM));\n\n\n\t\t\t\t}catch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\t//$e->getMessage();\n\t\t\t\t}\n\t\t\t}*/\n\n }\n catch (Exception $e)\n {\n bmCommon::logFile($this->params['msisdn'].'-'.$e->getMessage(),'userActivity', 'play_video');\n }\t\n\t\treturn $this->result['error'];\n\n\t}", "title": "" }, { "docid": "7ff534ec3fbacfe03428ee343f504b39", "score": "0.5354095", "text": "function video_upload($videoInfo=null) {\n // [email protected]: this didn't work as-is because curl doesn't know\n // the 'file' field is the path of a file to be uploaded unless\n // you tell it by prefixing the value with an '@' sign.\n // Added some code.\n $rest = $this->viddlerREST;\n $temprest = $this->video_prepareupload($videoInfo['sessionid']);\n $this->viddlerREST = $temprest['upload']['endpoint'];\n \n if (isset($videoInfo['file']) && substr($videoInfo['file'],0,1) != '@') {\n $videoInfo['file'] = '@' . $videoInfo['file'];\n }\n\n $videoDetails = $this->sendRequest('viddler.videos.upload',$videoInfo,'post');\n $this->viddlerREST = $rest;\n return $videoDetails;\n }", "title": "" }, { "docid": "146711ebd567d0a682e2e5d51eeed379", "score": "0.5352814", "text": "function log_ouput_file_info()\r\n\t{\r\n\t\t$details = $this->output_details;\r\n\t\tif(is_array($details))\r\n\t\t{\r\n\t\t\tforeach($details as $name => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->log('output_'.$name,$value);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$this->log .=\" Unknown file details - Unable to get output video details using FFMPEG \\n\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9ec8de0e41af5c385e9e3bf712284723", "score": "0.5346551", "text": "function videoOpr() {\n $per = $this->checkpermission($this->role_id, 'add');\n if ($per) {\n $this->data['welcome'] = $this;\n $this->data['id'] = base64_decode(@$_GET['action']);\n $this->data['result'] = $this->Ads_model->edit_profile($this->data['id']);\n $tab = $this->uri->segment(3);\n switch ($tab) {\n case \"Basic\":\n $this->videoprofile();\n break;\n case \"Advanced\":\n $this->videoprofileadvance();\n //$this->show_ads_view('videoEditAdvance', $this->data);\n break;\n case \"Scheduling\":\n $this->video_scheduling();\n break;\n case \"Thumbnail\":\n $this->thumbnails();\n break;\n case \"Location\":\n $this->location();\n break;\n case \"Flavor\":\n $this->flavors();\n //\t$this->show_ads_view('videoEditFlavor',$this->data);\n break;\n case \"Promo\":\n $this->promo();\n //\t$this->show_ads_view('videoEditFlavor',$this->data);\n break;\n default:\n $this->show_ads_view('ads/videoEditBasic', $this->data);\n }\n } else {\n $this->session->set_flashdata('message', $this->_errormsg($this->loadPo($this->config->item('error_permission'))));\n redirect(base_url() . 'ads');\n }\n }", "title": "" }, { "docid": "0096154c6b7e7e17001b4734a2209a26", "score": "0.5337674", "text": "function get_video_frames_links($text)\n{\n\tif(strstr($text, \"youtube.com\"))\n\t{\n\t\tpreg_match(\"#v=([\\w\\-]+)#\", $text, $youtube_video_id);\n\t\t$youtube_video_id = end($youtube_video_id);\n\t\t\n\t\t$href = \"http://www.youtube.com/v/{$youtube_video_id}\";\n\t\t\n\t\treturn $href;\n\t}\n\telse\n\t# Detect Vimeo Link\n\tif(strstr($text, \"vimeo.com\"))\n\t{\n\t\tpreg_match(\"#com/(\\d+)#\", $text, $vimeo_video_id);\n\t\t$vimeo_video_id = end($vimeo_video_id);\n\t\t\n\t\t$href = \"http://vimeo.com/moogaloop.swf?clip_id={$vimeo_video_id}\";\n\t\t\n\t\treturn $href;\n\t}\n\t\n\treturn null;\n}", "title": "" }, { "docid": "43467ea7f58e94cb2beccf7f874be24b", "score": "0.5331228", "text": "function vimeo_get_video_info($url) {\n $start = microtime(TRUE);\n\n // Gte response from Vimeo.\n $response = drupal_http_request('http://vimeo.com/api/oembed.json?url=' . $url);\n\n // Log execution performance data.\n watchdog('Vimeo', '@FINISHED: Response received in <strong>@time</strong> sec.', array('@time' => round(microtime(TRUE) - $start, 2)), WATCHDOG_WARNING);\n\n if ($response->code == '200' && !isset($response->error)) {\n return json_decode($response->data);\n }\n\n return FALSE;\n}", "title": "" }, { "docid": "13a0f3ffc503a42c970dc67df2cc6a2a", "score": "0.53249663", "text": "public function getVideoInfo($id)\n\t{\n\t\t// make the call\n\t\treturn $this->doCall('video/' . (string) $id . '.json');\n\t}", "title": "" }, { "docid": "eacfb903824e1377619558edb92e97c2", "score": "0.5315857", "text": "public function saveVideo(Request $data)\n {\n $model = new VideoModel();\n $user = \\Session::get('logined');\n $model->user_id = $user->user_id;\n\n $model->categories_Id = $data->category;\n $string = mt_rand();\n $model->title_name = $data->title;\n $model->post_name = str_slug($data->title);\n $model->video_src = $data->link;\n $model->poster = $data->image;\n $model->tag = $data->tags;\n $model->string_Id = $string;\n $dura = (int)$data->duration;\n $duration = $this->sec2hms($dura);\n $model->duration = $duration;\n $model->description = $data->description;\n $model->status = $data->status;\n if (strpos($data->image, 'pornfun.com')) {\n $model->duration = $data->duration;\n }\n \n if (strpos($data->image, 'www.vporn.com')) {\n $model->duration = $data->duration;\n }\n\n $v = Validator::make($data->all(), [\n 'title' => 'required|max:255',\n 'link' => 'required',\n ]);\n if ($v->fails())\n {\n return redirect('admincp/grab-video')->with('msg','Save fails!');\n }else{\n $model->save();\n return redirect('admincp/grab-video')->with('success','Save video successfully!');\n }\n }", "title": "" }, { "docid": "325fa24c4b3ad1c8944b9bb9b01321cd", "score": "0.53119195", "text": "function runConvert()\n\t{\n\t\t$config\t\t= CFactory::getConfig();\n\t\t$videofolder= $config->get('videofolder');\n\t\tif (!$config->get('enablevideos'))\n\t\t{\n\t\t\t$this->errorMsg[]\t= 'Video is disabled. Video conversion will not run. ';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$model\t\t= CFactory::getModel('videos');\n\t\t$videos\t\t= $model->getPendingVideos();\n\n\t\tif (count($videos) < 1)\n\t\t{\n\t\t\t$this->errorMsg[] = 'No videos pending for conversion. ';\n\t\t\treturn;\n\t\t}\n\t\tif (!$this->hasFFmpegSupport())\n\t\t{\n\t\t\t$this->errorMsg[] = 'FFmpeg not installed or incorrect path. ';\n\t\t\treturn;\n\t\t}\n\n\t\t// First of all, lock the videos\n\t\t$table\t\t\t= JTable::getInstance( 'Video' , 'CTable' );\n\t\tforeach ($videos as $video)\n\t\t{\n\t\t\t$table->load($video->id);\n\t\t\t$table->save( array('status' => 'locked') );\n\t\t\t$table->reset();\n\t\t}\n\n\t\t// Process each video\n\t\t$videoCounter\t= 0;\n\t\t$videoSize\t\t= cGetVideoSize();\n\t\t$deleteOriginal\t= $config->get('deleteoriginalvideos');\n\t\t$injectMetadata = JFile::exists($this->flvtool2);\n\t\tforeach ($videos as $video)\n\t\t{\n\t\t\t$videoInFile\t= JPATH::clean(JPATH_ROOT.DS.$video->path);\n\t\t\t$videoOutFolder\t= JPATH::clean(JPATH_ROOT.DS.$config->get('videofolder').DS.VIDEO_FOLDER_NAME.DS.$video->creator);\n\t\t\t$videoFilename\t= $this->convertVideo($videoInFile , $videoOutFolder, $videoSize, $deleteOriginal);\n\n\t\t\tif ($videoFilename)\n\t\t\t{\n\t\t\t\t$videoFullPath = $videoOutFolder . DS . $videoFilename;\n\n\t\t\t\tif ($injectMetadata)\n\t\t\t\t{\n\t\t\t\t\t$this->injectMetadata($videoFullPath);\n\t\t\t\t}\n\n\t\t\t\t// Read duration\n\t\t\t\t$videoInfo\t= $this->getVideoInfo($videoFullPath);\n\n\t\t\t\tif (!$videoInfo)\n\t\t\t\t{\n\t\t\t\t\t$thumbName\t\t\t= null;\n\t\t\t\t\t$this->errorMsg[]\t= 'Could not read video information. Video id: ' . $video->id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$videoFrame = cFormatDuration( (int) ($videoInfo['duration']['sec'] / 2), 'HH:MM:SS' );\n\t\n\t\t\t\t\t// Create thumbnail\n\t\t\t\t\t$thumbFolder\t= JPATH::clean( JPATH_ROOT.DS.$config->get('videofolder').DS.VIDEO_FOLDER_NAME.DS.$video->creator.DS.VIDEO_THUMB_FOLDER_NAME );\n\t\t\t\t\t$thumbSize\t\t= CVideoLibrary::thumbSize();\n\t\t\t\t\t$thumbFileName\t= $this->createVideoThumb($videoFullPath, $thumbFolder, $videoFrame, $thumbSize);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$thumbFileName)\n\t\t\t\t{\n\t\t\t\t\t$this->errorMsg[]\t= 'Could not create thumbnail for video. Video id: ' . $video->id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Save into DB\n\t\t\t\t$config\t= CFactory::getConfig();\n\t\t\t\t$videoFolder\t= $config->get('videofolder');\n\t\t\t\t\n\t\t\t\t$video->path\t= $config->get('videofolder') . '/'\n\t\t\t\t\t\t\t\t. VIDEO_FOLDER_NAME . '/'\n\t\t\t\t\t\t\t\t. $video->creator . '/'\n\t\t\t\t\t\t\t\t. $videoFilename;\n\t\t\t\t\n\t\t\t\t$video->thumb\t= $config->get('videofolder') . '/'\n\t\t\t\t\t\t\t\t. VIDEO_FOLDER_NAME . '/'\n\t\t\t\t\t\t\t\t. $video->creator . '/'\n\t\t\t\t\t\t\t\t. VIDEO_THUMB_FOLDER_NAME . '/'\n\t\t\t\t\t\t\t\t. $thumbFileName;\n\t\t\t\t\n\t\t\t\t$video->duration= $videoInfo['duration']['sec'];\n\t\t\t\t$video->status\t= 'ready';\n\t\t\t\t$table->reset();\n\t\t\t\t$table->bind($video);\n\t\t\t\tif (!$table->store())\n\t\t\t\t{\n\t\t\t\t\t$this->errorMsg[]\t= $table->getError();\n\t\t\t\t}\n\t\t\t\t$table->reset();\n\n\t\t\t\t// Add into activity streams\n\t\t\t\t$videoUrl\t\t\t= CRoute::_('index.php?option=com_community&view=videos&task=video&videoid=' . $video->id . '&userid=' . $video->creator);\n\t\t\t\t$isPublicGroup\t\t= false;\n\t\t\t\t$isPublicVideo\t\t= false;\n\t\t\t\tif ($video->creator_type == VIDEO_GROUP_TYPE)\n\t\t\t\t{\n\t\t\t\t\tCFactory::load( 'models' , 'groups' );\n\t\t\t\t\t$group\t\t\t= JTable::getInstance( 'Group' , 'CTable' );\n\t\t\t\t\t$group->load($video->groupid);\n\t\t\t\t\t$isPublicGroup\t= ($group->approvals == COMMUNITY_PUBLIC_GROUP);\n\t\t\t\t\t$videoUrl\t\t= CRoute::_('index.php?option=com_community&view=videos&task=video&groupid=' . $group->id . '&videoid=' . $video->id );\n\t\t\t\t}\n\t\t\t\t// include user type video that is open public and site members \n\t\t\t\t$isPublicVideo\t\t= ($video->creator_type === VIDEO_USER_TYPE && $video->permissions <= 20 );\n\t\t\t\tif(($isPublicGroup) || $isPublicVideo)\n\t\t\t\t{\n\t\t\t\t\t$my\t\t\t\t= CFactory::getUser( $video->creator );\n\t\t\t\t\t$act\t\t\t= new stdClass();\n\t\t\t\t\t$act->cmd \t\t= 'videos.upload';\n\t\t\t\t\t$act->actor \t= $my->id;\n\t\t\t\t\t$act->target \t= 0;\n\t\t\t\t\t$act->title\t \t= JText::sprintf('CC ACTIVITIES POST VIDEO' , $videoUrl , $video->title );\n\t\t\t\t\t$act->app\t\t= 'videos';\n\t\t\t\t\t$act->cid\t\t= $video->id;\n\t\t\t\t\t//$act->content\t= '<img src=\"' . rtrim( JURI::root() , '/' ) . '/' . rtrim( $config->get('videofolder', 'images') , '/' ) . '/' . $video->thumb . '\" style=\"border: 1px solid #eee;margin-right: 3px;\" />';\n\t\t\t\t\t$act->content\t= '<img src=\"' . JURI::root() . $video->thumb . '\" style=\"border: 1px solid #eee;margin-right: 3px;\" />';\n\t\t\t\t\t\n\t\t\t\t\t// Add activity logging\n\t\t\t\t\tCFactory::load ( 'libraries', 'activities' );\n\t\t\t\t\tCActivityStream::add( $act );\n\t\t\t\t}\n\t\t\t\t$videoCounter++;\n\t\t\t} // end if video converted\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->errorMsg[]\t= 'Could not convert video id: ' . $video->id;\n\t\t\t}\n\t\t\tunset($video);\n\t\t} // end foreach pending videos\n\t\t\n\t\t// Lastly, unlock the videos\n\t\tforeach ($videos as $video)\n\t\t{\n\t\t\t$table->load($video->id);\n\t\t\tif ($table->status\t== 'locked')\n\t\t\t{\n\t\t\t\t$table->save( array('status' => 'pending') );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->errorMsg[]\t= $videoCounter ? $videoCounter . ' videos converted successfully...' : 'No videos was converted';\n\t\t\n\t\t$returnMsg\t= '';\n\t\tforeach ($this->errorMsg as $msg)\n\t\t{\n\t\t\t$returnMsg\t.= \"$msg\\r\\n\";\n\t\t}\n\t\t\n\t\treturn $returnMsg;\n\t}", "title": "" }, { "docid": "72b5bbe94d3d486dba37672264bdf059", "score": "0.52975285", "text": "function video_detail($vid)\n {\n return $this->get_video_detail($vid);\n }", "title": "" }, { "docid": "17119f0d7b3329566de90b71baf16de5", "score": "0.5279639", "text": "public function save()\n {\n $data = $this->prepare();\n if (isset($data['valid']) && ! $data['valid']){\n return $data;\n } else {\n try {\n if ($this->id) {\n $video = $this->getByColumn('id', $this->id)[0];\n $this->image = $video->image;\n $query = $this->update(self::$table)\n ->set($data)\n ->where(\"id = '{$this->id}'\")\n ->execute();\n } else {\n $query = $this->insert($data)\n ->into(self::$table)\n ->execute();\n \n $this->id = $query;\n }\n\n return array(\n 'result' => (isset($video) ? 'Video updated!' : 'Video created!')\n );\n } catch (\\Exception $e) {\n return array(\n 'result' => 'Failed to ' . (isset($video) ? 'update' : 'create') . ' video!',\n 'errors' => array($e->getMessage())\n );\n }\n }\n }", "title": "" }, { "docid": "e3716325fed1f43fc6229907ed54c136", "score": "0.5269183", "text": "static function nev_get_videos(){\n\t\t\tif (!is_user_logged_in()){\n header(\"HTTP/1.0 403 Security Check.\");\n exit;\n\t\t\t}\n\t\t\t$videos = nev_core::get_submitted_videos();\n\t\t\techo json_encode( array('videos' => $videos));\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "8740cc9f08f0db0c800dddf8c86852d0", "score": "0.5261507", "text": "public function onBeforeValidate()\n {\n if ($this->owner->upload && $this->owner->isVideo()) {\n try {\n $getID3 = new getID3();\n $file = $getID3->analyze($this->owner->upload->tempName);\n $this->owner->width = $file['video']['resolution_x'] ?? null;\n $this->owner->height = $file['video']['resolution_y'] ?? null;\n } catch (Exception $exception) {\n $this->owner->addError('upload', $exception->getMessage());\n }\n }\n }", "title": "" }, { "docid": "fdeddb541596bfb6fcc23839c9df3307", "score": "0.52578676", "text": "function videoDetailUrl($url)\r\n {\r\n $curlInit = curl_init($url);\r\n curl_setopt($curlInit, CURLOPT_CONNECTTIMEOUT, 10);\r\n curl_setopt($curlInit, CURLOPT_HEADER, true);\r\n curl_setopt($curlInit, CURLOPT_NOBODY, true);\r\n curl_setopt($curlInit, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($curlInit);\r\n curl_close($curlInit);\r\n if ($response) return true; return false;\r\n }", "title": "" }, { "docid": "c31ce7fd56417bae2d21e2f8335cb121", "score": "0.5256778", "text": "function printYoutubeInfo($youtubeVideoLink) \n\t {\n\t\t\t\t\t\t\t //$youtubeVideoLink = ‘http://tutsbucket.com/2010/11/css3-drop-down-menu/&#8217;;\n\t\t\t\t\t\t\t $videoId = getYoutubeId($youtubeVideoLink);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t if($videoId == '0')\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t echo \"This is not a valid youtube video url. Please, give a valid url…\";\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 {\n\t\t\t\t\t\t\t $videoInfo = parseVideoEntry($videoId);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t // display main video record\n\t\t\t\t\t\t\t /*echo \"<br><br><table>\\n\";\n\t\t\t\t\t\t\t echo \"<tr>\\n\";\n\t\t\t\t\t\t\t echo \"<td><a href=\\\"{$videoInfo->watchURL}\\\">\n\t\t\t\t\t\t\t <img src=\\\"$videoInfo->thumbnailURL\\\"/></a></td>\\n\";\n\t\t\t\t\t\t\t echo \"<td><a href=\\\"{$videoInfo->watchURL}\\\">{$videoInfo->title}</a>\n\t\t\t\t\t\t\t <br/>\\n\";\n\t\t\t\t\t\t\t echo sprintf(\"%0.2f\", $videoInfo->length/60) . \" min. | {$videoInfo->rating}\n\t\t\t\t\t\t\t user rating | {$videoInfo->viewCount} views<br/>\\n\";\n\t\t\t\t\t\t\t echo $videoInfo->description . \"</td>\\n\";\n\t\t\t\t\t\t\t echo \"</tr>\\n\";*/\n\t\t\t\t\t\t\t //echo \"</table>\";\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //echo ‘<br><br>’;\n\t\t\t\t\t\t\t // read ‘video comments’ feed into SimpleXML object\n\t\t\t\t\t\t\t // parse and display each comment\n\t\t\t\t\t\t\t if ($videoInfo->commentsURL && $videoInfo->commentsCount > 0)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t $commentsFeed = simplexml_load_file($videoInfo->commentsURL);\n\t\t\t\t\t\t\t /*echo \"<tr><td colspan=\\\"2\\\"><h3>\" . $commentsFeed->title .\n\t\t\t\t\t\t\t \"</h3></td></tr>\\n\";\n\t\t\t\t\t\t\t echo \"<tr><td colspan=\\\"2\\\"><ol>\\n\";*/\n\t\t\t\t\t\t\t foreach ($commentsFeed->entry as $comment)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t echo \"<li>\" . $comment->content . \"</li>\\n\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t //echo \"</ol></td></tr>\\n\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t //echo \"</table>\";\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t /*echo \"<h2>Basic Video Information</h2>\";\n\t\t\t\t\t\t\t echo \"<br>\";*/\n\t\t\t\t\t\t\t echo \"<div class=\\\"video_t\\\"><h4>\".$videoInfo->title.\"</h4></div>\";\t\t\t\t\t\n\t\t\t\t\t\t\t /*echo \"<b>Thumbnail link of video:</b> \".$videoInfo->thumbnailURL;\n\t\t\t\t\t\t\t echo \"<br><br>\";\n\t\t\t\t\t\t\t echo \"<b>Youtube video link:</b> \".$videoInfo->watchURL;\n\t\t\t\t\t\t\t echo \"<br><br>\";*/\n\t\t\t\t\t\t\t echo \"<div class=\\\"description\\\"><b>\".$videoInfo->description.\"</b></div>\";\n\t\t\t\t\t\t\t echo \"<br><br>\";\n\t\t\t\t\t\t\t /*echo \"<b>How many times video have seen:</b> \".$videoInfo->viewCount;\n\t\t\t\t\t\t\t echo \"<br><br>\";\n\t\t\t\t\t\t\t echo \"<b>Video length(in seconds):</b> \".$videoInfo->length;\n\t\t\t\t\t\t\t echo \"<br><br>\";\n\t\t\t\t\t\t\t echo \"<b>Video rating:</b> \".$videoInfo->rating;*/\n\t\t\t\t\t\t\t }\n\t }", "title": "" }, { "docid": "ff13751b21c33c5bbe835a717c4514aa", "score": "0.5253432", "text": "function checkFFMPEG()\n{\n\t$cmd = \"ffmpeg -version\";\n\t$res = exec($cmd, $output, $returnvalue);\n\tif($returnvalue == 0)\n\t\treturn true;\n\treturn false;\n}", "title": "" }, { "docid": "22889025deed8378d44f5da991487ee9", "score": "0.52515477", "text": "function getdescription($videoid){\n$gv_xml_description_string = @file_get_contents(\"http://video.google.com/videofeed?docid=\".$videoid);\n$gv_xml_description_start = explode(\"<description>\",$gv_xml_description_string,2);\n$gv_xml_description_end = explode(\"</description>\",$gv_xml_description_start[1],2);\n$gv_description = addslashes($gv_xml_description_end[0]);\nreturn $gv_description;\n}", "title": "" }, { "docid": "4e1e66baef6e38bee88d503637834be3", "score": "0.52456164", "text": "function gmp_format_video( $video ){\n \n if( strpos( $video, 'iframe' ) ) {\n $video = preg_replace_callback('/(src=\")([^\"]*)/mi', 'gmp_process_iframe_matches', $video);\n $video = str_replace( 'allowfullscreen', '', $video );\n }\n \n elseif( strpos( $video, 'embed' ) )\n $video = gmp_process_embed_video( $video );\n \n return $video;\n}", "title": "" }, { "docid": "89c145b921e2c3ee3e406ca58269b60e", "score": "0.5237013", "text": "private function generateEmbedCode($videoProvider)\n {\n global $video,$qualities;\n $embedCode = \"\";\n switch ($videoProvider)\n { case 'up':\n\t\t\t\t\t$token = $video->token;\n\t\t\t\t\t$folder = ABSPATH.'/'.get_option('mediafolder','media').'/';\n\t\t\t\t\t/* Get list of video files attached */\n\t\t\t\t\t$pattern = \"{*\".$token.\"*}\";\n\t\t\t\t\t$vl = glob($folder.$pattern, GLOB_BRACE);\n\t\t\t\t\t$qualities = array();\n\t\t\t\t\tif (!isIOS() && (get_option('hide-mp4', 0) > 0))\n {\n\t\t\t\t\t/* Get hidden by php urls */\n\t\t\t\t\t$link = site_url().'stream.php?sk='.$token.'&q=';\n\t\t\t\t\tforeach($vl as $vids) {\n\t\t\t\t\t\t/* Aviod 0 size */\n\t\t\t\t\t\tif(filesize($vids) > 300000){\n\t\t\t\t\t $file= str_replace($folder,'',$vids);\n\t\t\t\t\t if (strpos($file, $token.'-') !== false) {\n\t\t\t\t\t\t $size = str_replace(array($token.'-','.mp4'),\"\",$file); \t \n\t\t\t\t\t\t $qualities[trim($size)]=$link.trim($size); \n\t\t\t\t\t } else {\n\t\t\t\t\t\t $qualities[\"default\"]=$link.'default'; \n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t} /* End foreach */\t\t\t\t\t \n\t\t\t\t } else {\n /* Get clean mp4 urls */\n $link = site_url().get_option('mediafolder').'/';\t\t\t\t\t \n\t\t\t\t\t\tforeach($vl as $vids) {\n\t\t\t\t\t\t $file= str_replace($folder,'',$vids);\n\t\t\t\t\t\t if (strpos($file, $token.'-') !== false) {\n\t\t\t\t\t\t $size = str_replace(array($token.'-','.mp4'),\"\",$file); \t \n\t\t\t\t\t\t $qualities[trim($size)]=$link.$file; \n\t\t\t\t\t\t } else{\n\t\t\t\t\t\t $qualities[\"default\"]=$link.$file; \n\t\t\t\t\t\t }\n\t\t\t\t\t\t} /* End foreach */\n\t\t\t\t\t }\n\t\t\t\t\tif(empty($qualities)) {return false; } \n\t\t\t\t\t$max = max(array_keys($qualities));\n\t\t\t\t\t$min = min(array_keys($qualities));\n\t\t\t\t\t$qualities[\"hd\"]=$qualities[$max];\n\t\t\t\t\t$qualities[\"sd\"]=$qualities[$min];\t\t\t\t\t\n\t\t\t\t\t$ext = 'mp4';\n\t\t\t\t\t//Cut the doubles\n\t\t\t\t\tif(isset($qualities[\"default\"])) {\n\t\t\t\t\tif($qualities[\"sd\"] == $qualities[\"default\"]) {\n\t\t\t\t\tunset($qualities[\"default\"]);\t\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($qualities[\"sd\"] == $qualities[\"hd\"]) {\n\t\t\t\t\tunset($qualities[\"hd\"]);\t\n\t\t\t\t\t}\n\t\t\t\t\tif(count($qualities) < 2) {\n\t\t\t\t\t$real_link = $qualities[\"sd\"];\n\t\t\t\t\t$extra = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t/* We have multiple qualities*/\t\n\t\t\t\t\t$real_link = (isset($qualities[\"hd\"])) ? $qualities[\"hd\"] : $qualities[\"sd\"];\n\t\t\t\t\t$extra = $qualities;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tkrsort($qualities);\n\t\t\t\t\n\t\t\t\t\t/* Sent to Player */\n\t\t\t\t\t$choice = get_option('choosen-player', 1);\n\t\t\t\t\t if ($choice == 1)\n {\n $embedCode = _jwplayer($real_link, thumb_fix($video->thumb), thumb_fix(get_option('player-logo')), $ext, $extra);\n }\n elseif ($choice == 2)\n {\n $embedCode = flowplayer($real_link, thumb_fix($video->thumb), thumb_fix(get_option('player-logo')), $ext, $extra);\n }\n elseif ($choice == 6)\n {\n $embedCode = vjsplayer($real_link, thumb_fix($video->thumb), thumb_fix(get_option('player-logo')), $ext, $extra);\n }\n else\n {\n $embedCode = _jpcustom($real_link, thumb_fix($video->thumb), $extra);\n }\n break;\n\t\t\t\t\tbreak;\n case 'localimage':\n $path = $this->getVideoId(\"localimage/\") . '@@' . get_option('mediafolder');\n $real_link = site_url() . 'stream.php?type=1&file=' . base64_encode(base64_encode($path));\n $embedCode .= '<a rel=\"lightbox\" class=\"media-href\" title=\"' . stripslashes($video->title) . '\" href=\"' . $real_link . '\"><img class=\"media-img\" src=\"' . $real_link . '\" /></a>';\n break;\n case 'localfile':\n $path = $this->getVideoId(\"localfile/\") . '@@' . get_option('mediafolder');\n if (!isIOS() && (get_option('hide-mp4', 0) > 0))\n {\n $real_link = site_url() . 'stream.php?file=' . base64_encode(base64_encode($path));\n }\n else\n {\n $real_link = thumb_fix(get_option('mediafolder') . '/' . $this->getVideoId(\"localfile/\"));\n }\n //$ext = explode(\".\", $this->link);\n //$ext = $ext[1];\n $pieces_array = explode('.', $this->link);\n $ext = end($pieces_array);\n $choice = get_option('choosen-player', 1);\n $mobile_supported = array(\n \"mp4\",\n \"mp3\",\n \"webm\",\n \"ogv\",\n \"m3u8\",\n \"ts\",\n \"tif\"\n );\n if (!in_array($ext, $mobile_supported))\n {\n /*force jwplayer always on non-mobi formats, as other players are just html5 */\n $choice = 1;\n }\n if ($choice == 1)\n {\n $embedCode = _jwplayer($real_link, thumb_fix($video->thumb), thumb_fix(get_option('player-logo')), $ext);\n }\n elseif (($choice == 2) && ($ext !== \"mp3\"))\n {\n $embedCode = flowplayer($real_link, thumb_fix($video->thumb), thumb_fix(get_option('player-logo')), $ext);\n }\n elseif (($choice == 6) && ($ext !== \"mp3\"))\n {\n $embedCode = vjsplayer($real_link, thumb_fix($video->thumb), thumb_fix(get_option('player-logo')), $ext);\n }\n else\n {\n $embedCode = _jpcustom($real_link, thumb_fix($video->thumb));\n }\n break;\n case 'vine':\n $videoId = $this->getVideoId(\"/v/\");\n if ($videoId != null)\n {\n $embedCode .= '<iframe class=\"vine-embed\" src=\"https://vine.co/v/' . $videoId . '/embed/simple?audio=1\" width=\"' . $this->width . '\" height=\"' . $this->height . '\" frameborder=\"0\"></iframe><script async src=\"//platform.vine.co/static/scripts/embed.js\" charset=\"utf-8\"></script>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'facebook':\n\t\t\t\t\t$videoId = $this->getVideoId(\"v=\", \"&\");\n\t\t\t\t\tif (empty($videoId)) {\n\t\t\t\t\tif (strpos($this->link, '/?') !== false) {\n\t\t\t\t\tlist($real,$junk) = @explode('/?', $this->link);\n\t\t\t\t\t} else {\n\t\t\t\t\t$real = $this->link;\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($real)) {\n\t\t\t\t\t$videoId = $this->getLastNr(rtrim($real, '/'));\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($videoId != null) {\n\t\t\t\t\t$embedCode .= '<div class=\"fb-video\" data-href=\"https://www.facebook.com/video.php?v=' . $videoId . '\" \" data-width=\"1280\" data-allowfullscreen=\"true\"></div>';\n\t\t\t\t\t$embedCode .= _ad('1');\n\t\t\t\t\t} else {\n\t\t\t\t\t$embedCode = INVALID_URL;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 'docs.google.com':\n $videoId = str_replace('/edit', '/preview', $this->link);\n if ($videoId != null)\n {\n $embedCode .= '<iframe src=\"' . $videoId . '\" width=\"' . $this->width . '\" height=\"' . $this->height . '\" frameborder=\"0\"></iframe>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'youtube':\n $videoId = $this->getVideoId(\"v=\", \"&\");\n if ($videoId != null)\n {\n $choice = get_option('youtube-player');\n if ($choice < 2)\n {\n $embedCode .= \"<iframe id=\\\"ytplayer\\\" width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" src=\\\"https://www.youtube.com/embed/\" . $videoId . \"?enablejsapi=1&amp;version=3&amp;html5=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;nologo=1&amp;vq=large&amp;autoplay=1&amp;ps=docs&amp;rel=0&amp;showinfo=0\\\" frameborder=\\\"0\\\" allowfullscreen=\\\"true\\\"></iframe>\";\n if ($choice < 2)\n {\n $embedCode .= '<script>\n\t\t\t\t\t\t\t var tag = document.createElement(\\'script\\');\n\t\t\t\t\t\t\t tag.src = \"https://www.youtube.com/iframe_api\";\n\t\t\t\t\t var firstScriptTag = document.getElementsByTagName(\\'script\\')[0];\n firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n\t\t\t\t\t\t\t var player;\n\t\t\t\t\t\t\t function onYouTubeIframeAPIReady() {\n\t\t\t\t\t\t\t\tplayer = new YT.Player(\\'ytplayer\\', {\n\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\\'onReady\\': onPlayerReady,\n\t\t\t\t\t\t\t\t\t\\'onStateChange\\': onPlayerStateChange\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}\n\t\t\t\t\t\t\tfunction onPlayerReady(event) {\n\t\t\t\t\t\t\tevent.target.playVideo();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\tfunction onPlayerStateChange(event) {\n\t\t\t\tif(event.data === 0) {\t\t\t\t\t\n \tstartNextVideo();\t\n\t\t\t\t}\n\t\t\t\t}\t\t\n </script>';\n }\n $embedCode .= _ad('1');\n }\n else\n {\n $real_link = 'http://www.youtube.com/watch?v=' . $videoId;\n $img = 'http://i1.ytimg.com/vi/' . $videoId . '/maxresdefault.jpg';\n $embedCode = _jwplayer($real_link, $img, thumb_fix(get_option('player-logo')));\n }\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'vimeo':\n $videoIdForChannel = $this->getVideoId('#');\n if (strlen($videoIdForChannel) > 0)\n {\n $videoId = $videoIdForChannel;\n }\n else\n {\n $videoId = $this->getVideoId(\".com/\");\n }\n //$videoId = $videoForChannel;\n if ($videoId != null)\n {\n $embedCode .= '<iframe id=\"vimvideo\" src=\"https://player.vimeo.com/video/' . $videoId . '?title=0&amp;player_id=vimvideo&amp;byline=0&amp;portrait=0&amp;color=cc181e&amp;autoplay=1\" width=\"' . $this->width . '\" height=\"' . $this->height . '\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';\n $embedCode .='<script src=\"https://f.vimeocdn.com/js/froogaloop2.min.js\"></script>';\n\t\t\t\t\t $embedCode .= '<script>\n\t\t\t\t\t var nextPlay;\n\t\t\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t\tif($(\"li#playingNow\").html()) {\t\n\t\t\t\t\t\tnextPlay = $(\"li#playingNow\").next().find(\"a.clip-link\").attr(\"href\");\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t var iframe = $(\"#vimvideo\")[0],\n player = $f(iframe);\n\t\t\t\t player.addEvent(\\'ready\\', function() {\t\t\n\t\t player.addEvent(\\'finish\\', onFinish);\n\t });\n function onFinish(id) {\n\t\t\t\t\tstartNextVideo();\n }\n\t\t\t\t\t </script>';\t\t\t\t\t \n\t\t\t\t\t $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'soundcloud':\n if ($this->link)\n {\n $embedCode .= '<iframe width=\"100%\" height=\"400\" scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?visual=true&url=' . $this->link . '&show_artwork=false&buying=false&sharing=false&show_comments=false\"></iframe>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n \n case 'putlocker':\n $videoId = $this->getVideoId(\"file/\");\n if ($videoId != null)\n {\n $embedCode .= '<iframe width=\"' . $this->width . '\" height=\"' . $this->height . '\" src=\"http://www.putlocker.com/embed/' . $videoId . '\" frameborder=\"0\" scrolling=\"no\" allowfullscreen></iframe>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'hell':\n $videoId = $this->getVideoId(\"videos/\");\n //$videoId = $this->getLastNr($this->link);\n if ($videoId != null)\n {\n $embedCode .= '<iframe width=\"' . $this->width . '\" height=\"' . $this->height . '\" src=\"http://www.hell.tv/embed/video/' . $videoId . '\" frameborder=\"0\" scrolling=\"no\" allowfullscreen></iframe>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'dailymotion':\n $videoId = $this->getVideoId(\"video/\");\n if ($videoId != null)\n {\n $embedCode .= '<iframe frameborder=\"0\" width=\"' . $this->width . '\" height=\"' . $this->height . '\" src=\"https://www.dailymotion.com/embed/video/' . $videoId . '\"></iframe>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'trilulilu':\n $videoId = $this->getVideoId(\".ro/\");\n if ($videoId != null)\n {\n $embedCode .= '<iframe width=\"' . $this->width . '\" height=\"' . $this->height . '\" src=\"http://embed.trilulilu.ro/' . $videoId . '\" frameborder=\"0\" allowfullscreen></iframe> ';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'liveleak':\n $videoId = $this->getVideoId(\"i=\");\n if ($videoId != null)\n {\n $embedCode .= '<iframe width=\"' . $this->width . '\" height=\"' . $this->height . '\" src=\"http://www.liveleak.com/e/' . $videoId . '\" frameborder=\"0\" allowfullscreen></iframe> ';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'metacafe':\n $videoId = $this->getVideoId(\"watch/\", \"/\");\n if ($videoId != null)\n {\n $embedCode .= '<iframe src=\"http://www.metacafe.com/embed/' . $videoId . '/\" width=\"' . $this->width . '\" height=\"' . $this->height . '\" allowFullScreen frameborder=0></iframe>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'viddler':\n $videoId = $this->getVideoId(\"v/\");\n if ($videoId != null)\n {\n $embedCode .= \"<object classid=\\\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\\" width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" \";\n $embedCode .= \"id=\\\"viddler_1f72e4ee\\\">\";\n $embedCode .= \"<param name=\\\"movie\\\" value=\\\"https://www.viddler.com/player/\" . $videoId . \"\\\" />\";\n $embedCode .= \"<param name=\\\"allowScriptAccess\\\" value=\\\"always\\\" />\";\n $embedCode .= \"<param name=\\\"allowFullScreen\\\" value=\\\"true\\\" />\";\n $embedCode .= \"<embed src=\\\"https://www.viddler.com/player/\" . $videoId . \"\\\"\";\n $embedCode .= \" width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" type=\\\"application/x-shockwave-flash\\\" \";\n $embedCode .= \"allowScriptAccess=\\\"always\\\"\";\n $embedCode .= \"allowFullScreen=\\\"true\\\" name=\\\"viddler_\" . $videoId . \"\\\"\\\"></embed></object>\";\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'blip':\n $videoId = $this->getLastNr($this->link);\n if ($videoId != null)\n {\n $embedCode .= \"<embed src=\\\"http://blip.tv/file/\" . $videoId . \"\\\" \";\n $embedCode .= \"type=\\\"application/x-shockwave-flash\\\" width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\"\";\n $embedCode .= \" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\"></embed>\";\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'myspace':\n $this->link = strtolower($this->link);\n $videoId = $this->getVideoId(\"vid/\", \"&\");\n if ($videoId != null)\n {\n $embedCode .= \"<object width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" ><param name=\\\"allowFullScreen\\\" \";\n $embedCode .= \"value=\\\"true\\\"/><param name=\\\"wmode\\\" value=\\\"transparent\\\"/><param name=\\\"movie\\\" \";\n $embedCode .= \"value=\\\"http://mediaservices.myspace.com/services/media/embed.aspx/m=\" . $videoId . \",t=1,mt=video\\\"/>\";\n $embedCode .= \"<embed src=\\\"http://mediaservices.myspace.com/services/media/embed.aspx/m=\" . $videoId . \",t=1,mt=video\\\" \";\n $embedCode .= \"width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" allowFullScreen=\\\"true\\\" type=\\\"application/x-shockwave-flash\\\" \";\n $embedCode .= \"wmode=\\\"transparent\\\"></embed></object>\";\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'ustream':\n $videoId = $this->getVideoId(\"recorded/\", '/');\n if ($videoId != null)\n {\n $embedCode .= \"<object classid=\\\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\\\" \";\n $embedCode .= \"width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" \";\n $embedCode .= \"id=\\\"utv867721\\\" name=\\\"utv_n_859419\\\"><param name=\\\"flashvars\\\" \";\n $embedCode .= \"value\\\"beginPercent=0.0236&amp;endPercent=0.2333&amp;autoplay=false&locale=en_US\\\" />\";\n $embedCode .= \"<param name=\\\"allowfullscreen\\\" value=\\\"true\\\" /><param name=\\\"allowscriptaccess\\\" \";\n $embedCode .= \"value=\\\"always\\\" />\";\n $embedCode .= \"<param name=\\\"src\\\" value=\\\"http://www.ustream.tv/flash/video/\" . $videoId . \"\\\" />\";\n $embedCode .= \"<embed flashvars=\\\"beginPercent=0.0236&amp;endPercent=0.2333&amp;autoplay=false&locale=en_US\\\" \";\n $embedCode .= \"width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" \";\n $embedCode .= \"allowfullscreen=\\\"true\\\" allowscriptaccess=\\\"always\\\" id=\\\"utv867721\\\" \";\n $embedCode .= \"name=\\\"utv_n_859419\\\" src=\\\"http://www.ustream.tv/flash/video/\" . $videoId . \"\\\" \";\n $embedCode .= \"type=\\\"application/x-shockwave-flash\\\" /></object>\";\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'livestream':\n $firstID = $this->getVideoId(\"com/\", '/');\n $secondID = $this->getVideoId(\"?clipId=\", '&');\n if ($firstID != null && $secondID != null)\n {\n $embedCode .= \"<object width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" id=\\\"lsplayer\\\" \";\n $embedCode .= \"classid=\\\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\\">\";\n $embedCode .= \"<param name=\\\"movie\\\" \";\n $embedCode .= \"value=\\\"http://cdn.livestream.com/grid/LSPlayer.swf?channel=\" . $firstID . \"&amp;\";\n $embedCode .= \"clip=\" . $secondID . \"&amp;autoPlay=false\\\"></param>\";\n $embedCode .= \"<param name=\\\"allowScriptAccess\\\" value=\\\"always\\\"></param><param name=\\\"allowFullScreen\\\" \";\n $embedCode .= \"value=\\\"true\\\"></param><embed name=\\\"lsplayer\\\" wmode=\\\"transparent\\\" \";\n $embedCode .= \"src=\\\"http://cdn.livestream.com/grid/LSPlayer.swf?channel=\" . $firstID . \"&amp;\";\n $embedCode .= \"clip=\" . $secondID . \"&amp;autoPlay=false\\\" \";\n $embedCode .= \"width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" allowScriptAccess=\\\"always\\\" allowFullScreen=\\\"true\\\" \";\n $embedCode .= \"type=\\\"application/x-shockwave-flash\\\"></embed></object>\t\";\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'gametrailers':\n $videoFullID = $this->getVideoId(\"video/\");\n $videoId = strpos($videoFullID, \"/\");\n $videoId = substr($videoFullID, $videoId + 1, strlen($videoFullID));\n if ($videoId != null)\n {\n $embedCode .= '<embed src=\"http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:' . $videoId . '\" width=\"' . $this->width . '\" height=\"' . $this->height . '\" type=\"application/x-shockwave-flash\" allowFullScreen=\"true\" allowScriptAccess=\"always\" base=\".\" flashVars=\"\"></embed>';\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'vk':\n $firstIDs = $this->getVideoId(\"video\", '_');\n $secondIDs = $this->getVideoId(\"_\", '?');\n $thirdIDs = $this->getVideoId(\"hash=\");\n if ($firstIDs != null && $secondIDs != null && $thirdIDs != null)\n {\n $embedCode .= \"<iframe src=\\\"http://vk.com/video_ext.php?oid=\" . $firstIDs . \"&id=\" . $secondIDs . \"&hash=\" . $thirdIDs . \"&sd\\\" width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" frameborder=\\\"0\\\"></iframe>\";\n $embedCode .= _ad('1');\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n case 'telly':\n $videoIdForChannel = $this->getVideoId('guid=');\n if (strlen($videoIdForChannel) > 0)\n {\n $videoId = $videoIdForChannel;\n }\n else\n {\n $videoId = $this->getVideoId(\".com/\", '?');\n }\n if ($videoId != null)\n {\n $embedCode .= \"<iframe src=\\\"http://telly.com/embed.php?guid=\" . $videoId . \"&#038;autoplay=0\\\" title=\\\"Telly video player \\\" class=\\\"twitvid-player\\\" type=\\\"text/html\\\" width=\\\"\" . $this->width . \"\\\" height=\\\"\" . $this->height . \"\\\" frameborder=\\\"0\\\"></iframe>\";\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n default:\n if (has_filter('EmbedModify'))\n {\n $embedCode = apply_filters('EmbedModify', false);\n }\n else\n {\n $embedCode = INVALID_URL;\n }\n break;\n }\n return $embedCode;\n }", "title": "" }, { "docid": "5b6dd4340b5e0a6e99216b7a14106d6e", "score": "0.5232643", "text": "public function playVideo($input)\n {\n $videoID = trim(htmlspecialchars($input['video_id']));\n $courseID = trim(htmlspecialchars($input['course_id']));\n\n $video = $this->where(['id' => $videoID, 'video_course_id' => $courseID])->get()->first();\n\n $vImage=null;\n if($video->image) {\n $vImage ='/public/uploads/videocourse/' . $courseID . '/' . $video->id . '/' . $video->image;\n }\n return [\n 'image' => $vImage,\n 'video' => '/public/uploads/videocourse/' . $courseID. '/' . $video->id . '/' . $video->video,\n ];\n\n\n }", "title": "" }, { "docid": "149dcff6509b326d36aa2bd6ffc0eccb", "score": "0.52281266", "text": "function dailymotionComProcessDuration($option)\r\n\t{\r\n\t\tif (!defined('HWDVIDSPATH')) { define('HWDVIDSPATH', dirname(__FILE__).'/../../'); }\r\n\t\t$c = hwd_vs_Config::get_instance();\r\n\r\n\t\t$code = hwd_vs_tp_dailymotionCom::dailymotionComGetCode($option);\r\n\t\t$code = $code[1];\r\n\r\n\t\t$watchvideourl = \"http://www.dailymotion.com/video/\".$code;\r\n\t\t$watchvideourl = hwd_vs_tools::get_final_url( $watchvideourl );\r\n\r\n\t\tif (function_exists('curl_init')) {\r\n\t\t\t// get title with CURL\r\n\t\t\t$curl_handle=curl_init();\r\n\t\t\tcurl_setopt($curl_handle,CURLOPT_URL,$watchvideourl);\r\n\t\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\r\n\t\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\r\n\t\t\t$buffer = curl_exec($curl_handle);\r\n\t\t\tcurl_close($curl_handle);\r\n\r\n\t\t\t// check third party encoding and compare to system encoding\r\n\t\t\t// fix if necessary\r\n\t\t\tif (function_exists('mb_detect_encoding')) {\r\n\t\t\t\tif (mb_detect_encoding($buffer . 'a' , 'UTF-8, ISO-8859-1') == \"ISO-8859-1\") {\r\n\t\t\t\t\t$buffer = utf8_encode($buffer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (empty($buffer))\t{\r\n\t\t\t\t$ext_v_durat[0] = 0;\r\n\t\t\t\t$ext_v_durat[1] = \"0:00:00\";\r\n\t\t\t} else {\r\n\t\t\t\t$tagst = strpos($buffer, '&amp;DMDURATION=');\r\n\t\t\t\t$tagst = $tagst + 16;\r\n\t\t\t\t$tagen = strpos($buffer, '&amp;', $tagst);\r\n\t\t\t\t$tagle = $tagen - $tagst;\r\n\r\n\t\t\t\tif (($tagst === false) || ($tagen === false)) {\r\n\t\t\t\t\t$ext_v_durat[0] = 0;\r\n\t\t\t\t\t$ext_v_durat[1] = \"0:00:00\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$tag = substr($buffer, $tagst, $tagle);\r\n\t\t\t\t\tif ($tag) {\r\n\t\t\t\t\t\t$ext_v_durat[0] = 1;\r\n\t\t\t\t\t\t$ext_v_durat[1] = hwd_vs_tools::sec2hms($tag);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$ext_v_durat[0] = 0;\r\n\t\t\t\t\t\t$ext_v_durat[1] = \"0:00:00\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$ext_v_title[0] = 0;\r\n\t\t\t$ext_v_title[1] = \"0:00:00\";\r\n\t\t}\r\n\t\t$ext_v_durat[1] = preg_replace(\"/[^0-9-:]/\", \"\", $ext_v_durat[1]);\r\n\t\treturn $ext_v_durat;\r\n\t}", "title": "" }, { "docid": "0056ac1865895327dc248675a287803e", "score": "0.5225254", "text": "function is_video($name, $as_admin, $must_be_true_video = false)\n{\n $allow_audio = (get_option('allow_audio_videos') == '1');\n\n if (is_image($name)) {\n return false;\n }\n\n if ($must_be_true_video) {\n require_code('mime_types');\n $ext = get_file_extension($name);\n if (($ext == 'rm') || ($ext == 'ram')) {\n return true; // These have audio mime types, but may be videos\n }\n $mime_type = get_mime_type($ext, $as_admin);\n return ((substr($mime_type, 0, 6) == 'video/') || (($allow_audio) && (substr($mime_type, 0, 6) == 'audio/')));\n }\n\n require_code('media_renderer');\n $acceptable_media = $allow_audio ? (MEDIA_TYPE_VIDEO | MEDIA_TYPE_AUDIO | MEDIA_TYPE_OTHER /* but not images */) : MEDIA_TYPE_VIDEO;\n $hooks = find_media_renderers($name, array(), $as_admin, null, $acceptable_media);\n return !is_null($hooks);\n}", "title": "" }, { "docid": "494d9cc07f721f29fda0e920d672a7ef", "score": "0.5224801", "text": "function getVideo() {\n return $this->db->get('video');\n }", "title": "" }, { "docid": "0afbdf7f395b10eab6c567dc720c6686", "score": "0.5217254", "text": "function getThumbImage($route, $thumbRoute){ // ver pq se ejecuta antes de instanciarla esta puta function\n\n/*\n $ffmpeg = FFMpeg\\FFMpeg::create();\n $video = $ffmpeg->open($route);\n $frame = $video->frame(FFMpeg\\Coordinate\\TimeCode::fromSeconds(1));\n $imageName = $frame->save($thumbRoute.uniqid().'jpg');\n*/\n\n $movie = new ffmpeg_movie($route,false);\n $videoDuration = $movie->getDuration();\n $frameCount = $movie->getFrameCount();\n $frameRate = $movie->getFrameRate();\n $videoTitle = $movie->getTitle();\n $author = $movie->getAuthor() ;\n $copyright = $movie->getCopyright();\n $frameHeight = $movie->getFrameHeight();\n $frameWidth = $movie->getFrameWidth();\n\n $capPos = ceil($frameCount/4);\n\n if($frameWidth>120)\n {\n $cropWidth = ceil(($frameWidth-120)/2);\n }\n else\n {\n $cropWidth =0;\n }\n if($frameHeight>90)\n {\n $cropHeight = ceil(($frameHeight-90)/2);\n }\n else\n {\n $cropHeight = 0;\n }\n if($cropWidth%2!=0)\n {\n $cropWidth = $cropWidth-1;\n }\n if($cropHeight%2!=0)\n {\n $cropHeight = $cropHeight-1;\n }\n\n $frameObject = $movie->getFrame($capPos);\n\n\n if($frameObject)\n {\n $imageName = $thumbRoute;\n $tmbPath = $imageName;\n $frameObject->resize(480,270,0,0,0,0); //120 x90\n imagejpeg($frameObject->toGDImage(),$tmbPath);\n }\n else\n {\n $imageName=\"\";\n }\n \n return $imageName;\n }", "title": "" }, { "docid": "2cb042293f2aec52946096f07348a5e6", "score": "0.5210997", "text": "public function testMultiPartFormDataParsingToGetParamsFromRequestWithMP4Video()\n {\n $videoBody = \"AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAABgNtZGF0AAACrgYF//+q3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0OCByMjY0MyA1YzY1NzA0IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTQgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAMGWIhAA3//728P4FNlYEUJcRzeidMx+/Fbi6PXL2RZj2wmZZxBesACRgA0YoZdXQoQAAAAxBmiRsQ3/+p4QAl4AAAAAJQZ5CeIV/AHpB3gIATGF2YzU2LjYwLjEwMABCIAjBGDghEARgjBwAAAAJAZ5hdEJ/AKCAIRAEYIwcIRAEYIwcAAAACQGeY2pCfwCggSEQBGCMHAAAABJBmmhJqEFomUwIb//+p4QAl4EhEARgjBwhEARgjBwAAAALQZ6GRREsK/8AekEhEARgjBwAAAAJAZ6ldEJ/AKCBIRAEYIwcIRAEYIwcAAAACQGep2pCfwCggCEQBGCMHAAAABJBmqxJqEFsmUwIb//+p4QAl4AhEARgjBwhEARgjBwAAAALQZ7KRRUsK/8AekEhEARgjBwhEARgjBwAAAAJAZ7pdEJ/AKCAIRAEYIwcAAAACQGe62pCfwCggCEQBGCMHCEQBGCMHAAAABJBmvBJqEFsmUwIb//+p4QAl4EhEARgjBwAAAALQZ8ORRUsK/8AekEhEARgjBwhEARgjBwAAAAJAZ8tdEJ/AKCBIRAEYIwcAAAACQGfL2pCfwCggCEQBGCMHCEQBGCMHAAAABJBmzRJqEFsmUwIb//+p4QAl4AhEARgjBwhEARgjBwAAAALQZ9SRRUsK/8AekEhEARgjBwAAAAJAZ9xdEJ/AKCAIRAEYIwcIRAEYIwcAAAACQGfc2pCfwCggCEQBGCMHAAAABFBm3hJqEFsmUwIZ//+nhACTyEQBGCMHCEQBGCMHAAAAAtBn5ZFFSwr/wB6QCEQBGCMHAAAAAkBn7V0Qn8AoIEhEARgjBwhEARgjBwAAAAJAZ+3akJ/AKCBIRAEYIwcAAAAEUGbvEmoQWyZTAhf//6MsAJWIRAEYIwcIRAEYIwcAAAAC0Gf2kUVLCv/AHpBIRAEYIwcIRAEYIwcAAAACQGf+XRCfwCggCEQBGCMHAAAAAkBn/tqQn8AoIEhEARgjBwhEARgjBwAAAASQZv+SahBbJlMFEwn//3xABZRIRAEYIwcAAAACQGeHWpCfwCggCEQBGCMHCEQBGCMHCEQBGCMHCEQBGCMHCEQBGCMHCEQBGCMHCEQBGCMHAAACURtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAEQAABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAEK3RyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAECwAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAsAAAAJAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAABAsAAAfSAAEAAAAAA6NtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAHUwAAB5N1XEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAANObWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADDnN0YmwAAACWc3RzZAAAAAAAAAABAAAAhmF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAsACQAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAwYXZjQwFkAAv/4QAXZ2QAC6zZQsTsBEAAAPpAADqYA8UKZYABAAZo6+PLIsAAAAAYc3R0cwAAAAAAAAABAAAAHwAAA+kAAAAUc3RzcwAAAAAAAAABAAAAAQAAAQhjdHRzAAAAAAAAAB8AAAABAAAH0gAAAAEAABONAAAAAQAAB9IAAAABAAAAAAAAAAEAAAPpAAAAAQAAE40AAAABAAAH0gAAAAEAAAAAAAAAAQAAA+kAAAABAAATjQAAAAEAAAfSAAAAAQAAAAAAAAABAAAD6QAAAAEAABONAAAAAQAAB9IAAAABAAAAAAAAAAEAAAPpAAAAAQAAE40AAAABAAAH0gAAAAEAAAAAAAAAAQAAA+kAAAABAAATjQAAAAEAAAfSAAAAAQAAAAAAAAABAAAD6QAAAAEAABONAAAAAQAAB9IAAAABAAAAAAAAAAEAAAPpAAAAAQAAC7sAAAABAAAD6QAAAChzdHNjAAAAAAAAAAIAAAABAAAAAwAAAAEAAAACAAAAAQAAAAEAAACQc3RzegAAAAAAAAAAAAAAHwAAAuYAAAAQAAAADQAAAA0AAAANAAAAFgAAAA8AAAANAAAADQAAABYAAAAPAAAADQAAAA0AAAAWAAAADwAAAA0AAAANAAAAFgAAAA8AAAANAAAADQAAABUAAAAPAAAADQAAAA0AAAAVAAAADwAAAA0AAAANAAAAFgAAAA0AAACEc3RjbwAAAAAAAAAdAAAAMAAAA1AAAANpAAADfAAAA54AAAOzAAADzAAAA98AAAQBAAAEHAAABC8AAARIAAAEZAAABH8AAASSAAAEqwAABM0AAATiAAAE+wAABQ4AAAUvAAAFRAAABV0AAAVwAAAFkQAABawAAAW/AAAF2AAABfQAAARDdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAARAAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAEQAAAAAAAAQAAAAADu21kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAu4AAAMwAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAA2ZtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAypzdGJsAAAAanN0c2QAAAAAAAAAAQAAAFptcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAAu4AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAB9AAAAAlHBYCAgAURkFblAAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAAAzAAAEAAAAATxzdHNjAAAAAAAAABkAAAABAAAAAgAAAAEAAAADAAAAAQAAAAEAAAAEAAAAAgAAAAEAAAAFAAAAAQAAAAEAAAAGAAAAAgAAAAEAAAAHAAAAAQAAAAEAAAAIAAAAAgAAAAEAAAAKAAAAAQAAAAEAAAALAAAAAgAAAAEAAAAMAAAAAQAAAAEAAAANAAAAAgAAAAEAAAAOAAAAAQAAAAEAAAAPAAAAAgAAAAEAAAARAAAAAQAAAAEAAAASAAAAAgAAAAEAAAATAAAAAQAAAAEAAAAUAAAAAgAAAAEAAAAVAAAAAQAAAAEAAAAWAAAAAgAAAAEAAAAXAAAAAQAAAAEAAAAYAAAAAgAAAAEAAAAaAAAAAQAAAAEAAAAbAAAAAgAAAAEAAAAcAAAAAQAAAAEAAAAdAAAABwAAAAEAAADgc3RzegAAAAAAAAAAAAAAMwAAABcAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAIRzdGNvAAAAAAAAAB0AAAMzAAADXQAAA3YAAAOSAAADrQAAA8AAAAPZAAAD9QAABBAAAAQpAAAEPAAABF4AAARzAAAEjAAABJ8AAATBAAAE3AAABO8AAAUIAAAFIwAABT4AAAVRAAAFagAABYUAAAWgAAAFuQAABcwAAAXuAAAGAQAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTYuNDAuMTAx\";\n $bodyContent = \"------WebKitFormBoundary0UtlU0OEOMCbmK39\\r\\nContent-Disposition: form-data; name=\\\"file\\\"; filename=\\\"blank.mp4\\\"\\r\\nContent-Type: video/mp4\\r\\n\\r\\n\".base64_decode($videoBody).\"\\r\\n------WebKitFormBoundary0UtlU0OEOMCbmK39--\\r\\n\";\n $headerString = \"Host: 127.0.0.1\\r\\n\" .\n \"Connection: keep-alive\\r\\n\" .\n \"Content-Length: \" . strlen($bodyContent) . \"\\r\\n\" .\n \"Cache-Control: max-age=0\\r\\n\" .\n \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\\r\\n\" .\n \"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36\\r\\n\" .\n \"Content-Type: multipart/form-data; boundary=----WebKitFormBoundary0UtlU0OEOMCbmK39\\r\\n\" .\n \"Accept-Encoding: gzip,deflate,sdch\\r\\n\" .\n \"Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4\\r\\n\" .\n \"Cookie: _ga=GA1.1.1798004689.1405528669\\r\\n\";\n $this->parser->parseHeaders($headerString);\n $this->parser->parseMultipartFormData($bodyContent);\n $this->assertSame(1, count($this->parser->getRequest()->getParts()));\n // get part instance for file1\n $part = $this->parser->getRequest()->getPart('file');\n $this->assertInstanceOf('AppserverIo\\Psr\\HttpMessage\\PartInterface', $part);\n $this->assertSame(\"blank.mp4\", $part->getFilename());\n $this->assertSame(\"video/mp4\", $part->getContentType());\n $this->assertSame($videoBody, base64_encode(stream_get_contents($part->getInputStream())));\n // check headers on part\n $this->assertSame(array(\n 'Content-Disposition' => 'form-data; name=\"file\"; filename=\"blank.mp4\"',\n 'Content-Type' => 'video/mp4'\n ), $part->getHeaders());\n // check headername on part\n $this->assertSame(array(\n 0 => 'Content-Disposition',\n 1 => 'Content-Type'\n ), $part->getHeaderNames());\n }", "title": "" }, { "docid": "75697192d9a61a75fdaf31181f93e67a", "score": "0.5207259", "text": "public function testReviewPrototypeGetVideo()\n {\n\n }", "title": "" }, { "docid": "a3fd8938dfaf7ec3f50bcd410386663b", "score": "0.52007014", "text": "function videodata( &$chctx, &$data, &$vheaddata )\r\n{\r\n\t$ret = 0 ;\r\n\r\n\t$chctx['ft'] = $chctx['nt'] ;\t\t\t// current frame time (ms diff from file time)\r\n\t$chctx['fl'] = 0 ;\t\t\t\t\t\t// clear current frame length ( in ms )\r\n\r\n\tif( ($vfile = vfile_open( $chctx['v'] )) ) {\r\n\t\t// read file header\r\n\t\tif( !empty($chctx['nh']) ) {\r\n\t\t\tunset($chctx['nh']) ;\r\n\t\t\t$vheaddata=vfile_read($vfile, $chctx['hs']);\r\n\t\t}\r\n\t\tvfile_seek( $vfile, $chctx['no'] );\r\n\t\t\r\n\t\t// frame size\r\n\t\t$framesize = 2*1024*1024 ;\t\t\t// max 512k\r\n\t\tif( $chctx['ko'] > 0 ) {\r\n\t\t\tif( ($kfile = vfile_open($chctx['k'])) ) {\r\n\t\t\t\tvfile_seek( $kfile, $chctx['ko'] );\r\n\t\t\t\t$off = 0 ;\r\n\t\t\t\t$dms = 0 ;\r\n\t\t\t\twhile( $line = vfile_gets( $kfile ) ) {\r\n\t\t\t\t\tif( sscanf( $line, \"%d,%d\", $dms, $off )==2 ) {\r\n\t\t\t\t\t\tif( $off > $chctx['no'] ) {\r\n\t\t\t\t\t\t\t$framesize = $off - $chctx['no'] ;\r\n\t\t\t\t\t\t\t$chctx['fl'] = $dms - $chctx['ft'] ;\r\n\t\t\t\t\t\t\t$chctx['nt'] = $dms ;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$chctx['ko'] = vfile_tell($kfile);\r\n\t\t\t\tvfile_close($kfile);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data = vfile_read( $vfile, $framesize );\r\n\t\t\r\n\t\tif( $chctx['fl'] == 0 ) {\r\n\t\t\t// to calculate frame time base on readed size\r\n\t\t\t$l = strlen( $data ) ;\r\n\t\t\tif( $l>0 ) {\r\n\t\t\t\t$chctx['fl'] = (integer)(1000*$chctx['vl']*$l/$chctx['vs'])+10 ;\r\n\t\t\t\t$chctx['ft'] += $chctx['fl'] ;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$chctx['no'] = vfile_tell( $vfile );\r\n\t\tvfile_close( $vfile );\r\n\t}\r\n\r\n\treturn $chctx['fl'] ;\r\n}", "title": "" }, { "docid": "61dc01f6a19d42a60ec666ee161b42ac", "score": "0.51998764", "text": "public function video_view_post() {\n $apikey = $this->input->post('apikey');\n $topic_id = $this->input->post('topic_id');\n\n\n\n if (isPostBack()) {\n $this->form_validation->set_rules('topic_id', 'Topic ID', 'trim|required|numeric');\n //$this->form_validation->set_rules('student_id', 'Student ID', 'trim|required|numeric');\n\n if ($this->form_validation->run()) {\n if ($apikey == APIKEY) {\n $topic_video_url = $this->Webapi_model->video_view_list($topic_id);\n foreach ($topic_video_url as $key => $value) {\n if($value->video_name!=\"\" && $value->video_name!=null && $value->video_url==null && $value->video_url==\"\")\n { $data['type']=\"1\";\n $data['Video']=base_url().'uploads/profile_image/'.$value->video_name;\n }if($value->video_url!=\"\" && $value->video_url!=null && $value->video_name==null && $value->video_name==\"\")\n {\n $data['type']=\"2\";\n $data['Video']=$value->video_url;\n }if($value->video_url==\"\" && $value->video_url==null && $value->video_name==null && $value->video_name==\"\"){\n $data['type']=\"null\"; \n $data[\"Video\"]=\"No Video/URL\";\n }\n }\n\n $success = array('ErrorCode' => 0, \"message\" => \"Video/URL View\", 'data' =>$data);\n\n $this->response($success, 200);\n } else {\n $error = array('ErrorCode' => 1, 'message' => 'Api Key does not exist');\n $this->response($error, 200);\n }\n } else {\n $error = array('ErrorCode' => 1, 'message' => validation_errors());\n $this->response($error, 200);\n }\n } else {\n $error = array('ErrorCode' => 1, 'message' => 'Use Post Method Only');\n $this->response($error, 200);\n }\n}", "title": "" }, { "docid": "9b0bbb71ef8b122e19b7fe5ce8fa1499", "score": "0.5194909", "text": "public function testYandexVideo()\n {\n $this->wd->get('https://yandex.ua/video');\n\t\t//locators\n\t\t$searchInput = '[type=search]';\n\t\t$searchBtn = 'div.search2__button';\n\t\t$img = 'div.related-video div.thumb-preview:first-of-type img';\n\n\t\t//Actions\n $searchAction = $this->waitforCss($searchInput);\n\t\t$searchAction->sendKeys('ураган');\n\t\t\n\t\t$findAction = $this->waitForCss($searchBtn);\n\t\t$findAction->click();\n\n\t\t$mouseAction = $this->waitforCss($img);\n\t\t$this->wd->getMouse()->mouseMove( $mouseAction->getCoordinates());\n\t\t\n\t\t//getting tumbnail src attributes\n\t\tsleep(1);\n\t\t$a = $mouseAction -> getAttribute('src');\n\t\tsleep(2);\n\t\t$b = $mouseAction -> getAttribute('src');\n\t\t\n\t\t//providing assertion\n $this->assertNotEquals($a,$b);\t\t\n }", "title": "" }, { "docid": "d595d32f4c5153a477db7ccf2759f2ea", "score": "0.51894397", "text": "function get_file_info( $path_source =NULL) {\r\n\t\t\r\n\t\tif(!$path_source)\r\n\t\t$path_source = $this->input_file;\r\n\r\n\t\t# init the info to N/A\r\n\t\t$info['format']\t\t\t= 'N/A';\r\n\t\t$info['duration']\t\t= 'N/A';\r\n\t\t$info['size']\t\t\t= 'N/A';\r\n\t\t$info['bitrate']\t\t= 'N/A';\r\n\t\t$info['video_width']\t= 'N/A';\r\n\t\t$info['video_height']\t= 'N/A';\r\n\t\t$info['video_wh_ratio']\t= 'N/A';\r\n\t\t$info['video_codec']\t= 'N/A';\r\n\t\t$info['video_rate']\t\t= 'N/A';\r\n\t\t$info['video_bitrate']\t= 'N/A';\r\n\t\t$info['video_color']\t= 'N/A';\r\n\t\t$info['audio_codec']\t= 'N/A';\r\n\t\t$info['audio_bitrate']\t= 'N/A';\r\n\t\t$info['audio_rate']\t\t= 'N/A';\r\n\t\t$info['audio_channels']\t= 'N/A';\r\n\t\t$info['path']\t\t\t= $path_source;\r\n\r\n\t\t# get the file size\r\n\t\t$stats = @stat( $path_source );\r\n\t\tif( $stats === false )\r\n\t\t$this->log .= \"Failed to stat file $path_source!\\n\";\r\n\t\t$info['size'] = (integer)$stats['size'];\r\n\t\t$this->ffmpeg.\" -i $path_source -acodec copy -vcodec copy -f null /dev/null 2>&1\";\r\n\t\t$this->raw_output = $output = $this->exec( $this->ffmpeg.\" -i $path_source -acodec copy -vcodec copy -y -f null /dev/null 2>&1\" );\r\n\r\n\t\t$this->raw_info = $info;\r\n\t\t# parse output\r\n\t\tif( $this->parse_format_info( $output ) === false )\r\n\t\treturn false;\r\n\t\t$info = $this->raw_info;\r\n\t\treturn $info;\r\n\t}", "title": "" }, { "docid": "3892280585eb8217676fa88ebe1209ac", "score": "0.516493", "text": "function theme_gs_helper_field_video($vars) {\n $output = '';\n\n if (!empty($vars['image_file'])) {\n $items['movie'] = (array) $vars['video_file'];\n \n $items['poster'] = (array) $vars['image_file'];\n \n $video_vars = array(\n 'items' => $items,\n 'attributes' => array(\n 'width' => 600,\n // 'height' => 300,\n ),\n 'player_id' => 'file-' . $vars['video_file']['fid'],\n );\n \n $output = '<div class=\"video-content\">' . theme('videojs', $video_vars) . '</div>';\n }\n \n return $output;\n}", "title": "" }, { "docid": "5f36a6bb0774da140d1ce6e53a9a345a", "score": "0.51595217", "text": "function MediaAttach_extvideoapi_getproviders()\r\n{\r\n $dom = ZLanguage::getModuleDomain('MediaAttach');\r\n $providers = array();\r\n\r\n $providers[] = array('name' => 'Dailymotion',\r\n 'desc' => 'Dailymotion - Share Your Videos',\r\n 'domains' => array('dailymotion.com'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 420,\r\n 'playerHeight' => 336,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<h1 class=\"nav with_uptitle\">',\r\n 'titleEnd' => '</h1>',\r\n 'descStart' => '<div class=\"description foreground\">',\r\n 'descEnd' => '</div>',\r\n 'fileStart' => 'param name=&quot;movie&quot; value=&quot;',\r\n 'fileEnd' => '&quot;&gt;&lt;/param&gt;&lt;',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n $providers[] = array('name' => 'Google Video',\r\n 'desc' => 'Google Video',\r\n 'domains' => array('video.google.com', 'video.google.de'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 400,\r\n 'playerHeight' => 326,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<title>',\r\n 'titleEnd' => '</title>',\r\n 'descStart' => '<meta name=\\\"description\\\" content=\\\"',\r\n 'descEnd' => '\\\">',\r\n 'fileStart' => 'videosendlink\\', \\'',\r\n 'fileEnd' => '\\' \\+ \\'',\r\n 'filePfix' => 'http://video.google.com/googleplayer.swf?',\r\n 'fileSfix' => ''));\r\n\r\n $providers[] = array('name' => 'YouTube',\r\n 'desc' => 'YouTube - Broadcast Yourself.',\r\n 'domains' => array('youtube.com', 'youtube.de'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 425,\r\n 'playerHeight' => 355,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<meta name=\\\"title\\\" content=\\\"',\r\n 'titleEnd' => '\\\">',\r\n 'descStart' => '<meta name=\\\"description\\\" content=\\\"',\r\n 'descEnd' => '\\\">',\r\n 'fileStart' => '&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;',\r\n 'fileEnd' => '&quot;&gt;&lt;/param&gt;&lt;param name=&quot;',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n $providers[] = array('name' => 'SlideShare',\r\n 'desc' => 'Share your presentations with the world.',\r\n 'domains' => array('slideshare.net'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 425,\r\n 'playerHeight' => 355,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<title>',\r\n 'titleEnd' => '</title>',\r\n 'descStart' => '<meta name=\\\"description\\\" content=\\\"',\r\n 'descEnd' => '\\\" />',\r\n 'fileStart' => '&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;',\r\n 'fileEnd' => '&quot;/&gt;&lt;param name=&quot;',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n $providers[] = array('name' => 'Revver',\r\n 'desc' => 'Online Video Sharing Network.',\r\n 'domains' => array('revver.com'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 480,\r\n 'playerHeight' => 392,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<meta name=\\\"title\\\" content=\\\"',\r\n 'titleEnd' => '\\\" />',\r\n 'descStart' => '<meta name=\\\"description\\\" content=\\\"',\r\n 'descEnd' => '\\\" />',\r\n 'fileStart' => '<link rel=\"video_src\" href=\"',\r\n 'fileEnd' => '\" />',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n $providers[] = array('name' => 'Broadcaster',\r\n 'desc' => 'Best Videos & Funny Movies.',\r\n 'domains' => array('broadcaster.com'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 425,\r\n 'playerHeight' => 340,\r\n 'searchpattern' => array(\r\n 'titleStart' => '>Title:</td>\r\n\t\t\t\t\t\t\t\t\t\t<td class=\\\"videoInfo\\\" align=\"left\">',\r\n 'titleEnd' => '</td>',\r\n 'descStart' => '>Description:</td>\r\n\t\t\t\t\t\t\t\t\t\t<td class=\\\"videoText\\\" align=\\\"left\\\">',\r\n 'descEnd' => '</td>',\r\n 'fileStart' => '&lt;embed src=\\\"',\r\n 'fileEnd' => '\\\" ',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n $providers[] = array('name' => 'Metacafe',\r\n 'desc' => 'Best Videos & Funny Movies.',\r\n 'domains' => array('metacafe.com'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 400,\r\n 'playerHeight' => 345,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<meta name=\\\"title\\\" content=\\\"Metacafe - ',\r\n 'titleEnd' => '\\\" />',\r\n 'descStart' => '<meta name=\\\"description\\\" content=\\\"',\r\n 'descEnd' => '\\\" />',\r\n 'fileStart' => '&lt;embed src=&quot;',\r\n 'fileEnd' => '&quot; ',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n $providers[] = array('name' => 'photobucket',\r\n 'desc' => 'Online Video Sharing Network.',\r\n 'domains' => array('photobucket.com'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 488,\r\n 'playerHeight' => 361,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<title>',\r\n 'titleEnd' => ' video by ',\r\n 'descStart' => '<meta name=\\\"description\\\" content=\\\"',\r\n 'descEnd' => '\\\"/>',\r\n 'fileStart' => '&quot; wmode=&quot;transparent&quot; src=&quot;',\r\n 'fileEnd' => '&quot;&gt;\"',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n\r\n\t$providers[] = array('name' => 'Hulu',\r\n 'desc' => 'Watch your favorites. Anytime. For free.',\r\n 'domains' => array('hulu.com'),\r\n 'filetypes' => array('extension' => 'flv', 'mimetype' => 'application/x-shockwave-flash'),\r\n 'playerWidth' => 512,\r\n 'playerHeight' => 296,\r\n 'searchpattern' => array(\r\n 'titleStart' => '<title>Hulu - ',\r\n 'titleEnd' => '</title>',\r\n 'descStart' => '<div class=\"description\" style=\"padding-bottom:10px;\">',\r\n 'descEnd' => '</div>',\r\n 'fileStart' => '<link rel=\"video_src\" href=\"',\r\n 'fileEnd' => '\"/>',\r\n 'filePfix' => '',\r\n 'fileSfix' => ''));\r\n\r\n/*\r\n\r\nBubblePLY (www.bubbleply.com) -\r\nMySpace (http://www.myspace.com) - (Video and Music part)\r\nhi5 - Who's in? (http://www.hi5.com) (Video part)\r\nImage hosting, free photo sharing & video sharing at Photobucket (http://www.photobucket.com)\r\nSee it! Shoot it! Share it! - Easy at AOL Video (http://www.uncutvideo.aol.com)\r\nWelcome to PerfSpot | PerfSpot Homepage | PerfSpot.com (http://www.perfspot.com)\r\nNetlog (http://www.netlog.com) (facebox.com) (Video part)\r\nBebo (http://www.bebo.com) - (Video and Music part)\r\nMultiply - Share your life with your friends (http://www.multiply.com)\r\nTagged (http://www.tagged.com)\r\nMEGAVIDEO - I'm watchin' it (http://www.megavideo.com)\r\nblip.tv (beta) (http://www.blip.tv)\r\nhttp://www.archive.org\r\nBreak.com - Free videos, pictures, and comedy for guys (http://www.break.com)\r\ncrunchyroll - feed your need! (http://www.crunchyroll.com)\r\nMusic Videos, Reality TV Shows, Celebrity News, Top Stories | MTV (http://www.mtv.com)\r\nTV Shows, Movies, Music Videos and Clips-Search, Watch & Discuss - SideReel (http://www.sidereel.com)\r\nTV.com: TV News - TV Shows - TV Listings - Entertainment News (http://www.tv.com)\r\nZedge: Free ringtones, free wallpaper, free themes, free downloads to Nokia and other mobile phones. (http://www.zedge.net)\r\nBroadcaster.com | Home | Viral Video Clips, Live Community, News, Software, Movies, Music, Games, Mobile Media & More (http://www.broadcaster.com)\r\nLiveVideo.com - The World is Watching (http://www.livevideo.com)\r\nBuzznet - Community Music Blogs, Friends, Video Sharing, and Photo Sharing (http://www.buzznet.com)\r\nIMEEM - what's on your playlist? (http://www.imeem.com)\r\nPeekvid (http://www.peekvid.com)\r\nLiveLeak.com - Redefining the Media (http://www.liveleak.com)\r\nRingo - Coole Leute. Coole Bilder. (http://www.ringo.com) (video part)\r\nFree video clips and films at GoFish. Watch free funny video clips and more! (http://www.gofish.com)\r\nSPIKE - Video, User Video, Movies, Trailers, Music and Viral Videos - SPIKE Powered By IFILM (http://www.ifilm.com) (SPIKE)\r\nESPN Video Beta (http://sports.espn.go.com/broadband/video/)\r\nPutfile.com :: Free Media Hosting and More! (http://www.putfile.com)\r\nAmerican Idol: Official FOX Site (http://www.americanidol.com)\r\nMojoFlix - New videos (http://www.mojoflix.com)\r\nPorkolt.com - social network (http://www.porkolt.com)\r\nHeavy.com - Videos, humor, community and other time-wasting tools (http://www.heavy.com)\r\nBullz-Eye.com - Guys' Portal to the Web (http://www.bullz-eye.com)\r\nHome | The Onion - America's Finest News Source (http://www.theonion.com)\r\nhttp://www.bolt.com\r\nMaxim - Hot Girls, Sex, Sports, Games, Technology, Hotties, Maxim Magazine (http://www.maximonline.com)\r\nLatest | gigglesugar - Funny Videos & Humor. (http://www.gigglesugar.com)\r\nFunny video clips, funny movies, classic TV ads, virals, silly pictures - Kontraband (http://www.kontraband.com)\r\nFileCabi.net - Where you Provide the Entertainment!! (http://www.filecabi.net)\r\nhttp://www.vh1.com (Video and Music)\r\nCrackle - Stream On (http://www.grouper.com)\r\nCulture, Music Videos, News, Travel, Documentaries | VBS.TV (http://www.vbs.tv)\r\nFLURL.com | The Best of Online Video (http://www.flurl.com)\r\nhttp://www.tv-links.co.uk (%80 movies supported)\r\nStickam - The Live Community (http://www.stickam.com)\r\nV:social: Online Video and Social Media Tools (http://www.vsocial.com)\r\nGorillaMask.net: Killing Productivity, Monday-Friday (http://www.gorillamask.net)\r\nJokeroo.com - Funny Videos, Funny Pictures, Games, Entertainment and More! (http://www.jokeroo.com)\r\nBrightcove - Internet TV Your Way (http://www.brightcove.com)\r\nOnline videos: From home videos to premium internet television content | Veoh Video Network (http://www.veoh.com)\r\nLast.fm &ndash; The Social Music Revolution (http://www.last.fm)\r\nSpikedHumor.com � Spiked Daily (http://www.spikedhumor.com)\r\nFunny Videos, Crazy Videos, Video Clips :: Vidmax.com (http://www.vidmax.com)\r\nSavvy.com (http://www.savvy.com)\r\nglumbert - the most amazing videos on the internet (http://www.glumbert.com)\r\nI Am Bored - Sites for when you're bored. (http://www.i-am-bored.com)\r\nFree video hosting (http://www.vidilife.com)\r\nPyzam - MySpace Layouts, Flash Toys, Comments Graphics, Funny Pics and More! (http://www.pyzam.com)\r\nFunnyJunk (http://www.funnyjunk.com)\r\nOur Crap is Your Crap << totallycrap.com (http://www.totallycrap.com)\r\nVidiac.com (http://www.vidiac.com)\r\nFHM Magazine Online - Mens Magazine (http://www.fhm.com)\r\nSifted Videos &bull; VideoSift: Online Video *Quality Control (http://www.videosift.com)\r\nStr8Up (http://www.Str8Up.com)\r\nWeakGame Entertainment - Online Entertainment Magazine, Video Hosting, Streaming Multimedia, Night Clubs (http://www.weakgame.com)\r\nYikers.com - Funny Videos, Pictures, Jokes, and Humor (http://www.yikers.com)\r\nVIDEO CODE ZONE | 40,000+ Music Video Codes For MySpace, Piczo, Friendster and Xanga, Free Movie Trailers, Funny Clips & Gaming Videos, Online Webcam Chat (http://www.videocodezone.com)\r\nhttp://www.uniquepeek.com\r\nKillSomeTime.com - Funny Videos, Extreme Videos, Funny Movies, Flash Games, Funny Pictures (http://www.killsometime.com)\r\ntetesaclaques.tv - T�tes � claques, clips d'animations humoristiques en ligne (http://www.tetesaclaques.tv)\r\nDumpalink.com - Your Daily Entertainment (http://www.dumpalink.com)\r\nNeatorama (http://www.neatorama.com)\r\nLiveDigital: Home (http://www.livedigital.com)\r\nVimeo. Because everyone shouldn�?t see everything. (http://www.vimeo.com)\r\nCracked.com - America's Only Humor & Video Site, Since 1958 (http://www.cracked.com)\r\nBravo TV Shows: Fashion, Comedy, Celebrity and Real Estate Shows �? Official Bravo TV Site (http://www.bravotv.com)\r\nhttp://www.thatvideosite.com\r\n\r\nYahoo! Video (http://www.video.yahoo.com)\r\n\r\n\r\nSweetcrazyboy SMS Jokes Fun, Shayari Site,Fun SMS,Cool SMS,Jokes SMS,Romantic SMS,Love SMS,Flirt SMS (http://www.sweetcrazyboy.com)\r\nBore Me - funny videos, pictures, games and jokes (http://www.boreme.com)\r\nFight Videos, UFC Videos, Street Fight Video Clips (http://www.wildko.com)\r\nMachoVideo.com (http://www.machovideo.com)\r\nFunny or Die - funny videos featuring celebrities, comedians, and you. (http://www.funnyordie.com)\r\nInternet entertainment updated daily with videos, animations, games and pictures - YourDailyMedia.com (http://www.yourdailymedia.com)\r\nJack9 - unTV (http://www.jack9.com)\r\nWatch and Win - WeWin Videos (http://www.wewin.com)\r\nSlacker Network (http://www.slackernetwork.com)\r\nRedBalcony.com - Movie Trailers, TV, DVDs, Videos, Funny Clips, Celebrities Videos, Photos and Games (http://www.redbalcony.com)\r\nShoutfile.com - Free videos, pictures, and comedy for everyone! (http://www.shoutfile.com)\r\nDumbR (http://www.dumbr.com)\r\ntheYNC.com Daily Media, Humor, Shocking, News Videos (http://www.theync.com)\r\nhttp://www.educatedearth.net\r\nFunny Hub - Funny Pictures, Videos & Jokes (http://www.funnyhub.com)\r\nSharkle.com - Free Online Video Sharing Community (http://www.sharkle.com)\r\n� Extreme Videos � (http://www.buzzhumor.com)\r\nhttp://www.godtube.com\r\nEJB.com: The best videos, pictures, and galleries on the web. (http://www.ejb.com)\r\nCelebrity Videos, Hot Sexy Movie Clips, Funny Celebrity Gossip (http://www.vidking.com)\r\nRetro Junk | Hey I remember that (http://www.retrojunk.com) (video part)\r\nVMIX Video Sharing & Hosting Community - Watch & Share Funny Free Home Made Videos - Creative Is Sexy (http://www.vmix.com)\r\nVideoegg - People powered media. (http://www.videoegg.com)\r\nMyspace Layouts, myspace icons, halloween myspace layouts, myspace halloween layouts, myspace graphics, myspace comments, myspace codes, glitter graphics, funny pictures, poems, jokes, games, ecards, celebrities, myspace layout codes, funny videos, m (http://www.funmunch.com)\r\nFunny Videos, Funny Pictures, DailyHaHa (http://www.dailyhaha.com)\r\nVideoJug - Life Explained. On Film. (http://www.videojug.com)\r\n- OwnageVideos.com - This site owns! Sexy & Owned Videos (http://www.ownagevideos.com)\r\nEVTV1 - Experience The Difference - EVTV1 brings you the best and most diverse video clips. From history and news, to comedy and bizarre you can watch it all right here. (http://www.evtv1.com)\r\nURTH.TV (http://www.urth.tv)\r\nPSFIGHTS.com - Pure Street Fights Videos, Girl Fights, Kimbo Fights, Explosive Fights (http://www.psfights.com)\r\nMilkandCookies - Community Moderated Funny Videos, Links and Dada (http://www.devilducky.com)\r\nOriginal Series, Featured Artists & Funny Videos on Super Deluxe (http://www.superdeluxe.com)\r\nMental Funk - Funny Pics, Hot Flicks, and Stupid Antics (http://www.mentalfunk.com)\r\nFunny Videos | Funny Movies | Funny Clips | Lemonzoo Entertainment (http://www.lemonzoo.com)\r\nFunny Videos, Sexy Videos, Freaky Videos, Flash Games, Funny Jokes, Popular Videos (http://www.freaknfunny.com)\r\nTumTube.com- Be Desi - Watch Desi, Free Desi Videos, Best Desi Videos, Cool Desi Videos (http://www.tumtube.com)\r\nBest Week Ever (http://www.bestweekever.tv)\r\nFunny Videos, Funny Clips, Funny Stuff, Crazy Videos, Funny Pictures (http://www.bofunk.com)\r\nhttp://www.aniboom.com\r\nTrickLife.com (http://www.tricklife.com)\r\nNeed For Fun (http://www.needforfun.com)\r\nFunMansion - Funny Videos, Pictures, and Games (http://www.funmansion.com)\r\nChum Video - The Best Funny Videos on The Net - Updated Every Hour! (http://www.chumvideo.com)\r\nFugly.com - It's FUN! It's FREE! It's FUGLY! - funny videos, flash games, clean jokes, hilarious movies, funny pics, office jokes, free prizes, horrible horoscopes, hysterical chat pranks, chat scripts and much more! (http://www.fugly.com)\r\nFunny videos, Sexy videos, Shocking videos and Fight videos - Clipjunkie.com (http://www.clipjunkie.com)\r\nExpert Village: Free video clips, how to videos, and video instruction (http://www.expertvillage.com)\r\nFunny Videos Collection of Funny Video Clips and Funny Movie Videos To Download (http://www.funny-videos.co.uk)\r\nCastpost: Web Video Solutions (http://www.castpost.com)\r\nMoron.com - Free Videos, Pictures, Games, And Comedy (http://www.moron.com)\r\nBlogging Tips (http://www.cucirca.com)\r\nUber (http://www.uber.com)\r\nHome - Too Shocking - Shocking Videos, Extreme Videos, Death Videos, Fight Videos (http://www.tooshocking.com)\r\nHumor, videos de humor, videos divertidos, fotos, postales, animaciones, bromas, bromas pesadas (http://www.alcachondeo.com)\r\nFree porn, nude girls, naked celebrities and hot chicks (http://www.uneaten.com)\r\nShocking Videos (http://www.shockinghumor.com)\r\nhttp://www.vid2c.com\r\nMain -- Resource for Extreme Internet entertainment updated daily with videos, games and pictures - Zaable.com (http://www.zaable.com)\r\nDorks - Funny Videos, Pictures, Games (http://www.dorks.com)\r\nCurrent // Home (http://www.current.tv)\r\nTop10Virals.com - 10 New Viral Videos Added Daily (http://www.top10virals.com)\r\nFunny Videos Clips | Funny Commercials | Priceless Pictures at Smit Happens (http://www.smithappens.com)\r\nHumping Frog - Daily updated funny videos, pictures, audio, games, jokes and comics! (http://www.humpingfrog.com)\r\nZuuble - Funny Videos, Fights, Fight Videos, Online Games (http://www.zuuble.com)\r\nFunny Videos, Games, Animations, Pictures @ YO! FUN (http://www.yofun.net)\r\nNearly Good - funny videos, sexy babes, play games, fun pictures, jokes + more (http://www.nearlygood.com)\r\nFree Movies & Documentaries - (incl. public domain) (http://www.jonhs.net/freemovies/)\r\nExtreme Funny Humor (http://www.extremefunnyhumor.com)\r\nPANDACHUTE.COM (http://www.pandachute.com)\r\nOurmedia: Homepage (http://www.ourmedia.org)\r\nDanerd.com - Funny videos sharing community (http://www.danerd.com)\r\n13gb.com Internet Goodness, Updated Daily (http://www.13gb.com)\r\nViolent Puppy - Where Violence, Sex and Humor Make Demon Babies (http://www.violentpuppy.com)\r\nTelevision 2.0 - Beba by N.I.X. and Ventura (http://www.web2.0television.com) (Web 2.0 Television)\r\nFight Dump - Fight Videos, Street Fights, UFC Fights, PRIDE Fights and Free Jiu Jitsu Training Videos (http://www.fightdump.com)\r\nBestCrazyVideos.com - the best crazy videos (http://www.bestcrazyvideos.com)\r\n-FORMAT INCONSISTENT- Music Video Codes For Myspace Hi5 Bebo Facebook Piczo Offuhuge Html Music Codes - Free Music Video Codes Links Rock Dance Reggaeton Perreo Trance Pop Hip Hop Comedy Flash Game Codes Podcast Videos,Toronto NightClub Videos (http://www.offuhuge.com)\r\nCollegeslackers.com - funny videos, forum, pictures, product reviews and more. (http://www.collegeslackers.com)\r\nhttp://www.eefoof.com\r\nShizzville | Daily Updates of the Best Videos on the Internet! (http://www.shizzville.com)\r\nFunny Videos,Funny Pictures,Free Games,Myspace,Sexy Videos, Hot Girls - Main (http://www.hosthumor.com)\r\nDumbie - Funny Videos, Funny Links (http://www.dumbie.com)\r\nVery Funny Ads (http://www.veryfunnyads.com)\r\nCBS.com - Innertube (http://www.cbs.com/innertube/)\r\nVideo Bomb - Front Page (http://www.videobomb.com)\r\nFunny Videos, Funny Pictures and Flash Soundboards (http://www.mediabum.com)\r\nApeDump.com Humor And Entertainment Site (http://www.apedump.com)\r\nvideoSPUD.com | Funny Videos | Hot Videos | Crazy Videos (http://www.videospud.com)\r\n7HUMOR - Safe Humor, Videos, Pics and Games (http://www.7humor.com)\r\nCool Stuff - the best place for funny, cool and sexy videos on the net! (http://www.c00lstuff.com)\r\nGkko.com - Funny Video Clips, Pictures, and Games Updated Every 2 Hours (http://www.gkko.com)\r\n<Influks.com> Because you have nothing better to do! (http://www.influks.com)\r\nFunny Videos, Funny Pictures (http://www.balagana.com)\r\nMySpaceTV: Sieh dir deine Lieblingsvideos, -trailer, -filme, -TV-Serien, -musikvideos und -clips an, und lass andere daran teilhaben. (http://www.myspacetv.com)\r\n2008 Dog Show - News, Events, Finalists, Dog Breeds & Awards - WestminsterKennelClub.org (http://www.westminsterkennelclub.org)\r\nPhoto & Video Sharing (http://www.pickle.com)\r\nStupid videos, Funny videos, Extreme videos - StupidVideos.us (http://www.stupidvideos.us)\r\nDrunk University: Drunk girls, videos, and photos (http://www.drunkuniversity.com)\r\nTonTuyau.com - La communaut� de vid�o au Qu�bec ! (http://www.tontuyau.com)\r\nVidly - Your daily video entertainment. (http://www.vidly.net)\r\nWelcome to Don and Murph.com- The Funniest Internet Show Anywhere!! (http://www.donandmurph.com)\r\nWelcome to Kewego - Home page - Kewego (http://www.kewego.com)\r\nThorLinks.com! The Best Place For Your Daily Dosage Of Fun! (http://www.thorlinks.com)\r\neVideoShare (http://www.evideoshare.com)\r\nCrack Muffin - Tasty Entertainment Everyday! (http://www.crackmuffin.com)\r\nHome|Celebrity Videos,Celebrity News,Celebrity Photos,Funny Videos,Funny Pictures,myspace backgrounds (http://www.needlaugh.com)\r\nFalarious Media - Funny Videos | Funny Movies | Funny Video Clips | Cool Videos| Flash Cartoons| Funny Pictures| Funny Videos| Games | Shocking Videos| Text | MySpace Codes (http://www.falarious.com)\r\nNO GOOD TV - Putting the F-U back into FUN (http://www.ngtv.com) (new)\r\nLulu TV (http://www.lulu.tv)\r\nFunny Pictures Videos Flash Games Cartoons Prank Calls (http://www.media-post.net)\r\nFunny Videos, Funny Pictures, Flash Games, Crazy Movies, Funny Jokes (http://www.plsthx.com)\r\nTacoBomb - Funny videos, flash games, funny pictures, jokes and animations. (http://www.tacobomb.com)\r\nRetrovision TV (http://www.retrovision.tv)\r\nBest of Google Video (http://www.bestofgooglevideo.com)\r\nFunnyBurger.Com - Funny Games - Hilarious Videos - Funny Pics & More (http://www.funnyburger.com)\r\nhttp://www.vume.com\r\nhttp://www.liveforfun.org\r\nRGX LIFE | Sponsored by RGX Bodyspray (http://www.rgxlife.com)\r\nThe Shortest Bus - Free Funny Video Clips, Free Flash Games, Funny Pictures & More! (http://www.theshortestbus.com)\r\nAmerican Films (http://www.americanfilms.com)\r\nFunny Videos, pictures, babes, clips, comedy, movies (http://www.funnyvids.com)\r\nZanyVideos.com - Funny Videos, Free Videos, Hot Videos and more! (http://www.zanyvideos.com)\r\nDailySlacker.com - College Videos, Funny Videos, Funny Pictures (http://www.dailyslacker.com)\r\nBreakTaker - funny movies ? funny videos ? funny photos and online games (http://www.breaktaker.com)\r\nFunny web zone (http://www.funnywebzone.com)\r\nVideo Clips Dump - Funny Videos, Funny Video Clips, Funny Clips (http://www.videoclipsdump.com)\r\nFunny Videos, Funny Video Clips, Funny Pictures - GooglyFoogly.com (http://www.googlyfoogly.com)\r\nFunny videos, Fight videos and crazy viral videos. Myspace Video codes for Crazy and funny videos, Quizes, surveys and much more along with the rest of the internet garbage (http://www.clumzy.com)\r\nChris and Sam | Something Fun Everyday (http://www.chrisandsam.com)\r\nOWNED.COM - Owned Videos / Vids (http://www.owned.com)\r\nFightzilla.com - Uncensored Fight Videos, Babes Fighting, UFC Videos, Real Street Fight Video Clips (http://www.fightzilla.com)\r\nFunny Videos and Clips | Media updated Daily (http://www.first-ward.com)\r\nTeacherTube - Teach the World (http://www.teachertube.com)\r\nTheWebDump - New Videos and Links added every 10mins! (http://www.thewebdump.com)\r\nTheTartCart.com - Killing Brain Cells One Day At A Time (http://www.thetartcart.com)\r\nNopers! - Just watch it! (http://www.nopers.com)\r\nMedialunchbox - Funny Videos, Games and Other Funny Junk (http://www.medialunchbox.com)\r\nGeeVee - Share Yours. (http://www.geevee.com)\r\nThe Best Funny and Free Viral Videos - Updated Daily! - VidFan (http://www.vidfan.com)\r\nFree Picture and Video Sharing and Upload | Share your pictures and videos online at Pixparty.com (http://www.pixparty.com)\r\nJokeroo.com - Funny Videos, Funny Pictures, Games, Entertainment and More! (http://www.jokaroo.com)\r\nFunatico - Funny Video Clips, Funny Pictures, Funny Videos (http://www.funatico.com)\r\nJustViralVideos.com - viral and funny videos (http://www.justviralvideos.com)\r\nFunny Stuff | The best place for online entertainment! (http://www.fuhnee.com)\r\nLOLWOW.com - Laughing out Loud, Wow! (http://www.lolwow.com)\r\nTVO.ORG HOME (http://www.tvo.org)\r\nZyped! - Diggin' up the good stuff. (http://www.zyped.com)\r\nReally Funny Clips - Your source for free online funny video clips. (http://www.reallyfunnyclips.com)\r\nFunny Videos, Addicting Games, Funny Clips (http://www.monkeybriefs.com)\r\nFunny Movies | Free funny movies, funny videos, fun movies. (http://www.funnymovies.net)\r\nhttp://www.thatlitevideosite.com\r\nPriceless Funny Videos - commercials - funny video clips - daily (http://www.pricelessfunnyvideos.com)\r\nAT&T Home Turf (http://www.seehowtheylive.com)\r\nThe Daily Top 10 (http://www.dailytop10.net)\r\nPlicks - Best myspace videos, games & images. (http://www.plicks.com)\r\nFunny clips, funny movies, funny videos - FrozenHippo.com (http://www.frozenhippo.com)\r\nDailyDumb.com - Dumb People, Dumb Games, Dumb Pictures, Dumb Videos, Funny pictures, Flash Games (http://www.dailydumb.com)\r\nEvil Humor - That's Not Funny (http://www.evilhumor.com)\r\nDump4Links.com - Funny Videos, Sexy Clips - All Videos (http://www.dump4links.com)\r\nRadioactif.tv | Mon Espace Vid�o, Audio, Photo et Texte au Qu�bec, 100% gratuit! Grosse journ�e au bureau Vid�o (http://www.radioactif.tv)\r\nDisloyal.org - MySpace Videos - Pictures and Codes for MySpaces - Funny Videos - Free Flash Games (http://www.disloyal.org)\r\nUpload, Share, Earn and Connect Videos - Qweki.com (http://www.qweki.com)\r\nCollege After Hours - What to do when class is over! (http://www.collegeafterhours.com)\r\nFunny Videos, Funny Clips, News and Celebrity Gossip (http://www.bigbadblob.com)\r\n9 Incher - Entertainment Media Index - Videos, Pictures, Games and Animations Updated Hourly (http://www.9incher.com)\r\nHot Celebrity Videos - Main (http://www.myvideoshost.com)\r\nDiptard.com - Funny Videos, pictures, babes, fights, clips, comedy, movies (http://www.diptard.com)\r\nBlennus - your driveling idiot (http://www.blennus.com)\r\nFunny linkdump >> the best link dump >> Crazy Video Compilation and Funny Bloppers (http://www.funny-linkdump.com)\r\nFree Videos, funny Pictures, Funny Crazy Sexy Videos, flash Games, cartoons, animations, Free media Rss feed (http://www.videolots.com)\r\nBloogie - Funny Videos - Movies - Pictures (http://www.bloogie.com)\r\nGod of Humor (http://www.godofhumor.com)\r\nFileCrush: Funny Videos, Funny Movies, Funny Video Clips (http://www.filecrush.com)\r\nshock THIS! Shocking videos, war, accidents and more! (http://www.shockthis.com)\r\nVidsCrazy.com Funny Weird and Shocking Videos and Celebrity Clips (http://www.vidscrazy.com)\r\nhttp://www.evildump.com\r\nBrowse Files! - browse funny files, videos & images - free file host - browsefile.com (http://www.browsefile.com)\r\nSlackerland (http://www.slackerland.com)\r\nGeekyZeeks.com - Free Web Media Dump! (http://www.geekyzeeks.com)\r\nHot Movies (http://www.jumbosized.com)\r\nGigglePlatter - Viral Funny Videos (http://www.giggleplatter.com)\r\nRidiculous Videos -- Your Daily Dose of Ridiculous Clips (http://www.ridiculousvideos.com)\r\nThe New York Times - Breaking News, World News & Multimedia (http://www.nytimes.com) (only video part)\r\nFunny Videos | Stupid Videos Clips (http://www.feelstupid.com)\r\nVideo Sites - SkillTip.tv - Hosted Video Clips (http://www.skilltip.tv)\r\nTV4u - Your source for online classic television (http://www.tv4u.com)\r\nMartial Arts Videos ! (http://www.martialartclips.net)\r\nhttp://www.madhousevideos.com\r\nCobalt Flash - Main Page (http://www.cobaltflash.com)\r\nVindie Online Channel Guide (http://www.vindie.com)\r\nFunny Videos (http://www.loogon.com)\r\nHome - Video Clipped (http://www.videoclipped.com)\r\nRyno Sauce (http://www.rynosauce.com)\r\nMoreFunnyVideos.com - Only the funniest videos on the internet!! (http://www.morefunnyvideos.com)\r\nOTube.ca Okanagan Video Sharing - Share Your Videos (http://www.otube.ca)\r\nDay Zero | a feature film (http://www.dayzeromovie.com)\r\n\r\n\r\n\r\n\r\n\r\n\r\nNicht Englische Video Webs:\r\n\r\nhttp://www.video.baidu.com\r\nhttp://www.v.cctv.com\r\nhttp://www.games.sina.com.cn/bn/\r\nhttp://www.video.sina.com.cn\r\nDas beste von Dada.net, Deutschland (http://www.dada.net)\r\nMail.Ru: (http://www.video.mail.ru)\r\nFriendster - Home (http://www.friendster.com)\r\nVideo - INTERIA.PL - Ũmieszne filmiki, filmy, reklamy, teledyski (http://www.video.interia.pl)\r\n(http://www.tudou.com)\r\nhttp://www.vlog.17173.com\r\n(http://www.vzhangmen.com)\r\n56.com (http://www.56.com)\r\n123video - Grootste online video site van Nederland (http://www.123video.nl)\r\nhttp://www.v.wangyou.com\r\n(http://www.tv.mofile.com)\r\nTrilulilu - Video, Imagini, Audio (http://www.trilulilu.ro)\r\n(http://www.pomoho.com)\r\n (http://www.5show.com)\r\n (http://www.ouou.com)\r\n(http://www.v.iask.com)\r\nhttp://www.happy.enet.com.cn\r\nROFL.TO : Daily Funny Video Clips! (http://www.rofl.to)\r\nLustige Videos, Video Clips und Werbespots gibts bei uns - MyVideo (http://www.myvideo.de)\r\nTVix.cn (http://www.tvix.cn)\r\n (http://www.yoqoo.com)\r\n (http://www.ku6.com)\r\n (http://www.6.cn) (6rooms.com)\r\nUUME.COM - (http://www.uume.com)\r\nhttp://www.163888.net\r\n(http://www.vbox7.com)\r\nWrzuta.pl (http://www.wrzuta.pl)\r\nA1 Bollywood Hindi Tamil Telugu Indian Movie Songs Music Videos - SmasHits.com (http://www.smashits.com)\r\n(http://www.megajoy.com)\r\nSantaBanta Homepage : Jokes, Wallpapers, Bollywood, e-cards and more (http://www.santabanta.com)\r\nFLIX ? (http://www.flix.co.il)\r\nMean Duck | ohnoes, ohnoes, ohnoes. (http://www.meanduck.com)\r\n�cretsiz Video Payla��m Sitesi (http://www.izlesene.com)\r\nLustige Videos - Gratis Fun Video - Deine funny Videos bei Clipfish (http://www.clipfish.de)\r\nGUBA - Enjoy, upload, and share free videos. Download hit movies and television shows (http://www.guba.com)\r\n(http://www.youku.com)\r\nLoadUp - (http://www.loadup.ru)\r\nsevenload | The media platform for photos and videos (http://www.sevenload.com)\r\n(http://www.podlook.com)\r\nOrdena y comparte tus v�deos - www.dalealplay.com (http://www.dalealplay.com)\r\nwww.mmxxdd.com (http://www.mmxxdd.com) (video part)\r\nPikniktube (http://www.pikniktube.com)\r\nBienvenue sur Wideo - Accueil - Wideo (http://www.wideo.fr)\r\nvideogaga.lv - ir ko paskatīties! - (http://www.videogaga.lv)\r\nSeeHaHa (http://www.seehaha.com)\r\nLustige Videos, witzige Flashgames und funny Werbespots auf chilloutzone.de (http://www.chilloutzone.de)\r\nhttp://www.streamdump.com\r\neblogx.de - fun trash entertainment (http://www.eblogx.de)\r\nWAT TV - (http://www.wat.tv)\r\nhttp://www.carcrimes.com\r\n(http://www.biku.com)\r\nMusic Videos at their best @ KOvideo.net (http://www.kovideo.net)\r\nICHLACHE.com � Fun-Blog (http://www.ichlache.com)\r\nTN.com.ar (http://www.tn.com.ar)\r\nFun-Portal, Funlinks, Fun, Fun Videos, Fun Pics, lustiges Ebay, Games - bildschirmarbeiter.com (http://www.bildschirmarbeiter.com)\r\nHans-Wurst.de - Der t�gliche Bl�dsinn des Internets (http://www.hans-wurst.de)\r\n=) sinn-frei.com - fun-blog � lustige videos, witzige games & funny flashs (http://www.sinn-frei.com)\r\nJeuxvideo.TV : (http://www.jeuxvideo.tv)\r\nCool-Clip.de - FUN Spa� und coole VideoClips (http://www.cool-clip.de)\r\nVideoWebTown.com - Free Video Hosting and Streaming Service (http://www.videowebtown.com)\r\nTrendhure.com (http://www.trendhure.com)\r\nMy Cool Clips (http://www.mycoolclips.com)\r\n(http://www.ourdv.com)\r\nVid Crazy - Home (http://www.vidcrazy.com)\r\nhttp://www.movies.yoyos-blog.com\r\nEylol - Die Spa�-Community & Funseite mit attraktiven Pr�mien - T�glich neue Fun Videos, Bilder, Clips und vieles mehr! (http://www.eylol.de)\r\nNSFW.to | Daily Entertainmet - Fun, Videos, Picture, Babes, Amateure and the best Trash! (http://www.juckiq.de)\r\nSTUPIDEXE.COM - Video divertenti e di particolare interesse, giochi flash, animazioni, sfondi e molto altro... (http://www.stupidexe.com)\r\nhttp://www.autoclips.net\r\n(http://www.totv.com.cn)\r\nFunny-Media.org (http://www.funny-media.de)\r\nhttp://www.fettemama.org\r\nLachlabor - Lustige Videos, Fun & witzige Bilder! (http://www.lachlabor.de)\r\nClips4.Us (http://www.clips4.us)\r\nHIPHOPDEAL - LE HIP HOP EST AVANT TOUT UNE PASSION (http://www.hiphopdeal.com)\r\nSomeHoney - Your collection of media (http://www.somehoney.com)\r\nCrazy-Movie.de - Immer die neuesten Br�ller (http://www.crazy-movie.de)\r\nClipTubes - Viral Videos (http://www.cliptubes.com)\r\nBienvenue sur VidéoRigolo, le site gratuit de la vidéo d'humour rigolo, vidéos de gag, bêtisiers, chutes, blonde, etc. (http://www.videorigolo.com)\r\n� Spassfabrik - Babes, lustige Bilder, coole Clips, Flash Games, Witze und Kurioses. Just Fun! (http://www.spassfabrik.net)\r\nTussi Clips - witzige Videos, Flash und scharfe Tussis (http://www.tussi-clips.de)\r\nParadise Philippines - Viral Videos (http://www.dalipit.com)\r\nFunny-Fresh (http://www.funny-fresh.de)\r\neingeparkt.com - hier hat der spass eingeparkt (http://www.eingeparkt.de)\r\nFunny-Shit.net � Fun Videos, Lustige Videos, Fun Clips, Witzige Filme, Funny Movies, Musik Clips (http://www.funny-shit.net)\r\nVid�o Humour gratuit, Videoclip et autres vid�os - Partager vos vid�os sur Tonclip.com (http://www.tonclip.com)\r\n2funny4u - Der Linkdump: Funvideos, Fungames, Funpics, Hot babes (http://www.2funny4u.de)\r\nSexy Fun-Videos und Fun-Pics! (http://www.totaler-fun.de)\r\nTrashbook.de - Lustige Videos, Bilder, Spass und viel zum Lachen (http://www.trashbook.de)\r\n3steg.com - Your funny media center (http://www.3steg.com)\r\nsearch 1 on :: search1on.com (http://www.extremesportsclips.net)\r\nTop Free Music Downloads - free music news, music video downloads, free music download, celebrity photo, music charts, music lyrics, free ringtones (http://www.topfreemusicdownloads.com)\r\nKrankerFrank - Pr�sentiert dir jeden Tag den BESTEN Funstuff! LayerFREI! Next door Nikki, Raven Riley ... (http://www.krankerfrank.com)\r\nTotal Blogal - Spaþ Blog (http://www.totalblogal.net)\r\nhttp://www.myvideo.ge\r\nhttp://www.see.daum.net\r\nhttp://www.aura.damoim.net\r\n\r\n*/\r\n\r\n\r\n return $providers;\r\n}", "title": "" }, { "docid": "5d87e4d847897152cb773b6add0d220e", "score": "0.5152686", "text": "function get_ffmpeg_codecs($data = false)\n{\n $req_codecs = array\n ('libxvid' => 'Required for DIVX AVI files',\n 'libmp3lame' => 'Required for proper Mp3 Encoding',\n 'libfaac' => 'Required for AAC Audio Conversion',\n // 'libfaad'\t=> 'Required for AAC Audio Conversion',\n 'libx264' => 'Required for x264 video compression and conversion',\n 'libtheora' => 'Theora is an open video codec being developed by the Xiph.org',\n 'libvorbis' => 'Ogg Vorbis is a new audio compression format',\n );\n\n if ($data)\n $version = $data;\n else\n $version = shell_output(get_binaries('ffmpeg') . ' -i xxx -acodec copy -vcodec copy -f null /dev/null 2>&1');\n preg_match_all(\"/enable\\-(.*) /Ui\", $version, $matches);\n $installed = $matches[1];\n\n $the_codecs = array();\n\n foreach ($installed as $inst)\n {\n if (empty($req_codecs[$inst]))\n $the_codecs[$inst]['installed'] = 'yes';\n }\n\n foreach ($req_codecs as $key => $codec)\n {\n $the_req_codecs[$key] = array();\n $the_req_codecs[$key]['required'] = 'yes';\n $the_req_codecs[$key]['desc'] = $req_codecs[$key];\n if (in_array($key, $installed))\n $the_req_codecs[$key]['installed'] = 'yes';\n else\n $the_req_codecs[$key]['installed'] = 'no';\n }\n\n $the_codecs = array_merge($the_req_codecs, $the_codecs);\n return $the_codecs;\n}", "title": "" }, { "docid": "d9b1750792fd7efc55981369695b550f", "score": "0.51390684", "text": "public function getFfmpegCommandsByResolutionName($res, $targetFilePath, $outputPath, $extension, $uniqueIdentifier) {\n \n\n\n if ($res == \"2160p\") {\n // we will convert video into following resolutions\n //[1080p,720p,480p,360p,240p]\n $commandList = array(\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=352:240 ${outputPath}/{$uniqueIdentifier}-240p.${extension} > /dev/null &\", //240p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=480:360 ${outputPath}/{$uniqueIdentifier}-360p.${extension} > /dev/null &\", //360p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=858:480 ${outputPath}/{$uniqueIdentifier}-480p.${extension} > /dev/null &\", //480p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=1280:720 ${outputPath}/{$uniqueIdentifier}-720p.${extension} > /dev/null &\", //720p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=1920:1080 ${outputPath}/{$uniqueIdentifier}-1080p.${extension} > /dev/null &\", //1080p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=2560:1440 ${outputPath}/{$uniqueIdentifier}-1440p.${extension} > /dev/null &\", //1440p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=3840:2160 ${outputPath}/{$uniqueIdentifier}-2160p.${extension} > /dev/null &\", //2160p\n );\n return $commandList;\n }\n \n if ($res == \"1440p\") {\n // we will convert video into following resolutions\n //[1080p,720p,480p,360p,240p]\n $commandList = array(\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=352:240 ${outputPath}/{$uniqueIdentifier}-240p.${extension} > /dev/null &\", //240p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=480:360 ${outputPath}/{$uniqueIdentifier}-360p.${extension} > /dev/null &\", //360p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=858:480 ${outputPath}/{$uniqueIdentifier}-480p.${extension} > /dev/null &\", //480p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=1280:720 ${outputPath}/{$uniqueIdentifier}-720p.${extension} > /dev/null &\", //720p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=1920:1080 ${outputPath}/{$uniqueIdentifier}-1080p.${extension} > /dev/null &\", //1080p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=2560:1440 ${outputPath}/{$uniqueIdentifier}-1440p.${extension} > /dev/null &\", //1440p\n );\n return $commandList;\n }\n\n if ($res == \"1080p\") {\n // we will convert video into following resolutions\n //[1080p,720p,480p,360p,240p]\n $commandList = array(\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=352:240 ${outputPath}/{$uniqueIdentifier}-240p.${extension} > /dev/null &\", //240p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=480:360 ${outputPath}/{$uniqueIdentifier}-360p.${extension} > /dev/null &\", //360p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=858:480 ${outputPath}/{$uniqueIdentifier}-480p.${extension} > /dev/null &\", //480p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=1280:720 ${outputPath}/{$uniqueIdentifier}-720p.${extension} > /dev/null &\", //720p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=1920:1080 ${outputPath}/{$uniqueIdentifier}-1080p.${extension} > /dev/null &\", //1080p\n );\n return $commandList;\n }\n \n \n if ($res == \"720p\") {\n // we will convert video into following resolutions\n //[720p,480p,360p,240p]\n $commandList = array(\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=352:240 ${outputPath}/{$uniqueIdentifier}-240p.${extension} > /dev/null &\", //240p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=480:360 ${outputPath}/{$uniqueIdentifier}-360p.${extension} > /dev/null &\", //360p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=858:480 ${outputPath}/{$uniqueIdentifier}-480p.${extension} > /dev/null &\", //480p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=1280:720 ${outputPath}/{$uniqueIdentifier}-720p.${extension} > /dev/null &\", //720p\n );\n return $commandList;\n } if ($res == \"480p\") {\n // we will convert video into following resolutions\n //[720p,480p,360p,240p]\n $commandList = array(\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=352:240 ${outputPath}/{$uniqueIdentifier}-240p.${extension} > /dev/null &\", //240p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=480:360 ${outputPath}/{$uniqueIdentifier}-360p.${extension} > /dev/null &\", //360p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=858:480 ${outputPath}/{$uniqueIdentifier}-480p.${extension} > /dev/null &\", //480p\n );\n return $commandList;\n } if ($res == \"360\") {\n // we will convert video into following resolutions\n //[720p,480p,360p,240p]\n $commandList = array(\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=352:240 ${outputPath}/{$uniqueIdentifier}-240p.${extension} > /dev/null &\", //240p\n \"nohup ffmpeg -i ${targetFilePath} -vf scale=480:360 ${outputPath}/{$uniqueIdentifier}-360p.${extension} > /dev/null &\", //360p\n );\n return $commandList;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "737753cbd915c47adf21bf6b07457e04", "score": "0.5133344", "text": "function rendervideo() {\n $data['path'] = base64_decode($_GET['path']);\n $this->load->view('rendervideo', $data);\n }", "title": "" }, { "docid": "dfa6433c60e191d90e28580bead14410", "score": "0.51311356", "text": "public function hasVideo()\n {\n $valid = true;\n $data = @file_get_contents($this->video_url);\n if($data === false)\n {\n $valid = false;\n }\n return $valid;\n }", "title": "" }, { "docid": "70f0aaf51118844ab0c02e2b0eab4fdc", "score": "0.51310766", "text": "function Save($data = array())\n\t{\t$fail = array();\n\t\t$success = array();\n\t\t$fields = array();\n\t\t$admin_actions = array();\n\t\t\n\t\tif ($vtitle = $this->SQLSafe($data[\"vtitle\"]))\n\t\t{\t$fields[] = \"vtitle='$vtitle'\";\n\t\t\tif ($this->id && ($data[\"vtitle\"] != $this->details[\"vtitle\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Video title\", \"actionfrom\"=>$this->details[\"vtitle\"], \"actionto\"=>$data[\"vtitle\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($vdesc = $this->SQLSafe($data[\"vdesc\"]))\n\t\t{\t$fields[] = \"vdesc='$vdesc'\";\n\t\t\tif ($this->id && ($data[\"vdesc\"] != $this->details[\"vdesc\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Video Description\", \"actionfrom\"=>$this->details[\"vdesc\"], \"actionto\"=>$data[\"vdesc\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($vhits = $this->SQLSafe($data[\"vhits\"]))\n\t\t{\t$fields[] = \"vhits='$vhits'\";\n\t\t\tif ($this->id && ($data[\"vhits\"] != $this->details[\"vhits\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Video Hits\", \"actionfrom\"=>$this->details[\"vhits\"], \"actionto\"=>$data[\"vhits\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($vfile = $this->SQLSafe($data[\"vfile\"]))\n\t\t{\t$fields[] = \"vfile='$vfile'\";\n\t\t\tif ($this->id && ($data[\"vfile\"] != $this->details[\"vfile\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Video File\", \"actionfrom\"=>$this->details[\"vfile\"], \"actionto\"=>$data[\"vfile\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($vtype = $this->SQLSafe($data[\"vtype\"]))\n\t\t{\t$fields[] = \"vtype='$vtype'\";\n\t\t\tif ($this->id && ($data[\"vtype\"] != $this->details[\"vtype\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Video Type\", \"actionfrom\"=>$this->details[\"vtype\"], \"actionto\"=>$data[\"vtype\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($vduration = $this->SQLSafe($data[\"vduration\"]))\n\t\t{\t$fields[] = \"vduration='$vduration'\";\n\t\t\tif ($this->id && ($data[\"vduration\"] != $this->details[\"vduration\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Video Duration\", \"actionfrom\"=>$this->details[\"vduration\"], \"actionto\"=>$data[\"vduration\"]);\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t$live = ($data[\"live\"] ? \"1\" : \"0\");\n\t\t$fields[] = \"live=\" . $live;\n\t\tif ($this->id && ($live != $this->details[\"live\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Live?\", \"actionfrom\"=>$this->details[\"live\"], \"actionto\"=>$live, \"actiontype\"=>\"boolean\");\n\t\t}\n\t\t\n\t\tif ($this->id || !$fail)\n\t\t{\t$set = implode(\", \", $fields);\n\t\t\tif ($this->id)\n\t\t\t{\t$sql = \"UPDATE videos SET $set WHERE vid={$this->id}\";\n\t\t\t} else\n\t\t\t{\t$sql = \"INSERT INTO videos SET $set\";\n\t\t\t} \n\t\t\tif ($this->db->Query($sql))\n\t\t\t{\tif ($this->db->AffectedRows())\n\t\t\t\t{\tif ($this->id)\n\t\t\t\t\t{\t$record_changes = true;\n\t\t\t\t\t\t$success[] = \"Changes saved\";\n\t\t\t\t\t} else\n\t\t\t\t\t{\t$this->id = $this->db->InsertID();\n\t\t\t\t\t\t$success[] = \"New video created\";\n\t\t\t\t\t\t$this->RecordAdminAction(array(\"tablename\"=>\"videos\", \"tableid\"=>$this->id, \"area\"=>\"videos\", \"action\"=>\"created\"));\n\t\t\t\t\t}\n\t\t\t\t\t$this->Get($this->id);\n\t\t\t\t\n\t\t\t\t} else\n\t\t\t\t{\tif (!$this->id)\n\t\t\t\t\t{\t$fail[] = \"Insert failed\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($record_changes)\n\t\t\t\t{\t$base_parameters = array(\"tablename\"=>\"videos\", \"tableid\"=>$this->id, \"area\"=>\"videos\");\n\t\t\t\t\tif ($admin_actions)\n\t\t\t\t\t{\tforeach ($admin_actions as $admin_action)\n\t\t\t\t\t\t{\t$this->RecordAdminAction(array_merge($base_parameters, $admin_action));\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\t// Vimeo image save\n\t\tif($this->id)\n\t\t{\n\t\t\tif(isset($_POST['vimeoimage']) && $_POST['vimeoimage'] != '')\n\t\t\t{\n\t\t\t\t$uploaded = $this->UploadPhoto($_POST['vimeoimage']);\n\t\t\t\t\n\t\t\t\tif ($uploaded[\"successmessage\"])\n\t\t\t\t{\t$success[] = $uploaded[\"successmessage\"];\n\t\t\t\t\t$this->RecordAdminAction(array(\"tablename\"=>\"videos\", \"tableid\"=>$this->id, \"area\"=>\"videos\", \"action\"=>\"New image uploaded\"));\n\t\t\t\t}\n\t\t\t\tif ($uploaded[\"failmessage\"])\n\t\t\t\t{\t$fail[] = $uploaded[\"failmessage\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array(\"failmessage\"=>implode(\", \", $fail), \"successmessage\"=>implode(\", \", $success));\n\t\t\n\t}", "title": "" }, { "docid": "789ad1c034bd513edb531cd06154a788", "score": "0.51249766", "text": "function video_setdetails($videoDetails=null) {\n \n $newVideoDetails = $this->sendRequest('viddler.videos.setDetails',$videoDetails,'post');\n \n return $newVideoDetails;\n }", "title": "" }, { "docid": "ddcafebe48e918c66ae65a459f3be4e6", "score": "0.511606", "text": "public function videoOnly()\n {\n return $this->mimeTypes(['video/*']);\n }", "title": "" }, { "docid": "076effc6e1ed53c166345ed228354d05", "score": "0.51159805", "text": "function getDataFromService($videoStr) {\n \t// Parse the ID number out of the url only if we have to\n \tif(preg_match('/watch\\?v\\=/', $videoStr)) {\n \t\tpreg_match('/watch\\?v\\=([^&]*)/', $videoStr, $matches);\n \t\tif(!isset($matches[1])) return \"ERROR\";\n \t\t$videoStr = $matches[1];\n \t}\n \t\n \t// Now that we have a number, look it up with youtube\n \t$youtubeService = new YoutubeService();\n \t$response = $youtubeService->getVideoInfo($videoStr); // Returns all pertinent information about one video, identified by the video ID\n \t\n \tif(isset($response)) $this->response = $response;\n \telse $this->response = \"ERROR\";\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": "255fb7e2e64356262db08eee101d2467", "score": "0.0", "text": "public static function model($className = __CLASS__)\n {\n return parent::model($className);\n }", "title": "" } ]
[ { "docid": "88e38d4d20140797c18b2b8596c5139f", "score": "0.75746477", "text": "public static function model() {\n return parent::model(get_called_class());\n }", "title": "" }, { "docid": "e8b19412cde98c670e424d18ad06ede9", "score": "0.7529055", "text": "public function model()\r\n {\r\n return static::class;\r\n }", "title": "" }, { "docid": "9816d7bf330a9e21d8b3599d73f2e74c", "score": "0.7271585", "text": "public static function model($className=__CLASS__) { return parent::model($className); }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.7270325", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "97a0c2c570c1cd72cfd65507881b5674", "score": "0.72618634", "text": "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "title": "" }, { "docid": "53488840e46f461f50177bcfd4db8d72", "score": "0.72128236", "text": "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "title": "" }, { "docid": "03550cdf4d4434979cff4de0fb834013", "score": "0.7212142", "text": "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "title": "" }, { "docid": "b374f75f119a4c0b5538ea3114acca9f", "score": "0.71317524", "text": "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.7128702", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.7128702", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "6546adf8eef733a1d3ddb03561e229ad", "score": "0.71025884", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "6546adf8eef733a1d3ddb03561e229ad", "score": "0.71025884", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.7102313", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "a5414ed4c55e4ebe1d6b0848b59bd4ad", "score": "0.7074596", "text": "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064003", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" } ]
4fabe03852672319124f1ed42eb14e47
Adds item to channel according to specifications:
[ { "docid": "f0e6fd513ecdbf36121ee649ea1dcf64", "score": "0.5193199", "text": "public function addItem(Item $item): void\n {\n $this->item[] = $item;\n }", "title": "" } ]
[ { "docid": "8362da892d514b08a538662f84692b76", "score": "0.6919492", "text": "public function addItemToChannel( $channel_id=0, $in=array() )\n\t{\n\t\t$this->items[ $channel_id ][] = $in;\n\t}", "title": "" }, { "docid": "9a137a6cb64d2cc71b333fc55d83c199", "score": "0.6879024", "text": "public function appendTo(ChannelInterface $channel): ItemInterface;", "title": "" }, { "docid": "c29892fb6e1cf70e1b8a77e2f3cca041", "score": "0.670266", "text": "public function addItem( $item, $index = -1 ) {\n\n\t\tif( array_key_exists( $index, $this->channels ) ) {\n\t\t\t$this->channels[ $index ]->addItem( $item );\n\t\t} else {\n\t\t\tforeach( $this->channels as &$channel ) {\n\t\t\t\t$channel->addItem( $item );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8cd20bde96bac00f4c0ccc71f5f183d4", "score": "0.6119095", "text": "public function addChannel($channel) {\n if (!$this->hasChannel($channel)) {\n $this->channels->{$channel} = array();\n $this->save();\n }\n }", "title": "" }, { "docid": "c0a1f1cad8ac6c6ce62f3fcd0e6a6e42", "score": "0.6006964", "text": "public function add ($item);", "title": "" }, { "docid": "0f15db50746401ee3f2ade64b02d4146", "score": "0.59042263", "text": "function addItem(ItemInterface $item);", "title": "" }, { "docid": "2a6b275944361098234c5f38541f29cc", "score": "0.588689", "text": "public function push($item){\n $this->add($item);\n }", "title": "" }, { "docid": "29ca86d33a024cb9c6fa587a5df3f17a", "score": "0.5854767", "text": "public function addChannel( $channel ) {\n\n\t\t$this->channels[] = $channel;\n\t}", "title": "" }, { "docid": "53f17c7350cf61fde423e726345b5d7e", "score": "0.58540994", "text": "public function addChannel(VdrChannel $chan) {\r\n\t\t\t@$this->stmtAddChannel->bindParam(1, $chan->getIndex(), SQLITE3_INTEGER);\r\n\t\t\t@$this->stmtAddChannel->bindParam(2, $chan->getName(), SQLITE3_TEXT);\r\n\t\t\t@$this->stmtAddChannel->bindParam(3, $chan->getCode(), SQLITE3_TEXT);\r\n\t\t\t$this->stmtAddChannel->execute();\r\n\t\t}", "title": "" }, { "docid": "69f35c45aa3e5670f3c57a6116426fa3", "score": "0.58419585", "text": "public function addChannel(string $url, string $title): void {\n $this->channels[$title] = $url;\n }", "title": "" }, { "docid": "32e0421ab00deb050af96961ee321c5f", "score": "0.57645047", "text": "abstract protected function addItems();", "title": "" }, { "docid": "e5eb50a573fd4261be8705477f01a970", "score": "0.5761917", "text": "public function add(...$items);", "title": "" }, { "docid": "c8287df894ac8cac92c031da48ef86b7", "score": "0.5734314", "text": "function add_item( $params ) {\n\t\t\t$item_object = $this->get_object_definition( $this->get_type( $params ) );\n\n\t\t\tif ( ! empty( $params['setting'] ) ) {\n\t\t\t\t$slug = sanitize_key( $params[ 'setting' ] );\n\t\t\t\t$this->items[ $slug ] = new $item_object( $params );\n\t\t\t} else {\n\t\t\t\t$this->items[] = new $item_object( $params );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "79237ede989fdad5c4e31a488f7cbafd", "score": "0.57056385", "text": "public function add(mixed $item): void;", "title": "" }, { "docid": "a01e513d0270940ba2507032796aa090", "score": "0.57038575", "text": "function AddItem($item) {\r\n\t\t$this->ItemData[] = $item;\r\n\t}", "title": "" }, { "docid": "f5c07e0dd8056ad614140dad84bf37eb", "score": "0.5627719", "text": "public function add($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "fdb056628f08d1acc483eaa1a63fb1ab", "score": "0.5591685", "text": "public function addChannel ($sChannel)\n {\n $sChannel = strtolower ($sChannel);\n\n if (!in_array ($sChannel, $this -> m_aChannels))\n {\n $this -> m_aChannels [] = $sChannel;\n }\n }", "title": "" }, { "docid": "e5e3c634f99d2bca5285cb43e4e051e8", "score": "0.55700916", "text": "public function add(ItemInterface $item): self;", "title": "" }, { "docid": "8ab1a02767755e410d4e31aa9d850079", "score": "0.55332065", "text": "public function addItem(RequestItemInterface $item): void\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "f7c3b7b684dcac5b661728b08c597e49", "score": "0.5512714", "text": "public function add($item): void\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "0c3e66db00e5a4582ca41c1980a46078", "score": "0.5507013", "text": "public function add($item): void\n\t{\n\t\t$this->items[] = $item;\n\t}", "title": "" }, { "docid": "4dc2a72178271ed526a57e73e463b68a", "score": "0.5478765", "text": "function addItem($url,\n $lastmod = '',\n $changefreq = '',\n $priority = '',\n $additional_fields = array())\n {\n $this->_items[] = array_merge(array('loc' => DOMAIN_PATH . $url,\n 'lastmod' => $lastmod,\n 'changefreq' => $changefreq,\n 'priority' => $priority),\n $additional_fields);\n }", "title": "" }, { "docid": "6b3cd48f5c20054d8b7cccfec52d7d88", "score": "0.54752904", "text": "public static function add( $new_channel_name ) {\n\t\tif ( get_option( 'yarns_channels' ) ) {\n\t\t\t$channels = json_decode( get_option( 'yarns_channels' ) );\n\t\t\t// check if the channel already exists.\n\t\t\tforeach ( $channels as $item ) {\n\t\t\t\tif ( $item ) {\n\t\t\t\t\tif ( $item->name === $new_channel_name ) {\n\t\t\t\t\t\t// item already exists, so return existing item.\n\t\t\t\t\t\treturn $item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$channels = array();\n\t\t}\n\n\t\t// Generate a random uid.\n\t\t$uid = static::generate_uid();\n\t\t$post_types = static::all_post_types();\n\n\t\t$new_channel = array(\n\t\t\t'uid' => $uid,\n\t\t\t'name' => $new_channel_name,\n\t\t\t'post-types' => $post_types,\n\t\t);\n\n\t\t$channels[] = $new_channel;\n\t\tupdate_option( 'yarns_channels', wp_json_encode( $channels ) );\n\n\t\treturn $new_channel;\n\t}", "title": "" }, { "docid": "0031d46ca49e7d841d3d2fccb76dcfe9", "score": "0.54703623", "text": "public function addJob(string $type, array $payload, string $channel): void;", "title": "" }, { "docid": "d3d06c83cfd1ec5316371e805ca8fdd5", "score": "0.5467304", "text": "function addToChannelMessagesSource()\r\n\t\t{\r\n\t\t\t$this->defaultVideoMessagesSource();\r\n\r\n\t\t\t$this->assign(\"add\", $this->loadMessages('video.addtochannel.add'));\r\n\t\t\t$this->assign(\"title\", $this->loadMessages('video.addtochannel.title'));\r\n\t\t\t$this->assign(\"hint\", $this->loadMessages('video.addtochannel.hint'));\r\n\t\t\t$this->assign('help', $this->loadMessages('video.help'));\r\n\t\t}", "title": "" }, { "docid": "e1d715afaab3f4dd3b1334d62bbca5b9", "score": "0.54208916", "text": "function addToChannel()\r\n\t\t{\r\n\t\t\t$userId = $this->getLoggedUser();\r\n\t\t\tif($userId == 0)\r\n\t\t\t{\r\n\t\t\t\t$this->redirect($this->ctx().'/auth/login/');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t$this->loadModel('model_video');\r\n\t\t\t$this->loadModel('model_channel');\r\n\t\t\t$this->loadModel('model_user');\r\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'GET')\r\n\t\t\t{\r\n\t\t\t\t$videoId=$_GET['videoId'];\r\n\t\t\t\tif(!$videoId){\r\n\t\t\t\t\t$this->redirect($this->ctx().'/user/home');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t$video=$this->model_video->getVideoByVideoId(array($videoId));\r\n\t\t\t\tif($video==null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->loadTemplate('view_404');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}else if($video['user_id'] != $userId){\r\n\t\t\t\t\t$this->loadTemplate('view_access_denied');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t$channel= $this->model_video->getChannelByUserId(array($userId));\r\n\t\t\t\t$otherChannel=$this->model_channel->getChannelOfOther(array($userId));\r\n\t\t\t\t$channelIds=$this->model_video->getChannelIdByVideoIdWithoutJoin(array($videoId));\r\n\t\t\t\t$str=\"\";\r\n\t\t\t\tfor($i=0;$i<sizeof($channelIds);$i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$str .= $channelIds[$i]['channel_id'] . ',';\r\n\t\t\t\t}\r\n\t\t\t\t$this->assign(\"videoId\",$videoId);\r\n\t\t\t\t$this->assign(\"checkedChannels\",$str);\r\n\t\t\t\t$this->assign(\"video\",$video['video_title']);\r\n\t\t\t\t$this->assign(\"channel\",$channel);\r\n\t\t\t\t$this->assign(\"otherChannel\",$otherChannel);\r\n\t\t\t\t$this->assignVideoThumbnails($video);\r\n\t\t\t\t$this->loadTemplate(VIDEO_TEMPLATE_DIR.'view_video_addtochannel');\r\n\t\t\t}\r\n\t\t\telse if ($_SERVER['REQUEST_METHOD'] == 'POST')\r\n\t\t\t{\r\n\t\t\t\t$videoId=$_POST['videoId'];\r\n\t\t\t\t$channelId=$_POST[\"channelId\"];\r\n\t\t\t\t$mChannelId = split(',', $channelId);\r\n\t\t\t\t$channelUncheck = $_POST[\"channelUncheck\"];\r\n\t\t\t\t$mChannelUncheck = split(',', $channelUncheck);\r\n\t\t\t\t$res=$this->model_video->isExistVideoId(array($videoId));\r\n\t\t\t\tif($res==0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->loadTemplate('view_404');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$video=$this->model_video->getVideoByVideoId(array($videoId));\r\n\t\t\t\t\tif($video['user_id'] != $userId){\r\n\t\t\t\t\t\t$this->loadTemplate('view_access_denied');\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor($j=0;$j<sizeof($mChannelUncheck);$j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->model_video->dropChannelIdAndVideoId(array($mChannelUncheck[$j],$videoId));\r\n\t\t\t\t}\r\n\t\t\t\tfor($i=0;$i<sizeof($mChannelId);$i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($mChannelId[$i]!=\"\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($this->model_video->isChannelExist(array($mChannelId[$i],$videoId)) == true)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->assign(\"errorMessage\", $this->loadMessages('video.addtopage.error'));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->model_video->addVideoToChannel(array($mChannelId[$i],$videoId));\r\n\t\t\t\t\t\t\t$this->assign('successMessage', $this->loadMessages('video.addtopage.successful'));\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$channel= $this->model_video->getChannelByUserId(array($userId));\r\n\t\t\t\t$otherChannel=$this->model_channel->getChannelOfOther(array($userId));\r\n\t\t\t\t$video=$this->model_video->getVideoByVideoId(array($videoId));\r\n\t\t\t\t$this->assign(\"videoId\",$videoId);\r\n\t\t\t\t$this->assign(\"checkedChannels\",$channelId);\r\n\t\t\t\t$this->assign(\"video\",$video['video_title']);\r\n\t\t\t\t$this->assign(\"channel\",$channel);\r\n\t\t\t\t$this->assign(\"otherChannel\",$otherChannel);\r\n\t\t\t\t$this->assignVideoThumbnails($video);\r\n\t\t\t\t$this->loadTemplate(VIDEO_TEMPLATE_DIR.'view_video_addtochannel');\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "7b0396165fb63541097774a860ae3733", "score": "0.540265", "text": "public function publish($channel, $item)\n {\n foreach ($this->clients as $client)\n $client->publish($channel, $item);\n }", "title": "" }, { "docid": "803cf817daca8b5daea4f1564c9dc7ca", "score": "0.53678036", "text": "public function createNewChannel( $in=array() )\n\t{\n\t\t$this->channels[ $this->cur_channel ] = $in;\n\t\t\n\t\t//-------------------------------\n\t\t// Inc. and return\n\t\t//-------------------------------\n\t\t\n\t\t$return = $this->cur_channel;\n\t\t\n\t\t$this->cur_channel++;\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "bc0725d03cb43436b2883ddd24bda0c4", "score": "0.5360231", "text": "function makeChannels(){\n //make all the channels within this market \n //given a list of ResourceID\n $resources = $this->getResources();\n foreach($resources as &$from){\n foreach($resources as &$to){\n if($from!=$to){\n $rate = rand(1,3);\n $channel = array(\n 'ResourceBuyID' => $from,\n 'ResourceSellID'=> $to,\n 'Rate' => $rate,\n 'MarketID' => $this->getID()\n );\n \n if(!$db->insert('channels',$channel))\n {\n echo(\"Error description: cannout be provided because I don't know how to do this using the API. We are in PHPClass/Market.php btw \");\n }\n }\n }\n }\n \n \n }", "title": "" }, { "docid": "30cb218b37e7d75645ef53f7f81aa378", "score": "0.53117913", "text": "public function addImageToChannel( $channel_id=0, $in='' )\n\t{\n\t\t$this->channel_images[ $channel_id ][] = $in;\n\t}", "title": "" }, { "docid": "9200c2b94231b21958c84465a491673d", "score": "0.53017694", "text": "public function addItem($item)\n {\n if (!empty($item))\n {\n $this->items[] = $item;\n }\n }", "title": "" }, { "docid": "ab0286e5a5b79c553dce84446f7fa807", "score": "0.52943444", "text": "function addItem($args) {\n if (!isset($this->menu[\"item\"])) {\n $this->menu[\"item\"] = [];\n }\n if (isset($args[\"file\"])){\n $this->addFile($args[\"file\"]);\n $args[\"icon\"] = count($this->embeds) - 1;\n }\n array_push($this->menu[\"item\"], [\n \"url\" => isset($args[\"url\"]) ? $args[\"url\"] : \"\",\n \"label\" => isset($args[\"label\"]) ? $args[\"label\"] : \"\",\n \"icon\" => isset($args[\"icon\"]) ? $args[\"icon\"] : \"104\",\n \"counter\" => isset($args[\"counter\"]) ? $args[\"counter\"] : \"\",\n \"lock\" => isset($args[\"lock\"]) ? $args[\"lock\"] : \"\",\n \"unknown\" => isset($args[\"unknown\"]) ? $args[\"unknown\"] : \"0\",\n ]);\n }", "title": "" }, { "docid": "814c2ba183868341306807092418091b", "score": "0.5287286", "text": "public function add(ZMQSocket $entry, $type) {}", "title": "" }, { "docid": "d09d8375da8057e1d753f0493e451824", "score": "0.5277962", "text": "public function addItem($itemId, $qty);", "title": "" }, { "docid": "9c61b399178f5820659eb268da20b7b7", "score": "0.5272872", "text": "function _add($item) {\n\t\t$cart = $this->getCart();\n\t\t$type = key($item);\n\t\t$cart[$type][$item[$type]['id']] = $item[$type];\n\t\t// $cart_current_type = $cart[$type];\n\t\t// array_push($cart_current_type ,$item[$type]['id'] => $item[$type]);\n\t\t// $cart_current_type[] = array($item[$type]['id'] => $item[$type]);\n\t\t$this->Session->write('Cart', $cart);\n\t\t// $this->Session->write('Cart.add', 'here');\n\t\t// $cart[$type][] = array($item['id'] => $item[$type]);\n\t\t\n\t\t\n\t\t// $this->Session->write('Cart', $cart);\n\t}", "title": "" }, { "docid": "b75523c2be0133b99a8a16a4a3a10a93", "score": "0.5270174", "text": "function addItem($who, $item, $quantity = 1) {\n\t$item_identity = item_identity_from_display_name($item);\n\n\tif ((int)$quantity > 0 && !empty($item) && $item_identity) {\n\t\tadd_item(get_char_id($who), $item_identity, $quantity);\n\t} else {\n\t\tthrow new Exception('Improper deprecated item addition request made.');\n\t}\n}", "title": "" }, { "docid": "ef316febb4b80fb1cbb7f5c7100e01ff", "score": "0.52504826", "text": "function addItem() {\n\t\t\t$a = func_get_args(); \n\t\t\t$i = func_num_args(); \n\t\t\t\n\t\t\tif (method_exists($this, $f='addItem'.$i)) {\n\t\t\t\tcall_user_func_array(array($this,$f), $a);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "04a9ea6e6bcb13ca023ddacaab3723e3", "score": "0.5238432", "text": "function addItems();", "title": "" }, { "docid": "2e751763e1e079e021647b8aeb7853c5", "score": "0.5225317", "text": "public function addItem($section, $item, $value);", "title": "" }, { "docid": "727854ca0b14e1a33296acb6ff130d35", "score": "0.5224656", "text": "public function add($item)\n {\n if($this->typeCheck($item)) {\n $this->collection[] = $item;\n $this->count++;\n } else {\n throw new \\InvalidArgumentException(\"Not the type allowed in the collection!\");\n }\n }", "title": "" }, { "docid": "b66fdfb8e3cb1a387beeaa7dffc12981", "score": "0.5187638", "text": "function _addItem($length, $width, $height, $weight, $price = 0 ) {\n // Add box or item to shipment list. Round weights to 1 decimal places.\n if ((float)$weight < 1.0) {\n $weight = 1;\n } else {\n $weight = round($weight, 1);\n }\n $index = $this->items_qty;\n $this->item_length[$index] = ($length ? (string)$length : '0' );\n $this->item_width[$index] = ($width ? (string)$width : '0' );\n $this->item_height[$index] = ($height ? (string)$height : '0' );\n $this->item_weight[$index] = ($weight ? (string)$weight : '0' );\n $this->item_price[$index] = $price;\n $this->items_qty++;\n }", "title": "" }, { "docid": "098dadc8c27e20779965785c2ba4b549", "score": "0.51785374", "text": "public function add(ItemInterface $item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "92c5cdbf2c320dd3777e5fbbfca4586a", "score": "0.51769966", "text": "private function commitAdding() {\n $items = $this->buffer->getFiltered(TxBuffer::ADDING);\n if (!($items_count = count($items))) {\n return;\n }\n\n // Since we do have items to add, initialize the queue.\n $this->initializeQueue();\n\n // Small anonymous function that fetches the 'data' field for createItem()\n // and createItemMultiple() - keeps queue plugins out of Purge specifics.\n $getProxiedData = function ($invalidation) {\n $proxy = new ProxyItem($invalidation, $this->buffer);\n return $proxy->data;\n };\n\n // Add just one item to the queue using createItem() on the queue.\n if ($items_count === 1) {\n $invalidation = current($items);\n if (!($id = $this->queue->createItem($getProxiedData($invalidation)))) {\n throw new UnexpectedServiceConditionException(\"The queue returned FALSE on createItem().\");\n }\n else {\n $this->buffer->set($invalidation, TxBuffer::RELEASED);\n $this->buffer->setProperty($invalidation, 'item_id', $id);\n $this->buffer->setProperty($invalidation, 'created', time());\n }\n }\n\n // Add multiple to the queue at once with ::createItemMultiple().\n else {\n $item_chunks = array_chunk($items, 1000);\n if ($item_chunks) {\n foreach ($item_chunks as $chunk) {\n $data_items = [];\n foreach ($chunk as $invalidation) {\n $data_items[] = $getProxiedData($invalidation);\n }\n if (!($ids = $this->queue->createItemMultiple($data_items))) {\n throw new UnexpectedServiceConditionException(\n \"The queue returned FALSE on createItemMultiple().\");\n }\n foreach ($chunk as $key => $invalidation) {\n $this->buffer->set($invalidation, TxBuffer::ADDED);\n $this->buffer->setProperty($invalidation, 'item_id', $ids[$key]);\n $this->buffer->setProperty($invalidation, 'created', time());\n }\n }\n }\n }\n\n $this->purgeQueueStats->updateTotals($items);\n }", "title": "" }, { "docid": "515f15d6efb289c6a60b6feaf1c2d1dd", "score": "0.5171988", "text": "public function add($item): void\n {\n if (!$item instanceof $this->type) {\n throw new InvalidArgumentException(\n 'Invalid object added: ' . gettype($item) . ', expected: ' . $this->getType()\n );\n }\n\n $this->items[] = $item;\n }", "title": "" }, { "docid": "41d9fa72808a28c6ede2a8de1b48f18a", "score": "0.5168134", "text": "public function addItem($chatItem){\n\t\t\tif(!is_object($chatItem) || get_class($chatItem) !== \"ChatItem\"){\n\t\t\t\tthrow new InvalidArgumentException(\"Must only add ChatItem objects\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->chatItems[] = $chatItem;\t\t\t\n\t\t}", "title": "" }, { "docid": "db50f4a4cebdc2eebc192fd34db5c45d", "score": "0.51650965", "text": "public function add($item)\n\t{\n\t\t$this->data->addLast($item);\n\t}", "title": "" }, { "docid": "94bd9ec26089fd8b33a0301fe616ea17", "score": "0.5152976", "text": "function add_item($char_id, $identity, $quantity = 1) {\n\t$quantity = (int)$quantity;\n\tif ($quantity > 0 && !empty($identity)) {\n\t $up_res = query_resultset(\n\t \"UPDATE inventory SET amount = amount + :quantity \n\t WHERE owner = :char AND item_type = (select item_id from item where item_internal_name = :identity)\",\n\t array(':quantity'=>$quantity,\n\t ':char'=>$char_id,\n\t ':identity'=>$identity));\n\t $rows = $up_res->rowCount();\n\n\t\tif (!$rows) { // No entry was present, insert one.\n\t\t $ins_res = query_resultset(\"INSERT INTO inventory (owner, item_type, amount) \n\t\t VALUES (:char, (SELECT item_id FROM item WHERE item_internal_name = :identity), :quantity)\",\n\t\t array(':char'=>$char_id,\n\t\t ':identity'=>$identity,\n\t\t ':quantity'=>$quantity));\n\t\t}\n\t} else {\n\t throw new Exception('Invalid item to add to inventory.');\n\t}\n}", "title": "" }, { "docid": "9e6948ce8695375ae7aa179121e287eb", "score": "0.51220655", "text": "public function register($channel)\n {\n $this->isFactory($channel) || $this->throwsArgumentException($channel);\n\n if (array_search($channel = ltrim($channel, '\\\\'), $this->channels) === false) {\n $this->channels[] = $channel;\n }\n }", "title": "" }, { "docid": "5d120ada1a668e8e92da2ec5dbe6e2b3", "score": "0.5118801", "text": "function addItem($itemName)\n {\n $this -> payObj -> addOneItem($itemName);\n }", "title": "" }, { "docid": "3cfe19e09681f7ca501965b514aab8f4", "score": "0.51041704", "text": "public function pushItem(array $data);", "title": "" }, { "docid": "ab67fd56ed0e12fb0983afffbb3c5519", "score": "0.5092178", "text": "public function enqueue($item)\n\t{\n\t\t$this->add($item);\n\t}", "title": "" }, { "docid": "c15359d476f2e86d107b727666f7e6fe", "score": "0.508617", "text": "public function addItem(Item $item)\n {\n $itemKey = spl_object_hash($item);\n $this->items[$itemKey] = $item;\n\n $this->subjects->notify();\n }", "title": "" }, { "docid": "9b74487b61353596eb920530beebb59b", "score": "0.5072576", "text": "public function addNewChannelGroup() {\n $resp = $this->channelgroup->addNewChannelGroup(Input::get('groupName'), Input::get('cover'), Input::get('id'));\n echo $resp;\n }", "title": "" }, { "docid": "a35ac975261f80b14b197ce10e9eb789", "score": "0.5069582", "text": "public function push($item)\n {\n if($this->getCount() >= 5) {\n throw new QueueOverloadException();\n }\n\n $this->item[] = $item;\n }", "title": "" }, { "docid": "6235f816e8690e1aa8a2e26b0004ba60", "score": "0.5050206", "text": "public function addSpec($spec)\n {\n $this->specs[] = $spec;\n }", "title": "" }, { "docid": "83e5d32781b5f1b1ff0b0b749e6ea060", "score": "0.50368094", "text": "public function addCustomChannelProcessor($type, $class) {\n $tmp = new $class(null);\n if (! $tmp instanceof ChannelProcessor) {\n throw new \\InvalidArgumentException(\"Class must be an instance of ChannelProcessor!\");\n }\n\n $this->channel_processors[$type] = $class;\n }", "title": "" }, { "docid": "24cbba405d362c4835319ad1395ccdea", "score": "0.5019198", "text": "public function testAddNewItem()\n {\n $this->browse(function ($browser) {\n $browser->visit('/new_items')\n ->assertSee('Add New Items')\n ->press('#addItemButton')\n ->waitForText('Add New Item')\n ->type('#itemName', 'duskFoodItem&Refrigeration')\n ->type('#capacity', 10)\n ->type('#threshold', 50)\n ->check('#foodItem')\n ->check('#refrigeration')\n ->press('submitModal')\n ->pause('2000') //pause/wait for 1000ms for the modal to disappear\n ->press('submitItem')\n ->waitForText('Confirmation')\n ->press('saveChanges')\n ->waitForText('successfully created');\n });\n }", "title": "" }, { "docid": "1de4b62e7c0890ae30a2105b8fe2e06f", "score": "0.501269", "text": "public function testAddItem()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('DEFAULT')\n ->type('new_item', 'my new item')\n ->click('[data-test-id=\"button-add_item\"]')\n ->clear('new_item');\n\n $browser->with('[data-test-id=\"component-tab_container\"]', function ($tab) {\n $tab->assertSee('my new item');\n });\n });\n }", "title": "" }, { "docid": "5dd98a42cf7eaf114574c8757601b5fa", "score": "0.5010577", "text": "public function channelAction(){\r\n $this->saveChannelResponse($this->getSpNumber(),$this->getMobile(),$this->getCommand());\r\n }", "title": "" }, { "docid": "6b7dbd05f59b302f80e32cf5e45c2586", "score": "0.5007309", "text": "public function addToSpecRequestPref($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The SpecRequestPref property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->SpecRequestPref[] = $item;\n return $this;\n }", "title": "" }, { "docid": "0220d85591cfc7485ae3e0a1782cfe41", "score": "0.50059205", "text": "public function add($item)\n {\n return $this->items[] = $item;\n }", "title": "" }, { "docid": "02e08f3b2b0db5413efb3fb429f4d89c", "score": "0.49973583", "text": "public function addItem($block_id,$title,$param = array()) \n {\n if(!isset($param['link'])) $param['link'] = false;\n if(!isset($param['icon'])) $param['icon'] = false;\n if(!isset($param['separator'])) $param['separator'] = false;\n \n $this->Items[$block_id][] = array('title'=>$title,'param'=>$param);\n }", "title": "" }, { "docid": "02263774480bb6db38df3199a6966ed3", "score": "0.49964142", "text": "public function addItem($item){\r\n\t\tif($item->type > 10)\r\n\t\t\treturn false;\r\n\r\n\t\t$index = Album::getItemIndex($item);\r\n\r\n\t\tif($this->contents[$index])\r\n\t\t\treturn false;\r\n\r\n\r\n\t\t$this->contents[$index] = true;\r\n\t\t$this->count++;\r\n\r\n\t\t//if not epic or relic, add all colors\r\n\t\t// if(!$item->isEpic && $item->type != 10){\r\n\t\t// \t$this->count += 4;\r\n\t\t// \tfor($i = 1; $i <= 4; $i++){\r\n\t\t// \t\t$this->contents[$index + $i] = true;\r\n\t\t// \t}\r\n\t\t// }\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "9971dceba8713a3f794549f8d98c2310", "score": "0.49956965", "text": "public function addChannel($channel, $role = null)\n {\n $this->client->bridges()->addChannel($this->id, $channel, $role);\n }", "title": "" }, { "docid": "8cba86fa855852eeb294b66644cf9cc7", "score": "0.49871212", "text": "public function addItem(OTS_Item $item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "22ecf2baa4c53f9533970155c543cec7", "score": "0.49729162", "text": "public function addUserSessionChannel($channel)\n {\n $_SESSION['nodejs'] = $_SESSION['nodejs'] ?? [];\n $_SESSION['nodejs']['channels'] = $_SESSION['nodejs']['channels'] ?? [];\n $_SESSION['nodejs']['channels'][$channel] = $channel;\n }", "title": "" }, { "docid": "0214999bb8cd084f931175724e175db8", "score": "0.49630398", "text": "public function cart_add_item($r) {\n $items = Base_EpesiStoreCommon::get_cart();\n // user module id to compare orders in cart\n if (!isset($r['id']))\n return;\n foreach ($items as $it) {\n if (isset($it['id']) && $it['id'] == $r['id'])\n return;\n }\n $items[$r['id']] = $r;\n Base_EpesiStoreCommon::set_cart($items);\n }", "title": "" }, { "docid": "b845400841afd0bf8bdb9670870c7581", "score": "0.49590164", "text": "public function Add($item)\r\n {\r\n return $this->adapter->Insert($item);\r\n }", "title": "" }, { "docid": "dab3cf7b0f4bb586847840bb8cbedec8", "score": "0.49434224", "text": "public function create(ChannelRequest $request): Channel\n {\n return \\DB::transaction(function () use ($request) {\n $channel = $this->repository->create($request);\n\n $channel->users()->sync($request->get('user_ids'));\n\n return $channel;\n });\n }", "title": "" }, { "docid": "36a479d99d68a0033e860add5dddc7f2", "score": "0.49337795", "text": "public function writeItem($item)\n {\n $this->data[] = $item;\n }", "title": "" }, { "docid": "6ddc8db830d7c572b10b1889433d16af", "score": "0.49294022", "text": "protected function push_item(&$items, $item) {\r\n\t\tif ($item) {\r\n\t\t\t$items[] = $item;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3d455f6abd3a8cb2799fed252c0824d9", "score": "0.4929376", "text": "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "title": "" }, { "docid": "3d455f6abd3a8cb2799fed252c0824d9", "score": "0.4929376", "text": "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "title": "" }, { "docid": "70c43c6884600f329082f02e7fe4b8a0", "score": "0.49232563", "text": "public function add($item, $key = null)\n {\n if ($key) {\n if (isset($this->items[$key])) {\n// $this->logWarning($key, 'Duplicate Key');\n } else {\n $this->items[$key] = $item;\n }\n } else {\n $this->items[] = $item;\n }\n }", "title": "" }, { "docid": "f3d293ed240ecc6ec9bc4f7cbd7f37f0", "score": "0.49183822", "text": "function bib_add_item($key, $type)\n{\n\tglobal $bib_item_types;\n\t\n\t// check key is valid\n\tif (!is_key_valid($key)) {\n\t\treturn \"Key \\\"$key\\\" is invalid\";\n\t}\n\t\n\t// check type is present/valid\n\tif (!in_array($type, $bib_item_types)) {\n\t\treturn \"Invalid type \\\"$type\\\"\";\n\t}\n\t\n\t// update db\n\t$key = pg_escape_string($key);\n\t$type = pg_escape_string($type);\n\t$result = bib_db_update_query(\"INSERT INTO bib_items (key, type, month) VALUES ('$key', '$type', '13')\");\n\tif ($result != 1) {\n\t\treturn \"Could not add item \\\"$key\\\" - duplicate key perhaps\";\n\t}\n}", "title": "" }, { "docid": "abc53aae75f57b8a518d381e8eee0ef7", "score": "0.49097717", "text": "function addItem( $text );", "title": "" }, { "docid": "82460026db427f350800fafc174619d3", "score": "0.49062875", "text": "public function addToHand(CardInterface $card);", "title": "" }, { "docid": "db4d58fd9cddad9436ebbf4e88c264af", "score": "0.49051455", "text": "public function add() {\n $this->inventory = $this->session->db->prepare(\"UPDATE inventory SET available = available - ?, hold = hold + ? WHERE productId = ?\");\n $this->inventory->bind_param(\"iii\", $this->diff, $this->diff, $this->pid);\n if ($this->inventory->execute()) {\n $this->cart = $this->session->db->prepare(\"UPDATE carts SET quantity = ? WHERE cartId = ? AND productId = ?\");\n $this->cart->bind_param(\"iii\", $this->qty, $this->cid, $this->pid);\n $this->cart->execute();\n if ($this->diff > 0) {\n return $boxMsg[] = \"You added \" . $this->diff . \" of item with SKU \" . $this->pid . \" in your cart.\";\n } else {\n return $boxMsg[] = \"You reduce \" . abs($this->diff) . \" of item with SKU \" . $this->pid . \" in your cart.\";\n }\n } else {\n return $boxMsg[] = \"Unable to change quantity of item with SKU \" . $this->pid . \". <br /> Either you have requested a negative amount of hold or the item is out.\";\n }\n\n }", "title": "" }, { "docid": "6d5507d0f05e15e47a949677fdc86fc8", "score": "0.48917964", "text": "public abstract function addProductToFeed ($args);", "title": "" }, { "docid": "2af53df23ee94b7965a4d1391205bef3", "score": "0.4889871", "text": "function cot_auth_add_item($module_name, $item_id, $auth_permit = [], $auth_lock = [])\n{\n\tglobal $cot_groups, $cot_auth_default_permit, $cot_auth_default_lock;\n\n\t$auth_permit = $auth_permit + $cot_auth_default_permit;\n\t$auth_lock = $auth_lock + $cot_auth_default_lock;\n\t$ins_array = [];\n\tforeach ($cot_groups as $k => $v) {\n if (empty($v['skiprights'])) {\n\t\t\t$base_grp = $k > COT_GROUP_SUPERADMINS ? COT_GROUP_DEFAULT : $k;\n\t\t\t$ins_array[] = array(\n\t\t\t\t'auth_groupid' => $k,\n\t\t\t\t'auth_code' => $module_name,\n\t\t\t\t'auth_option' => $item_id,\n\t\t\t\t'auth_rights' => cot_auth_getvalue($auth_permit[$base_grp]),\n\t\t\t\t'auth_rights_lock' => cot_auth_getvalue($auth_lock[$base_grp]),\n\t\t\t\t'auth_setbyuserid' => Cot::$usr['id']\n\t\t\t);\n\t\t}\n\t}\n\n $res = 0;\n if (!empty($ins_array)) {\n $res = Cot::$db->insert(Cot::$db->auth, $ins_array);\n }\n\tcot_auth_reorder();\n\tcot_auth_clear('all');\n\n\treturn $res;\n}", "title": "" }, { "docid": "d4a2c10ef3ad5be359fd4d93bb50c4f4", "score": "0.48800373", "text": "public function addItem($type, $name, $params=null, $if=null, $cond=null)\n {\n if ($type==='skin_css' && empty($params)) {\n $params = 'media=\"all\"';\n }\n $this->_data['items'][$type.'/'.$name] = array(\n 'type' => $type,\n 'name' => $name,\n 'params' => $params,\n 'if' => $if,\n 'cond' => $cond,\n );\n return $this;\n }", "title": "" }, { "docid": "b36cbeba4cd42f6966bf6b39a4d8a9f7", "score": "0.48627698", "text": "public function addItem($data) {\n ObjectController::add(\"INSERT INTO item VALUES ($data)\");\n }", "title": "" }, { "docid": "c0812211c9c06141bfa081e43904490f", "score": "0.48546", "text": "public function addItemsToPlaylist($playlistId, $items);", "title": "" }, { "docid": "8a5847b4cd710b2d00e98b3186bb0e22", "score": "0.485191", "text": "function create_channel($data)\n\t{\n\t\t$this->db->insert('channels', $data);\n\t\treturn $this->db->insert_id();\n\t}", "title": "" }, { "docid": "165b795110aecea5ed74de40173d7636", "score": "0.4846537", "text": "function addConsumer (Consumer $cons) {\n foreach ($this->consumers as $c) {\n if ($c === $cons) {\n throw new \\Exception(\"Consumer can only be added to channel once\", 9684);\n }\n }\n $this->consumers[] = array($cons, false, 'READY_WAIT');\n }", "title": "" }, { "docid": "dad2331387f78bae164649c809e3788f", "score": "0.48351312", "text": "public function insert_item($item)\r\n {\r\n \t$this->item_array[] = $item;\r\n \t$this->item_map[] = $item;\r\n \t$this->item_by_type_array[$item->item_type][] = $item;\r\n }", "title": "" }, { "docid": "7d0ee146f714d1baf63118eecf1bd23d", "score": "0.48348927", "text": "function Streams_subscription_put($params) {\n\t$items = array();\n\t$subscribed = 'no';\n\t$updateTemplate = true;\n\t$streamName = Streams::requestedName();\n\t$publisherId = Streams::requestedPublisherId(true);\n\t$user = Users::loggedInUser(true);\n\n\textract($_REQUEST);\n\n\t$items = json_decode($items, true);\n\t$stream = Streams::fetchOne($user->id, $publisherId, $streamName);\n\tif (!$stream) {\n\t\tthrow new Q_Exception_MissingRow(array(\n\t\t\t'table' => 'stream',\n\t\t\t'criteria' => compact('publisherId', 'streamName')\n\t\t));\n\t}\n\n\t$rules = Streams_SubscriptionRule::select()->where(array(\n\t\t'ofUserId' => $user->id,\n\t\t'publisherId' => $publisherId,\n\t\t'streamName' => $streamName\n\t))->fetchDbRows(null, '', 'ordinal');\n\n\t$types = Q_Config::get('Streams', 'types', $stream->type, 'messages', array());\n\n\tif ($subscribed !== 'no') {\n\t\t// update rules\n\t\twhile ($item = array_pop($items)) {\n\t\t\t// join \"grouped\" message types to $items\n\t\t\tforeach ($types as $type => $msg) {\n\t\t\t\tif ($msg['title'] == $item['filter']->labels\n\t\t\t\tand $type != $item['filter']->types) {\n\t\t\t\t\t$items[] = (object) array(\n\t\t\t\t\t\t'deliver' => $item->deliver,\n\t\t\t\t\t\t'filter' => array(\n\t\t\t\t\t\t\t'types' => $type,\n\t\t\t\t\t\t\t'labels' => $msg['title'],\n\t\t\t\t\t\t\t'notifications' => $item['filter']->notifications\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\tif (!$rule = array_pop($rules)) {\n\t\t\t\t$rule = new Streams_SubscriptionRule();\n\t\t\t\t$rule->ofUserId = $user->id;\n\t\t\t\t$rule->publisherId = $publisherId;\n\t\t\t\t$rule->streamName = $streamName;\n\t\t\t\t$rule->relevance = 1;\n\t\t\t}\n\n\t\t\t$rule->filter = Q::json_encode($item['filter']);\n\t\t\t$rule->deliver = Q::json_encode($item['deliver']);\n\t\t\t$rule->save();\n\t\t}\n\t}\n\n\tforeach ($rules as $rule) {\n\t\t$rule->remove();\n\t}\n\n\t$streams_subscription = new Streams_Subscription();\n\t$streams_subscription->streamName = $streamName;\n\t$streams_subscription->publisherId = $publisherId;\n\t$streams_subscription->ofUserId = $user->id;\n\t$streams_subscription->filter = Q::json_encode(array());\n\t$streams_subscription->retrieve();\n\n\t$streams_participant = new Streams_Participant();\n\t$streams_participant->publisherId = $publisherId;\n\t$streams_participant->streamName = $streamName;\n\t$streams_participant->userId = $user->id;\n\t$streams_participant->state = 'participating';\n\t$streams_participant->reason = '';\n\t$streams_participant->retrieve();\n\t$streams_participant->subscribed = $subscribed;\n\t$streams_participant->save();\n\n\tif ($subscribed === 'yes') {\n\t\t$stream->subscribe(array('skipRules' => true));\n\t} else {\n\t\t$stream->unsubscribe();\n\t}\n}", "title": "" }, { "docid": "84a3ff8359ca913465299f6923e26202", "score": "0.48273143", "text": "public function addItem( \\Aimeos\\MShop\\Price\\Item\\Iface $item, $quantity = 1 );", "title": "" }, { "docid": "db7490d849e91dcb344fea260d210982", "score": "0.48241007", "text": "function addItem() {\n\t\tif($this->getSkuQty() > 0) {\n\t\t\t// Check for item first:\n\t\t\t$query_rsCWSkuExists = sprintf(\"SELECT cart_Line_ID, cart_sku_qty \n\t\t\tFROM tbl_cart\n\t\t\tWHERE cart_custcart_ID = '%s' \n\t\t\tAND\tcart_sku_ID = %d\",$this->getCartId(),$this->sku_id);\n\t\t\t$rsCWSkuExists = $this->db->executeQuery($query_rsCWSkuExists);\n\t\t\t// Item already exists in cart, update it\n\t\t\tif($this->db->recordCount > 0) {\n\t\t\t\t$this->updateItem($this->getSkuId(), $this->getSkuQty());\n\t\t\t}else{\n\t\t\t\t/* Insert sku into cart */\n\t\t\t\t$query_rsCWAdd = sprintf(\"INSERT INTO tbl_cart \n\t\t\t\t(cart_custcart_ID, cart_sku_ID, cart_sku_qty, cart_dateadded)\n\t\t\t\tVALUES ('%s', %d, %d, now())\",$this->CartId,$this->sku_id,$this->getSkuQty());\n\t\t\t\t$rsCWAdd = $this->db->executeQuery($query_rsCWAdd);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "a757dddfa7347597ee94545a6bf00025", "score": "0.48151433", "text": "function createSubChannel($dbh, $channel_name, $sub_channel_name) {\n $channel_name = mysql_real_escape_string($channel_name);\n $sub_channel_name = mysql_real_escape_string($sub_channel_name);\n $institution_id = getInstitutionIdByName($dbh, $channel_name);\n\n //If we found an institution linked to the name\n if($institution_id !== -1) {\n //If the channel doesn't exist, we create it.\n if(checkIfSubChannelExists($dbh, $institution_id, $sub_channel_name) == false) {\n $sql = \"INSERT INTO CHANNELS (institution_id,name) VALUES (:institution_id,:name)\";\n $sth = $dbh->prepare($sql);\n $sth->execute(array(':institution_id'=>$institution_id,\n ':name'=>$sub_channel_name));\n\n }\n }\n}", "title": "" }, { "docid": "4f5c1ed889770521b0ffc051a527d723", "score": "0.48139217", "text": "public function add($item): bool\n {\n $this->items[] = $item;\n return true;\n }", "title": "" }, { "docid": "773b82245c47539e9a4a1eabc1da9111", "score": "0.4795557", "text": "function add($message, $level = 'notice')\n\t{\n\t\tif(isset(self::$queue[$this->stream]) === false)\n\t\t\tself::$queue[$this->stream] = array();\n\t\tself::$queue[$this->stream][] = new _MessageItem($message, $level);\n\t}", "title": "" }, { "docid": "0694912d1dbb3e2ace0bb4f677c782da", "score": "0.4792522", "text": "public function addToRoomStayCandidate($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The RoomStayCandidate property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->RoomStayCandidate[] = $item;\n return $this;\n }", "title": "" }, { "docid": "c3bd771c37e455d35939f49ebf42bc19", "score": "0.47919202", "text": "public function add($value)\n\t{\n\t\t$this->items[] = $value;\n\t}", "title": "" }, { "docid": "cace49048e183a369262f4c607c33bf1", "score": "0.4787892", "text": "public function add(string $key, ConsumerInterface $consumer): void\n {\n $this->consumers[$key] = $consumer;\n }", "title": "" }, { "docid": "46f2b243b0bd5fb64835e9905be194a7", "score": "0.47841054", "text": "function add($item) : int;", "title": "" }, { "docid": "73b15b679feefd571fda5e102e5a6f53", "score": "0.4781005", "text": "public function add($item)\n {\n if ($item instanceof ShippingMethodInterface) {\n $this->items[] = $item;\n } else {\n $this->items[] = new Item($item);\n }\n }", "title": "" }, { "docid": "3a57bd7a518dddc76a36eae43bbc054b", "score": "0.4778332", "text": "public function addToVendorPref($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The VendorPref property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->VendorPref[] = $item;\n return $this;\n }", "title": "" }, { "docid": "16e32230f462d75843efe82e3c522b65", "score": "0.47782388", "text": "public function subscribe($user, $channel) {\n if (!$this->isSubscribed($user, $channel)) {\n array_push($this->channels->{$channel}, $user);\n $this->save();\n }\n }", "title": "" }, { "docid": "4f87649250782193f8fd9f8be2e1c920", "score": "0.47777182", "text": "public function add(array $items = array())\n {\n $basket = $this->getBasket();\n if(empty($basket))\n return false;\n\n $iblockId = null;\n $properties = array();\n foreach($items as $k => $itemInfo)\n {\n $quantity = empty($itemInfo['QUANTITY']) ? 1 : (int) $itemInfo['QUANTITY'];\n $fields = array(\n 'QUANTITY' => $quantity,\n 'CURRENCY' => (isset($itemInfo['CURRENCY']) ? $itemInfo['CURRENCY'] : $this->currency),\n 'LID' => (isset($itemInfo['LID']) ? $itemInfo['LID'] : $this->lid),\n 'PRODUCT_PROVIDER_CLASS' => '\\\\CCatalogProductProvider',\n );\n if(isset($itemInfo['PRICE']))\n {\n $fields['PRICE'] = $itemInfo['PRICE'];\n $fields['CUSTOM_PRICE'] = 'Y';\n }\n\n $addProps = array();\n\n if(!empty($itemInfo['PROPERTIES']))\n {\n\n if(empty($iblockId))\n {\n $iblockId = Element::getById($itemInfo['PRODUCT_ID']);\n $iblockId = $iblockId['IBLOCK_ID'];\n }\n if(empty($properties))\n {\n $res = \\CIBlockElement::GetProperty($iblockId, $itemInfo['PRODUCT_ID']);\n while($ob = $res->GetNext())\n {\n $properties[$ob['CODE']] = array(\n 'NAME' => $ob['NAME'],\n 'CODE' => $ob['CODE'],\n 'VALUE' => '',\n 'SORT' => $ob['SORT'],\n );\n }\n }\n //var_dump($properties);\n foreach($itemInfo['PROPERTIES'] as $code => $value)\n {\n if(isset($properties[$code]))\n {\n $properties[$code]['VALUE'] = $value;\n $addProps[] = $properties[$code];\n }\n }\n }\n\n if ($item = $this->getBasketItem($itemInfo['PRODUCT_ID'], (isset($fields['PRICE']) ? $fields['PRICE'] : null), $addProps)) {\n $fields['QUANTITY'] = $item->getQuantity() + $quantity;\n }\n else {\n $item = $basket->createItem('catalog', $itemInfo['PRODUCT_ID']);\n }\n\n $item->setFields($fields);\n\n if(!empty($addProps))\n $item->getPropertyCollection()->setProperty($addProps);\n }\n return $basket->save();\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "001e1bbad4bface9b7c19f56493de4db", "score": "0.0", "text": "public function store(PlaceRequest $request)\n {\n $eventID = Event::where('original_id', $request->original_event_id)->first()->id;\n\n $this->authorize('create', [Place::class, $eventID]);\n\n $place = Place::create(array_merge($request->all(), ['event_id' => $eventID]));\n\n return new PlaceResource($place);\n }", "title": "" } ]
[ { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.78113544", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\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": "56a1d1d00b789bcc32f6ce99932cc19b", "score": "0.65499157", "text": "public function store(Request $request)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255|unique:resources',\n 'url' => 'required|max:255|unique:resources|active_url',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id'\n ]);\n //Create the resource\n $newResourceData = [\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => Auth::user() && Auth::user()->isAdmin()\n ];\n if (Auth::user()){\n $resource = Auth::user()->resources()->create($newResourceData);\n }\n else{\n $resource = Resource::create($newResourceData);\n }\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource created';\n $responseText .= Auth::user() && Auth::user()->isAdmin() ? ' and published!' : ' and awaiting review.';\n //Take them back to the resource form so they can add more resources\n return redirect('/resources/create')->with('success', $responseText);\n }", "title": "" }, { "docid": "d5deceebf787a137745e10078f88a17c", "score": "0.6420354", "text": "public function store(StorageRequest $request)\n {\n try {\n $this->service->addStorage($request);\n return $this->Created('Successfully added new storage');\n } catch (\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch (Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "148c42c41711b48306faccd1fdedbc39", "score": "0.6416866", "text": "public function store()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "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": "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": "" } ]
3e4bc1eb6c334aed5f06da9eab6e0527
Search for an array value. Returns TRUE if the array key exists and FALSE if not.
[ { "docid": "bce1820beacead8d308257afdefde0dd", "score": "0.0", "text": "public static function has(array $array, $path)\n {\n $segments = explode('.', $path);\n foreach ($segments as $segment) {\n if (!is_array($array) || !isset($array[$segment])) {\n return false;\n }\n $array = $array[$segment];\n }\n\n return true;\n }", "title": "" } ]
[ { "docid": "e5fe2fd634192189a6521e4f0cc06dff", "score": "0.7722422", "text": "function search_in_array($array, $key, $value) {\n\n\tfor ($i = 0; $i < count($array); $i++) {\n\t\tif ($array[$i][$key] == $value) return true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "83ce7400d747fe712f3fd3ed9c10deae", "score": "0.760205", "text": "public function searcharray($value, $key, $array) {\r\n if(is_array($array))\r\n {\r\n foreach ($array as $k => $val) {\r\n if ($val[$key] == $value) {\r\n return $k;\r\n }\r\n }\r\n }\r\n \r\n return FALSE;\r\n }", "title": "" }, { "docid": "d22bce2ded41adaf5893f94d8032703d", "score": "0.7300519", "text": "public static function hasKey($array, $key) {\n\t\t// unlike isset, this properly detects null values\n\t\treturn array_key_exists($key, $array);\n\t}", "title": "" }, { "docid": "fa7eefb574d44059b2140f1c7bfcf0f8", "score": "0.7275723", "text": "function array_exists($array, $key)\n {\n if ($array instanceof \\ArrayAccess) {\n return $array->offsetExists($key);\n }\n\n return array_key_exists($key, $array);\n }", "title": "" }, { "docid": "5ee89d7b39df27e8184156326e1b5a76", "score": "0.7264761", "text": "function array_has($array, $key)\n\t{\n\t\treturn Arr::has($array, $key);\n\t}", "title": "" }, { "docid": "154be7786d832bc32b6e4411303f2155", "score": "0.7247673", "text": "function in_array_key($key, $array, $value = false)\n\t{\n\t\tif (is_array($array)) {\n\t\t\twhile(list($k, $v) = each($array)) {\n\t\t\t\tif($key == $k) {\n\t\t\t\t\tif($value && $value == $v)\n\t\t\t\t\t\treturn true;\n\t\t\t\t\telseif($value && $value != $v)\n\t\t\t\t\t\treturn false;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "dc89ea3bdddbef72ade13893c6f01fc1", "score": "0.7241806", "text": "public static function keyExists($key,&$array)\r\n {\r\n if(!is_array($array)) return false;\r\n if(isset($array[$key])) return true;\r\n foreach($array as $elem)\r\n {\r\n if(is_array($elem))\r\n {\r\n return self::keyExists($elem,$key);\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "a5deaba6f0309f708de071ba7c3113cd", "score": "0.7218088", "text": "public static function arrayKeyExists(array &$array, string $key): bool\n {\n return isset($array[$key]) || \\array_key_exists($key, $array);\n }", "title": "" }, { "docid": "f62c2d1ffb7952c2fda7a4ffdabfcd54", "score": "0.7167747", "text": "private function checkKey($value,$array){\n if (array_key_exists($value, $array)){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "5fbaf26df6171428b65548903fdd6d56", "score": "0.71039844", "text": "function in_array_multi($value, $key, array $array)\n {\n return array_search_multi($value, $key, $array) !== false;\n }", "title": "" }, { "docid": "ee650bc1645ead30ce84875ea4fb6846", "score": "0.7093634", "text": "function arrayKeyExists($key, $search) {\n\n if (is_array($search)) {\n\n return (sizeof(array_keys(array_keys($search),$key))>1);\n\n }\n\n else {\n\n return false;\n\n }\n\n}", "title": "" }, { "docid": "3a1a9f26c27c3fbd66a47e2ebc1b46a9", "score": "0.70327306", "text": "protected static function exists($array, $key)\n {\n if ( !is_array($array) || is_null($key) )\n return false;\n\n if ($array instanceof ArrayAccess)\n return $array->offsetExists($key);\n\n return array_key_exists($key, $array);\n }", "title": "" }, { "docid": "3d98678820021b064b1fe52671397642", "score": "0.7025076", "text": "function is_exists($val, $arr)\r\n {\r\n return isset($arr[$val]);\r\n\r\n }", "title": "" }, { "docid": "f10fb7f26dc91989915cdb72eff33d79", "score": "0.7018799", "text": "public static function exists($array, $key): bool\n\t{\n\t\tif ($array instanceof ArrayAccess) {\n\t\t\treturn $array->offsetExists($key);\n\t\t}\n\n\t\treturn array_key_exists($key, $array);\n\t}", "title": "" }, { "docid": "8b6ee81ff605062cbdbed80178d16a53", "score": "0.7014653", "text": "public function offsetExists($key)\n {\n\t\t\treturn array_key_exists($key, $this->array);\n }", "title": "" }, { "docid": "d7875d95903d8314034c709a81ee0d8f", "score": "0.70071185", "text": "public static function exists($array, $key): bool\r\n {\r\n if ($array instanceof ArrayAccess) {\r\n return $array->offsetExists($key);\r\n }\r\n\r\n return array_key_exists($key, $array);\r\n }", "title": "" }, { "docid": "69815b6e1836f545bd5438d35d680aba", "score": "0.6988047", "text": "public function exists($key){\n\t\treturn array_key_exists($key, $this->arrayList);\n\t}", "title": "" }, { "docid": "ab975f3184fc8e5194b5b0687a4f1a95", "score": "0.6979864", "text": "public function is_key_in_array($key, array $array, $message=\"\") {}", "title": "" }, { "docid": "b3f246841f7f87dc616ea1012e1ba57d", "score": "0.6979831", "text": "public static function keyOf($array, $value) {\n\t\t$r = array_search($value, $array, true);\n\t\treturn $r === false ? null : $r;\n\t}", "title": "" }, { "docid": "d8e308fa23ed06fcb7bc43b90ac01871", "score": "0.6970853", "text": "function array_search_multi($value, $key, array $array)\n {\n foreach ($array as $k => $val) {\n\n if (is_array($val)) {\n\n if ($val[$key] == $value) {\n return $k;\n }\n\n } elseif (is_object($val)) {\n\n if ($val->$key == $value) {\n return $k;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "99b83c560b86f8c5b85ce7022d412318", "score": "0.6970406", "text": "public function key_exists($key) {\n return array_key_exists($key, $this->array);\n }", "title": "" }, { "docid": "6f4c7f1976231e6cb7ba1f3be5e763c3", "score": "0.69543177", "text": "function findKey($array, $keySearch)\n{\n if (!is_array($array)) return false;\n\n // key exists\n if (array_key_exists($keySearch, $array)) return true;\n\n // key isn't in this array, go deeper\n foreach($array as $key => $val)\n {\n // return true if it's found\n if (findKey($val, $keySearch)) return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "a3f39955df820694d3f0509c9d790626", "score": "0.6928476", "text": "public static function exists($array, $key)\n {\n if ($array instanceof ArrayAccess) {\n return $array->offsetExists($key);\n }\n\n return array_key_exists($key, $array);\n }", "title": "" }, { "docid": "2ec6062191454edb52e825a0083ecca3", "score": "0.69219345", "text": "public function existsData($array, $key)\r\n {\r\n if ($array instanceof ArrayAccess) {\r\n return isset($array[$key]);\r\n }\r\n\r\n return array_key_exists($key, $array);\r\n }", "title": "" }, { "docid": "4a0e1d800cff3a4352ac0ccc7c720f4e", "score": "0.6894362", "text": "public static function matchArrayByKeyValue( $array, $searchKey, $searchValue ) {\n $iter = new RecursiveIteratorIterator(\n new RecursiveArrayIterator( $array ),\n RecursiveIteratorIterator::SELF_FIRST );\n\n //loop over the iterator\n foreach ( $iter as $key => $value ) {\n //if the value matches our search\n if ( $key === $searchKey && $value === $searchValue ) {\n return true;\n }\n }\n\n //return false if not found\n return false;\n }", "title": "" }, { "docid": "0f9700808ac1fef043e88fd792f7757a", "score": "0.6893369", "text": "function exists($key,$arr) {\n if ($arr instanceof \\ArrayAccess)\n return isset($arr[$key]);\n return array_key_exists($key,(array)$arr);\n }", "title": "" }, { "docid": "7a3ef6a2edb24a45341f680db765cc6d", "score": "0.6877033", "text": "private function arraySubValueExists($keyName, $targetArray, $value)\n {\n foreach ($targetArray as $subValue) {\n if ($subValue[$keyName] == $value) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "75b995c310fe98f32c1c0b035111122c", "score": "0.6862238", "text": "public function exists($key): bool\n {\n return array_key_exists((string) $key, $this->array);\n }", "title": "" }, { "docid": "297b5d0068c17d5fa4ec03928df57b35", "score": "0.68599546", "text": "function arrHas($arr, $key) {\n\treturn is_array($arr) && isset($arr[$key]);\n}", "title": "" }, { "docid": "3beb83f89ded44379358359b27ce5e74", "score": "0.68571335", "text": "public static function has( array $array, string $key ): bool {\n\n // search the array using the dot character to access nested array values\n foreach ( $keys = explode( '.', $key ) as $key ) {\n\n // when a key is not found or we didn't get an array to search return a fallback value\n if ( ! is_array( $array ) or ! array_key_exists( $key, $array ) ) {\n return false;\n }\n\n $array =& $array[ $key ];\n }\n\n return true;\n }", "title": "" }, { "docid": "b14542bd3934c23e50ab97c8b119ea9d", "score": "0.6847134", "text": "public static function has(array $array, string $key): bool\n {\n return (NULL !== self::get($array, $key)) ? true : false;\n }", "title": "" }, { "docid": "40b17e877686f4ed0754bc0061d692d5", "score": "0.68233365", "text": "public function search($value)\n {\n return array_search($value, $this->_array);\n }", "title": "" }, { "docid": "322a492d69e738d0fc1f8a4035078ba6", "score": "0.67072403", "text": "public function offsetExists($key)\n\t{\n\t\treturn $this->get($key) ? true : false;\n\t}", "title": "" }, { "docid": "f7a62e97d43ae3ba89b48bf1b8c4b2e6", "score": "0.66924095", "text": "public static function contains($array, $value) {\n\t\treturn in_array($value, $array, true);\n\t}", "title": "" }, { "docid": "b69c785604599311825ef01e91954b80", "score": "0.6657267", "text": "public function findKeyValue($array, $key, $val)\n {\n foreach ($array as $item) {\n if (is_array($item) && $this->findKeyValue($item, $key, $val)) {\n return true;\n }\n\n if (isset($item[$key]) && $item[$key] == $val) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "b8dc84d60ce37a0dedd541b7e73703e5", "score": "0.663467", "text": "function compat_in_array( $value, $arr )\r\n {\r\n while ( list($key,$val) = each($arr) )\r\n {\r\n if ( $value == $val )\r\n {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "dac7fb38588834408ba81e352b35f1c7", "score": "0.6613896", "text": "public static function exists(array $array, $key): bool\n {\n if ($array instanceof ArrInterface) {\n return $array->has($key);\n }\n\n if ($array instanceof ArrayAccess) {\n return $array->offsetExists($key);\n }\n\n return array_key_exists($key, $array);\n }", "title": "" }, { "docid": "cef483a366c6598c70e489cbffb5925f", "score": "0.6609028", "text": "function multidim_arr_search_value(array $arr, $value, $key)\n{\n $tmp = array_column($arr, $key);\n return array_search($value, $tmp);\n}", "title": "" }, { "docid": "14add7c992749baf931b74cca1135e5a", "score": "0.65910226", "text": "function sk_array_value($arr, $k) {\n\treturn (isset($arr[$k])) ? $arr[$k] : false;\n}", "title": "" }, { "docid": "350fcb77493e9408752f246c0ee1f5c8", "score": "0.65894395", "text": "public static function arrayKeyExistsRecursive($key, $array)\n {\n foreach ($array as $k => $v) {\n if (($k === $key) || (is_array($v) && static::arrayKeyExistsRecursive($key, $v))) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "81926d6f52bf53082b1552d1fa1217fc", "score": "0.65812683", "text": "function existsOrDefault($key, $array, $default = null) {\n\tif (array_key_exists($key, $array)) return $array[$key];\n\telse return $default;\n}", "title": "" }, { "docid": "d0fd99eb8d0dcf8403bc33e0aca58328", "score": "0.65734744", "text": "static function associative_array_search($array,$key,$value){\n\t\t$search_r = function($array, $key, $value, &$results, $subarray_key = null) use(&$search_r){\n\t\t\tif (!is_array($array)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isset($array[$key]) && $array[$key] == $value) {\n\t\t\t\tif(isset($subarray_key))\n\t\t\t\t\t$results[$subarray_key] = $array;\n\t\t\t\telse\n\t\t\t\t\t$results[] = $array;\n\t\t\t}\n\n\t\t\tforeach ($array as $k => $subarray) {\n\t\t\t\t$search_r($subarray, $key, $value, $results, $k);\n\t\t\t}\n\t\t};\n\t\t$results = array();\n\t\t$search_r($array, $key, $value, $results);\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "2b47b841ea71ae8bffd29fdfc44fde7b", "score": "0.6567904", "text": "function array_item($ar, $key) {\n if(is_array($ar) && array_key_exists($key, $ar))\n return($ar[$key]);\n else\n return FALSE;\n}", "title": "" }, { "docid": "53f026a9321772e4c97982fc24cc7759", "score": "0.6566585", "text": "public static function search($value){\n\t\treturn \\array_search($value,self::$datas);\n\t}", "title": "" }, { "docid": "5d7d6e88c12c666f5ed8695d171d79c2", "score": "0.6555742", "text": "public static function exists(array $array, string $key): bool\n {\n if (array_key_exists($key, $array)) {\n return true;\n }\n\n foreach (explode('.', $key) as $segment) {\n if (!is_array($array) || !array_key_exists($segment, $array)) {\n return false;\n }\n\n $array = $array[$segment];\n }\n\n return true;\n }", "title": "" }, { "docid": "b7295a7a05f36d32d5c635016d7d4c8f", "score": "0.65359616", "text": "public function offsetExists($key)\n {\n return array_key_exists($key, $this->data);\n }", "title": "" }, { "docid": "b7295a7a05f36d32d5c635016d7d4c8f", "score": "0.65359616", "text": "public function offsetExists($key)\n {\n return array_key_exists($key, $this->data);\n }", "title": "" }, { "docid": "3fb34f1e207d03f2c48a67fea479a73c", "score": "0.65282416", "text": "public function search($value)\n\t{\n\t\treturn array_search($value, $this->_data, true);\n\t}", "title": "" }, { "docid": "b5dc57ace5844acf087e51d20fb39767", "score": "0.6512202", "text": "function get_if_exists($array_key, $array_to_check_in, $default_value){\n\t\n\tif(array_key_exists($array_key, $array_to_check_in)){\n\t\treturn $array_to_check_in[$array_key];\n\t}\n\telse{\n\t\treturn $default_value;\n\t}\n}", "title": "" }, { "docid": "248e5a3b4cd0b3a3e473fb0cd469e234", "score": "0.6509204", "text": "public function existValue($keyValue);", "title": "" }, { "docid": "459c8870cc30e87525fd3bf1cd73c005", "score": "0.6507842", "text": "#[\\ReturnTypeWillChange]\n public function offsetExists($key): bool\n {\n return $this->contains($key);\n }", "title": "" }, { "docid": "f4e12100b9369345488672a6caf0ad63", "score": "0.650605", "text": "public function offsetExists( $key )\n\t{\n\t\treturn $this->has( $key );\n\t}", "title": "" }, { "docid": "12400c11573c2d3cd546bfea35bb6c57", "score": "0.64873886", "text": "public function inArray($value)\n {\n return in_array($value, $this->data, true);\n }", "title": "" }, { "docid": "7e17f91922888c219fe6ed7a157fa982", "score": "0.64844304", "text": "private function arrayExists( $arrayId ) {\n\t\treturn array_key_exists( trim( $arrayId ), $this->mArrays );\n\t}", "title": "" }, { "docid": "e9ffa469ba60483751b4b12cfbe3a2a2", "score": "0.6482822", "text": "public function offsetExists($key)\n {\n return array_key_exists($key, $this->input);\n }", "title": "" }, { "docid": "a1ccc9e7249b7976f0b721608f2c7ae7", "score": "0.6472337", "text": "function search($array, $key, $value)\r\n{\r\n $results = array();\r\n if (is_array($array)) {\r\n if (isset($array[$key]) && $array[$key] == $value) {\r\n $results[] = $array;\r\n }\r\n foreach ($array as $subarray) {\r\n $results = array_merge($results, search($subarray, $key, $value));\r\n }\r\n }\r\n return $results;\r\n}", "title": "" }, { "docid": "d94ba11f2cb85449a07645409f16ed56", "score": "0.6467934", "text": "public static function in_keys($value, array $param) {\r\n if (\\is_array($value)) {\r\n $ret = \\array_diff($value, \\array_keys($param));\r\n return empty($ret);\r\n }\r\n\r\n if (!\\is_string($value) && !\\is_int($value)) {\r\n return false;\r\n }\r\n\r\n return \\array_key_exists($value, $param);\r\n }", "title": "" }, { "docid": "6a333df77a27bd6a92bbb062712692d0", "score": "0.64655924", "text": "public static function find($array, $searchKey, $searchValue)\n {\n foreach ($array as $sub) {\n if ($sub->$searchKey === $searchValue) {\n return $sub;\n }\n }\n return false;\n }", "title": "" }, { "docid": "0f4f7583d9703b8db5981c14e452b5bb", "score": "0.6438417", "text": "function searchKey($value, $array) {\n\tforeach ($array as $key => $val) {\n\t\tif ($val['id'] === $value) {\n\t\t\treturn $key;\n\t\t}\n\t}\n\t\n\treturn -1; // return not found\n}", "title": "" }, { "docid": "335847807d6de777de4fd8bf95af70c4", "score": "0.64329624", "text": "public static function search($value)\n {\n return array_search($value, static::toArray(), true);\n }", "title": "" }, { "docid": "1deee5a46d2d8cd3fcfe2fa89e25ddcf", "score": "0.6420155", "text": "public function offsetExists($key)\n\t{\n\t\treturn $this->has($key);\n\t}", "title": "" }, { "docid": "c5cbed3ffa51ced1895ad0ab21df3c84", "score": "0.6409093", "text": "public function offsetExists( $key ) {\n\t}", "title": "" }, { "docid": "e8e8643ada466343e06ab381cc09cec6", "score": "0.6403734", "text": "public static function hasOwnProperty(array $array, string $key): bool\n {\n return \\array_key_exists($key, $array);\n }", "title": "" }, { "docid": "5dd7847c989d78cb3539c602aaf6b081", "score": "0.6402334", "text": "public function offsetExists($key): bool\n {\n return array_key_exists($key, $this->data);\n }", "title": "" }, { "docid": "1712118929b5c9f9faeda951927717ed", "score": "0.63947874", "text": "public function is_in_array($array, $value, $message=\"\") {}", "title": "" }, { "docid": "f7a9b05a62d15fa635805b41efc2cab2", "score": "0.63933307", "text": "function UserPrefArrExists($dbh, $user_id, $prefname, $key)\r\n{\r\n\t$ret = false;\r\n\r\n\t$vals = UserGetPref($dbh, $user_id, $prefname);\r\n\tif ($vals)\r\n\t{\r\n\t\t$parts = explode(\":\", $vals);\r\n\t\tforeach ($parts as $val)\r\n\t\t\tif ($val == $key)\r\n\t\t\t\treturn true;\r\n\t}\r\n\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "ffe12961e5447b84e02f842c293801e1", "score": "0.6392242", "text": "public function psc_link_val_arr_key( $key, $array ) {\n\n\t\tif( array_key_exists( $key, $array ) && !empty( $array[ $key ] ) ) {\n\t\t\treturn $array[ $key ];\n\t\t} else {\n\t\t\treturn FALSE; // return nothing\n\t\t}\n\n\t}", "title": "" }, { "docid": "82db255a1b7dd57ed33cf7b172b79f12", "score": "0.6378713", "text": "function arrayKeyExists($key,$arrayKey) {\n $this->data = $_SESSION;\n return parent::arrayKeyExists($key, $arrayKey);\n }", "title": "" }, { "docid": "fcc34c388f941fdfbd8bf935674b0bab", "score": "0.6365493", "text": "private function keyValuePairExists($key, $value, $array = null)\n {\n // Fallback for array\n $array = (empty($array)) ? $this->result : $array;\n \n $keyValuePairExists = false;\n \n foreach($array as $k => $v) {\n // Is recursion needed\n if (is_array($v)) {\n $this->keyValuePairExists($key, $value, $v);\n } else {\n if ($k == $key and $v == $value) {\n $keyValuePairExists = true;\n break;\n }\n }\n }\n \n return $keyValuePairExists; \n }", "title": "" }, { "docid": "88a618b85eae8616302c8a1afdd9c17a", "score": "0.63594526", "text": "public function getValueIfExist($array, $key)\n\t{\n\t\tif (array_key_exists($key, $array) AND !empty($array[$key])) {\n\t\t\treturn $array[$key];\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "9e15b3cdcb76338d909f570e5875a33d", "score": "0.6351267", "text": "public function offsetExists($key) {\n return isset($this->_items[$key]);\n }", "title": "" }, { "docid": "713459c0de5527452ac0a3aacbde2db4", "score": "0.6340936", "text": "public function offsetExists($key)\n {\n return isset($this->data[$key]);\n }", "title": "" }, { "docid": "b9e8e3774dd96bde19bc1602a9b5f66a", "score": "0.63402826", "text": "public function offsetExists($key)\n {\n return array_key_exists($key, $this->items);\n }", "title": "" }, { "docid": "2e73f1b19bde81d17971ef5777b37321", "score": "0.6335724", "text": "public static function has($array, $key, $delimiter = '.')\n {\n return (static::get($array, $key, false, $delimiter) !== false);\n }", "title": "" }, { "docid": "6793f6148108e8134770a8f893edfc88", "score": "0.63279366", "text": "function searchForId($search_value, $array) {\r\n\t\t\t\t\tforeach ($array as $key1 => $val1) {\t\t\r\n\t\t\t\t\t\tif(is_array($val1) and count($val1)) {\r\n\t\t\t\t\t\t\tforeach ($val1 as $key2 => $val2) {\r\n\t\t\t\t\t\t\t\tif($val2 == $search_value) {\r\n\t\t\t\t\t\t\t\t\treturn $key1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telseif($val1 == $search_value) {\r\n\t\t\t\t\t\t\treturn $key1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn -1;\t\t\t\t\r\n\t\t\t\t}", "title": "" }, { "docid": "1ef670b34a43f2c85261d99c78cc8cce", "score": "0.6308705", "text": "public function offsetExists($key): bool\n {\n return Arr::has($this->data, $key);\n }", "title": "" }, { "docid": "b0ffe14051433cffa9e2379158e423ba", "score": "0.63075393", "text": "function searchForId($array, $field, $value) {\n foreach ($array as $key => $val) {\n if ($val[$field] === $value) {\n return $key;\n }\n }\n return null;\n}", "title": "" }, { "docid": "4f727b2c79e2012314e43860f36b99a0", "score": "0.6287362", "text": "public function hasValueIn($key, $value);", "title": "" }, { "docid": "ce5aac004b85dc6bdbeecd87c16a2e50", "score": "0.627318", "text": "public function offsetExists($key)\n {\n return $this->__isset($key);\n }", "title": "" }, { "docid": "a568429f63c774ce51f29482793ac988", "score": "0.626574", "text": "function inArray($arr, $nombre) {\r\r\n\treset($arr);\r\r\n\t$res=false;\r\r\n\twhile ( (list ($key, $val) = each ($arr)) && !$res) {\r\r\n\t\tif ($val==$nombre) $res=true;\r\r\n\t}\r\r\n\treturn $res;\r\r\n}", "title": "" }, { "docid": "b10cab0ddf5e05e0b3f21ffdd6c646c9", "score": "0.6263851", "text": "function offsetExists($offset) {\n\t\t$this->dataToArray();\n\t\treturn array_key_exists($offset, $this->data);\n\t}", "title": "" }, { "docid": "528f27eac7f4bc579dd3e07aa6182d7a", "score": "0.6256057", "text": "public static function searchArrayByKey(string $needle, array $arr) {\r\n foreach (new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($arr)) as $key => $value) {\r\n if ($needle === $key)\r\n return $value;\r\n }\r\n return null;\r\n }", "title": "" }, { "docid": "ed065ad5c0d1601cc7ecc9ef6a759da5", "score": "0.62472606", "text": "public function offsetExists($key) {\n\t\treturn isset($this -> resulSet[$key]);\n\t}", "title": "" }, { "docid": "59476a61b66927a953f4b401b1b74a04", "score": "0.6243573", "text": "function findInArray(string $search, array $arr)\n{\n foreach($arr as $pos => $line) {\n if (str_contains($line, $search)) {\n return $pos;\n }\n }\n return FALSE;\n}", "title": "" }, { "docid": "12ca359b4b24e2a0f01a7dd8e7d6044c", "score": "0.62357986", "text": "public static function hasSet(array &$arr, $key, $value = null){\n if(isset($arr[$key])){\n return $arr[$key];\n }else{\n $arr[$key] = $key;\n return $value;\n }\n }", "title": "" }, { "docid": "db93cd7ff685365aa816929f3a6e28df", "score": "0.6219783", "text": "function array_search_multidimension($array, $key, $value)\r\n {\r\n $results = array();\r\n\r\n if (is_array($array)) {\r\n if (isset($array[$key]) && $array[$key] == $value) {\r\n $results[] = $array;\r\n }\r\n\r\n foreach ($array as $subarray) {\r\n $results = array_merge($results, array_search_multidimension($subarray, $key, $value));\r\n }\r\n }\r\n\r\n return $results;\r\n }", "title": "" }, { "docid": "ae71959ab6648de7b2f81d6ae8939708", "score": "0.6210864", "text": "public function testFindItemInArrayWithKey(): void\n {\n $testarray = array(\n array( \"name\" => \"Melissa\", \"age\" => 40),\n array( \"name\" => \"Tim\", \"age\" => 59),\n array( \"name\" => \"Bob\", \"age\" => 20),\n array( \"name\" => \"Shania\", \"age\" => 20),\n );\n $expectedresult1 = array(\"name\" => \"Bob\", \"age\" => 20);\n $expectedresult2 = array(\n array( \"name\" => \"Bob\", \"age\" => 20),\n array( \"name\" => \"Shania\", \"age\" => 20),\n );\n $test = FL\\ArrayHelper::getInstance($testarray);\n $this->assertEquals($test->findItemInArrayWithKey(\"name\", \"Bob\"), $expectedresult1);\n $this->assertEquals($test->findItemInArrayWithKey(\"age\", 20, true), $expectedresult2);\n }", "title": "" }, { "docid": "a78b6db23e8efed0e743add35bc21624", "score": "0.62079275", "text": "public function keyExists($field)\n {\n return array_key_exists($field, $this->arr);\n }", "title": "" }, { "docid": "21650043f54004a532bc3e8bdd228bd7", "score": "0.61793673", "text": "public function offsetExists($var) {\n\t\treturn $this->__isset($var);\n\t}", "title": "" }, { "docid": "c4220e3e39fe6c9eb596ea54f2b71a6d", "score": "0.6176687", "text": "public function offsetExists (mixed $offset): bool\n {\n return array_key_exists($offset, $this->_array);\n }", "title": "" }, { "docid": "068c996291346cd5a690725c68b4526e", "score": "0.61759794", "text": "public function offsetExists($key)\n {\n return $this->has($key);\n }", "title": "" }, { "docid": "068c996291346cd5a690725c68b4526e", "score": "0.61759794", "text": "public function offsetExists($key)\n {\n return $this->has($key);\n }", "title": "" }, { "docid": "068c996291346cd5a690725c68b4526e", "score": "0.61759794", "text": "public function offsetExists($key)\n {\n return $this->has($key);\n }", "title": "" }, { "docid": "068c996291346cd5a690725c68b4526e", "score": "0.61759794", "text": "public function offsetExists($key)\n {\n return $this->has($key);\n }", "title": "" }, { "docid": "068c996291346cd5a690725c68b4526e", "score": "0.61759794", "text": "public function offsetExists($key)\n {\n return $this->has($key);\n }", "title": "" }, { "docid": "068c996291346cd5a690725c68b4526e", "score": "0.61759794", "text": "public function offsetExists($key)\n {\n return $this->has($key);\n }", "title": "" }, { "docid": "068c996291346cd5a690725c68b4526e", "score": "0.61759794", "text": "public function offsetExists($key)\n {\n return $this->has($key);\n }", "title": "" }, { "docid": "db0f882342c01dece946a44bb360c534", "score": "0.6175851", "text": "function multi_in_array($needle, $haystack, $key) {\n foreach ($haystack as $h) {\n if (array_key_exists($key, $h) && $h[$key]==$needle) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "f633bfef6450970680de424783f02f00", "score": "0.6169904", "text": "public function exists($key)\n {\n if (is_string($key) || is_integer($key)) {\n return array_key_exists($key, $this->index);\n }\n return false;\n }", "title": "" }, { "docid": "8919bf884269ba977a150f0de706692a", "score": "0.61690277", "text": "function getKeyByValueMultidim($array, $field, $value) {\n foreach($array as $key => $element)\n {\n if ( $element[$field] === $value )\n return $key;\n }\n return false;\n }", "title": "" }, { "docid": "3cd5245c4a42ba9ffdbb47276f17e500", "score": "0.61581504", "text": "public function offsetExists( $name ) {\n\t\treturn $this->has( $name );\n\t}", "title": "" } ]
a7fa90a69f0b8935947bd57e5f3074f3
Creates a new Advertise model. If creation is successful, the browser will be redirected to the 'view' page.
[ { "docid": "206203cc03961535ede49b103519808e", "score": "0.8078479", "text": "public function actionCreate()\n {\n $model = new Advertise();\n $image = new AdsAdvertiseImage();\n $share = new AdsShare();\n// $model->id = $model->created_by;\n $model->status = 1;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $share->ads_id = $model->id;\n $share->user_id = $model->created_by;\n $share->status = $model->status;\n $share->save();\n return $this->redirect(['view', 'id' => $model->id,]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'image' => $image,\n ]);\n }\n }", "title": "" } ]
[ { "docid": "e1107f18184dd56c74f5209ce033b313", "score": "0.72631294", "text": "public function create()\n {\n $data[\"title\"] = \"Create Advertisement\";\n return view('admin/ads/create',$data)->render();\n\n }", "title": "" }, { "docid": "afe3b4ea947de1e61d6226a2f39504b0", "score": "0.71748626", "text": "public function create()\n\t{\n\t\treturn view('admin.advertising.create');\n\t}", "title": "" }, { "docid": "1e1e1d6fa815cd5eff74be8327a5c7b0", "score": "0.7096528", "text": "public function create()\n {\n\t\t\n return view('admin.sys.ads.add');\n }", "title": "" }, { "docid": "4a45f07ef0fcd8227abbfe7d0f5c0980", "score": "0.70276123", "text": "public function create()\n {\n return view(\n 'advertisement.create',\n []\n );\n }", "title": "" }, { "docid": "36067fa0904ad71e40fdd30233964374", "score": "0.7025105", "text": "public function create()\n { //加载添加页面\n return view('admin.ads.add');\n }", "title": "" }, { "docid": "377750527309b46dacbca0c35980aa9e", "score": "0.7023361", "text": "public function create()\n {\n return view('admin.ads.create');\n }", "title": "" }, { "docid": "6c02b2b1fde44a6ef077913d9027312a", "score": "0.70056266", "text": "public function create()\n {\n return view('backend.ads.create');\n }", "title": "" }, { "docid": "809ae954d0e29c82f8e34ee1fe1abd3b", "score": "0.6976141", "text": "public function create()\n {\n return view('pages.admin.advertisement.create');\n }", "title": "" }, { "docid": "8b056e3f8f290d7e0af0ad5e02778899", "score": "0.69626814", "text": "public function create()\n {\n return view('ads.create');\n }", "title": "" }, { "docid": "e5c34e22c49f59980b4bcdf50ca84beb", "score": "0.69605774", "text": "public function create()\n {\n return view('advertisers.create');\n }", "title": "" }, { "docid": "512baa186d3cc3f3f0138866cb636f87", "score": "0.6930983", "text": "public function create()\n {\n return view('dashboard.ads.create');\n }", "title": "" }, { "docid": "80ad36c000d41eec80dd81cef06a2356", "score": "0.69048065", "text": "public function actionCreate()\n {\n $model = new VerifikasiTapd();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "5249ea01fdd57868ac1190692644548e", "score": "0.6786263", "text": "public function create()\n {\n return view('especialidads.create');\n }", "title": "" }, { "docid": "4dd390d038ce60cba02c1f125c3554a6", "score": "0.6782699", "text": "public function actionCreate()\n {\n $model = new CommercialAds();\n\n $model->scenario = CommercialAds::SCENARIO_CREATE;\n\n if ($model->load(Yii::$app->request->post()))\n {\n $model->top_ad = UploadedFile::getInstance($model, 'top_ad');\n $model->left_ad = UploadedFile::getInstance($model, 'left_ad') ;\n $model->right_ad = UploadedFile::getInstance($model, 'right_ad');\n $model->centre_ad = UploadedFile::getInstance($model, 'centre_ad');\n $model->bottom_ad = UploadedFile::getInstance($model, 'bottom_ad');\n\n $model->save();\n $model->upload();\n// return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "304dd48d70713396801060dc1f1dc22d", "score": "0.6777401", "text": "public function create()\n {\n\n return view('admin.ads.add_ads');\n }", "title": "" }, { "docid": "46cf79f3ddd591dac9c87c5e20f5d7fc", "score": "0.67368585", "text": "public function create()\n {\n return view('entidads.create');\n }", "title": "" }, { "docid": "50fb69d8eac0c7c38c3af10c79204e14", "score": "0.67282724", "text": "public function create()\n {\n \n \n return view('prioridads.create');\n }", "title": "" }, { "docid": "ca19e26e4c57d7d99e773934754f0dac", "score": "0.67038983", "text": "public function create()\n {\n $categories = Categoryadvt::all();\n //echo \"<pre>\";print_r($categories);exit;\n return view('admin.advertisement.create', [\n 'categories' => $categories\n ]);\n }", "title": "" }, { "docid": "57b477850fc399afde772f36d29669e6", "score": "0.67035234", "text": "public function create()\n {\n $data['is_edit'] = false;\n return view('ads::ads.create',$data);\n }", "title": "" }, { "docid": "7e8dd714146ff571588d10f369396ca9", "score": "0.6694872", "text": "public function actionCreate()\n {\n /* @var $modelAdTransport \\common\\models\\AdTransport */\n $modelAdTransport = new AdTransport(['scenario' => 'default']);\n\n if ($modelAdTransport->load(Yii::$app->request->post())) {\n $modelAdTransport = $modelAdTransport->checkForm($scenario = $modelAdTransport->model_scenario, $modelAdTransport);\n if($modelAdTransport->errors) {\n if(isset($modelAdTransport->errors['model_is']) && $modelAdTransport->errors['model_is']) {\n Yii::$app->session->setFlash('info', Yii::t('app', 'You already have such an ad.'));\n return $this->redirect(['/ad/view/complite', 'id' => $modelAdTransport->adCategory->adMain->id]);\n }\n return $this->render('create', [\n 'modelAdTransport' => $modelAdTransport,\n ]);\n } else {\n //dd('OK!!!');\n return $this->redirect(['view', 'id' => $modelAdTransport->id]);\n }\n }\n\n return $this->render('create', [\n 'modelAdTransport' => $modelAdTransport,\n ]);\n }", "title": "" }, { "docid": "5e9b8c5eba19c511345d0fb8834b32e2", "score": "0.66845995", "text": "public function actionCreate() {\n $model = new Advert();\n\n if ($model->load(Yii::$app->request->post())) {\n\n # Встановлюємо кінцеву дату публікації та користувача\n $model->end_publication = add_month(time());\n $model->user_id = Yii::$app->user->identity->id;\n $model->title = \\yii\\helpers\\Html::encode($model->title);\n $model->body = \\yii\\helpers\\HtmlPurifier::process($model->body);\n\n if ($model->save()) {\n // Завантажуємо файли якщо модель верифікована та збережена\n $model->imageFiles = UploadedFile::getInstances($model, 'imageFiles');\n $countImagesload = count($model->imageFiles);\n // перевіряємо кількість картинок\n if ($countImagesload > 5) {\n Yii::$app->session->setFlash('error', 'The maximum number of images can not be more 5!');\n return $this->redirect(['view', 'id' => $model->id]);\n }\n $flagMain = true;\n foreach ($model->imageFiles as $file) { // Перебираємо всі файли та зберігаємо\n if ($flagMain) {\n $this->saveResizeImage($model->id, $file->tempName, 1);\n $flagMain = false;\n }\n $this->saveResizeImage($model->id, $file->tempName);\n }\n return $this->redirect(['view', 'id' => $model->id]);\n } else { return 'fack advert!!!';}\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "21f5699107495032664ca0e3bc2a59ea", "score": "0.6657102", "text": "public function actionCreate()\n {\n $model = new Audiencia();\n\t\t$pessoa = new Pessoa();\n\t\t$tema = new Tema();\n\t\t\n\t\t\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \treturn $this->redirect(['configurar','id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "b2fbacad229df634cb3bed5d327139a5", "score": "0.6649194", "text": "public function create()\n {\n return view('pages.agency.create'); \n }", "title": "" }, { "docid": "bf7e3eb96e94d4dbd7f887d8233334b8", "score": "0.6633889", "text": "public function actionCreate()\n {\n /** @var ActiveRecord $model */\n $model = $this->getCrudService()->createModel();\n if ($model->load(\\Yii::$app->request->post()) && $this->getCrudService()->saveModel($model)) {\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "db70f1bca26d48c2c585a672927a6601", "score": "0.66004026", "text": "public function actionCreate()\n {\n if ($this->checkAdminSession()) {\n $model = new Catalogue();\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 }\n }", "title": "" }, { "docid": "bda5870e1857c276448bbac99f45a0ce", "score": "0.65508837", "text": "public function create()\n {\n $publisher_id = 22;\n return view('business.adv.add')->with(compact('publisher_id'));\n }", "title": "" }, { "docid": "469d3e9ebff1662db3ad3f4e38d4bd51", "score": "0.65453273", "text": "public function actionCreate()\r\n\t{\r\n\t\t$model=new website;\r\n\t\tif(isset($_POST['website']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['website'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('show','id'=>$model->id));\r\n\t\t}\r\n\t\t$this->render('create',array('model'=>$model));\r\n\t}", "title": "" }, { "docid": "4fa5e5386e37b3f73103b028593fd5f5", "score": "0.65397584", "text": "public function actionCreate()\n {\n $model = new Dosenfakultas();\n $model->scenario = \\app\\models\\DosenFakultas::SCENARIOCREATE;\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0196b141ca8a47e04912bd2f2fc019de", "score": "0.65372026", "text": "public function create()\n {\n $view =\"dashboard\" ;\n return view($view.'.ads.add',[\n 'active'=>'ads',\n 'title'=> \"Add Ads\",\n\n ]);\n }", "title": "" }, { "docid": "9189beceba2240e64f9d61b798d69b13", "score": "0.65348065", "text": "public function store()\n\t{\n\t\t$input = Input::except('_token');\n\t\t$id = Advertise::create($input)->id;\n\t\treturn Redirect::action('AdTypeMobileController@index')->with('message', 'tạo mới thành công');\n\t}", "title": "" }, { "docid": "7acbe9f6581593796302b5725a61a7d2", "score": "0.6532788", "text": "public function create()\n {\n return view('admin.advs.create');\n }", "title": "" }, { "docid": "b1d2315c56d98f0bd5bdf0f4e3c19281", "score": "0.65192115", "text": "public function actionCreate()\n {\n $model = new AdmissionForm();\n $model->language_id = Yii::$app->lang->defaultId;\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": "0e1f884a686615725f4036b7adeb9ceb", "score": "0.64968127", "text": "public function actionCreate()\n {\n $model = new Aluno();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "d9854dcbbe77e75664d15f129d3d713b", "score": "0.6457947", "text": "public function actionCreate()\n {\n $model = new TipoAcervo(); \n $request = Yii::$app->request;\n $tipoac = $request->post('TipoAcervo');\n $tipoac_id = $tipoac['tipoAcervo_id']; \n if ($tipoac_id == \"\")\n $model[\"tipoAcervo_id\"] = 0; \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": "c5eefae0356e960933feb03abfb3580a", "score": "0.64573365", "text": "public function actionCreate() {\n\t\t$model = new Ingerek;\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['Ingerek'])) {\n\t\t\t$model -> attributes = $_POST['Ingerek'];\n\t\t\tif ($model -> save())\n\t\t\t\t$this -> redirect(array('view', 'id' => $model -> id));\n\t\t}\n\n\t\t$this -> render('create', array('model' => $model, ));\n\t}", "title": "" }, { "docid": "d3ddb2830fb76d1f218ec813650cb807", "score": "0.6450301", "text": "public function create()\n {\n //\n\n return view('admin.banner.create');\n }", "title": "" }, { "docid": "2aaca6eacfc32faf02eea0cf0a62f610", "score": "0.6437874", "text": "public function actionCreate()\n {\n $model = new Avaria();\n\n $model->estado = 0;\n $model->data = date(\"Y-m-d H:i:s\");\n $model->idUtilizador = Yii::$app->user->identity->idUtilizador;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idAvaria]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "601beefc658893349d7b6acb84777630", "score": "0.64103097", "text": "public function store(CreateAdvertisementRequest $request)\n\t{\n\t $request = $this->saveFiles($request);\n\t\tAdvertisement::create($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.advertisement.index');\n\t}", "title": "" }, { "docid": "1fbf82d5b72bb180bb2d8c339d11b452", "score": "0.6391597", "text": "public function actionCreate()\n {\n $model = new Deseados();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "e547599e4293146c996e2d3db68920f2", "score": "0.6381348", "text": "public function create()\n\t{\n\t return view('admin.banner.create');\n\t}", "title": "" }, { "docid": "a7128baf9bc9ee352f4d7f22907f7249", "score": "0.6369282", "text": "public function actionCreate()\n\t{\n\t\t$model = new BannerItem();\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\tif ($model->isNewRecord) {\n\t\t\t\t$model->click_count = 0;\n\t\t\t\t$model->max_click = 0;\n\t\t\t\t$model->status = BannerItem::STATUS_VERIFICATION;\n\t\t\t\t$model->id_user = Yii::$app->user->id;\n\t\t\t\t$model->size = 12;\n\t\t\t\t$model->start = date('Y-m-d H:i:s');\n\t\t\t\t$model->save();\n\t\t\t\tCommonQuery::sendCreateBannerEmail($model);\n\t\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t\t'advert' => BannerAdv::find()->where(['status' => BannerAdv::STATUS_ACTIVE])->asArray()->all(),\n\t\t\t\t'blocks' => Banner::find()->where(['status' => Banner::STATUS_ACTIVE])->asArray()->all(),\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "f1a675afba3949d703510574f297c6fb", "score": "0.6368323", "text": "public function create()\n\t{\n\t \n\t $position = [''=>'-------Please choose--------','top'=>'Top','bottom'=>'Bottom'];\n\t $pgs = $this->genre();\n\t return view('admin.advertisement.create',compact('position','pgs'));\n\t}", "title": "" }, { "docid": "1c1058dd58b0283f430079d269b9d7b5", "score": "0.6364317", "text": "public function create()\n {\n //\n return view('admin.aucation.create');\n }", "title": "" }, { "docid": "52058d985bae5c3002fc213d4b3b3099", "score": "0.6361173", "text": "public function actionCreate() {\n $model = new Vehiculo;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Vehiculo'])) {\n $model->attributes = $_POST['Vehiculo'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "1a934a8fc4bccaad5a7edc2430d1c772", "score": "0.63524544", "text": "public function actionCreate()\n\t{\n\t\t$model = new Dmpaper;\n\t\t$model->save();\n\n\t\treturn $this->redirect(['update', 'id' => $model->id]);\n\n\t\t/*if ($model->load($_POST) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}*/\n\t}", "title": "" }, { "docid": "3b38b980c6e4da4142094de41a383b1d", "score": "0.6345788", "text": "public function actionCreate()\n {\n $model = new Direccion();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "34676db0a1c3ecae43ffe78f690b9ad9", "score": "0.6344115", "text": "public function actionCreate()\n {\n $model = new Agenda();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_agenda]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "88a3bbbc95f8459aab76342cddfc8195", "score": "0.634232", "text": "public function create()\n {\n return view('About_banner.create'); \n }", "title": "" }, { "docid": "3b5e0d5c98432626f63a4fff6a23ef56", "score": "0.6331045", "text": "public function actionCreate()\n {\n $model= $this->finder->create();\n \n if(isset($model->A_id)){\n return $this->redirect(['view','A_id' => $model->A_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "317759c91f097fb793f5e4636109fab2", "score": "0.63292336", "text": "public function actionCreate()\n {\n $model = new Object();\n// echo '<pre>';\n//var_dump($model->attributes);\n//die;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id, 'lang_id'=>$model->language]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "0e1e8f5e46903df14e934e72552b1c09", "score": "0.63242674", "text": "public function actionAdd()\n {\n $model = new AddForm();\n $ad = new Ads;\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\n $ad -> phone = $model -> phone;\n $ad -> title = $model -> title;\n $ad -> text = $model -> text;\n $ad -> insert();\n\n return $this->render('add', ['model' => $model, 'ok' => true]);\n } else {\n return $this->render('add', ['model' => $model]);\n }\n }", "title": "" }, { "docid": "dc437db241c9c8d1236abe90b4ea2d34", "score": "0.6321831", "text": "public function create()\n {\n return view('googleads.create');\n }", "title": "" }, { "docid": "8bb8eeb8acb5550cd0a131fb2d50d2a5", "score": "0.6311485", "text": "public function create()\n { \n if (Auth::check()) {\n if (Auth::user()) {\n $user = Auth::user();\n $ads = Advertising::where('user_id', $user->id)->first();\n if ($ads) {\n $start = date_create($ads->start);\n $done = date_create($ads->done);\n $now = date_create();\n $sisa = date_diff($done,$now);\n return view('ads.create', compact('ads','user','sisa'));\n }\n return view('ads.create', compact('ads'));\n }\n }else{\n return view('ads.create');\n }\n\n }", "title": "" }, { "docid": "926ae19e9b49f54e405275426cc4a37b", "score": "0.6304083", "text": "public function actionCreate()\n {\n $model = new Goods();\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": "2cc03893828aaed78799696f4637bfce", "score": "0.6299103", "text": "public function actionCreate() {\n $model = new Appoint;\n $Masuser = new Masuser();\n $Profile = $Masuser->GetProfile();\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n if (isset($_POST['Appoint'])) {\n $model->attributes = $_POST['Appoint'];\n $model->user_id = $Profile['user_id'];\n if ($model->save()) {\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "1f0bda608b09306bc958fca06f7a0f19", "score": "0.6292465", "text": "public function create()\n {\n return view('admin.ads.ad_category.create');\n }", "title": "" }, { "docid": "c4d11507b6028774027fb938c02b56d6", "score": "0.6288527", "text": "public function actionCreate()\n\t{\n\t\t$model=new Campaign;\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['Campaign']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Campaign'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "9bb1dc0958aff5ef2f9ddf1d0415ae96", "score": "0.6275996", "text": "public function actionCreate()\n {\n $model = new Coleta;\n\n try\n {\n if ($model->saveWithRelated($_POST))\n {\n return $this->redirect(Url::previous());\n } elseif (!\\Yii::$app->request->isPost)\n {\n $model->load($_GET);\n }\n } catch (\\Exception $e)\n {\n $msg = (isset($e->errorInfo[2])) ? $e->errorInfo[2] : $e->getMessage();\n $model->addError('_exception', $msg);\n }\n return $this->render('create', ['model' => $model,]);\n }", "title": "" }, { "docid": "4a3ff56d6f6105605fe067f40ea8ad98", "score": "0.6273266", "text": "public function create()\n\t{\n\t\treturn View::make('ilan.ads');\n\t}", "title": "" }, { "docid": "5efb5ca736199616cf014edfa60d2b09", "score": "0.6272738", "text": "public function create() {\n\t\t$adv = $this->advs;\n\t\treturn view('badha.advs.form', compact('adv'));\n\t}", "title": "" }, { "docid": "3b80971f3317faba7abdf6478718e538", "score": "0.6257696", "text": "public function actionCreate() {\n $model = new Brand();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "b1df2a060c59e3d457de43c34dd7d10f", "score": "0.62571555", "text": "public function create()\n {\n return view('admin.banner.create');\n }", "title": "" }, { "docid": "b1df2a060c59e3d457de43c34dd7d10f", "score": "0.62571555", "text": "public function create()\n {\n return view('admin.banner.create');\n }", "title": "" }, { "docid": "ab380d70ab71d75200a45aab2e887b9b", "score": "0.6251277", "text": "public function create()\n {\n return view('admin.banner-create');\n }", "title": "" }, { "docid": "996b2aaf5e503fe98322feda4419aa6e", "score": "0.62471664", "text": "public function actionCreate()\n\t{\n\t\t$model=new TermekArak;\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['TermekArak']))\n\t\t{\n\t\t\t$model->attributes=$_POST['TermekArak'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "011b4db967dd9565926152a90d64dc80", "score": "0.62412226", "text": "public function actionCreate()\n {\n $model = new Admin();\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": "eba97298eb790b5d3d51ba52458eba36", "score": "0.6238857", "text": "public function actionCreate()\n\t{\n\t\t$model=new GalleryAlbums;\n\t\tif(isset($_POST['GalleryAlbums']))\n\t\t{\n\t\t\t$model->attributes=$_POST['GalleryAlbums'];\n\t\t\tif($model->save())\n $this->redirect(array('blog/galleries','gaid'=>$model->id,'username'=>$this->_user->username));\n\t\t}\n\t\t$this->render('create',array('model'=>$model));\n\t}", "title": "" }, { "docid": "a14e34933596e9af18260c4dbe5f067e", "score": "0.6238628", "text": "public function actionCreatead() {\n\n //Fetching product categories\n $items = ArrayHelper::map(Productcategory::find()->all(), 'categoryId', 'categoryName');\n $model = new Adsinfo();\n $upmodel = new UploadForm();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->save();\n $upmodel->file = UploadedFile::getInstance($upmodel, 'file');\n if($upmodel->file) {\n\n $appendWithProductName= Adsinfo::find()\n ->where(['adId' => Adsinfo::find()->max('adId')])\n ->one();\n $randomInteger = rand(1000,100000);\n //Making a unique name for image\n $imageName = \"{$appendWithProductName->adId}xxx{$randomInteger}\"; \n $upmodel->save();\n $upmodel->file->saveAs('uploads/'.$imageName.'.'.$upmodel->file->extension);\n $model->productImage = 'uploads/'.$imageName.'.'.$upmodel->file->extension;\n }\n //replace the following value with the logged in user id, once the login completes\n $model->userId = Yii::$app->user->id;\n $model->save();\n if($model->save()) {\n // redirect\n return Yii::$app->response->redirect(Url::to(['user/myads',\n ]));\n }\n\n }else {\n return $this->render('createad', [\n 'model' => $model, \n 'items'=> $items,\n 'upmodel' => $upmodel,\n ]);\n }\n\n }", "title": "" }, { "docid": "04e6753a6bdb949a663311298ebc39fc", "score": "0.6236922", "text": "public function create()\n {\n return view('doc_identidads.create');\n }", "title": "" }, { "docid": "9e41bead92c6dbb9514ef93c67ca65ba", "score": "0.62368554", "text": "public function actionCreate()\n {\n $model = new Vacosa();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash('success', [\n 'title' => 'Sucesso!',\n 'text' => 'Registro salvo com sucesso!',\n 'type' => 'success',\n 'timer' => 30000,\n 'showConfirmButton' => false\n ]);\n return $this->redirect(['/vacosas']);\n } else {\n $model->status = 1;\n $model->responsavel_id = Yii::$app->getUser()->getIdentity()->getId();\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "41cf3e7b6dcc7a40f4051120850ca472", "score": "0.62365806", "text": "public function create()\n {\n $pays=pays::all();\n $option=Option::all();\n return view(\"Admin.Hotel.create\",compact(\"pays\",\"option\"));\n }", "title": "" }, { "docid": "68dd68c665de33a1641ef82621d74473", "score": "0.62361854", "text": "public function actionCreate()\n {\n $model = new Articles();\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "b7fa6e7fc2fcd6e496bcafacfd2621d9", "score": "0.6208589", "text": "public function actionCreate()\n {\n $model = new Banner();\n $model->status = true;\n // 'created_at', 'updated_at', 'userCreated', 'userUpdated'\n\n $model->created_at = $model->updated_at = time();\n $model->userCreated = $model->userUpdated = Yii::$app->user->id;\n\n if ($model->load($post = Yii::$app->request->post()) ) {\n $hostInfo =Yii::$app->request->hostInfo;\n $model->image = str_replace($hostInfo, \"\", $post['Banner']['image']);\n // echo '<pre>';print_r($post);die;\n if ($post['Banner']['url'] !='') {\n $model->url = str_replace($hostInfo,\"\",$post['Banner']['url']);\n }\n $cache = new CacheWebsite();\n $cache->updateCache('cache_website_banner');\n\n if($model->save()){\n Yii::$app->session->setFlash('messeage', \"Bạn đã sửa banner $model->name thành công !\");\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "57249f298179cb3aa9b9d85876bc22a9", "score": "0.6195866", "text": "public function create()\n {\n //\n $url = \"akun_insert\";\n return View('master.akun.form',compact('url'));\n }", "title": "" }, { "docid": "933e648455cc7474dd6585d5e995bb07", "score": "0.6190006", "text": "public function store()\n {\n $ad = Ad::create($this->validateRequest());\n return redirect('recitals/ads');\n }", "title": "" }, { "docid": "b41babdf08126731be5835c0bed9b8a0", "score": "0.6188707", "text": "public function create()\n {\n $webpages = Webpage::all();\n return view('ads.create',compact('webpages'));\n }", "title": "" }, { "docid": "4aa6e64b596f557b3aa30d9ffcfbf4a2", "score": "0.6184741", "text": "public function actionCreate()\n {\n $model = new AwIndividualActive();\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": "3fdec7a402e7c81b4cb52b52bda70531", "score": "0.618429", "text": "public function actionCreate()\n {\n /* @var $user User */\n $model = new Actividad();\n $user =User::findOne(Yii::$app->user->id);\n $aplicaciones = ArrayHelper::map($user->aplicacionesDb,'id','nombre');\n if ($model->load(Yii::$app->request->post())) {\n $model->setHorasHombre();\n $model->setOrganizacion();\n $model->setEmpresa();\n if($model->save()){\n $model->reajustarCodigos();\n return $this->redirect(['view', 'id' => $model->id_actividad]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'aplicaciones'=>$aplicaciones,\n ]);\n }\n }", "title": "" }, { "docid": "bf86c04002c719a5030e986f99fdbc10", "score": "0.6183069", "text": "public function create()\n {\n $debate_category = DB::table('debate_category')->where([['status', '=', 'live'], ['partner_id', '=', Auth::user()->id],])->get();\n \n return view('admin.ads.create', compact('debate_category'));\n }", "title": "" }, { "docid": "5f2856659d7530c8685f2a8967d8e622", "score": "0.6181761", "text": "public function create()\n {\n return view('backend.banner.create');\n }", "title": "" }, { "docid": "629a9b5d2902131f42b1092d713f780c", "score": "0.6177339", "text": "public function actionCreate()\n {\n $model = new Mahasiswa();\n\n $referrer = Yii::$app->request->referrer;\n\n if ($model->load(Yii::$app->request->post())) {\n\n $referrer = $_POST['referrer'];\n\n if($model->save()) {\n Yii::$app->session->setFlash('success','Data berhasil disimpan.');\n return $this->redirect($referrer);\n }\n\n Yii::$app->session->setFlash('error','Data gagal disimpan. Silahkan periksa kembali isian Anda.');\n\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'referrer'=>$referrer\n ]);\n\n }", "title": "" }, { "docid": "1e8a3e375a826e52228b7a0ad17b60f6", "score": "0.617485", "text": "public function getCreate()\r\n {\r\n $types = Type::all();\r\n $packages = Package::all();\r\n $areas = Area::all();\r\n return view('merchant.advertise.create',compact('types','packages','areas'));\r\n }", "title": "" }, { "docid": "a9df99ed0904cc5aaee4c451eb1c7151", "score": "0.61747086", "text": "public function actionCreate()\n {\n $model = new Vypusk81();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "7117afe4d53df885e9fa46bc4e407683", "score": "0.615723", "text": "public function actionCreate() {\n $model = new Diabetes();\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": "5189cf11dc05eb98eed92ebebaaa02d4", "score": "0.6150264", "text": "public function actionCreate()\n {\n \t$model = new SignupForm();\n\n if ($model->load(Yii::$app->request->post())) \n {\n \tif($model= $model->signup())\n \t{\n \t\treturn $this->redirect(['view', 'id' => $model->id]);\n \t} \n } \n return $this->render('create', ['model' => $model,]);\n }", "title": "" }, { "docid": "ace3f252f06818bc4ce0707016558044", "score": "0.614976", "text": "public function actionCreate()\n {\n $model = new Article();\n\n $request=Yii::$app->request;\n\n if ($request->isPost) {\n $model->load($request->post());\n\n $model->img_list=UHelper::uploadImg('img_list');\n\n $model->img_title=UHelper::uploadImg('img_title');\n\n if($model->save()){\n UHelper::alert($model->title.'新增成功!可继续添加','success');\n }else{\n UHelper::alert('新增失败!','error');\n }\n\n return $this->redirect($request->referrer);\n\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "9cf25016b54e97a79565d6392fbe86cc", "score": "0.6145989", "text": "public function actionCreate() {\n $viewData = Article::createArticle();\n if ($viewData === true) {\n return $this->redirect(['index']);\n }\n return $this->render('_form', $viewData);\n }", "title": "" }, { "docid": "adf3e3ffba18788471dc86a3760ff248", "score": "0.61442727", "text": "public function create()\n\t{\n\t\treturn view('banners.create');\n\t}", "title": "" }, { "docid": "fbdaf8833780ee71ac87b90c4e77bb67", "score": "0.61418307", "text": "public function actionCreate()\n\t{\n\t\t$model = new Offer;\n\n\t\ttry {\n if ($model->load($_POST) && $model->save()) {\n return $this->redirect(Url::previous());\n } elseif (!\\Yii::$app->request->isPost) {\n $model->load($_GET);\n }\n } catch (\\Exception $e) {\n $msg = (isset($e->errorInfo[2]))?$e->errorInfo[2]:$e->getMessage();\n $model->addError('_exception', $msg);\n\t\t}\n return $this->render('create', ['model' => $model,]);\n\t}", "title": "" }, { "docid": "be7ebfb35357710c8b5fc2da245f7238", "score": "0.6136999", "text": "public function actionCreate()\n {\n $model = new Store();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "58184e7355522fe6732abdbc5679f1da", "score": "0.6133874", "text": "public function create()\n {\n $banner = Banner::all();\n return view('backend.banner.create', [\n 'data'=>$banner\n ]);\n }", "title": "" }, { "docid": "63e726abec82f0e578d271f2059df3ef", "score": "0.6133171", "text": "public function actionCreate()\n {\n $model = new Accounttransaction();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->account_transaction_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "1360904b509c72861b9df134876f1e83", "score": "0.6130375", "text": "public function actionCreate()\n {\n $model = new Alquileres();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "e40ac904838d7c9e9dd50760cfa0703c", "score": "0.61253583", "text": "public function actionCreate()\n {\n $this->layout = Auth::getRole();\n $model = new Pengaduan();\n $model->tgl_submit = date(\"Y-m-d\");\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_pengaduan]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "0b16d6073f245d72f9b40a997ec1ae3f", "score": "0.61241263", "text": "public function actionCreate()\n {\n $model = new CompanyCategroy();\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": "a82e4a1041045fe401305e9e4b3855d4", "score": "0.61202204", "text": "public function actionCreate()\n\t{\n\t\t$model=new AJUSTES;\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['AJUSTES']))\n\t\t{\n\t\t\t$model->attributes=$_POST['AJUSTES'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->CIFEmpresa));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "8ed23165cc6bba35f64ba4d1f1414083", "score": "0.61194825", "text": "public function actionCreate() {\n $model = new Client;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Client'])) {\n $model->attributes = $_POST['Client'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('/client/create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "ab1eeb60887768a552ba76e7e7eff092", "score": "0.61163104", "text": "public function actionCreate()\n {\n $model = new Mahasiswa();\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": "09fab99adf688ea100aa90694eab5889", "score": "0.611396", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "a5fe119ff2fb9411bf1a9ae134e2289b", "score": "0.6113929", "text": "public function actionCreate()\n {\n $model = new AuthItem();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" } ]
15b6acc984a377d8ae0f324666da3f5d
Add a new item
[ { "docid": "3180c4c9b2240f2d1ef0cfc7d9776f64", "score": "0.0", "text": "public function add()\n\t{\n\t\t$data = $this->input->post(null, true);\n\t $res = $this->x->insert_jadwal($data);\n\t if($res>=1){\n\t $this->session->set_userdata('proses','berhasil');\n\t redirect('j');\n\t }\n\t else{\n\t $this->session->set_userdata('gagal_proses','gagal');\n\t redirect('j');\n\t }\n\t}", "title": "" } ]
[ { "docid": "ccabe41dd06edee2deee88e407641d2d", "score": "0.86649007", "text": "public function add( $item );", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.86428094", "text": "public function add($item);", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.86428094", "text": "public function add($item);", "title": "" }, { "docid": "778ee561e64c5be36668b854a801e171", "score": "0.8501721", "text": "public function addItem(Item $item) {}", "title": "" }, { "docid": "78128c97e80f679637ad8b4a3305bdd4", "score": "0.84137833", "text": "public function addItem(Item $item);", "title": "" }, { "docid": "b79968fce47aa4149713aaaf33584d5e", "score": "0.8202427", "text": "protected function addItem() {\n\n }", "title": "" }, { "docid": "f640ac37d04fe37618c0ae1b8bfd40af", "score": "0.8196312", "text": "abstract protected function addItem($item);", "title": "" }, { "docid": "91dbdba86a525fa9f888c9917ba6fbc3", "score": "0.8005429", "text": "public function add($item){\n $this->validateItem($item);\n $this->items[] = $item;\n }", "title": "" }, { "docid": "377b9431ee680643912e4b03d23109d0", "score": "0.7794834", "text": "abstract public function addItemById($id);", "title": "" }, { "docid": "aabbd53f814a1dc1b5327dc71b8a58e3", "score": "0.77161056", "text": "function AddItem($item) {\n\t\t$this->ItemData[] = $item;\n\t}", "title": "" }, { "docid": "a01e513d0270940ba2507032796aa090", "score": "0.7701582", "text": "function AddItem($item) {\r\n\t\t$this->ItemData[] = $item;\r\n\t}", "title": "" }, { "docid": "f5c07e0dd8056ad614140dad84bf37eb", "score": "0.7677097", "text": "public function add($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "f5c07e0dd8056ad614140dad84bf37eb", "score": "0.7677097", "text": "public function add($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "afc568008dedb13731224c69b9580217", "score": "0.7599609", "text": "public function addItem($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "8cb18f93b0974299f4d3acbd21bff01c", "score": "0.750549", "text": "public function add( $item_id, $quantity = 1, array $data = NULL );", "title": "" }, { "docid": "acfd89a136265658a8a35f86e467c2f6", "score": "0.74730587", "text": "public function AddItem($item) {\n $this->_item[] = $item;\n }", "title": "" }, { "docid": "e0bdc31803fe9933cabb5c67ec69a91e", "score": "0.7453253", "text": "public function addItemAction(){\n $this->isEnabled();\n if($this->prDispatch()){\n $this->_redirect('*/index/');\n return;\n }\n if($this->_getHelper()->checkIsValidList()){\n Mage::getSingleton('core/session')->addError('Você não possui listas criadas, crie uma lista');\n $this->_redirect('*/index/', array('login'=>1));\n return;\n }\n \n $productId = $this->getRequest()->getParam('id');\n if(!empty($productId)){\n Mage::getModel('jbp_giftlist/item')->saveData($productId);\n $this->_redirectUrl(Mage::getSingleton('core/session')->getLastUrl());\n return;\n }\n $this->_redirect('/');\n }", "title": "" }, { "docid": "36f746f2b555a18e70120bc6f5eefb18", "score": "0.7434538", "text": "public function Add($item)\r\n {\r\n $this->Insert($this->Count, $item);\r\n }", "title": "" }, { "docid": "985f3ebced9c99aaf8a7b53884a5122e", "score": "0.7432104", "text": "public function add($key, $item = null);", "title": "" }, { "docid": "58ef89ed09d4d28d364d7deee3b8dd0f", "score": "0.74219626", "text": "public function add($id,$item,$qty,$option=null);", "title": "" }, { "docid": "b756a2f3e361ddb02c1b2c5615c1329a", "score": "0.7412757", "text": "private function createNewItem() {\n\t\t$item = new Item();\n\t\t// add data and check if it is shown in the form\n\t\t$item->setLabel( 'de', 'foo' );\n\t\t$item->setDescription( 'de', 'foo' );\n\t\t$item->setAliases( 'de', array( 'foo' ) );\n\n\t\t// save the item\n\t\t$store = WikibaseRepo::getDefaultInstance()->getEntityStore();\n\t\t$store->saveEntity( $item, \"testing\", $GLOBALS['wgUser'], EDIT_NEW | EntityContent::EDIT_IGNORE_CONSTRAINTS );\n\n\t\t// return the id\n\t\treturn $item->getId()->getSerialization();\n\t}", "title": "" }, { "docid": "56711d747a11dfe50385f6dfa067986f", "score": "0.739455", "text": "public function addItem($item) {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "df0d99333846fe2251aa1e126b58b048", "score": "0.7392337", "text": "function addItem()\n {\n $this->global['pageTitle'] = \"新增赛事\";\n $this->loadViews(\"newseventadd\", $this->global, NULL);\n }", "title": "" }, { "docid": "f4088e721300c07c6c40b7a5b381f2aa", "score": "0.72883946", "text": "public function addItem($item) {\n\t $this->itemCounter++;\n\t $this->items_array[] = $item;\n\t}", "title": "" }, { "docid": "55dc692a310ab0746088c7726a083c08", "score": "0.72714585", "text": "public function insertItem($item) {\n\t\t$this->items[$item->idItem] = $item;\n\t}", "title": "" }, { "docid": "e2ae15d02fd3fd16334949e1bd9b0e1f", "score": "0.7207099", "text": "public function addItem()\n {\n if (empty($_REQUEST['item-name']) || empty($_REQUEST['list-id'])) {\n return false;\n }\n $list_id = (int)$_REQUEST['list-id'];\n $name = $_REQUEST['item-name'];\n $user_id = $this->etmsession->get('iduser');\n\n if($this->ValidateRequest->checkStockListOwnership($list_id, $this->user_id)) {\n $res = $this->StockLists_model->insertItem($name, $list_id);\n echo json_encode($res);\n } else {\n echo json_encode(array(\"notice\" => \"error\", \"message\" => Msg::INVALID_REQUEST));\n }\n }", "title": "" }, { "docid": "e614081e90246f539cdb9472b8a40ff2", "score": "0.72048795", "text": "public function add (Item $item): void\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "8f2c4a9466b17adfbdaa4df1e387bdb3", "score": "0.7189647", "text": "public function insert($item);", "title": "" }, { "docid": "cc74db4ec4642e88aa41e56ea30b425b", "score": "0.7164854", "text": "public function add($item)\n {\n $this->addArray('items', $item, array('ButtonContainer', 'Collapsible', 'Checkbox', 'Email', 'HiddenField', 'Label', 'Password', 'Phone', 'RadioButtons', 'SelectMenu', 'TextInput', 'TextArea', 'Upload', 'Heading', 'HTML', 'Image', 'Table'));\n }", "title": "" }, { "docid": "abb514cf8d1f6de56f57bcf233577d4d", "score": "0.7150423", "text": "public function add(){}", "title": "" }, { "docid": "c2f9f380d35f6d6aa6c68d56aa0bd44e", "score": "0.7119007", "text": "public function AddItem($item)\n {\n array_push($this->items, $item);\n }", "title": "" }, { "docid": "3aae774409791d6ec310bbfffb48bc7b", "score": "0.7078769", "text": "public function add_item($item) {\n $new_item = htmlspecialchars(strip_tags($item));\n array_push($this->items, $new_item);\n $this->save_file();\n }", "title": "" }, { "docid": "e5fe8b7c5b62112a153d91002f3841e9", "score": "0.70680946", "text": "public function add_item($item) {\n\t\t$new_item = htmlspecialchars(strip_tags($item));\n\t\tarray_push($this->items, $new_item);\n\t\t$this->save_file();\n\t}", "title": "" }, { "docid": "b4335a3490ca4c8eb0e6989e053e3014", "score": "0.7061558", "text": "public function add(string $item, $value);", "title": "" }, { "docid": "7e5ee9e7fd7b7ed18c5fbecba2f59ab1", "score": "0.7053896", "text": "public function add(Item $item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "af801c313bae145dde394fc044788e77", "score": "0.70496327", "text": "public function add($name, $item)\n {\n $this->items[$name] = $item;\n }", "title": "" }, { "docid": "36a4ae8fdf1e9434b503c14c6b545c5f", "score": "0.7046815", "text": "public function add();", "title": "" }, { "docid": "6ed1266e9b02e2eb8632413eb1a3c4c1", "score": "0.7037751", "text": "public function test_add_new_item()\n\t{\n\t\t$basket = new Model_Basket;\n\n\t\t$item = $this->get_item();\n\t\t$basket->add_item($item);\n\n\t\t$this->assertSame($basket->item_count(), 1);\n\t}", "title": "" }, { "docid": "861fac0cd6845c7ea2520c35ffa22a92", "score": "0.7016843", "text": "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增品牌';\n $this->global['pageName'] = 'product_brand_add';\n $this->global['typelist'] = $this->product_util_model->getProductTypeList();\n\n if (empty($_POST)) {\n $this->loadViews(\"product_manage/product_brand_add\", $this->global, NULL, NULL);\n } else {\n $this->product_format_validate();\n }\n }\n }", "title": "" }, { "docid": "ce1f20fdf78e1b7a16cf5e81e1e2c43b", "score": "0.7010938", "text": "function add_item($new_item) {\r\n if (!is_a($new_item, \"google_sitemap_item\")) {\r\n //Stop execution with an error message\r\n trigger_error(\"Can't add a non-google_sitemap_item object to the sitemap items array\");\r\n }\r\n $this->items[] = $new_item;\r\n }", "title": "" }, { "docid": "36330d15b4b496916b9e127bcff48bf2", "score": "0.69900495", "text": "public function add($item, $id){\n $storedItem = ['qty' => 0, 'price'=>$item->price, 'item'=>$item]; //Creating an associative array for the Stored Item\n\n //Check if the added item already exists in the array //Cart// and overwrite it to only keep a product once. //instead of multiple times.\n if ($this->items) {\n if (array_key_exists($id , $this->items)) {\n $storedItem = $this->items[$id];\n }\n }\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice+= $item->price;\n }", "title": "" }, { "docid": "96deac14c0c06422a0ada6588caeec31", "score": "0.69881785", "text": "public function add($item, $id)\n {\n $storedItem = ['qty' => 0, 'price' => $item->price, 'item' => $item];\n\n if ($this->items) {\n if (array_key_exists($id, $this->items)) {\n $storedItem = $this->items[$id];\n }\n }\n\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice += $item->price;\n }", "title": "" }, { "docid": "705a8232591bccae66404d31f8bea10b", "score": "0.69878536", "text": "public function add($param){\n //$param[1] : number of item\n $cart = HTP_Session::get('cart');\n if(isset($cart[$param[0]])){\n $cart[$param[0]]->setNumbers($cart[$param[0]]->getNumbers() + $param[1]);\n }else{\n $item = new Item;\n $product = Products::model()->find('id = :id', array(':id' => $param[0]));\n $item->setProduct($product);\n $item->setNumbers($param[1]);\n $cart[$product->id] = $item;\n }\n HTP_Session::set('cart', $cart);\n $this->redirect(HTP::$baseUrl . '/cart');\n }", "title": "" }, { "docid": "576d58f3e2e7e6735044eca56c4cb2d5", "score": "0.6978205", "text": "function add($item)\n {\n $producto = new producto();\n\n $producto->nuevoProducto($item);\n //$this->json_encode(array('mensaje' => '¡Nuevo Producto Registrado!'));\n return 0;\n }", "title": "" }, { "docid": "2f992069b6765d11a11aa53949f6d7f3", "score": "0.69768614", "text": "public function testAddItem()\n {\n $item = $this->createItem();\n\n $data = $this->getItemData();\n $data['product_id'] = $item->product_id;\n\n $this->json('POST', 'api/v1/basket/items', $data)\n ->assertStatus(201)\n ->assertJson([\n 'quantity' => $item->quantity + $data['quantity']\n ]);\n }", "title": "" }, { "docid": "f4cebb4274a8d5166c5205139c84d25c", "score": "0.69480956", "text": "public function add(){ }", "title": "" }, { "docid": "da64489d3b79051540b45c53b047c1a8", "score": "0.6944063", "text": "public function addItem(OrderItemInterface $item);", "title": "" }, { "docid": "40a00aba831f8e2888958399bd1c178f", "score": "0.69212496", "text": "public static function addRiverItem($event, $type, $item) {\n\t\t$svc = self::getInstance();\n\t\t$svc->getTable()->insert($item);\n\t}", "title": "" }, { "docid": "69cf23303278c6cef6cbf12b42ad54ae", "score": "0.69062746", "text": "public function add() {\n\t\t$this->_add ();\n\t}", "title": "" }, { "docid": "335df0a7434a917c0e2e90b893001aa6", "score": "0.6901716", "text": "public function add(string $itemName, string $userId): void;", "title": "" }, { "docid": "ac1b655199c809d0ca8f89e38b79040a", "score": "0.6886954", "text": "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增商品';\n $this->global['pageName'] = 'product_add';\n $this->global['typelist'] = $this->product_util_model->getProductTypeList();\n\n if(empty($_POST)){\n $data['empty'] = NULL;\n\n $this->loadViews(\"product_manage/product_add\", $this->global, $data, NULL);\n }else{\n $this->product_validate();\n }\n }\n }", "title": "" }, { "docid": "10d1cf2f38ca0284a2cb0bee885640c9", "score": "0.68851537", "text": "public function add($item) {\n\t\tarray_push($this->queue, $item);\n\n\t\tif ($this->saveOnChanges == true) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "91f4b98bd53cf30a8cb0c6284f250d2f", "score": "0.6871817", "text": "function add($order_num, $item) {\n $this->Orders->add_item($order_num, $item);\n redirect('/order/display_menu/' . $order_num);\n }", "title": "" }, { "docid": "da03f41764433d3f398b790d22e3d03e", "score": "0.6871355", "text": "public function add(array $item): void;", "title": "" }, { "docid": "18fab77494c4d7d18ed4ad31b9573280", "score": "0.68692243", "text": "public function insertItem($itemData);", "title": "" }, { "docid": "a4a5e8dda882cbb646514af9210420b2", "score": "0.6853619", "text": "public function add()\r\n {\r\n\r\n }", "title": "" }, { "docid": "5d5e1c31b24549e5dd098df4c61275d0", "score": "0.6841849", "text": "public function addItem($id,$product){\n if(array_key_exists($id,$this->items)){\n\n $productToAdd = $this->items[$id];\n $productToAdd['quantity']++;\n \n\n\n //first time to add this product to cart\n }else{\n\n $productToAdd = ['quantity'=> 1, 'data'=>$product];\n\n\n }\n\n $this->items[$id] = $productToAdd;\n $this->totalQuantity++;\n \n\n }", "title": "" }, { "docid": "6bc69566099ceb538d4eae89ab7efe53", "score": "0.68323714", "text": "function add_item($num, $code) {\n $CI = &get_instance();\n \n // If an item of the given type already is already ordered, update it's quantity.\n if ($CI->orderitems->exists($num, $code)) {\n $record = $CI->orderitems->get($num, $code);\n $record->quantity++;\n $CI->orderitems->update($record);\n }\n // If no item of the given type is already ordered, add a new one to the order.\n else {\n $record = $CI->orderitems->create();\n $record->order = $num;\n $record->item = $code;\n $record->quantity = 1;\n $CI->orderitems->add($record);\n }\n }", "title": "" }, { "docid": "412fd5a356c26db50bb3babeaa387b87", "score": "0.6830156", "text": "function pxl_shop_cart_add_item($item) {\n $shopping_cart_items = &pxl_shop_session_data()['cart']['items'];\n $shopping_cart_items[$item->id] = $item;\n}", "title": "" }, { "docid": "84e3b418cd44310ed6a179996db2e836", "score": "0.68290436", "text": "function add() {\n\t\t\n\t\t$id = isset($this->passedArgs['id']) ? $this->passedArgs['id'] : -1;\n\t\t$qty = isset($this->passedArgs['qty']) ? $this->passedArgs['qty'] : 1;\n\t\t$retail = isset($this->passedArgs['retail']) ? $this->passedArgs['retail'] : 0;\n\t\t$storeNumber = isset($this->passedArgs['store']) ? $this->passedArgs['store'] : 1;\n\t\t$url = isset($this->passedArgs['url']) ? $this->passedArgs['url'] : null;\n\t\t\n\t\tif ($this->RequestHandler->isPost()) {\n\t\t\t\n\t\t\t$this->__addPost();\n\t\t} else {\n\t\t\t\n\t\t\tif ($this->__addProductsToCart($id, $qty, $retail, $storeNumber, null)) {\n\t\t\t\t\n\t\t\t\tif ($url != null) {\n\t\t\t\t\t$this->redirect(\"/$url\");\n\t\t\t\t} else {\n\t\t\t\t\t$this->redirect(array('plugin' => 'kaching', 'controller' => 'carts', 'action' => 'view'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->redirect(array('plugin' => 'kaching', 'controller' => 'carts', 'action' => 'product', $id));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9b57c832a62565756b7a502175e72fdc", "score": "0.68225294", "text": "function addItem(){\n $result = ['result' => 'failed', 'error' => ''];\n \n $item_id = (isset($_REQUEST['item_id']) ? $_REQUEST['item_id'] : null);\n $lat = (isset($_REQUEST['lat']) ? $_REQUEST['lat'] : null);\n $lng = (isset($_REQUEST['lng']) ? $_REQUEST['lng'] : null);\n $message = (isset($_REQUEST['message']) ? $_REQUEST['message'] : '');\n \n $attr = [\n 'item_id' => $item_id,\n 'lat' => $lat,\n 'lng' => $lng,\n 'message' => $message\n ];\n \n try{\n \n if( is_null($item_id) || empty($item_id) ){\n throw new Exception('Item id not provided.');\n }\n \n if( (empty($lat) || empty($lng)) && empty($message) ){\n throw new Exception('Missing required attributes.');\n }\n \n \n $fitem = new FoundItemMessage( $attr );\n if( $fitem->insert() ){\n $result['result'] = 'success';\n $result['data'] = [$fitem];\n $item = Item::find($item_id);\n FireBase::sendCloudMessage( $item, $fitem );\n }\n }catch (Exception $e){\n $result['exception'] = $e->getMessage();\n }\n \n echo json_encode($result);\n }", "title": "" }, { "docid": "d3ca876eb87504cf94df1859a4564541", "score": "0.6815619", "text": "public function push($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "d3ca876eb87504cf94df1859a4564541", "score": "0.6815619", "text": "public function push($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.68126553", "text": "public function add()\n {\n }", "title": "" }, { "docid": "7b419715f62fa64d87143df9839367d1", "score": "0.67966956", "text": "public function add($key, $item)\n {\n $this->items[$key] = $item;\n }", "title": "" }, { "docid": "c39b371f0d9d0d96c8a50c1beb377f9b", "score": "0.6793713", "text": "function add($entity);", "title": "" }, { "docid": "bb3f1f0bf9d72001408ce9aec3a0dacd", "score": "0.6786155", "text": "public function addItem($id)\n {\n $items = $this->getBasketContents();\n $itemInstance = new Item();\n $addedItem = Item::findOrFail($id);\n\n if (!empty($items)) {\n $itemIds = $items['items'];\n $contents = $itemInstance->getItemsWeight($itemIds);\n $weight = array_sum($contents);\n $futureWeight = intval($addedItem->weight) + intval($weight);\n foreach ($itemIds as $id) {\n if (intval($addedItem->id) == intval($id)) {\n throw new \\Exception($message = \"The item is already in the basket\", $code = 400);\n }\n }\n } else {\n $addedItem = Item::find($id);\n $futureWeight = $addedItem->weight;\n }\n\n if (abs($this->max_capacity) >= abs($futureWeight)) {\n $itemContents = json_decode($this->contents, true);\n array_push($itemContents, ['item_id' => $addedItem->id, 'weight' => $addedItem->weight]);\n $this->contents = json_encode($itemContents);\n $this->save();\n } else {\n throw new \\Exception($message = \"The basket is overloaded\", $code = 400);\n }\n }", "title": "" }, { "docid": "37f27d0cc5fc89b31f3d007bf785d2d7", "score": "0.6779288", "text": "public function add()\n\t{\n\t}", "title": "" }, { "docid": "37f27d0cc5fc89b31f3d007bf785d2d7", "score": "0.6779288", "text": "public function add()\n\t{\n\t}", "title": "" }, { "docid": "10255b5517d1072863e61a67b915c976", "score": "0.6767975", "text": "public function add_tag(){\r\n\t\t\r\n\t\t/* Get arguments */\r\n\t\t$args = $this->_args;\r\n\t\tif (empty($args)){\r\n\t\t\treturn $this->_redirect('/'.strtolower($this->_getType('plural')));\r\n\t\t}\r\n\t\t\r\n\t\t/* Try associating tag to item */\r\n\t\t$itemsModel = $this->getModel('newitems');\r\n\t\t$itemId = array_shift($args);\r\n\t\t$tag = Request::getString('tag');\r\n\t\t$success = $itemsModel->addTag($itemId, $tag);\r\n\t\t\r\n\t\t/* Message */\r\n\t\tif ($success){\r\n\t\t\tMessages::addMessage('<code>'.$tag.'</code> added as tag for '.$this->_getType('singular').' #'.$itemId);\r\n\t\t} else {\r\n\t\t\tMessages::addMessage($this->_getType('singular').' #'.$itemId.' was not changed.', 'error');\r\n\t\t}\r\n\t\t\r\n\t\t/* Redirect to details page */\r\n\t\treturn $this->_redirect('/'.strtolower($this->_getType('plural')).'/details/'.$itemId);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "80a39696aeb0528987b874f81f285ddb", "score": "0.67610294", "text": "public function add($data);", "title": "" }, { "docid": "f4411886c50f5defd57b30c844ff10e8", "score": "0.6754713", "text": "public function push($item)\n {\n }", "title": "" }, { "docid": "a11f1c02f53d7dc149dc8b433c8362c2", "score": "0.6751", "text": "public function add($alias, $item = null);", "title": "" }, { "docid": "6ff6830d259df32ca1a49bc8935ac782", "score": "0.67460996", "text": "public function add()\n\t{\n\n\t}", "title": "" }, { "docid": "1589d0975897b58d9c93582476f09a77", "score": "0.67454845", "text": "public function addItem($name, $description) {\n \n // Exists then show message\n\n // Doesnt exist then Iinsert Item into Items Table\n\n }", "title": "" }, { "docid": "11ff2bd268aa7a083a974723abc9fe16", "score": "0.6723197", "text": "function add( $entity );", "title": "" }, { "docid": "f215dae491ac84f2422daa50d096acc0", "score": "0.67192626", "text": "public function addItemById($itemId) {\n $this->_itemIds[$itemId] = $itemId;\n }", "title": "" }, { "docid": "933dcc54697c333bb2a1121065aeb9c7", "score": "0.6714087", "text": "public function doAddItem() {\n\t\t// validate the info, create rules for the inputs\n\t\t$rules = array(\n\t\t\t'name' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t);\n\n\t\t// run the validation rules on the inputs from the form\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('item/add')\n\t\t\t\t->withErrors($validator);\n\t\t} else {\n\t\t\tif(Input::hasFile('file')) {\n\t\t\t\t// Get the files name to remove ' ' spaces and replace them with _\n\t\t\t\t$fileName = Input::file('file')->getClientOriginalName();\n\t\t\t\t$fileName = str_replace(' ', '_', $fileName);\n\n\t\t\t\t// Upload file to server\n\t\t\t\t$destinationPath =\tpublic_path() . '/assets/images/items/';\n\t\t\t\tInput::file('file')->move($destinationPath, $fileName);\n\n\t\t\t\t// Create a new item\n\t\t\t\t$item = new Item;\n\t\t\t\t$item->name = Input::get('name');\n\t\t\t\t$item->description = Input::get('description');\n\t\t\t\t$item->price = Input::get('price');\n\t\t\t\t$item->gallery_id = Input::get('gallery_id');\n\t\t\t\t$item->resource = $fileName;\n\t\t\t\t$item->save();\n\t\t\t}\n\t\t\treturn Redirect::to('item/all')->with('message', 'Item successfully added.')\n\t\t\t\t\t\t\t\t\t\t ->with('title', 'All Item');\n\t\t}\n\t}", "title": "" }, { "docid": "47f5cfbb91b5185896b743247800d198", "score": "0.67063785", "text": "public function addItem($data = NULL) {\n $this->deleteItem();\n \n $names = $data->getPost('web_name', '');\n $values = $data->getPost('web_value', '');\n $i = 0;\n foreach ($names as $name) {\n $this->insertItem($name, $values[$i]);\n $i++;\n }\n }", "title": "" }, { "docid": "951a148e0eeb82da2c07604860846a6a", "score": "0.6702647", "text": "function addItem($a_item)\n\t{\n\t\t$a_item->setParentForm($this);\n\t\treturn $this->items[] = $a_item;\n\t}", "title": "" }, { "docid": "f565527429de6e5aecbcfb56f7f98a37", "score": "0.6697063", "text": "public function add($item)\n {\n $this->addArray('buttons', $item, array('FormButton', 'LinkButton'));\n }", "title": "" }, { "docid": "4f88695cd41c743f305b4d0280fa3d89", "score": "0.6683797", "text": "public function addItem($itemObj, $id=0) { \n \n if ($id == 0) {\n $this->itemsArr[] = $itemObj;\n } else {\n $this->itemsArr[$id] = $itemObj;\n }\n \n }", "title": "" }, { "docid": "a6d392a65c068a1b826119328641cde6", "score": "0.6672522", "text": "public function addItem(Item $item)\n {\n array_push($this->items, $item);\n }", "title": "" }, { "docid": "e0defd7749cbfd584d189a8a474d00ad", "score": "0.6671501", "text": "function add_item($item_id, $count)\n\t{\t\t\n\t\tif (isset($this->item_array[\"$item_id\"])):\n\t\t\t$this->update_item($item_id, $count);\n\t\telse:\n\t\t\t$this->item_array[\"$item_id\"] = $count;\n\t\t\t$this->lines++;\n\t\t\t$this->items += $count;\t\t\n\t\tendif;\n\t\t$this->calculate_cart_sum();\n\t}", "title": "" }, { "docid": "22df56a3af17074db27b30988c49f71e", "score": "0.66664547", "text": "public function add (object $entity);", "title": "" }, { "docid": "da3ac812594e3673b02d028243b24589", "score": "0.6666042", "text": "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Carousel', 'Collapsible', 'Container', 'Detail', 'Form', 'Tabs', 'Heading', 'HTML', 'Image', 'XList', 'Table'));\n }", "title": "" }, { "docid": "6f6b88453e9612303115332fb51283c6", "score": "0.66630745", "text": "function add_menu_item($Menu_Item) {\n array_push($this->menus,$Menu_Item);\n }", "title": "" }, { "docid": "b92327ae72bbe6891713c30ed60e9043", "score": "0.66618025", "text": "function item_post()\n {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $_POST);\n $this->supplies->add($record);\n $this->response(array('ok'), 200);\n }", "title": "" }, { "docid": "19ee6e22add097e3d757bbd0f6eca0b5", "score": "0.6661778", "text": "public function add()\n {\n $product = $this->Product->read(array('name', 'slug', 'price'), $this->data['Product']['id']);\n $cart = $this->Session->read('Cart');\n\n if (isset($cart[$product['Product']['slug']])) {\n $item =& $cart[$product['Product']['slug']];\n $item['quantity']++;\n $item['price_total'] = bcmul($item['quantity'], $item['price'], 2);\n } else {\n $product['Product']['quantity'] = 1;\n $product['Product']['price_total'] = $product['Product']['price'];\n $cart[$product['Product']['slug']] = $product['Product'];\n }\n\n $this->Session->write('Cart', $cart);\n $this->Session->setFlash(sprintf('One \"%s\" has been added to your cart.', $product['Product']['name']));\n $this->redirect('/cart');\n }", "title": "" }, { "docid": "9f5d8ab813c3f2584f8f2a0751ecfd2a", "score": "0.66509664", "text": "function add_item($name, $value) {\n if (is_string($value)) {\n $this->add_string($name, $value);\n }\n elseif (is_object($value) || is_array($value)) {\n $this->add_element($name, $value);\n }\n }", "title": "" }, { "docid": "8c2b1d1e5a447246afce2346aec70159", "score": "0.6648018", "text": "public function add(){\n }", "title": "" }, { "docid": "780b54696dc55b91109a16b413bcff51", "score": "0.6647609", "text": "function addItem($user_id, $item) {\n $stmt = $this->conn->prepare(\"INSERT INTO `items`(`user_id`, `item`) VALUES(?, ?)\");\n $stmt->bind_param(\"is\", $user_id, $item);\n if ($stmt->execute()) {\n return ITEM_ADDED_SUCCESSFULLY;\n } else {\n return FAILED_TO_ADD_ITEM;\n }\n }", "title": "" }, { "docid": "c8876a3e171bd9eaf2b937b587cc5e5e", "score": "0.66338664", "text": "protected function add()\n {\n // TODO: Implement add() method.\n }", "title": "" }, { "docid": "0e27570b0d45773238fdd88551c2b0fd", "score": "0.66261244", "text": "public function addItem(Varien_Object $item) {\n\t\t/** @var string $itemClass */\n\t\t$itemClass = $this->getItemClass();\n\t\tdf_assert($item instanceof $itemClass);\n\t\tif ($this->isValid($item)) {\n\t\t\ttry {\n\t\t\t\tdf_assert(!is_null($item->getId()));\n\t\t\t}\n\t\t\tcatch(Exception $e) {\n\t\t\t\tdf_bt();\n\t\t\t\tdf_error(\n\t\t\t\t\t'Программист пытается добавить в коллекцию объект без идентификатора.\n\t\t\t\t\t<br/>У добавляемых в коллекцию объектов должен быть идентификатор.'\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 * Нам такое поведение не нужно, поэтому мы добавляем элемент\n\t\t\t * только в случае отсутствия идентификатора элемента в коллекции.\n\t\t\t */\n\t\t\t$itemId = $this->_getItemId($item);\n\t\t\tif (\n\t\t\t\t\tis_null($itemId)\n\t\t\t\t||\n\t\t\t\t\t/**\n\t\t\t\t\t * Вызов @see Varien_Data_Collection::getItemById()\n\t\t\t\t\t * может привести к рекурсии, поэтому вместо\n\t\t\t\t\t * is_null($this->getItemById($itemId))\n\t\t\t\t\t * используем !isset($this->_items[$itemId])\n\t\t\t\t\t */\n\t\t\t\t\t!isset($this->_items[$itemId])\n\t\t\t) {\n\t\t\t\tparent::addItem($item);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "da2f92155a0ae98e1225cda77aaac5be", "score": "0.6621323", "text": "public function addItem($id, $quantity, $byAsin = true)\n {\n $itemIdentifier = ($byAsin) ? '.ASIN' : '.OfferListingId';\n\n $this->parameters['Item.' . $this->itemCounter . $itemIdentifier] = $id;\n $this->parameters['Item.' . $this->itemCounter . '.Quantity'] = $quantity;\n\n $this->itemCounter++;\n }", "title": "" }, { "docid": "28d1585a133689d8a65db01c60b02ceb", "score": "0.66182876", "text": "public function create_item() {\n // $item_id = (int) $this->get_current_item_id();\n\n return false;\n }", "title": "" }, { "docid": "d578b280742dad48d004aab7706ea213", "score": "0.6607405", "text": "public function addToBasket($item) \n {\n $this->getEmosECPageArray($item, \"c_add\");\n }", "title": "" }, { "docid": "923814575940be02e470dbfc77a53c1f", "score": "0.6604477", "text": "public function testPostNewItem()\n {\n $this->di->get(\"request\")->setBody('{\"some\": \"thing\"}');\n $res = $this->controller->postItem(\"users\");\n $json = $res[0];\n $this->assertEquals(13, $json[\"id\"]);\n $this->assertEquals(\"thing\", $json[\"some\"]);\n\n $res = $this->controller->getItem(\"users\", 13);\n $json = $res[0];\n $this->assertEquals(13, $json[\"id\"]);\n $this->assertEquals(\"thing\", $json[\"some\"]);\n }", "title": "" }, { "docid": "90fdb6a5b9d47aae9507e8827bb66b94", "score": "0.6600907", "text": "public function push(mixed $item): void\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "c2dbd6538d2fae35c8a61b79fc80c691", "score": "0.6594212", "text": "function add() {\r\n $jedi = $this->jedihuntmodel->create();\r\n $this->present($jedi);\r\n }", "title": "" }, { "docid": "0298986bc75f944528f46eb040d72153", "score": "0.6592911", "text": "public function add_item($code,$name,$des,$price,$quantity) {\n $new_item = new item($code,$name,$des,$price);\n $index = 0;\n\n if ((count($this->items)>0)) {\n foreach ($this->items as $item) {\n if ($item['product']->get_itemcode() == $code) {\n $this->items[$index]['quantity'] = $item['quantity'] + 1;\n } else {\n $itemcodes = $this->get_itemcodes() ;\n // check if item exists otherwise insert new item\n if (!(in_array($code,$itemcodes))) {\n $this->items[] = array('product'=>$new_item->get_item(),'quantity' => 1);\n }\n }\n $index++;\n }\n } else {\n // if new item exists create the first one\n $this->items[] = array('product'=>$new_item->get_item(),'quantity' => 1);\n }\n\n\n }", "title": "" } ]
a8d93f25c0c8adcda92286694c0ceb45
Specifies the access control rules. This method is used by the 'accessControl' filter.
[ { "docid": "552d5ae7a36280517afc02c6e5f2dccd", "score": "0.0", "text": "public function accessRules()\n {\n $isAdmin = function ($user, $rule) {\n return $user->getState('isAdmin');\n };\n\n return [\n ['allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => ['create','update', 'index','view', 'delete'],\n 'users' => ['@'],\n ],\n ['allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => ['admin'],\n 'expression' => $isAdmin,\n ],\n ['deny', // deny all users\n 'users' => ['*'],\n ],\n ];\n }", "title": "" } ]
[ { "docid": "03d3796f16fc3430506cfb33909d31e2", "score": "0.7199828", "text": "public function accessRules() {\n return array(\n array('allow',\n 'roles'=>array('Admin'),\n ),\n array(\n 'deny',\n ),\n );\n }", "title": "" }, { "docid": "e39e5f5d1f01752fb4b2410439a58f4a", "score": "0.719597", "text": "public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('new','edit','delete','save','paste','ajaxPaste','pasteSave'),\n 'expression'=>array('PlaneAwardController','allowReadWrite'),\n ),\n array('allow',\n 'actions'=>array('index','view','down'),\n\t\t\t\t'expression'=>array('PlaneAwardController','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "42b3b4d856a653c98202cdee83595d35", "score": "0.71106005", "text": "public function accessRules() {\n return array(\n array('allow',\n 'roles' => array('admin', 'super_admin', 'operations_admin', 'limited_admin')\n ),\n );\n }", "title": "" }, { "docid": "c0c2d29ac69bec04cb4766027b67049c", "score": "0.70741934", "text": "public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('index','delete','create', 'update','view','especialidades'),\n 'expression'=>'($user->rule===\"admin\")'\n ),\n array('allow',\n 'actions'=>array('view','especialidades'),\n 'expression'=>'($user->rule===\"medico\" or $user->rule===\"enfermeiro\" or $user->rule===\"tecnico\")'\n ),\n\t\t\tarray('deny',\n 'users'=>array('*'),\n ),\n\t\t);\n\t}", "title": "" }, { "docid": "3cd5d9976cb453400fb69ae8b21610b1", "score": "0.7071383", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "bbd279afb44c5aef4da818698ad45d87", "score": "0.70488", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'users'=>array('@'),\n\t\t\t\t//'expression'=>'Yii::app()->user->permission',\n\t\t\t),\n\t\t\t\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "38aec89ff6d788f31fb61bd428170ea5", "score": "0.703214", "text": "public function accessRules()\n\t{\n return array(\n array('allow',\n 'actions'=>array('create','update','index','delete','setIsShow'),\n 'users'=>array('admin'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n\t}", "title": "" }, { "docid": "a7a68e304b345f00f8c8a57c4097040e", "score": "0.70228916", "text": "public function accessRules()\n\t{\n\t return array(\n\t\tarray('allow',\n\t\t\t'actions'=>array('objectResume','objects'), // role do bazy!!!\n\t\t\t'roles'=>array('admin'),\n\t\t),\n\t\tarray('deny', // deny all users\n\t\t\t'users'=>array('*'),\n ),\n );\n\t}", "title": "" }, { "docid": "58c5ab5641216a8b4030a045abbd6afb", "score": "0.7011233", "text": "public function accessRules() {\r\n return array_merge(\r\n array(array('allow', 'users' => array('?'))),\r\n // Include parent access rules\r\n parent::accessRules()\r\n );\r\n }", "title": "" }, { "docid": "0771032a5cd1bf8997e66d6c906505b3", "score": "0.7004988", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated users to access all actions\n\t\t\t\t'users'=>array(\n\t\t\t\t\t'expression'=>'$user->isAdmin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "727c0ad07d3c69a473292695ad9d7734", "score": "0.6994442", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','update','view','delete','admin','index','changeimage','enable','disable','search','downloadrab','upload','report','print','printall'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->record->level==1',\n\t\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('view','search','update','delete','upload','downloadrab'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->record->level==2',\n\t\t\t\t),\t\t\t\n\t\t\tarray('deny',\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t\t);\n\t}", "title": "" }, { "docid": "16962d79fd5b60212540aa7fae4fff4f", "score": "0.6993945", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow authentication user to perform 'languages', ...\n 'actions' => array(\n 'adminAccount',\n 'settings',\n 'updateSetting',\n\n ),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "a1ac9c86c88fbb6058f6fab64f727b2e", "score": "0.69871134", "text": "public function accessRules()\r\n {\r\n return array(\r\n array(\r\n 'allow',\r\n 'roles' => array('administrator'),\r\n ),\r\n array(\r\n 'deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }", "title": "" }, { "docid": "0e648647f8cc0dd0bdc8298303a79384", "score": "0.6980697", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','show','showConsolidatedClaim','getClaimParams',\n 'createLinesByComplect','getWaresForTemplatesByComplect',\n 'editClaimLineDialog','editClaimLine','checkLimits',\n 'getLimits','getClaimLinesByArticle'), //'selectWaresFromTemplates'), //,'isTemplatesIntoComplect'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "fcfcf7d4e07dbc72f7bcf968c8ed5452", "score": "0.6977402", "text": "public function accessRules()\n\t{\n\t\t Yii::app()->user->loginUrl = array(\"/cruge/ui/login\");\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('recibevalor','relaciona','envia','observaciones','borrafoto','exporta','vaa','index','view','detalle','sube','confirmar','misactivos'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','subearchivo','gestionafotos','Borrafotos'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('updatetotal'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t),\n\t\t\t\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin'),\n\t\t\t\t'users'=>array('admin','@','*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e7113b9898360c6dd99b38096903cad5", "score": "0.69732493", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('create','checkMainAccounts','bulk','exportAll','exportSubAccount','exportMain'),\n 'users' => array('@'),\n ),\n array('deny',\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "b75421e0d22186067f24b540ef46f7c9", "score": "0.6972148", "text": "public function accessRules() {\n\t\treturn array(\n\t\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t\t\t'actions' => array('index', 'view', 'chart'),\n\t\t\t\t\t\t'users' => array('@'),\n\t\t\t\t),\n\t\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t\t\t'actions' => array('create', 'update'),\n\t\t\t\t\t\t'users' => array('admin'),\n\t\t\t\t),\n\t\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t\t\t'actions' => array('admin', 'delete'),\n\t\t\t\t\t\t'users' => array('admin'),\n\t\t\t\t),\n\t\t\t\tarray('deny', // deny all users\n\t\t\t\t\t\t'users' => array('*'),\n\t\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "7e8980fa3c3ed8b436cb614e4791182f", "score": "0.6956682", "text": "public function accessRules() {\n return array(\n array('allow',\n 'roles' => array('admin', 'super_admin', 'operations_admin')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "dd827bf1cdab1db9fe5f650be7326798", "score": "0.6955166", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('edit','save','submit','resubmit','fileupload','fileremove','rollback'),\n\t\t\t\t'expression'=>array('Monthly2Controller','allowReadWrite'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('edit','filedownload','fileupload','fileremove','rollback'),\n\t\t\t\t'expression'=>array('Monthly2Controller','allowReadWriteC'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index','view','filedownload','rollback'),\n\t\t\t\t'expression'=>array('Monthly2Controller','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('indexc','view','accept','reject','acceptm','rejectm','filedownload','rollback'),\n\t\t\t\t'expression'=>array('Monthly2Controller','allowReadOnlyC'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('indexa','view','accept','reject','acceptm','rejectm','filedownload','fileupload','fileremove'),\n\t\t\t\t'expression'=>array('Monthly2Controller','allowReadOnlyA'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "6f84cbac7938f97fb09089ac40a3ddbb", "score": "0.6945946", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array( 'view', 'create', 'configuration'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update','index', 'edit','business',\n 'rates','reject','modify','accept','approve','vieweffect','complete','addrate',),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "47c802e03a4d3161103a15f653bbb38e", "score": "0.6945879", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('index','create','update'),\n\t\t\t\t'expression' => 'Yii::app()->user->role >= ' . User::ROLE_MANAGER,\n\t\t\t),\n\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('error'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "7c04c1a8c45bb69fd0820ae8c4601938", "score": "0.6941353", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n 'modify',\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "7c054d8ea57ce2acf34490f57c77e5e4", "score": "0.6938389", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update', 'show', 'list', 'comment'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'expression'=>$this->isAdmin(),\t\t\t\t\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "2fb4ddb04f1f3680e5ca67750fd67ce9", "score": "0.6935731", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('index','goodsCenter','searchCinemaLockCount','searchMovie','searchCinema','changeRestrict','addMovie','delCinema','orderInfo','orderInfoExcel','delMovie'),\n 'users'=>array('@'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "3c68fd786827814b51ccb5c820147ed6", "score": "0.6924535", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', \r\n\t\t\t\t'actions'=>array('index','view','update'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', \r\n\t\t\t\t'actions'=>array('admin','delete', 'create','update','index'),\r\n\t\t\t\t'roles'=>array('admin','hr','employer'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "4b5e0fd5e8d7d2ed8af7d9246c6bcd35", "score": "0.6923913", "text": "public function accessRules()\n {\n return array(\n array(\n 'allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view','setResultsPerPage'),\n 'users' => array('*'),\n 'ips' => Yii::app()->params['ip_access'],\n ),\n array(\n 'allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array(\n 'create',\n 'update',\n 'scanner',\n 'ScanComputer',\n 'Ajaxupdate',\n 'SuggestDepartments',\n 'FindComputer',\n 'Showdown',\n 'Reboot',\n\t\t\t\t\t'delete',\n ),\n 'users' => array('@'),\n ),\n array(\n 'allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin','ShowServices'),\n 'users' => array('admin'),\n ),\n array(\n 'deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "16bd35ecb5d87b5dfbf7740e9aa7fa2b", "score": "0.69238985", "text": "public function accessRules()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "da6367619178ef743f32b6947e1c7040", "score": "0.6912994", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('manageSettlement','excel'),\n 'roles'=>array('admin', 'finance')\n ),\n array('allow',\n 'actions'=>array('uploadNationalCardImage', 'uploadRegistrationCertificateImage'),\n 'users'=>array('@'),\n ),\n array('allow',\n 'actions'=>array('signup'),\n 'roles'=>array('user'),\n ),\n array('allow',\n 'actions'=>array('account','index', 'discount','settlement','sales','documents'),\n 'roles'=>array('developer'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "a4f2f3d3538a337b2077d7120ce1f02f", "score": "0.6910831", "text": "public function accessRules()\n {\n return array_merge(array(array('allow',\n 'actions' => array('edit', 'adminedit', 'disable', 'syncPinyin'),\n 'users' => array('@'),\n )), parent::accessRules());\n }", "title": "" }, { "docid": "d9942abe9a5d97d13d7998946067d7f2", "score": "0.6910631", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array(\n\t\t\t\t\t'summary', 'phpinfo', 'registrations'\n\t\t\t\t),\n\t\t\t\t'expression'=>'$user->isAdmin',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "14cce6eb0082c68d841106c6c5d47a9d", "score": "0.69053125", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n ),\n 'roles' => array('admin')\n ),\n array('allow',\n 'actions' => array(\n ),\n 'roles' => array('admin', 'moderator')),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "f470347fe3ec542473f8d14c8aac836d", "score": "0.6904955", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('residents'),\n\t\t\t\t'expression'=>'Yii::app()->user->isResident()',\n\t\t\t),\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('business'),\n\t\t\t\t'expression'=>'Yii::app()->user->isBusiness()',\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('index','residents','business'),\n\t\t\t\t'expression'=>'Yii::app()->user->isAdmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "10027f87d6ab1f877acbe6e19e1f416b", "score": "0.69029075", "text": "public function accessRules() {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array(\n 'myoffers',\n 'myorders',\n 'settings',\n 'payment',\n 'ratings',\n 'paymentdetail'\n ),\n 'users' => array('@'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array(\n 'store'\n ),\n 'users' => array('*'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "9abed56fbc1f7c27db7166b12ff0ee9e", "score": "0.6894233", "text": "public function accessRules() {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n// 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n// array('allow', // allow admin user to perform 'admin' and 'delete' actions\n// 'actions' => array('admin', 'delete'),\n// 'users' => array('admin'),\n// ),\n array('deny', // deny all users\n// 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "9294fcf20965a70f8dabd2b280c7740b", "score": "0.6892006", "text": "public function accessRules()\n {\n return array(\n );\n }", "title": "" }, { "docid": "e76a2838708b1022bbe3c450620ac958", "score": "0.68918604", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'view' actions\n\t\t\t\t'actions'=>array('view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'report' actions\n\t\t\t\t'actions'=>array('report','reportAll', 'calendar'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "9e58ec24fa712ba5f8795c58c5e1252f", "score": "0.6891013", "text": "public function accessRules()\r\n {\r\n \treturn array(\r\n \t\t\tarray('allow', // allow authenticated user only\r\n \t\t\t\t\t'actions'=>array('friend', 'global', 'globalData', 'friendData'),\r\n \t\t\t\t\t'users'=>array('@'),\r\n \t\t\t),\r\n \t\t\tarray('deny', // deny all users\r\n \t\t\t\t\t'users'=>array('*'),\r\n \t\t\t),\r\n \t);\r\n }", "title": "" }, { "docid": "4d567eee71d06221a7d7d9433ed75c54", "score": "0.6890102", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // Allow superusers to access Rights\r\n\t\t\t\t'actions'=>array(\r\n\t\t\t\t\t'permissions',\r\n\t\t\t\t\t'operations',\r\n\t\t\t\t\t'tasks',\r\n\t\t\t\t\t'roles',\r\n\t\t\t\t\t'generate',\r\n\t\t\t\t\t'create',\r\n\t\t\t\t\t'update',\r\n\t\t\t\t\t'delete',\r\n\t\t\t\t\t'removeChild',\r\n\t\t\t\t\t'assign',\r\n\t\t\t\t\t'revoke',\r\n\t\t\t\t\t'sortable',\r\n\t\t\t\t\t'assignRole',\r\n\t\t\t\t\t'manageRoles',\r\n\t\t\t\t\t'editRole',\r\n\t\t\t\t\t'deleteRole',\r\n\t\t\t\t),\r\n\t\t\t\t'users'=>$this->_authorizer->getSuperusers(),\r\n\t\t\t),\r\n\t\t\tarray('deny', // Deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "37f4b968e4c914d5cc5944e343cf5a3d", "score": "0.68890995", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\t\t\n\t\t\tarray('allow', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "737c6281e73335600d1d737de7377d5e", "score": "0.68883246", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "389aa00f1d87888c6ed274cc44794c11", "score": "0.68864787", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', \r\n\t\t\t\t'actions'=>array('index','view','estadisticas','graficos'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' actions\r\n\t\t\t\t'actions'=>array('admin', 'create','update','delete','gestion'),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "ce7b0dc17f1643d6a703229411b0c6ae", "score": "0.6884293", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view','add','create','edit','delall','outemapp'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('auditck','shedit',),\n\t\t\t\t'users'=>User::model()->getManage(5),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "424cf4b6c36e4ed3c1b88ddd3004180e", "score": "0.6883674", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array('admin'),\n 'roles' => array(Constants::USER_ROLE_DIRECTOR, Constants::USER_ROLE_ADMINISTRATIVO),\n ),\n array('deny',\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "5b474910bba27ec0fd614b13c5d6b469", "score": "0.6880918", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\t\t\t\n \n\t\t\t\t'actions'=>array('productos','pormover','confirmar','registraregreso','adminEgresos','defectuosos','defectuososxls'),\n\n\t\t\t\t//'users'=>array('admin'),\n\t\t\t\t'expression' => 'UserModule::isAdmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e4d70615fdf198bc01dc1fff62495cf9", "score": "0.6879094", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array( 'pertanyaan', 'create', 'view',\n 'delete','update','logAlert'),\n\t\t\t\t'roles'=>array('admin'),\n\t\t\t),\t\t\t\n\t\t\tarray('allow', // deny all users\n 'actions'=>array('index','complete','autocompleteVoter', 'report',\n 'print'),\n\t\t\t\t'roles'=>array('inputter','approval', 'complete',),\n\t\t\t),\n\t\t\tarray('allow', // deny all users\n 'actions'=>array('autocompleteVoter','hasil'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "ddd4159d34db58ab959a1f4a13c95c15", "score": "0.68789524", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform all actions\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny',\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1749709beef3bf5afcb5a53e98c45645", "score": "0.6877092", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\t\t/*\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','delete', 'getLogEntries', 'manage', 'index', 'copy', 'exportToPDF'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t*/\n\t\t);\n\t}", "title": "" }, { "docid": "5ebcfdeea92754dfa67c42c57babe71b", "score": "0.68756604", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete','create','update','adminInactivos','activar'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e0601514326698a92cd4b41f0fd546b8", "score": "0.6875147", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow authenticated users to access all actions\r\n//\t\t\t\t'users'=>array('@'),\r\n 'roles'=>array('root'), \r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "f772a191cde6bb610535ab30437b17cb", "score": "0.68747765", "text": "public function accessRules() {\n \n return array(\n array(\n 'allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array(\n 'create',\n 'admin',\n 'update',\n 'delete',\n ) ,\n 'users' => array(\n '@'\n ) ,\n ) ,\n array(\n 'allow', // all all users\n 'actions' => array(\n 'error'\n ) ,\n 'users' => array(\n '*'\n ) ,\n ) ,\n array(\n 'deny', // deny all users\n 'users' => array(\n '*'\n ) ,\n ) ,\n );\n }", "title": "" }, { "docid": "5d7f6a5555d4d673fb2bbd5edde6c29a", "score": "0.6873273", "text": "public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('view', 'get'),\n 'users'=>array('*'),\n ),\n\t\t\tarray('allow', // allow authenticated user to perform these actions\n\t\t\t\t'actions'=>array('create','update','delete','shares'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "d6dbfa2c334875d5689eca7081ab9d5d", "score": "0.6872983", "text": "public function accessRules() {\r\n return array();\r\n }", "title": "" }, { "docid": "cb58debd44dea3c59f81493a8dd95a3a", "score": "0.68659663", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create', 'update', 'view', 'index', 'newLine', 'deleteLine'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isDefaultRole');\",\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('checkin', 'place', 'create', 'update', 'view', 'index', 'newLine', 'deleteLine'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isLead');\",\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isCustomer');\",\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isAdmin');\",\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "32228251c60afca2138051435e65db97", "score": "0.6864283", "text": "public function accessRules() {\n return array(\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('index', 'create', 'update', 'delete', 'getAllGroupsByCountryID', 'getAllDetailsForPrice', 'saveFare'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "1cd7cd67acaa91d7a6570bb96128a0bd", "score": "0.6864227", "text": "public function accessRules() {\r\n return array(\r\n array('allow', // allow all users to perform 'index' and 'view' actions\r\n 'actions' => array('index', 'getadvisers', 'search', 'advancedsearch', 'talk'),\r\n 'users' => array('*'),\r\n ),\r\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n 'actions' => array('my', 'rate'),\r\n 'users' => array('@'),\r\n ),\r\n array('deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }", "title": "" }, { "docid": "015d48961c3bef0784447295191179bf", "score": "0.6863587", "text": "public function accessRules() {\n return array(\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('cancelByAdmin, createFakeClientAndMission, createTestBookings, cronCancelMissionsByAdmin,\n cronCreditCarers, cronJobPayments, DBConnections, doNonReferencedCredit, splitBookingLiveIn'),\n 'users' => array('admin'),\n ),\n// array('allow', // allow all users to perform 'index' and 'view' actions\n// 'actions' => array('error', 'adminLogin'),\n// 'users' => array('*'),\n// ),\n );\n }", "title": "" }, { "docid": "a0187994b2442a1a410773a27543adf0", "score": "0.68594617", "text": "public function accessRules()\n {\n return array(\n array(\n 'allow',\n 'users' => array('admin'),\n ),\n array(\n 'deny',\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "a18bf466c48b4d0281749052b1aedbc9", "score": "0.68581235", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'users'=>Yii::app()->user->getAdmin(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e1319ec8d744435edbae29ace0e64122", "score": "0.6858006", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'index', 'delete' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','viewMany','delete','deleteMany'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n array('allow', // allow admin user to perform 'listAll' actions\n 'actions'=>array('listAll'),\n 'expression'=>'!Yii::app()->user->isGuest && Yii::app()->user->isAdmin()',\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "f063d61dc97ba10a34949c9007cb3a73", "score": "0.685797", "text": "public function accessRules() {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array(\n 'index',\n 'create',\n 'getdata',\n 'getStatusComboData'\n ),\n 'expression' => '(!Yii::app()->user->isGuest && Yii::app()->user->isSuperAdmin)',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "60d09cf2880e2ff13b01f6a665819fb3", "score": "0.68577665", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t array('allow', \r\n\t\t\t\t\t\t'roles'=>array('Administrador'),\r\n\t\t\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t),\t\r\n\t\t\t\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t\t'roles'=>array('Secretaria'),\r\n\t\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "70d29365b7464eaa9a2d0cf88f4da519", "score": "0.6856728", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow admin only\r\n\t\t\t\t'actions'=>array('index','indexajax'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'Yii::app()->user->userLevel > 0',\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "99798f04fac153dff1e257d351f5e197", "score": "0.68531245", "text": "public function accessRules()\r\n {\r\n return array(array('allow',\r\n // allow authenticated user to perform 'create' and 'update' actions\r\n 'users' => array('@'),), array('deny',\r\n // deny all users\r\n 'users' => array('*'),),);\r\n }", "title": "" }, { "docid": "9dcd4d1c3bc3ab7d015dd7ec0e4eb9aa", "score": "0.68511945", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow authenticated user\n 'actions'=>array('chatstart','ChatStartChecking','ReaderMonitor','ReaderStatusChange','ReaderStatusChangeNew','StartChatting',\n 'ClientEndSession', 'ReaderEndSession', 'ChatClient', 'ChatReader', 'Test', 'NewReaderMonitor', 'checkNewClient','CheckNewStatus'),\n 'users'=>array('@'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "9d5b675bce123b05a12981cd6bd6679a", "score": "0.6848934", "text": "public function accessRules(){\n\t\tif(Yii::app()->user->isGuest) $this->redirect(Yii::app()->createUrl('site/login'));\n\t\treturn array(array('allow','actions'=>array('travelerEntry','accessViolation','deleteCrmLink'),'expression'=>'$user->level >= ' . User::USER_US),array('allow','actions'=>array('index','view','admin','delete','create','update'),'expression'=>'$user->level >= ' . User::USER_ADMIN),array('deny','users'=>array('*')));\n\t}", "title": "" }, { "docid": "8c4fc075cf83b5219e65b9b7cf30f683", "score": "0.68482316", "text": "public function accessRules()\n\t{\n\t\t\n\t\treturn array(\n\t\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t\t\t'users'=>array('@'),\n\t\t\t\t\t\t'roles'=>array('admin','entidad'),\n\t\t\t\t),\n\t\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t\t\t'users'=>array('@'),\n\t\t\t\t),\n\t\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t\t\t'roles'=>array('admin'),\n\t\t\t\t),\n\t\t\t\tarray('deny', // deny all users\n\t\t\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "2fc1954ba51d489b5411b214c489effd", "score": "0.68442976", "text": "public function accessRules() {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'checkStatus','cuartos'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "766949f8342d126a473df0138147ad83", "score": "0.684223", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t\tarray('allow', // allow authenticated user only\r\n\t\t\t\t\t\t'actions'=>array('viewBeer','viewWine','viewSpirit'),\r\n\t\t\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t),\r\n\t\t\t\tarray('deny', // deny all users\r\n\t\t\t\t\t\t'users'=>array('*'),\r\n\t\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "0603336acc1ee434636719f4df145975", "score": "0.6841591", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(),\n 'users' => array('*'),\n ),\n array('allow',\n 'actions' => array('delete', 'alterarOrdem', 'salvarModuloModal', 'getModulo'),\n 'expression' => 'Yii::app()->controller->checkPermission()',\n ),\n array('deny',\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "04acdc5303d129e5227e89738ed25f21", "score": "0.6841171", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create', 'update', 'deleteLine', 'approveLine', 'newLine', 'view', 'list', 'index', 'garmentCost'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isDefaultRole');\",\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create', 'update', 'deleteLine', 'approveLine', 'newLine', 'view', 'list', 'index', 'garmentCost'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isLead');\",\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isCustomer');\",\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>\"Yii::app()->user->getState('isAdmin');\",\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "4f3a0175ea1504966dffe2b43462f717", "score": "0.6839606", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('adduser','unfollow','fbinvite'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "b3b5d53dc85389a26d76447055942319", "score": "0.683688", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions' => array('index', 'view', 'multipleDelete', 'delete' ,'approve','reject','approveOne','rejectOne'),\n\t\t\t\t'users' => array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "d5552ec66109ed48ca7fdf8d37517715", "score": "0.683513", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\r\n\t\t\tarray('allow',\r\n\t\t\t\t'actions' => array('create','view'),\r\n\t\t\t\t'users' => array('@'),\r\n\t\t\t\t//'expression' => 'Yii::app()->user->auditado == Usuario::SIM',\r\n\t\t\t\t'expression' => 'Yii::app()->user->auditado == Usuario::SIM OR (Yii::app()->user->auditado == Usuario::NAO && Yii::app()->user->perfil == Permissao::GERENTE_AUDITADO)',\r\n\t\t\t),\r\n\r\n\t\t\tarray('allow',\r\n\t\t\t\t'actions' => array('avaliar'),\r\n\t\t\t\t'users' => array('@'),\r\n\t\t\t\t'expression' => 'isset(Yii::app()->user->perfil) and\r\n\t\t\t\t( Yii::app()->user->perfil == Permissao::ADMINISTRADOR or\r\n\t\t\t\tYii::app()->user->perfil == Permissao::GERENTE or\r\n\t\t\t\tYii::app()->user->perfil == Permissao::GERENTE_AUDITADO or\r\n\t\t\t\tYii::app()->user->perfil == Permissao::AUDITOR )',\r\n\t\t\t),\r\n\r\n\r\n\t\t\t/*array('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array('index','view','avaliar'),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('create','update'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('admin','delete'),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),*/\r\n\r\n\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "1455e366edb4502f15eb5e8d97a84678", "score": "0.683352", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','campaigns'),\n\t\t\t\t//'users'=>array('*'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "ccc29ab0a3b5d9e467d721be20b47ad6", "score": "0.6833336", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array('index','view'),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('create','update', 'delete', 'admin', 'AutocompleteByMemberId', 'ListPayments'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('admin','delete'),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "1e69f9caf38487044817d7a690e7846c", "score": "0.68332756", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'login'),\n 'users' => array('*'),\n ),/*\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n * \n */\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('allow',\n 'actions' => array('control'),\n 'roles' => array('Taxista'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "a11431a64e1b62ed7377ec0ba8e81f47", "score": "0.6829161", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n 'index',\n 'userDetails',\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin', 'limited_admin')\n ),\n array('allow',\n 'actions' => array(\n ),\n 'users' => array('@')\n ),\n array('allow',\n 'actions' => array(\n ),\n 'roles' => array('client')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "61e80c04730a8375bd00899d33a28c4d", "score": "0.68258494", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('list', 'delete', 'create'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin', 'changestatus', 'answer'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "242aa838fc194dfe52b0f696da58474d", "score": "0.6825535", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('aclist'),\n\t\t\t\t'roles'=>array('manageItems'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "c3bd3f7ad22dc85fc2dff1174971b26b", "score": "0.6823625", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','Rindex', 'GenerateReport', 'ClosedListingNumber', 'ClosedAvgPrice','ClosedAvgCommission', 'ClosedAvgDuration'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "01fd890ee0236a4b623632da4b894bff", "score": "0.6819598", "text": "public function accessRules()\n {\n return array(\n array('allow','actions'=>array('newProjSubmit','shareprofile'),'users'=>array('@'),),\n\t\t\tarray('allow','actions'=>array('index','signup','autoCity','login','error','verifyActivation','Supplier_Signup','AutoCity','Supplier_Login','Supplier','AjaxSignup','AjaxUniqe','ForgotPassword','ResetPassword','Notifictaion','Activation','VerifyActivation','AdminLink','Recommendation','NewPassword','PrivacyTerms','Contact','Search','Signups','Logout','GetNames','DynamicCity','DynamicPriceTire','Linkedin','LinkedinAfter','Reminder','HourlyReminder','test','SendChatMessage','NewProject','Calculate','CreateService','NewLogIn','NewSignUp','CreateSkill','NewLinkedin','NewLinkedinAfter','NewProjSubmit','Reply','Calculator','GetCalculatorJson','SaveCalculatorData','CalcResult','CalculatorAjaxUniqe','startcalculator','costofbuildinganapp','calculatorcall','ebookdownload','indexcall','Profile','backSearch'),'users'=>array('*')),\n array('deny', 'users'=>array('*'),),\n\t\t);\n }", "title": "" }, { "docid": "1bcc54fc1f6a7a3fcbc105e8e370700b", "score": "0.6819569", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'quick', 'approve', 'alljobs'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'apply', 'contractor', 'toggle', 'pdfexport'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "699366a21c68788be9e4dc2bad95c665", "score": "0.68187547", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view', 'create', 'update', 'admin', 'delete'),\n\t\t\t\t'expression'=>'$user->isAdmin()'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "bbc8317f6d44b5677af4ebab77242020", "score": "0.6818451", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','admin','cambio','colocacambio','actualizacambio'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "5dccf76c666269b49e1b124c649f3aa7", "score": "0.6816726", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n 'Index',\n 'Add',\n 'Edit',\n 'DeleteGenre',\n 'Save',\n 'ActivateGenre',\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "5a1f0461fd03e960b3a2cae195b2c86c", "score": "0.6815784", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\t// array('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t// 'actions'=>array('index','view'),\n\t\t\t\t// 'users'=>array('*'),\n\t\t\t// ),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('ajaxLoadChild', 'addTier', 'ajaxAddTier', 'ajaxEditTier'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\t// array('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t// 'actions'=>array('admin','delete'),\n\t\t\t\t// 'users'=>array('admin'),\n\t\t\t// ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "92cd5bc754349472f02efd1d3dc4a0b9", "score": "0.6815449", "text": "public function accessRules()\n {\n return [\n ['allow', 'users' => ['@'] ],\n\t\t\t['deny'],\n\t\t];\n }", "title": "" }, { "docid": "81412818e7ee4868c6e9c06505f3b917", "score": "0.6812669", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'list', 'update', 'index1', 'pubreport', 'assign','assigned'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "33d2f9f62629c94ad966aa1ff41bf174", "score": "0.6811876", "text": "public function accessRules()\n\t{\n\t\treturn CMap::mergeArray(parent::accessRules(), array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view', 'lookup', 'suggest', 'suggestComposition', 'suggestCompositions', 'suggestSystemChanged', 'heisig', 'matthews', 'radicals', 'bySystem', 'browse'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete', 'autocorrect'),\n\t\t\t\t'roles'=>array('admin'),\n// \t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "b65663b2ef23609c4828a828391a233d", "score": "0.6811852", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index', 'search', 'siteSearch', 'feedback', 'currencies', 'languages', 'subscription', 'subscribed', 'unsubscribe', 'error', 'logout', 'sitemapxml', 'socialLogin', 'sitemap', 'switchSidebar', 'gMapsAutocomplete'),\n\t\t\t\t//'users'=>array('*'),\n 'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('admin', 'adminSearch', 'test', 'getJSONSitemap', 'imageGetJson', 'imageUpload', 'fileUpload'),\n\t\t\t\t'users'=>Yii::app()->user->getAdmins(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e724bf03106e3418e17c311e87459fd4", "score": "0.6809291", "text": "public function accessRules() {\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions' => array('admin'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "858a76b074f73b65c6aeb625aabe2f34", "score": "0.68077433", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n 'Index',\n 'GetProjects',\n 'GetJobsTimeline',\n 'GetJobsTimelineNew',\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin', 'client')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "564acf67526285f266b075cc0281157e", "score": "0.6805144", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array(\n 'index','view','create','update','delete',\n 'GenerateSubIndustri','GenerateKota',\n 'preview',\n 'GetEmailDesc','GetEmail','dataDiri',\n 'watchlist','beli','uploadImage','RemoveUploadedImage',\n 'uploadDocument','RemoveUploadedDocument'),\n\t\t\t\t'roles'=>array('member'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n //'deniedCallback' => function() { Yii::app()->controller->redirect(array('/home/index')); }\n\t\t);\n\t}", "title": "" }, { "docid": "6f61a8c39f395e20efc3e6f349dae515", "score": "0.68041533", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('admin','star','changeStar','reply','createExcel'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "ce774a8ffbd2cf889e19c3054ccdabfc", "score": "0.6798013", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','getListBydays'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','report','AutocompleteFirstName',\n\t\t\t\t\t\t'AutocompleteCompanyName','AutocompleteLastName','AutocompleteEarNotch','AutocompleteEarTag',\n\t\t\t\t\t\t'GetEarNotch','AutocompleteSemenType','insertSemenType','ChangeStatus','GetComitStandbyDoses','getListBydays','getDetailById','bill'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "98c64711e0ec4444a39a42746fd4a26c", "score": "0.67973566", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'getasin', 'detail'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "543a2ee02cec3e56e218638fc33cdd1d", "score": "0.6796782", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('view'),\n\t\t\t\t'expression'=>'Rbac::ruleAccess(\\'read_p\\')',\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','install'),\n\t\t\t\t'expression'=>'Rbac::ruleAccess(\\'create_p\\')',\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('update'),\n\t\t\t\t'expression'=>'Rbac::ruleAccess(\\'update_p\\')',\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'expression'=>'Rbac::ruleAccess(\\'delete_p\\')',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "5bfe753b394d6e82065c2f1ff19a7aa7", "score": "0.679667", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view', 'create','update', 'tolak', 'setuju', 'cetak'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "328ef2f5de181ff2fa01034d2ad3c3c8", "score": "0.679335", "text": "public function accessRules()\n {\n return [\n [\n 'allow' => true,\n 'matchCallback' => function($rule, $action)\n {\n // If no user is logged in.\n if(!$user = Yii::$app->user->getIdentity())\n {\n return false;\n }\n \n // These users can do everything.\n if(in_array($user->username, Yii::$app->params['app.special_users']) ||\n (Yii::$app->getParameter('enable_auth_management', false) &&\n Yii::$app->authManager->getAssignment('Administrator', $user->id)\n ))\n {\n return true;\n }\n \n // If auth management is disabled.\n if(!Yii::$app->getParameter('enable_auth_management', false))\n {\n return !Yii::$app->user->isGuest && $user->superuser; // Super users can access everything.\n }\n \n return false;\n }\n ]\n ];\n }", "title": "" }, { "docid": "cf86188ff7312b41e54f89eca0b31428", "score": "0.67927057", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow authenticated users to perform 'index' and 'view' actions\n 'actions'=>array('index','view','list'),\n 'users'=>array('@'),\n ),\n /*array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array('create','update'),\n 'users'=>array('@'),\n ),*/\n array('allow', // allow admin user to perform 'admin' \n 'actions'=>array('admin'),\n 'users'=>array('admin'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "a86b0f10cdc6e06e407de58c67c0c769", "score": "0.679209", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','ordenar_convenciones', 'ordenar','cambiarpadre'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','actualizar'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\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": "fd3ff688fd162563089590c7bad4145e", "score": "0.8316634", "text": "public function authorize()\n {\n // Validate that the user can access the user object\n // that they want to see (eg. themselves).\n return Auth::user()->id === $this->user->id;\n }", "title": "" }, { "docid": "34a6a0df94cc2696351f4886776bd19f", "score": "0.82418275", "text": "public function authorize()\n {\n $user = Auth::user();\n\n if ($user = $this->owner_id) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f29b65e3ad800650ec916179342feb76", "score": "0.82025534", "text": "public function authorize()\n {\n $authUser = auth()->user();\n $user = $this->user ?? new User;\n\n switch ($this->method()) {\n default:\n return $user->id == $authUser->id;\n break;\n }\n }", "title": "" }, { "docid": "348501c453e219a1b37fd6ffd62875a0", "score": "0.8201813", "text": "public function authorize()\n {\n return $this->user()->isCompany() && $this->user()->id === (int) $this->route('user');\n }", "title": "" }, { "docid": "b7d4fd6d4592daafb5a4d249fd65499a", "score": "0.8091309", "text": "public function authorize()\n {\n // Authorization parameters.\n $isLoggedIn = Auth::check();\n $belongsToReviewTeam = Auth::user()->isPartOfAuthoringTeam($this->resource->id);\n $isTeamOwner = $this->team->owner_id === Auth::user()->id;\n return $isLoggedIn && ($belongsToReviewTeam || $isTeamOwner);\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.8070438", "text": "public function isAuthorized();", "title": "" }, { "docid": "bab24f9bdca48cb54dc95d07f39cf85e", "score": "0.8041545", "text": "public function authorize()\n {\n return null === $this->user();\n }", "title": "" }, { "docid": "b74a0a6577b4e508e1c46aae5a1adff6", "score": "0.80296624", "text": "public function authorize()\n {\n if (Auth::user()->hasRole('admin')) {\n return true;\n }\n\n if (Auth::user()->id == $this->getUserId()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "bc45c134a44221d8a79e7ea002b4a57c", "score": "0.80141574", "text": "public function authorize(): bool\n {\n return $this->hasAccess();\n }", "title": "" }, { "docid": "780d7997c348e948424c7a28eb64d4d2", "score": "0.7979924", "text": "public function authorize()\n {\n $accessor = $this->user();\n $user = $this->route('user');\n\n return $accessor->isAdmin() || \n ($accessor->isCommittee() && $accessor->hasKey('put-users')) || \n ($accessor->isEntrant() && $accessor->entry->id === $user->entry_id) || \n $accessor->id === $user->id;\n }", "title": "" }, { "docid": "8e64a8c8c86463cae319675933f00c0b", "score": "0.7974814", "text": "public function authorize()\n {\n if ($this->hasHeader('Authorization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8e64a8c8c86463cae319675933f00c0b", "score": "0.7974814", "text": "public function authorize()\n {\n if ($this->hasHeader('Authorization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d39cd74dd19725b319038fd93b77c139", "score": "0.7939632", "text": "public function authorize()\n {\n return !$this->user();\n }", "title": "" }, { "docid": "bcc4ee298230edabd05b3e294e753647", "score": "0.7933094", "text": "public function authorize()\n {\n // get the document from the URL parameter\n /** @var Document $document */\n $document = $this->route('document');\n\n // only authorize if the document is owned by the current authenticated user\n return (int)Auth::user()->id === (int)$document->user_id;\n }", "title": "" }, { "docid": "68cbbf2a944e943c11bb4d48842aef74", "score": "0.7932432", "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": "f41a1c22d956ea6f69470f616b9011a7", "score": "0.7925379", "text": "public function authorize()\n {\n if (!\\Auth::user()) return false;\n\n return true;\n }", "title": "" }, { "docid": "1b032eed3b8e92ae20fb2d8d5e712728", "score": "0.79232615", "text": "public function authorize()\n {\n return $this->user()->ownsTeam($this->merchant) || $this->user()->roleOn($this->merchant) === 'owner';\n }", "title": "" }, { "docid": "55ea5eb65a38f39b777e775b81513c73", "score": "0.78765327", "text": "public function authorize()\n {\n return (bool) session('user');\n }", "title": "" }, { "docid": "6101bf6a623fa89dde5c439291bb7778", "score": "0.7871892", "text": "public function authorized()\n {\n if (! $user = $this->user()) {\n return false;\n }\n\n return $this->laravel[\n \\Ignite\\Application\\Kernel::class\n ]->authorize($user);\n }", "title": "" }, { "docid": "c9d8ac530e8faff9ae7c9bdcb3972122", "score": "0.78673655", "text": "public function authorize()\n {\n if($this->isMethod('post')) {\n return ($this->user());\n }\n return true;\n }", "title": "" }, { "docid": "af9c9a14e34f423d8358a3cda69e782a", "score": "0.78563964", "text": "public function authorize()\n {\n return $this->user()->isMember();\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.78414804", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.78414804", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "86bf6d581c6840ee3b030b9d58e4de7b", "score": "0.78370017", "text": "public function authorize()\n {\n return Auth::user()->user_role === config('settings.roles.user');\n }", "title": "" }, { "docid": "54dfb30584f15ff135cc161a62a0949d", "score": "0.7831078", "text": "public function authorize()\n {\n return ($this->user()->ownsTeam($this->team) || $this->user()->onTeam($this->team));\n }", "title": "" }, { "docid": "4ec73613993002d512777b70d5e26322", "score": "0.78120255", "text": "public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n\n if ($this->isPut()) {\n return false;\n }\n\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('order'));\n }\n\n return true;\n }", "title": "" }, { "docid": "624b3b9a018ac46aae0f02666c345c51", "score": "0.7802283", "text": "function isAuthorized() {\n return $this->__permitted($this->name, $this->action);\n }", "title": "" }, { "docid": "5cd739f76ced8e7361226bb13cd2f058", "score": "0.7799382", "text": "public function authorize()\n\t{\n\t\treturn request()->invoice->user_id == request()->user()->id;\n\t}", "title": "" }, { "docid": "5cd22e33ce6a0fdb767fd4849141aec5", "score": "0.7797541", "text": "public function authorize()\n {\n if (Auth::user()->isAdministrator()) {\n return true;\n }\n\n if (Auth::user()->isModerator()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "07116c48ada1c6785196b221f5c7f3f9", "score": "0.7788291", "text": "public function isAuthorized()\n {\n return $this->authorized;\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7763308", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7763308", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "478d69cb43da81608656c7049f66c898", "score": "0.7761384", "text": "public function authorize()\n {\n if ($this->user_id == auth()->user()->id) { //Usuario autenticado\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "857b9caa6893ef6923f27d41ab568583", "score": "0.77446187", "text": "public function authorize()\n {\n if (Auth::user()->can('show-person')) return true;\n if ($this->userPersonOwns()) return true;\n return false;\n }", "title": "" }, { "docid": "3921ed55137de9c2512eb5493b937142", "score": "0.7737409", "text": "public function authorize()\n {\n if(Auth::user()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f1ea3ac29476bcd809b037f814df6a11", "score": "0.77254355", "text": "public function isAuthorised()\n {\n return (bool) $this->getField('AccessToken');\n }", "title": "" }, { "docid": "08484497785af91b6a0b744446c4bd98", "score": "0.77189934", "text": "public function isAuthorized(): bool\n {\n return is_null($this->apiKey) || $this->apiKey === $this->getTokenForRequest();\n }", "title": "" }, { "docid": "f95db51206e3cb2d7e9d88f6d7da1b37", "score": "0.7718805", "text": "public function authorize()\n {\n return $this->route('plans')->user_id === $this->user()->id;\n }", "title": "" }, { "docid": "977c162efbb9ce6cf5f45729c4416c11", "score": "0.7717961", "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": "7e1ccff54c713eb88e069c5a9d4b3a7e", "score": "0.77153224", "text": "public function authorize()\n {\n if ($this->idea->isAssignedToUser() && $this->idea->isApprovalAction()) {\n return true;\n } \n else {\n return false;\n }\n }", "title": "" }, { "docid": "502b47a5252f1cebb4ef712348fc56dd", "score": "0.77141184", "text": "public function authorize()\n {\n return Auth::check() && Auth::user()->isOwner();\n }", "title": "" }, { "docid": "9ae370975f6e15393247202f9f8a63dc", "score": "0.7712271", "text": "public function authorize()\n {\n if (User::find(Auth::id())) {\n return true;\n }\n }", "title": "" }, { "docid": "20b55879b6210ef8d63582930a1a4785", "score": "0.77078456", "text": "public function authorize()\n {\n return (Auth::user() != null);\n }", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.7703274", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "30a20a155c414c2f8aa945501ae38837", "score": "0.77029854", "text": "public function authorize()\n {\n return $this->route('comments')->user_id === $this->user()->id or $this->user()->hasRole('admin');\n }", "title": "" }, { "docid": "5d734afb04629c34e126e8f27ce0e2e0", "score": "0.7700584", "text": "public function authorize()\n {\n $article = $this->route('article');\n\n return $article->user_id == auth()->id();\n }", "title": "" }, { "docid": "1ed2d82a999694f941e3d64c888c5b12", "score": "0.76931214", "text": "public function authorize()\n {\n return auth()->user() && auth()->id() === $this->post->user_id;\n }", "title": "" }, { "docid": "e4c124cc5fe7599183ade2af2ab487b1", "score": "0.76906025", "text": "public function authorize()\n {\n $project = Project::find($this->project_id);\n return Auth::user()->id == $project->user_id;\n }", "title": "" }, { "docid": "d83ef02943b1b7ac86cb0e962ab7f243", "score": "0.76609355", "text": "public function authorize()\n {\n $song = Song::find($this->id);\n\n if (!$song) {\n abort(404);\n }\n\n return $song->user_id == $this->user()->id;\n }", "title": "" }, { "docid": "1ad1bf69a7c3d659cd33ce54aa623a10", "score": "0.7660643", "text": "public function authorize()\n {\n //verify if the user is logged in\n if ( ! \\Auth::check() )\n {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "9177d507e146b0cce2bb199d1caf7b78", "score": "0.7654033", "text": "public function authorize()\n {\n $note = Note::find($this->route('note'));\n return $note->user_id == Auth::id();\n }", "title": "" }, { "docid": "7cc2b30abc40dabdb5036a5662a74a5a", "score": "0.76524013", "text": "public function authorize()\n {\n if (property_exists($this, 'right')) {\n return auth()->user()->hasRight($this->right);\n }\n\n if (property_exists($this, 'scope')) {\n return auth()->user()->tokenCan($this->scope);\n }\n\n return true;\n }", "title": "" }, { "docid": "4fec6c640f34899b2442e74325200da6", "score": "0.7651618", "text": "public function authorize()\n {\n // make it true to mark user as authorized by default\n return true;\n }", "title": "" }, { "docid": "5a8e2f536a7056e9f71e6f17c4df79e7", "score": "0.7646542", "text": "public function authorize()\n {\n return $this->user() && $this->user()->can('view_clients_list', $this->partnerId);\n }", "title": "" }, { "docid": "2b76c490dd02b07e68bbfab6d03576b8", "score": "0.76431626", "text": "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "title": "" }, { "docid": "893fefcaa8f0bbabe2639b6e2fc59c84", "score": "0.76401085", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "b982760a34fabec6eac70b63cf03621d", "score": "0.76382285", "text": "public function authorize()\n {\n if (auth()->user()->role_id == 1) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4878eee6520e0a08bdaaea84585687be", "score": "0.76351017", "text": "public function authorize() {\n\t\t\t\n\t\t\treturn $this->user()->id == $this->route('apartment')->owner()->id;\n\t\t}", "title": "" }, { "docid": "2fe827d9d9140e8d266098a7f2ecd6fa", "score": "0.762643", "text": "public function authorize(): bool\n {\n if ($this->user() && $this->user()->hasRole('Admin')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "887df57bffd1719000d1168d8265094c", "score": "0.76207817", "text": "public function authorize()\n {\n if ($this->path() == 'account/profile')\n {\n return true;\n } else {\n return false;\n }\n // return false;\n }", "title": "" }, { "docid": "1c7186888e48b1402fd46c6261b42b82", "score": "0.7617843", "text": "public function authorize()\n {\n if (!__me()) {\n return false;\n }\n\n if (__me()->role === 'client') {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "dedd9095f571d210cdbaecbf89a29b33", "score": "0.75845", "text": "public function authorize()\n\t{\n\t\tif($this->auth->guest()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4c54020c6c60ab51e81a9670d68b022b", "score": "0.7582351", "text": "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser', 'hrassistant'])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "5c3054de36bf03a81372df44a9b89490", "score": "0.7579089", "text": "public function authorize()\n {\n return $this->player->id === $this->user()->player->id;\n }", "title": "" }, { "docid": "7fc38f803c2fc845adf98a44bc225bf0", "score": "0.75681597", "text": "public function authorize()\n {\n if (!parent::authorize()) {\n return false;\n }\n\n if (!$this->isMethod('post')) {\n return false;\n }\n\n if (is_null($this->getStudentIdFromSession())) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "b8b88b38c2d1a985b96069c589d40b44", "score": "0.7567378", "text": "public function authorize()\n {\n // An admin, org owner and org admin can upload contactss\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "649ecd8a04a105031eac55c89f4e49eb", "score": "0.7560174", "text": "public function authorize()\n {\n if($this->user_id == auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "2f003a517bea0d57faf74870a3b3acfd", "score": "0.75596505", "text": "public function authorize()\n {\n $article = Article::find($this->route('article_id'));\n return $article && Auth::user()->id === $article->author_id;\n }", "title": "" }, { "docid": "3fa5ee1df664605bb17b3bfa40ec28b7", "score": "0.7549135", "text": "public function isAuth()\n {\n return $this->verifyPermission();\n }", "title": "" }, { "docid": "a49eccec61b8bac41f9f3234427040af", "score": "0.7543172", "text": "public function authorize()\n {\n return $this->user()->isadmin();\n }", "title": "" }, { "docid": "34d8ab2e8805f3f042df40e6b2babbe2", "score": "0.7542835", "text": "public function authorize()\n {\n return $this->user('api')->can('viewAny', finder()->findClass(finder()->currentResource()));\n }", "title": "" }, { "docid": "74b33e77a0e2b75921bd831822c73d0b", "score": "0.7539183", "text": "public function authorize()\n\t{\n // Fetch the user from the database.\n //\n $user = $this->fetchRecord();\n\n // The user must be logged in, the user record must exist, and the\n // user trying to edit the record must be the account holder.\n //\n return Auth::check() && $user && $user->isAccountHolder();\n\t}", "title": "" }, { "docid": "b58c3a135dcc547b6bc60cf41aeb48c0", "score": "0.7539085", "text": "public function authorize()\n {\n return $this->user()->can('viewAny', $this->route('update'));\n }", "title": "" }, { "docid": "794a084d80fcd37dd578968b6a90ddfa", "score": "0.75349283", "text": "public function authorize()\n {\n $post = $this->route('post');\n return $post->user_id == auth()->user()->id;\n }", "title": "" }, { "docid": "ecefe5c79260c348240bfd0df54cf820", "score": "0.7531557", "text": "public function authorize()\n {\n $batch = Batch::find($this->route('batch_id'));\n return $batch && $batch->owner_id == Auth::ownerId();\n }", "title": "" }, { "docid": "610cc97bc06d9a75e91195ad48404e59", "score": "0.75308484", "text": "public function authorize()\n {\n $team = $this->route('team');\n\n $member = $this->route('team_member');\n\n return ($this->user()->ownsTeam($team) && $this->user()->id !== $member->id) ||\n (! $this->user()->ownsTeam($team) && $this->user()->id !== $member->id);\n }", "title": "" }, { "docid": "b1ae796968ef1d83cd65fd804c750672", "score": "0.75280696", "text": "public function authorize()\n {\n return $this->container['auth']->check();\n }", "title": "" }, { "docid": "9553cf4077a4efedd5d69e2f775199fc", "score": "0.7525143", "text": "public function authorize()\n {\n if(auth()->check())return true;\n return false;\n }", "title": "" }, { "docid": "9b61fec3e7a69ac4cfb7dc190a1651b5", "score": "0.75190693", "text": "public function authorize()\n\t{\n\t\t// only allow updates if the user is logged in\n\t\treturn \\Auth::check();\n\t}", "title": "" }, { "docid": "7d8f6561352ed47a2d063e7d341a6ad5", "score": "0.75169873", "text": "public function authorize()\n {\n if (Auth::user()->roles()->first()->role == 'admin' && Auth::check()) return true;\n\n return false;\n }", "title": "" }, { "docid": "63b722e3507fccc9ed6815168a337646", "score": "0.7516394", "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": "12ec45746bcaed1634532b2424547923", "score": "0.75000906", "text": "public function authorized()\n {\n return true;\n }", "title": "" }, { "docid": "b6f47f66b14ee579d3e6b1a9a1c83500", "score": "0.7497433", "text": "public function authorize()\n {\n $user = app( 'auth' )->user();\n $el = Musicalbum::findOrFail( $this->route('id') );\n\n return $user->isId( $el->user_id );\n }", "title": "" }, { "docid": "80d8aeb4c1ed5e261236983e64dc0d29", "score": "0.74937385", "text": "public function authorize()\n {\n if ( ! \\Auth::check() )\n {\n return false;\n }\n\n $routeParams = \\Route::current()->parameters();\n\n $flightIdTable = new FlightID();\n $selectedFlight = $flightIdTable->find($routeParams['flights']);\n\n if ($selectedFlight->fleet_id != \\Auth::user()->org_id)\n {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "abf58876ed25b8a80cce4f879ed3bba7", "score": "0.7492277", "text": "public function authorize()\n {\n return Auth::check() ? true : false;\n }", "title": "" }, { "docid": "d1d129a44bb9c7b664aec08f062ef03f", "score": "0.74920726", "text": "public function authorize()\n {\n return !empty($this->user()->company);\n }", "title": "" }, { "docid": "2dd74b5d2c706ae12ce8d6167ec9510f", "score": "0.7491949", "text": "public function authorize()\n {\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "72914acb0198bc54c343122b30392285", "score": "0.74898624", "text": "public function authorize()\n {\n return $this->user()->can(\n 'update',\n $this->route('professional') ? $this->route('professional') : $this->user()\n );\n }", "title": "" }, { "docid": "592807267efc77cd9e6af3c89de6b8fe", "score": "0.748952", "text": "public function authorize()\n\t{\n if (\\Auth::check())\n {\n return true;\n }\n\n return false;\n\t}", "title": "" }, { "docid": "f9c31ff6fa6d8d53e9149d07d8489ae1", "score": "0.74845606", "text": "public function authorize()\n {\n // TODO I am just returning true for now\n return true;\n }", "title": "" }, { "docid": "63f1b94c22dbb79942e6eacee4655b96", "score": "0.7478443", "text": "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "title": "" }, { "docid": "e6f3b3d0957fba948d39da6748caf251", "score": "0.74733174", "text": "public function authorize()\n {\n $person_id = $this->route('id');\n\n return Auth::user()->isFriend($person_id) || Auth::user()->isGuest();\n }", "title": "" }, { "docid": "7c346768ea98baf86426671339aa4d81", "score": "0.74726367", "text": "public function authorize()\n {\n return $this->user()->isSuperAdmin();\n }", "title": "" }, { "docid": "ea1439b16c717357e51c5b1a5932b783", "score": "0.7470864", "text": "public function authorize() : bool\n {\n $user = Auth::user();\n\n switch ($this->get(\"role\")) {\n\n case User::ROLE_ADMINISTRATOR:\n return $user->can(\"viewAdministrators\", User::class);\n\n case User::ROLE_VIEWER:\n return $user->can(\"viewViewers\", User::class);\n\n case User::ROLE_STUDENT:\n return $user->can(\"viewStudents\", User::class);\n\n default:\n return true;\n\n }\n }", "title": "" }, { "docid": "6f8cb1bf5643537fc982e657278a299b", "score": "0.74703294", "text": "public function authorize()\n {\n if(Auth::check()) return true;\n return false;\n }", "title": "" }, { "docid": "ca04baba823e5d24ced850676977b129", "score": "0.7464126", "text": "public function authorize(){\n if($this->method() == 'POST'){\n return Auth::user()->can('user.create');\n }\n if($this->method() == 'PUT'){\n return Auth::user()->can('user.update');\n }\n return false;\n }", "title": "" }, { "docid": "583ca956e7b8aebc9310315b86d4f7e3", "score": "0.7460991", "text": "public function authorize()\n {\n return User::where('id', $this->id)\n ->where('id', Auth::id())->exists();\n }", "title": "" }, { "docid": "76221bc9a79a6d21c14e431698edbfe4", "score": "0.7452535", "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 // View the dashboard for the specified CO?\n $p['dashboard'] = ($roles['cmadmin'] || $roles['coadmin'] || $roles['comember']);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }", "title": "" }, { "docid": "642d177a20d90527729292ca598ee9fc", "score": "0.7450775", "text": "public function authorize()\n {\n // TODO: make sure to only allow users with the correct permissions\n // instead of just leaving this as true\n return true;\n }", "title": "" }, { "docid": "45d363020b1cd4e2157a088f18167b51", "score": "0.74485254", "text": "public function authorize() : bool\n {\n if (Auth::user() && Auth::user()->hasPermissionTo('manage users')) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d38ffa6d0bf7d48725c3f51b0ba93375", "score": "0.74419856", "text": "public function authorize()\n {\n return Auth::check() && $this->user()->isAdmin();\n }", "title": "" } ]
f0a9dd2d1efe05533818436c05e23b71
Allow you to run creating fixture
[ { "docid": "ca0de50efca08b6b4ab5f9fe54f40c98", "score": "0.0", "text": "public function load(ObjectManager $manager)\n {\n $user = new User();\n $user->setUsername('kostya');\n $user->setEmail('[email protected]');\n $user->setPassword('$2y$13$LfKbb4tDi7arhgr8Mtk5n.5X2fKUsh6rMZu4lNo6vh0mJNDxn53/S');//123456789q\n $user->setEnabled(1);\n $user->setRoles(['ROLE_USER','ROLE_ADMIN']);\n\n $manager->persist($user);\n $manager->flush();\n }", "title": "" } ]
[ { "docid": "8dca388eb4f8011a96020384c5ae1c8c", "score": "0.75542766", "text": "public function run()\n {\n App\\FeaturedFixture::create([\n 'date' => '31st March', \n 'squad' => 'U11s A',\n 'home_team' => 'Drumcondra',\n 'away_team' => 'Clontarf',\n 'location' => 'Clonturk Park',\n 'time' => '10:30am'\n ]);\n }", "title": "" }, { "docid": "ab2c476313108964ffe984b2cd895d15", "score": "0.6982461", "text": "public function run()\n {\n DB::table('proposes')->insert(static::fixtures());\n }", "title": "" }, { "docid": "4b692d56696dd56d8c1e33b6c27044fa", "score": "0.6795493", "text": "public function run()\n {\n $faker = Faker::create();\n\n Deceased::Create([\n \t\t'name' =>\t$faker->name,\n \t\t'sex' =>\t$faker->boolean(50) ? 'male' : 'female',\n \t\t'age' =>\t$faker->numberBetween(1, 60),\n \t\t'country' =>\t$faker->country,\n \t\t'city' =>\t$faker->city,\n \t\t'death_cause' =>\t$faker->text,\n \t\t'death_date' =>\t$faker->date('Y-m-d', 'now'),\n 'user_id' => User::all()->random()->id,\n \t]);\n }", "title": "" }, { "docid": "ae9eb6c6e0df9bd0daa5b1ac3f8f1320", "score": "0.67905205", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n factory(Project::class, 50)->create();\n\n }", "title": "" }, { "docid": "715f967397de71e87073c45b054d6c6f", "score": "0.67125344", "text": "public function run()\n {\n factory(App\\Models\\Test::class, 10)->create();\n }", "title": "" }, { "docid": "f35168892c08ef3c4e9ecc6d4438df6d", "score": "0.66845495", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Customer::factory(10)->create();\n \\App\\Models\\Company::factory(10)->create();\n // $this->call('seedername::class'); you cas addthis to call seeder files or use facvrory here c:\n }", "title": "" }, { "docid": "4d0d46659c62dc59890f81de5a3d20a8", "score": "0.6646742", "text": "public function run()\n {\n// $faker = Faker::create('App\\Project');\n// Project::insert([\n// 'ProjectTitle' => $faker->sentence,\n// 'Descriptive' => $faker ->paragraphs\n// ]);\n\n Project::create(\n//\n [\n 'ProjectTitle'=>\"Mon deuxième super projet\",\n 'Descriptive'=>\"L’objectif est de remplir la base de données avec un Seeder.\",\n ]\n );\n }", "title": "" }, { "docid": "683fe07a27cb73513fafd1daf847ecc8", "score": "0.66179967", "text": "public function run()\n {\n $this->setUpFaker();\n\n factory(Field::class, 8)\n ->create();\n }", "title": "" }, { "docid": "b4eac24a22b533fd51713da5499b025c", "score": "0.66080374", "text": "public function run()\n {\n User::factory()->create([\n \"name\" => \"spike\",\n \"email\" => \"[email protected]\"\n ]);\n\n User::factory()->create([\n \"name\" => \"testuser\",\n \"email\" => \"[email protected]\"\n ]);\n\n Project::factory(200)->create();\n }", "title": "" }, { "docid": "dfb1c888e77e8208dca5305f6e23c816", "score": "0.6589852", "text": "public function run()\n {\n factory(User::class,1)->create();\n factory(Phases::class,1)->create([\"name\" => \"Identify\"]);\n factory(Phases::class,1)->create([\"name\" => \"Protect\"]);\n factory(Phases::class,1)->create([\"name\" => \"Detect\"]);\n factory(Phases::class,1)->create([\"name\" => \"Respond\"]);\n factory(Phases::class,1)->create([\"name\" => \"Recover\"]);\n // factory(Phases::class,1)->create([\"name\" => \"Testing\"]);\n // factory(Categories::class,1)->create([\"name\" => \"Testing\"]);\n // factory(Categories::class,1)->create([\"name\" => \"Testing\"]);\n }", "title": "" }, { "docid": "3599ccb2f7c32cbed3c3b3980e24dff9", "score": "0.65680087", "text": "public function run()\n {\n EMGenero::create([\n 'id' => '1',\n 'name' => 'Masculino',\n 'created_at' => now()\n ]);\n\n EMGenero::create(['id' => '2',\n 'name' => 'Femenino',\n 'created_at' => now()\n ]);\n\n $faker = Faker\\Factory::create();\n\n }", "title": "" }, { "docid": "818c7d8190eeb8b975e49181fd18e7e8", "score": "0.6540903", "text": "public function run()\n {\n Department::factory()->create(['departmentname' => 'Finance' ]);\n Department::factory()->create(['departmentname' => 'Controlling' ]);\n Department::factory()->create(['departmentname' => 'Development' ]);\n Department::factory()->create(['departmentname' => 'Marketing' ]);\n Department::factory()->create(['departmentname' => 'Human Resources' ]);\n }", "title": "" }, { "docid": "0ca3dc6433c511cbecf7eb5189c5ec83", "score": "0.65407664", "text": "public function run()\n {\n factory(App\\Tractors::class, 2)->create();\n }", "title": "" }, { "docid": "812d5e093703bd8e4f3b7e5da0c5cadc", "score": "0.65371114", "text": "public function run()\n {\n $faker = Factory::create();\n \n\n // Client\n factory(User::class, 1)->create();\n }", "title": "" }, { "docid": "8d65c1684f308b27cacfd31a134ca4b0", "score": "0.65363455", "text": "protected function fixture(){\n $this->clearAll();\n \n $this->createUser('foo');\n\n\n $this->seller = $this->createUser('seller');\n $loc = $this->createLocation();\n //$loc->\n $evt = $this->createEvent('Barcelona vs Real Madrid', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'aaaaaaaa');\n $this->catA = $this->createCategory('Category A', $evt->id, 25.00, 1);\n $this->catB = $this->createCategory('Category B', $evt->id, 10.00);\n $this->catC = $this->createCategory('Category C', $evt->id, 5.00);\n \n \n $loc = $this->createLocation();\n $evt = $this->createEvent('Water March', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'bbbbbbbb');\n $this->createCategory('Zamora Branch', $evt->id, 14.00);\n \n $evt = $this->createEvent('Third Event', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ccc');\n $this->createCategory('Heaven', $evt->id, 22.50);\n $this->createCategory('Limbo', $evt->id, 22.50);\n \n \n $this->seller = $this->createUser('seller2');\n $loc = $this->createLocation();\n $evt = $this->createEvent('Transformers Con', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'tttttttt');\n $this->createCategory('Autobots', $evt->id, 55.00);\n }", "title": "" }, { "docid": "8d65c1684f308b27cacfd31a134ca4b0", "score": "0.65363455", "text": "protected function fixture(){\n $this->clearAll();\n \n $this->createUser('foo');\n\n\n $this->seller = $this->createUser('seller');\n $loc = $this->createLocation();\n //$loc->\n $evt = $this->createEvent('Barcelona vs Real Madrid', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'aaaaaaaa');\n $this->catA = $this->createCategory('Category A', $evt->id, 25.00, 1);\n $this->catB = $this->createCategory('Category B', $evt->id, 10.00);\n $this->catC = $this->createCategory('Category C', $evt->id, 5.00);\n \n \n $loc = $this->createLocation();\n $evt = $this->createEvent('Water March', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'bbbbbbbb');\n $this->createCategory('Zamora Branch', $evt->id, 14.00);\n \n $evt = $this->createEvent('Third Event', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ccc');\n $this->createCategory('Heaven', $evt->id, 22.50);\n $this->createCategory('Limbo', $evt->id, 22.50);\n \n \n $this->seller = $this->createUser('seller2');\n $loc = $this->createLocation();\n $evt = $this->createEvent('Transformers Con', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'tttttttt');\n $this->createCategory('Autobots', $evt->id, 55.00);\n }", "title": "" }, { "docid": "fc8031a77be04b54bc14fd04c8053ada", "score": "0.6535081", "text": "public function run()\n {\n $quiz = factory(Quiz::class)->create();\n factory(Question::class, 10)->create(['quiz_id' => $quiz->id]);\n }", "title": "" }, { "docid": "0c53adc16aa0a7365154f9954197d03d", "score": "0.65249175", "text": "public function run()\n\t{\n if (!$this->faker) {\n $this->faker = Faker::create();\n }\n\n ($this\n ->seedUsers()\n ->seedPhotos()\n ->seedComments()\n ->seedFollows()\n ->seedLikes()\n );\n $this->command->info('Testing seed complete.');\n\t}", "title": "" }, { "docid": "cae456f16412f183f0334762c96ef0f7", "score": "0.65176153", "text": "public function run()\n {\n factory(App\\Models\\Team::class)->create([\n 'name' => 'Manchester United',\n ]);\n factory(App\\Models\\Team::class)->create([\n 'name' => 'Real Marid',\n ]);\n factory(App\\Models\\Team::class)->create([\n 'name' => 'Dortmund',\n ]);\n\n }", "title": "" }, { "docid": "98c6b89e82efa6da4de3ca35e12f3d55", "score": "0.6517426", "text": "public function run()\n {\n factory(App\\Todo::class, 5)->create(); //it will create 5 times the info from file TodoFactory.php\n }", "title": "" }, { "docid": "045e44ea4553e72fcd4badd7552f25e8", "score": "0.65037924", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Testdrive::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n factory(Testdrive::class, 100)->create();\n// $faker = Factory::create();\n//\n// for($i = 0; $i < 100; $i++){\n// $date = $faker->dateTimeBetween('-10 years', 'now');\n//\n// Testdrive::create([\n// 'email' => $faker->email,\n// 'name' => $faker->name,\n// 'age' => $faker->numberBetween(18, 60),\n// 'msg' => $faker->text(10000),\n// 'my_time' => $date,\n// 'created_at' => $date,\n// 'updated_at' => $date\n// ]);\n// }\n }", "title": "" }, { "docid": "3b777db0d564aeb19778345513d81325", "score": "0.6491616", "text": "public function run()\n {\n\t\n\t $faker = \\Faker\\Factory::create();\n\t \n\t foreach(range(1, 100) as $i){\n\t\t Article::create([\n\t\t\t 'category_id' => $faker->numberBetween(1, 10),\n\t\t\t 'poster_user_id' => $faker->numberBetween(1, 100),\n\t\t\t 'title' => $faker->title,\n\t\t\t 'teaser' => $faker->sentence,\n\t\t\t 'content' => $faker->realText(1000)\n\t\t ]);\n\t }\n }", "title": "" }, { "docid": "050589bc94b5e8c320f3a0bde540f159", "score": "0.64905846", "text": "public function run()\n {\n\n factory(App\\Trainer::class,30)->create();\n\n }", "title": "" }, { "docid": "3ed9efbcf6731a0c52042e9e8dc945da", "score": "0.6487602", "text": "protected function createOwnSeeder()\n {\n $this->call('easymake:seeder', [\n 'name' => $this->argument('name') .'Seeder',\n '--table' => $this->getTableName()\n ]);\n }", "title": "" }, { "docid": "e70b0c38bed9af3bbeb473f4b58775a6", "score": "0.64859325", "text": "public function setUp() {\n\t\t$directory = dirname(realpath(dirname(__FILE__))) .'/tests/fixtures';\n\t\t$this->circleFixture = json_decode(file_get_contents($directory . DIRECTORY_SEPARATOR . 'circle.json'), TRUE);\n\t\t$this->rectangleFixture = json_decode(file_get_contents($directory . DIRECTORY_SEPARATOR . 'rectangle.json'), TRUE);\n\t\t$this->triangleFixture = json_decode(file_get_contents($directory . DIRECTORY_SEPARATOR . 'triangle.json'), TRUE);\n\t}", "title": "" }, { "docid": "b17d59cb0eea8206b432afe676804079", "score": "0.6471831", "text": "public function run()\n {\n factory(App\\User::class, 50)->create();\n factory(App\\Task::class, 50)->create();\n }", "title": "" }, { "docid": "8e371b21dadeffd75b4a6529812d0c1b", "score": "0.6467345", "text": "public function run()\n {\n //Cach 1\n // $data = [\n // \t[\n // \t\t'name'=>'post1',\n // \t\t'user_id'=>1\n // \t],\n // \t[\n // \t\t'name'=>'post2',\n // \t\t'user_id'=>2\n // \t],\n // ];\n // Post::insert($data);\n //Cach 2 goi file FACTORY\n factory(App\\Post::class,20)->create(); // Post chính là tên ở PostFACTORY sau đó t qua DatabaseSeeder đe khai báo cho nó chạy ở hàm RUN\n }", "title": "" }, { "docid": "c1a6f80be58a9e4cea1166438020a99f", "score": "0.64667815", "text": "public function create()\n {\n $teams = Country::pluck('name','id');\n $rounds = Round::pluck('round_name','id');\n $groups = Group::pluck('group_name', 'id');\n\n $stadia = Stadium::pluck('name','id');\n\n return view('admin.fixture.create', compact('teams','rounds','groups','stadia'))->with('title','World cup | Fixture ');\n }", "title": "" }, { "docid": "b189886f56afaa2c48cfbacb3094ad2c", "score": "0.64587975", "text": "public function run()\n {\n //\n $faker = Faker\\Factory::create();\n for($i = 0; $i<50;$i++){\n App\\Book::create([\n\n 'titel' => $faker->sentence,\n 'auteur'=> $faker->name,\n 'isbn'=> $faker->isbn10,\n 'jaartal'=> $faker->year,\n 'editie'=> $faker->numberBetween(1,5),\n 'desc'=> $faker->text,\n /*'photo'=> $faker->photo,*/\n ]);\n }\n }", "title": "" }, { "docid": "299b1c4be0667e31a5ef9a333ee739a3", "score": "0.6457903", "text": "public function run()\n {\n \t// This command will tell the artisan to create 20 fake insertions of the User class\n factory(App\\User::class, 1000)->create();\n }", "title": "" }, { "docid": "01ab98199454c942078d3fbdd8dd3245", "score": "0.6453774", "text": "public function run()\n {\n\n if ($this->command->confirm('This will delete existing data from the database and create new seed data. Are you sure you want to continue?')) {\n\n $path = public_path().'/storage/uploads/avatars';\n if (File::isDirectory($path)) { File::deleteDirectory($path); }\n File::isDirectory($path) or File::makeDirectory($path, 0777, true, true);\n\n DB::table('pets')->delete();\n DB::table('users')->delete();\n DB::table('tags')->delete();\n DB::table('taggables')->delete();\n\n $this->createDevUser();\n\n // create users\n factory(App\\User::class, 25)->create()->each(function ($user) {\n\n // (maybe) create pets\n $pets = [];\n factory(App\\Pet::class, rand(0, 3))->create()->each(function ($pet) use ($user) {\n $user->pets()->save($pet);\n $pets[] = $pet;\n });\n\n });\n\n $this->command->info('Successfully seeded database with sample users and pets. (login with [email protected]/secret)');\n } else {\n $this->command->line('db:seed command has been cancelled.');\n }\n }", "title": "" }, { "docid": "cd7e1fdc5f3a15aca8e83a0f2c4ab21f", "score": "0.6442631", "text": "public function run()\n {\n\n \t// DB::table('teacherxcompetences')->insert(['id_docente' => '4','id_especialidad' => '1','id_competence' => '1']);\n factory(Intranet\\Models\\Question::class, 25)->create();\n }", "title": "" }, { "docid": "af9a599eafe174e865aa3abf87ca5f2d", "score": "0.6407312", "text": "public function run()\n {\n factory(Setting::class,5)->create();\n factory(Slider::class,5)->create();\n factory(Team::class,5)->create();\n factory(Services::class,5)->create();\n factory(Contact::class,5)->create();\n factory(Quote::class,5)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "01b1f7655fc86d57efbd72f3b453dedb", "score": "0.6405893", "text": "public function run()\n {\n factory(User::class)->create([\n 'email' => '[email protected]'\n ]);\n\n factory(Category::class)->create(['name' => 'Web Development']);\n factory(Category::class)->create(['name' => 'Mobile Development']);\n factory(Category::class)->create(['name' => 'Architecture']);\n\n factory(Tag::class)->create(['name' => 'Larevel']);\n factory(Tag::class)->create(['name' => 'Vue']);\n factory(Tag::class)->create(['name' => 'React']);\n factory(Tag::class)->create(['name' => 'Tailwind css']);\n }", "title": "" }, { "docid": "52b1b43e7c4b6d699bf5a67b2499186d", "score": "0.6405159", "text": "public function run()\n {\n factory(\\App\\User::class , 100)->create();\n //factory(\\App\\Section::class , 8)->create();\n //factory(\\App\\Question::class , 70)->create();\n //factory(\\App\\Answer::class , 7000)->create();\n //factory(\\App\\Quiz::class , 200)->create();\n\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "966b5cf9fdb04bfb390e9a6532358bad", "score": "0.64047754", "text": "public function run()\n {\n $faker=Factory::create();\n foreach (range(1,5) as $index){\n DetailedTreatment::create([\n 'name' =>$faker->userName,\n 'treatmentPackageId'=>$index,\n 'professionalTreatment'=>$faker->name,\n 'location'=>$faker->name,\n 'patientId'=>$index,\n// 'therapistId'=>$index\n ]);\n }\n }", "title": "" }, { "docid": "486bc390c605d1485243a6a12d55dbb3", "score": "0.6400018", "text": "public function setUp()\n {\n $this->fixture = new AddLineItem();\n }", "title": "" }, { "docid": "486bc390c605d1485243a6a12d55dbb3", "score": "0.6400018", "text": "public function setUp()\n {\n $this->fixture = new AddLineItem();\n }", "title": "" }, { "docid": "1c7d13b4c022f3a243727f87f90cc123", "score": "0.63922465", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for($i = 0; $i <= 15; $i++)\n {\n \n $equip = equipamento::create(['descricao' => $faker->jobTitle]);\n \n }\n }", "title": "" }, { "docid": "61548d29ac4f9c14dda244fcc595ba01", "score": "0.63907313", "text": "public function run()\n {\n // $faker = Faker::create();\n // $types = array('quận', 'huyện', 'thị xã');\n // $provinces = Province::all()->pluck('id');\n // for ($i=0; $i < 100; $i++) {\n // $district = $faker->state;\n // District::create([\n // 'province_id' => $faker->randomElement($provinces->toArray()),\n // 'name' => $district,\n // 'type' => $types[rand(0, 2)],\n // 'slug' => str_slug($district),\n // 'created_at' => $faker->dateTimeThisYear($max = 'now')\n // ]);\n // }\n }", "title": "" }, { "docid": "8723cd02e92ec59d1bb079c328ebd2f9", "score": "0.6388725", "text": "public function run()\n {\n $chapters = factory(Chapter::class, 100)->create();\n }", "title": "" }, { "docid": "b8a1fcecf6f1b9d4341950ae42b797ab", "score": "0.638555", "text": "public function run()\n {\n $faker=Faker::create();\n\n $experience=Work_Experience::create([\n \n 'start_date'=>$faker-> date,\n 'ending_date'=>$faker-> date,\n 'activities'=>$faker-> realText,\n 'business'=>$faker-> Company,\n \n ]);\n }", "title": "" }, { "docid": "41b3b99e4653eac64fc3bd7bf53d3e8a", "score": "0.6382646", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n factory(Editorial::class,20)->create();\n factory(Author::class,20)->create();\n factory(Stand::class,20)->create();\n\n }", "title": "" }, { "docid": "2a2e06c37c669b5d94df1eccc70512b4", "score": "0.63724035", "text": "public function run()\n {\n //Seeds 30 Fake Users to your Database\n factory(App\\User::class, 30)->create();\n\n //Seeds 100 Posts to your database\n factory(App\\Post::class, 100)->create();\n }", "title": "" }, { "docid": "c919e0334c0133d2ee55dd2917ce0b88", "score": "0.6370274", "text": "public function run()\n {\n $faker=FAker\\Factory::create();\n $faker->addProvider(new \\Bezhanov\\Faker\\Provider\\Commerce($faker));\n for($i=0;$i<6;$i++){\n Category::create([\n 'name'=>$faker->department,\n 'description'=>$faker->text\n ]);\n }\n }", "title": "" }, { "docid": "0e597c8702b29bf2455dab357c69ebc4", "score": "0.6365489", "text": "public function run()\n {\n factory(Article::class, 3)->create();\n }", "title": "" }, { "docid": "dc4863f0c6c8127a36bbe5ef04d35be3", "score": "0.63628507", "text": "public function run()\n {\n factory(App\\Models\\Pegawai::class)->create([\n 'kode_pegawai' => 'PG001',\n 'name' => 'wahyu dhira ashandy',\n 'gender' => 'male',\n 'phone' => '085728669878',\n 'level' => 'administrator'\n ]);\n }", "title": "" }, { "docid": "9b3efc65e13b44fc7877f9e1990fa2c4", "score": "0.6357377", "text": "public function run()\n {\n \t$factory->define(App\\Produto::class, function (Faker $faker) {\n return [\n\n\t 'titulo' => Str::random(10),\n\t 'descricao' => $faker->text,\n\t 'tamanho' => bcrypt('secret'),\n\t 'cor' => Str::random(10),\n\t 'preco' => Str::random(10).'@gmail.com',\n\t 'custo' => bcrypt('secret'),\n\t 'desconto' => Str::random(10),\n\t 'created_at' => Str::random(10).'@gmail.com',\n\t 'updated_at' => bcrypt('secret'),\n\t 'categoria' => Str::random(10),\n\t 'image' => Str::random(10).'@gmail.com',\n\t 'tamanho' => bcrypt('secret'),\n\n ];\n \n });\n }", "title": "" }, { "docid": "2b9a3f41d46c235307e5cce09ab1d8ce", "score": "0.63552177", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n Contact::truncate(); // очистить таблицу Buyer от предыдущих записей\n\n // faker добавит n разных записей в базу\n for ($i = 0; $i < 10; $i++) {\n // описание faker - http://systemsarchitect.net/faker-the-ultimate-lorem-ipsum-for-php/\n // и здесь - https://github.com/fzaninotto/Faker/blob/master/composer.json\n Contact::create([\n 'name' => $faker->name,\n 'cell_1' => $faker->phoneNumber,\n 'cell_2' => $faker->phoneNumber,\n 'email' => $faker->email\n ]);\n }\n }", "title": "" }, { "docid": "054a5aa518f365c5b84648c8e71978bc", "score": "0.6352837", "text": "public function run()\n {\n User::factory()->create([\n 'email' => '[email protected]',\n ]);\n\n Good::factory()->count(3)->create();\n\n Fund::factory()->create([\n 'name' => MoneyPrize::FUND_NAME,\n 'amount' => 100000,\n ]);\n }", "title": "" }, { "docid": "aada84b86da113f2d0e87b19b2d7d15d", "score": "0.63491565", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for ($i=0; $i < 11; $i++) {\n $params = [\n 'type' => ($i%2 == 0) ? 'english' : 'swahili',\n 'description' => $faker->realText(200),\n 'context' => ($i%2 == 0) ? 'yaliyomo' : 'utangulizi',\n 'katiba' => ($i%2 == 0) ? 'katiba77' : 'katibaMpya',\n ];\n Content::create($params);\n }\n }", "title": "" }, { "docid": "4df18d6f740c2217f0b6dcb4d57e5da1", "score": "0.634762", "text": "public function run()\n {\n factory(Doctor::class, 25)->create();\n\n factory(Doctor::class)->create([\n 'name' => 'Doutor',\n 'lastName' => 'Teste',\n \t'email' => '[email protected]',\n \t'password' => Hash::make(123),\n ]);\n }", "title": "" }, { "docid": "dde28a6a6983d810acf45cfe310ee5e0", "score": "0.63412225", "text": "public function run()\n {\n $faker = Factory::create();\n $faqs = [\n [\n 'question' => $faker->sentence.\"?\",\n 'answer' => $faker->paragraph\n ],\n [\n 'question' => $faker->sentence.\"?\",\n 'answer' => $faker->paragraph\n ],\n [\n 'question' => $faker->sentence.\"?\",\n 'answer' => $faker->paragraph\n ],\n [\n 'question' => $faker->sentence.\"?\",\n 'answer' => $faker->paragraph\n ],\n [\n 'question' => $faker->sentence.\"?\",\n 'answer' => $faker->paragraph\n ],\n [\n 'question' => $faker->sentence.\"?\",\n 'answer' => $faker->paragraph\n ],\n [\n 'question' => $faker->sentence.\"?\",\n 'answer' => $faker->paragraph\n ],\n ];\n foreach($faqs as $key => $faq)\n {\n $faq = Faq::create($faq);\n }\n }", "title": "" }, { "docid": "e54b6bad889cdf719b10a960e548d160", "score": "0.6340121", "text": "public function run()\n {\n // factory(App\\Client::class,10)->create()->each(function($client){\n // $client->projects()->save(factory(App\\Project::class)->make());\n // });\n\n \n // $projects = App\\Project::all();\n factory(App\\Project::class,10)->create()->each(function($project){\n $project->technologies()->attach(rand(1,3));\n });\n }", "title": "" }, { "docid": "5b195a5409e2faabdf4d2a87aee3cbf1", "score": "0.6336679", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n User::truncate();\n Schema::enableForeignKeyConstraints();\n\n factory(User::class)->create([\n 'name' => config('fixture.user_role.master'),\n 'role' => 'master',\n 'email' => '[email protected]',\n 'password' => bcrypt(config('database.connections.mysql.password')),\n ]);\n\n factory(User::class)->create([\n 'name' => config('fixture.user_role.company-admin'),\n 'role' => 'company-admin',\n 'email' => '[email protected]',\n 'password' => bcrypt(config('database.connections.mysql.password')),\n ]);\n\n factory(User::class)->create([\n 'name' => config('fixture.user_role.store-admin'),\n 'role' => 'store-admin',\n 'email' => '[email protected]',\n 'password' => bcrypt(config('database.connections.mysql.password')),\n ]);\n\n factory(User::class)->create([\n 'name' => config('fixture.user_role.store-user'),\n 'role' => 'store-user',\n 'email' => '[email protected]',\n 'password' => bcrypt(config('database.connections.mysql.password')),\n ]);\n }", "title": "" }, { "docid": "7316f9887bf05a7116dc918fa8de6252", "score": "0.6323081", "text": "public function run()\n {\n\n factory(News::class, 10)->create();\n\n// $categoriesCount = DB::table('categories')->count() ?: 1;\n// DB::table('news')->insert($this->getFakerNews(20, $categoriesCount));\n }", "title": "" }, { "docid": "5229468c2db4cf83695cbd6872a949d6", "score": "0.6319092", "text": "public function run()\n {\n DB::unprepared(file_get_contents('database/seeds/000-schema-mysql.sql'));\n $this->command->info('DB created');\n\n DB::unprepared(file_get_contents('database/seeds/001-data-category.sql'));\n $this->fakeCategories();\n $this->command->info('Fake categories created');\n\n DB::insert(\"insert into `adz_user` (`email`, `password`, `created_at`, `role`, `name`)\n values (?,?,now(),?,?)\", ['[email protected]', Hash::make('asdasd'), 'admin', 'Yuri Orlov']);\n $this->fakeUsers();\n $this->command->info('Fake users created');\n\n }", "title": "" }, { "docid": "18dc1eff02108f16d0014bb0c8b2ed8c", "score": "0.6314107", "text": "public function run()\n {\n Entity::create([\n 'name' => 'Entity',\n 'field' => 'Some Text',\n ]);\n }", "title": "" }, { "docid": "3aa32227376d2ec495d211844ba399fd", "score": "0.6310849", "text": "public function run()\n {\n\t//$factory->define(Bear::class, function (Faker $faker) {\n\t//\treturn [\n\t//\t\t'name' \t\t=> $faker->name;\n\t//\t\t'danger_level'\t=> rand(0,9);\n\t//\t];\n\t//});\n\t$trees = Tree::get();\n\tfactory(Bear::class,120)\n\t\t->create()\n\t\t->each(function ($bear) use ($trees){\n\t\t\t$trees_random = $trees->random( rand(10,20));\n\t\t\t$bear->tres()->sync($trees_random);\n\t\t\t});\n\n }", "title": "" }, { "docid": "11a26fa52cfa64682616083d542e9b21", "score": "0.63030887", "text": "protected function setUp()\n {\n $this->fixture = new VersionDescriptor('name');\n }", "title": "" }, { "docid": "d6e1be8a746d73e47ff0928519e263cb", "score": "0.63025504", "text": "public function run()\n {\n //\n $faker = Faker::create();\n foreach (range(1, 10) as $index) {\n Article::create([\n 'title' => $faker->sentence($nbWords = rand(5, 9), $variableNbWords = true),\n 'title_slug' => $faker->slug,\n 'description' => $faker->paragraph($nbSentences = rand(1, 3), $variableNbSentences = true),\n 'content' => $faker->randomHtml(2, 5),\n ]);\n }\n }", "title": "" }, { "docid": "5b09b7d369e4c2d9156000c456656bf2", "score": "0.63025284", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Models\\User::class, 20)->create();\n\n \\Illuminate\\Support\\Facades\\File::deleteDirectory(storage_path().'\\app\\messenger\\claims\\\\');\n\n factory(\\App\\Models\\Upload::class, 100)->create();\n factory(\\App\\Models\\Claim::class, 15)->create();\n\n }", "title": "" }, { "docid": "78b109e69c8cfd117708d35566d53a85", "score": "0.63024604", "text": "public function testShouldCreateLegacyDataFixture(): void\n {\n $this->assertInstanceOf(LegacyDataFixture::class, $this->model->create('path/to/fixture.php'));\n }", "title": "" }, { "docid": "277b3868250a79867cb35d543550860b", "score": "0.6300922", "text": "public function run()\n {\n User::factory(10)->create();\n echo 'User';\n EditionType::factory(10)->create();\n echo 'Type';\n EditionRosterMemberRole::factory(10)->create();\n echo 'Role';\n EditionRoster::factory(10)->create();\n echo 'Roster';\n Team::factory(10)->create();\n echo 'Team';\n Edition::factory(10)->create();\n echo 'Edition';\n EditionRosterMember::factory(150)->create();\n echo 'Membership';\n }", "title": "" }, { "docid": "7af5e923843a3ebb1827eaa3d1e893c2", "score": "0.62999177", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n DB::table(\"posts\")->insert([\n \"title\" => $faker->sentence(),\n \"content\" => $faker->text(400),\n \"user_id\" => $faker->numberBetween(1, 3)\n ]);\n }", "title": "" }, { "docid": "d1c27b3989977eb71005b7f7715f5265", "score": "0.629681", "text": "public function run()\n {\n Tutorial::truncate();\n\n $faker = Factory::create();\n for ($i=0; $i < 16; $i++) { \n Tutorial::create([\n 'id'=> $i+1,\n 'content' => $faker->paragraph,\n 'subject_id'=> mt_rand(1,5)\n ]);\n }\n\n }", "title": "" }, { "docid": "277e024d4772b1a7244511bb78ca3dc7", "score": "0.6293341", "text": "public function run()\n {\n factory(Genero::class, 100)->create();\n }", "title": "" }, { "docid": "ed6dd71e81ce72dceb210cdf24fb7ef2", "score": "0.6289771", "text": "public function run()\n {\n factory(Category::class, 3)->create();\n factory(Order::class, 3)->create();\n factory(User::class, 3)->create();\n }", "title": "" }, { "docid": "81cc57eefb9afbe07c1b95d1cec66411", "score": "0.6287256", "text": "public function run()\n {\n factory('App\\Models\\Team', 30)->create()->each(function($model){\n factory('App\\Models\\Player', 15)->create(['team_id' => $model->id]);\n });\n }", "title": "" }, { "docid": "22abe9802676bfc887542fdb5277820f", "score": "0.6275197", "text": "public function run() {\n\t\tfactory( AdminVenue::class, 11 )->create();\n\t\tfactory( CategoryTranslation::class, 11 )->create();\n\t\tfactory( ContactUs::class, 15 )->create();\n\t\tfactory( SpaceMedia::class, 11 )->create();\n\t\tfactory( LabTranslation::class, 15 )->create();\n\t\tfactory( TagTranslation::class,11)->create();\n\t\tfactory( WorkingHour::class,11)->create();\n\t\tfactory( UserFollowing::class,40)->create();\n\t\tfactory( SpaceTag::class,20)->create();\n\t\tfactory( Message::class,50)->create();\n\t}", "title": "" }, { "docid": "a122d3bfa3a8de0e47b6116c1496f4b0", "score": "0.6270721", "text": "public function run()\n {\n factory(Person::class, 1)->create([\n 'user_id' => factory(User::class, 'root', 1)->create()->first()->id\n ]);\n\n factory(Person::class, 1)->create([\n 'user_id' => factory(User::class, 'admin', 1)->create()->first()->id\n ]);\n\n factory(Business::class, 1)->create([\n 'user_id' => factory(User::class, 'seller', 1)->create()->first()->id\n ]);\n\n factory(Person::class, 1)->create([\n 'user_id' => factory(User::class, 'buyer', 1)->create()->first()->id\n ]);\n\n factory(Person::class, 3)->create();\n factory(Business::class, 3)->create();\n }", "title": "" }, { "docid": "1872b7ef90ca8f260460061f15e2d710", "score": "0.626916", "text": "public function run()\n {\n factory(\\App\\Models\\User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'user'\n ]);\n\n factory(\\App\\Models\\Admin::class)->create([\n 'email' => '[email protected]',\n 'username' => 'audit',\n 'name' => 'admin'\n ]);\n\n\n factory(\\App\\Models\\Admin::class)->create([\n 'email' => '[email protected]',\n 'username' => 'assistant',\n 'name' => 'assistant'\n ]);\n }", "title": "" }, { "docid": "f87e7ac954cc83f62ae0bc722ff2f4f3", "score": "0.62633854", "text": "public function run()\n {\n $teams = ['Los Angeles Lakers', 'Chicago Bulls','Atlanta Hawks','Indiana Pacers','Boston Celtics'];\n foreach($teams as $team){\n factory(App\\Team::class,1)->create([\n 'name'=>$team\n ]);\n }\n }", "title": "" }, { "docid": "519472e495e6fcfe57dd0a53bcd6ad31", "score": "0.6262217", "text": "public function run()\n {\n factory(Article::class, 1000)->create()->each(function ($article) {\n $faker=\\Faker\\Factory::create();;\n $catCount=$faker->numberBetween(1,4);\n $tagCount=$faker->numberBetween(1,10);\n for ($i=0; $i <$catCount; $i++) {\n $catId=$faker->numberBetween(1,Category::count());\n $article->categories()->save(Category::find($catId));\n }\n\n for ($i=0; $i <$tagCount; $i++) {\n $tagId=$faker->numberBetween(1,Tag::count());\n $article->tags()->save(Tag::find($tagId));\n }\n \n });\n }", "title": "" }, { "docid": "d2246a1c9cbb32d2192592e646060845", "score": "0.62589604", "text": "public function run()\n {\n $faker = Faker::create();\n // following line retrieve all the user_ids from DB\n $users = App\\User::all()->pluck('id')->all();\n $categories = App\\Category::all()->pluck('id')->all();\n $number_of_questions = [10,15,20,25,30];\n $levels = [1,2,3];\n foreach(range(1,20) as $index){\n $company = App\\Test::create([\n 'title' => $faker->company,\n 'user_id' => $faker->randomElement($users),\n 'category_id' => $faker->randomElement($categories),\n 'number_of_questions' => $faker->randomElement($number_of_questions),\n 'total_time' => $faker->randomElement($number_of_questions),\n 'level' => $faker->randomElement($levels),\n 'note' => $faker->realText,\n ]);\n }\n }", "title": "" }, { "docid": "f2c939b29946c3d663ce0e4611430449", "score": "0.6257524", "text": "public function run()\n {\n factory(App\\Model\\User::class,5)->create();\n factory(App\\Model\\Organizer::class,5)->create();\n factory(App\\Model\\Event::class,10)->create();\n factory(App\\Model\\Ticket::class,20)->create();\n factory(App\\Model\\Order::class,20)->create();\n factory(App\\Model\\Bookmark::class,5)->create(); }", "title": "" }, { "docid": "d5424189a592e448ed0fc309f10f415d", "score": "0.62570745", "text": "public function testShouldCreateDataFixture(): void\n {\n $this->assertInstanceOf(\n RevertibleDataFixtureInterface::class,\n $this->model->create(RevertibleDataFixtureInterface::class)\n );\n }", "title": "" }, { "docid": "7f495ff4721178a2f103140fe17d4e90", "score": "0.62557006", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach(range(1, 30) as $key)\n {\n \\App\\Task::create([\n 'title' => $faker->word,\n 'body' => $faker->text(400),\n 'user_id' => 1,\n 'end' => $faker->dateTimeBetween('now', '+10 days', 'Europe/Moscow')\n ]);\n }\n }", "title": "" }, { "docid": "fa17a5e28fecc43f0b2164217ff06a52", "score": "0.6252303", "text": "public function run()\n {\n \\RestoApp\\Entities\\TipoPrato::create(['descTipoPrato' => 'db_tipoprato.pratoBase']);\n \\RestoApp\\Entities\\TipoPrato::create(['descTipoPrato' => 'db_tipoprato.guarnicao']);\n \\RestoApp\\Entities\\TipoPrato::create(['descTipoPrato' => 'db_tipoprato.carne']);\n \\RestoApp\\Entities\\TipoPrato::create(['descTipoPrato' => 'db_tipoprato.salada']);\n }", "title": "" }, { "docid": "790c7179c2af6c2852dac5fddc90d510", "score": "0.6252105", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Admin::factory()->create();\n \\App\\Models\\Importer::factory()->create();\n \\App\\Models\\Merchant::factory()->create();\n $this->call(BrandSeeder::class);\n $this->call(VendorSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(CustomerSeeder::class);\n $this->call(AttributeSeeder::class);\n $this->call(Attribute_valueSeeder::class);\n $this->call(OrderSeeder::class);\n $this->call(OrderDetailsSeeder::class);\n $this->call(PaymentMethodSeeder::class);\n $this->call(DeliveryMethodSeeder::class);\n $this->call(WithdrawSeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(Product_categorySeeder::class);\n $this->call(SocialLinkSeeder::class);\n $this->call(ShopSeeder::class);\n $this->call(ShopPaymentMethodSeeder::class);\n $this->call(SubscriptionSeeder::class);\n\n }", "title": "" }, { "docid": "7d414377818a7ee4f4176c59e7f990e0", "score": "0.6251525", "text": "public function run()\n {\n factory(Tag::class)->create(['title' => 'Soma']);\n factory(Tag::class)->create(['title' => 'Subtração']);\n factory(Tag::class)->create(['title' => 'Multiplicação']);\n factory(Tag::class)->create(['title' => 'Divisão']);\n factory(Tag::class)->create(['title' => 'Soluto']);\n factory(Tag::class)->create(['title' => 'Solvente']);\n factory(Tag::class)->create(['title' => 'Montanha']);\n }", "title": "" }, { "docid": "8f5cc797dc45035665d35dc9d1c9acaf", "score": "0.6249014", "text": "protected function setUp(): void\n {\n $this->fixture = new VersionDescriptor('name');\n }", "title": "" }, { "docid": "b839d600e62904c79491962ffed0c2be", "score": "0.6248588", "text": "private function createTestData() {\n $fluxuserController = new FluxuserController();\n\n $factory = new FactoryFluxuser($this->entityManager);\n $systemAccount = $factory->createSystemAccount();\n $this->userGuest = $factory->createGuestUser($fluxuserController, $systemAccount);\n $this->userUser = $factory->createUserUser($fluxuserController, $systemAccount);\n $this->userAdmin = $factory->createAdminUser($fluxuserController, $systemAccount);\n $this->userOwner = $factory->createOwnerUser($fluxuserController, $systemAccount);\n $this->userProjectmanager = $factory->createProjectManagerUser($fluxuserController, $systemAccount);\n }", "title": "" }, { "docid": "6f249dae3d8ec463c6295e78e8a44620", "score": "0.624839", "text": "public static function loadFixture()\n {\n include __DIR__ . '/_files/setup_buyable_product.php';\n }", "title": "" }, { "docid": "8ee09cc904164065ac660ce613f48b1f", "score": "0.62483037", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\t foreach (range(1, 50) as $i) {\n\t Item::create([\n\t 'title' => $faker->company,\n\t 'description'\t=> $faker->sentence($nbWords = 6, $variableNbWords = true)\n\t ]);\n\t }\n }", "title": "" }, { "docid": "a26176bf4f28dd21563cbff91f261ce8", "score": "0.6248057", "text": "public function run()\n {\n// \\App\\Models\\User::factory(10)->create();\n// BlogTag::factory(5)->create();\n// BlogCategory::factory(5)->create();\n// BlogPost::factory(10)->create();\n// $this->call(ShopSectionSeeder::class);\n// $this->call(ShopCategorySeeder::class);\n ShopProduct::factory(50)->create();\n }", "title": "" }, { "docid": "ace4ebf6e8bc8f6aa7210d348b51a09d", "score": "0.62457186", "text": "public function run()\n {\n factory(App\\Project::class, 15)->create();\n }", "title": "" }, { "docid": "16bf5f06a47ffa7304ebcbfe61372042", "score": "0.62451684", "text": "public function run()\n {\n $faker = Factory::create('ja_JP');\n $bookTitle = [\"PHP基礎\", \"Laravel入門\", \"Railsチュートリアル\", \"Java研修\", \"Vue.js入門\"];\n \n for ($i = 0; $i < 10; $i++) {\n Book::create([\n 'user_id' => 1,\n 'item_name' => $bookTitle[mt_rand(0, count($bookTitle)-1)],\n 'item_number'=> $faker->numberBetween(1,999),\n 'item_amount'=> $faker->numberBetween(100,5000),\n 'published' => $faker->dateTime('now'),\n 'created_at' => $faker->dateTime('now'),\n 'updated_at' => $faker->dateTime('now'),\n ]);\n }\n }", "title": "" }, { "docid": "d8e27af377ef03473fbbe1243c95994e", "score": "0.62428766", "text": "public function run()\n {\n //\n\n// DB::table('jobs')->insert(['jobName' => 'job' . rand(1, 10)]);//手动创建\n\n factory('App\\Models\\Job', 50)->create();//利用模型工厂进行创建\n }", "title": "" }, { "docid": "4702b82f7330b0c72f299d5f8bcad55b", "score": "0.62428105", "text": "public function run()\n {\n factory(App\\OrderCake::class, 10)->create();\n }", "title": "" }, { "docid": "c2a273b1d34616bfc006ce1d164c99d9", "score": "0.6242229", "text": "abstract public function getFixtures();", "title": "" }, { "docid": "64c4ecde0e6b85c9d38a91a6c870d0ca", "score": "0.6241946", "text": "public function run(){\n// factory('App\\Models\\Curso',10)->create();\n// factory('App\\Models\\AtividadeStatus', 10)->create();\n factory('App\\Models\\AtividadeTipo', 10)->create();\n factory('App\\Models\\Local', 10)->create();\n// //factory('App\\Models\\UsuarioGrupo', 10)->create();\n// factory('App\\Models\\UsuarioTipo', 10)->create();\n factory('App\\Models\\Aparencia', 6)->create();\n $this->call(UsuariosGruposSeeder::class);\n $this->call(UsuariosTiposSeeder::class);\n $this->call(AtividadesStatusSeeder::class);\n }", "title": "" }, { "docid": "f323ebf7491729e72e0c9a869f9be9ec", "score": "0.62396204", "text": "public function run()\n {\n $faker = new \\Faker\\Generator();\n for ($i = 0; $i < 60; $i++) {\n \\App\\Product::create([\n 'name' => 'Products' . $i,\n 'slug' => 'products-' . $i,\n 'details' => 'iusto laboriosam magni necessitatibus nulla, officiis, pariatur porro repudiandae voluptatem voluptatibus!',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus consequuntur dicta fuga minima numquam quis unde. Architecto illum ipsam, iusto laboriosam magni necessitatibus nulla, officiis, pariatur porro repudiandae voluptatem voluptatibus!',\n 'cover' => '/images/product0' . rand(1, 9) . '.png',\n 'price' => 8000 + $i,\n 'category_id' => rand(1, 4)\n ]);\n }\n }", "title": "" }, { "docid": "38ada84e2c9e98c5cfc1caab40ab8f07", "score": "0.62362677", "text": "public function run()\n {\n factory(Profesor::class,20)->create();\n /* Profesor::create([\n 'id' => '1',\n 'name' => 'victor',\n 'email' => '[email protected]',\n 'password' => bcrypt('victor122'),\n ]); */\n }", "title": "" }, { "docid": "5d65dc7eda6e7e2f6a216315c18e7db1", "score": "0.6235777", "text": "public function run()\n {\n $faker = Faker::create();\n // $str = Str::new()\n for ($i = 0; $i < 50; $i++) {\n Past_experience::create([\n 'jobseeker_id' => $faker->numberBetween(1, 2),\n // 'jobseeker_id' => factory(Modules\\Jobseeker\\Entities\\JobSeeker::class)->create()->id,\n 'company_name' => $faker->name,\n 'job_title' => $faker->name,\n 'start_date' => $faker->date,\n 'end_date' => $faker->date,\n\n ]);\n }\n }", "title": "" }, { "docid": "328f616ab6dc123467b26417857ff710", "score": "0.6233072", "text": "public function run()\n {\n factory(App\\Models\\Speciality::class,25)->create();\n }", "title": "" }, { "docid": "62c1ef1fee54e5651208b7bd305e14ef", "score": "0.6232238", "text": "public function run()\n {\n factory(\\App\\Tag::class)->create([\n 'name_ar' => 'خالي من البيض',\n 'name_en' => 'Egg free'\n ]);\n factory(\\App\\Tag::class)->create([\n 'name_ar' => 'خالي من المكسرات',\n 'name_en' => 'Nut free'\n ]);\n factory(\\App\\Tag::class)->create([\n 'name_ar' => 'خالي من اللبن',\n 'name_en' => 'Milk free'\n ]);\n }", "title": "" }, { "docid": "d65e58e86b8d54cdae059c7491284b00", "score": "0.62318325", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n KindBuyer::truncate(); // очистить таблицу Buyer от предыдущих записей\n\n $list = ['Покупатель', 'Поставщик', 'Сотрудник', 'Пок-ль и Пост-щик' ];\n\n // faker добавит n разных записей в базу\n for ($i = 0; $i < 3; $i++) {\n // описание faker - http://systemsarchitect.net/faker-the-ultimate-lorem-ipsum-for-php/\n // и здесь - https://github.com/fzaninotto/Faker/blob/master/composer.json\n\n\n\n KindBuyer::create([\n 'name' => $list[$i]\n ]);\n }\n }", "title": "" }, { "docid": "dd3882328fe09df5a60161a497f78b81", "score": "0.6228778", "text": "public function run()\n {\n \tTest::factory()->count(50)->create();\n }", "title": "" }, { "docid": "a2807f907463863adaf7657487601888", "score": "0.6227627", "text": "public function run()\n {\n $pagina = factory(\\App\\Models\\Pagina::class, 1)->create();\n\n// factory(\\App\\Models\\PaginaCaracteristica::class, 9)->create([\n// 'pagina_id' => $pagina->id\n// ]);\n }", "title": "" }, { "docid": "db2d5451edea50c0be9d594ba79cf917", "score": "0.6227298", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create(); //makes some users\n //\\App\\Models\\Player::factory(10)->create(); //makes some players\n $this->call(UserTableSeeder::class);\n $this->call(GameTableSeeder::class); //makes games, and reviews as children of games\n\n }", "title": "" } ]
9486b8495636e2c5f90b03f24ea86db5
Gets the alwaysOn Whether or not to enable alwayson VPN connection.
[ { "docid": "8256af35700acc9638f1d78af2a90be3", "score": "0.6684472", "text": "public function getAlwaysOn()\n {\n if (array_key_exists(\"alwaysOn\", $this->_propDict)) {\n return $this->_propDict[\"alwaysOn\"];\n } else {\n return null;\n }\n }", "title": "" } ]
[ { "docid": "5a061a3141c2ab18d67e4e7f529af644", "score": "0.63417786", "text": "public function isOn(): bool {\n return $this->is_on;\n }", "title": "" }, { "docid": "dbb39b9f2ef770de93415c8aaa58d8db", "score": "0.6096812", "text": "function is_carp_enabled() {\n // Check current CARP status\n $status = get_single_sysctl('net.inet.carp.allow');\n $enabled = boolval(intval($status) > 0);\n return $enabled;\n}", "title": "" }, { "docid": "0348d6cd3d3d0eb142e2a748c24d6e13", "score": "0.58138156", "text": "public function getLocalMarketAutoAcceptEnabled()\n {\n return $this->localMarketAutoAcceptEnabled;\n }", "title": "" }, { "docid": "8b19efc66bb1a5a85c72399468572849", "score": "0.5783883", "text": "public function getIsOneStepCheckoutEnabled()\n {\n return $this->getStoreConfig(\n 'payment/monetivo_payment/onestepcheckoutenabled'\n );\n }", "title": "" }, { "docid": "bbaea36f9159f827232b13185e176354", "score": "0.57749784", "text": "private function turn_on() {\n $this->_logger->entrance();\n\n if ( $this->is_on() || ! isset( $this->_storage->connectivity_test['is_active'] ) ) {\n return false;\n }\n\n $updated_connectivity = $this->_storage->connectivity_test;\n $updated_connectivity['is_active'] = true;\n $updated_connectivity['timestamp'] = WP_FS__SCRIPT_START_TIME;\n $this->_storage->connectivity_test = $updated_connectivity;\n\n $this->_is_on = true;\n\n return true;\n }", "title": "" }, { "docid": "2a477c03c0d59b72b6a17b782bca4ced", "score": "0.57732296", "text": "public function gatewayEnabled();", "title": "" }, { "docid": "1f49995b31bfcf0bd3c7e26bbb398024", "score": "0.5763567", "text": "public function getEnable(){\r\n $status = Mage::getStoreConfig('oos_general/updateoos_settings/enable');\r\n if( $status == '1' )\r\n $status = true;\r\n else\r\n $status = false;\r\n return $status;\r\n }", "title": "" }, { "docid": "1c8bac9d09470447b78da638cd296199", "score": "0.5745814", "text": "public function getOneStepCheckoutIsEnabled()\n {\n return (Mage::getStoreConfig(\"onestepcheckout/general/is_enabled\") == 1) ? true : false;\n }", "title": "" }, { "docid": "5fbbf8d21b03d0e8fdc613c4a28130a0", "score": "0.56507206", "text": "public function getAutoRenewalEnabled()\n {\n return $this->auto_renewal_enabled;\n }", "title": "" }, { "docid": "472b38b66b80cc0879e9f3fd85699733", "score": "0.56453866", "text": "public function getAutoCorrectionEnabled()\n {\n return 1 == $this->getParamValue('nfpr');\n }", "title": "" }, { "docid": "64e4603467d56fd115c9dcce5d2588df", "score": "0.5626417", "text": "public function isEnabled()\n {\n if ($this instanceof Zikula_Plugin_AlwaysOnInterface) {\n return true;\n }\n \n $plugin = PluginUtil::getState($this->serviceId, PluginUtil::getDefaultState());\n return ($plugin['state'] === PluginUtil::ENABLED) ? true : false;\n }", "title": "" }, { "docid": "d98c736c4504549fea00a1794a8bb805", "score": "0.55340195", "text": "function couponActive()\n{\n if (env('COUPON_ACTIVE') == 'YES') {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "d98c736c4504549fea00a1794a8bb805", "score": "0.55340195", "text": "function couponActive()\n{\n if (env('COUPON_ACTIVE') == 'YES') {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "075530f0ca0f319c860fe1e19f6e2c19", "score": "0.5527541", "text": "public function isUpgradeGoldVipCouponActive()\n {\n return Mage::getStoreConfigFlag(self::XML_CONFIG_BASE_PATH . 'upgrade_customer_level_gold_vip/isactive');\n }", "title": "" }, { "docid": "343bc7e5e5faa81f0c193c19b221ecd8", "score": "0.5517715", "text": "public function isMsrpEnabled()\n {\n return $this->config->isEnabled();\n }", "title": "" }, { "docid": "131e3b9ff291642aeb3bd0e1d61c6157", "score": "0.5480504", "text": "public function getCheckoutEnabled()\n {\n return $this->checkoutEnabled;\n }", "title": "" }, { "docid": "f988f2ace6a45ec69b89c4524119cc9d", "score": "0.54669005", "text": "public function getOnPremisesSyncEnabled()\n {\n if (array_key_exists(\"onPremisesSyncEnabled\", $this->_propDict)) {\n return $this->_propDict[\"onPremisesSyncEnabled\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "838fb351bf2c18e4019b3ccba2fdab9e", "score": "0.5465314", "text": "public function enabled() {\n global $CFG;\n\n if (!empty($CFG->disableupdateautodeploy)) {\n // The feature is prohibited via config.php\n return false;\n }\n\n return get_config('updateautodeploy');\n }", "title": "" }, { "docid": "3053534cdc691b0be9510811cde73762", "score": "0.5461084", "text": "function isNetwork()\n {\n return ((string)$this->xml->network['enabled'])=='yes';\n }", "title": "" }, { "docid": "1194d3c8d9273a71fc48c6b965a287e1", "score": "0.54381025", "text": "public function getGelfEnable()\n {\n return (bool) $this->getExtConf()->getGelfEnable();\n }", "title": "" }, { "docid": "b66e3e19200959435bdca031b48a2230", "score": "0.54302984", "text": "public function getEnable()\n {\n return isset($this->enable) ? $this->enable : false;\n }", "title": "" }, { "docid": "82ebdc39bc4b7aee029c115ac0433485", "score": "0.5424963", "text": "public function get_enable()\n\t{\n\t\treturn $this->enable;\n\t}", "title": "" }, { "docid": "bfefa6c7e4e173140d461e8403756905", "score": "0.54168606", "text": "function is_pppoe_server_enabled()\n{\n global $config;\n $pppoeenable = false;\n if (!isset($config['pppoes']['pppoe']) || !is_array($config['pppoes']['pppoe'])) {\n return false;\n }\n\n foreach ($config['pppoes']['pppoe'] as $pppoes) {\n if ($pppoes['mode'] == 'server') {\n $pppoeenable = true;\n }\n }\n\n return $pppoeenable;\n}", "title": "" }, { "docid": "4951f45b0d49065eb3e02c9f27ed01e8", "score": "0.54139936", "text": "public function isOnline()\n\t{\n\t\treturn isset($this->aServer[4]) ? $this->aServer[4] : false;\n\t}", "title": "" }, { "docid": "2d2c103939671a8f275994b8d5574aad", "score": "0.5379858", "text": "public function is_enabled() {\n\t\treturn defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT');\n\t}", "title": "" }, { "docid": "bf8276f14b2507f4849d4df816fb6b84", "score": "0.5364957", "text": "public function get_enabled()\n\t\t{\n\t\t\treturn $this->enabled;\n\t\t}", "title": "" }, { "docid": "f53ffd1b3e0fc46753188ed853127d8a", "score": "0.53614193", "text": "public function isConnected()\n\t{\n\t\treturn $this->vendorIsConnected();\n\t}", "title": "" }, { "docid": "e6214b764e584f38be8dc0dc333efe5e", "score": "0.5344045", "text": "static function is_enabled() {\n\t\treturn self::$enabled;\n\t}", "title": "" }, { "docid": "e6749b1c36625a49a12cd9275ae29102", "score": "0.53391665", "text": "public function isActive(){\n\t\tif (is_null($this->_isActive)){\n\t\t\t$servers = $this->getServers();\n\t\t\t$this->_isActive = (bool)(Mage::getStoreConfig('tc_varnish/general/active') && !empty($servers));\n\t\t}\n\t\treturn $this->_isActive;\n\t}", "title": "" }, { "docid": "ce5c6f8e35b7649f2bc8ef2c9ebd09a1", "score": "0.5335205", "text": "public function getOnonline():string {\n return $this->getAttribute('ononline');\n }", "title": "" }, { "docid": "c5ec4f52dd99ad761b76ea3c5c658f1b", "score": "0.5312706", "text": "public function getEBayMotorsProAutoAcceptEnabled()\n {\n return $this->eBayMotorsProAutoAcceptEnabled;\n }", "title": "" }, { "docid": "7a3aabd1620e1eac80a73097ca73769c", "score": "0.52906233", "text": "function serverOn(){\n include_once(\"includes/config.php\");\n return is_resource(@fsockopen($serverIp, $serverPort,$errNo, $errStr, 0.01)) ? \"ON\" : \"OFF\";\n}", "title": "" }, { "docid": "dab1bad9fd4d8228471997d93d69b3aa", "score": "0.52823937", "text": "public function getLocalMarketBestOfferEnabled()\n {\n return $this->localMarketBestOfferEnabled;\n }", "title": "" }, { "docid": "6ef4b3f6234edddb0a38baa858936121", "score": "0.52698493", "text": "function is_available() {\r\n\r\n\t\t\tif ($this->enabled==\"yes\") {\r\n\r\n\t\t\t\tif (get_option( 'woocommerce_force_ssl_checkout' ) == 'no' ) {\r\n\t\t\t\t//\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "aed9a14114ce78e11a8969f9e7d589db", "score": "0.5267253", "text": "public static function get_enabled()\n {\n return !self::$disabled;\n }", "title": "" }, { "docid": "e1e999e9ce31903837d3c6182fb19e2a", "score": "0.5250316", "text": "public function enabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "c542c5f232c250608b0020855ef2d963", "score": "0.5244664", "text": "public function is_enabled() {\n\n\t\treturn 'yes' === $this->enabled;\n\t}", "title": "" }, { "docid": "53e348ccb32d2dc3ba57feae9a79c191", "score": "0.52342296", "text": "public function getLocalMarketAutoDeclineEnabled()\n {\n return $this->localMarketAutoDeclineEnabled;\n }", "title": "" }, { "docid": "6444de8843168a0c6a5e40bc743714b0", "score": "0.5233377", "text": "public function getEnableStackdriverMonitoring()\n {\n return $this->enable_stackdriver_monitoring;\n }", "title": "" }, { "docid": "093a51a7160fe043c174a9e3643a7bea", "score": "0.52320695", "text": "public function isEnabled()\n {\n return $this->getConfig('enabled');\n }", "title": "" }, { "docid": "edb6e5de91af5d3bea25582660e53f29", "score": "0.52194583", "text": "public function getEnabled() : bool\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "b6ae7227297c79ec5d37db65eee4774b", "score": "0.521503", "text": "function is_on() {\n self::$_static_logger->entrance();\n\n if ( is_object( $this->_site ) && ! $this->is_registered() ) {\n return false;\n }\n\n if ( isset( $this->_is_on ) ) {\n return $this->_is_on;\n }\n\n // If already installed or pending then sure it's on :)\n if ( $this->is_registered() || $this->is_pending_activation() ) {\n $this->_is_on = true;\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "797f5523ca980ea84f36062096bba79b", "score": "0.52141404", "text": "public static function isOn()\n\t{\n\t\tif (\n\t\t\tdefined('LANDING_DISABLE_RIGHTS') &&\n\t\t\tLANDING_DISABLE_RIGHTS === true\n\t\t)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (!self::$globalAvailable)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn self::$available;\n\t}", "title": "" }, { "docid": "3ec33c749c0294a08488caec28c260d1", "score": "0.5203133", "text": "public function getEnabled():bool\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "1a24fdd3f19174142e12336b7d42b29c", "score": "0.519744", "text": "function getEnabled() {\n\t\t$plugin =& $this->getOpenAdsPlugin();\n\t\treturn $plugin->getEnabled();\n\t}", "title": "" }, { "docid": "cb6f02cacb1b97f8c9b963d893f21b1b", "score": "0.5195745", "text": "public function isEnabled()\n {\n $rtn = false;\n $apcCli = ini_get('apc.enable_cli');\n\n if (function_exists('apc_fetch') && (php_sapi_name() != 'cli' || in_array($apcCli, ['1', 1, true, 'On']))) {\n $rtn = true;\n }\n\n return $rtn;\n }", "title": "" }, { "docid": "75c6197423c3c895f1421e58a48c5e7c", "score": "0.5194406", "text": "public function hasPingOnly()\n {\n return $this->ping_only !== null;\n }", "title": "" }, { "docid": "022dde250c3afeb1d36af4102ed1fb16", "score": "0.5193733", "text": "protected function get__enabled()\n\t{\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "01f9288dd9230619995a7d08bee6bc02", "score": "0.5188456", "text": "public function isOnline()\n {\n return true;\n }", "title": "" }, { "docid": "8d62832608dd98ed843da081c8f933b4", "score": "0.51836526", "text": "public function is_enabled() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "924cd506fc2c754711d64bdb507cf771", "score": "0.51808184", "text": "public function getEnableIpv4()\n {\n return $this->enable_ipv4;\n }", "title": "" }, { "docid": "58bad0f517a5d75fda0752aa92779ce5", "score": "0.51800966", "text": "public function getEnabled()\n {\n return isset($this->enabled) ? $this->enabled : false;\n }", "title": "" }, { "docid": "355a0faf38e6191ef0182b1a96deab8e", "score": "0.5171253", "text": "public function isEnable() {\n return Mage::getStoreConfig('quickcartlist/general/boolean');\n }", "title": "" }, { "docid": "a1d1a925d43416d9dee76d2e3b4d9aae", "score": "0.517108", "text": "public function is_enabled() {}", "title": "" }, { "docid": "abd9f09b9cf377d74ebdca3f97bb11ea", "score": "0.51697826", "text": "public function verboseEnabled()\n {\n return $this->verboseEnabled ?? getenv('MFTF_DEBUG');\n }", "title": "" }, { "docid": "6f5de8819f1bc61479e8dce7813b5fe4", "score": "0.51648253", "text": "public function isEnabled()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_FASTLY_CDN_ENABLED);\n }", "title": "" }, { "docid": "140c40bbf10c6049dd27fc928113cf39", "score": "0.5158993", "text": "public static function setOn()\n\t{\n\t\tself::$available = true;\n\t}", "title": "" }, { "docid": "9d8c8aea37e0466af3e6b8c26631cade", "score": "0.51555747", "text": "public function isUpgradeSilverVipCouponActive()\n {\n return Mage::getStoreConfigFlag(self::XML_CONFIG_BASE_PATH . 'upgrade_customer_level_silver_vip/isactive');\n }", "title": "" }, { "docid": "57f28337ac6a61507c82236e6c73d3cc", "score": "0.51519173", "text": "public function on()\n\t{\n\t\t// Make sure configs are loaded\n\t\t$this->configs();\n\n\t\t// Check required\n\t\tif ($this->_configs->dataciteEZIDSwitch && $this->_configs->shoulder && (($this->_configs->dataciteServiceURL && $this->_configs->dataciteUserPW) || ($this->_configs->prefix && $this->_configs->ezidServiceURL && $this->_configs->ezidUserPW)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b5b70ba8c197932efe8807a5e9f9030c", "score": "0.515033", "text": "public function isEnable($server): bool;", "title": "" }, { "docid": "85b2b9d393733a2545ab6c36282329f3", "score": "0.5147152", "text": "function isEnabled() {\n\t\treturn $this->getSetting('enabled');\n\t}", "title": "" }, { "docid": "b866f9e772a57c4c2f5372321a551264", "score": "0.514703", "text": "public function isEnabled(): string\n {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "4796c36fbd6a43c4d01b4c6c94cbd892", "score": "0.5145158", "text": "public function internallyInstalledRepositoryEnabled()\n {\n return $this->internallyInstalledRepositoryEnabled;\n }", "title": "" }, { "docid": "fad42d626028ee2eb09c82667e2f0587", "score": "0.51447153", "text": "public function is_enabled();", "title": "" }, { "docid": "b82db5a74fadb9bb179932926af72492", "score": "0.5135895", "text": "public function isNormal()\n {\n return connection_status() === CONNECTION_NORMAL;\n }", "title": "" }, { "docid": "c9d136d02f54be93976a7abfe89c322b", "score": "0.5131121", "text": "public static function is_enabled() : bool {\n\t\treturn isset( $_SERVER['GEOIP_COUNTRY_CODE'] ) && ! empty( $_SERVER['GEOIP_COUNTRY_CODE'] );\n\t}", "title": "" }, { "docid": "1452031e69aedb874ca418e8bebed87a", "score": "0.5127294", "text": "function is_enabled() {\n return true;\n }", "title": "" }, { "docid": "2988f214dd0d2ef881d00bff7e355928", "score": "0.5125514", "text": "protected function _isPriceViewModeNetto()\n {\n $blResult = (bool) $this->getConfig()->getConfigParam('blShowNetPrice');\n $oUser = $this->getUser();\n if ($oUser) {\n $blResult = $oUser->isPriceViewModeNetto();\n }\n\n return $blResult;\n }", "title": "" }, { "docid": "03292ebffc783755c58844779a82befb", "score": "0.5122637", "text": "public function getEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "03292ebffc783755c58844779a82befb", "score": "0.5122637", "text": "public function getEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "03292ebffc783755c58844779a82befb", "score": "0.5122637", "text": "public function getEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "03292ebffc783755c58844779a82befb", "score": "0.5122637", "text": "public function getEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "03292ebffc783755c58844779a82befb", "score": "0.5122637", "text": "public function getEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "03292ebffc783755c58844779a82befb", "score": "0.5122637", "text": "public function getEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "03292ebffc783755c58844779a82befb", "score": "0.5122637", "text": "public function getEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "be1fac313b930bc4bbc01bbe65fa55d1", "score": "0.51172894", "text": "public function isEnableFrontend()\n {\n return $this->getConfig(self::XML_PATH_ENABLE);\n\n }", "title": "" }, { "docid": "56ea7ed0c9c6753c7bba1af0a3a5269e", "score": "0.51147515", "text": "public function isConfigured(): bool;", "title": "" }, { "docid": "40112a6d460300f275feb864e1263070", "score": "0.5109833", "text": "public function is_manual_sync_enabled() {\n\t\t$is_manual_sync_enabled = $this->getConfigValue( 'Manual_Sync' );\n\n\t\treturn $is_manual_sync_enabled ?: false;\n\t}", "title": "" }, { "docid": "64d319df2c39902782248928461ba1fe", "score": "0.5109706", "text": "public function getUPCEnabled()\n {\n return $this->uPCEnabled;\n }", "title": "" }, { "docid": "8e80e72f6032d90cfbbde7843cb25606", "score": "0.5104856", "text": "public function setAlwaysOn($val)\n {\n $this->_propDict[\"alwaysOn\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "8e80e72f6032d90cfbbde7843cb25606", "score": "0.5104856", "text": "public function setAlwaysOn($val)\n {\n $this->_propDict[\"alwaysOn\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "12e29f5b2d2efc93c9bd2453d6259785", "score": "0.50994474", "text": "public function getPrixNet(): ?bool {\n return $this->prixNet;\n }", "title": "" }, { "docid": "01f6c4ad0339476846e629a5e032e07e", "score": "0.50993836", "text": "public function is_plugin_network_active()\n {\n }", "title": "" }, { "docid": "c5f8792497ad86f266c057f261154d18", "score": "0.5093841", "text": "public function getIsEnabled()\n\t{\n\t\tif(is_null($this->_enabled)) {\n\t\t\t$this->_enabled = intval(Mage::getStoreConfig(self::MP_CC_ENABLED, $this->getStoreId()))==1 ? true : false;\n\t\t}\n\t\treturn $this->_enabled;\n\t}", "title": "" }, { "docid": "64a418274170a75d63e76e13e81ebdc6", "score": "0.50901014", "text": "public function isConnected() {\n return $this->isConnected;\n }", "title": "" }, { "docid": "a8c10129259a041fb2ae5d98f1f9635a", "score": "0.50869787", "text": "public function goOn()\n\t{\n\t\treturn $this->_goOn;\n\t}", "title": "" }, { "docid": "a8c10129259a041fb2ae5d98f1f9635a", "score": "0.50869787", "text": "public function goOn()\n\t{\n\t\treturn $this->_goOn;\n\t}", "title": "" }, { "docid": "c850ab0d5f7019418161c637a2b1e50a", "score": "0.50801915", "text": "public function getAlwaysOnLockdown()\n {\n if (array_key_exists(\"alwaysOnLockdown\", $this->_propDict)) {\n return $this->_propDict[\"alwaysOnLockdown\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "c850ab0d5f7019418161c637a2b1e50a", "score": "0.50801915", "text": "public function getAlwaysOnLockdown()\n {\n if (array_key_exists(\"alwaysOnLockdown\", $this->_propDict)) {\n return $this->_propDict[\"alwaysOnLockdown\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1d00de5beb633f7264721aaf2f2ef7df", "score": "0.5078822", "text": "public function isConnected()\n {\n return $this->is_connected;\n }", "title": "" }, { "docid": "48200cc3be6f52becbb4dd405bf2fe3f", "score": "0.50787127", "text": "function paytmActive()\n{\n if (env('PAYTM_ACTIVE') == 'YES') {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "48200cc3be6f52becbb4dd405bf2fe3f", "score": "0.50787127", "text": "function paytmActive()\n{\n if (env('PAYTM_ACTIVE') == 'YES') {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "40f7361ccc02eadd06b275e3081bac72", "score": "0.50768715", "text": "public function isEnabled()\n {\n return Mage::getStoreConfigFlag('newsletter/checkout/enable');\n }", "title": "" }, { "docid": "734a9c831303b349892547bf583192d1", "score": "0.50588435", "text": "public function trackOpenEnabled(): bool\n {\n if ($this->trackOpenEnabled === null) {\n $this->trackOpenEnabled = $this->config()->defaultTrackOpenEnabled();\n }\n return $this->trackOpenEnabled;\n }", "title": "" }, { "docid": "3426dad36719d321c47e76fb90ae8b3d", "score": "0.5058745", "text": "public function getVpnAlwaysOnLockdownMode(): ?bool {\n $val = $this->getBackingStore()->get('vpnAlwaysOnLockdownMode');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'vpnAlwaysOnLockdownMode'\");\n }", "title": "" }, { "docid": "05c103891f8c8c5a2a058b8d125d4921", "score": "0.50534177", "text": "public static function is_coming_soon_enabled() {\n\t\t$option = get_option( static::OPTION, false );\n\n\t\treturn ! empty( $option );\n\t}", "title": "" }, { "docid": "a87e1cd0bda1cf1519357739a891492e", "score": "0.5052873", "text": "function is_network_upgrade_mode() {\n return $this->_storage->get( 'is_network_activation' );\n }", "title": "" }, { "docid": "31ea932bd892bacdb513feb11d467e2a", "score": "0.50506413", "text": "public function isEnabled()\n {\n \treturn $this->getConfig(self::IS_ENABLED);\n }", "title": "" }, { "docid": "dfa62f05a2034fdf71ef22db3a7fc21c", "score": "0.504691", "text": "public static function is_plugin_network_active()\n {\n }", "title": "" } ]
dab42cece4c1bb5b4318889e674b407a
Returns the Doctrine_Collection of single DmPermission objects.
[ { "docid": "0c3c110b92198fa49b8522adae412bc2", "score": "0.595103", "text": "public function getPermissions()\n {\n return $this->getUser() ? $this->getUser()->get('Permissions') : array();\n }", "title": "" } ]
[ { "docid": "4429e99e7a4df20b4f2e70f73400c0bb", "score": "0.70361966", "text": "public function getDirectPermissions(): Collection\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "4429e99e7a4df20b4f2e70f73400c0bb", "score": "0.70361966", "text": "public function getDirectPermissions(): Collection\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "c43c6c2ab7ed005343967da9369751d0", "score": "0.68433356", "text": "public function permissions(): object\n {\n return $this->belongsToMany(Permission::class);\n }", "title": "" }, { "docid": "ddb40f26660d9d8e093ea05093fcffdb", "score": "0.66149455", "text": "public function findUsingPermission(string $permission): Collection;", "title": "" }, { "docid": "579efb161405d665d89a214c71da6356", "score": "0.65848666", "text": "function getPermissions() {\n\t\tif ( !$this->_Permissions instanceof mofilmPermissionGroupPermissions ) {\n\t\t\t$this->_Permissions = new mofilmPermissionGroupPermissions($this->getID(), $this->getNamespace());\n\t\t\tif ( $this->getID() > 0 ) {\n\t\t\t\t$this->_Permissions->load();\n\t\t\t}\n\t\t}\n\t\treturn $this->_Permissions;\n\t}", "title": "" }, { "docid": "fba294d9183a1187c666065507aa0f95", "score": "0.6557615", "text": "public function permissions() {\n\t\treturn $this->belongsToMany('App\\Permission');\n\t}", "title": "" }, { "docid": "ee21af0b78284d81d9fa96375db4d7ad", "score": "0.6555292", "text": "public function getPermissionsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "4becfc1e4d2b5a96dba249c649904d75", "score": "0.6544064", "text": "protected function getUserPermissions(): Collection\n {\n return Permission::where('name', 'LIKE', 'view_%')->get();\n }", "title": "" }, { "docid": "c12cf64f29b47ae3244a8316ccafdca9", "score": "0.65126014", "text": "public function PermissionList ()\n\t\t{\n\t\t\t$oblarrPermissions = new dataArray ('PermissionList', 'Permission');\n\t\t\t\n\t\t\t// Test each Permission\n\t\t\tforeach ($GLOBALS['Permissions'] AS $intKey => $intValue)\n\t\t\t{\n\t\t\t\tif (HasPermission ($this->Pull ('Privileges')->getValue (), $intKey))\n\t\t\t\t{\n\t\t\t\t\t$oblarrPermissions->Push (new Permission ($intKey));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $oblarrPermissions;\n\t\t}", "title": "" }, { "docid": "f9b6033e0c9681af14c501b18005ac61", "score": "0.64455515", "text": "public function permissions()\n {\n return $this->belongsToMany(Permission::class);\n }", "title": "" }, { "docid": "f9b6033e0c9681af14c501b18005ac61", "score": "0.64455515", "text": "public function permissions()\n {\n return $this->belongsToMany(Permission::class);\n }", "title": "" }, { "docid": "f9b6033e0c9681af14c501b18005ac61", "score": "0.64455515", "text": "public function permissions()\n {\n return $this->belongsToMany(Permission::class);\n }", "title": "" }, { "docid": "f9b6033e0c9681af14c501b18005ac61", "score": "0.64455515", "text": "public function permissions()\n {\n return $this->belongsToMany(Permission::class);\n }", "title": "" }, { "docid": "dd463b96651652adce9a4ddecb1374e5", "score": "0.6425559", "text": "public function permissions()\n {\n return $this->belongsToMany('Ruysu\\Core\\Auth\\Models\\Permission');\n }", "title": "" }, { "docid": "d06197761b2c9c537a981a36fc310be7", "score": "0.6407439", "text": "public function permissions()\n {\n return $this->belongsToMany('App\\Models\\Permission');\n }", "title": "" }, { "docid": "d06197761b2c9c537a981a36fc310be7", "score": "0.6407439", "text": "public function permissions()\n {\n return $this->belongsToMany('App\\Models\\Permission');\n }", "title": "" }, { "docid": "d938fce91be557517d59b3c46dff3520", "score": "0.6381373", "text": "public function permissions()\n {\n return $this->belongsToMany('App\\Permission');\n }", "title": "" }, { "docid": "f5e14d3cb53dbd00e32fcd299724ea40", "score": "0.6380059", "text": "public function permissions(): Collection\n {\n return Cache::remember(\"users.{$this->getKey()}.permissions\", 3600, function () {\n /** @var Permission $permissionModel */\n $permissionModel = app(config('laravolt.epicentrum.models.permission'));\n\n return $permissionModel\n ->newModelQuery()\n ->selectRaw('acl_permissions.*')\n ->join('acl_permission_role', 'acl_permissions.id', '=', 'acl_permission_role.permission_id')\n ->join('acl_role_user', 'acl_role_user.role_id', '=', 'acl_permission_role.role_id')\n ->join('users', 'users.id', '=', 'acl_role_user.user_id')\n ->where('users.id', $this->getKey())\n ->get()->unique();\n });\n }", "title": "" }, { "docid": "2bbb13febb2bfd41626bf1290d70f9c2", "score": "0.6362196", "text": "public function permissions()\n {\n return $this->belongsToMany(Permission::class, null, \"role_ids\", \"permission_ids\");\n }", "title": "" }, { "docid": "ead0ba25fc69d047a8e01d40b0a87c43", "score": "0.6360084", "text": "public function permissions()\n {\n return $this->belongsToMany('Modules\\Project\\Http\\Repositories\\PermissionRepository', 'permission_user', 'user_id', 'permission_id');\n }", "title": "" }, { "docid": "d94813e8cabc62de2fa3d1836835df3a", "score": "0.6342834", "text": "public function permissions(): MorphToMany;", "title": "" }, { "docid": "87d41ae1e41407c7be44d9dfe374dbd0", "score": "0.6337897", "text": "public function getPermissionsList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "eaeee16a2d84a3d5151724901ac3bf34", "score": "0.633102", "text": "public function permissions()\n {\n /** @var \\UserFrosting\\Sprinkle\\Core\\Util\\ClassMapper $classMapper */\n $classMapper = static::$ci->classMapper;\n\n return $this->belongsToMany($classMapper->getClassMapping('permission'), 'permission_roles', 'role_id', 'permission_id')->withTimestamps();\n }", "title": "" }, { "docid": "ed626053836cf88b6b340b547f4395bc", "score": "0.6317385", "text": "protected function getPermissions()\n {\n return Permission::with('roles')->get();\n }", "title": "" }, { "docid": "be76beea01520811e17ea69424916295", "score": "0.6310422", "text": "public function permissions()\n {\n return $this->belongsToMany('BookStack\\Permission');\n }", "title": "" }, { "docid": "fd845b9dafb8be411bffcebe00f0ce6c", "score": "0.62913376", "text": "public function permissions()\n {\n return $this->morphToMany(\n 'Reflex\\Lockdown\\Permissions\\Eloquent\\Permission',\n 'permissionable',\n 'lockdown_permissionables'\n )->withPivot('level');\n }", "title": "" }, { "docid": "b48c5c446df1a628b42d5e5b9862c840", "score": "0.6279399", "text": "public function permissions()\n {\n $sql='SELECT * FROM auth_permission;';\n $q=$this->db()->query($sql) or die(\"Error:\".print_r($this->db()->errorInfo(), true).\"<hr />$sql\");\n\n $dat=[];\n while ($r=$q->fetch(PDO::FETCH_ASSOC)) {\n $dat[]=$r;\n }\n\n return $dat;\n }", "title": "" }, { "docid": "7212fd2fa174912efb1a0ac5e409f3d3", "score": "0.62587255", "text": "function getAllPermissions()\n\t{\t\n\t\treturn $this->getAll('permission');\n\t}", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.62435496", "text": "public function getPermissions();", "title": "" }, { "docid": "26d2cb4a3caa5c7eb0c7acefa0791d8c", "score": "0.61735654", "text": "public function permissions()\n {\n return $this->hasMany('ADKGamers\\\\Webadmin\\\\Models\\\\AdKats\\\\Permission');\n }", "title": "" }, { "docid": "460f67d03c25c6d397367057b1df15ec", "score": "0.6164249", "text": "function &getPermission()\n {\n $perm = new Horde_Perms_Permission($this->datatreeObject->getName());\n $perm->data = isset($this->datatreeObject->data['perm'])\n ? $this->datatreeObject->data['perm']\n : array();\n\n return $perm;\n }", "title": "" }, { "docid": "0b858c216676639d018fe1e504b8b499", "score": "0.615279", "text": "public function getAllPermissions();", "title": "" }, { "docid": "0df9d20bc02d243d8e7e64748b807197", "score": "0.6138086", "text": "public function permissions()\n {\n $data = [ ];\n\n foreach ($this->entities->resolveAll() as $entity) {\n $data[$entity->getId()] = $entity->getPermissions();\n }\n\n return $data;\n }", "title": "" }, { "docid": "a1104b8609026ae72ee25ca98da96e65", "score": "0.612712", "text": "public function permissions()\n {\n return $this->belongsToMany(Models\\Permisologia\\Permission::class);\n }", "title": "" }, { "docid": "97cdbbe12075457089f9a5dab635fca6", "score": "0.61245173", "text": "public function getPermissions()\r\n\t{\r\n\t\treturn $this->permissionlist;\r\n\t}", "title": "" }, { "docid": "2136391ef205e15d11b16437ed3c851f", "score": "0.61124486", "text": "public function permissions()\n {\n return $this->hasMany(config('laravel-auth.permissions.model', Permission::class), 'group_id');\n }", "title": "" }, { "docid": "23122690fcf504adc0394df8e5e3368b", "score": "0.60884345", "text": "protected function getPermissions()\n {\n try {\n \n return Permission::with('roles')->get();\n\n } catch (\\Exception $e) {\n return [];\n }\n }", "title": "" }, { "docid": "418e4d31dd1c2d36ea1851cb1a7025e5", "score": "0.6085932", "text": "public function permissions()\n {\n return $this->hasMany(app('AuzoPermission'), 'role_id');\n }", "title": "" }, { "docid": "47a5c72add389cb89834e13d21299677", "score": "0.6063711", "text": "public function permissions() {\n //return Permission::lists('permission_slug');\n }", "title": "" }, { "docid": "e3f3a5787d3ee270d75f6d1005d4fc58", "score": "0.6059333", "text": "public function get_permission_groups():array {\n $group = new PermissionGroup(); // permission group table\n return $group->findAll();\n }", "title": "" }, { "docid": "4b70a9f7da62e6f7563a8c14486b53b3", "score": "0.60550326", "text": "public function getAllPermissions(){\n\n\t\t$PermissionList = array();\n\n\t\t$this->_DB->doQuery(\"SELECT * FROM tbl_permission order by Category ASC\");\n\n\t\t$rows = $this->_DB->getAllRows();\n\n\t\tfor($i = 0; $i < sizeof($rows); $i++) {\n\t\t\t$row = $rows[$i];\n\t\t\t$this->_Permission = new Permission();\n\n\t\t $this->_Permission->setID ( $row['ID']);\n\t\t $this->_Permission->setName( $row['Name'] );\n\t\t $this->_Permission->setCategory( $row['Category'] );\n\n\t\t $PermissionList[]=$this->_Permission;\n \n\t\t}\n\n\t\n\t\t$Result = new Result();\n\t\t$Result->setIsSuccess(1);\n\t\t$Result->setResultObject($PermissionList);\n\n\t\treturn $Result;\n\t}", "title": "" }, { "docid": "03a8fe9053a9f752311daca45374291d", "score": "0.6047122", "text": "public function permissions()\n {\n return $this->belongsTo('App\\Permission');\n }", "title": "" }, { "docid": "b6411972eb2d62e485cdb6651657ec10", "score": "0.6028664", "text": "public function getPermissionsCollectionObject()\n {\n return self::getByID($this->cInheritPermissionsFromCID, 'RECENT');\n }", "title": "" }, { "docid": "263b9867982952632a8c33b8cbf92105", "score": "0.60204583", "text": "public function getAllPermissions()\n {\n return Permission::all()->pluck('name')->toArray();\n }", "title": "" }, { "docid": "19bd40cdb80091082be96f703c31177b", "score": "0.60072774", "text": "public function getPermissionList() {\n try {\n \treturn SystemComponent::leftJoin('system_component_groups AS SystemComponentGroup','system_components.system_component_group_id','SystemComponentGroup.system_component_group_id') \n\t ->orderBy('SystemComponentGroup.order','asc')\n\t ->orderBy('system_components.order','asc')\n\t ->get();\n } catch (Exception $e) {\n \t$this->postLogs(config('errorcontants.mysql'), $e);\n throw $e;\n }\n }", "title": "" }, { "docid": "af32068dd157ccf039eb1041f297b53b", "score": "0.5989925", "text": "public function getPermissionCategory()\n {\n $permissions_category = array();\n\n $sql = \"SELECT *\n FROM permissioncategory\n ORDER BY sortorder, permissioncategoryname\";\n\n return $this->db_read->fetchAll($sql);\n }", "title": "" }, { "docid": "ea375c3c6bedc96eb9540fe488cbd6db", "score": "0.597831", "text": "public function getPermissions()\n { \n $permissions = Permission::get(); \n \n return Datatables::of($permissions)\n ->addColumn('action', function ($permission) {\n return '<a href=\"permissions/'. Hashids::encode($permission->id).'/edit\" class=\"text-primary\" data-toggle=\"tooltip\" title=\"Edit Permission\"><i class=\"fa fa-edit\"></i> </a> \n <a href=\"javascript:void(0)\" class=\"text-danger btn-delete\" data-toggle=\"tooltip\" title=\"Delete Permission\" id=\"'.Hashids::encode($permission->id).'\"><i class=\"fa fa-trash\"></i></a>';\n })\n ->editColumn('id', 'ID: {{$id}}')\n ->make(true);\n \n }", "title": "" }, { "docid": "f39a30f22c76104317b7a56a2767d61b", "score": "0.59675467", "text": "public function getPermissionGroupsWithPermissions();", "title": "" }, { "docid": "a0c6907188b873137cc4fc0e65d67a1d", "score": "0.59666115", "text": "public function allPermissions() : Collection\n {\n return $this->roles()\n ->with('permissions')\n ->get()\n ->pluck('permissions')\n ->flatten()\n ->merge($this->permissions);\n }", "title": "" }, { "docid": "374d03757ee024da4a9ca3bb55f9c4a7", "score": "0.59656143", "text": "public function permission(): ?iterable\n {\n return isset($this->permission)\n ? Arr::wrap($this->permission)\n : null;\n }", "title": "" }, { "docid": "8845ee7df0d460299dc2bd94e7e8ea3f", "score": "0.59622395", "text": "public function permisos()\n {\n return $this->belongsToMany('App\\Permission', 'permission_rol', 'cod_rol', 'cod_permission');\n }", "title": "" }, { "docid": "0471d580701b49596eb01deb1874981c", "score": "0.5945417", "text": "public function getUserPermissions(): Collection\n {\n return $this->model->where('name', 'LIKE', 'view_%')->get();\n }", "title": "" }, { "docid": "fd0cbc89b8ecc577bb23311b72c5b797", "score": "0.5938651", "text": "public function getPermissions()\n {\n $qb = $this->getEntityManager()->createQueryBuilder()\n ->select( \"p\")->from(\"Security\\Entity\\PermissaoAcl\", \"p\")\n ->innerJoin(\"Security\\Entity\\RecursoSistema\", \"rs\", \"with\", \"rs.id=p.recursoSistema\")\n ->getQuery()\n ->getResult();\n return $qb;\n }", "title": "" }, { "docid": "16a809c0fe98cc851f9a6b40ffa280bb", "score": "0.5916834", "text": "public function permissions()\n {\n return $this->hasMany('Cuatromedios\\Kusikusi\\Models\\Permission', 'user_id');\n }", "title": "" }, { "docid": "465ee26efeafefa0ef10b10d6539b412", "score": "0.59152657", "text": "public function getAllPermissions()\n {\n return $this->getUser() ? $this->getUser()->getAllPermissions() : array();\n }", "title": "" }, { "docid": "d694d25ee45937707c7c2061d9a1b6b2", "score": "0.5889387", "text": "function getPermissions()\r\n {\r\n return $this->permissions;\r\n }", "title": "" }, { "docid": "d17bd658ad69934c7be1c58c8b4d0451", "score": "0.58867705", "text": "public function getPermissions()\n {\n $permissions = new Collection();\n foreach ($this->getRoles() as $role) {\n $permissions = $permissions->merge($role->permissions);\n }\n\n return $permissions;\n }", "title": "" }, { "docid": "1d2744d31f673dafda3c98cc7d172ef0", "score": "0.5885877", "text": "public function getPermissionsViaGroups(): Collection\n {\n return $this->loadMissing('groups', 'groups.permissions')\n ->groups->flatMap(function ($group) {\n return $group->permissions->filter(function ($permission) {\n return !is_null($permission->pivot->access);\n });\n })\n ->sort()\n ->values();\n }", "title": "" }, { "docid": "db218f9d99cfe12abb9d860f8fb98d68", "score": "0.5877717", "text": "public function permissions()\n {\n $table = config('larbac.tablePrefix').config('larbac.tables.permissionToRoleTable');\n return $this->belongsToMany(\"Larbac\\Models\\Permission\",$table)->withTimestamps();\n }", "title": "" }, { "docid": "91a19f611b9c2ea60ae73791a38ed49d", "score": "0.5871831", "text": "public function getAllPermissionsAsArray()\n {\n return Permission::all()->toArray();\n }", "title": "" }, { "docid": "a0121307ed1f5cb35bb10b6285f35040", "score": "0.58639246", "text": "public function getAssignedPermissions()\n {\n //try to load from DB\n if($this->_permissions === false){\n $this->loadfromDB();\n }\n return $this->_permissions;\n }", "title": "" }, { "docid": "2503219efb4d981841b3bd81345a14d7", "score": "0.585778", "text": "public function permissions(): BelongsToMany;", "title": "" }, { "docid": "a5dff37aeaa394c9cd4d2d6a1637b45d", "score": "0.58458567", "text": "public function permissions()\n {\n $pivotTable = 'authorization_user_permissions';\n $relatedModel = Permission::class;\n return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'permission_id');\n }", "title": "" }, { "docid": "dabc941b491cc1073c49c390f4eb665a", "score": "0.58448654", "text": "public function getAllPermissions(): Collection\n {\n if (null === $this->permissions) {\n $this->permissions = $this->readFromConfig();\n }\n\n return Collection::make($this->permissions);\n }", "title": "" }, { "docid": "63ae8eb7c03aa67f33b3f98c05a91da6", "score": "0.5806755", "text": "public function perms()\n {\n return $this->belongsToMany(config('entrust.permission'), config('entrust.permission_role_table'), 'role_id', 'permission_id');\n }", "title": "" }, { "docid": "de01284988cbd7f0a61e68341cea9bb7", "score": "0.5803059", "text": "protected function getCRUD()\n {\n if (\n is_null($this->oGroupCollection) === false &&\n is_null($this->oPermissionCollection) === false &&\n $this->oGroupCollection->hasItem() &&\n $this->oPermissionCollection->hasItem()\n ) {\n if (($oPermission = $this->oPermissionCollection->search('entity_class', $this->getChildClass())) != null) {\n $oJsonPermissions = new Json($oPermission->permission);\n return $oJsonPermissions;\n }\n }\n return null;\n }", "title": "" }, { "docid": "047d3dac3ac75559624e92747bd3f3a6", "score": "0.5800692", "text": "public function readPermissions()\n {\n return Permission::with('roles')->latest()->paginate();\n }", "title": "" }, { "docid": "19a00bc05166765d95b94d555be70dad", "score": "0.57871974", "text": "public function getAllPermissions(): Collection\n {\n $permissions = $this->permissions;\n\n if ($this->groups->count()) {\n $permissions = $permissions->merge($this->getPermissionsViaGroups());\n }\n\n return $permissions->sort()->values();\n }", "title": "" }, { "docid": "b6a1be6aa017b7d3985a5445090b18cc", "score": "0.575894", "text": "public function getPermission($id)\n {\n return $this->method('GET')->resource(\"permissions/$id\")->make();\n }", "title": "" }, { "docid": "05ed2e99cb6591783e8529a7dbe2ecdb", "score": "0.57495797", "text": "public function getAllPermissions()\r\n\t{\r\n\t\treturn $this->perms;\r\n\t}", "title": "" }, { "docid": "cb19516d00579a6c874576f4dd01af56", "score": "0.5740685", "text": "public function permissionList()\r\n {\r\n if($this->permissionList === null)\r\n {\r\n $this->permissionList = $this->request(\"permissionlist\")->toAssocArray(\"permname\");\r\n }\r\n\r\n return $this->permissionList;\r\n }", "title": "" }, { "docid": "e40abedb1927622dd58bab480521177b", "score": "0.57404804", "text": "private function getPermissionById($id)\n {\n return $this->permissions()\n ->getRelated()\n ->where('id', $id)\n ->first();\n }", "title": "" }, { "docid": "dc1411bbe7b03d78037bc6ff19ef7767", "score": "0.57190895", "text": "function &getPermission()\n {\n $perm = new Horde_Perms_Permission('');\n $perm->data = isset($this->data['perm'])\n ? $this->data['perm']\n : array();\n\n return $perm;\n }", "title": "" }, { "docid": "ee2530d320d354b268a9d0bfdcd5d3b9", "score": "0.5703042", "text": "public function permissions()\n {\n return $this->belongsToMany('App\\Http\\Model\\Permission','permission_role','role_id','permission_id');\n\n }", "title": "" }, { "docid": "dfcb0100f8ebc258066d32f970af933d", "score": "0.5702576", "text": "public function perms()\n {\n if(!isset(CAT_Object::$objects['perms']) || !is_object(CAT_Object::$objects['perms']) )\n self::storeObject('perms',CAT_Permissions::getInstance());\n return CAT_Object::$objects['perms'];\n }", "title": "" }, { "docid": "a08c06cbc6c43f5b9fcd351f4309ac09", "score": "0.569806", "text": "public function permissions() : BelongsToMany\n {\n return $this->belongsToMany(AdminPermission::class, 'admin_role_permission', 'role_id', 'permission_id');\n }", "title": "" }, { "docid": "7ec61ee04e792e2139b8f7d34e36f845", "score": "0.5684464", "text": "public function getPermissions()\n\t{\n\t\treturn collect(json_decode($this->family()->pivot->permissions));\n\t}", "title": "" }, { "docid": "55a684a72ac9afb6a6e285f5b7d9ba45", "score": "0.56830317", "text": "public function getPermissions()\n\t{\n\t\t$permissions = Permission::all();\n\n\t\treturn response()->success(compact('permissions'));\n\t}", "title": "" }, { "docid": "fbc1633802772232514f3a14b454edc8", "score": "0.5671148", "text": "public function getPermissions()\n {\n // TODO: Implement getPermissions() method.\n }", "title": "" }, { "docid": "0b6e2139c45075cf7354a0e704920f19", "score": "0.56570756", "text": "public function permission()\n {\n return $this->belongsTo(Permission::class);\n }", "title": "" }, { "docid": "0b6e2139c45075cf7354a0e704920f19", "score": "0.56570756", "text": "public function permission()\n {\n return $this->belongsTo(Permission::class);\n }", "title": "" }, { "docid": "57e449eda591a85a0451ef0d9126d071", "score": "0.56493896", "text": "public function getPermissions()\n {\n return array();\n }", "title": "" }, { "docid": "349c43181cd102ceabf84ecc19e64517", "score": "0.56471694", "text": "public function getPermissionsViaRoles(): Collection\n {\n return $this->load('roles', 'roles.permissions')\n ->roles->flatMap(function ($role) {\n return $role->permissions;\n })->sort()->values();\n }", "title": "" }, { "docid": "c27105a23ac0b326febb167a45279ac8", "score": "0.5644332", "text": "public function getAllRoleWithPermission()\n {\n return $this->_model::with('permissions')->get();\n }", "title": "" }, { "docid": "34137c4493c1af6e4d51af94a41ffd97", "score": "0.56276184", "text": "public function permissions(): BelongsToMany\n {\n $pivotTable = config('admin.database.user_permissions_table');\n $relatedModel = config('admin.database.permissions_model');\n return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'permission_id');\n }", "title": "" }, { "docid": "685c5604978cd18cd08875d24fe63b85", "score": "0.56120807", "text": "public function getProjectPermissions()\n {\n return $this->_permissions;\n }", "title": "" }, { "docid": "0aa1fafa98584b8436ddd1b31caf07ec", "score": "0.5603933", "text": "public function permissions(): BelongsToMany\n {\n return $this->belongsToMany(Permission::class, 'role_has_permissions', 'role_id', 'permission_id');\n }", "title": "" }, { "docid": "f33531a81627dd1862a86fff23388e05", "score": "0.56009585", "text": "public function findByPermission(int $permissionId)\n {\n return $this->join('defender.permission_role', 'roles.id', '=', 'defender.permission_role.role_id')\n ->where('defender.permission_role.permission_id', $permissionId);\n }", "title": "" }, { "docid": "35e5f9f9992a9a805ee3fa4f7ecc1f34", "score": "0.55933183", "text": "public function permissions()\n {\n $permissions = [];\n\n foreach ($this->roles as $role) {\n $role->permissions->each(function ($permission) use (&$permissions) {\n $permissions[] = $permission;\n });\n }\n\n return collect($permissions);\n }", "title": "" }, { "docid": "8131fa5f29d7a1f0c75fcbbcbfe11e8d", "score": "0.55907285", "text": "public function getPermissions()\n\t{\n\t\treturn $this->permissions;\n\t}", "title": "" }, { "docid": "081808fae2a106c7ca607d5103ee8652", "score": "0.55859184", "text": "public function all_permissions() {\n // Only build permissions once.\n if ($this->permissions === NULL) {\n $this->_build_permissions();\n }\n return $this->permissions;\n }", "title": "" }, { "docid": "c2f2ded8d78c38804315acd2c34128b8", "score": "0.55753183", "text": "public function permissions()\n {\n $pivotTable = config('permission.database.permission_routes_table');\n\n $relatedModel = config('permission.database.permissions_model');\n\n return $this->belongsToMany($relatedModel, $pivotTable, 'route_id', 'permission_id')->withTimestamps();\n }", "title": "" }, { "docid": "711c72ea4569d4b16a4a5256cc63b6eb", "score": "0.55744094", "text": "public function getAllPermissions()\n {\n \t$permissions = array();\n \tforeach($this->getAccessRoleSecurityAction() as $accessRoleSecurityAction){\n \t\t$permissions[$accessRoleSecurityAction['id_security_action']][$accessRoleSecurityAction['id_access_role']] = 1;\n \t}\n \treturn $permissions;\n }", "title": "" }, { "docid": "6905f43c6b95aae39813919edf2c56d3", "score": "0.5555211", "text": "public function getMappingPermissions(): array;", "title": "" }, { "docid": "96d8470ffbdd159448f0a90ad02ba103", "score": "0.55508214", "text": "public function getAllPermissionsAttribute()\n\t{\n\t\treturn $this->getAllPermissions();\n\t}", "title": "" }, { "docid": "f17ccff2c838c8b60d5dac1a0e8f64a2", "score": "0.55359983", "text": "public function getPermissionsArray();", "title": "" }, { "docid": "b9cb42e11b86fbedf4cd066e4dd4f2a2", "score": "0.5517985", "text": "public function getAllPermissions(): Collection\n {\n $permissions = $this->permissions;\n if ($this->roles) {\n $permissions = $permissions->merge($this->getPermissionsViaRoles());\n }\n\n return $permissions->sort()->values();\n }", "title": "" }, { "docid": "a9c6212cd3dc22e732515a7013f0a5f0", "score": "0.5506988", "text": "public function allPermissions()\n {\n return $this->roles()->with('permissions')->get()->pluck('permissions')->flatten()->merge($this->permissions);\n }", "title": "" }, { "docid": "d9cc3de589598b0b18f371f25660b834", "score": "0.55052507", "text": "public function permissions(){\n return $this->belongsToMany(Permission::class)->withTimestamps();\n }", "title": "" }, { "docid": "4a12aaaf03a8d4725f23bd5883488de5", "score": "0.5484557", "text": "public function getPermissionByCategoryId($permissioncategory_id)\n {\n $permissions = array();\n\n $sql = \"SELECT *\n FROM permission\n WHERE permissioncategory_id = ? \n ORDER BY sortorder, object, label\";\n\n $permissions = $this->db_read->fetchAll($sql, array($permissioncategory_id));\n return $permissions; \n }", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "c5f2f4f3c94c3a129ccbe597d9c8704e", "score": "0.0", "text": "public function __construct()\n {\n // $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "bd1ee0eb805b9537f7b5fffd7bc75869", "score": "0.7934717", "text": "protected function createController()\n\t{\n\t\t$this->createParentControllerIfNotExists();\n\n\t\t$this->create('Controller', $this->data->get('controller.path'), [\n\t\t\t'name' => $this->data->get('controller.name'),\n\t\t\t'namespace' => $this->data->get('controller.namespace'),\n\t\t\t'parent' => $this->data->get('base_controller.name'),\n\t\t\t'parent_namespaced' => $this->data->get('base_controller.namespaced'),\n\t\t]);\n\t}", "title": "" }, { "docid": "8fc472ca59d683f1b71ce35c8d9cd840", "score": "0.79196423", "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('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "586d07833162bcc0f3d9ef3beb9597eb", "score": "0.75784665", "text": "private function makeController()\r\n {\r\n\r\n new MakeController($this, $this->files);\r\n\r\n }", "title": "" }, { "docid": "c93c248aa366a21a75f395554a1b6d92", "score": "0.7545241", "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('tenant:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "6d22add10fa68cef458f5bce88d0fc82", "score": "0.7471624", "text": "public static function create()\n\t{\n\t\t//check, if an ObjectController instance already exists\n\t\tif(ObjectController::$objectController == null)\n\t\t{\n\t\t\tObjectController::$objectController = new ObjectController();\n\t\t}\n\n\t\treturn ObjectController::$objectController;\n\t}", "title": "" }, { "docid": "0b66faaecec66cfdcab2e8144eedde9c", "score": "0.7285359", "text": "public function create()\n {\n // See register controller\n }", "title": "" }, { "docid": "5905a13dea41ead7716acf26c8e1b561", "score": "0.72167856", "text": "public function createController() \n\t{\n if (!class_exists($this->controller))\n {\n new InvalidPageException(Method::GET, null);\n header('Location: /document/pagenotfound'); \n }\n \n return new $this->controller($this->action,$this->urlvalues, $this->postvalues, $this->filevalues, $this->id, $this->userid, $this->state, $this->admin);\n\t}", "title": "" }, { "docid": "44397456b6f80012d882544513cb3343", "score": "0.71994245", "text": "private function makeContoller()\n {\n $this->warn(\"Creating Controller\");\n\n $contents = file_get_contents( __DIR__.'../../../resources/base_files/controller.php');\n $updated_contents = $this->updateFileContents($contents);\n $path = base_path() .'/packages/'.$this->packageName.'/Http/Controllers/'.$this->packageName.'Controller.php';\n\n file_put_contents($path, $updated_contents);\n }", "title": "" }, { "docid": "e221633d04fc2f4f5f4d8a2362428823", "score": "0.69536394", "text": "abstract protected function controllerConstruct();", "title": "" }, { "docid": "fb60484fbf762e91b17b69f41086c2c6", "score": "0.6904606", "text": "private function makeController($controllerClassName)\n {\n if ($this->controllerFactory !== null) {\n return call_user_func($this->controllerFactory, $controllerClassName);\n }\n\n return new $controllerClassName;\n }", "title": "" }, { "docid": "88a72e1c8a3b541250666d8d876df9b1", "score": "0.6892876", "text": "public function createController($pi, array $params)\n {\n $container = include __DIR__ . '/dic.php';\n $class = __NAMESPACE__ . '\\\\Controller';\n\n return $container->get($class);\n }", "title": "" }, { "docid": "f5c573357e8982b856f3cf95f34207d4", "score": "0.6804621", "text": "public function controller()\n {\n $this->setClassname($this->getArgument(0));\n\n $this->generateClass('Http/Controllers', 'controller.stub', [\n 'classname' => $this->getClassname(),\n ]);\n }", "title": "" }, { "docid": "7768e52ada3641234c165223358c3965", "score": "0.66875744", "text": "private function getController(): IndexController\n {\n return new IndexController($this->getContainer());\n }", "title": "" }, { "docid": "d57ef5a3ee0ea199899f50a3bc03b48b", "score": "0.65677804", "text": "public function createController($pi, array $params)\n {\n $page = isset($params['page']) ? $params['page'] : 'main';\n $page = preg_replace('/_page$/', '', $page);\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\' . ucfirst($page) . 'Controller';\n\n return new $class();\n }", "title": "" }, { "docid": "72d5a441f81890687fc2dd00df3baf73", "score": "0.65138745", "text": "public static function getInstance() \n {\n $class = __CLASS__;\n if (!isset(self::$_Controller)) {\n return new $class();\n }\n return self::$_Controller;\n }", "title": "" }, { "docid": "75acb5ec39d0d68eed980ebdb37bc967", "score": "0.6485421", "text": "public static function ctrl_maker($ctrl_name)\n \t{\n \t\tif (file_exists(\"app/controllers/{$ctrl_name}.php\")) {\n \t\t\techo \"Existing [{$ctrl_name}] Controller found, try again \\n\";\n \t\t\texit;\n \t\t}\n\n \t\t//Create and write File to controller Dir\n \t\t$controller = fopen(\"app/controllers/{$ctrl_name}.php\",\"w\");\n \t\tfwrite($controller, self::wfile($ctrl_name));\n\n \t\t//Throw response\n \t\techo \"Controller [{$ctrl_name}] created successfully \\n\";\n \t}", "title": "" }, { "docid": "cb636a4bd71a574d37ddab166dd7fcc1", "score": "0.6446192", "text": "private function createController($name, $option = \"false\")\n {\n $container = controllers_path();\n $name = preg_replace('/controller/i', 'Controller', ucfirst($name));\n $append = <<<EOF\n\n /**\n * Controller Index\n *\n * @return mixed\n **/\n public function index()\n {\n\n }\n\n\n /**\n * Fetch resource\n *\n * @return mixed\n **/\n public function fetch()\n {\n\n }\n\n\n /**\n * Show all/a resource(s)\n *\n * @param \\$id\n * @return mixed\n **/\n public function show(\\$id)\n\t{\n\n\t}\n\n\n /**\n * Create a resource\n *\n * @return mixed\n * */\n public function create()\n {\n\n }\n\n\n /**\n * Store the resource\n *\n * @return mixed\n * */\n public function store()\n {\n\n }\n\n\n /**\n * Edit a resource\n *\n * @param \\$id\n * @return mixed\n */\n public function edit(\\$id)\n {\n\n }\n\n\n /**\n * update the resource\n *\n * @return mixed\n */\n public function update()\n {\n\n }\n\n\n /**\n * Destroy a resource\n *\n * @param \\$id\n */\n public function destroy(\\$id)\n {\n\n }\n\n\nEOF;\n\n /**\n * if $option is 'empty', return an empty class\n */\n $methods = ($option == \"true\") ? '' : $append;\n\n $sub = preg_replace('/(.*)\\/(.*)/', '$2', $name);\n $data = <<<EOF\n<?php\n\nclass {$sub}\n{\n {$methods}\n}\n\nEOF;\n\n if (file_exists(\"{$container}/{$name}.php\")):\n return die(\"controller '{$name}' already exists.\\n\");\n endif;\n\n $file = fopen(\"{$container}/{$name}.php\", 'x');\n fwrite($file, $data);\n\n return die(\"'{$sub}' class created.\\n\");\n }", "title": "" }, { "docid": "e7d30d8ef2c251016e0dac7a6ede050c", "score": "0.6426407", "text": "public static function factory($controllerName, $layoutName, $action, $agent)\n {\n // Determine full classname\n $className = self::getClassName($controllerName);\n\n // Construct and return Controller\n return new $className($layoutName, $action, $agent);\n }", "title": "" }, { "docid": "2340da4739a3d4f3af4a806c3b40163c", "score": "0.6424097", "text": "public function incluirController() {\n $controller = $this->name . 'Controller';\n $this->controller = new $controller;\n }", "title": "" }, { "docid": "62acacd9eda2a0af65323ac3d09ec0fd", "score": "0.63956344", "text": "protected function createController( ezcMvcRoutingInformation $routingInformation, ezcMvcRequest $request )\n {\n $controllerClass = $routingInformation->controllerClass;\n $controller = new $controllerClass( $routingInformation->action, $request );\n return $controller;\n }", "title": "" }, { "docid": "9964315b7852ff5fa78452a1123ffbf4", "score": "0.63953257", "text": "public function postController(Request $request){\n $data = $request->json()->all();\n $controller = Controller::create([\n 'controller'=> $data['controller'],\n ]);\n return response()->json($controller, 201);\n }", "title": "" }, { "docid": "6dfca3c8cec5e1689beed63c582777e1", "score": "0.63864696", "text": "public function createController($class) {\n\t\t$replace = [];\n\t\t$file = [];\n\n\t\t$stub='/stubs/EditoraController.20220812.stub';\n\t\tif ($this->old_school_controllers)\n\t\t{\n\t\t\t$stub='/stubs/EditoraController.stub';\n\t\t}\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/'))\n\t\t\tmkdir(app_path() . '/Http/Controllers/Editora/', 0755, true);\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php') || $this->force_overwrite_controllers) {\n\n\t\t\tif (file_exists(__DIR__ . $stub)) {\n\t\t\t\t$file = file_get_contents(__DIR__ . $stub);\n\n\t\t\t\t$repositoryNamespace = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyNamespace\"] = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyModelClass\"] = $class->name . 'Extraction';\n\t\t\t\t$replace[\"DummyClass\"] = $class->name;\n\t\t\t\t$replace[\"DummyLowerCaseClass\"] = strtolower($class->name);\n\n\t\t\t\t$file = str_replace(array_keys($replace), array_values($replace), $file);\n\n\t\t\t\t$file_php = fopen(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php', \"w\");\n\t\t\t\tfwrite($file_php, $file);\n\t\t\t\tfclose($file_php);\n\n\t\t\t\techo(\"Create \" . $class->name . \" Controller \\n\");\n\t\t\t} else {\n\t\t\t\techo \"Not exist stub controller \\n\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Exist \" . $class->name . \" Controller \\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "cbd895cf654881e4d256ac3844370a33", "score": "0.6360979", "text": "private function initController($controller) {\n\n $file = __DIR__ . '/../controllers/' . $controller . 'Controller.php';\n include_once $file;\n $controller = $controller . 'Controller';\n return new $controller;\n }", "title": "" }, { "docid": "c0c517ef5bcb5856fd2a2deeb4b02326", "score": "0.6323563", "text": "public function createController(): void\n {\n $this->checkDsToken();\n // Call the worker method\n $args = $this->getTemplateArgs();\n $results = $this->addActiveUser($args[\"envelope_args\"]);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new active eSignature user\",\n \"Create a new active eSignature user\",\n \"Results from eSignUserManagement:createUser method:\",\n json_encode(($results->__toString()))\n );\n }\n }", "title": "" }, { "docid": "53355a54bdfca52319b0b386c404dc0c", "score": "0.63204664", "text": "private function instantiateControllers()\n {\n $this->app['payments.controller'] = function () {\n return new PaymentsController($this->app['payments.service'], $this->app['payments.validator']);\n };\n }", "title": "" }, { "docid": "9a984469cd357201ffb0fbfd42e53081", "score": "0.62975997", "text": "public static function inst($controller) {\n $controllerName = $controller.'Controller';\n $fname = str_replace('_', '/', $controller).'.php';\n if (!class_exists($controllerName)) {\n if (!include(wheel::$conf['local_inc_dir'].'/controllers/'.$fname))\n throw new wheelException('Could not load file for controller '. $controller.' - please verify file is in the right location');\n }\n return new $controllerName();\n }", "title": "" }, { "docid": "adb31cc89366698aa5547192a77b1f97", "score": "0.6294923", "text": "public function criarControllerAction()\n {\n $form = $this->getServiceLocator()->get('Gerador\\Form\\CriarControllerForm');\n $service = $this->getServiceLocator()->get('Gerador\\Service\\GeradorService');\n\n $objRequest = $this->getRequest();\n\n if ($objRequest->isPost()) {\n $form->setData($objRequest->getPost());\n if ($form->isValid()) {\n $arrDataFromForm = $form->getData();\n\n try {\n $service->createController($arrDataFromForm);\n //return $this->redirect()\n // ->toRoute($this->route, array('controller' => 'gerador', 'action' => 'criarController'));\n } catch (\\Exception $objException) {\n $this->flashMessenger()->addErrorMessage($objException->getMessage());\n }\n } else {\n echo (\"Form Inválido\");\n }\n }\n\n return new ViewModel(compact('form'));\n }", "title": "" }, { "docid": "75c68b107831d5c640d18447761d5a7d", "score": "0.6283691", "text": "public static function factory(App $app, $controller_name)\n {\n if (!isset($app) || (isset($app) && !$app instanceof App))\n Throw new Error('Controller factory needs an app object.');\n\n // App or framework controller?\n $class = ($app->isSecure() ? '\\\\Web\\\\Framework\\\\AppsSec' : '\\\\Web\\\\Apps') . \"\\\\\" . $app->getName() . '\\\\Controller\\\\' . $controller_name . 'Controller';\n\n // Create controller object\n return new $class($controller_name, $app);\n }", "title": "" }, { "docid": "d9df194088048f2e2b032f201a82e8b3", "score": "0.6262158", "text": "protected function instantiateController($class) {\n\t\treturn new $class();\n\t}", "title": "" }, { "docid": "97d8642dd6ae6270fb8b77bde9f1de31", "score": "0.626122", "text": "public function new_route_controller( $namespace ) {\n\t\t// Do we want to auto start our controllers?\n\t\tif ( $this->config['routing']['auto_start_controllers'] ) {\n\t\t\t// Let's get our class name from the namespace\n\t\t\t$name_parts = explode( '/', $namespace ); \n\n\t\t\t// Let's convert our url endpoint name to a legit classname\n\t\t\t$name_parts = array_map(\n\t\t\t\tfunction( $string ) {\n\t\t\t\t\t$string = str_replace( '-', '_', $string ); // Turn all hyphens to underscores\n\t\t\t\t\t$string = str_replace( '_', ' ', $string ); // Turn all underscores to spaces (for easy casing)\n\t\t\t\t\t$string = ucwords( $string ); // Uppercase each first letter of each \"word\"\n\t\t\t\t\t$string = str_replace( ' ', '', $string ); // Remove spaces. BOOM! Zend-compatible camel casing\n\n\t\t\t\t\treturn $string;\n\t\t\t\t},\n\t\t\t\t$name_parts\n\t\t\t);\n\n\t\t\t// Create a callable classname\n\t\t\t$classname = implode( '\\\\', $name_parts );\n\t\t\t$class = $this->config['routing']['controller_base_namespace'] . $classname;\n\n\t\t\t// Does the class exist? (Autoload it if its not loaded/included yet)\n\t\t\tif ( class_exists( $class, true ) ) {\n\t\t\t\t// Instanciate the controller and keep an easy reference to it\n\t\t\t\t$this->controller = new $class( $this->request, $this->response, $this->service, $this );\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "1eb2ffcd396865a14ff746907387f0c6", "score": "0.62481457", "text": "protected function getController($className, array $controllerArgs = null)\n {\n $class = new ReflectionClass($className);\n if ($controllerArgs === null) {\n $controller = $class->newInstance();\n } else {\n $controller = $class->newInstanceArgs($controllerArgs);\n }\n $controller->setContainer($this->getContainer());\n $controller->setLogger($this->getLogger());\n $controller->init();\n return $controller;\n }", "title": "" }, { "docid": "1f3acdf88cb0b7dccd1cab7a0e225b29", "score": "0.6216539", "text": "public static function createController($config, $comm = null) {\n\n $templateDirectory = __DIR__.'/stubs';\n\n CoreHelper::log(\"info\", \"Creating controller...\", $comm);\n $md = file_get_contents($templateDirectory.\"/controller.stub\");\n\n $md = str_replace(\"__controller_class_name__\", $config->controllerName, $md);\n $md = str_replace(\"__model_name__\", $config->modelName, $md);\n $md = str_replace(\"__crud_name__\", $config->crudName, $md);\n $md = str_replace(\"__view_column__\", $config->crud->view_col, $md);\n\n // Listing columns\n $listing_cols = \"\";\n foreach ($config->crud->fields as $field) {\n $listing_cols .= \"'\".$field['colname'].\"', \";\n }\n $listing_cols = trim($listing_cols, \", \");\n\n // Module\n $module = Module::where('slug', $config->crud->module);\n\n $md = str_replace(\"__listing_cols__\", $listing_cols, $md);\n $md = str_replace(\"__view_folder__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__route_resource__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__db_table_name__\", $config->dbTableName, $md);\n $md = str_replace(\"__singular_var__\", $config->singularVar, $md);\n $md = str_replace(\"__module__\", $module['name'], $md);\n\n file_put_contents(base_path('app/Modules/'.$module['name'].'/Http/Controllers/'.$config->controllerName.\".php\"), $md);\n }", "title": "" }, { "docid": "9a1cc018242715a0160a8ba04e04d0bd", "score": "0.61998004", "text": "private static function createController ($name)\r\n {\r\n if (strpbrk($name, \"\\\\/?%*:|\\\"<>\")) {\r\n echo $name . ' isn\\'t a valid controller name' . \"\\n\";\r\n return;\r\n }\r\n\r\n $name = ucwords(strtolower($name));\r\n $filer = new WalrusFileManager(ROOT_PATH);\r\n\r\n if (!file_exists(ROOT_PATH . 'engine/controllers/' . $name . 'Controller.php')) {\r\n\r\n // @TODO: catch isn't working ?\r\n try {\r\n $filer->setCurrentElem('Walrus/core/sample/controller.sample');\r\n $controller = $filer->getFileContent();\r\n $controller = str_replace('%name%', $name, $controller);\r\n\r\n $filer->setCurrentElem('engine/controllers');\r\n $filer->fileCreate($name . 'Controller.php');\r\n $filer->setCurrentElem('engine/controllers/' . $name . 'Controller.php');\r\n $filer->changeFileContent($controller);\r\n echo 'New controller created in engine/controllers with the name ' . $name . 'Controller.php' . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . 'Controller.php already exist' . \"\\n\";\r\n }\r\n\r\n if (!file_exists(ROOT_PATH . 'www/templates/' . $name)) {\r\n\r\n try {\r\n\r\n $filer->setCurrentElem('www/templates');\r\n $filer->folderCreate(strtolower($name));\r\n\r\n echo 'New templates directory created in www/templates with the name ' . $name . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . ' template directory already exist' . \"\\n\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "7991aa5da4a05993d0bcdb2cd110d8c1", "score": "0.6191357", "text": "function getController($controller)\n{\n $ctrl_name = ucfirst($controller) . 'Controller';\n include_once(APP_CONTROLLERS . $ctrl_name . '.php');\n return new $ctrl_name();\n}", "title": "" }, { "docid": "ece691d92559c8f2397b402a34c03523", "score": "0.61910933", "text": "protected function createRegisterController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/RegisterController.php'),\r\n $this->compileRegisterControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "5443c2363b3d31c386455f04837cdb5c", "score": "0.6187821", "text": "protected static function createInstance()\n {\n\n if (defined('BUIZ_CONTROLLER'))\n $flowController = 'LibFlow'.ucfirst(BUIZ_CONTROLLER);\n else\n $flowController = 'LibFlowApachemod';\n\n self::$instance = new $flowController();\n\n }", "title": "" }, { "docid": "20d843346cbe0a3b4e3d2a396049130d", "score": "0.6175614", "text": "public function create()\n {\n dd('ehExamplesController@create()');\n }", "title": "" }, { "docid": "09aab347ece7f5d31ce863e81c0aeb5c", "score": "0.6171574", "text": "protected function createController($controller)\n {\n $this->checkClass($controller);\n $handler = Application::container()->make($controller);\n if (! $handler instanceof ControllerInterface) {\n throw new InvalidControllerException(\n \"The class '{$controller}' does not implement ControllerInterface.\"\n );\n }\n return $handler;\n }", "title": "" }, { "docid": "320e267b303f4685e52514f9cdbd0cf6", "score": "0.61517256", "text": "public function createControllerByID($id)\r\n {\r\n $ret = parent::createControllerByID($id);\r\n if (!empty($ret)) {\r\n return $ret;\r\n } else {\r\n $this->controllerNamespace = $this->fallbackControllerNamespace;\r\n return parent::createControllerByID($id);\r\n }\r\n }", "title": "" }, { "docid": "1c6937b6ddb8471e5090c844698c096a", "score": "0.6137554", "text": "protected function createHomeController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/HomeController.php'),\r\n $this->compileHomeControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "feaa9cda25e1119c8673a0964cb215d5", "score": "0.61270726", "text": "protected function getMaker_AutoCommand_MakeControllerService()\n {\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\console\\\\Command\\\\Command.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Command\\\\MakerCommand.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\MakerInterface.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\AbstractMaker.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\MakeController.php';\n\n $a = ($this->privates['maker.file_manager'] ?? $this->getMaker_FileManagerService());\n\n $this->privates['maker.auto_command.make_controller'] = $instance = new \\Symfony\\Bundle\\MakerBundle\\Command\\MakerCommand(new \\Symfony\\Bundle\\MakerBundle\\Maker\\MakeController($a), $a, ($this->privates['maker.generator'] ?? $this->getMaker_GeneratorService()));\n\n $instance->setName('make:controller');\n\n return $instance;\n }", "title": "" }, { "docid": "dfb02f31f17c5fb00847b5714a26516e", "score": "0.6124433", "text": "protected function generateController(array $options) \n\t{\n\t\t$this->progress[] = 'Create controller';\n\n\t\t$controllersPath = $options['paths']['controllers_path'];\n\t\t$servicesPath = $options['paths']['services_path'];\n\t\t$requestsPath = $options['paths']['requests_path'];\n\t\t$viewsPath = $options['paths']['views_path'];\n\t\t$entityName = $options['entity_name'];\n\t\t$files = $options['files'];\n\n\t\tif ($this->fileSystem->exists(base_path($controllersPath) . $entityName . 'Controller.php')) {\n\t\t\t$this->progress[] = 'Controller already exists';\n\t\t\treturn;\n\t\t}\n\n\t\t$config['namespace'] = $this->getNamespaceFromPath($controllersPath);\n\t\t$config['servicesNamespace'] = $this->getNamespaceFromPath($servicesPath);\n\t\t$config['requestsNamespace'] = $this->getNamespaceFromPath($requestsPath);\n\t\t$config['viewsPath'] = $this->getFullViewsPathFromPath($viewsPath);\n\t\t$config['createRequest'] = (in_array('createrequest', $files) ? \"{$entityName}CreateRequest\" : 'Request' );\n\t\t$config['updateRequest'] = (in_array('updaterequest', $files) ? \"{$entityName}UpdateRequest\" : 'Request' );\n\t\t$config = $this->addEntityNameVariations($config, $entityName);\n\n\t\t$useClasses = [];\n\t\t$useClasses[] = $config['servicesNamespace'] . '\\\\' . $entityName . 'Service';\n\t\tif (in_array('createrequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['createRequest'];\n\t\t}\n\t\tif (in_array('updaterequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['updateRequest'];\n\t\t}\n\t\tif (count($useClasses) === 1) {\n\t\t\t$config['requestsNamespace'] = 'Illuminate\\Http';\n\t\t\t$useClasses[] = 'Illuminate\\Http\\Request';\n\t\t}\n\n\t\t$config['useStatements'] = '';\n\t\tforeach ($useClasses as $useClass) {\n\t\t\t$config['useStatements'] .= \"use {$useClass}; \\n\";\n\t\t}\n\t\t$config['useStatements'] = rtrim($config['useStatements']);\n\t\t\n\t\t$controllerTemplate = $this->controllerBuilder->create($config);\n\t\t$this->makeDirectoryIfNecessary($controllersPath);\n\t\t$this->fileSystem->put(base_path($controllersPath) . $entityName . 'Controller.php', $controllerTemplate);\n\n\t\t$this->progress[] = 'Success';\n\t}", "title": "" }, { "docid": "40f73be6ff50aaa31634ebfff605297a", "score": "0.6120663", "text": "private function _createControllerModel()\n {\n\n //echo \"creando archivo de controller\";\n\n $model_controller = new \\application\\modules\\system\\model\\ControllerModel();\n $model_module = new \\application\\modules\\system\\model\\ModuleModel();\n\n // lets set the controller params\n $model_controller->controller_description = 'Controller created automatically '\n . ' from model';\n $model_controller->controller_model_id = $this->_id_value;\n $model_controller->controller_name = strtolower($this->_model_name);\n $model_controller->controller_module = $model_module->find('module', ['id_module' => $this->_module_id], 'one')->module;\n $model_controller->controller_module_id = $this->_module_id;\n $model_controller->view_dependency = $this->_controller_dependencys;\n $model_controller->controller_path = __MODULEFOLDER__ . '/' . $model_controller->controller_module . '/controller/';\n\n //create a new controller for this model\n $model_controller->createController();\n\n // create asociatcion , module,controller->model\n $model_controller_model = new ModuleControllerModel();\n $model_controller_model->id_controller = $model_controller->_id_value;\n $model_controller_model->id_module = $this->_module_id;\n $model_controller_model->id_model = $this->_id_value;\n $model_controller_model->createModelControllerModule();\n }", "title": "" }, { "docid": "0dabd0b6625b8176c59d525592b88eb1", "score": "0.60779977", "text": "public function makeController($controllerPath, $controller, $action)\n\t{\n\t\tif (!$this->frontController)\n\t\t\tthrow new \\RuntimeException('You must set frontController before calling this func.');\n\n\t\t$className = $this->createClassName($controllerPath, $controller);\n\t\t$actionName = $this->getActionMethod($action);\n\n\t\ttry {\n\t\t\tif (!class_exists($className) || !method_exists($className, $actionName))\n\t\t\t\treturn false;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$class = new $className($this->frontController);\n\t\tif (!$class instanceof \\KZ\\Controller)\n\t\t\tthrow new \\RuntimeException('Controller must be instance of \\KZ\\Controller.');\n\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "46a9eceb74f42943d037f0f8fb2b933a", "score": "0.6077509", "text": "public function createRequestController(Request $aRequest)\n {\n \t$sControllerName = $aRequest->string($this->sControllerParam) ;\n \t\n \t$sControllerClass = $this->transControllerClass($sControllerName) ;\n \t\n \treturn $sControllerClass? new $sControllerClass($aRequest): null ;\n }", "title": "" }, { "docid": "c6ec4073881c5196194e82ee78c6155e", "score": "0.6073948", "text": "public function CreateController(\\Doctrine\\ORM\\EntityManager $entityManager) {\r\n\r\n //does the class exist? \r\n if (class_exists($this->controller)) {\r\n $parents = class_parents($this->controller);\r\n //does the class extend the controller class?\r\n if (in_array(\"Alt68\\\\Sys\\\\BaseController\", $parents)) {\r\n //does the class contain the requested method?\r\n if (method_exists($this->controller, $this->action)) {\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }\r\n }\r\n }\r\n\r\n // if any error create error page\r\n\r\n $this->controller = $this->controllerNamespaceName .\r\n CommonService::getConfigValue('mainController');\r\n $this->action = 'error';\r\n\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }", "title": "" }, { "docid": "414cc4037aacb1536e895af52a5753cd", "score": "0.60387444", "text": "private function getController(): SecurityController\n {\n return new SecurityController(\n $this->alert,\n $this->config,\n $this->repository,\n $this->toggleTwoFactorService,\n $this->twoFactorSetupService\n );\n }", "title": "" }, { "docid": "7024dca89692e6831b1a364e33d90086", "score": "0.60160553", "text": "public static function createController($inputName)\n {\n $pluginName = StringHelper::camelCase($inputName);\n\n mkdir('craft/plugins/' . $pluginName . '/controllers');\n\n $controller = fopen('craft/plugins/' . $pluginName . '/controllers/' . StringHelper::upperNoSpaces($inputName) . 'Controller.php', 'w');\n fwrite($controller, ContentHelper::generateControllerContent($inputName));\n fclose($controller);\n return;\n }", "title": "" }, { "docid": "6d3db3d7f88034ec7c0db252b9d435c0", "score": "0.6002788", "text": "public function __construct(){\n\t\t$this->crimeController = new crimeController();\n\t}", "title": "" }, { "docid": "9b5c2275d9ffcaf65871350494345c0c", "score": "0.6000697", "text": "function &get_instance(){\n\t return Controller::get_instance();\n\t }", "title": "" }, { "docid": "95c55b5934df2b2fef9a9c0ba3e78c91", "score": "0.5998441", "text": "protected function setupController()\n {\n }", "title": "" }, { "docid": "0d085febcc69eecde78c718eff8bb5b2", "score": "0.5995643", "text": "private function create_migration_controller()\n {\n $controller = $this->location . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $this->controller_name . '.php';\n if (is_file($controller))\n {\n throw new RuntimeException('The ' . $this->controller_name . ' controller aleardy exists!');\n }\n else\n {\n $template_name = \"migration_controller\";\n $args = array(\n 'class_name' => ApplicationHelpers::camelize($this->controller_name),\n );\n\n if ($this->run_from_web === FALSE)\n {\n $args['extra'] = ' $this->input->is_cli_request() or exit(\"Execute via command line: php index.php migrate\");';\n }\n else\n {\n $args['extra'] = PHP_EOL;\n }\n\n $template = new TemplateScanner($template_name, $args);\n $controller_contents = $template->parse();\n\n if (!file_put_contents($controller, $controller_contents))\n {\n throw new RuntimeException('Could not create migration controller...' . PHP_EOL);\n }\n\n return TRUE;\n }\n }", "title": "" }, { "docid": "d100a28ce6d77b6f197f6d776534f5a9", "score": "0.59911996", "text": "function __construct(Controller $controller)\n {\n $this->_controller = $controller;\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "3d68780a3dae015b84166f917045917b", "score": "0.5978511", "text": "function __construct($class){\n\t\t$this->controller = new $class();\n\t\t}", "title": "" }, { "docid": "7e39a9533343a65165e1fb5bb10d9c81", "score": "0.5962812", "text": "private function addController($controller)\r\n {\r\n try {\r\n $object = new $controller($this->app);\r\n\r\n // App\\Controllers\\HomeController\r\n $this->controllers[$controller] = $object;\r\n } catch (Exception $e) {\r\n echo $e->getMessage();\r\n pred($e->getTrace());\r\n }\r\n }", "title": "" }, { "docid": "e764e6e99310cc69470cb81487b06f38", "score": "0.5956204", "text": "protected function createLoginController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/LoginController.php'),\r\n $this->compileLoginControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "85ce2faaab2f738d464b8e593b227bbc", "score": "0.5949653", "text": "private function use_controller() {\n\n\t\t// Find out which controller to use.\n\t\tif ( $this->request->is_front ) {\n\n\t\t\t$Controller = new Front;\n\n\t\t} elseif ( $this->request->is_dashboard ) {\n\n\t\t\t$Controller = new Dashboard;\n\n\t\t} elseif ( $this->request->is_system ) {\n\n\t\t\t$Controller = new System;\n\n\t\t} elseif ( $this->request->is_auth ) {\n\n\t\t\t$Controller = new Auth;\n\n\t\t} elseif ( $this->request->is_api ) {\n\n\t\t\t$Controller = new API;\n\n\t\t}\n\n\t\t// Load the route.\n\t\t$Controller->load_route( $this->request );\n\n\t}", "title": "" }, { "docid": "3931ba5a979acbd9aa891f561cae7af4", "score": "0.5931807", "text": "public static function GetController($action)\n\t{\n\t\t$controller = null;\n\n\t\tswitch ($action) {\n\t\t\tcase 'search':\n\t\t\t\t$controller = new Controller_Search();\n\t\t\t\tbreak;\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'history':\n\t\t\t\t$controller = new Controller_History();\n\t\t\t\tbreak;\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new Controller_Snapshot();\n\t\t\t\tbreak;\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new Controller_Tag();\n\t\t\t\tbreak;\n\t\t\tcase 'tags':\n\t\t\t\t$controller = new Controller_Tags();\n\t\t\t\tbreak;\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new Controller_Heads();\n\t\t\t\tbreak;\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new Controller_Blame();\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_RSS);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_ATOM);\n\t\t\t\tbreak;\n\t\t\tcase 'commit':\n\t\t\t\t$controller = new Controller_Commit();\n\t\t\t\tbreak;\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new Controller_Project();\n\t\t\t\tbreak;\n case 'tree':\n\t\t\tdefault:\n $controller = new Controller_Tree();\n\t\t}\n\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "d57a13e96b207607fc9ba7327e52d77e", "score": "0.5927687", "text": "private function _buildController($controller_name) {\r\n\t\t\r\n\t\t$model_name = Inflector::singularize($controller_name);\r\n\t\t$controller_name = Inflector::pluralize($controller_name);\r\n\r\n\t\t$this->controller = new Controller();\r\n\t\t$collection = new ComponentCollection();\r\n\t\t$this->controller->request = new CakeRequest();\r\n\t\t$this->Image =& new ImageComponent($collection);\r\n\t\t$this->PDFMenu =& new PDFMenuComponent($collection);\r\n\r\n\t\t$this->controller->name = $controller_name;\r\n\t\t$this->controller->{$model_name} = $this->{$model_name};\r\n\r\n\t\t$this->Image->initialize($this->controller, $this->files_dry_run);\r\n\t\t$this->PDFMenu->initialize($this->controller, $this->files_dry_run);\r\n\r\n\t}", "title": "" }, { "docid": "181c88b44dd8c624423841bce0a25ad4", "score": "0.59190243", "text": "protected function controller($name)\n {\n $space = explode('/', $name);\n $className = last($space);\n $namespace = 'App\\Http\\Controllers';\n $modelPath = str_replace('/', '\\\\', $name);\n $requestPath = $modelPath . 'Request';\n $servicePath = $modelPath . 'Service';\n $resourcePath = $modelPath . 'Resource';\n\n if (count($space) > 1) {\n $namespace .= \"\\\\\" . str_replace('/', '\\\\', str_replace(\"/\". $className, '', $name));\n }\n\n $direcotory = app_path(str_replace('App/', '', str_replace('\\\\', '/', $namespace)));\n\n $controllerTemplate = str_replace(\n [\n '{{DummyNamespace}}',\n '{{requestPath}}',\n '{{servicePath}}',\n '{{resourcePath}}',\n '{{modelName}}',\n '{{modelNamePluralLowerCase}}',\n '{{modelNameSingularLowerCase}}'\n ],\n [\n $namespace,\n $requestPath,\n $servicePath,\n $resourcePath,\n $className,\n strtolower(str_plural($className)),\n strtolower($className)\n ],\n $this->getStub('ControllerAjax')\n );\n\n if(!file_exists($direcotory))\n mkdir($direcotory, 0777, true);\n\n file_put_contents(app_path(\"/Http/Controllers/{$name}Controller.php\"), $controllerTemplate);\n }", "title": "" }, { "docid": "a8d8aed9f45c7f10fa763f95b96cb019", "score": "0.59000975", "text": "public static function factory($name)\n {\n $class = self::toClass($name);\n include APPLICATION_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $class . '.php';\n return new $class();\n }", "title": "" }, { "docid": "29b809a46b9dbf7606b6a90ce383619a", "score": "0.589585", "text": "private function getController(string $dir) {\n $dir = str_replace('/', '\\\\', $dir);\n $class = 'Controller\\\\' . $dir;\n \n $controller = new $class($this, $this->library, $this->session, $this->cache);\n return $controller;\n }", "title": "" }, { "docid": "7651f62b6c93723a9c372dc1a5f871df", "score": "0.589468", "text": "public function initController($controller, $path)\n {\n if($path)\n {\n $controller = $this->name . '\\\\Controller\\\\' . $path . '\\\\' . $controller;\n }\n else\n {\n $controller = $this->name . '\\\\Controller\\\\' . $controller;\n }\n\n return new $controller();\n }", "title": "" }, { "docid": "903cd6f46161ed593e91fd8d1e441e4e", "score": "0.588756", "text": "private function load_controller()\n\t{\n\t\t// If no controller is set through the uri array then set it to default\n\t\tif (Router::uri(1) === null)\n\t\t\tRouter::uri(1, Config::$config[$this->data['app']['name']]['default_controller']);\n\n\t\trequire DOC_ROOT . 'apps/' . $this->app_name . '/controllers/controller.' . Router::uri(1) . '.php';\n\t\t\n\t\t$controller_name = String::uc_slug(Router::uri(1), '_') . '_Controller';\n\t\t$controller_obj = new $controller_name($this->data);\n\t}", "title": "" }, { "docid": "18f6b019957cbd45ff8dd1ea670e90a4", "score": "0.58828807", "text": "public function action_controller( $params ) \n\t{\t\n\t\t$options = \\CCDataObject::assign( $params );\n\t\t\n\t\t$name = $options->get( 0, null );\n\t\t$parent = $options->get( 1, null );\n\t\t\n\t\t// get name if we dont have one\n\t\twhile( !$name ) \n\t\t{\n\t\t\t$name = $this->read( 'Please enter the controller name: ' );\n\t\t}\n\t\t\n\t\t// fix controller suffix\n\t\tif ( substr( $name, ( strlen( 'Controller' ) * -1 ) ) != 'Controller' )\n\t\t{\n\t\t\t$name .= 'Controller';\n\t\t}\n\t\t\n\t\t// try to resolve the path\n\t\tif ( !$path = \\CCPath::controllers( str_replace( '_', '/', $name ), EXT ) )\n\t\t{\n\t\t\t$this->error( 'Could not resolve the path. Check if the namespace is registered.' ); return;\n\t\t}\n\t\t\n\t\t// parent\n\t\tif ( is_null( $parent ) )\n\t\t{\n\t\t\t$parent = '\\\\CCController';\n\t\t} \n\t\t\n\t\t// view controller\n\t\tif ( $options->get( 'view', false ) )\n\t\t{\n\t\t\t$parent = '\\\\CCViewController';\n\t\t}\n\t\t\n\t\t// create the class\n\t\t$class = \\CCShipyard::create( 'class', $name, $parent );\n\t\t\n\t\t// get the actions\n\t\t$actions = array( 'index' );\n\t\t\n\t\tif ( $options->get( 'actions', false ) )\n\t\t{\n\t\t\t$actions = array_merge( $actions, explode( ',', $options->get( 'actions' ) ) );\n\t\t}\n\t\t\n\t\tforeach( $actions as $action )\n\t\t{\n\t\t\t$action = trim( $action );\n\t\t\t\n\t\t\t$class->add( 'function', 'action_'.$action, 'protected', 'echo \"'.$name.' '.$action.' action\";', ucfirst($action).\" action\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t}\n\t\t\n\t\t// add static init\n\t\tif ( !$options->get( 'no-events', false ) )\n\t\t{\n\t\t\t$class->add( 'function', 'wake', 'protected', '//', \"Controller wake\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t\t$class->add( 'function', 'sleep', 'protected', '//', \"Controller wake\\n@return void\" );\n\t\t}\n\t\t\t\t\t\t\n\t\t// check for overwrite\n\t\tif ( file_exists( $path ) )\n\t\t{\n\t\t\tif ( !$this->confirm( \"The class already exists. Do you wish to overwrite it?\", true ) ) \n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write file\n\t\t\\CCFile::write( $path, $class->output() );\n\t}", "title": "" }, { "docid": "986593fadac4a233b16d6411512510b2", "score": "0.5880932", "text": "public function getController($controller_name)\n {\n return Controller::factory($this, $controller_name);\n }", "title": "" }, { "docid": "48be68f2d9bd5c305c8873ab5aff62d3", "score": "0.58794177", "text": "public function create()\n\t{\n\t\t//\n\n return view ('control.create');\n\t}", "title": "" }, { "docid": "cd98ae6932161ed0431f62e5eec26b70", "score": "0.587036", "text": "function __contruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contruct();//Chamando o construtor da classe pai\n\t}", "title": "" }, { "docid": "df206b51af190c78d40f349a9ca3622c", "score": "0.58663046", "text": "private function buildController(Request $request) {\n // With redirection, all incoming URLs are like :\n // index.php?controller=XXX&action=YYY&id=ZZZ\n $controllerSuffix = \"Home\"; // Default controller suffix is \"Home\" to call ControllerHome\n if ($request->existsParameter('controller')) {\n $controllerSuffix = $request->getParameter('controller');\n // First letter to uppercase\n $controllerSuffix = ucfirst(strtolower($controllerSuffix));\n }\n // Once we have the Suffix we can create the controller filename\n $controllerClass = \"Controller\" . $controllerSuffix;\n $controllerFilePath = \"Controller/\" . $controllerClass . \".php\";\n if (file_exists($controllerFilePath)) {\n // Now the right controller matching with the url request is required\n require($controllerFilePath);\n // We instantiate a new controller object \n $controller = new $controllerClass();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"File '$controllerFilePath' not found\");\n }", "title": "" }, { "docid": "4dfca9238fe442ba82b785971608ec5d", "score": "0.5859159", "text": "public function testCreateController()\n {\n $module = new Module('app');\n $module->setModule('base', new Module('base'));\n $defaultController = ['class' => 'yii\\web\\Controller'];\n $otherController = ['class' => 'yii\\web\\Controller'];\n $module->getModule('base')->controllerMap = [\n 'default' => $defaultController,\n 'other' => $otherController,\n ];\n\n list($controller, $action) = $module->createController('base');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other');\n $this->assertSame('', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/someaction');\n $this->assertSame('someaction', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n $controller = $module->createController('bases/default/index');\n $this->assertFalse($controller);\n\n $controller = $module->createController('nocontroller');\n $this->assertFalse($controller);\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "c012a06c01a8723b409f5711fd9f32fc", "score": "0.58479625", "text": "public function __construct()\n {\n $this->ctrlHome = new HomeController();\n $this->ctrlAdministration = new AdministrationController();\n }", "title": "" }, { "docid": "e391ad7de7d9c70f4f5ada285f6f9e34", "score": "0.58444035", "text": "public function __construct()\n {\n $model = 'Model'.str_replace('Controller','',static::class);\n $this->request = $GLOBALS['request'];\n $this->response = $GLOBALS['response'];\n $this->model = new $model;\n }", "title": "" }, { "docid": "9e818a4d637c746887563487d241a1a2", "score": "0.5828917", "text": "public static function getInstance() {\n\n if( isset( $_REQUEST['api'] ) && filter_input( INPUT_GET, 'api', FILTER_VALIDATE_BOOLEAN ) ){\n\n if( !isset( $_REQUEST['action'] ) || empty( $_REQUEST['action'] ) ){\n header( \"Location: \" . INIT::$HTTPHOST . INIT::$BASEURL . \"api/docs\", true, 303 ); //Redirect 303 See Other\n die();\n }\n\n $_REQUEST[ 'action' ][0] = strtoupper( $_REQUEST[ 'action' ][ 0 ] );\n\n //PHP 5.2 compatibility, don't use a lambda function\n $func = create_function( '$c', 'return strtoupper($c[1]);' );\n\n $_REQUEST[ 'action' ] = preg_replace_callback( '/_([a-z])/', $func, $_REQUEST[ 'action' ] );\n $_POST[ 'action' ] = $_REQUEST[ 'action' ];\n\n //set the log to the API Log\n Log::$fileName = 'API.log';\n\n }\n\n //Default : catController\n $action = ( isset( $_POST[ 'action' ] ) ) ? $_POST[ 'action' ] : ( isset( $_GET[ 'action' ] ) ? $_GET[ 'action' ] : 'cat' );\n $className = $action . \"Controller\";\n\n //Put here all actions we want to be performed by ALL controllers\n require_once INIT::$MODEL_ROOT . '/queries.php';\n\n return new $className();\n\n }", "title": "" }, { "docid": "c167b1ad8a774d33f321682f8bf85138", "score": "0.58256966", "text": "public function createEndpoint()\n {\n $stack = $this->getMiddleware(Controller\\CreateActionController::class);\n $this->app->post(\"/{$this->name}\", $stack, \"{$this->name}.create\");\n return $this;\n }", "title": "" }, { "docid": "441ddd8ff482b1f4a290fc202d094f4f", "score": "0.5820733", "text": "public function __construct(\\Jazzee\\Interfaces\\AdminController $controller);", "title": "" }, { "docid": "ab1cb66e4ea5f6709ca6b9444df42925", "score": "0.5819755", "text": "public function __construct () \r\n\t\t{\r\n\t\t\t// Get the controller values, action and parameter from URL and set class properties.\r\n\t\t\t$this->get_url_data();\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if controller exists.\r\n\t\t\t * If not add the standard controller (controllers/home-controller.php) and call index() method.\r\n\t\t\t*/\r\n\t\t\tif ( ! $this->controlador )\r\n\t\t\t{\r\n\t\t\t\t// Add the standard controller\r\n\t\t\t\trequire_once ABSPATH . '/controllers/home-controller.php';\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Generate controller object \"home-controller.php\"\r\n\t\t\t\t * This controller should have a class called HomeController\r\n\t\t\t\t*/\r\n\t\t\t\t$this->controlador = new HomeController();\r\n\r\n\t\t\t\t// Call index() method\r\n\t\t\t\t$this->controlador->index();\r\n\t\t\t\treturn;\t\t\t\r\n\t\t\t} // ! $this->controlador\r\n\r\n\t\t\t// If controller doesn't exist, nothing happens\r\n\t\t\tif ( ! file_exists( ABSPATH . '/controllers/' . $this->controlador . '.php' ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // file_exists\r\n\r\n\t\t\t// Include controller file\r\n\t\t\trequire_once ABSPATH . '/controllers/' . $this->controlador . '.php';\r\n\r\n\t\t\t/**\r\n\t\t\t * Remove invalid characters from controller name to generate class name.\r\n\t\t\t * e.g: If file name is \"news-controller.php\", the class should be named NewsController.\r\n\t\t\t*/\r\n\t\t\t$this->controlador = preg_replace( '/[^a-zA-Z]/i', '', $this->controlador );\r\n\r\n\t\t\t// If controller's class doesn't exist, nothing happens\r\n\t\t\tif ( ! class_exists( $this->controlador ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // class_exists\r\n\r\n\t\t\t// Generate controller class's object and send the parameters\r\n\t\t\t$this->controlador = new $this->controlador( $this->parametros );\r\n\r\n\t\t\t// Remove invalid characters fromethod name.\r\n\t\t\t$this->acao = preg_replace( '/[^a-zA-Z]/i', '', $this->acao );\r\n\r\n\t\t\t// If the method exists, run it and send the parameters\r\n\t\t\tif ( method_exists( $this->controlador, $this->acao ) )\r\n\t\t\t{\r\n\t\t\t\t$this->controlador->{$this->acao}( $this->parametros );\r\n\t\t\t\treturn;\r\n\t\t\t} // method_exists\r\n\r\n\t\t\t// Without action, calls index method\r\n\t\t\tif ( ! $this->acao && method_exists( $this->controlador, 'index' ) ) \r\n\t\t\t{\r\n\t\t\t\t$this->controlador->index( $this->parametros );\t\t\r\n\t\t\t\treturn;\r\n\t\t\t} // ! $this->acao \r\n\r\n\t\t\t// Page not found\r\n\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "34844035a0c313ec42e7eaf1afa3065d", "score": "0.58110505", "text": "public function setupController()\n {\n \t$serviceLocator = $this->getApplicationServiceLocator();\n \t\n $this->setController(new ComponentsController( $serviceLocator ));\n $this->getController()->setServiceLocator( $serviceLocator );\n $this->setRequest(new Request());\n $this->setRouteMatch(new RouteMatch(array('controller' => '\\UIComponents\\Controller\\Components', 'action' => 'index')));\n $this->setEvent(new MvcEvent());\n $config = $serviceLocator->get('Config');\n $routerConfig = isset($config['router']) ? $config['router'] : array();\n $router = HttpRouter::factory($routerConfig);\n $this->getEvent()->setRouter($router);\n $this->getEvent()->setRouteMatch($this->getRouteMatch());\n $this->getController()->setEvent($this->getEvent());\n $this->setResponse(new Response());\n \n $this->setZfcUserValidAuthMock();\n }", "title": "" }, { "docid": "a5957a33fd679962035a8954188adc3d", "score": "0.5803588", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Ampheris\\ampController\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "3c8672a4ab44565b758888a22784fc6a", "score": "0.58019835", "text": "private function _loadExistingController() {\n $file = $this->_controllerPath . $this->_url[1] . '.php';\n \n if (file_exists($file)) {\n require $file;\n $this->_controller = new $this->_url[1];\n $this->_controller->loadModel($this->_url[1], $this->_modelPath);\n } else {\n $this->_error();\n }\n }", "title": "" }, { "docid": "8ed601196501353ac907825ec55208f4", "score": "0.5797926", "text": "protected function getAuthController(): AuthController\n {\n return new AuthCtrl();\n }", "title": "" }, { "docid": "35c04f36e6686376a85a41edc2a73614", "score": "0.57961756", "text": "public function run()\n {\n $url = self::parseUrl(); // Get sanitized url array\n\n if (file_exists(Path::CONTROLLER_PATH . ucfirst($url[0]) . self::CONTROLLER . \".php\")) {\n $this->controller = ucfirst($url[0]) . self::CONTROLLER; // Capitalize firts letter of controller file\n unset($url[0]); // Remove controller name from url\n }\n \n // Create a new instance of founded controller.\n $className = $this->namespace . $this->controller;\n $this->controller = new $className;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]); // Remove method name from url\n }\n }\n\n $this->params = $url ? array_values($url) : [];\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "5404dfc85e5adc922cf24c054703a005", "score": "0.57896876", "text": "public static function getController()\n {\n return self::$instance;\n }", "title": "" }, { "docid": "fc9c9115cba804e7db3b3d49bf5e7a27", "score": "0.5785685", "text": "public function create(){\n\t\t//non-cli request\n\t}", "title": "" }, { "docid": "9078992e89b7bb474dff25ce94989df2", "score": "0.5785085", "text": "public static 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": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "f5f543afe38b9e29fb7131e5b7ce724f", "score": "0.5768897", "text": "public static function getController ()\n {\n self::getInstance();\n return self::$_controller;\n }", "title": "" }, { "docid": "06e437b3d8f0ef39c9c2664758c0c1ed", "score": "0.5759767", "text": "public function setController($val)\n {\n $this->_propDict[\"controller\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b327f30a2114560543450f05e31a181b", "score": "0.57568383", "text": "public function __construct()\n\t\t{\n\t\t\t$this->Controller = $this->getController().'Controller';\n\n\t\t\t// On inclut le model de la class controller\n\t\t\t$model = $this->getController().'Model';\n\t\t\t// on test que le fichier model existe\n\t\t\tif(file_exists(ROOT_PAGES.$this->getController().__DS__.$model.'.php'))\n\t\t\t{\n\t\t\t\tinclude ROOT_PAGES.$this->getController().__DS__.$model.'.php';\t\n\t\t\t\t$this->$model = new $model($this->getController());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4b21a26d8fd938d2bfbcd330533a6d54", "score": "0.57491434", "text": "public function create(Request $request){\n $ProductController = BuyMakeProduct::create($request->all());\n return view('welcome');\n }", "title": "" }, { "docid": "4646ca16c9933666e66043139537df93", "score": "0.574532", "text": "function UserController() // constructor\n {\n }", "title": "" }, { "docid": "4970bdf134efda6be8fc94534eec2ec8", "score": "0.5742138", "text": "protected function handleController() {\n $c = Config::getInstance();\n \n $controllerName = $c->getControllerName();\n $action_name = $c->getActionName();\n if (!empty($_GET[$controllerName])) {\n $controller = $_GET[$controllerName];\n } else {\n $controller = \"home\"; // If any controller, this is the default.\n }\n\n $class = ucfirst($controller) . 'Controller';\n $c = new $class();\n $c->setup();\n }", "title": "" }, { "docid": "0a7d4148e0bb3ee841aa635d286b1157", "score": "0.57387894", "text": "public function __construct() {\n $url = $this->getUrl();\n\n // Check for 1st part if the url: localhost/mm/pages\n if (isset($url[0])) {\n\n // Prepare the class name\n $controller = ucwords(strtolower($url[0]));\n\n // Check if controller exists\n if (file_exists(\"../app/controllers/\" . $controller . \".php\")) {\n\n // If exists, set as controller\n $this->currentController = $controller;\n\n // Unset the first word\n unset($url[0]);\n }\n }\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\n // Check for 2nd part if the url: localhost/mm/pages/about\n if (isset($url[1])) {\n\n // Prepare the method name\n $method = strtolower($url[1]);\n\n // check if methed exits in the currentController\n if (method_exists($this->currentController, $method)) {\n\n $this->currentMethod = $method;\n\n // Unset the second word\n unset($url[1]);\n }\n }\n\n // Move other params from URL to params array\n $this->params = $url ? array_values($url) : [];\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "4b83dec6b24f4f923c1ce547a3d9c6db", "score": "0.57330596", "text": "public function GenerateController()\n {\n $fileName2='../application/controller/'.$this->className.\"sController.php\";\n\n $fn=fopen($fileName2,'w') or die(\"can't open file\");\n $stringData=\"<?php \\n \\n require_once('controller.php');\\n\";\n\n fwrite($fn,$stringData);\n $string=\"\\n if(isset($\".\"_REQUEST['\".\"action\".\"'])){\\n $\".\"controller_templet=new Controller($\".\"_REQUEST['action']);\\n\\t if($\".\"controller_templet->getAction()=='view'){\\n\";\n $string.=\"\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->view());\\n }\";\n fwrite($fn,$string);\n //fwrite($fn,$stringData);\n $string2=\"\\t else if($\".\"controller_templet->getAction()=='add'){\\n\";\n $string2.=\"\\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string2);\n //set varible\n for($i=1;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->save());\\n }\\n else if($\".\"controller_templet->getAction()=='edit'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n for($i=0;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->update()); }\\n else if($\".\"controller_templet->getAction()=='delete'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[0].\"($\".\"_REQUEST['\".$this->table_names[0].\"']);\\n\";\n fwrite($fn,$string3);\n $string5=\"echo json_encode( $\".$this->className.\"->delete()); \\n}else if($\".\"controller_templet->getAction()=='viewCombo'){ \\n\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->viewConbox());\\n\\t\\t} \\n} ?>\";\n fwrite($fn,$string5);\n fclose($fn);\n }", "title": "" } ]
231489efdd42d94947232f0ae85ebe35
Show a list of all the deleted users.
[ { "docid": "4cd4a1f4f07fdbb2f84288fcb9f6a5fa", "score": "0.6870651", "text": "public function getDeletedPackages()\n {\n // Grab deleted users\n $packages = Package::where('status','2')->get();\n \n // Show the page\n return view('admin.package.deleted_packages', compact('packages'));\n }", "title": "" } ]
[ { "docid": "1f2bd9181923256ac9e05512f580ac64", "score": "0.85698795", "text": "public function showDeletedUsers()\n {\n $users = User::onlyTrashed()->get();\n return response()->json(['message'=> 'List Of All Deleted Users!', 'users'=> $users], 200);\n }", "title": "" }, { "docid": "390daebe83d54a09737b204828092d5d", "score": "0.76105577", "text": "public function getDeletedCustomers()\n {\n \t// return view('admin.index');\n // Grab deleted users\n $customers = Customer::onlyTrashed()->get();\n\n // Show the page\n return View('admin.customers.deleted-customers', compact('customers'));\n }", "title": "" }, { "docid": "fc0393aceccc84ac7d3a07e81ea2f910", "score": "0.75608665", "text": "public function index()\n {\n return view('users.delete');\n }", "title": "" }, { "docid": "fd592ad92dfbd5cd89d231247da02f86", "score": "0.74263066", "text": "public function index()\n {\n Auth::user()->authorizeRoles('ROLE_ROOT',TRUE);\n $usuarios = User::onlyTrashed()->get();\n return View('root.usuarios.index_deleted', compact('usuarios'));\n }", "title": "" }, { "docid": "e2c639f3f6a1a34833740f93f38f4e40", "score": "0.73042005", "text": "public function deletedAdminsList() {\n\t\tif(Auth::user()->can('manage_recycle_bin_admins')) {\n\t\t\t$deletedAdmins = Admin::onlyTrashed()->orderByDesc('email')->get();\n\t\t\treturn view('admins/deleted_admins_list', ['deletedAdmins' => $deletedAdmins]);\n\t\t}\n\t\telse {\n\t\t\treturn redirect()->route('dashboard')->with('warning', 'You do not have permission for this action!');\n\t\t}\n\t}", "title": "" }, { "docid": "3b2c03fc8357c4cbd97d328017d58cda", "score": "0.7236937", "text": "public function trashcanAction()\n {\n $all = $this->users->query()\n ->where(\"deleted is NOT NULL\")\n ->execute();\n\n $this->theme->setTitle(\"Users that are soft-deleted\");\n $this->views->add('users/list', [\n 'users' => $all,\n 'title' => \"Users that are soft-deleted\",\n ]);\n }", "title": "" }, { "docid": "c73a80e4491673636fd580ec29346e5a", "score": "0.7082058", "text": "public function index(){\n \t$user = User::where('name', 'L')->get();\n\t\techo User::where('name', 'L')->delete();\n }", "title": "" }, { "docid": "03746935f8a66ad2d13ab4fa94529cc4", "score": "0.7079045", "text": "public function actionIndex()\n {\n User::joinDB('users.id', 'users_avatars', 'user_id', ['id' => 'userAvatarId', 'file_name' => 'avatarFileName'],true);\n\n $users = User::getAll(\"WHERE users.status <> 'delete'\");\n\n return ['templateNames' => ['/admin_user/index'],\n 'users' => $users\n ];\n }", "title": "" }, { "docid": "81073ff915e7649af1d91e8965c7c33c", "score": "0.7032382", "text": "public static function getAll() {\n return User::whereNull('deleted_at')->get();\n }", "title": "" }, { "docid": "410eb6f8743a1885aa56b6e79b04e4d5", "score": "0.69806206", "text": "public function index()\n {\n $this->allowedAdminAction();\n \n $users = User::where(['deleted_at' => null])->get();\n\n return response()->json($users, 201);\n }", "title": "" }, { "docid": "bf281228dbf9bcb5febffdc97cea6bae", "score": "0.6930388", "text": "public function index()\n {\n $users = User::paginate(1);\n return view('usuario.index',compact('users'));\n\n /* Permite ver los usuarios eliminados\n $users = User::onlyTrashed()->paginate(1);\n return view('usuario.index',compact('users'));\n */\n }", "title": "" }, { "docid": "8abf455954b01eb2981d22fbb4c77579", "score": "0.68996114", "text": "public function users_list(){\n $usuario = new Usuario();\n //Conseguimos todos los usuarios\n $allusers=$usuario->getAll();\n //Cargamos la vista index y le pasamos valores\n\t\t\n\t\t$this->viewInTemplate(\n\t\t\t\"users_list\", array(\n\t\t\t\t\"title\" => \"Todos los usuarios\",\n\t\t\t\t\"allusers\"=>$allusers,\n\t\t\t\t\"template\" => $this->template,\n\t\t\t)\n\t\t);\n }", "title": "" }, { "docid": "18428321635c001a837e07f155ee4574", "score": "0.68599975", "text": "public function trash()\n {\n $users = $this->userService->getTrashWithPaginate();\n return view('admin.user.trash', compact('users'));\n }", "title": "" }, { "docid": "851d28422834d86bce32e9d46c03052d", "score": "0.6820153", "text": "public function user_list()\n { \n $repo = $this->getDoctrine()->getRepository(User::class);\n $users = $repo->findAll();\n\n return $this->render('admin/user_list.html.twig', [\n 'users' => $users\n ]);\n }", "title": "" }, { "docid": "0106606bb1cba6eb676881852c654b25", "score": "0.68108916", "text": "public function view(Request $request){\n\n $users = DB::table('users')\n ->SELECT('users.id', 'users.name', 'users.email', 'users.is_parent', 'users.is_admin', 'users.family_id', 'users.is_hidden')\n ->where('users.is_hidden', false)\n ->ORDERBY('family_id')\n ->get();\n\n $hiddenusers = DB::table('users')\n ->SELECT('users.id', 'users.name', 'users.email', 'users.is_parent', 'users.is_admin', 'users.family_id', 'users.is_hidden')\n ->where('users.is_hidden', true)\n ->orderby('family_id')\n ->get();\n\n return view('admin.delete_user')->with(['users' => $users, 'hiddenusers' => $hiddenusers]);\n }", "title": "" }, { "docid": "4fde10fb023626b0aa29c7aa612dc12e", "score": "0.67692876", "text": "public function trashcanAction()\n{\n $all = $this->users->query()\n ->where('active is NULL')\n ->andWhere('deleted IS NOT NULL')\n ->execute();\n \n $this->theme->setTitle(\"Users that are deleted\");\n $this->views->add('users/trash', [\n 'users' => $all,\n 'title' => \"Users that are deleted\",\n ]);\n}", "title": "" }, { "docid": "53e5e90c2ec5943a04aca2ef601f26c4", "score": "0.67614454", "text": "public function index()\n {\n\t\t$users = User::withTrashed()->get();\n\t\treturn view( 'admin.user.index', compact( 'users' ) );\n }", "title": "" }, { "docid": "f9b7ce7c7f21dc1ab3a108dc8fa5d293", "score": "0.67607003", "text": "public function viewUsers()\n\t{\n\t\t$users = \\DB::table('users')\n\t\t\t->select('id', 'name', 'email', 'created_at')\n\t\t\t->limit(1)\n\t\t\t->paginate(15);\n\n\t\tif($users)\n\t\t{\n\t\t\ttb($users);\n\t\t\techo $users;\n\t\t\treturn;\n\t\t}\n\t\tp('Unable to show users');\n\n\t}", "title": "" }, { "docid": "390b11f7e92a3d033bff4823fdc50f6a", "score": "0.6745137", "text": "public function search_users_delete(Request $request)\n {\n $keyword = $request->keyword;\n $users = User::SearchByKeyword($keyword)->paginate(6);\n //dd($records);\n return view('appviews.admin.DeleteUser', compact('users'));\n }", "title": "" }, { "docid": "91acde95e651ffb36349919874532998", "score": "0.6728389", "text": "public function index()\n {\n $users = User::where('id', '!=', Auth::id() )->get();\n\n return view('user.show_users', compact('users'));\n }", "title": "" }, { "docid": "de2146b52fa3b70efcd29bd96ab741d6", "score": "0.6725919", "text": "public function index()\n {\n $users = User::where('status', '<>', 't')->get();\n\n return view('admin.user.list', ['users' => $users]);\n }", "title": "" }, { "docid": "06fcfd8e485e2cc066091d7754a7d7dd", "score": "0.6722548", "text": "public function all_users()\n\t{\n\t\t$this->load->model(\"user\");\n\t\t$users = $this->user->get_all_users();\n\t\t$this->load->view('userdash', array('users' => $users));\n\t}", "title": "" }, { "docid": "0cf9815f89d946a4e501254e15ac3259", "score": "0.6718824", "text": "public function executeDelete()\n {\n if($this->hasRequestParameter('ids')){\n $users = UserPeer::retrieveByPKs(json_decode($this->getRequestParameter('ids')));\n\n foreach($users as $user){\n\t$user->delete();\n }\n\n $this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Usuarios borrados.\"));\n\n }elseif($this->hasRequestParameter('id')){\n $user = UserPeer::retrieveByPk($this->getRequestParameter('id'));\n $user->delete();\n $message = sprintf($this->getContext()->getI18N()->__(\"Usuario \\\"%s\\\" borrado OK.\"), $user->getName());\n $this->msg_alert = array('info', $message);\n }\n\n return $this->renderComponent('users', 'list');\n }", "title": "" }, { "docid": "ffa0c3f945077ea706b75c363413e2f2", "score": "0.66840345", "text": "public function index()\n {\n $users = User::latest()->where('id', '!=', auth()->user()->id)->paginate();\n\n return view('admin.users.index', compact('users'));\n }", "title": "" }, { "docid": "dba095a1a01bd5783bd05ddcd74bffb0", "score": "0.6683738", "text": "public function destroyAll()\n {\n if ( ! Input::has('users')) return;\n\n $ids = [];\n\n foreach(Input::get('users') as $k => $user) {\n $ids[] = $user['id'];\n }\n\n if ($deleted = User::destroy($ids)) {\n return response(trans('app.deleted', ['number' => $deleted]));\n }\n }", "title": "" }, { "docid": "dba095a1a01bd5783bd05ddcd74bffb0", "score": "0.6683738", "text": "public function destroyAll()\n {\n if ( ! Input::has('users')) return;\n\n $ids = [];\n\n foreach(Input::get('users') as $k => $user) {\n $ids[] = $user['id'];\n }\n\n if ($deleted = User::destroy($ids)) {\n return response(trans('app.deleted', ['number' => $deleted]));\n }\n }", "title": "" }, { "docid": "8fa2c236d4563e3a688c80042c1afaa6", "score": "0.6682031", "text": "function actionList()\n {\n $users = User::find([1, 2, 4]);\n return view(\"admin.list\", ['users' => $users]);\n }", "title": "" }, { "docid": "ba5dea6146cc2ff80a11999b92b6fa01", "score": "0.66715974", "text": "public function deleteAll()\n {\n $user = User::all();\n if(count($user) > 0) {\n User::where('role', 'member')->delete();\n return redirect('/users')->with('success', 'Tous les utilisateurs ont été supprimés');\n } else {\n return redirect('/users')->with('error', 'Il n\\'y a aucun utilisateur');\n\n }\n }", "title": "" }, { "docid": "351e784f349c44939d3a48a976aafd84", "score": "0.6659426", "text": "public function usersList()\n\t{\n\t\t$result = DB::table('users')->get();\n\t\treturn view('admin/users-list')->with('users',$result);\n\t}", "title": "" }, { "docid": "2bcff150e1fe86d33127f6ce3ad97df4", "score": "0.6654372", "text": "public function user_list()\n {\n $users = DB::table('users')\n ->orderBy('id','desc')\n ->get();\n\n return view('admin.admin-user-list')->with('users',$users);\n }", "title": "" }, { "docid": "fa5c7b2a2f40608eacdeebba1fa454bb", "score": "0.6639099", "text": "public function index()\n {\n\n if (request('show_deleted') == 1) {\n\n $users = User::role('student')->onlyTrashed()->get();\n } else {\n $users = User::role('student')->get();\n }\n\n return view('backend.siteadminusers.index', compact('users'));\n }", "title": "" }, { "docid": "cff8443508f6fea1e02e8a6b5fef2f39", "score": "0.66384083", "text": "public function getDelete($id)\n {\n $user = User::find($id);\n // Show the page\n return view('users.delete', compact('user'));\n }", "title": "" }, { "docid": "4ef45d87d7d65a5c2dc79087171d214a", "score": "0.6637172", "text": "public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }", "title": "" }, { "docid": "f3df3402ec1a30e190e6237dece95e77", "score": "0.6636221", "text": "public function index()\n {\n return view('admin::modules.users.list', [\n 'users' => User::orderByDesc('id')->paginate(10),\n ]);\n }", "title": "" }, { "docid": "2477a250b609ee80ea636053a02cf063", "score": "0.6633301", "text": "public function listUsers()\n {\n return view('epanel.users.index', ['users' => $this->getUsers()]);\n }", "title": "" }, { "docid": "63c5b7d6131ffaf7bdb04a2c70035575", "score": "0.6615101", "text": "public function listUser(){\n\n $user = User::all();\n return view('admin.user',compact('user'));\n }", "title": "" }, { "docid": "5cfc651d8dcd09e328ba89b3d21b27e2", "score": "0.6605248", "text": "public function showUsers()\n {\n $users = User::orderBy('created_at')->simplePaginate(15);\n return view('admin.users')->with('users', $users);\n }", "title": "" }, { "docid": "fdff0396c734966f8950b8b171aa2596", "score": "0.65991646", "text": "public function index()\n {\n $users = User::Orderid();\n return view('admin.users.index')->with('users', $users);\n }", "title": "" }, { "docid": "416834ab57afa402f2c7a90f9859c0ee", "score": "0.65965307", "text": "public function listUsers()\n {\n $users = User::where('primerNombre', '!=', 'Admin')\n ->orderBy('primerNombre', 'asc')\n ->get();\n return response()->json($users, 200);\n }", "title": "" }, { "docid": "08a5a5cc92729597199fbbe2062be783", "score": "0.6571089", "text": "public function listUsers()\n {\n $orderby = isset($_GET['orderby'])?$_GET['orderby']:null;\n $users = $this->usersService->getAllUsers($orderby);\n include 'view/users.php';\n }", "title": "" }, { "docid": "2f4244c1b75e1245f4e0e3804d1318fa", "score": "0.6564107", "text": "public function index()\n {\n\n $userList = User::orderBy('id', 'DESC')->get();\n return view('admin.User.list', ['userList' => $userList]);\n }", "title": "" }, { "docid": "9491620d37b36af73e44fc6b5733b71d", "score": "0.6564105", "text": "function allDelete()\r\n\t{\r\n\t\t$ids = implode(\",\",array_filter($_REQUEST['user_ids']));\r\n\t\t$this->db->query(\"DELETE FROM user WHERE id IN (\".$ids.\")\");\r\n\t\t//$this->getlist();\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "46686a32ee945fc98a2f0288c3c6513f", "score": "0.656198", "text": "public function list()\n {\n $users = User::query();\n\n return datatables()->of($users)\n ->make(true);\n }", "title": "" }, { "docid": "91b85e942c856f548a2db56f212f3654", "score": "0.6560194", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $users = $em->getRepository('AppBundle:User')->findAll();\n return $this->render('user/index.html.twig', array(\n 'users' => $users,\n ));\n }", "title": "" }, { "docid": "aa012a895dbec04c748dc1286d6a4da3", "score": "0.6552515", "text": "public function index()\n {\n $this->authorize('index', Auth::user());\n\n $users = User::get();\n\n if(request()->wantsJson() || request()->expectsJson()) {\n return DataTables::of($users)->addColumn('actions', function($user){\n return implode(\"\", [\n '<a href=\"' . route('users.edit', $user) . '\" class=\"btn m-btn m-btn--hover-brand m-btn--icon m-btn--icon-only m-btn--pill\"><i class=\"la la-edit\"></i></a>',\n '<a href=\"' . route('users.destroy', $user) . '\" class=\"deleteDataTableRecord btn m-btn m-btn--hover-brand m-btn--icon m-btn--icon-only m-btn--pill\"><i class=\"la la-trash\"></i></a>',\n ]);\n })->editColumn('role', function ($user) {\n return UserType::getDescription($user->role);\n })->rawColumns(['actions'])->make(true);\n }\n\n return view('users.index');\n\n }", "title": "" }, { "docid": "9b6b353e33a7391ecc40a836afc999cb", "score": "0.6550965", "text": "public function showAllAction()\n {\n $service = $this->getUserService();\n $users = $service->getUsers();\n\n return $this->render('PortalAppBundle:User:allUsers.html.twig', array(\n 'users' => $users,\n ));\n }", "title": "" }, { "docid": "ab863eefb352e7ebbdc30c0d4e24b848", "score": "0.65400255", "text": "public function destroy($id){\n //create new list & display\n $users = $this->users;\n for($i = 0; $i < count($users) ; $i++){\n if($this->users[$i]['id'] == $id){\n unset($this->users[$i]);\n break;\n }\n }\n\n return view('user.list')->with('userList', $users);\n }", "title": "" }, { "docid": "c0fe1a188ceaf3c1623c391ddf3651db", "score": "0.6539771", "text": "public function getList()\n {\n $model = new User();\n $listUser = $model->getListUser('DESC')->result;\n\n return view('admin.user.list', compact(['listUser']));\n }", "title": "" }, { "docid": "4db2086bb322f6cb7a923b96a59ee9f0", "score": "0.653842", "text": "public function listar()\n\t{\n\n\t\t$user = Usuario::mostrarTodos();\n\t\t//echo \"<pre>\".print_r($user, true).\"</pre>\" ;\n\t\trequire_once \"./vistas/adminUserView.php\";\n\t}", "title": "" }, { "docid": "28075ea4cec10b4a687b2ce97d883fef", "score": "0.6535012", "text": "public function showUsersList(){\n $users = User::paginate(10)->fragment('users');\n return view('dashboards.users.list', compact('users'));\n }", "title": "" }, { "docid": "58b71be7760b04ca28282ce5c65271a6", "score": "0.6533752", "text": "public function userList()\n {\n $time = LaravelVersion::min('5.8') ? 60*60 : 60;\n $statuses = User::where('ticketit_admin', 1)->where('ticketit_agent', 1)->paginate(10);\n\n return view('ticketit::admin.user.index', compact('statuses'));\n }", "title": "" }, { "docid": "0d0c8f99c27e4c24ba3d8a7903ca1f11", "score": "0.6532566", "text": "public function trashcanAction()\n\t{\n\t\t$all = $this->users->query()\n\t\t ->where('deleted is NOT NULL')\n\t\t ->execute();\n\n\t\t$this->views->addString( $this->di->navbar->getSubmenu() ,'sidebar');\t\n\t\t$this->theme->setTitle(\"Borttagna användare\");\n\t\t$this->views->add('users/list-all', [\n\t\t 'users' => $all,\n\t\t 'title' => \"Borttagna användare\",\n\t\t]);\n\t}", "title": "" }, { "docid": "b468b140c963bda41017c88babb1ab44", "score": "0.65228325", "text": "public function index()\n {\n $you = auth()->user();\n $users = User::all();\n return view('dashboard.admin.usersList', compact('users', 'you'));\n }", "title": "" }, { "docid": "542926651d1bc5eda8448e053065e4d8", "score": "0.6520499", "text": "public function index()\n {\n $users = User::all();\n\n return view('ethereal-user::admin.user.index', compact($users));\n }", "title": "" }, { "docid": "e164d7448fd5e9cca6cd98656ab4d371", "score": "0.6509479", "text": "public static function users() {\n \n echo ViewHelper::render(\"view/admin-users-list.php\", [\n \"users\" => UsersDB::getAllSalesmans()\n ]);\n \n }", "title": "" }, { "docid": "9603f0c005bedf22fa1ff15671aba09c", "score": "0.65045774", "text": "public function users(){\n \t$users = User::paginate(10);\n\n \treturn view('admin.users', compact('users'));\n }", "title": "" }, { "docid": "8bc3a39671e6dc42b3d4d6d8f578840b", "score": "0.65005195", "text": "public function index()\n {\n $users = User::paginate(10);\n return view('admin.users.index', compact('users'));\n }", "title": "" }, { "docid": "7ace03d220515de320312e64df3b2951", "score": "0.6497252", "text": "public function index()\n {\n $users = User::orderBy('id', 'DESC')->paginate(5);\n \n return view('admin.users.index')->with('users', $users);\n }", "title": "" }, { "docid": "f6968f54fd70f4f1b0b8c2f3479480b2", "score": "0.648991", "text": "public function index()\n {\n $users = User::all()->except(1);\n $events = Event::all();\n\n return view('admin.users.index', compact('users', 'events'));\n }", "title": "" }, { "docid": "bd3990ee0e998e5685e7c2754fb0d636", "score": "0.6483492", "text": "public function indexAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $dql = \"SELECT a FROM AppBundle:Users a\";\n $query = $em->createQuery($dql);\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $query, /* query NOT result */\n $request->query->getInt('page', 1)/*page number*/,\n 10/*limit per page*/\n );\n\n $users = $em->getRepository('AppBundle:Users')->findAll();\n $deleteForms = array();\n\n foreach ($users as $entity) {\n $deleteForms[$entity->getId()] = $this->createDeleteForm($entity)->createView();\n }\n\n return $this->render('users/index.html.twig', array(\n 'pagination' => $pagination,\n 'deleteForms' => $deleteForms,\n ));\n }", "title": "" }, { "docid": "5f664e79ca42fe6b2c7abdcf4a59b678", "score": "0.64718384", "text": "public function index()\n {\n $users = User::orderBy('id', 'desc')->paginate(10);\n return view(\"admin.users.index\", ['users' => $users]);\n }", "title": "" }, { "docid": "7f76e2cb55bf9e64c44fab51f7d59a55", "score": "0.64706063", "text": "public function all() {\n $users = User::where('role_id', User::ROLE_USER)->paginate(20);\n return view('admin.users.index',[\n 'users' => $users\n ]);\n }", "title": "" }, { "docid": "c62d34b52b3620df27e944cc9846ec5c", "score": "0.64703935", "text": "public function index()\n {\n\n $users = User::latest()->paginate(10);\n \n return view('admin.users.index', compact('users'));\n }", "title": "" }, { "docid": "fd920562229dc31d8ed72be454c01268", "score": "0.6467753", "text": "public function admin_users()\n {\n $users = User::where('role_id', '!=', 1)->get();\n return view('panel.admin.users', compact('users'));\n }", "title": "" }, { "docid": "c8c7c057629cc2aa8539907073cc8208", "score": "0.6464121", "text": "function displayAllUsers(){\n if (isset($_SESSION['id']) && $_SESSION['id'] == 6){\n global $db;\n $sql = $db->query(\"SELECT * FROM users\");\n $sql->setFetchMode(PDO::FETCH_ASSOC);\n\n while($row = $sql->fetch()){ \n ?>\n <div class=\"col-4\">\n <div class=\"card p-3 mt-3\">\n <h3>Utilisateur n°<?= $row['id']; ?></h3>\n <div class=\"card-body\">\n <p>Email: <?= $row['email']; ?></p>\n <p>First name: <?= $row['firstName']; ?></p>\n <a class=\"btn btn-info mb-3\" href=\"deleteuser.php?id=<?= $row['id']; ?>\"> Supprimer l'utilisateur</a>\n </div>\n </div>\n </div>\n <?php\n }\n } else {\n echo \"<div class ='alert alert-danger'> Veuillez vous connecter en tant qu'admin pour voir la liste des utilisateurs.</div>\";\n \n }\n }", "title": "" }, { "docid": "79b623b4233c7fb939393f42e7a8fb07", "score": "0.64617133", "text": "public function index() {\n $user = User::all();\n /*$users = User::withTrashed()->get();*/\n\n return view('adminlte.user.user', compact('user', 'users'));\n }", "title": "" }, { "docid": "975ad6175761f842ed4820f7ba551f6a", "score": "0.6461615", "text": "public function getListAdmin()\n {\n $model = new User();\n $listUser = $model->getListUser('DESC', 'admin')->result;\n\n return view('admin.user.listadmin', compact(['listUser']));\n }", "title": "" }, { "docid": "78c61c15fdd725bface8cddfb706e9d8", "score": "0.6459665", "text": "function list_users() {\n\t\t$users = carnieKarma::users();\n\t\t$usersView = new carnieKarmaUsersView;\n\t\treturn $usersView->render($users);\n\t}", "title": "" }, { "docid": "dde31c024cebb093be1cc74d34a12e34", "score": "0.64473003", "text": "public function getUsers()\n\t{\n\t\treturn View::make('admin.users', array('users' => User::all()));\n\t}", "title": "" }, { "docid": "5b0b97e92e8ec5ac46de51c26b8b09b0", "score": "0.64463925", "text": "public function index()\n {\n Auth::user()->authorizeRoles(['ROLE_ROOT','ROLE_ADMINISTRADOR'],TRUE);\n $servicios = Servicio::onlyTrashed()->get();\n return View('actividad.servicios.index_deleted', compact('servicios'));\n }", "title": "" }, { "docid": "3ad0222bce15b3b4165f478a445560c5", "score": "0.64444405", "text": "public function deleteAll() {\n $response = $this->request->request(\n 'users/' . $this->user->id . '/keys',\n ['method' => 'delete',]\n );\n return (array)$response['data'];\n }", "title": "" }, { "docid": "711d80266c1f5bcca138babcbef3a9a8", "score": "0.6441706", "text": "public function index()\n {\n $users = User::orderBy('id', 'desc')->paginate(10);\n\n return view('admin.user.index', [\n 'users' => $users\n ]);\n }", "title": "" }, { "docid": "be3c9775c73ca001af647576cd1092b2", "score": "0.64241356", "text": "public function index()\n {\n $user = auth()->user();\n\n if ($user->hasRole('admin')) {\n $users = User::orderBy('id', 'desct')->paginate(5);\n } else {\n $users = User::orderBy('id', 'desct')->take(10)->get();\n }\n\n return view('users', ['users' => $users, 'userAuth' => $user]);\n }", "title": "" }, { "docid": "1f1b8815921b3aaa8920e4e687d38f16", "score": "0.64210063", "text": "public function deletedAll($user_id)\n {\n // $user = User::findOrFail($user_id);\n $profile = User::findOrFail($user_id)->delete();\n return redirect()->back()->with('status', 'Member successfully deleted');\n }", "title": "" }, { "docid": "f06913f679a7e65cf2ad67f7fce843b0", "score": "0.64189607", "text": "public function deletedUsers()\n {\n return $this->belongsToMany(User::class, 'deleted_reservations');\n }", "title": "" }, { "docid": "3484164c3a97c8b86a9edaf0182e8052", "score": "0.64164746", "text": "public function index()\n {\n $users = User::where('id','>',1)->get();\n return view('auth.users.lista', compact('users'));\n }", "title": "" }, { "docid": "9a25954234dc6bab1396ada7a24c6101", "score": "0.6408829", "text": "public function deleteAllAction()\n {\n $notifications = new Notification\\Listing();\n $notifications->setCondition('user = ?', [\n $this->user->getId(),\n ]);\n /** @var Notification $notification */\n foreach ($notifications->load() as $notification) {\n $notification->delete();\n }\n $this->_helper->json([\n \"success\" => true,\n ]);\n }", "title": "" }, { "docid": "e1199316fdf2ed1d3e937137627bdf17", "score": "0.6406187", "text": "public function index()\n {\n $users = User::paginate(12);\n $loggedId = intval(Auth::id());\n\n return view('sistema.admin.usuarios', [\n 'users' => $users,\n 'loggedId' => $loggedId\n ]);\n }", "title": "" }, { "docid": "4b850c0fedbe4e99dea6a35da598ec08", "score": "0.64052516", "text": "public function lists()\n {\n return View::make('system.User.list');\n }", "title": "" }, { "docid": "b128c53ea105e175fdbc2166fcab1264", "score": "0.6402427", "text": "public static function getAllUsers()\n {\n return self::WhereNull('deleted_at')->Where('status', 1)->pluck('name', 'id');\n\n }", "title": "" }, { "docid": "09d44cc8ddefc9e7262438c1616f81b8", "score": "0.6400398", "text": "public function index()\n {\n if(request()->ajax())\n {\n $query = User::query();\n\n return DataTables::of($query)\n ->addColumn('action', function($item){\n return '\n <form action=\"'. route('users.destroy',$item->id) .'\"method=\"POST\">\n '. method_field('delete') . csrf_field() .'\n <a class=\"btn btn-sm btn-secondary\" href=\"'. route('users.show',$item->id) .'\">\n <i class=\"fa fa-eye\"></i>\n </a>\n <a class=\"btn btn-sm btn-warning\" href=\"'. route('users.edit',$item->id) .'\">\n <i class=\"fa fa-edit\"></i>\n </a>\n <button type=\"submit\" class=\"btn btn-sm btn-danger\" onclick=\"return confirm(\"Are you Sure?\")\">\n <i class=\"fa fa-trash\"></i>\n </button>\n </form>\n ';\n })\n ->editColumn('avatar', function($item){\n return $item->avatar ? '<img src=\"'.Storage::url($item->avatar).'\" style=\"max-height: 40px;\"/>' : '';\n })\n ->rawColumns(['action','index'])\n ->make();\n }\n return view('pages.admin.users.index');\n }", "title": "" }, { "docid": "54b77af78afdecbba4f4bdb8ae16b164", "score": "0.64001054", "text": "public function index()\n {\n $users = User::paginate(5);\n\n return view('admin.user.index',compact('users'));\n }", "title": "" }, { "docid": "dc8823efe439addf2cbf068146883dd5", "score": "0.6398572", "text": "public function index()\n {\n $users = User::where('role_name', '!=', '1')->with(['employee.franchise'=> function ($query) {\n $query->select('*')\n ->where('franchises.deleted_at', null);\n }])->paginate(10);\n $franchise = Franchise::whereDeletedAt(null)->pluck('name', 'id')->toArray();\n return view('user.index', compact('users', 'franchise'));\n }", "title": "" }, { "docid": "8b7658dde340042aca2f3340ad15d97a", "score": "0.6397106", "text": "public function index()\n {\n $users = User::paginate(20);\n\n return view('admin.users.index', [\n 'users' => $users\n ]);\n }", "title": "" }, { "docid": "799c6daceba7d9c9579e465e119d73b8", "score": "0.63925785", "text": "public function usersAction(){\n\n {\n $em = $this->getDoctrine()->getManager();\n $users = $em\n ->getRepository('UserBundle:User')\n ->findAll();\n\n return $this->render('@App/admin/users.html.twig', [\n 'users' => $users\n ]);\n }\n\n \n }", "title": "" }, { "docid": "597fa71e407d3c860faca0b9c0e9cc91", "score": "0.6392248", "text": "public function listUsers(Request $request){\n $data['users'] = User::latest()->where('isAdmin',0)->paginate(50);\n return view('user.list',$data);\n }", "title": "" }, { "docid": "2647b16dc2d87dafdd3a83c493a06d63", "score": "0.63892066", "text": "public function usersList(UserRepository $users){\n return $this->render(\"admin/users.html.twig\", [\n 'users' => $users->findAll()\n ]);\n }", "title": "" }, { "docid": "ea05b2d314e768d589102dee35ccc78d", "score": "0.6388583", "text": "public function index()\n {\n //\n $users = User::paginate(10);\n return view('admin.user.index', compact('users'));\n }", "title": "" }, { "docid": "831b4a5eb2626d52280bb0a3ffb2caa5", "score": "0.6387722", "text": "public function index()\r\n {\r\n $users = App::get('database')->selectAll('users');\r\n return view('users', compact('users'));\r\n }", "title": "" }, { "docid": "6b24a65a83f88b357210d37388169c0e", "score": "0.6385144", "text": "public function index()\n {\n return view('users.index', [\n 'users' =>\n User::query()\n ->withTrashed()\n ->orderBy('name')\n ->get(),\n ]);\n }", "title": "" }, { "docid": "60fc8f81e416f8d85296885f9a7aef11", "score": "0.6380927", "text": "public function getUsersAction()\n {\n $users = $this->getDoctrine()->getRepository(\"PouyasazanExamplesBundle:User\")->findAll();\n return $this->view($users);\n }", "title": "" }, { "docid": "a2c7e08f553fd53d97dc21eba8725f41", "score": "0.63776726", "text": "public function index()\n {\n $users = User::where('username', '!=', 'admin')\n ->where('role', '!=', 'verified_coach')\n ->paginate(10);\n\n return view('admin/users')->with('users', $users);\n }", "title": "" }, { "docid": "88741c72a5d0058f43fa03805257149c", "score": "0.63776094", "text": "public function index()\n {\n $per_page = 100;\n return view('admin.admin-user.index')\n ->withUsers($this->users->getUserPaginated($per_page));\n\n }", "title": "" }, { "docid": "28e6ef1f8ed7aed321c1937fe8a3ea7d", "score": "0.637045", "text": "public function index()\n {\n $users = User::where('id', '<>', Auth::user()->id)->paginate(5);\n\t\treturn view('adminpages.users', ['users' => $users]);\n }", "title": "" }, { "docid": "aaaea5c82de46de817da85164007b3d7", "score": "0.636984", "text": "public function index()\n {\n $this->middleware('admin');\n $users = User::where('id', '>', 1)->paginate(10);\n return view('users.index', compact('users'));\n }", "title": "" }, { "docid": "0d768a8d87fe85db6735fe26d0d6ba8e", "score": "0.6369745", "text": "public function index()\n {\n\n $usuarios = User::where('id', '<>', Auth::id())->take(10)->get();\n\n return View::make('admin.usuario.index', compact('usuarios'));\n\n }", "title": "" }, { "docid": "5053d441932d8864d4bf822f4564836c", "score": "0.6364012", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $this->service->openConnection();\n $users =$this->service->retrieveAllClientUsers($page);\n $this->view->users = $users;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "f83969f27f48e1739e383ff02a4ea47a", "score": "0.6362814", "text": "public function indexAction(Request $request)\n {\n $sort = $request->query->get('sort');\n $direction = $request->query->get('direction');\n $em = $this->getDoctrine()->getManager();\n if($sort) $users = $em->getRepository('KoreAdminBundle:User')->findBy(array(), array($sort => $direction));\n else $users = $em->getRepository('KoreAdminBundle:User')->findAll();\n $paginator = $this->get('knp_paginator');\n $users = $paginator->paginate($users, $request->query->getInt('page', 1), 100);\n\n $deleteForms = array();\n foreach($users as $key => $user) {\n $deleteForms[] = $this->createDeleteForm($user)->createView();\n }\n\n return $this->render('KoreAdminBundle:User:index.html.twig', array(\n 'users' => $users,\n 'direction' => $direction,\n 'sort' => $sort,\n 'deleteForms' => $deleteForms,\n ));\n }", "title": "" }, { "docid": "d4b61d02f6dd9160ab692ba9bc3a2179", "score": "0.6361935", "text": "public function index()\n {\n $users = User::all();\n \n return view('admin.users.index', compact('users'));\n }", "title": "" }, { "docid": "fac70c96f6d5694e354b49ecacb0e9ea", "score": "0.63601243", "text": "public function indexAction()\n {\n $em = $this\n ->getDoctrine()\n ->getManager();\n $users = new Users();\n $allUsers = $users->findAllUsers($em);\n return $this->render('CoreAdmin/users/index.html.twig', array(\n 'users' => $allUsers,\n ));\n }", "title": "" } ]
94cf05f8297bbf1be5e6988970b59ef6
Funciones que generan listboxmatch//
[ { "docid": "12ea596b26d7f37c0581af99b1d49341", "score": "0.0", "text": "function ListEncuestaTipoCampo($name, $select)\n{\n\t$sql = 'select nombre, id from encuesta_tipo_campo order by nombre';\n\t$db=DB_CONECCION();\n\t$rs = $db->Execute($sql);\n\techo $rs->GetMenu2($name,$select);\n}", "title": "" } ]
[ { "docid": "e784dc8ea2894389d8137b0526e512fd", "score": "0.5417", "text": "function cvpg_listview_metabox($data)\n{\n require_once CPVG_ADMIN_TEMPLATE_DIR . \"/cpvg_fieldtypes_form.html\";\n require_once CPVG_ADMIN_TEMPLATE_DIR . \"/cpvg_list_views.html\";\n\n global $wpdb;\n $db_data = cpvg_get_dbfields_names(\"list\");\n\n switch ($data[\"metabox\"]) {\n case 'list_views':\n $template_files = cpvg_capitalize_array_values(cpvg_get_extensions_files(\"php\", CPVG_LIST_TEMPLATE_DIR));\n $rows_data = $wpdb->get_results(\"SELECT \" . $db_data['id_field'] . \" ,\" . $db_data['name_field'] . \" FROM \" . $db_data['table_name']);\n\n $list_views = array();\n foreach ($rows_data as $field_value) {\n $list_views[] = $field_value->$db_data['name_field'];\n }\n ?>\n <script type='text/javascript'>\n\n viewModel.setData('siteurl', '<?php echo home_url(\"\"); ?>');\n viewModel.setData('view_type', 'list');\n viewModel.setData('available_template_files', <?php echo json_encode($template_files); ?>, 'assocArray');\n viewModel.setData('available_list_views', <?php echo json_encode($list_views); ?>, 'arrayObservables');\n\n </script>\n <?php\n\n break;\n case 'fields':\n if (!isset($data[\"post_types\"])) {\n $data[\"post_types\"] = array();\n }\n cpvg_fieldtypes_form($data[\"post_types\"], \"list\");\n break;\n }\n echo \"<div data-bind=\\\"template: { name:'cpvg_\" . $data[\"metabox\"] . \"' }\\\"></div>\";\n}", "title": "" }, { "docid": "4bf8732a2cbbc93226ab693c2168f660", "score": "0.53584707", "text": "function render_list_pertanyaan() {}", "title": "" }, { "docid": "8127cfaf1de16a7ec24bd5a7fd9733cb", "score": "0.53238434", "text": "function getUnitDisplay($oUnit) {\n global $default;\n if (!isset($oUnit)) {\n $oPatternListBox = & new PatternListBox($default->units_table, \"name\", \"id\", \"fUnitID\");\n $oPatternListBox->setIncludeDefaultValue(true);\n $oPatternListBox->setPostBackOnChange(true);\n return $oPatternListBox->render();\n } else {\n return \"<input type=\\\"hidden\\\" name=\\\"fUnitID\\\" value=\\\"\" . $oUnit->iId . \"\\\">\\n\" .\n \"<b>\" . $oUnit->getName() . \"</b>\";\n }\n\n}", "title": "" }, { "docid": "512f198dabd40007acbc4b325401368c", "score": "0.53102577", "text": "function CreateListBox(){\n //TYPE List Box Creation\n\t\t $idubah=$_REQUEST['idubah'];\n\t\t $query1\t= mysql_query( \"SELECT * FROM arsip_lain WHERE id_arsip_lain=$idubah\"); \n\t $data1= mysql_fetch_array($query1);\n\t\t \n\t\t \n\t\t $query2\t= mysql_query( \"SELECT * FROM jenisal1 WHERE jenisal1_id=$data1[jenisal1_id]\"); \n\t $data2= mysql_fetch_array($query2);\n\t\t echo \"<div class=\\\"form-row\\\">\";\n \t\t echo \"<span class=\\\"label\\\"><b>Jenis Dokumen</b></span>\";\n echo \"<select class=\\\"input\\\" name=\\\"jenisal1\\\" size=\\\"1\\\" onChange='changejarsipl2(this)'>\\r\";\n\t\t echo \"<option value=\\\"$data2[jenisal1_id]\\\">$data2[jenisal1_name]</option>\\r\";\n \t\t //Loads the Data to the Jenis List Box the one which will have values by default.\n for($i=0;$i<count($this->arrjenisal1);$i++){\n\t\t echo \"<option value='\".$this->arrjenisal1[$i][0].\"'>\".$this->arrjenisal1[$i][1].\"</option>\\r\";\n \t }\n\t\t echo \"</select>\";\n \t\t echo \"</div>\";\n\t\t \n\t\t \n //Sub Jenis Box Creation\n\t\t $query3\t= mysql_query( \"SELECT * FROM jarsipl2 WHERE jarsipl2_id=$data1[jarsipl2_id]\"); \n\t $data3= mysql_fetch_array($query3);\n\t\t echo \"<div class=\\\"form-row\\\">\";\n \t\t echo \"<span class=\\\"label\\\"><b>Sub Jenis Dokumen</b></span>\";\n echo \"<select class=\\\"input\\\" name=\\\"jarsipl2\\\" onChange='changejalain3(this)' >\\r\"; // By Default the Item is Disabled\n echo \"<option selected value=\\\"$data3[jarsipl2_id]\\\">$data3[jarsipl2_name]</option>\\r\";\n\t echo \"</select>\";\n \t\t echo \"</div>\";\n\t\t \n //Sub Sub Jenis Box Creation\n\t\t $query4\t= mysql_query( \"SELECT * FROM jalain3 WHERE jalain3_id=$data1[jalain3_id]\"); \n\t $data4= mysql_fetch_array($query4);\n\t\t echo \"<div class=\\\"form-row\\\">\";\n \t\t echo \"<span class=\\\"label\\\"><b>Sub Sub Jenis Dokumen</b></span>\";\n echo \"<select class=\\\"input\\\" name=\\\"jalain3\\\">\\r\"; //By Default the item will be disabled.\n echo \"<option value=\\\"$data4[jalain3_id]\\\">$data4[jalain3_name]</option>\\r\";\n\t echo \"</select>\\r\";\n \t\t echo \"</div>\";\n\n }", "title": "" }, { "docid": "33837b1b8407a882c349c7906737eb21", "score": "0.5270779", "text": "function objListHtml($option = array()) {\r\n\t\tglobal $bw,$vsLang;\r\n\t\t$count=2;\r\n\t\t$BWHTML = \"\";\r\n\t\t//--starthtml--//\r\n\r\n\t\t$BWHTML .= <<<EOF\r\n<input type=\"hidden\" name=\"checkedObj\" id=\"checked-obj\" value=\"\" />\r\n<div class=\"ui-dialog ui-widget ui-widget-content ui-corner-all\">\r\n\t<div class=\"ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-corner-all-inner\">\r\n \t<span class=\"ui-dialog-title\">{$vsLang->getWords('alias_list','Current Alias')}</span>\r\n </div>\r\n\t<div class=\"error\">{$option['message']}</div>\r\n\t<ul class=\"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-corner-all-inner ui-widget-header\">\r\n \t<li class=\"ui-state-default ui-corner-top\">\r\n \t\t<a id=\"addPage\" title=\"{$vsLang->getWords('pages_addPage','Add')}\" onclick=\"addPage()\" href=\"javascript:vsf.get('admins/addformadmin/','adminform');\">\r\n \t\t{$vsLang->getWords('pages_addPage','Add')}\r\n\t\t\t</a>\r\n \t</li>\r\n \t<li class=\"ui-state-default ui-corner-top\">\r\n \t<a id=\"delete-objlist-bt\" title=\"{$vsLang->getWords('pages_deletePage','Delete')}\" onclick=\"deleteAll()\" href=\"#\">\r\n \t{$vsLang->getWords('pages_deletePage','Delete')}\r\n\t\t\t</a>\r\n\t\t</li>\r\n\t</ul>\t\r\n\t<table cellspacing=\"0\" cellpadding=\"0\" class=\"ui-dialog-content ui-widget-content\" style=\"width:100%\">\r\n \t<thead >\r\n \t\t<tr>\r\n \t\t\t<th width=\"15\"><input type=\"checkbox\" onclick=\"checkAll()\" onclicktext=\"checkAll()\" name=\"all\" /></th>\r\n <th>{$vsLang->getWords('alias_usrl','Alias url')}</th>\r\n <th>{$vsLang->getWords('alias_read_url','Real url')}</th>\r\n <th>{$vsLang->getWords('alias_keywords','Keywords')}</th>\r\n <th>{$vsLang->getWords('alias_option','Options')}</th>\r\n <th style=\"width:20px;\">{$vsLang->getWords('alias_type','Type')}</th>\r\n </tr>\r\n </thead>\r\n <if=\"$option['list']\">\r\n <foreach=\"$option['list'] as $alias\">\r\n <php>\r\n $count++;\r\n $class=\"even\";\r\n\t\t\tif($count%2)$class=\"odd\";\r\n\t\t\t\r\n\t\t</php>\r\n\t\t<tr class=\"{$class}\">\r\n\t\t\t<td align=\"center\">\r\n\t\t\t\t<input type=\"checkbox\" onclicktext=\"checkObject({$alias->getId()});\" onclick=\"checkObject({$alias->getId()});\" name=\"obj_{$alias->getId()}\" value=\"{$alias->getId()}\" class=\"myCheckbox\" />\r\n\t\t\t</td>\r\n\t\t\t<td>{$alias->getAliasUrl()}<div class=\"desctext\">{$alias->getTitle()}</div></td>\r\n\t\t\t<td>{$alias->getRealUrl()}</td>\r\n\t\t\t<td>{$alias->getKeyword()}</td>\r\n\t\t\t<td>\r\n\t\t\t\t<a class=\"ui-state-default ui-corner-all ui-state-focus\" href=\"javascript:vsf.get('{$bw->input[0]}/editAlias/{$alias->getId()}/{$bw->input[2]}','urlForm');\" title='{$vsLang->getWords('newsItem_EditObjTitle',\"Click here to edit this {$bw->input[0]}\")}'>{$vsLang->getWords('global__edit','Edit')}</a> \r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t{$alias->typeText}\r\n\t\t\t</td>\r\n\t\t</tr>\r\n </foreach>\r\n </if>\r\n\t\t<tr><td align=\"right\" colspan=\"6\">\r\n\t\t\t<if=\"$option['paging']\">\r\n\t\t\t{$option['paging']}\r\n\t\t\t</if>\r\n\t\t</td></tr>\r\n\t\t<tfoot>\r\n\t\t\t<td align=\"center\" class=\"footTable\" colspan=\"6\">\r\n\t\t\t\r\n\t\t\t</td>\r\n\t\t</tfoot>\r\n\t</table>\r\n</div>\r\n<script>\r\n\r\nfunction checkObject() {\r\n\tvar checkedString = '';\r\n\t$(\"input[type=checkbox]\").each(function(){\r\n\t\tif($(this).hasClass('myCheckbox')){\r\n\t\t\tif(this.checked) checkedString += $(this).val()+',';\r\n\t\t}\r\n\t});\r\n\tcheckedString = checkedString.substr(0,checkedString.lastIndexOf(','));\r\n\t$('#checked-obj').val(checkedString);\r\n}\r\n\r\nfunction checkAll() {\r\n\tvar checked_status = $(\"input[name=all]:checked\").length;\r\n\tvar checkedString = '';\r\n\t$(\"input[type=checkbox]\").each(function(){\r\n\t\tif($(this).hasClass('myCheckbox')){\r\n\t\tthis.checked = checked_status;\r\n\t\tif(checked_status) checkedString += $(this).val()+',';\r\n\t\t}\r\n\t});\r\n\t$(\"span[acaica=myCheckbox]\").each(function(){\r\n\t\tif(checked_status)\r\n\t\t\tthis.style.backgroundPosition = \"0 -50px\";\r\n\t\telse this.style.backgroundPosition = \"0 0\";\r\n\t});\r\n\tcheckedString = checkedString.substr(0,checkedString.lastIndexOf(','));\r\n\t$('#checked-obj').val(checkedString);\r\n}\r\n\r\n\r\n\r\n\r\n$('#delete-objlist-bt').click(function() {\r\n\t\tif($('#checked-obj').val()=='') {\r\n\t\t\tjAlert(\r\n\t\t\t\t\"{$vsLang->getWords('delete_obj_confirm_noitem', \"You haven't choose any items to delete!\")}\",\r\n\t\t\t\t\"{$bw->vars['global_websitename']} Dialog\"\r\n\t\t\t);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tjConfirm(\r\n\t\t\t\"{$vsLang->getWords('obj_delete_confirm', \"Are you sure want to delete this {$bw->input[0]}?\")}\",\r\n\t\t\t\"{$bw->vars['global_websitename']} Dialog\",\r\n\t\t\tfunction(r) {\r\n\t\t\t\tif(r) {\r\n\t\t\t\tvar lists = $('#checked-obj').val();\t\t\t\t\r\n\t\t\t\tvsf.get('urlalias/deleteObj/'+lists+'/{$bw->input[2]}','urlCurrent');\r\n\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t});\r\n\r\n</script>\r\nEOF;\r\n\t\t\t//--endhtml--//\r\n\r\n\t\t\treturn $BWHTML;\r\n\t}", "title": "" }, { "docid": "13fee1308fc49a0505c4dd3dfd659fe7", "score": "0.52490014", "text": "public function listMatchs()\n {\n $errors = [];\n $success = [];\n\n\n $idUser = $_SESSION['user']['idCompte'];\n\n /** @var $compte Compte */\n $compte = Compte::getById($idUser);\n $animals = $compte->matchedAnimals();\n\n $this->render('memberArea/listMatchs', ['animals' => $animals]);\n }", "title": "" }, { "docid": "f9446305f7ebb11ec756be9ec4a960e7", "score": "0.51971555", "text": "function generate_list($querySQL,$list_value,$list_text, $form_name, $default_value)\r\n{\r\n\tglobal $database_YBDB, $YBDB;\r\n\tmysql_select_db($database_YBDB, $YBDB);\r\n\t$recordset = mysql_query($querySQL, $YBDB) or die(mysql_error());\r\n\t$row_recordset = mysql_fetch_assoc($recordset);\r\n\t$totalRows_recordset = mysql_num_rows($recordset);\r\n\t$default_delimiter = '';\r\n\t\r\n\t// if a form name is supplied HTML listbox code is inserted\r\n\tif($form_name <> \"none\"){echo \"<select name=\\\"$form_name\\\">\";}\r\n\r\n\techo \"\\n\";\r\n\tdo { \r\n\t\tif( $default_value == $row_recordset[$list_value]){ \r\n\t\t\t$default_delimiter = 'selected=\"selected\"';\r\n\t\t} else { $default_delimiter = '';}\r\n\t\techo '<option value=\"' . $row_recordset[$list_value] . '\"' . $default_delimiter .'>' . $row_recordset[$list_text] . '</option>\\n';\r\n\t\t} while ($row_recordset = mysql_fetch_assoc($recordset));\r\n \t$rows = mysql_num_rows($recordset);\r\n \tif($rows > 0) {\r\n mysql_data_seek($recordset, 0);\r\n\t $row_recordset = mysql_fetch_assoc($recordset);\r\n\t\t}\r\n\tmysql_free_result($recordset);\r\n\t\r\n\t// if a form name is supplied HTML listbox code is inserted\r\n\tif($form_name <> \"none\"){echo \"</select>\";}\r\n}", "title": "" }, { "docid": "311ac3570c716049705d3878ea4006fd", "score": "0.51762813", "text": "function thebrig_menu_list ( $list , $list_name , $chosen ) {\n\tglobal $config ;\n\t// This function\n\t$menu = \"<select name =\\\"{$list_name}\\\" id=\\\"{$list_name}_menu\\\">\";\n\t// Build the select box one list item at a time\n\tforeach ( $list as $element) {\n\t\t// Check if the currently inspected element of the array \n\t\tif ( strcmp($element, $chosen) == 0 ) {\n\t\t\t$menu .= \"<option selected value = \\\"$element\\\"> $element </option> \" ;\n\t\t}\n\t\telse {\n\t\t\t$menu .= \"<option value = \\\"$element\\\"> $element </option> \" ;\n\t\t}\n\t} // end of completed folder, filename, suffix creation\n\t$menu .= \"</select>\";\n\treturn $menu ;\n}", "title": "" }, { "docid": "c17d91ffca8d1d77ccb161109fa9fb9e", "score": "0.5154229", "text": "function fillMList()\r\n {\r\n\r\n if( ! is_array($this->_items))\r\n $this->_items = array();\r\n \r\n foreach($this->_items as $item)\r\n {\r\n // it is a divider?\r\n if(isset($item['IsDivider']) && $item['IsDivider'] == \"true\")\r\n {\r\n $divider = \"data-role=\\\"list-divider\\\"\";\r\n }\r\n else\r\n {\r\n $divider = \"\";\r\n }\r\n // custom icon\r\n if(isset($item['Icon']) && $item['Icon'] != \"\")\r\n $liicon = \"data-icon=\\\"\" . systemIcon($item['Icon']) . \"\\\"\";\r\n else\r\n $liicon = \"\";\r\n\r\n // filter text\r\n if(isset($item['FilterText']) && $item['FilterText'] != \"\")\r\n $lifiltertext = \"data-filtertext=\\\"\" . $item['FilterText'] . \"\\\"\";\r\n else\r\n $lifiltertext = \"\";\r\n\r\n echo \"\\t<li $liicon $lifiltertext $divider >\";\r\n if( ! isset($item['MList']) || $item['MList'] == \"\")\r\n {\r\n\r\n if(isset($item['IsDivider']) && $item['IsDivider'] == \"true\")\r\n {\r\n echo $item['Caption'];\r\n }\r\n else\r\n {\r\n\r\n //the link\r\n if(isset($item['Link']) && $item['Link'] != \"\")\r\n {\r\n $ajax = \"\";\r\n if(isset($item['AjaxLink']) && $item['AjaxLink'] == 'true')\r\n {\r\n $ajax = \" data-ajax=\\\"true\\\" rel=\\\"external\\\" \";\r\n\r\n }\r\n\r\n $link = str_replace(' ', '%20',$item['Link']);\r\n\r\n echo \"<a href=\\\"$link\\\"$ajax>\";\r\n }\r\n\r\n //check for thumbnail\r\n if(isset($item['Thumbnail']) && $item['Thumbnail'] != \"\")\r\n {\r\n //if the thumb is an icon\r\n if(isset($item['IsIcon']) && $item['IsIcon'] == 'true')\r\n $isicon = \"class=\\\"ui-li-icon\\\"\";\r\n else\r\n $isicon = \"\";\r\n\r\n $thumbnail = str_replace(' ', '%20',$item['Thumbnail']);\r\n $thumbnailhint = (isset($item['ThumbnailHint'])) ? $item['ThumbnailHint'] : \"\";\r\n echo \"<img $isicon src=\\\"{$thumbnail}\\\" alt=\\\"{$thumbnailhint}\\\">\";\r\n }\r\n\r\n\r\n\r\n echo $item['Caption'];\r\n\r\n if(isset($item['Link']) && $item['Link'] != \"\")\r\n echo \"</a>\";\r\n\r\n //the extra button\r\n if(isset($item['ExtraButtonLink']) && $item['ExtraButtonLink'] != \"\")\r\n {\r\n echo \"<a href=\\\"\" . $item['ExtraButtonLink'] . \"\\\">\" . $item['ExtraButtonHint'] . \"</a>\";\r\n }\r\n\r\n //the numeric value on the right\r\n if(isset($item['CounterValue']) && $item['CounterValue'] != \"\")\r\n echo \"<span class=\\\"ui-li-count\\\">\" . $item['CounterValue'] . \"</span>\";\r\n }\r\n }\r\n else\r\n {\r\n echo $item['Caption'];\r\n if(($this->ControlState & csDesigning) != csDesigning)\r\n {\r\n //Get the object und unrelate it to us so it can be dumped\r\n $item['MList'] = $this->fixupProperty($item['MList']);\r\n $visibleStatus = $item['MList']->_visible;\r\n $item['MList']->_visible = 1;\r\n $item['MList']->dumpContents();\r\n $item['MList']->_visible = $visibleStatus;\r\n }\r\n else\r\n {\r\n echo \"<ul><li></li></ul>\";\r\n }\r\n }\r\n echo \"</li>\\n\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "b91678c0546583b091e1c239f36ee807", "score": "0.5145089", "text": "function show_league_select_box ($con,$intIdBox,$intID,$strInputName,$sesid,$idPageRight){\n\t \n\t echo '\n <div style=\"position:relative;\">\n\t <span class=\"label label-04\">League name</span>\n ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT * FROM leagues WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t $intID=$write_sub['id'];\n\t $intName=''.$write_sub['name'].'';\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n echo '<span id=\"league_name'.$intIdBox.'\">'.$intName.'</span>';\n echo'&nbsp;<a href=\"javascript:cancel_league('.$intIdBox.')\" title=\"Cancel\"><img src=\"../inc/design/ico-delete.gif\" class=\"ico\" alt=\"Cancel\"></a>&nbsp;|&nbsp;';\n echo'<a class=\"ico-list\" href=\"javascript:show_league_window('.$intIdBox.')\" title=\"Set league\">search league</a>';\n echo'<div id=\"league_livesearch_window'.$intIdBox.'\" class=\"livesearch_league_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type name of league</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_league_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter_box\" id=\"filter_league'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_league_livesearch_data(this.value,'.$intIdBox.',\\''.$sesid.'\\','.$idPageRight.')\" />\n <div id=\"league_livesearch'.$intIdBox.'\" class=\"livesearch_league\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"league_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" /><br />';\n }", "title": "" }, { "docid": "277683295325fa12c67cf374098c321a", "score": "0.51397854", "text": "function _LS_renderSaveMatchBox($LS_LEVEL,$setshometeam,$setsawayteam,$legshometeam,$legsawayteam,$match_status){\t\t\t\t\r\n\t\r\n\t\t$STROUT= '<table><tr>'\r\n\t\t\t.'<td><image src=\"images/save.png\" align=\"left\">Mit <b>Addieren</b> wird das Matchresultat aus den gespeicherten Spielen ermittelt. Mit <b>Speichern</b> wird dieses Resultat (Sets/Legs) im Spielplan und f&uuml;r die Tabelle freigegeben. Der entsprechende Eintrag wird unterhalb eingeblendet.</td></tr>'\r\n\t\t\t.'<tr><td align=\"center\">Heim / Ausw&auml;rts</td></tr>'\r\n\t.'<tr><td align=\"center\">Sets:'\r\n\t._input(1,\"sh\",$setshometeam,4,2)\r\n\t._input(1,\"sa\",$setsawayteam,4,2)\r\n\t.'</td></tr><tr><td align=\"center\">Legs:'\r\n\t._input(1,\"lh\",$legshometeam,4,2)\r\n\t._input(1,\"la\",$legsawayteam,4,2)\r\n\t.'</td></tr>';\r\n\tif ($LS_LEVEL>1) {$STROUT=$STROUT.'<tr><td align=\"center\">'.Select_MatchStatus('mstatus',$match_status,'',0).'</td></tr>';}\r\n\t$STROUT=$STROUT.'</table>';\r\n\treturn $STROUT;\r\n}", "title": "" }, { "docid": "b92fd52ea833a0393b82814dc60a2b3e", "score": "0.5062137", "text": "public function list_view_templates()\n{\ninclude 'db_connection.php';\n\n$list_view = '<ul data-role=\"listview\" data-filter=\"false\" data-filter-placeholder=\"Search fruits...\" data-inset=\"true\">';\n\n$sql_select_templates = \"SELECT * FROM `\".$db.\"`.`schedule_template`\";\n$result_select_templates = $link->query($sql_select_templates);\n\nwhile ($object_select_templates = $result_select_templates->fetch_assoc())\n{\n$template_ID = $object_select_templates['ID'];\n$template_name = $object_select_templates['name'];\n$list_view = $list_view . \n'<li data-icon=\"edit\">\n<a href=\"#popupEditTemplate\" \n\t\t\tonClick=\"update_edit_popup_template('.$template_ID.', \\''.$template_name.'\\')\" \n\t\t\tclass=\"ui-icon-edit\" data-rel=\"popup\" \n\t\t\tdata-position-to=\"window\" \n\t\t\tdata-transition=\"pop\">'.$template_name.\n'</a>\n</li>';\n\n\n\n}\n$list_view = $list_view . '</ul>';\n\ninclude 'db_disconnect.php';\nreturn $list_view;\n}", "title": "" }, { "docid": "1ca2a601c0f05fe6d0fce001211cd11a", "score": "0.50488126", "text": "public function getListMatch()\n {\n return $this->listMatch;\n }", "title": "" }, { "docid": "88c80d55bf6ae8f197b03d658dfbe590", "score": "0.50230145", "text": "function show_club_select_box ($con,$intIdBox,$intID,$strInputName){\n\t \n\t echo '\n <div style=\"position:relative;\">\n\t <span class=\"label label-04\">Club name</span>\n ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT * FROM clubs WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t $intID=$write_sub['id'];\n\t $intName=''.$write_sub['name'].'';\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n echo '<span id=\"club_name'.$intIdBox.'\">'.$intName.'</span>';\n echo'&nbsp;<a href=\"javascript:cancel_club('.$intIdBox.')\" title=\"Cancel\"><img src=\"../inc/design/ico-delete.gif\" class=\"ico\" alt=\"Cancel\"></a>&nbsp;|&nbsp;';\n echo'<a class=\"ico-list\" href=\"javascript:show_club_window('.$intIdBox.')\" title=\"Set club\">search club</a>';\n echo'<div id=\"club_livesearch_window'.$intIdBox.'\" class=\"livesearch_club_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type name of club</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_club_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter_box\" id=\"filter_club'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_club_livesearch_data(this.value,'.$intIdBox.')\" />\n <div id=\"club_livesearch'.$intIdBox.'\" class=\"livesearch_club\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"club_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" /><br />';\n }", "title": "" }, { "docid": "ce6f14ed3a85f4a57164ac94b8839134", "score": "0.49971002", "text": "function show_player_select_box ($con,$intIdBox,$intID,$strInputName){\n\t \n\t echo '\n <div style=\"position:relative;\">\n\t <span class=\"label label-04\">Player name</span>\n ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT * FROM players WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t $intID=$write_sub['id'];\n\t $intName=''.$write_sub['name'].' '.$write_sub['surname'].' '.$write_sub['nationality'].'';\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n echo '<span id=\"player_name'.$intIdBox.'\">'.$intName.'</span>';\n echo'&nbsp;<a href=\"javascript:cancel_player('.$intIdBox.')\" title=\"Cancel\"><img src=\"../inc/design/ico-delete.gif\" class=\"ico\" alt=\"Cancel\"></a>&nbsp;|&nbsp;';\n echo'<a class=\"ico-list\" href=\"javascript:show_player_window('.$intIdBox.')\" title=\"Set player\">search player</a>';\n echo'<div id=\"player_livesearch_window'.$intIdBox.'\" class=\"livesearch_player_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type name of player</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_player_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter_box\" id=\"filter_player'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_player_livesearch_data(this.value,'.$intIdBox.')\" />\n <div id=\"player_livesearch'.$intIdBox.'\" class=\"livesearch_player\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"player_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" /><br />';\n }", "title": "" }, { "docid": "8a6de6fb94ea7f7b3474173adfb2a2f0", "score": "0.49892962", "text": "function set_admin_members_field_template_dynamic_list_select($args) {\n\n // Description container\n $description = '';\n\n // Verify if description exists\n if ( isset($args['words_list']['description']) ) {\n\n // Set description\n $description = '<small class=\"form-text text-muted\">'\n . $args['words_list']['description']\n . '</small>';\n\n }\n\n // Required container\n $required = '';\n\n // Verify if input is required\n if ( !empty($args['field_required']) ) {\n\n // Set required value\n $required = 'required';\n\n }\n\n // Items container\n $items = '';\n\n // Verify if items exists\n if ( !empty($args['items']) ) {\n\n // List items\n foreach ( $args['items'] as $key => $value ) {\n\n // Set items\n $items .= '<li class=\"list-group-item\">'\n . '<a href=\"#\" class=\"member-field-select-item\" data-value=\"' . $key . '\">'\n . $value\n . '</a>'\n . '</li>';\n\n }\n\n } else {\n\n // Set no found message\n $items = '<li class=\"list-group-item no-results-found\">'\n . get_instance()->lang->line('members_no_data_found')\n . '</li>';\n\n }\n\n // Display the field\n echo '<div class=\"form-group\">'\n . '<div class=\"row\">'\n . '<div class=\"col-lg-12\">'\n . '<label for=\"member-field-' . $args['field_slug'] . '\">'\n . $args['words_list']['label']\n . '</label>'\n . '</div>'\n . '</div>'\n . '<div class=\"row\">'\n . '<div class=\"col-lg-12\">'\n . '<div class=\"dropdown\">'\n . '<button class=\"btn btn-secondary members-dynamic-dropdown-btn dropdown-toggle member-field-' . $args['field_slug'] . '\" type=\"button\" data-toggle=\"dropdown\" data-title=\"' . $args['words_list']['select'] . '\" data-field-id=\"' . $args['field_slug'] . '\" data-field-url=\"' . $args['field_endpoint'] . '\" data-value=\"0\" aria-expanded=\"false\">'\n . $args['words_list']['select']\n . '</button>'\n . '<div class=\"dropdown-menu\" aria-labelledby=\"dropdown-items\">'\n . '<div class=\"card\">'\n . '<div class=\"card-head\">'\n . '<input type=\"text\" class=\"members-search-dropdown-items\" placeholder=\"' . $args['words_list']['placeholder'] . '\" />'\n . '</div>'\n . '<div class=\"card-body\">'\n . '<ul class=\"list-group members-dropdown-dynamic-list-ul\">'\n . '</ul>'\n . '</div>'\n . '</div>'\n . '</div>'\n . '</div>'\n . $description\n . '</div>'\n . '</div>'\n . '</div>';\n \n }", "title": "" }, { "docid": "8bbbe32c50af4da42c08bfcbb4ce26bc", "score": "0.49765992", "text": "function formBlock_bList($args){\n \n foreach($args as $list_name=>$a){\n \n // Instantiate the list/unit class\n locateAndInclude($list_name);\n if (!empty($a['arg3'])){\n\t$list_class = new $list_name($a['arg1'],$a['arg2'],$a['arg3']);\n\t$args_once = array('arg1_once' => $a['arg1'],\n\t\t\t 'arg2_once' => $a['arg2'],\n\t\t\t 'arg3_once' => $a['arg3']);\n }elseif (!empty($a['arg2'])){\n\t$list_class = new $list_name($a['arg1'],$a['arg2']);\n\t$args_once = array('arg1_once' => $a['arg1'],\n\t\t\t 'arg2_once' => $a['arg2']);\n }else{\n\t$list_class = new $list_name($a['arg1']);\n\t$args_once = array('arg1_once' => $a['arg1']);\n } \n \n // Get the list content\n $this->formDB[$a['field']] = serialize(array_values(call_user_func_array(array($list_class,$a['method']),array())));\n if (b_posix::is_empty(unserialize($this->formDB[$a['field']]))) $this->formDB[$a['field']] = serialize(array(b_fmt::redText('&lt;empty&gt;')));\n \n // Field description\n $descr = $this->getDescr($a['field']);\n // Block title\n $btit = (empty($a['btit']) \n\t\t? preg_replace('/\\(.*/','',$descr)\n\t\t: $a['btit']); \n // URL to see/update the list\n $url = b_url::same(\"?ed_bList=$list_name&\".b_fmt::joinX('&',$args_once), array('form','id'));\n \n // Show the block\n $this->isRO[$a['field']] = True;\n $this->isUL[$a['field']] = True;\n if (empty($this->listCounter[$list_name])) $this->listCounter[$list_name] = 0;\n $this->formBlock($list_name.(++$this->listCounter[$list_name]),\n\t\t $btit,\n\t\t array($a['field']),\n\t\t array('d'=>$btit,\n\t\t\t 'i'=>$a['icon'],\n\t\t\t 'l'=>$url)\n\t\t );\n }\n }", "title": "" }, { "docid": "c357e926c557732b5776755fc88af1e8", "score": "0.49527407", "text": "function as_create_theme_selection_list(){\n\tob_start();\n\t\n\tglobal $wpdb;\n\t$theme_list_table = $wpdb->prefix . \"app_switcher_zip_theme_list\";\n\t$results = $wpdb->get_results(\"SELECT * FROM $theme_list_table;\", ARRAY_A);\n\t//fb::loglog($results);\n\tif (count($results) > 0) :\n\t?><ul id=\"theme_selection\"><?php\n\tforeach($results as $result){\n\t\t$theme_name = str_replace('_',' ',$result['theme_name']);\n\t\t?>\n\t\t<li class=\"theme <?php echo $result['theme_name'].($result['theme_name'] == $_COOKIE['as_theme_selection'] ? ' active':'') ;?>\">\n\t\t<a href=\"<?php echo addURLQuery(\"theme-selection=\".$result['theme_name']); ?>\" id=\"<?php echo $result['theme_name']; ?>\" class=\"theme\">\n\t\t<img src=\"<?php echo $result['image_path']; ?>\" alt=\"<?php echo $result['theme_name']; ?>\" />\n\t\t<div><?php echo $theme_name; ?></div></a>\n\t\t</li>\n\t\t <?php\n\t}\n\t?></ul><?php\n\tendif;\n}", "title": "" }, { "docid": "5fc088c99cedc561a59bbdc0916b66ff", "score": "0.4950935", "text": "function set_admin_members_field_template_list_select($args) {\n\n // Description container\n $description = '';\n\n // Verify if description exists\n if ( isset($args['words_list']['description']) ) {\n\n // Set description\n $description = '<small class=\"form-text text-muted\">'\n . $args['words_list']['description']\n . '</small>';\n\n }\n\n // Required container\n $required = '';\n\n // Verify if input is required\n if ( !empty($args['field_required']) ) {\n\n // Set required value\n $required = 'required';\n\n }\n\n // Items container\n $items = '';\n\n // Verify if items exists\n if ( !empty($args['items']) ) {\n\n // List items\n foreach ( $args['items'] as $key => $value ) {\n\n // Set items\n $items .= '<li class=\"list-group-item\">'\n . '<a href=\"#\" class=\"member-field-select-item\" data-value=\"' . $key . '\">'\n . $value\n . '</a>'\n . '</li>';\n\n }\n\n } else {\n\n // Set no found message\n $items = '<li class=\"list-group-item no-results-found\">'\n . get_instance()->lang->line('members_no_data_found')\n . '</li>';\n\n }\n\n // Default selected text\n $selected = $args['words_list']['select'];\n\n // Default selected id\n $selected_id = 0;\n \n // Verify if an item was selected\n if ( the_member_option($args['field_slug'], the_global_variable('members_member_id')) !== FALSE ) {\n\n // Set new selection\n $selected = isset($args['items'][the_member_option($args['field_slug'], the_global_variable('members_member_id'))])?$args['items'][the_member_option($args['field_slug'], the_global_variable('members_member_id'))]:$selected;\n\n // Set selected ID\n $selected_id = the_member_option($args['field_slug'], the_global_variable('members_member_id'));\n\n }\n\n // Display the field\n echo '<div class=\"form-group\">'\n . '<div class=\"row\">'\n . '<div class=\"col-lg-12\">'\n . '<label for=\"member-field-' . $args['field_slug'] . '\">'\n . $args['words_list']['label']\n . '</label>'\n . '</div>'\n . '</div>'\n . '<div class=\"row\">'\n . '<div class=\"col-lg-12\">'\n . '<div class=\"dropdown\">'\n . '<button class=\"btn btn-secondary members-dropdown-btn dropdown-toggle member-field-' . $args['field_slug'] . '\" type=\"button\" data-toggle=\"dropdown\" data-title=\"' . $args['words_list']['select'] . '\" data-field-id=\"' . $args['field_slug'] . '\" data-value=\"' . $selected_id . '\" aria-expanded=\"false\">'\n . $selected\n . '</button>'\n . '<div class=\"dropdown-menu\" aria-labelledby=\"dropdown-items\">'\n . '<div class=\"card\">'\n . '<div class=\"card-body\">'\n . '<ul class=\"list-group members-dropdown-list-ul\">'\n . $items\n . '</ul>'\n . '</div>'\n . '</div>'\n . '</div>'\n . '</div>'\n . $description\n . '</div>'\n . '</div>'\n . '</div>';\n \n }", "title": "" }, { "docid": "0a41725374637954c8ad82aa7c66e5e3", "score": "0.49471673", "text": "function getFacelikeListSearch($objForm){\n\t$objResponse \t= new xajaxResponse();\n\t$objAdminFacelike \t= &$GLOBALS['objAdminFacelike'];\n\t$strParam\t= serialize($objForm);\n\t$req['list']\t= $objAdminFacelike -> getFacelikeList(1,$strParam);\n\t$req['nofull'] = true ;\n\t$objAdminFacelike -> smarty -> assign('req',\t$req);\n\t$content = $objAdminFacelike -> smarty -> fetch('admin_facelike.tpl');\n\t$objResponse -> assign(\"tabledatalist\",'innerHTML',$content);\n\t$objResponse -> assign(\"searchparam\",'value',$strParam);\n\t$objResponse -> assign(\"pageno\",'value',1);\n\n\treturn $objResponse;\n}", "title": "" }, { "docid": "156435aba3c96633919996787c612065", "score": "0.4943578", "text": "function select($args) {\r\n\t\t$options = get_option($this->options);\r\n\t if ($args['multiple']) {\r\n\t\t\techo \"<select multiple style='height:80px;' name='$this->options[\" . $args['id']. \"][]'>\";\r\n\t\t\tforeach ($args['select'] as $key => $value) {\r\n\t\t\t\techo \"<option \" . (array_search($value , $options[$args['id']]) === false ? '' : 'selected' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t}\t\r\n\t\t\techo \"</select>\";\r\n\t\t} else {\r\n\t\t\techo \"<select name='$this->options[\" . $args['id']. \"]'>\";\r\n\t\t\tforeach ($args['select'] as $key => $value) {\r\n\t\t\t\techo \"<option \" . ($options[$args['id']] == $key ? 'selected' : '' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t}\t\r\n\t\t\techo \"</select>\";\r\n\t\t}\r\n\t\techo \"<br/><span class='description'>\" . $args['description'] . \"</span>\" ;\r\n\t}", "title": "" }, { "docid": "a8e604063780be1683ce8d143d783ff0", "score": "0.49324882", "text": "private static function ul_cb( $match ) {\n\t\t$placeholder = '%WPGRAFIESAVEUL' . count( self::$_ul_placeholders ) . '%';\n\t\tself::$_ul_placeholders[$placeholder] = $match[0];\n\t\treturn $placeholder;\n\t}", "title": "" }, { "docid": "599f6edf7e5c93d9c8b217d303e962d9", "score": "0.49040082", "text": "function printMatches($rawMatch) {\n echo \"<div class='match'>\n\t\t<p><img src='https://webster.cs.washington.edu/images/nerdluv/user.jpg' alt='user icon' />\n\t\t\" . $rawMatch[0] . \"</p>\n\t\t<ul>\n\t\t\t<li><strong>gender:</strong>\" . $rawMatch[1] . \"</li>\n\t\t\t<li><strong>age:</strong>\" . $rawMatch[2] . \"</li>\n\t\t\t<li><strong>type:</strong>\" . $rawMatch[3] . \"</li>\n\t\t\t<li><strong>OS:</strong>\" . $rawMatch[4] . \"</li> \n\t\t</ul>\n\t\t</div>\";\n}", "title": "" }, { "docid": "8b61b37c1143541ad20e1868702579cd", "score": "0.4899653", "text": "static function MultiListingsDialog(){\n\t\trequire_once(DSIDXPRESS_PLUGIN_PATH.'tinymce/multi_listings/dialog.php');\n\t\texit;\n\t}", "title": "" }, { "docid": "63c075e3aec15004f0c9909fdd8fa924", "score": "0.4896157", "text": "function DrawBinaryList($flid, $lar,$def='') {\n\n $scrolltag = \"\";\n $ret = \"<div style=\\\"overflow:auto; max-height:{$this->blist_height}; width:{$this->blist_width}\\\" id=\\\"blist_$flid\\\"><table>\";\n if (is_callable($lar)) {\n $lar = call_user_func($lar);\n }\n\n if(is_array($lar) && count($lar)>0) { #<3>\n $spinit = is_array($def)? $def: explode(',', $def);\n foreach($lar as $kkk => $item) { #<4>\n if (is_array($item) && $item[0]==='<') { # optgoup - title before sub-list\n $ret .=\"<tr><td><b>$item[1]</td></td></tr>\\n\";\n continue;\n }\n\n $pid = $pname = '';\n if (is_array($item)) {\n if (count($item)>1) {\n $pid = $item[0];\n $pname = $item[1];\n }\n else $pid = $pname = $item[0];\n }\n else $pid = $pname = $item;\n\n if (!is_numeric($kkk)) $pid = $kkk;\n/* else $pid = (is_array($item))? array_shift($item) : $item;\n if (is_array($item) && count($item)>0) {\n $element = array_shift($item);\n WriteDebugInfo(\"one element:\". $element);\n if (is_array($element)) {\n $pname .= (isset($element[1]) ? $element[1] : $element[0]);\n }\n else $pname .= $element;\n }\n*/\n $chk = in_array($pid, $spinit) ? 'checked=\"checked\"' : '';\n if ($this->fullBlistForm)\n $ret .=\"<tr><td><label><input type='checkbox' name='_tmp_{$flid}_$pid' id='_tmp_{$flid}_$pid' value='$pid' $chk /> $pid-$pname</label></td></tr>\\n\";\n else\n $ret .=\"<tr><td><label><input type='checkbox' name='_tmp_{$flid}_$pid' id='_tmp_{$flid}_$pid' value='$pid' $chk /> $pname</label></td></tr>\\n\";\n } #<4>\n } #<3>\n $ret .= \"</table></div>\\n\";\n return $ret;\n }", "title": "" }, { "docid": "0d87fe85f0daf147ed5b6c94fc4c26b6", "score": "0.48913443", "text": "function FrmSelContratoShow($sender, $params)\n {\n // unset($this->tvContratos->Items[$i]);\n if(count($this->tvContratos->Items)<=0) {\n $sql = \"select sContrato from contratosxusuario \";\n $sql .= \"where sIdUsuario='\".$_SESSION['ssUsuario'].\"' order by sContrato ;\";\n $rs = mysql_query($sql);\n $tag = 0;\n while($row = mysql_fetch_array($rs)){\n $this->tvContratos->addNodeToItems($row['sContrato'],$tag++,1,1);\n }\n }\n\n\n }", "title": "" }, { "docid": "d1f2d0e31e2a96e40cd90925cd5ed30c", "score": "0.48794413", "text": "function search_advanced_register_menu_type_selection($hook, $type, $value, $params) {\n\t$result = $value;\n\t\n\t$types = get_registered_entity_types();\n\t$custom_types = elgg_trigger_plugin_hook(\"search_types\", \"get_types\", array(), array());\n\t\n\t$result[] = ElggMenuItem::factory(array(\n\t\t\"name\" => \"all\",\n\t\t\"text\" => \"<a>\" . elgg_echo(\"all\") . \"</a>\",\n\t\t\"href\" => false\n\t));\n\t$result[] = ElggMenuItem::factory(array(\n\t\t\"name\" => \"item:user\",\n\t\t\"text\" => \"<a rel='user'>\" . elgg_echo(\"item:user\") . \"</a>\",\n\t\t\"href\" => false\n\t));\n\t$result[] = ElggMenuItem::factory(array(\n\t\t\"name\" => \"item:group\",\n\t\t\"text\" => \"<a rel='group'>\" . elgg_echo(\"item:group\") . \"</a>\",\n\t\t\"href\" => false\n\t));\n\t\n\tforeach ($types[\"object\"] as $subtype) {\n\t\t$result[] = ElggMenuItem::factory(array(\n\t\t\t\"name\" => \"item:object:$subtype\",\n\t\t\t\"text\" => \"<a rel='object \" . $subtype . \"'>\" . elgg_echo(\"item:object:\" . $subtype) . \"</a>\",\n\t\t\t\"href\" => false,\n\t\t\t\"title\" => elgg_echo(\"item:object:$subtype\")\n\t\t));\n\t}\n\t\n\tforeach ($custom_types as $type) {\n\t\t$result[] = ElggMenuItem::factory(array(\n\t\t\t\"name\" => \"search_types:$type\",\n\t\t\t\"text\" => \"<a rel='\" . $type . \"'>\" . elgg_echo(\"search_types:$type\") . \"</a>\",\n\t\t\t\"href\" => false,\n\t\t\t\"title\" => elgg_echo(\"search_types:$type\")\n\t\t));\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "11b8e73e4cb2171ffff70b259c4e0839", "score": "0.48738843", "text": "function get_bo_Replist($mon_path) {\r\n\tglobal $fieldvalue, $form_fieldname, $StyleChamps;\r\n\r\n\t$portfolio_default_img=\"../images/px_trans.gif\"; // image par d�faut\r\n\r\n\t$tab = split(\";\",$mon_path);\r\n\t$mon_path = $tab[0];\r\n\r\n\t$var_retour = \"\r\n <script>\r\n function JS_change_portfolio_preview(path, source, target) {\r\n \r\n \r\n \r\n var extension = (source.value.substring(source.value.length-3,source.value.length));\r\n if((extension=='jpg')||(extension=='gif')||(extension=='png')||(extension=='jpe'))\r\n {\r\n document.all[target].src = path + source.value;\r\n }\r\n else \r\n {\r\n document.all[target].src = path + '../../../admin/images/icones_explorer/icone_' + extension + '.gif'; \r\n\r\n }\r\n document.formulaire.lien_zoom.value = path + source.value;\r\n }\r\n \r\n function zoomit() {\r\n var lien = document.formulaire.lien_zoom.value;\r\n window.open(lien,'zoom');\r\n }\r\n </script>\r\n <input type='hidden' name='lien_zoom' value='\".$portfolio_default_img.\"'>\r\n <table border='0' cellpadding='0' cellspacing='0' width='100%'>\r\n <tr><td valign=top> \r\n\r\n \";\r\n\r\n\t$var_retour .=\"<select name=\\\"\".$form_fieldname.\"_port\\\" onChange=\\\"JS_change_portfolio_preview('\".$mon_path.\"', this, 'img_portfolio_preview_\".$form_fieldname.\"')\\\" class=\\\"\".$StyleChamps.\"\\\">\";\r\n\t$var_retour .= \"<option value=\\\"../images/px_trans.gif\\\">Vide</option>\";\r\n\t$var_retour .= list_dir($mon_path,0);\r\n\t$var_retour .=\"</select></td><td valign=\\\"top\\\"><a href='#' onClick='zoomit()'><img src=\\\"\".$portfolio_default_img.\"\\\" width=\\\"50\\\" name=\\\"img_portfolio_preview_\".$form_fieldname.\"\\\" border=0></a></tr></table>\";\r\n\treturn $var_retour;\r\n}", "title": "" }, { "docid": "b501a36bcaaf5591fac088995d2d14e5", "score": "0.48721793", "text": "function playerDropMenu($event, $letter, $active, $def = \"\\n\")\n{\n // and will only use registered players who are still active\n // (ie. who haven't dropped)\n // if $active is not set, function will return all registered\n // players\n $playernames = $event->getRegisteredPlayers($active);\n\n echo \"<select class=\\\"inputbox\\\" name=\\\"newmatchplayer$letter\\\">\";\n if (strcmp(\"\\n\", $def) == 0) {\n echo \"<option value=\\\"\\\">- Player $letter -</option>\";\n } else {\n echo '<option value=\"\">- None -</option>';\n }\n foreach ($playernames as $player) {\n $selstr = (strcmp($player, $def) == 0) ? 'selected' : '';\n echo \"<option value=\\\"{$player}\\\" $selstr>\";\n echo \"{$player}</option>\";\n }\n echo '</select>';\n}", "title": "" }, { "docid": "1b5635daa78c286bc2b9e5aa17e91780", "score": "0.48656645", "text": "function get_option_list($obj, $list_type, $return = 'select', $searchBy=\"\", $more=array())\n{\n\t$optionString = '';\n\t$types = array();\n\t\n\tswitch($list_type)\n\t{\n\t\tcase \"financialyears\":\n\t\t\tfor($i=@date('Y'); $i>(@date('Y') - MAXIMUM_FINANCIAL_HISTORY); $i--)\n\t\t\t{\n\t\t\t\tif($return == 'div') $optionString .= \"<div data-value='\".$i.\"'>Financial Year \".$i.\"</div>\";\n\t\t\t\telse $optionString .= \"<option value='\".$i.\"'>Financial Year \".$i.\"</option>\";\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase \"organizationtypes\":\n\t\t\t$types = array('provider'=>'Provider', 'government_agency'=>'Government Agency', 'pde'=>'Procurement or Disposal Entity');\n\t\t\tforeach($types AS $key=>$row)\n\t\t\t{\n\t\t\t\tif($return == 'div') $optionString .= \"<div data-value='\".$key.\"'>\".$row.\"</div>\";\n\t\t\t\telse $optionString .= \"<option value='\".$key.\"' onclick=\\\"updateFieldLayer('\".base_url().\"account/type_explanation/t/\".$key.\"','','','type_explanation','')\\\">\".$row.\"</option>\";\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase \"documenttypes\":\n\t\t\t$types = array('provider_registration'=>'Provider Registration Certificate', 'training_completion'=>'Training Completion Certificate');\n\t\t\tforeach($types AS $key=>$row)\n\t\t\t{\n\t\t\t\tif($return == 'div') $optionString .= \"<div data-value='\".$key.\"'>\".$row.\"</div>\";\n\t\t\t\telse $optionString .= \"<option value='\".$key.\"'>\".$row.\"</option>\";\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase \"contactreason\":\n\t\t\t$types = array('Issues With Registration', 'Report Error On System', 'Can Not Find Document', 'Report Provider Fraud');\n\t\t\tforeach($types AS $key=>$row)\n\t\t\t{\n\t\t\t\tif($return == 'div') $optionString .= \"<div data-value='\".$key.\"'>\".$row.\"</div>\";\n\t\t\t\telse $optionString .= \"<option value='\".$key.\"'>\".$row.\"</option>\";\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\t\n\t\n\t# Determine which value to return\n\tif($return == 'objects'){\n\t\treturn $types;\n\t}\n\telse if($return == 'div'){\n\t\treturn !empty($optionString)? $optionString: \"<div data-value=''>No Options</div>\";\n\t}\n\telse {\n\t\treturn !empty($optionString)? $optionString: \"<option value=''>No Options</option>\";\n\t}\n\t\n}", "title": "" }, { "docid": "e1acbd132794e4253a5935a230953779", "score": "0.48629975", "text": "function comparison_form($index){\n\t\tunset($this->attributes['BYTB']);\n\t\t$this->attributes['SHOW_SELECTED']='yes';\n\t\t$this->make_close_html();\n\t\t//$matches=preg_match_all('/<!--dde_start\\[(.[^]]*)]\\|(.[^|]*)\\|-->/',$this->input_field,$match);\n\t\t$this->input_field=preg_replace(\"/<!--dde_start\\[(.[^]]*)]\\|(.[^|]*)\\|-->/\",\"<span class='compareElement' onclick='$(\\\"[name=\\\\1]\\\").val(\\\"\\\\2\\\");'>\",$this->input_field);\n\t\t$this->input_field=preg_replace(\"/<!--dde_end-->/\",\"</span>\",$this->input_field);\n\t\t//$this->input_field=preg_replace(\"/<!--dde_complete-->/\",'<a href=\"#\" onclick=\"$(this).closest(\\'td\\').find(\\'.compareElement\\').click();return false; \" ><img alt=\"Select value\" src=\"images/icon_right2_18x18.png\" width=\"15\" /></a>',$this->input_field);\n\t\t$this->input_field.=' <a href=\"#\" onclick=\"$(this).closest(\\'td\\').find(\\'.compareElement\\').click();return false; \" ><img alt=\"Select value\" src=\"images/icon_right_18x18.png\" width=\"15\" /></a>';\n\t\t\n\t\treturn $this->input_field;\n\t}", "title": "" }, { "docid": "ae879ab54dc8425f5ad356c1e7703a25", "score": "0.48607546", "text": "function printMatch($matches) {\n foreach($matches as $match) {\n $match = explode(\",\", $match); ?>\n <div class=\"match\">\n <p>\n <img src=\"images/user.jpg\"/>\n <?=$match[0]?>\n </p>\n <ul>\n <li><strong>gender:</strong> <?=$match[1]?></li>\n <li><strong>age:</strong> <?=$match[2]?></li>\n <li><strong>type:</strong> <?=$match[3]?></li>\n <li><strong>OS:</strong> <?=$match[4]?></li>\n </ul>\n </div>\n<?php\n }\n}", "title": "" }, { "docid": "ba5733780131a62cac3dbacf2070c2a5", "score": "0.4859881", "text": "private function tGroupList(){\n\t\t$Smarty = self::$Smarty;\n\t\t$session = self::$session;\n\t\t$CDbShell_User = $oDB = self::oDB($this->sDBName);\n\n\t\tif(!empty($_POST)) {\n\t\t\tif($_GET['js_valid']==1) {\n\t\t\t\t$this->vaildGroupSearch($_POST,1);\t//client javascript vaild data\n\t\t\t}else{\n\t\t\t\t$this->vaildGroupSearch($_POST,0);\t//form submit vaild data\n\t\t\t}\n\t\t}\n\t\tif(empty($_GET['items'])) $iPageItems = PAGING_NUM;\n\t\telse $iPageItems = $_GET['items'];\n\n\t\tif(empty($_GET['order'])) $sOrder = \"createtime\";\n\t\telse $sOrder = $_GET['order'];\n\t\t\n\t\tif(empty($_GET['sort'])) $sSort = \"DESC\";\n\t\telse $sSort = $_GET['sort'];\n\t\t\n\t\tif(empty($_GET['page'])) $iPg = 0;\n\t\telse $iPg = $_GET['page'];\n\t\t\n\t\tif(empty($_GET['goid'])) $goid = 0;\n\t\telse $goid = $_GET['goid'];\n\n\t\tif($_GET['action'] === 'search')\n\t\t\t$sSearchSql = $this->sGetSearchSql($_POST);\n\t\telse\n\t\t\t$sSearchSql ='';\n\n\t\t//得到某筆資料是在第幾頁\n\t\tif($goid){\n\t\t\tif($sSearchSql!=='') $sWhereSql = \"WHERE $sSearchSql\";\t//no default filter\n $iPg = $oDB->iGetItemAtPage(\"galaxy_group\",\"group_no\",$goid,$iPageItems,$sSearchSql,\"ORDER BY $sOrder $sSort\");\n\t\t}\n\n\t\t//共幾筆\n\t\t$iAllItems = CGroup::iGetCount($sSearchSql);\n\t\t$iStart=$iPg*$iPageItems;\n\n\t\tif($iAllItems!==0){\n\t\t\t$sPostFix = \"ORDER BY $sOrder $sSort LIMIT $iStart,$iPageItems\";\t//sql postfix\n\t\t\t$Smarty->assign(\"aCGroups\",CGroup::aAllGroup($sSearchSql,$sPostFix));\n\t\t}\n\n\t\t//assign frame attribute\n\t\t$Smarty->assign(\"NowOrder\",$sOrder);\t\t\n\t\t$Smarty->assign(\"NowSort\",$sSort);\n\t\t\n\t\t$Smarty->assign(\"OrderUrl\",$_SERVER['PHP_SELF'].\"?func=\".$_GET['func'].\"&action=\".$_GET['action'].\"&page=$iPg\");\n\t\t$Smarty->assign(\"OrderSort\",(strtoupper($sSort)==\"DESC\")?\"ASC\":\"DESC\");\n\n\t\t$Smarty->assign('searchKey',\t$session->get(\"s_group_key\") );\n\t\t$Smarty->assign('searchTerm',\t$session->get(\"s_group_terms\") );\n \n\t\t$Smarty->assign(\"Total\",$iAllItems);\n\t\t$Smarty->assign(\"PageItem\",$iPageItems);\n\t\t\n\t\t$Smarty->assign(\"StartRow\",$iStart+1);\n\t\t$Smarty->assign(\"EndRow\",$iStart+$iPageItems);\n\n\t\t$Smarty->assign(\"iPg\",$iPg);\n\t\t$Smarty->assign('PageBar',\tCMisc::sMakePageBar($iAllItems, $iPageItems, $iPg, \"func=\".$_GET['func'].\"&action=\".$_GET['action'].\"&order=$sOrder&sort=$sSort\"));\n\n\t\treturn $output = $Smarty->fetch('./admin/'.get_class($this).'/group_list.html');\n\t}", "title": "" }, { "docid": "69afeb6a7d081b0d4966b421ccad5921", "score": "0.48528618", "text": "function outbox_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? @$_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? @$_POST['start'] : @$_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? @$_POST['limit'] : @$_GET['limit']);\r\n\t\t$result=$this->m_outbox->outbox_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "title": "" }, { "docid": "eb53cd5de4aeff5efa91bf02c94c31bf", "score": "0.48504522", "text": "function xiliml_new_list() {\n\tif ( class_exists('xili_language') ) {\n\t\tglobal $xili_language;\n\n\t\tif ( is_active_widget ( false, false, 'xili_language_widgets' ) ) {\n\n\t\t\t$xili_widgets = get_option('widget_xili_language_widgets', array());\n\t\t\tforeach ( $xili_widgets as $key => $arrprop ) {\n\t\t\t\tif ( $key != '_multiwidget' ) {\n\t\t\t\t\tif ( $arrprop['theoption'] == 'typeonenew' ) {\t// widget with option for singular\n\t\t\t\t\t\tif ( is_active_widget( false, 'xili_language_widgets-'.$key, 'xili_language_widgets' ) ) return false ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( XILILANGUAGE_VER > '2.0.0' && isset($xili_language -> xili_settings['navmenu_check_options']['primary']) && in_array ('navmenu-1', $xili_language -> xili_settings['navmenu_check_options']['primary']) ) return false ;\n\n\t}\n\treturn true ;\n\n}", "title": "" }, { "docid": "f639ce05968fcd791e8e136b1fd1dade", "score": "0.48494154", "text": "function show_image_select_box ($con,$intIdBox,$intID,$strInputName){\n\t \n\t echo '\n <div style=\"position:relative;\">\n\t <span class=\"label label-04\">Image name</span>\n ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT id,description,file_name FROM photo WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t $intID=$write_sub['id'];\n\t $intName=''.$write_sub['description'].' <a onclick=\"return !window.open(this.href);\" href=\"http://'.$_SERVER[\"SERVER_NAME\"].'/'.PhotoFolder.'/'.$write_sub[\"file_name\"].'\" class=\"lightwindow page-options ico-show\" rel=\"Picture\">'.$write_sub['file_name'].'</a>';\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n echo '<span id=\"image_name'.$intIdBox.'\">'.$intName.'</span>';\n echo'&nbsp;<a href=\"javascript:cancel_image('.$intIdBox.')\" title=\"Cancel\"><img src=\"../inc/design/ico-delete.gif\" class=\"ico\" alt=\"Cancel\"></a>&nbsp;|&nbsp;';\n echo'<a class=\"ico-list\" href=\"javascript:show_image_window('.$intIdBox.')\" title=\"Set picture\">search picture</a>';\n echo'<div id=\"image_livesearch_window'.$intIdBox.'\" class=\"livesearch_image_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type name of image</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_image_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter_box\" id=\"filter_image'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_image_livesearch_data(this.value,'.$intIdBox.')\" />\n <div id=\"image_livesearch'.$intIdBox.'\" class=\"livesearch_image\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"image_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" /><br />';\n }", "title": "" }, { "docid": "9e1a4a3cc3ee44afc9221cc7f24447f6", "score": "0.48425445", "text": "function callback($matches) {\r\n\t\tglobal $wpdb, $wp_version;\r\n\r\n\t\tif ($wp_version >= 3.3) $t = 4;\r\n\t\telse $t = 5;\r\n\r\n\t\tif ($matches[1] && !empty($matches[1])) $postID = $matches[1];\r\n\r\n\t\tif (empty($postID)) $postID = get_option(\"page_on_front\");\r\n\r\n\t\t$menu_label = $title_attribute = \"\";\r\n\t\t// now identifier is the post ID\r\n\t\t@$pgmenueditor = get_post_meta($postID, 'dsa_pagemenueditor');\r\n\t\tif (count($pgmenueditor[0])) :\r\n\t\t\t$title_attribute = stripslashes($pgmenueditor[0]['title_attribute']);\r\n\t\t\t$menu_label = stripslashes($pgmenueditor[0]['menu_label']);\r\n\t\tendif;\r\n\r\n\t\tif (preg_match('@^<([^>]+)>([^<]+)<([^>]+)>$@is', $matches[$t], $anchort)) :\r\n\t\t\t$link_before = \"<\".$anchort[1].\">\";\r\n\t\t\t$link_after = \"<\".$anchort[3].\">\";\r\n\t\t\t$anchortxt = $anchort[2];\r\n\t\telse :\r\n\t\t\t$anchortxt = $matches[$t];\r\n\t\t\t$link_before = $link_after = \"\";\r\n\t\tendif;\r\n\r\n\t\tif (empty($menu_label)) $menu_label = $anchortxt;\r\n\r\n\t\tif ($title_attribute == \"%%pagetitle%%\") $title_attribute = get_the_title($postID);\r\n\t\telseif ($title_attribute == \"%%menulabel%%\") $title_attribute = $menu_label;\r\n\r\n\t\tif (!empty($title_attribute)) :\r\n\t\t\t$filtered = '<li class=\"page_item page-item-'.$postID.$matches[2].'\"><a href=\"'.$matches[3].'\" title=\"'.$title_attribute.'\">'.$link_before.$menu_label.$link_after.'</a>';\r\n\t\telse :\r\n\t\t\t$filtered = '<li class=\"page_item page-item-'.$postID.$matches[2].'\"><a href=\"'.$matches[3].'\">'.$link_before.$menu_label.$link_after.'</a>';\r\n\t\tendif;\r\n\r\n\t\treturn $filtered;\r\n\t}", "title": "" }, { "docid": "862a64d1d24cb7e5f3edcd0162aca07a", "score": "0.48315486", "text": "private function lists(){\n\t\t\t$constrain = '';\n\t\t\t$offset = $this->validateNumber(isset($_GET['offset'])?$_GET['offset']:NULL);\n\t\t\t$idAjusteEntrada = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\t$constrains = isset($_POST['constrains'])?$_POST['constrains']:'1 = 1';\n\t\t\t\n\t\t\tif($constrains === '1 = 1'){\n\t\t\t\t$constrain = $constrains;\n\t\t\t}else{\n\t\t\t\t$tam = count($constrains);\n\t\t\t\tforeach ($constrains as $campo => $valor) {\n\t\t\t\t\tif(--$tam){\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor.' AND ';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\" AND ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\"';\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\tif($offset!==''){ \n\t\t\t\tif ($idAjusteEntrada!=='') {\n\t\t\t\t\tif(($result = $this->model->listsDetails($idAjusteEntrada))){\n\t\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->session['action']='list';\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('ajusteEntradaForm.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(($result = $this->model->lists($offset,-1,$constrain))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('ajusteEntradaList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "559aa7a1f7490ef3fde48170454b8e44", "score": "0.4824424", "text": "function affModFormList($id){\n $view=new ListView();\n $view::affModFormList($id);\n }", "title": "" }, { "docid": "20ae99fce8c1c01826de4b886f70a6b2", "score": "0.4822224", "text": "function db_selectbox($tablename, $namefield, $valuefield, $selectname, $selectedvalue, $boxsize, $boxwidth) {\n\tglobal $link;\n\t$sql_query=\"select \" . $namefield . \", \" . $valuefield . \" from \" . $tablename .\" order by \". $namefield ;\n\t$result = query_db($sql_query);\n\techo \"\\n\".'<select name=\"'. $selectname.'\"';\n\tif($boxsize != \"none\")\n\t\techo ' size=\"'.$boxsize.'\"';\n\techo \" style=\\\"width:$boxwidth;\\\" class=select>\\n\";\n\twhile($row = mysqli_fetch_array($result)) {\n\t\t$SELECTED=\"\";\n\t\tif ($row[$valuefield] == $selectedvalue) {\n\t\t\t$SELECTED=\"selected \";\n\t\t}\n\t\techo '<option '.$SELECTED.'value=\"'.$row[$valuefield].'\">'.$row[$namefield].\"\\n\";\n\t}\n\techo \"</select>\\n\";\n}", "title": "" }, { "docid": "0c24a0545b0be3da861e78ba6364159d", "score": "0.48180643", "text": "function render_video_box($row,$zone='_SEARCH')\n{\n\trequire_css('galleries');\n\n\trequire_code('images');\n\t$url=build_url(array('page'=>'galleries','type'=>'video','id'=>$row['id']),$zone);\n\t$thumb_url=ensure_thumbnail($row['url'],$row['thumb_url'],'galleries','videos',$row['id']);\n\t$description=get_translated_tempcode($row['comments']);\n\t$thumb=do_image_thumb($thumb_url,$description,true);\n\t$tree=gallery_breadcrumbs($row['cat'],'root',false,$zone);\n\n\t$video_url=$row['url'];\n\tif (url_is_local($video_url)) $video_url=get_custom_base_url().'/'.$video_url;\n\n\t$title=$GLOBALS['SITE_DB']->query_value_null_ok('galleries','fullname',array('name'=>$row['cat']));\n\tif (is_null($title))\n\t{\n\t\t$gallery_title=do_lang('UNKNOWN');\n\t} else\n\t{\n\t\t$gallery_title=get_translated_text($title);\n\t}\n\n\treturn do_template('GALLERY_VIDEO_BOX',array('ADD_DATE_RAW'=>strval($row['add_date']),'ID'=>strval($row['id']),'TITLE'=>get_translated_text($row['title']),'NOTES'=>$row['notes'],'GALLERY_TITLE'=>$gallery_title,'CAT'=>$row['cat'],'VIEWS'=>strval($row['video_views']),'TREE'=>$tree,'URL'=>$url,'VIDEO_URL'=>$video_url,'DESCRIPTION'=>$description,'THUMB'=>$thumb,'THUMB_URL'=>$thumb_url,'VIDEO_WIDTH'=>strval($row['video_width']),'VIDEO_HEIGHT'=>strval($row['video_height']),'VIDEO_LENGTH'=>strval($row['video_length'])));\n}", "title": "" }, { "docid": "0fbac6d238a58de3b95a860a91f92c33", "score": "0.48116648", "text": "function listar_owners() {\r\n $result = $this->M_tblowners->get_all_Owners();\r\n foreach ($result as $key => $value) {\r\n echo '<option id = \"optowners_' . $value[\"recn\"] . '\" data-traders=\"' . $value[\"name\"] . '\" value=\"' . $value[\"recn\"] . '\" >' . $value[\"name\"] . '</option>';\r\n }\r\n\r\n }", "title": "" }, { "docid": "b1d969a53d6e07b81d7ec6289a3e54b8", "score": "0.48035163", "text": "function showList(&$rows,$search,$pageNav,$option,$lists) {\r\n\t\tglobal $my,$acl,$database;\r\n\t\tmosCommonHTML::loadOverlib();\r\n\t\t$nullDate = $database->getNullDate();\r\n\r\n\t\t$mainframe = mosMainFrame::getInstance();\r\n\t\t$cur_file_icons_path = JPATH_SITE.'/'.JADMIN_BASE.'/templates/'.JTEMPLATE.'/images/ico';\r\n\t\t?>\r\n<script type=\"text/javascript\">\r\n\t// удаление содержимого с публикации на главной\r\n\tfunction ch_front(elID){\r\n\t\tid('img-trash-'+elID).src = 'images/aload.gif';\r\n\t\tdax({\r\n\t\t\turl: 'ajax.index.php?option=com_frontpage&task=rem_front&id='+elID,\r\n\t\t\tid:'trash-'+elID,\r\n\t\t\tcallback:\r\n\t\t\t\tfunction(resp, idTread, status, ops){\r\n\t\t\t\tlog('Получен ответ: ' + resp.responseText);\r\n\t\t\t\tif(resp.responseText=='1') {\r\n\t\t\t\t\tSRAX.remove('tr-el-'+elID);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tid('tr-el-'+elID).style.background='red';\r\n\t\t\t\t}\r\n\t\t\t}});\r\n\t}\r\n</script>\r\n<form action=\"index2.php\" method=\"post\" name=\"adminForm\">\r\n\t<table class=\"adminheading\">\r\n\t\t<tr>\r\n\t\t\t<th class=\"frontpage\" rowspan=\"2\"><?php echo _C_FRONTPAGE_CONTENT?></th>\r\n\t\t\t<td width=\"right\"><?php echo $lists['sectionid']; ?></td>\r\n\t\t\t<td width=\"right\"><?php echo $lists['catid']; ?></td>\r\n\t\t\t<td width=\"right\"><?php echo $lists['authorid']; ?></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td align=\"right\" colspan=\"2\"><?php echo _FILTER?>:</td>\r\n\t\t\t<td>\r\n\t\t\t\t<input type=\"text\" name=\"search\" value=\"<?php echo htmlspecialchars($search); ?>\" class=\"text_area\" onChange=\"document.adminForm.submit();\" />\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\t<table class=\"adminlist\">\r\n\t\t<tr>\r\n\t\t\t<th width=\"5\">#</th>\r\n\t\t\t<th width=\"20\">\r\n\t\t\t\t<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(<?php echo count($rows); ?>);\" />\r\n\t\t\t</th>\r\n\t\t\t<th class=\"title\"><?php echo _CAPTION?></th>\r\n\t\t\t<th align=\"center\"><?php echo _REMOVE_FROM_FRONT?></th>\r\n\t\t\t<th width=\"10%\" class=\"jtd_nowrap\"><?php echo _PUBLISHED?></th>\r\n\t\t\t<th colspan=\"2\" class=\"jtd_nowrap\" width=\"5%\"><?php echo _ORDERING?></th>\r\n\t\t\t<th width=\"2%\"><?php echo _ORDER_DROPDOWN?></th>\r\n\t\t\t<th width=\"1%\">\r\n\t\t\t\t<a href=\"javascript: saveorder( <?php echo count($rows) - 1; ?> )\"><img src=\"<?php echo $cur_file_icons_path;?>/filesave.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"<?php echo _SAVE_ORDER?>\" /></a>\r\n\t\t\t</th>\r\n\t\t\t<th width=\"8%\" class=\"jtd_nowrap\"><?php echo _ACCESS?></th>\r\n\t\t\t<th width=\"10%\" align=\"left\"><?php echo _SECTION?></th>\r\n\t\t\t<th width=\"10%\" align=\"left\"><?php echo _CATEGORY?></th>\r\n\t\t</tr>\r\n\t\t\t\t<?php\r\n\t\t\t\t$k = 0;\r\n\t\t\t\t$num = count($rows);\r\n\t\t\t\tfor($i = 0,$n = $num; $i < $n; $i++) {\r\n\t\t\t\t\t$row = &$rows[$i];\r\n\t\t\t\t\tmosMakeHtmlSafe($row);\r\n\t\t\t\t\t$link = 'index2.php?option=com_content&sectionid=0&task=edit&hidemainmenu=1&id='.$row->id;\r\n\t\t\t\t\t$row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='.$row->sectionid;\r\n\t\t\t\t\t$row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id='.$row->catid;\r\n\r\n\t\t\t\t\t$now = _CURRENT_SERVER_TIME;\r\n\t\t\t\t\tif($now <= $row->publish_up && $row->state == '1') {\r\n\t\t\t\t\t\t$img = 'publish_y.png';\r\n\t\t\t\t\t\t$alt = _PUBLISHED;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\tif(($now <= $row->publish_down || $row->publish_down == $nullDate) && $row->state =='1') {\r\n\t\t\t\t\t\t$img = 'publish_g.png';\r\n\t\t\t\t\t\t$alt = _PUBLISHED;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\tif($now > $row->publish_down && $row->state == '1') {\r\n\t\t\t\t\t\t$img = 'publish_r.png';\r\n\t\t\t\t\t\t$alt = _PUBLISH_TIME_END;\r\n\t\t\t\t\t} elseif($row->state == \"0\") {\r\n\t\t\t\t\t\t$img = \"publish_x.png\";\r\n\t\t\t\t\t\t$alt = _UNPUBLISHED;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$times = '';\r\n\t\t\t\t\tif(isset($row->publish_up)) {\r\n\t\t\t\t\t\tif($row->publish_up == $nullDate) {\r\n\t\t\t\t\t\t\t$times .= '<tr><td>'._START.': '._ALWAYS.'</td></tr>';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$times .= '<tr><td>'._START.': '.$row->publish_up.'</td></tr>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(isset($row->publish_down)) {\r\n\t\t\t\t\t\tif($row->publish_down == $nullDate) {\r\n\t\t\t\t\t\t\t$times .= '<tr><td>'._END.': '._WITHOUT_END.'</td></tr>';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$times .= '<tr><td>'._END.': '.$row->publish_down.'</td></tr>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$access = mosCommonHTML::AccessProcessing($row,$i,1);\r\n\t\t\t\t\t$checked = mosCommonHTML::CheckedOutProcessing($row,$i);\r\n\r\n\t\t\t\t\tif($acl->acl_check('administration','manage','users',$my->usertype,'components','com_users')) {\r\n\t\t\t\t\t\tif($row->created_by_alias) {\r\n\t\t\t\t\t\t\t$author = $row->created_by_alias;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='.$row->created_by;\r\n\t\t\t\t\t\t\t$author = '<a href=\"'.$linkA.'\" title=\"'._CHANGE_USER_DATA.'\">'.$row->author.'</a>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif($row->created_by_alias) {\r\n\t\t\t\t\t\t\t$author = $row->created_by_alias;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$author = $row->author;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t<tr class=\"row<?php echo $k; ?>\" id=\"tr-el-<?php echo $row->id;?>\">\r\n\t\t\t<td><?php echo $pageNav->rowNumber($i); ?></td>\r\n\t\t\t<td><?php echo $checked; ?></td>\r\n\t\t\t<td align=\"left\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tif($row->checked_out && ($row->checked_out != $my->id)) {\r\n\t\t\t\t\t\t\t\techo $row->title;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t<a href=\"<?php echo $link; ?>\" class=\"abig\" title=\"<?php echo _CHANGE_CONTENT?>\"><?php echo $row->title; ?></a>\r\n\t\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\techo '<br />'.$row->created.' : '.$author;\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t</td>\r\n\t\t\t<td align=\"center\" <?php echo $row->checked_out ? null : 'onclick=\"ch_front('.$row->id.');\" class=\"td-state\"';?>>\r\n\t\t\t\t<img class=\"img-mini-state\" src=\"<?php echo $cur_file_icons_path;?>/trash_mini.png\" id=\"img-trash-<?php echo $row->id;?>\"/>\r\n\t\t\t</td>\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tif($times) {\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t<td align=\"center\" <?php echo ($row->checked_out && ($row->checked_out != $my->id)) ? null : 'onclick=\"ch_publ('.$row->id.',\\'com_frontpage\\');\" class=\"td-state\"';?>>\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\tif ( !$row->checked_out ) {\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t<img class=\"img-mini-state\" src=\"<?php echo $cur_file_icons_path;?>/<?php echo $img;?>\" id=\"img-pub-<?php echo $row->id;?>\" alt=\"<?php echo _PUBLISHING?>\" />\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t<img class=\"img-mini-state\" src=\"<?php echo $cur_file_icons_path;?>/<?php echo $img;?>\" id=\"img-pub-<?php echo $row->id;?>\" alt=\"<?php echo _CANNOT_CHANGE_PUBLISH_STATE?>\"/>\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t</td>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t?>\r\n\t\t\t<td align=\"center\"><?php echo $pageNav->orderUpIcon($i); ?></td>\r\n\t\t\t<td align=\"center\"><?php echo $pageNav->orderDownIcon($i,$n); ?></td>\r\n\t\t\t<td align=\"center\" colspan=\"2\">\r\n\t\t\t\t<input type=\"text\" name=\"order[]\" size=\"5\" value=\"<?php echo $row->fpordering; ?>\" class=\"text_area\" style=\"text-align: center\" />\r\n\t\t\t</td>\r\n\t\t\t<td align=\"center\" id=\"acc-id-<?php echo $row->id;?>\"><?php echo $access; ?></td>\r\n\t\t\t<td><a href=\"<?php echo $row->sect_link; ?>\" title=\"<?php echo _CHANGE_SECTION?>\"><?php echo $row->sect_name; ?></a></td>\r\n\t\t\t<td><a href=\"<?php echo $row->cat_link; ?>\" title=\"<?php echo _CHANGE_CATEGORY?>\"><?php echo $row->name; ?></a></td>\r\n\t\t</tr>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$k = 1 - $k;\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\t</table>\r\n\r\n\t\t\t<?php\r\n\t\t\techo $pageNav->getListFooter();\r\n\t\t\tmosCommonHTML::ContentLegend();\r\n\t\t\t?>\r\n\r\n\t<input type=\"hidden\" name=\"option\" value=\"<?php echo $option; ?>\" />\r\n\t<input type=\"hidden\" name=\"task\" value=\"\" />\r\n\t<input type=\"hidden\" name=\"boxchecked\" value=\"0\" />\r\n\t<input type=\"hidden\" name=\"<?php echo josSpoofValue(); ?>\" value=\"1\" />\r\n</form>\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "82e3d15992542dea2eb407ac769eeab3", "score": "0.47948068", "text": "function displayMatches() {\n\n $matches = createMatches();\n foreach ($matches as $match) {\n printMatches(array_values($match));\n }\n}", "title": "" }, { "docid": "8f0a2eb27b67d4449a0b87fc45263fc6", "score": "0.47894377", "text": "function getFacelikeList($pageno,$objForm,$notOld = true,$field=\"\",$orders='ASC'){\n\t$objResponse \t= new xajaxResponse();\n\t$objAdminFacelike \t= &$GLOBALS['objAdminFacelike'];\n\t$req['list']\t= $objAdminFacelike -> getFacelikeList($pageno,$objForm['searchparam'],$notOld,$field,$orders);\n\t$req['nofull'] = true ;\n\t$objAdminFacelike -> smarty -> assign('req',\t$req);\n\t$content = $objAdminFacelike -> smarty -> fetch('admin_facelike.tpl');\n\t$objResponse -> assign(\"tabledatalist\",'innerHTML',$content);\n\t$objResponse -> assign(\"pageno\",'value',$pageno);\n\treturn $objResponse;\n}", "title": "" }, { "docid": "9569453078cc60ac9fc578471e2093ae", "score": "0.4780786", "text": "public function searchForm($list) {\n\t\t$selectedPageIDs = array_filter($this->request('atPageID'));\n\t\t$db = Loader::db();\n\n\t\tif (is_array($selectedPageIDs) && !empty($selectedPageIDs)) { \n\t\t\t$list->filter(false, '(EXISTS (\n SELECT 1 FROM akRemoPagelistAttributeSelectedPages rpasp \n INNER JOIN CollectionAttributeValues cav ON cav.avID=rpasp.avID\n WHERE rpasp.cID IN (' . join(',', $selectedPageIDs) . ') \n AND cav.cID=cv.cID\n AND cav.cvID=cv.cvID \n ))');\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "8749c7e0089fe6f92b85b666184f9b4a", "score": "0.47747463", "text": "public function menuTermOptionList();", "title": "" }, { "docid": "cc588d720b0f759835ddb0614724b1f6", "score": "0.47746345", "text": "function listar_veterinarians() {\r\n $result = $this->M_tblveterinarians->get_all_Veterinarians();\r\n foreach ($result as $key => $value) {\r\n echo '<option id = \"optveterinarians_' . $value[\"recn\"] . '\" data-traders=\"' . $value[\"name\"] . '\" value=\"' . $value[\"recn\"] . '\" >' . $value[\"name\"] . '</option>';\r\n }\r\n\r\n }", "title": "" }, { "docid": "9e136d307d7001a7e9d84a82bf7ab277", "score": "0.4760928", "text": "public function loadListMatch()\n {\n $listMatch = MatchManagerMYSQL::loadListAllMatch();\n \n if(is_array($listMatch) === true && empty($listMatch) === false) {\n foreach($listMatch as $match) {\n $Match = new \\Match\\Match($match);\n $this->listMatch[$Match->getId()] = $Match;\n }\n unset($match, $Match);\n }\n\n return $this;\n }", "title": "" }, { "docid": "ff39c9711b8a949c6bc6901ce6184a60", "score": "0.47606507", "text": "function show_arena_select_box ($con,$intIdBox,$intID,$strInputName){\n\t \n\t echo '\n <div style=\"position:relative;\">\n\t <span class=\"label label-04\">Arena name</span>\n ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT * FROM arenas WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t $intID=$write_sub['id'];\n\t $intName=''.$write_sub['name'].'';\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n echo '<span id=\"arena_name'.$intIdBox.'\">'.$intName.'</span>';\n echo'&nbsp;<a href=\"javascript:cancel_arena('.$intIdBox.')\" title=\"Cancel\"><img src=\"../inc/design/ico-delete.gif\" class=\"ico\" alt=\"Cancel\"></a>&nbsp;|&nbsp;';\n echo'<a class=\"ico-list\" href=\"javascript:show_arena_window('.$intIdBox.')\" title=\"Set arena\">search arena</a>';\n echo'<div id=\"arena_livesearch_window'.$intIdBox.'\" class=\"livesearch_arena_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type name of arena</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_arena_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter_box\" id=\"filter_arena'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_arena_livesearch_data(this.value,'.$intIdBox.')\" />\n <div id=\"arena_livesearch'.$intIdBox.'\" class=\"livesearch_arena\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"arena_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" /><br />';\n }", "title": "" }, { "docid": "ae8e5d36b5f34f2bf860d308d670b90d", "score": "0.47606128", "text": "abstract protected function getGroupList();", "title": "" }, { "docid": "649c3fe6537e7cb54df3d01c2e8b8b9a", "score": "0.4758116", "text": "private function showList()\n {\n try\n {\n $res = Main::$db->query('SELECT * FROM gallery');\n $list = $res->fetchAll(PDO::FETCH_ASSOC);\n }\n catch(PDOException $e)\n {\n echo 'ShowList error '.$e->getMessage();\n }\n Main::$smarty->assign('list', $list);\n Main::$smarty->assign('context', 'admin/admin-lista-galerii.html');\n }", "title": "" }, { "docid": "c969d8a41d40bfd1d873dbae277dd280", "score": "0.47528487", "text": "function combobox( $key, $field) {\n global $time_names;\n echo \"<select name='\".$key.\"'>\";\n foreach ($time_names[$key] as $i => $name) {\n\t$sel = (strval($field) == strval($i)) ? \"selected\" : \"\";\n\techo \"<option value='\".$i.\"' \".$sel.\">\".$name.\"</option>\";\n }\n echo \"</select>\";\n}", "title": "" }, { "docid": "0d1da0ecf251fbf680c478aab323b729", "score": "0.47428355", "text": "function CVGVideo_Gallery($matches){\r\r\n\t\t\t\r\r\n\t\t\tglobal $post, $wpdb;\r\r\n\t\t\t$output = '';\r\r\n\t\t\t$thumbexists = false;\r\r\n\t\t\t$setathumb = false;\r\r\n\t\t\t\r\r\n\t\t\tpreg_match_all('/([\\.\\w]*)=(.*?) /i', $matches[1], $attributes);\r\r\n\t\t\t$arguments = array();\r\r\n\t\r\r\n\t\t\t$arguments = CoolVideoGallery::splitargs($matches[1]);\r\r\n\t\t\t$gallery_id = $arguments['galleryId'];\r\r\n\r\r\n\t\t\t$output = CvgCore::videoShowGallery($gallery_id);\r\r\n\t\t\t\r\r\n\t\t\treturn $output;\r\r\n\t\t}", "title": "" }, { "docid": "fac547764b24bd563a15365b6ccb58d8", "score": "0.47427285", "text": "function loadMatchboxes() {\n\t\t$sMachboxes = @file_get_contents('./' . $this->sMatchboxesFileName);\n\t\tif (!$sMachboxes) {\n\t\t\t$this->generateMachboxes();\n\t\t}\n\t\telse {\n\t\t\teval(\"\\$this->aMachboxes = $sMachboxes;\");\n\t\t}\n\t}", "title": "" }, { "docid": "56614ff0f11f5b5a53ca9e4cfbeeada2", "score": "0.47412387", "text": "function show_image_folder_select_box ($con,$intIdBox,$intID,$strInputName){\n\t \n\t echo '\n <div style=\"position:relative;\">\n\t <span class=\"label label-04\">Image folder name</span>\n ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT id,name,(SELECT count(*) from photo WHERE photo.id_photo_folder=photo_folder.id) as pocet FROM photo_folder WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t $intID=$write_sub['id'];\n\t $intName=''.$write_sub['name'].' <a onclick=\"return !window.open(this.href);\" href=\"../mod_photogallery/photogallery.php'.Odkaz.'&amp;filter2='.$write_sub[\"id\"].'\">'.$write_sub['name'].' ('.$write_sub['pocet'].')</a>';\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n echo '<span id=\"image_folder_name'.$intIdBox.'\">'.$intName.'</span>';\n echo'&nbsp;<a href=\"javascript:cancel_image_folder('.$intIdBox.')\" title=\"Cancel\"><img src=\"../inc/design/ico-delete.gif\" class=\"ico\" alt=\"Cancel\"></a>&nbsp;|&nbsp;';\n echo'<a class=\"ico-list\" href=\"javascript:show_image_folder_window('.$intIdBox.')\" title=\"Set picture folder\">search folder</a>';\n echo'<div id=\"image_folder_livesearch_window'.$intIdBox.'\" class=\"livesearch_image_folder_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type name of folder</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_image_folder_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter_box\" id=\"filter_image_folder'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_image_folder_livesearch_data(this.value,'.$intIdBox.')\" />\n <div id=\"image_folder_livesearch'.$intIdBox.'\" class=\"livesearch_image\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"image_folder_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" /><br />';\n }", "title": "" }, { "docid": "60db52345d4fd54325335504dc9db2ec", "score": "0.47371507", "text": "function DisplayListado() {\n global $ses_usr_id;\n global $select_estado, $select_local, $select_tipo, $chec_ot_os, $bus_os, $accion, $filtro, $orden;\n\n $MiTemplate = new Template();\n // asignamos degug maximo\n $MiTemplate->debug = 0;\n // root directory de los templates\n $MiTemplate->set_root(DIRTEMPLATES);\n // variables perdidas\n $MiTemplate->set_unknowns(\"remove\");\n\n $MiTemplate->set_var(\"PAGETITLE\",NOMBRE_SITIO . ' - ' . NOMBRE_PAGINA);\n $MiTemplate->set_var(\"TEXT_TITULO\",TEXT_TITULO);\n $MiTemplate->set_var(\"SUBTITULO1\",TEXT_2);\n $MiTemplate->set_var(\"USR_NOMBRE\",get_nombre_usr( $ses_usr_id ));\n\n $MiTemplate->set_var(\"select_estado\",$select_estado);\n $MiTemplate->set_var(\"select_local\",$select_local);\n $MiTemplate->set_var(\"select_tipo\",$select_tipo);\n $MiTemplate->set_var(\"bus_os\",$bus_os);\n $MiTemplate->set_var(\"chec_ot_os\",$chec_ot_os);\n\t\n \n $MiTemplate->set_var(\"BOTON_VER\",BOTON_VER);\n $MiTemplate->set_var(\"TEXT_BOTON\",TEXT_BOTON);\n $MiTemplate->set_var(\"TEXT_SELECT\",TEXT_SELECT);\n \n // Agregamos el header\n $MiTemplate->set_file(\"header\",\"header_ident.html\");\n\n // Agregamos el main\n $MiTemplate->set_file(\"main\",\"picking_tienda/listado.html\");\n\n \n\t//Recuperamos los estados\n $MiTemplate->set_block(\"main\", \"Despacho\", \"BLO_Desp\");\n $query_D = \"SELECT id_tipodespacho, nombre, if('$select_tipo'=id_tipodespacho, 'selected', '') 'selected' FROM tipos_despacho\";\n query_to_set_var( $query_D, $MiTemplate, 1, 'BLO_Desp', 'Despacho' ); \n \n\t//Estado Creada por default\n\tif ($select_estado == \"\")\n\t\t$select_estado = 'PC';\n\n\t//Recuperamos los estados\n $MiTemplate->set_block(\"main\", \"Estados\", \"BLO_esta\");\n $query_E = \"select id_estado, esta_nombre as estado, if('$select_estado'=id_estado, 'selected', '') 'selected' from estados where esta_tipo = 'TP' order by esta_nombre\";\n query_to_set_var( $query_E, $MiTemplate, 1, 'BLO_esta', 'Estados' ); \n \n\t//Recuperamos el permiso por local\n\tif ( $mylocal = get_local_usr( $ses_usr_id ))\n\t\t$where_aux_local = \" AND os.id_local = $mylocal \";\n\telse\n\t $MiTemplate->set_var(\"ALL\",\"<option value=''>TODAS</option>\"); \n\n\t//Recuperamos los Locales\n $MiTemplate->set_block(\"main\", \"Locales\", \"BLO_Loc\");\n\t$queryL=\"SELECT os.id_local as id_local, os.nom_local as nom_local, if('$select_local'=os.id_local, 'selected', '') 'selected' \n\t\t\tFROM locales os WHERE 1 \n\t\t\t$where_aux_local\n\t\t\tORDER BY nom_local\";\n\tquery_to_set_var( $queryL, $MiTemplate, 1, 'BLO_Loc', 'Locales' ); \n //echo $queryL;\n \n if ($chec_ot_os == 2){\n $MiTemplate->set_var(\"checked1\",'');\n $MiTemplate->set_var(\"checked2\",'checked');\n }\n else{\n $chec_ot_os = 1;\n $MiTemplate->set_var(\"checked1\",'checked');\n $MiTemplate->set_var(\"checked2\",'');\n }\n \n //Filtros\n $where_aux = \" and ot.id_estado = 'PC'\";\n if ($select_tipo)\n $where_aux = \" and td.id_tipodespacho = \".( $select_tipo + 0 );\n else if($select_local)\n $where_aux = \" and l.id_local = \".( $select_local + 0 );\n else if ($bus_os){\n if ($chec_ot_os == 1)\n $where_aux = \" and ot_id = \".( $bus_os + 0 );\n else if ($chec_ot_os == 2)\n $where_aux = \" and os.id_os = \".( $bus_os + 0 );\n }\n else if ($select_estado) \n $where_aux = \" and ot.id_estado = '\".$select_estado.\"'\";\n\t\n //Orden\n if ( $filtro == \"\" || $filtro == \"ot\" )\n $order_aux = \"order by ot_id $orden\"; \n else if( $filtro == \"os\" )\n $order_aux = \"order by os.id_os $orden\"; \n else if( $filtro == \"fc\" )\n $order_aux = \"order by os_fechacreacion $orden\"; \n \n if ( $orden == \"\" || $orden == \"asc\"){\n $MiTemplate->set_var(\"orden\",'desc');\n $MiTemplate->set_var(\"BOTON_ARROW\",BOTON_DOWN);\n }\n else if ( $orden == \"desc\" ){\n $MiTemplate->set_var(\"orden\",'asc');\n $MiTemplate->set_var(\"BOTON_ARROW\",BOTON_UP);\n }\n \n $MiTemplate->set_block(\"main\", \"listado\", \"PBLlistado\");\n \n $query=\"SELECT ot.ot_id, ot.id_estado, ot.id_os as id_os, ot_tipo,date_format(ot_fechacreacion, '%d/%m/%Y') ot_fechacreacion, os.id_local, esta_nombre, nom_local, td.nombre as nombre_despacho\n FROM ot JOIN os\ton os.id_os\t= ot.id_os\n\t\t\t\t\tJOIN estados e\ton e.id_estado\t= ot.id_estado\n\t\t\t\t\tJOIN locales l\ton l.id_local\t= os.id_local\n\t\t\t\t\tJOIN tipos_despacho td on td.id_tipodespacho = ot.id_tipodespacho\n \t\t\tWHERE ot_tipo = 'PS'\n\t\t\t$where_aux_local $where_aux $order_aux\";\n\n\t//echo $query;\n\n //query_to_set_var( $query, $MiTemplate, 1, 'PBLModulos', 'Modulos' ); \n if ( $rq = tep_db_query($query) ){\n while( $res = tep_db_fetch_array( $rq ) ) {\n $MiTemplate->set_var('id_os',tohtml( $res['id_os']));\n $MiTemplate->set_var('id_ot',tohtml( $res['ot_id']));\n $MiTemplate->set_var('despacho',tohtml( $res['nombre_despacho']));\n $MiTemplate->set_var('local',tohtml( $res['nom_local']));\n $MiTemplate->set_var('ot_fechacreacion',tohtml( $res['ot_fechacreacion']));\n $MiTemplate->set_var('desc_prod',tohtml( $res['osde_descripcion']));\n $MiTemplate->set_var('esta_nombre',tohtml( $res['esta_nombre']));\n \n $MiTemplate->parse(\"PBLlistado\", \"listado\", true); \n } \n }\n \n // Agregamos el footer\n\tinclude \"../../includes/footer_cproy.php\";\n\n $MiTemplate->pparse(\"OUT_H\", array(\"header\"), false);\n include \"../../menu/menu.php\";\n $MiTemplate->parse(\"OUT_M\", array(\"main\",\"footer\"), true);\n $MiTemplate->p(\"OUT_M\");\n}", "title": "" }, { "docid": "76800cdd341f58c7505f1f58339a6698", "score": "0.47369996", "text": "function listView2($content, $conf) {\n\t\t$this->conf = $conf; // Setting the TypoScript passed to this function in $this->conf\n\t\t$this->pi_setPiVarDefaults ();\n\t\t\n\t\t$this->pi_loadLL (); // Loading the LOCAL_LANG values\n\t\t\n\n\t\t//DEBUG\n\t\t//$fullTable = var_dump ( $tabs );\t\t\n\t\t$contentArray = $this->getListArray ();\n\t\t$temp = $this->getItemsWithImages ( $contentArray );\n\t\t\n\t\treturn '<ul class=\"ba\">' . $temp . '</ul>';\n\t\n\t}", "title": "" }, { "docid": "6b3b5396954bfe03b5709c5387aa540f", "score": "0.47189915", "text": "function buildSearchCtrlWinBlockArr($recId, $fName) \r\n\t{\r\n\t\t$srchCtrlWinBlock = array();\r\n\t\t// one control with options container attr\r\n\t\t//$filterDivMouseEvents = $this->getFilterDivEvents($recId, $fName);\r\n\t\t$filterRowId = $this->getFilterDivId($recId, $fName).'_win';\r\n\t\t$srchCtrlWinBlock['filterRow_attrs'] = 'id=\"'.$filterRowId.'\" ';//.$filterDivMouseEvents;\r\n\t\t// combo container\t\r\n\t\t$srchCtrlWinBlock['srchTypeCont_attrs_win'] = 'id=\"'.$this->getCtrlComboContId($recId, $fName).'_win\"';\r\n\t\t\r\n\t\treturn $srchCtrlWinBlock;\r\n\t}", "title": "" }, { "docid": "0970c890b472a0ed8ee6da67e3b4ae4a", "score": "0.47149694", "text": "function ShowLettersDetail($group, $type, $arr)\n {\n //echo '<br>$group='.$group.' $type='.$type.'$arr='.$arr;\n if( empty($type)){\n $type = $this->GetTypeOfLetter($this->item_letter);\n }\n switch($group){\n case '1':\n if ($type==1) $title = $this->Msg->Show_text('TXT_FRONT_BOX_INBOX').' '.$this->Msg->Show_text('TXT_BOX_LETTER_TITLE');\n else $title = $this->Msg->Show_text('TXT_FRONT_BOX_OUTBOX').' '.$this->Msg->Show_text('TXT_BOX_LETTER_TITLE');\n break;\n case '2':\n if ($type==1) $title = $this->Msg->Show_text('TXT_FRONT_BOX_INBOX').' '.$this->Msg->Show_text('TXT_BOX_KISSES_TITLE');\n else $title2 = $title = $this->Msg->Show_text('TXT_FRONT_BOX_OUTBOX').' '.$this->Msg->Show_text('TXT_BOX_KISSES_TITLE');\n break;\n case '3':\n $title = $this->Msg->Show_text('TXT_BOX_PHOTO_TITLE');\n if ($type==1) $title = $this->Msg->Show_text('TXT_FRONT_BOX_INBOX').' '.$this->Msg->Show_text('TXT_BOX_PHOTO_TITLE');\n else $title = $this->Msg->Show_text('TXT_FRONT_BOX_OUTBOX').' '.$this->Msg->Show_text('TXT_BOX_PHOTO_TITLE');\n break;\n default:\n $title = $this->Msg->Show_text('TXT_FRONT_BOX_TITLE');\n\n }\n ?>\n <h3><?=$title;?></h3>\n\n <div id=\"box_border\">\n <?\n if ( !is_array($arr) OR count($arr)==0){\n $this->ShowTextMessages($this->Msg->Show_text('MSG_FRONT_BOX_NO_LETTERS'));\n return true;\n }\n foreach($arr as $key=>$value){\n ?>\n <div id=\"box_detail\">\n <?\n if (empty($value['from'])){\n $this->ShowTextMessages($this->Msg->Show_text('MSG_FRONT_BOX_ADMIN_LETTER'));\n ?>\n <br/><?=$value['date'];?>\n <?\n }\n else{\n ?>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr>\n <td clospan=\"2\"><strong>\n <?\n if ($type==1) echo $this->Msg->Show_text('TXT_FRONT_BOX_FROM');\n else echo $this->Msg->Show_text('TXT_FRONT_BOX_TO');\n ?>:\n </strong>\n </td>\n </tr>\n <tr>\n <?\n $href = $this->UserValidSeeProfile($value['from']);\n //$href = $this->UserValidSendLetterKissPhoto( $value['from'], $group );\n\n $user_arr = $this->CotvertDataToOutputArray($this->GetUserData($value['from']),'id', 'asc', 'short');\n //print_r($user_arr);\n $user_arr[$value['from']]['img']['path'] = $this->GetMainImage($value['from'], 'front');\n if( !empty($user_arr[$value['from']]['img']['path'])) {\n ?><td valign=\"top\" align=\"center\" ><table><tr><td class=\"img_others\"><a href=\"<?=$href?>\" title=\"\"><?$this->ShowImage($user_arr[$value['from']]['img']['path'], $value['from'], 'size_auto=100', '85', NULL, 'border=\"0\" class=\"img1\"');?></a></td></tr></table></td><?\n }\n else {?><td valign=\"top\" align=\"center\" ><table><tr><td class=\"img_others\"><img src=\"images/design/no_photo.jpg\" border=\"0\" alt=\"<?=$user_arr[$value['from']]['nickname'];?>\" title=\"<?=$user_arr[$value['from']]['nickname'];?>\"/></td></tr></table></td><?}\n ?>\n <td>\n <?\n if( isset($user_arr[$value['from']]['nickname']) AND !empty($user_arr[$value['from']]['nickname']) ){\n ?>\n <a href=\"<?=$href;?>\" class=\"title\"><?=$user_arr[$value['from']]['nickname'];?></a>\n <br/><?=$this->Msg->show_text('FLD_COUNTRY').': <b>'.$user_arr[$value['from']]['country'];?></b>\n <?if ( !empty($value['city'])) {\n ?><br><?=$this->Msg->show_text('FLD_CITY').': <b>'.$user_arr[$value['from']]['city'].'</b>';\n }\n ?>\n <br/><?=$this->Msg->show_text('TXT_AGE').': <b>'.$user_arr[$value['from']]['age'];?></b>\n <br/><?=$this->Msg->show_text('FLD_STATUS').': <b>'.$user_arr[$value['from']]['status'];?></b>\n <br/>\n <br/><?=$value['date'];?>\n <?\n }\n else echo $this->Msg->show_text('TXT_UNKNOWN_MEMBER');\n ?>\n </td>\n </tr>\n </table>\n <?}?>\n <div class=\"c03\">\n <table>\n <?\n if ($group==3){\n ?>\n <tr>\n <td><?=$this->ShowImageBox($value['img'], $this->id, 'size_auto=600', '75', NULL, 'border=\"0\"');?></td>\n </tr>\n <?\n }\n ?>\n <tr>\n <td><?=$value['text']?></td>\n </tr>\n </table>\n </div>\n </div>\n <?\n }// end foreach\n ?></div>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"10\">\n <tr>\n <?/*\n <td><?=$this->Form->ShowButton($this->Msg->show_text('BTN_BOX_REPLY'), \"send.php?task=show_send_letter_form&amp;profile=\".$value['from'], 'width=\"100\"', NULL);?></td>\n <td><?=$this->Form->ShowButton($this->Msg->show_text('TXT_FRONT_SEND_KISS'), \"send.php?task=send_kiss_to&amp;profile=\".$value['from'], 'width=\"200\"', NULL);?></td>\n <td width=\"50%\"></td>\n */?>\n <td align=\"right\"><a href=\"<?=$this->script?>&amp;task=set_deleted_box_letter&amp;item_letter=<?$value['id'];?>\"><?=$this->Msg->show_text('BTN_BOX_DELETE_LETTER');?></a></td>\n </tr>\n </table>\n </div>\n <?\n }", "title": "" }, { "docid": "82e6bac256873e25a03638c0274733d8", "score": "0.47103462", "text": "function getList( &$pListHash ) {\n\t\tLibertyContent::prepGetList( $pListHash );\n\t\t\n\t\t$whereSql = $joinSql = $selectSql = '';\n\t\t$bindVars = array();\n\t\tarray_push( $bindVars, $this->mContentTypeGuid );\n\t\t$this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );\n\n/*\t\tif ( isset($pListHash['find']) ) {\n\t\t\t$findesc = '%' . strtoupper( $pListHash['find'] ) . '%';\n\t\t\t$whereSql .= \" AND (UPPER(con.`SURNAME`) like ? or UPPER(con.`FORENAME`) like ?) \";\n\t\t\tarray_push( $bindVars, $findesc );\n\t\t}\n*/\n\t\tif ( isset($pListHash['add_sql']) ) {\n\t\t\t$whereSql .= \" AND $add_sql \";\n\t\t}\n\n\t\t$query = \"SELECT pp.*, lc.*, \n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\n\t\t\t\tuuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name $selectSql\n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"paypal` pp \n\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = pp.`content_id` )\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uue ON (uue.`user_id` = lc.`modifier_user_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uuc ON (uuc.`user_id` = lc.`user_id`)\n\t\t\t\t$joinSql\n\t\t\t\tWHERE lc.`content_type_guid`=? $whereSql \n\t\t\t\torder by \".$this->mDb->convertSortmode( $pListHash['sort_mode'] );\n\t\t$query_cant = \"SELECT COUNT(lc.`content_id`) FROM `\".BIT_DB_PREFIX.\"paypal` pp\n\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = pp.`content_id` )\n\t\t\t\t$joinSql\n\t\t\t\tWHERE lc.`content_type_guid`=? $whereSql\";\n\n\t\t$ret = array();\n\t\t$this->mDb->StartTrans();\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\t\t$cant = $this->mDb->getOne( $query_cant, $bindVars );\n\t\t$this->mDb->CompleteTrans();\n\n\t\twhile ($res = $result->fetchRow()) {\n\t\t\t$res['paypal_url'] = $this->getDisplayUrl( $res['content_id'] );\n\t\t\t$ret[] = $res;\n\t\t}\n\n\t\t$pListHash['cant'] = $cant;\n\t\tLibertyContent::postGetList( $pListHash );\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "14b44d95ee603f647c03e0c0340c8377", "score": "0.47090846", "text": "function listView($content)\t{\n\t\t$this->pi_setPiVarDefaults();\n\t\t\n\t\t$lConf = $this->conf['listView.'];\t// Local settings for the listView function\n\t\n\t\tif ($this->piVars['showUid'])\t\n\t\t\t{\t// If a single element should be displayed:\n\t\t\t$this->internal['currentTable'] = 'tx_mmreflist_projects';\n\t\t\t$this->internal['currentRow'] = $this->pi_getRecord('tx_mmreflist_projects',$this->piVars['showUid']);\n\t\n\t\t\t$content = $this->singleView($content);\n\t\t\treturn $content;\n\t\t\t} \n\t\t\t\n\t\t$items=array(\n\t\t\t'1'=> $this->pi_getLL('list_mode_1','Mode 1'),\n\t\t\t'2'=> $this->pi_getLL('list_mode_2','Mode 2'),\n\t\t\t'3'=> $this->pi_getLL('list_mode_3','Mode 3'),\n\t\t\t);\n\t\t\t\n\t\tif (!isset($this->piVars['pointer']))\t$this->piVars['pointer']=0;\n\t\tif (!isset($this->piVars['mode']))\t$this->piVars['mode']=1;\n\n\t\t\t// Initializing the query parameters:\n\t\tlist($this->internal['orderBy'],$this->internal['descFlag']) = explode(':',$this->piVars['sort']);\n\t\t$this->internal['results_at_a_time']=t3lib_div::intInRange($lConf['results_at_a_time'],0,1000,3);\t\t// Number of results to show in a listing.\n\t\t$this->internal['maxPages']=t3lib_div::intInRange($lConf['maxPages'],0,1000,2);;\t\t// The maximum number of \"pages\" in the browse-box: \"Page 1\", \"Page 2\", etc.\n\t\t$this->internal['searchFieldList']='name,shorttext,description,phone,fax,email,web';\n\t\t$this->internal['orderByList']='uid,name,phone,fax,email,web';\n\n\t\t// Wenn für eine Seite ein Filter gesetzt ist - dann hier einbauen\n\t\t$strWhereStatement = '';\n\t\t//debug($this->conf['filter.']);\n\t\tif(is_array($this->conf['filter.']))\n\t\t\t{\n\t\t\tforeach($this->conf['filter.'] as $key=>$value)\n\t\t\t\t{ \n\t\t\t\tif($key == 'calendarweek' && $value == 'true') $value = date(\"W\");\n\t\t\t\t\n\t\t\t\t$strWhereStatement .= \"AND $key = '$value'\";\n\t\t\t\t//debug($strWhereStatement) ;\n\t\t\t\t}\n\t\t\t}\n\t\tif(is_array($this->piVars[\"search\"]))\n\t\t\t{\n\t\t\tforeach($this->piVars[\"search\"] as $key=>$value)\n\t\t\t\t{\n\t\t\t\tif($value == -1) continue;\n\t\t\t\t$strWhereStatement .= \"AND $key = '$value'\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get number of records:\n\t\t$res = $this->pi_exec_query('tx_mmreflist_projects',1,$strWhereStatement);\n\t\tlist($this->internal['res_count']) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);\n\n\t\t\t// Make listing query, pass query to SQL database:\n\t\t$res = $this->pi_exec_query('tx_mmreflist_projects',$strWhereStatement);\n\t\t$this->internal['currentTable'] = 'tx_mmreflist_projects';\n\n\n\t\t\t// Put the whole list together:\n\t\t$fullTable='';\t// Clear var;\n\t#\t$fullTable.=t3lib_div::view_array($this->piVars);\t// DEBUG: Output the content of $this->piVars for debug purposes. REMEMBER to comment out the IP-lock in the debug() function in t3lib/config_default.php if nothing happens when you un-comment this line!\n\n\t\t\t// Adds the mode selector.\n\t\tif($lConf['showModeSelector'] == 1) $fullTable .= $this->pi_list_modeSelector($items);\n\n\t\t\t// Adds the whole list table\n\t\t\t// Bei der erzeugeten Tabelle wird auch der Klassenname angehängt\n\t\t$fullTable .= $this->pi_list_makelist($res,'border=\"1\" cellspacing=\"0\" cellpadding=\"0\"' . $this->pi_classParam($strTableClassName));\n\n\t\t\t// Adds the search box:\n\t\tif($lConf['showSearchBox'] == 1) $fullTable .= $this->pi_list_searchBox();\n\n\t\t\t// Adds the result browser:\n\t\tif($lConf['showBrowserResults'] == 1) $fullTable .= $this->pi_list_browseresults();\t\n\n\t\t\t// Returns the content from the plugin.\n\t\treturn $fullTable;\n\t}", "title": "" }, { "docid": "3bdbc9afd4bf9ab9ef613dae2520851b", "score": "0.4697405", "text": "function yphplista_widgetize($args) {\r\n//\t\t echo 'yPHPLista';\r\n\t\t echo yphplista_output();\r\n\r\n\t\t}", "title": "" }, { "docid": "a1f2bc7ccd91831c4953caa84a85d8a5", "score": "0.46911415", "text": "function createCombo7all($tbname,$pkfield,$textfield,$param,$idcombo,$selvalue,$class){\n\t$sql=\"SELECT \".$pkfield.\",\".$textfield.\" FROM \".$tbname.\" \".$param;\n\t$mq=mssql_query($sql);\n\t$onklik\t=\"document.form1.submit()\";\n\tif (mssql_num_rows($mq) < 1) { return \"\"; };\n\t$retstr .= \"<select class=\\\"\".$class.\"\\\" name=\\\"\".$idcombo.\"\\\" id=\\\"\".$idcombo.\"\\\" onChange=\\\"\".$onklik.\"\\\">\";\n\t$retstr .= \"<option value=\\\"\\\">- PILIH -</option>\";\n\t$retstr .= \"<option value=\\\"\\\">- ALL -</option>\";\n\twhile ($mfa=mssql_fetch_array($mq)){\n\t\t$vfield\t= $mfa[$pkfield];\n\t\t$retstr .= \"<option value=\\\"\".$mfa[$pkfield].\"\\\"\";\n\t\tif($selvalue == $vfield){\n\t\t\t$retstr .= \" selected\";\n\t\t};\n\t\t$retstr .= \">\".$mfa[$pkfield].\" - \".$mfa[$textfield].\"</option>\";\n\t};\n\treturn $retstr.\"</select>\";\n}", "title": "" }, { "docid": "b5b0940dbadd1ad04c1ea77707bd23f8", "score": "0.46899474", "text": "public function on_list()\n\t{\n\t\t// replace treeview with iconview\n\t\t$child = $this->scroll->get_child();\n\t\t$this->scroll->remove($child);\n\t\t$this->scroll->add($this->photolist->get_treeview());\n\t\t$config = CC_Config::instance();\n\t\t$config->photo->list_style = $this->list_style = 'detail';\n\t\t$this->show_all();\n\t}", "title": "" }, { "docid": "6409d96336705ee6540f1ae899e53ae7", "score": "0.46894312", "text": "protected function renderListOptionsExt()\n {\n }", "title": "" }, { "docid": "fdedf05672c3d531905512e3e5141383", "score": "0.46864414", "text": "function treeSelectList( &$src_list, $src_id, $tgt_list, $tag_name, $tag_attribs, $key, $text, $selected ) {\r\n\r\n\t\t// establish the hierarchy of the menu\r\n\t\t$children = array();\r\n\t\t// first pass - collect children\r\n\t\tforeach ($src_list as $v ) {\r\n\t\t\t$pt = $v->parent;\r\n\t\t\t$list = @$children[$pt] ? $children[$pt] : array();\r\n\t\t\tarray_push( $list, $v );\r\n\t\t\t$children[$pt] = $list;\r\n\t\t}\r\n\t\t// second pass - get an indent list of the items\r\n\r\n\t\t$ilist = mosTreeRecurse( $src_id, '', array(), $children );\r\n\t\t// assemble menu items to the array\r\n\t\t$this_treename = '';\r\n\t\tforeach ($ilist as $item) {\r\n\t\t\tif ($this_treename) {\r\n\t\t\t\tif ($item->id != $src_id && strpos( $item->treename, $this_treename ) === false) {\r\n\t\t\t\t\t$tgt_list[] = mosHTML::makeOption( $item->id, $item->treename );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ($item->id != $src_id) {\r\n\t\t\t\t\t$tgt_list[] = mosHTML::makeOption( $item->id, $item->treename );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this_treename = \"$item->treename/\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// build the html select list\r\n\t\treturn mosHTML::selectList( $tgt_list, $tag_name, $tag_attribs, $key, $text, $selected );\r\n\t}", "title": "" }, { "docid": "5ce20376946677e415fab9d0651bf912", "score": "0.46853852", "text": "function options_list($key = NULL, $val = NULL, $where = array(), $order = TRUE) {\r\n //Do nothing to speed up form loading\r\n }", "title": "" }, { "docid": "367e158f2efd270a6df75aedef1912fd", "score": "0.4681566", "text": "function display_output($con, $matches, $mtype)\n\t\t{\n\t\t\tif (strlen($matches[0]) === 0)\n\t\t\t{\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo '<td> </td>';\n\t\t\t\techo \"<td>No matches found.</td>\";\n\t\t\t\techo \"<td> </td>\";\n\t\t\t\techo \"<td> </td>\";\n\t\t\t\techo \"</tr>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$print_offer = false;\n\t\t\t\t$has_offer = false;\n\n\t\t\t\tif ($mtype === 'offers')\n\t\t\t\t\t$print_offer = true;\n\n\t\t\t\tforeach($matches as $match)\n\t\t\t\t{\n\t\t\t\t\tif ($match === \"OFFERS\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$print_offer = true;\n\n\t\t\t\t\t\techo \"</table>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<br>\";\n\t\t\t\t\t\techo \"<h4>Offers that match your search:</h4>\";\n\t\t\t\t\t\techo \"<table class=table table-striped' id='listingsTable'>\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th> Match % </th>\n\t\t\t\t\t\t<th> Starting Address </th>\n\t\t\t\t\t\t<th> Ending Address </th>\n\t\t\t\t\t\t<th> Passengers </th>\n\t\t\t\t\t\t<th> Type </th>\n\t\t\t\t\t\t<th> Date of Departure </th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\";\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$val = explode(' ', $match);\n\t\t\t\t\t$match = $val[0];\n\t\t\t\t\t$id = $val[1];\n\n\t\t\t\t\t$sql = \"SELECT * FROM listings WHERE listings_id=$id\";\n\t\t\t\t\t$result = mysqli_query($con,$sql);\n\t\t\t\t\twhile($row = mysqli_fetch_array($result))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($print_offer)\n\t\t\t\t\t\t\t$has_offer = true;\n\n\t\t\t\t\t\techo '<tr id=\"'.$row['listings_id'].'\">';\n\t\t\t\t\t\techo '<td id=\"'.$row['listings_id'].'_Match\">'.$match.'</td>';\n\t\t\t\t\t\techo '<td id=\"'.$row['listings_id'].'_Starting_Address\">'.$row['startingAddress'].'</td>';\n\t\t\t\t\t\techo '<td id=\"'.$row['listings_id'].'_Ending_Address\">'.$row['endingAddress'].'</td>';\n\n\t\t\t\t\t\tif ($print_offer)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo '<td id=\"'.$row['listings_id'].'_Passengers\">'.$row['passengers'].'</td>';\n\t\t\t\t\t\t\techo '<td id=\"'.$row['listings_id'].'_Ride_Type\">Offering Ride</td>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo '<td id=\"'.$row['listings_id'].'_Ride_Type\">Requesting Ride</td>';\n\n\t\t\t\t\t\techo '<td id=\"'.$row['listings_id'].'_Date_Of_Departure\">'.$row['dateOfDeparture'].'</td>';\n\t\t\t\t\t\techo '<input id=\"'.$row['listings_id'].'_Start_Lat\" type=\"hidden\" value=\"'.$row['start_lat'].'\">';\n\t\t\t\t\t\techo '<input id=\"'.$row['listings_id'].'_Start_Long\" type=\"hidden\" value=\"'.$row['start_long'].'\">';\n\t\t\t\t\t\techo '<input id=\"'.$row['listings_id'].'_End_Lat\" type=\"hidden\" value=\"'.$row['end_lat'].'\">';\n\t\t\t\t\t\techo '<input id=\"'.$row['listings_id'].'_End_Long\" type=\"hidden\" value=\"'.$row['end_long'].'\">';\n\t\t\t\t\t\techo \"<td>\n\t\t\t\t\t\t\t\t<button class=\\\"btn btn-success\\\" data-id=\\\"\". $row['listings_id'] .\"\\\" onclick=\\\"showRouteModal(\".$row['listings_id'].\");\\\">View</button>\n\t\t\t\t\t\t\t</td>\";\n\n\t\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t\techo \"<script>\n\t\t\t\t\t\t\t\t$(document).ready(function()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmap.addMarker\n\t\t\t\t\t\t\t\t\t({\n\t\t\t\t\t\t\t\t\t\tlat:\". $row['start_lat'] . \",\n\t\t\t\t\t\t\t\t\t\tlng:\". $row['start_long'] . \",\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tmap.drawRoute\n\t\t\t\t\t\t\t\t\t({\n\t\t\t\t\t\t\t\t\t\torigin: [\". $row['start_lat'] .\", \" . $row['start_long'] . \"],\n\t\t\t\t\t\t\t\t\t\tdestination: [\". $row['end_lat'].\", \" . $row['end_long'] . \"],\n\t\t\t\t\t\t\t\t\t\ttravelMode: 'driving',\n\t\t\t\t\t\t\t\t\t\tstrokeColor: '\". random_color() .\"',\n\t\t\t\t\t\t\t\t\t\tstrokeOpacity: 0.6,\n\t\t\t\t\t\t\t\t\t\tstrokeWeight: 6\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tmap.addMarker\n\t\t\t\t\t\t\t\t\t({\n\t\t\t\t\t\t\t\t\t\tlat:\". $row['end_lat'] . \",\n\t\t\t\t\t\t\t\t\t\tlng:\". $row['end_long'] . \",\n\t\t\t\t\t\t\t\t\t\tcolor: 'blue'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tmap.fitZoom();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($print_offer && !$has_offer)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\techo '<td> </td>';\n\t\t\t\t\t\techo \"<td>No matches found.</td>\";\n\t\t\t\t\t\techo \"<td> </td>\";\n\t\t\t\t\t\techo \"<td> </td>\";\n\t\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"</table>\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0bffb86197af4942b8d52e0bc0c89d72", "score": "0.46806228", "text": "function SelectPlayerFromTeam($nameid,$tid,$playerID=0,$passfield='pfkey1') {\r\n\t\r\n\tglobal $dbi,$user;\r\n\t$resx=sql_query(\"select pid,\".$passfield.\",plname,pfname,ltype from tblteamplayer left join tplayer on lplayerid=pid where lteamid=$tid order by plname,pfname asc\",$dbi);\r\n\t$strret=\"<select class=\\\"lsdb\\\" id=\\\"$nameid\\\" name=\\\"$nameid\\\" size=\\\"1\\\">\";\r\n\t$strret=$strret.'<option value=\"0\">-- Player unknown/missing --</option>';\r\n\tif ($playerID == 99) {\r\n\t\t$strret=$strret.'<option value=\"99\" selected=\"selected\">-- #WO (nicht angetreten) --</option>';\r\n\t} else {\r\n\t\t$strret=$strret.'<option value=\"99\">-- #WO (nicht angetreten) --</option>';\r\n\t}\r\n\twhile (list($pid,$passn,$plname,$pfname,$ptyp)=sql_fetch_row($resx,$dbi)) {\r\n\t\t$pstring=\"$passn $plname $pfname\";\r\n\t\tswitch ($ptyp){\r\n\t\t\tcase 3:\r\n\t\t\t\t$pstring=$pstring.' (Farmer)';break;\r\n\t\t\tcase 5:\r\n\t\t\t\t$pstring=$pstring.' (Abgemeldet)';break;\r\n\t\t\tcase 6:\r\n\t\t\t\t$pstring=$pstring.' (Gesperrt)';break;\r\n\t\t}\r\n\t\tif ($playerID == $pid) {\r\n\t\t\t$strret=$strret.'<option value=\"'.$pid.'\" selected=\"selected\">'.$pstring.'</option>';\r\n\t\t} else {\r\n\t\t\t$strret=$strret.'<option value=\"'.$pid.'\">'.$pstring.'</option>';\r\n\t\t}\r\n\t}\r\n\treturn $strret.'</select>';\r\n}", "title": "" }, { "docid": "5afa0938b77cb45bf492dc9e0620920c", "score": "0.46806172", "text": "function SetupListOptions() {\n\t\tglobal $Security, $users;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width: 25px;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width: 25px;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n//\t\t$this->ListOptions->Add(\"copy\");\n//\t\t$item =& $this->ListOptions->Items[\"copy\"];\n//\t\t$item->CssStyle = \"white-space: nowrap;width: 25px;\";\n//\t\t$item->Visible = $Security->CanAdd();\n//\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width: 25px;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"users_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n // \"userpermission\"\n\t\t$this->ListOptions->Add(\"userpermission\");\n\t\t$item =& $this->ListOptions->Items[\"userpermission\"];\n\t\t$item->CssStyle = \"white-space: nowrap; width: 25px;;\";\n\t\t$item->Visible = $Security->CanActive();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($users->Export <> \"\" ||\n\t\t\t$users->CurrentAction == \"gridadd\" ||\n\t\t\t$users->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "title": "" }, { "docid": "a38bdcc6f23e82a3eaaf39a1062bfad7", "score": "0.46761456", "text": "function showContents($f)\r\n{\r\n//prompt user for initial search criteria\r\n\techo \"How would you like to search?\";\r\n\r\n\t$list = array(\"Category\"=>\"category\", \"First Name\"=>\"fname\", \"Last Name\"=>\"lname\", \"Company\"=>\"company\",\r\n\t\t\t\"Priority Level\"=>\"priority\", \"Phone Number\"=>\"phone\", \"Email\"=>\"email\");\r\n\t$selection = array(\"category\");\r\n\techo $f->makeSelect('search', $list, $category);\r\n\r\n\techo \"<input type=\\\"submit\\\" name=\\\"searchButton\\\" value=\\\"Submit\\\"> </p>\";\r\n\r\n\tif (isset($_REQUEST[\"searchButton\"])) {\r\n\r\n//refine search\r\n\t\tforeach ($_REQUEST['search'] as $item) {\r\n\t\t\tif($item==\"category\");\r\n\t\t\t\techo \"Please select a category:\";\r\n\t\t\t\t$category_list = array(\"-Select One-\"=>\"selection\", \"Scratch\"=>\"Scratch\", \"Scratch_2\"=>\"Scratch_2\", \"Agents...Real Estate Agents\"=>\"Agents\", \"Architects\"=>\"Architects\",\r\n\t\t\t\t\t\t\"Attorneys\"=>\"Attorneys\", \"Bankers\"=>\"Bankers\", \"Clients\"=>\"Clients\", \"CPAs\"=>\"CPAs\", \"Divorce Attorneys\"=>\"Divorce Attorneys\", \"Doctors, Dentists, Vets, etc\"=>\"Doctors\",\r\n\t\t\t\t\t\t\"General Business\"=>\"General_Business\", \"Mail\"=>\"Mail\", \"MLS\"=>\"MLS\", \"Personal\"=>\"Personal\", \"PGA West\"=>\"PGA_West\", \"Professional Networking Group\"=>\"PNG\",\r\n\t\t\t\t\t\t\"Prospects\"=>\"Prospects\", \"Women's Group\"=>\"Womens_Group\", \"9100 Wilshire\"=>\"9100_Wilshire\");\r\n\t\t\t\t$f->makeSelect('category', $category_list);\r\n\r\n\t\t\t} else if ($item==\"fname\") {\r\n\t\t\t\techo \"Please enter a first name:\";\r\n\t\t\t\techo $f->makeTextInput('fname', 30);\r\n\t\t\t\techo $f->showMessageOnError('fname');\r\n\r\n\t\t\t} else if ($item==\"lname\") {\r\n\t\t\t\techo \"Please enter a last name:\";\r\n\t\t\t\techo $f->makeTextInput('lname', 30);\r\n\t\t\t\techo $f->showMessageOnError('lname');\r\n\r\n\t\t\t} else if ($item==\"company\") {\r\n\t\t\t\techo \"Please enter a company name:\";\r\n\t\t\t\techo $f->makeTextInput('company', 30);\r\n\t\t\t\techo $f->showMessageOnError('company');\r\n\r\n\t\t\t} else if ($item==\"priority\") {\r\n\t\t\t\techo \"Please enter a priority level:\";\r\n\t\t\t\t$priority_list = array(\"-Select One-\"=>\"selection\", \"Level 1\"=>\"1\", \"Level 2\"=>\"2\", \"Level 3\"=>\"3\", \"Level 4\"=>\"4\",\r\n\t\t\t\t\t\t\"Level 5\"=>\"5\", \"Level 6\"=>\"6\", \"Level 7\"=>\"7\", \"Level 8\"=>\"8\", \"Level 9\"=>\"9\");\r\n\t\t\t\t\t\t echo $f->makeSelect('priority', $priority_list);\r\n\t\t\t\techo $f->showMessageOnError('priority level');\r\n\r\n\t\t\t} else if ($item==\"phone\") {\r\n\t\t\t\techo \"Please enter a phone number:\";\r\n\t\t\t\techo $f->makeTextInput('phone', 15);\r\n\t\t\t\techo $f->showMessageOnError('phone');\r\n\r\n\t\t\t} else if ($item==\"email\") {\r\n\t\t\t\techo \"Please enter an email address: \";\r\n\t\t\t\techo $f->makeTextInput('email', 50);\r\n\t\t\t\techo $f->showMessageOnError('email');\r\n\t\t\t}\r\n\r\n\t\t}\r\n}", "title": "" }, { "docid": "c78ee94514257a066da905d31dce2f9b", "score": "0.46726096", "text": "function sublist($sql,$tabla)\n{\n\tglobal $con, $dbname;\n\t//$cadena = $sql;\n\t//opcion en la que estamos\n\t$esecuele = \"Select id from submenus where pagina like '$tabla'\";\n\t$laconsulta = mysql_db_query($dbname,$esecuele,$con);\n\t$elresultado = mysql_fetch_array($laconsulta);\n\t$cadena = \"<tr><td colspan='2'><input type='hidden' id='opcion' value='\".$elresultado[0].\"' />\";\n\t//echo $sql;\n\t$consulta = mysql_db_query($dbname,$sql,$con);\n\t$totcampos = mysql_num_fields($consulta);\n\t$cadena .= \"<table width='100%' class='sublistado' cellspacing='0'><tr><th align='center' bgcolor='#7d0063'></th><th align='center' bgcolor='#7d0063'></th>\";\n\tfor($i=2;$i<=$totcampos-1;$i++)\n\t$cadena .= \"<th align='center' bgcolor='#7d0063'><font color='#ffffff'>\".ucfirst(mysql_field_name($consulta,$i)).\"</font></th>\";\n\t$cadena .=\"</tr>\";\n\t$j=0;\n\twhile (($resultado = mysql_fetch_array($consulta)) == TRUE)\n\t{\n\t\t$j++;\n\t\tif($j%2==0)\n\t\t\t{$color = \"par\";$botoncico1 = \"boton_borrar_par\";$botoncico2 = \"boton_editar_par\";}\n\t\telse\n\t\t\t{$color = \"impar\";$botoncico1 = \"boton_borrar_impar\";$botoncico2 = \"boton_editar_impar\";}\n\t\t\n\t\t$cadena .= \"<tr><td align='center' class='\".$color.\"'>\n\t\t<input type='hidden' id='nombre_tabla' value='\".$tabla.\"' />\n\t\t<input type='hidden' id='codigo' value='\".$elresultado[0].\"' />\n\t\t<input type='button' class='\".$botoncico2.\"' onclick='muestra_registro(\".$resultado[0].\")' /></td>\n\t\t<td align='center' class='\".$color.\"'>\n\t\t<input type='button' class='\".$botoncico1.\"' onclick='borrar_registro(\".$resultado[0].\")' /></td>\";\n\t\tfor($i=2;$i<=$totcampos-1;$i++)\n\t\t$cadena .= \"<td align='center' class='\".$color.\"'>\".ucfirst(traduce(comprueba_check($tabla,mysql_field_name($consulta,$i),$resultado[$i]))).\"</td>\";\n\t\t$cadena .= \"</tr>\";\n\t}\n\t$cadena .= \"</table></td></tr>\";\n\treturn $cadena;\n}", "title": "" }, { "docid": "6a2d7a4f4d007a44078af625ab7344ae", "score": "0.46688625", "text": "public function getBoxes();", "title": "" }, { "docid": "4185b1bd01e1bdc7c9d9213ab27338af", "score": "0.4667128", "text": "function add_search_box($items, $args) {\n\n\tif ($args->theme_location == 'wfc-main-nav-mobile') {\n\t\n /*ob_start();\n get_search_form();\n $searchform = ob_get_contents();\n ob_end_clean();*/\n\n $search_args = 'Search Wildflower Center';\n\n $items .= '<li id=\"mobile-search\" class=\"menu-item menu-item-type-post_type menu-item-object-page\">' . headway_get_search_form($search_args) . '</li>';\n }\n return $items;\n\t\n}", "title": "" }, { "docid": "8e986e242205b7ba8e15163556be4d0d", "score": "0.4666803", "text": "function show_game_select_box ($con,$intIdBox,$intID,$strInputName){\n\t global $games; \n\t echo '\n <div style=\"position:relative;\">\n\t <span class=\"label label-04\">Game date</span>\n ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT id,id_club_home,id_club_visiting,date,home_score,visiting_score FROM games WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t \n $intID=$write_sub['id'];\n\t $strDate=date(\"d.m.Y\",strtotime($write_sub['date']));\n\t $strHome=$games->GetActualClubName($write_sub['id_club_home'],ActSeason);\n\t $strVisiting=$games->GetActualClubName($write_sub['id_club_visiting'],ActSeason);\n\t $strScore=$games->GetScore($write_sub['id'],1);\n\t $intName=''.$strDate.' '.$strHome.' vs. '.$strVisiting.' ('.$strScore.')';\n\t \n\t \n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n echo '<span id=\"game_name'.$intIdBox.'\">'.$intName.'</span>';\n echo'&nbsp;<a href=\"javascript:cancel_game('.$intIdBox.')\" title=\"Cancel\"><img src=\"../inc/design/ico-delete.gif\" class=\"ico\" alt=\"Cancel\"></a>&nbsp;|&nbsp;';\n echo'<a class=\"ico-list\" href=\"javascript:show_game_window('.$intIdBox.')\" title=\"Set game\">search game</a>';\n echo'<div id=\"game_livesearch_window'.$intIdBox.'\" class=\"livesearch_game_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type game date</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_game_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter_box\" id=\"filter_game'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_game_livesearch_data(this.value,'.$intIdBox.')\" />\n <div id=\"game_livesearch'.$intIdBox.'\" class=\"livesearch_game\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"game_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" /><br />';\n }", "title": "" }, { "docid": "3792bc40fbe6ff4406482fc5d0bad050", "score": "0.4662227", "text": "function COM_checkList( $table, $selection, $where='', $selected='' )\n{\n global $_TABLES, $_COM_VERBOSE;\n\n $sql = \"SELECT $selection FROM $table\";\n\n if( !empty( $where ))\n {\n $sql .= \" WHERE $where\";\n }\n\n $result = DB_query( $sql );\n $nrows = DB_numRows( $result );\n\n if( !empty( $selected ))\n {\n if( $_COM_VERBOSE )\n {\n COM_errorLog( \"exploding selected array: $selected in COM_checkList\", 1 );\n }\n\n $S = explode( ' ', $selected );\n }\n else\n {\n if( $_COM_VERBOSE)\n {\n COM_errorLog( 'selected string was empty COM_checkList', 1 );\n }\n\n $S = array();\n }\n $retval = '<ul class=\"checkboxes-list\">' . LB;\n for( $i = 0; $i < $nrows; $i++ )\n {\n $access = true;\n $A = DB_fetchArray( $result, true );\n\n if( $table == $_TABLES['topics'] AND SEC_hasTopicAccess( $A['tid'] ) == 0 )\n {\n $access = false;\n }\n\n if( $access )\n {\n $retval .= '<li><input type=\"checkbox\" name=\"' . $table . '[]\" value=\"' . $A[0] . '\"';\n\n $sizeS = sizeof( $S );\n for( $x = 0; $x < $sizeS; $x++ )\n {\n if( $A[0] == $S[$x] )\n {\n $retval .= ' checked=\"checked\"';\n break;\n }\n }\n\n if(( $table == $_TABLES['blocks'] ) && isset( $A[2] ) && ( $A[2] == 'gldefault' ))\n {\n $retval .= XHTML . '><span class=\"gldefault\">' . stripslashes( $A[1] ) . '</span></li>' . LB;\n }\n else\n {\n $retval .= XHTML . '><span>' . stripslashes( $A[1] ) . '</span></li>' . LB;\n }\n }\n }\n $retval .= '</ul>' . LB;\n\n return $retval;\n}", "title": "" }, { "docid": "852d0b0ffa7f355236a32190735e976e", "score": "0.46613845", "text": "function list_drop_menu_compliance_dashboard($pre_selected_items='', $order_clause='') {\n\n\tif ($order_clause) {\n\t\t$order_clause = \" ORDER BY \".$order_clause.\"\";\n\t}\n\n\t# MUST EDIT\n\t$sql = \"SELECT * FROM compliance_dashboard_tbl WHERE compliance_dashboard_disabled = \\\"0\\\"\".$order_clause.\"\";\n\t$results = runQuery($sql);\n\n\tforeach($results as $results_item) {\n\t\tif (is_array($pre_selected_items)) { \n\t\t\t$match = NULL;\n\t\t\tforeach($pre_selected_items as $preselected) {\n\t\t\t\t# MUST EDIT\n\t\t\t\tif ($results_item[compliance_dashboard_id] == $preselected) {\n\t\t\t\t\techo \"<option selected=\\\"selected\\\" value=\\\"$results_item[compliance_dashboard_id]\\\">$results_item[compliance_dashboard_name]</option>\\n\";\n\t\t\t\t\t$match = 1;\n\t\t\t\t} \n\t\t\t}\n\n\t\t\t# MUST EDIT\n\t\t\tif (!$match) { \n\t\t\t\techo \"<option value=\\\"$results_item[compliance_dashboard_id]\\\">$results_item[compliance_dashboard_name]</option>\\n\"; \n\t\t\t}\n\n\t\t} elseif ($pre_selected_items) {\n\t\t\t$match = NULL;\n\t\t\t# MUST EDIT\n\t\t\tif ($results_item[compliance_dashboard_id] == $pre_selected_items) {\n\t\t\t\techo \"<option selected=\\\"selected\\\" value=\\\"$results_item[compliance_dashboard_id]\\\">$results_item[compliance_dashboard_name]</option>\\n\";\n\t\t\t\t$match = 1;\n\t\t\t} \n\n\t\t\t# MUST EDIT\n\t\t\tif (!$match) { \n\t\t\t\techo \"<option value=\\\"$results_item[compliance_dashboard_id]\\\">$results_item[compliance_dashboard_name]</option>\\n\"; \n\t\t\t}\n\t\t} else {\n\t\t\t# MUST EDIT\n\t\t\techo \"<option value=\\\"$results_item[compliance_dashboard_id]\\\">$results_item[compliance_dashboard_name]</option>\\n\"; \n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "28dbeb2a197a6efacc7ccd3b7c9478ad", "score": "0.46596542", "text": "function list_barang(){\r\n\t\t//$this->inv_model->auto_data();\r\n\t\t$this->zetro_auth->menu_id(array('listbarang'));\r\n\t\t$this->list_data($this->zetro_auth->auth());\r\n\t\t$this->View('inventory/material_list');\r\n\t}", "title": "" }, { "docid": "89c9bdf9c53536314dc1052efa3301f3", "score": "0.46576583", "text": "function generateComboSelect($title, $id, $name, &$res, $ulId) {\r\n\t$txt = \"\t\t\t\t\t\t<tr><td>\" . $title . \":\t</td>\r\n\";\r\n\t// levels 1 and 2, allow changes\r\n\t$txt .= \"\t\t\t\t\t\t\t<td><input type='text' id='$id' name='$name' value='' onKeyUp=editFunction(this,'parkC') style='width:100%' >\r\n\t\t\t\t\t\t\t<ul id='$ulId'>\r\n\";\r\n\t\r\n\twhile(\t$row = $res->fetch_row()){\r\n\t\t$txt .= \"\t\t\t\t\t\t\t<li>$row[0]</li>\r\n\";\r\n\t}\r\n\t\t\techo\"</ul></td></tr>\r\n\";\r\n\treturn $txt;\r\n}", "title": "" }, { "docid": "1d3df9fde7fed9ba51d0b90357d36448", "score": "0.4651236", "text": "function show_list($data)\r\n{\r\n\r\n\t$list = split(\"\\n\",$data);\r\n\r\n\t$pattern = \"/[dwrx\\-]{10}/\";\r\n\t$chk_id=0;\r\n\t$list = array_slice($list,1,count($list)-1);\r\n\tforeach($list as $file)\r\n\t{\r\n\t\tif($file == '')\r\n\t\t{\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t\r\n\t\t$del=\"\";\r\n\t\t$file = preg_split(\"/ /\",$file,20,PREG_SPLIT_NO_EMPTY);\r\n\t\t\r\n\t\t/*\r\n\t\t * directory download has to be implemented in a different manner\r\n\t\t * so we will just ignore directories for now.\r\n\t\t */\r\n\t\tif(preg_match('/^d/',trim($file[FPERM])))\r\n\t\t{\r\n\t\t\t$downlink = \"main.php?act=cwd&dir=\". urlencode(trim(\"$path\".$file[FNAME]));\t\r\n\t\t\t//$chmod = \"main.php?act=chmod&file=\". urlencode(trim(\"$path\".$file[FNAME]));\r\n\t\t\t$chmod=\"javascript:changeMod('\".urlencode(trim(\"$path\".$file[FNAME])).\"','\".$file[FPERM].\"');\";\r\n\t\t\t$file_dir_name=trim(\"{D}\".$file[FNAME]);\r\n $icon=\"<img src='images/folder_b.gif' width='16' height='13' border='0'>\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//$downlink = \"getfile.php?filename=\". urlencode(\"$path\".$file[FNAME]);\r\n\t\t\t$downlink=\"#\";\r\n\t\t\t//$chmod=\"main.php?act=chmod&file=\". urlencode(trim(\"$path\".$file[FNAME]));\r\n\t\t\t$chmod=\"javascript:changeMod('\".urlencode(trim(\"$path\".$file[FNAME])).\"','\".$file[FPERM].\"');\";\r\n\t\t\t$file_dir_name=trim($file[FNAME]);\r\n $icon=\"<img src='images/file.gif' width='16' height='16' border='0'>\";\r\n\t\t}\r\n\t\t\r\n\t\tprintf('<tr>\r\n <td class=\"list\" width=\"120\" bgcolor=\"#FFFFCC\"><p align=\"center\"><input type=\"checkbox\" name=\"%s\" id=\"c%d\">Select This</p></td>\r\n <td class=\"list\" width=\"30\" bgcolor=\"#FFFFCC\"><p align=\"center\"><a href=\"%s\">%s</a></p></td>\r\n <td class=\"list\" width=\"300\" bgcolor=\"#FFFFCC\"><a class=\"list_d\" href=\"%s\">%s</a></td>\r\n <td class=\"list\" width=\"100\" bgcolor=\"#FFFFCC\"><p align=\"center\">%s</p></td>\r\n <td class=\"list\" width=\"120\" bgcolor=\"#FFFFCC\"><p align=\"center\">%s %s %s</p></td>\r\n <td class=\"list\" width=\"75\" bgcolor=\"#FFFFCC\"><p align=\"center\"><a class=\"list\" id=\"list\" href=\"%s\">%s</a></p></td>\r\n\t\t\t\t</tr>',\r\n\t\t\t\t$file_dir_name,$chk_id,$downlink,$icon,$downlink,$file[FNAME],$file[FSIZE],\r\n\t\t\t\t$file[FMONTH],$file[FDAY],$file[FTIME],\r\n\t\t\t\t$chmod,$file[FPERM]\r\n\t\t\t );\r\n\t\t$chk_id++;\r\n\t}\r\n\techo \"<input type='hidden' name='num' id='num' value='$chk_id'>\";\r\n}", "title": "" }, { "docid": "ebcb934faaf4730d556d5ec6902c755b", "score": "0.46495852", "text": "function vlist_html(){\r\n\t\tglobal $in;\r\n\t\t$center=$in['CENTER'];\r\n\t\t$center='00'.$center;\r\n\t\t$center=substr($center, strlen($center)-3,3);\r\n\t\tfor ($i=0;$i<count($this->blocco);$i++) $this->vlist($i);\r\n\t\treturn $this->body;\r\n\t}", "title": "" }, { "docid": "c96594a804a088719636533709942db3", "score": "0.46491015", "text": "private function renderList(): string {\n\n $columns = $this->getColumns();\n $id = $this->randomString(5);\n\n $isMobile = $this->getIsMobile();\n\n $str = \"<table class='\" . $this->getTableClass() . \"'>\";\n $str .= \"<thead class='\" . $this->getTHeadClass() . \"'>\";\n if (!$isMobile) {\n $str .= $this->renderTableHead($columns);\n if ($this->getShowFilter()) {\n $str .= $this->renderSearchFilter($id, $columns);\n }\n } else {\n $str .= \"<tr id=\\\"form_{$id}\\\"><th>\";\n $str .= CuxHTML::a('<span class=\"fas fa-filter\"></span>&nbsp;|&nbsp;<span class=\"fas fa-search\"></span>&nbsp;'.Cux::translate(\"core.dataProvider\", \"Sort by / filter\", array(), \"Mobile version of the data provider\"), \"javascript:void(0)\", array(\"onclick\"=> \"$(\\\"#listFilters_{$id}\\\").modal('show')\"));\n $str .= \"<div id='listFilters_{$id}' class='modal fade' role='dialog' aria-labelledby='listFiltersBoxTitle_{$id}' aria-hidden='true'>\";\n $str .= '<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"listFiltersBoxTitle_'.$id.'\"><span class=\"fas fa-filter\"></span>&nbsp;|&nbsp;<span class=\"fas fa-search\"></span>&nbsp;'.Cux::translate(\"core.dataProvider\", \"Sort by / filter\", array(), \"Mobile version of the data provider\").'</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">';\n $str .= $this->renderMobileHead($columns, $id);\n $str .= '</div>';\n $str .= '<div class=\"modal-footer\">';\n $str .= CuxHTML::button(CuxHTML::tag(\"span\", \"\", array(\"class\" => \"fas fa-search\")).\"&nbsp;\".Cux::translate(\"core.dataProvider\", \"Search\", array(), \"Mobile version of the data provider\"), array(\"class\" => \"btn btn-sm btn-success\", \"onclick\" => \"doSearch_{$id}()\"));\n $str .= \"&nbsp;\";\n $str .= CuxHTML::button(CuxHTML::tag(\"span\", \"\", array(\"class\" => \"fas fa-redo\")).\"&nbsp;\".Cux::translate(\"core.dataProvider\", \"Reset\", array(), \"Mobile version of the data provider\"), array(\"class\" => \"btn btn-sm btn-info\", \"onclick\" => \"clearSearch_{$id}()\"));\n $str .= \"&nbsp;\";\n $str .= CuxHTML::button(CuxHTML::tag(\"span\", \"\", array(\"class\" => \"fas fa-times\")).\"&nbsp;\".Cux::translate(\"core.dataProvider\", \"Close\", array(), \"Mobile version of the data provider\"), array(\"class\" => \"btn btn-sm btn-danger\", \"onclick\" => \"\", \"data-dismiss\" => \"modal\"));\n $str .= '</div>';\n $str .= '</div>';\n $str .= '</div>';\n $str .= \"</div>\";\n $str .= \"</th></tr>\";\n }\n $str .= \"</thead>\";\n $str .= \"<tbody>\";\n if (!empty($this->_data)) {\n foreach ($this->_data as $row) {\n if (!$isMobile) {\n $str .= \"<tr>\";\n foreach ($columns as $key => $columnDetails) {\n $str .= \"<td>\";\n if (is_string($columnDetails[\"value\"])) {\n $str .= $row->getAttribute($columnDetails[\"value\"]);\n } elseif (is_callable($columnDetails[\"value\"])) {\n $str .= call_user_func($columnDetails[\"value\"], $row);\n } else {\n $str .= \" - \";\n }\n $str .= \"</td>\";\n }\n $str .= \"</tr>\";\n } else {\n $str .= \"<tr><td>\";\n foreach ($columns as $key => $columnDetails) {\n if (is_string($columnDetails[\"value\"])) {\n $str .= $row->getAttribute($columnDetails[\"value\"]);\n } elseif (is_callable($columnDetails[\"value\"])) {\n $str .= call_user_func($columnDetails[\"value\"], $row);\n } else {\n $str .= \" - \";\n }\n }\n $str .= \"</td></tr>\";\n }\n }\n } else {\n $str .= \"<tr>\";\n $colspan = $isMobile ? 1 : count($columns);\n $str .= \"<td colspan='\" . $colspan . \"'>\";\n $str .= \"<div class='alert alert-info'>\" . Cux::translate(\"core.dataProvider\", \"No data to show\", array(), \"No data to show. No results found.\") . \"</div>\";\n $str .= \"</td>\";\n $str .= \"</tr>\";\n }\n $str .= \"</tbody>\";\n $str .= \"</table>\";\n\n if ($this->getShowFilter()) {\n $str .= $this->renderJS($id, $columns);\n }\n\n return $str;\n }", "title": "" }, { "docid": "764c396d8cfcf1b83eac9c5363a14b8e", "score": "0.46423468", "text": "function select_sellist($sqlarray=array('table'=> 'user','keyfield'=> 'rowid','fields'=>'firstname,lastname', 'join' => '', 'where'=>'','tail'=>''),\n $htmlarray=array('name'=> 'HTMLSellist','class'=>'','otherparam'=>'','$ajaxNbChar'=>'','separator'=> ' ','noajax'=>0),\n $selected='',\n $addtionnalChoices=array('NULL'=>'NULL')){\n global $conf,$langs,$db;\n\n $noajax= isset($htmlarray['noajax']);\n $ajax=$conf->use_javascript_ajax && !$noajax ;\n if( !isset($sqlarray['table'])|| !isset($sqlarray['keyfield'])||!isset($sqlarray['fields']) || !isset($htmlarray['name']))\n {\n return 'error, one of the mandatory field of the function select_sellist is missing';\n }\n $htmlName=$htmlarray['name'];\n $ajaxNbChar=$htmlarray['ajaxNbChar'];\n $listFields=explode(',',$sqlarray['fields']);\n $fields=array();\n foreach($listFields as $item){\n $start=MAX(strpos($item,' AS '),strpos($item,' as '));\n $start2=strpos($item,'.');\n $label=$item;\n if($start){\n $label=substr($item, $start+4);\n }else if($start2){\n $label=substr($item, $start2+1);\n }\n $fields[]=array('select' => $item, 'label'=>trim($label));\n }\n $select=\"\\n\";\n if ($ajax)\n {\n\n include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';\n $token=getToken();\n\n $urloption='token='.$token;\n $comboenhancement = '';\n //$ajaxUrl='';\n $searchfields='';\n if($ajaxNbChar ){\n $ajaxUrl=dol_buildpath('/mymodule/core/ajaxGenericSelectHandler.php',1);\n $_SESSION['ajaxQuerry'][$token]['sql']=$sqlarray;\n $_SESSION['ajaxQuerry'][$token]['fields']=$fields;\n $_SESSION['ajaxQuerry'][$token]['html']=$htmlarray; \n $_SESSION['ajaxQuerry'][$token]['option']=$addtionnalChoices;\n \n //array('table'=>$table, 'fieldValue'=>$fieldValue,'htmlName'=> $htmlName,'fieldToShow1'=>$fieldToShow1,'fieldToShow2'=>$fieldToShow2,'separator'=> $separator,'sqlTailTable'=>$sqlTailTable,'sqlTailWhere'=>$sqlTailWhere,'addtionnalChoices'=>$addtionnalChoices);\n $comboenhancement = ajax_autocompleter($selected, $htmlName, $ajaxUrl, $urloption,$ajaxNbChar);\n $sqlTail.=\" LIMIT 5\";\n // put \\\\ before barket so the js will work for Htmlname before it is change to seatch HTMLname\n $htmlid=str_replace('[','\\\\\\\\[',str_replace(']','\\\\\\\\]',$htmlName));\n $comboenhancement=str_replace('#'.$htmlName, '#'.$htmlid,$comboenhancement);\n $comboenhancement=str_replace($htmlName.':', '\"'.$htmlName.'\":',$comboenhancement); // #htmlname doesn't cover everything\n $htmlName='search_'.$htmlName;\n }else{\n $comboenhancement = ajax_combobox($htmlName);\n }\n // put \\\\ before barket so the js will work\n $htmlid='#'.str_replace('[','\\\\\\\\[',str_replace(']','\\\\\\\\]',$htmlName));\n $comboenhancement=str_replace('#'.$htmlName, $htmlid,$comboenhancement);\n //incluse js code in the html response\n $select.=$comboenhancement;\n $nodatarole=($comboenhancement?' data-role=\"none\"':'');\n \n }\n \n //dBQuerry\n\n $SelectOptions='';\n $selectedValue='';\n $sql='SELECT DISTINCT ';\n $sql.=$sqlarray['keyfield'];\n $sql.=' ,'.$sqlarray['fields'];\n $sql.= ' FROM '.MAIN_DB_PREFIX.$sqlarray['table'].' as t';\n if(isset($sqlarray['join']) && !empty($sqlarray['join']))\n $sql.=' '.$sqlarray['join'];\n if(isset($sqlarray['where']) && !empty($sqlarray['where']))\n $sql.=' WHERE '.$sqlarray['where'];\n if(isset($sqlarray['tail']) && !empty($sqlarray['tail']))\n $sql.=' '.$sqlarray['tail']; \n dol_syslog('form::select_sellist ', LOG_DEBUG);\n // remove the 't.\" if any\n $startkey=strpos($sqlarray['keyfield'],'.');\n $labelKey=($startkey)?substr($sqlarray['keyfield'], $startkey+1):$sqlarray['keyfield'];\n \n $resql=$db->query($sql);\n \n if ($resql)\n {\n\n\n $selectOptions.= \"<option value=\\\"-1\\\" \".(empty($selected)?\"selected\":\"\").\">&nbsp;</option>\\n\";\n $i=0;\n $separator=isset($htmlarray['separator'])?$htmlarray['separator']:' ';\n //return $table.\"this->db\".$field;\n $num = $db->num_rows($resql);\n while ($i < $num)\n {\n \n $obj = $db->fetch_object($resql);\n \n if ($obj)\n {\n \n $fieldtoshow='';\n foreach($fields as $item){\n if(!empty($fieldtoshow))$fieldtoshow.=$separator;\n $fieldtoshow.=$obj->{$item['label']};\n } \n $selectOptions.= \"<option value=\\\"\".$obj->{$labelKey}.\"\\\" \";\n if($obj->{$labelKey}==$selected){\n $selectOptions.='selected=\\\"selected\\\"';\n $selectedValue=$fieldtoshow;\n }\n $selectOptions.=\">\"; \n $selectOptions.=$fieldtoshow;\n\n $selectOptions.=\"</option>\\n\";\n } \n $i++;\n }\n if($addtionnalChoices)foreach($addtionnalChoices as $value => $choice){\n $selectOptions.= '<option value=\"'.$value.'\" '.(($selected==$value)?'selected':'').\">{$choice}</option>\\n\";\n }\n\n \n }\n else\n {\n $error++;\n dol_print_error($db);\n $select.= \"<option value=\\\"-1\\\" selected=\\\"selected\\\">ERROR</option>\\n\";\n }\n \n \n if($ajaxNbChar && $ajax){\n if ($selectedValue=='' && is_array($addtionnalChoices)){\n $selectedValue=$addtionnalChoices[$selected];\n }\n $select.='<input type=\"text\" class=\"minwidth200 '.(isset($htmlarray['class'])?$htmlarray['class']:'').'\" name=\"'.$htmlName.'\" id=\"'.(isset($htmlarray['id'])?$htmlarray['id']:$htmlName).'\" value=\"'.$selectedValue.'\"'.$htmlarray['otherparam'].' />';\n }else{\n $select.='<select class=\"flat minwidth200 '.(isset($htmlarray['class'])?$htmlarray['class']:'').'\" id=\"'.(isset($htmlarray['id'])?$htmlarray['id']:$htmlName).'\" name=\"'.$htmlName.'\"'.$nodatarole.' '.$htmlarray['otherparam'].'>';\n $select.=$selectOptions;\n $select.=\"</select>\\n\";\n }\n // }\n return $select;\n \n}", "title": "" }, { "docid": "ead90a10e8536c06ec2f53f8d2adacdd", "score": "0.4641067", "text": "function cpvg_list_views()\n{\n if (!current_user_can('manage_options')) {\n wp_die('You do not have sufficient permissions to access this page.');\n }\n\n require_once CPVG_ADMIN_TEMPLATE_DIR . \"/cpvg_list_views.html\";\n\n $meta_boxes_data = array('list_views' => 'List Views', 'fields' => 'Fields', 'parameters' => 'Parameters', 'finish' => 'Finish');\n $post_types = array_diff_assoc(get_post_types(array('_builtin' => false), 'names'), array('content-type' => 'content-type', 'rw_content_type' => 'rw_content_type', 'rw_taxonomy' => 'rw_taxonomy'));\n\n\n foreach ($meta_boxes_data as $meta_boxes_id => $meta_boxes_name) {\n add_meta_box('cpvg-step-' . $meta_boxes_id, $meta_boxes_name, 'cvpg_listview_metabox', 'cpvg-' . $meta_boxes_id, 'normal', 'default');\n }\n ?>\n\n <div id='cpvg-wrap' class='wrap cpvg-list-views metabox-holder'>\n <div id='icon-edit-pages' class='icon32'><br></div>\n <h2>List Views</h2>\n <?php\n foreach ($meta_boxes_data as $meta_boxes_id => $meta_boxes_name) {\n do_meta_boxes('cpvg-' . $meta_boxes_id, 'normal', array(\"metabox\" => $meta_boxes_id, \"post_type\" => $post_types));\n }\n ?>\n </div>\n<?php\n}", "title": "" }, { "docid": "1d6103c3c7057a6f2404744cee2f55e1", "score": "0.46400204", "text": "function getList( &$pListHash ) {\n\t\tLibertyContent::prepGetList( $pListHash );\n\t\t\n\t\t$whereSql = $joinSql = $selectSql = '';\n\t\t$bindVars = array();\n\t\tarray_push( $bindVars, $this->mContentTypeGuid );\n\t\t$this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );\n\n\t\tif ( isset($pListHash['find']) ) {\n\t\t\t$findesc = '%' . strtoupper( $pListHash['find'] ) . '%';\n\t\t\t$whereSql .= \" AND (UPPER(con.`SURNAME`) like ? or UPPER(con.`FORENAME`) like ?) \";\n\t\t\tarray_push( $bindVars, $findesc );\n\t\t}\n\n\t\tif ( isset($pListHash['add_sql']) ) {\n\t\t\t$whereSql .= \" AND $add_sql \";\n\t\t}\n\n\t\t$query = \"SELECT con.*, lc.*, \n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\n\t\t\t\tuuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name $selectSql\n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"warehouse_client` ci \n\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = ci.`content_id` )\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uue ON (uue.`user_id` = lc.`modifier_user_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uuc ON (uuc.`user_id` = lc.`user_id`)\n\t\t\t\t$joinSql\n\t\t\t\tWHERE lc.`content_type_guid`=? $whereSql \n\t\t\t\torder by \".$this->mDb->convertSortmode( $pListHash['sort_mode'] );\n\t\t$query_cant = \"SELECT COUNT(lc.`content_id`) FROM `\".BIT_DB_PREFIX.\"warehouse_client` ci\n\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = ci.`content_id` )\n\t\t\t\t$joinSql\n\t\t\t\tWHERE lc.`content_type_guid`=? $whereSql\";\n\n\t\t$ret = array();\n\t\t$this->mDb->StartTrans();\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\t\t$cant = $this->mDb->getOne( $query_cant, $bindVars );\n\t\t$this->mDb->CompleteTrans();\n\n\t\twhile ($res = $result->fetchRow()) {\n\t\t\t$res['client_url'] = $this->getDisplayUrlFromHash( $res );\n\t\t\t$ret[] = $res;\n\t\t}\n\n\t\t$pListHash['cant'] = $cant;\n\t\tLibertyContent::postGetList( $pListHash );\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "3bea080f880993677903eac2a511a3ef", "score": "0.46381238", "text": "function cpvg_process_list($params)\n{\n global $table_prefix, $wpdb;\n\n $fields = array();\n $html = \"\";\n\n $db_data = cpvg_get_dbfields_names(\"list\");\n $list_data = $wpdb->get_var(\"SELECT \" . $db_data['options_field'] . \" FROM \" . $db_data['table_name'] . \" WHERE \" . $db_data['name_field'] . \" = '\" . $params['name'] . \"'\");\n\n if ($list_data) {\n $list_data = json_decode($list_data, true);\n $list_data['datafield_objects'] = array();\n\n //Arranges the necessary data to be used in the cpvg_process_page function\n foreach ($list_data['fields'] as $index => $value) {\n $section_name = explode(\".\", $value['name']);\n $list_data['fields'][$index]['section'] = $section_name[0];\n $list_data['fields'][$index]['name'] = $section_name[1];\n }\n\n //Saves a instances of earch datafield class that will be user later\n $datafields_files = cpvg_get_extensions_files(\"php\", CPVG_DATAFIELDS_DIR);\n $objects_data = array();\n foreach ($datafields_files as $datafield_file => $datafield_name) {\n require_once CPVG_DATAFIELDS_DIR . \"/\" . $datafield_file . \".php\";\n $datafield_object = new $datafield_file();\n\n foreach ($datafield_object->adminProperties() as $section_name => $section_data) {\n $list_data['datafield_objects'][$section_name] = $datafield_object;\n }\n }\n\n //Gets alls the parameters for the WP_Query\n $parameters_files = cpvg_get_extensions_files(\"php\", CPVG_PARAMETER_DIR);\n $parameter_data = array();\n\n\n foreach ($parameters_files as $parameters_file => $parameters_name) {\n require_once CPVG_PARAMETER_DIR . \"/\" . $parameters_file . \".php\";\n $parameter_object = new $parameters_file();\n\n foreach ($parameter_object->getParameterData() as $section_name => $param_data) {\n $parameter_data[$section_name] = $parameter_object;\n }\n }\n //Merge all the parameters with the $query_args var\n $query_args = array('post_type' => $list_data['post_type']);\n if (isset($list_data['param'])) {\n foreach ($list_data['param'] as $param_type => $param_records) {\n foreach ($param_records as $param_record_index => $param_record_data) {\n $query_args = array_merge_recursive($parameter_data[$param_record_data['section']]->applyParameterData($param_type, $param_record_data), $query_args);\n }\n }\n }\n\n if (isset($query_args['posts_per_page'])) {\n $query_args = array_diff_assoc($query_args, array('posts_per_page' => $query_args['posts_per_page']));\n }\n if (isset($query_args['usersorting_choice'])) {\n $query_args = array_diff_assoc($query_args, array('usersorting_choice' => $query_args['usersorting_choice']));\n }\n\n //Sets a custom filter required by the custom_date parameter if necssary\n if (isset($query_args['custom_date'])) {\n $custom_date_param = $query_args['custom_date'];\n $query_args = array_diff_assoc($query_args, array('custom_date' => $custom_date_param));\n $custom_date_function = create_function('$where', '$where.=\"' . $custom_date_param . '\"; return $where;');\n }\n\n if (isset($custom_date_function)) {\n add_filter('posts_where', $custom_date_function);\n }\n\n if (isset($query_args['author'])) {\n $query_args['author'] = implode(\",\", $query_args['author']);\n }\n\n $query_args['posts_per_page'] = 9999;\n $query_args['usersorting_choice'] = 0;\n\n //Performs query\n $query_result = new WP_Query($query_args);\n\n //Removes a custom filter if the custom_date parameter was used\n if (isset($custom_date_function)) {\n remove_filter('posts_where', $custom_date_function);\n }\n\n //Process all post data\n $posts_data = $query_result->posts;\n\n $records_data = array();\n foreach ($posts_data as $post_data) {\n $list_data['field_data'] = get_post_custom($post_data->ID);\n $list_data['post_data'] = $post_data;\n $list_data['labels'] = array();\n $pluginfiles = cpvg_get_pluginscode_files();\n\n foreach ($pluginfiles as $pluginfile_name) {\n include_once CPVG_PLUGINSCODE_DIR . \"/\" . $pluginfile_name . \".php\";\n\n $pluginfile_object = new $pluginfile_name();\n if ($pluginfile_object->isEnabled()) {\n $list_data = $pluginfile_object->processPageAdditionalCode($post_data->post_type, $list_data);\n $labels = $pluginfile_object->getCustomfields($post_data->post_type);\n if (!is_null($labels)) {\n $list_data['labels'] = $labels;\n }\n }\n }\n $records_data[] = cpvg_process_data($list_data, true);\n }\n\n //Apply theme\n ob_start();\n if (file_exists(CPVG_LIST_TEMPLATE_DIR . '/' . $list_data['template_file'] . \".php\")) {\n require CPVG_LIST_TEMPLATE_DIR . '/' . $list_data['template_file'] . \".php\";\n } else {\n //DISPLAYS DATA EVEN IF NO TEMPLATE WAS SELECTED\n foreach ($records_data as $record_data) {\n foreach ($record_data as $record) {\n echo \"<b>\" . $record['label'] . \"</b>: \" . $record['value'];\n }\n }\n }\n $html .= ob_get_contents();\n ob_end_clean();\n } else {\n $html .= \"No list view with the name '\" . $params['name'] . \"' was found.\";\n }\n\n return $html;\n}", "title": "" }, { "docid": "91398411241225a4ce5f7d218da3ae0b", "score": "0.46342734", "text": "static function listeVersions(&$db, $object) {\n\t\t\tglobal $langs,$conf,$hookmanager;\n\n\t\t\t$TVersion = self::getVersions($db, $object->id);\n\n\t\t\t$newToken = function_exists('newToken') ? newToken() : $_SESSION['newtoken'];\n\n\t\t\t$num = count($TVersion);\n $versionNumCurrent = self::getVersionNumFromProposalOrVersionList($db, $object, $TVersion);\n\n\t\t\t$url=DOL_URL_ROOT.'/comm/propal.php';\n\t\t\tif ((float) DOL_VERSION >= 4.0) {\n\t\t\t $url=DOL_URL_ROOT.'/comm/propal/card.php';\n\t\t\t}\n\n\t\t\tif($num>0) {\n\n\t\t\t\tprint '<div id=\"formListe\" style=\"clear:both; margin:15px 0\">';\n\t\t\t\tprint '<form name=\"formVoirPropale\" method=\"POST\" action=\"'.$url.'?id='.GETPOST('id','int').'\">';\n\t\t\t\tprint '<input type=\"hidden\" name=\"actionATM\" value=\"viewVersion\" />';\n\t\t\t\tprint '<input type=\"hidden\" name=\"socid\" value=\"'.$object->socid.'\" />';\n\n\t\t\t\tif(function_exists('newToken')){\n\t\t\t\t\tprint '<input type=\"hidden\" name=\"token\" value=\"'. $newToken .'\" />';\n\t\t\t\t}\n\n\t\t\t\tprint '<select id=\"propalehistory_id\" name=\"idVersion\">';\n\t\t\t\t$i = 1;\n $versionNumSelected = $i;\n\n\t\t\t\tforeach ($TVersion as &$row) {\n $versionNumRow = $i;\n if (!empty($conf->global->PROPALEHISTORY_RESTORE_KEEP_VERSION_NUM)) {\n $versionPropale = new TPropaleHist;\n $versionPropale->serialized_parent_propale = $row->serialized_parent_propale;\n $propale = $versionPropale->getObject();\n if (!empty($propale->array_options['options_propalehistory_version_num'])) {\n $versionNumRow = $propale->array_options['options_propalehistory_version_num'];\n }\n }\n\n\t\t\t\t\tif(isset($_REQUEST['idVersion']) && $_REQUEST['idVersion'] == $row->rowid){\n\t\t\t\t\t\t$selected = 'selected=\"selected\"';\n $versionNumCurrent = $versionNumRow;\n $versionNumSelected = $versionNumRow;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$selected = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$options = '<option id=\"' . $row->rowid . '\" value=\"' . $row->rowid . '\" ' . $selected . ' data-version-num=\"' . $versionNumRow . '\">'.$langs->trans('VersionNumberShort').' ' . $versionNumRow . ' - ' . price($row->total) . ' ' . $langs->getCurrencySymbol($conf->currency, 0) . ' - ' . dol_print_date($db->jdate($row->date_cre), \"dayhour\") . '</option>';\n\t\t\t\t\t$hookmanager->initHooks(array('propalehistory'));\n\t\t\t\t\t$parameters = array('row' => $row, 'selected' => $selected, 'versionNumber' => $versionNumRow);\n\t\t\t\t\t$action = '';\n\t\t\t\t\t$reshook = $hookmanager->executeHooks('listeVersion_customOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks\n\t\t\t\t\tif ($reshook > 0) $options = $hookmanager->resPrint;\n\n\t\t\t\t\tprint $options;\n\t\t\t\t\t$i++;\n\n\t\t\t\t}\n\n\t\t\t\tprint '</select>';\n\n print '<input type=\"hidden\" id=\"propalehistory_version_num_selected\" name=\"propalehistory_version_num_selected\" value=\"' . $versionNumSelected . '\" />';\n\n\t\t\t\tprint '<input class=\"butAction\" id=\"voir\" value=\"'.$langs->trans('Visualiser').'\" type=\"SUBMIT\" />';\n\t\t\t\tprint '</form>';\n\t\t\t\tprint '</div>';\n\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t$(document).ready(function(){\n\t\t\t\t\t\t$(\"#formListe\").appendTo('div.tabsAction');\n\n $(\"#propalehistory_id\").change(function() {\n var optionSelectedElem = $(\"option:selected\", this);\n $(\"#propalehistory_version_num_selected\").val(optionSelectedElem.attr(\"data-version-num\"));\n });\n\t\t\t\t\t})\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\treturn $versionNumCurrent;\n\t\t}", "title": "" }, { "docid": "e121e9d1ceae9c79cc38345c6f25179a", "score": "0.4632408", "text": "public function matchlist($username, $page = 1)\n {\n\t// TODO: check for non exists player name\n\n\t$p = new Player_Model();\n\t$player = $p->GetPlayerInfo($username);\n\t$this->template->title = 'Match List / ' . $player->acct_username;\n\n\n $this->template->content = new View('starcraft/matchlist');\n $this->template->content->player = $player;\n }", "title": "" }, { "docid": "85374b7c02b9c0de29c78a5cca6e3122", "score": "0.46323514", "text": "function DisplayListado() {\n global $ses_usr_id,$select_pag,$limite;\n global $rut,$texto_osot,$busqueda,$select_tipo,$select_tipo,$select_des,$select_estado,$select_local,$select4,$orden,$impresion,$where0,$radioE,$checkedS,$checkedT,$anoselect,$messelect,$radioR;\n\n $MiTemplate = new Template();\n $MiTemplate->debug = 0;\n $MiTemplate->set_root(DIRTEMPLATES);\n $MiTemplate->set_unknowns(\"remove\");\n\n $MiTemplate->set_var(\"PAGETITLE\",NOMBRE_SITIO);\n $MiTemplate->set_var(\"USR_NOMBRE\",get_nombre_usr( $ses_usr_id ));\n\n // Agregamos el header\n $MiTemplate->set_file(\"header\",\"header_ident.html\");\n\n // Agregamos el main\n $MiTemplate->set_file(\"main\",\"facturacion/facturacion_05.htm\");\n\n\t$MiTemplate->set_var(\"select_estado\",$select_estado);\n\t$MiTemplate->set_var(\"id_estado\",$id_estado);\n\t$MiTemplate->set_var(\"texto_osot\",$texto_osot);\n\t$MiTemplate->set_var(\"radioE\",$radioE);\n\t$MiTemplate->set_var(\"rut\",($rut)?$rut . \"-\" . dv($rut):\"\");\n\t$MiTemplate->set_var(\"rut1\",$rut);\n\t$MiTemplate->set_var(\"selectedM\" . $messelect, \"selected\"); \n\t$MiTemplate->set_var(\"messelect\", $messelect); \n\t$MiTemplate->set_var(\"select4\", $select4); \n\t$MiTemplate->set_var(\"anoselect\", $anoselect); \n\n\t//Para el orden de la query ppal\n\t$select4 = ($select4)?$select4:\"2\";\n\t$MiTemplate->set_var(\"selected4\".$select4,\"selected\");\n\n\tif ($select4==10){\n\t\t//Para el orden de la query ppal\n\t\t$select4 = ($select4)?$select4:\"2\";\n\t\t$MiTemplate->set_var(\"selected50\",\"selected\");\n\t}\n\n\t//Para Rango Fechas, Recuperamos los aņos disponibles\n $MiTemplate->set_block(\"main\", \"AnoDisp\", \"BLO_AnoDisp\");\n\t$query_A=\"SELECT distinct date_format(ot_fechacreacion, '%Y') as fecha, if (DATE_FORMAT( ot_fechacreacion, '%Y')='$anoselect', 'selected', '') selected \n\t\t\tFROM ot join os on os.id_os = ot.id_os \n\t\t\tWHERE ot_fechacreacion is not null and ot_tipo in ('SV') \n\t\t\tORDER BY 1\";\n\tquery_to_set_var( $query_A, $MiTemplate, 1, 'BLO_AnoDisp', 'AnoDisp' );\n\n\t//Recuperamos los estados\n $MiTemplate->set_block(\"main\", \"Estados\", \"BLO_estados\");\n\t$query_E=\"\tSELECT id_estado, esta_nombre, if ('$select_estado' = id_estado, 'selected', '') selected \n\t\t\t\tFROM estados\n\t\t\t\tWHERE esta_tipo = 'TV' and id_estado in ('VM', 'VP', 'VF') \n\t\t\t\tORDER BY orden\";\n\tquery_to_set_var( $query_E, $MiTemplate, 1, 'BLO_estados', 'Estados' );\n\t\n\tif ($radioE==\"ot\" && $texto_osot){\n\t\t$MiTemplate->set_var(\"checkedT\",\"checked\");\n\t\t$where4 = \" and ot.ot_id= \".$texto_osot;\n\t}\n\tif ($radioE==\"lo\" && $texto_osot){\n\t\t$MiTemplate->set_var(\"checkedL\",\"checked\");\n\t\t$where4 = \" and ot.id_lote= \".$texto_osot;\n\t}\n\tif ($radioE==\"fa\" && $texto_osot){\n\t\t$MiTemplate->set_var(\"checkedF\",\"checked\");\n\t\t$where4 = \" and li.num_factura= \".$texto_osot;\n\t}\n\n\t$where1 = ($rut)?\" and i.inst_rut = \" . ($rut) :\"\";\n\t$where2 = ($messelect)?\" and date_format(ot_ftermino, '%m') = $messelect\":\" \";\n\t$where3 = ($anoselect)?\" and date_format(ot_ftermino, '%Y') = $anoselect\":\" \";\n\t$where5 = ($select_estado)?\" and ot.id_estado = '\" . ($select_estado) .\"'\":\" \";\n\t$order1 = \" order by $select4\";\n////paginacion/////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t $MiTemplate->set_block(\"main\", \"Paginas\", \"PBLPaginas\");\n //Largo de los resultados por pantalla\n $limite = MONITOR_LI_FAC;\n\n\t$query_count = \"SELECT count(*) as cuenta \n\t\t\t\t\tFROM ot JOIN os on os.id_os = ot.id_os\t\t\n\t\t\t\t\tJOIN estados e on e.id_estado = ot.id_estado\n\t\t\t\t\tJOIN os_detalle osd on osd.ot_id = ot.ot_id\n\t\t\t\t\tJOIN instaladores i on i.id_instalador = ot.id_instalador\n\t\t\t\t\tLEFT JOIN lote_instalador li on li.id_lote = ot.id_lote\n\t\t\tWHERE e.id_estado in ('VM', 'VP', 'VF') $where1 $where2 $where3 $where4 $where5\";\n\t\t$rq_count = tep_db_query($query_count); \n $res_count = tep_db_fetch_array($rq_count);\n $total = ceil($res_count['cuenta'] / $limite);\n if ($select_pag == \"\"){\n $select_pag = 1;\n }\n $desde = ( $select_pag -1 ) * $limite;\n \n if ($total>0){\n for ($i=1;$i<=$total;$i++){\n if ($select_pag == $i)\n $MiTemplate->set_var('selected','selected');\n else \n $MiTemplate->set_var('selected','');\n $MiTemplate->set_var('pag',$i);\n $MiTemplate->parse(\"PBLPaginas\", \"Paginas\", true);\n }\n\t\t\tif ($res_count['cuenta']<$limite){\n\t\t\t\t$MiTemplate->set_var('inicio','<!--');\n\t\t\t\t$MiTemplate->set_var('fin','-->');\n\t\t\t}\n }\n else{\n $MiTemplate->set_var('pag',1);\n\t\t\t\t$MiTemplate->set_var('inicio','<!--');\n\t\t\t\t$MiTemplate->set_var('fin','-->');\n $MiTemplate->parse(\"PBLPaginas\", \"Paginas\", true);\n }\n\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n\n $MiTemplate->set_block(\"main\", \"lista\", \"PBLlistado\");\n\t$query=\"\n\t\t\tSELECT ot.ot_id,concat(inst_nombre, ' ', inst_paterno, ' ', inst_materno) instalador, osde_descripcion detalle, date_format(ot_ftermino, '%d/%m/%Y') ot_ftermino,osde_precio precio, ot.id_estado as estado,ot.id_lote lote, li.num_factura factura,li.numero1,li.numero2,esta_nombre, \n\t\t\tif (li.num_factura is null,'nf',li.num_factura) reqf,\n\t\t\tif (li.id_lote is null,'nl',li.id_lote) lotef,\n\t\t\tif (li.num_factura=0,'-',li.num_factura) factura ,\n\t\t\te.id_estado, ot.id_instalador,ot.id_os as id_os\n\t\t\tFROM ot JOIN os on os.id_os = ot.id_os\n\t\t\t\t\tJOIN estados e on e.id_estado = ot.id_estado\n\t\t\t\t\tJOIN os_detalle osd on osd.ot_id = ot.ot_id\n\t\t\t\t\tJOIN instaladores i on i.id_instalador = ot.id_instalador\n\t\t\t\t\tLEFT JOIN lote_instalador li on li.id_lote = ot.id_lote\n\t\t\tWHERE e.id_estado in ('VM', 'VP', 'VF') $where1 $where2 $where3 $where4 $where5 $order1 LIMIT \".($desde+0).\",\".($limite+0);\n\tquery_to_set_var( $query, $MiTemplate, 1, 'PBLlistado', 'lista' );\n //Recuperamos las fechas de creacion\n\t$MiTemplate->set_block(\"main\", \"Fecha_Creacion\", \"BLO_cre\");\n\t$queryf=\"\n\t\t\tSELECT DISTINCT date_format(ot_ftermino, '%d/%m/%Y') ot_ftermino, date_format(ot_ftermino, '%d/%m/%Y') fechat \n\t\t\tFROM ot JOIN os on os.id_os = ot.id_os\n\t\t\t\t\tJOIN estados e on e.id_estado = ot.id_estado\n\t\t\t\t\tJOIN os_detalle osd on osd.ot_id = ot.ot_id\n\t\t\t\t\tJOIN instaladores i on i.id_instalador = ot.id_instalador\n\t\t\t\t\tLEFT JOIN lote_instalador li on li.id_lote = ot.id_lote\n\t\t\tWHERE e.id_estado in ('VM', 'VP', 'VF') and ot_ftermino is not null $where1 $where2 $where3 $where4 $where5 order by ot_ftermino \n\t\";\n\tquery_to_set_var( $queryf, $MiTemplate, 1, 'BLO_cre', 'Fecha_Creacion' );\n\n\tinclude \"../../includes/footer_cproy.php\";\n\n $MiTemplate->pparse(\"OUT_H\", array(\"header\"), false);\n include \"../../menu/menu.php\";\n $MiTemplate->parse(\"OUT_M\", array(\"main\",\"footer\"), true);\n $MiTemplate->p(\"OUT_M\");\n}", "title": "" }, { "docid": "f697c176e6c21d66fb18d550dd529a32", "score": "0.46252468", "text": "function add_search_box($items, $args) {\n\n\tif ($args->theme_location == 'wfc-mobile-nav') {\n\t\n /*ob_start();\n get_search_form();\n $searchform = ob_get_contents();\n ob_end_clean();*/\n\n $search_args = 'Search Wildflower News';\n\n $items .= '<li id=\"mobile-search\" class=\"menu-item menu-item-type-post_type menu-item-object-page\">' . headway_get_search_form($search_args) . '</li>';\n }\n return $items;\n\t\n}", "title": "" }, { "docid": "2547f69e443158e5eec8626f1caa1bf6", "score": "0.46211255", "text": "function boxB_Gen()\n{\n echo \"<section>\";\n echo \"<h2>Galleries</h2>\";\n echo \"<ul id='galleryList'></ul>\";\n echo \"</section>\";\n}", "title": "" }, { "docid": "85a5fea49f49be871298b020aaa6475e", "score": "0.46201158", "text": "function show_player_stats_select_box ($con,$games,$intIdBox,$intID,$strInputName){\n\t echo '\n <div style=\"position:relative;\">\n\t ';\n\t \n if (!empty($intID)){ \n \t$query_sub=\"SELECT surname,name,id,nationality FROM players WHERE id=\".$intID;\n \tif ($con->GetQueryNum($query_sub)>0){\n\t $result_sub = $con->SelectQuery($query_sub);\n\t $write_sub = $result_sub->fetch_array();\n\t $intID=$write_sub['id'];\n\t $intName= '<a class=\"ico-show\" href=\"../mod_players/players_stats.php'.Odkaz.'&amp;id='.$intID.'\" title=\"Show PLAYER stats\">'.$write_sub['surname'].' '.$write_sub['name'].' ('.$write_sub['nationality'].')</a>';\n\t \n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n\t }else{\n $intID=\"\";\n\t $intName=\"none\";\n }\n \n \n echo '<span id=\"players_stats_name'.$intIdBox.'\">'.$intName.'</span>';\n echo '&nbsp;&nbsp;<a href=\"javascript:show_players_stats_window('.$intIdBox.')\" title=\"Edit player\"><img src=\"../inc/design/ico-edit.gif\" class=\"ico\" alt=\"Edit\"></a>'; \n echo'<div id=\"players_stats_livesearch_window'.$intIdBox.'\" class=\"livesearch_players_stats_window\">';\n echo '<div style=\"float:left\"><span class=\"label label-03\">Type name of player</span></div>';\n echo '<div style=\"float:right\"><a href=\"javascript:close_players_stats_window('.$intIdBox.')\" class=\"ico-delete\">close</a></div>';\n echo '\n <div style=\"clear:both; position:relative; padding:10px 0px 10px 0px; z-index:90\">\n <input type=\"text\" name=\"filter\" id=\"filter_players_stats'.$intIdBox.'\" autocomplete=\"off\" value=\"\" class=\"input-text\" style=\"width:140px;\" onkeyup=\"send_players_stats_livesearch_data(this.value,'.$intIdBox.')\" />\n <div id=\"players_stats_livesearch'.$intIdBox.'\" class=\"livesearch_players_stats\"></div>\n </div>\n ';\n echo '</div>';\n echo '</div>';\n echo '<input type=\"hidden\" id=\"players_stats_input'.$intIdBox.'\" name=\"'.$strInputName.'\" value=\"'.$intID.'\" />';\n }", "title": "" }, { "docid": "72641061e45ffece3629686b02183e81", "score": "0.46182707", "text": "function repeater( $name, $args = array(), $data, $echo = true ){\n global $MvcFramework;\n $data[] = array(); //Add another so there will be a new available row always\n $defaults = array(\n 'button_text' => 'Add Another',\n 'delete_button' => ' X '\n );\n $args = wp_parse_args($args, $defaults);\n\n $output = sprintf('<ul id=\"repeater-%s\">', $name );\n \n foreach( $data as $num => $row){\n $item = $num;\n //so the new ones may be cloned in javascript \n if( empty( $row ) ){\n // $num = '';\n }\n \n \n $output .= '<li style=\"list-style:none\" id=\"'.$name.'-item-'.$item.'\">\n <ul class=\"repeater-item\">';\n \n //Go through all the fields\n foreach( $args['fields'] as $key => $field ){\n $output .= '<li style=\"list-style:none\">';\n //labels \n if( is_array( $field ) ){\n if( strpos($key,'repeater') === false && strpos($key,'hidden') === false ){\n $this_field = str_replace(array('select_','button_','image_'),array('',''), $key);\n $label = $MvcFramework->human_format_slug($this_field);\n $output .= sprintf('<label for=\"%s\">%s</label> : ', $this_field, $label );\n }\n } else {\n $label = $MvcFramework->human_format_slug($field);\n $output .= sprintf('<label for=\"%s\">%s</label> : ', $field, $label );\n }\n\n \n if( isset( $args['descriptions'][$key] ) ){\n $output .= sprintf('<span class=\"description\">%s</span>', $args['descriptions'][$key]); \n }\n\n //Checkbox\n if( strpos($key,'checkbox') !== false ){\n if( !isset($data[$num][$field]) ) $data[$num][$field] = '';\n $output .= $this->checkbox($name.'['.$num.']['.$field.']', $data[$num][$field], false );\n } \n \n //Button\n elseif( strpos($key,'button_') !== false ){\n $field_name = str_replace('button_', '', $key);\n $output .= $this->button($field_name, $field, false );\n } \n \n \n //Select Field \n elseif( strpos($key,'select') !== false ){\n $field_name = str_replace('select_', '', $key);\n if( !isset($data[$num][$field_name]) ) $data[$num][$field_name] = ''; \n $field['selected'] = $data[$num][$field_name];\n $output .= $this->select($name.'['.$num.']['.$field_name.']', $field, false );\n \n } \n \n //textarea field\n elseif( strpos($key,'textarea') !== false ){\n if( !isset($data[$num][$field]) ) $data[$num][$field] = ''; \n $output .= $this->textarea($name.'['.$num.']['.$field.']', $data[$num][$field], array(), false);\n }\n \n \n //repeater field\n elseif( strpos($key,'repeater') !== false ){\n $field_name = str_replace('repeater_', '', $key);\n if( !isset($data[$num][$field_name]) ) $data[$num][$field_name] = ''; \n $output .= $this->repeater($name.'['.$num.']['.$field_name.']', $field, $data[$num][$field_name], array(), false);\n }\n \n //Hidden field\n elseif( strpos($key,'hidden_') !== false ){\n $field_name = str_replace('hidden_', '', $key);\n if( !isset($data[$num][$field_name]) ) $data[$num][$field_name] = '';\n $field['extras'] = array( 'item' => $num );\n \n $output .= $this->hidden($name.'['.$num.']['.$field_name.']', $field, false);\n \n //Image Upload Form\n } elseif( strpos($key, 'image_') !== false ){\n \n if( isset( $field['name'] ) ){\n $field_name = $field['name'];\n unset( $field['name'] );\n } else { \n $field_name = str_replace('image_', '', $key);\n }\n \n $field['id'] = $name.'-'.$num.'-'.$field_name;\n\n $output .= $this->imageUploadForm($name.'['.$num.']['.$field_name.']', $data[$num][$field_name], $field, false ); \n\n //Standard Text Field \n } else {\n \n if( !isset($data[$num][$field]) ) $data[$num][$field] = '';\n \n $params = array(\n 'value' => $data[$num][$field],\n 'id' => $field\n );\n $output .= $this->text($name.'['.$num.']['.$field.']', $params, false);\n }\n\n $output .= '</li>';\n \n }\n \n $output .= '<li class=\"delete-button\"><input type=\"button\" remove=\"'.$name.'-item-'.$item.'\" class=\"delete\" value=\"'.$args['delete_button'].'\" /></li>';\n \n $output .= '</ul>';\n \n $output .= '</li>';\n\n }\n \n $output .= '</ul>';\n \n $output .= sprintf('<div id=\"another-%s\" class=\"another\">', $name );\n \n $output .= $this->get_submit_button($args['button_text'],'secondary','repeater-add-'.$name, '<div class=\"repeater-add\">', array('id'=> 'repeater-add-'.$name) );\n $output .= '</div>';\n \n $output .= '<div class=\"clear\"></div>';\n \n ob_start();\n ?>\n <script type=\"text/javascript\">\n jQuery(function($){\n var newId;\n var count = 1;\n $('#repeater-add-<?php echo $name; ?>').click( function(){\n var another = $('#repeater-<?php echo $name; ?> > li').last().clone();\n another.find('[type=\"text\"]').val('');\n another.find('[type=\"checkbox\"]').attr('checked', false);\n\n another.filter('[id]').each( function(){\n newId = this.id+count;\n this.id = newId;\n var oldId = another.find('input').attr('id');\n another.find('input').attr('id', oldId+count);\n another.find('input').attr('rel', oldId+count);\n $(this).html( $(this).html().replace(/<?php echo $name; ?>\\[/g,'<?php echo $name; ?>['+count) );\n $(this).find('.delete').attr('remove',newId);\n count++;\n });\n \n \n $('#repeater-<?php echo $name; ?> > li').last().after(another);\n $('.delete').click( function(){\n $('#'+$(this).attr('remove')).remove();\n });\n \n \n //In case of the repeater being used with the image uploader\n $(another).find('.image_upload').click(function() {\n formfield = $(this).attr('rel');\n tb_show('', 'media-upload.php?type=image&TB_iframe=true');\n return false;\n });\n \n return false;\n });\n \n $('.delete').click( function(){\n $('#'+$(this).attr('remove')).remove();\n });\n \n });\n </script>\n <?php\n \n \n $output .= ob_get_clean();\n \n if( !$echo ){\n return $output;\n }\n \n echo $output;\n }", "title": "" }, { "docid": "c21a14c26d9d1ec4c335df41388a9c5b", "score": "0.46160415", "text": "public function lstUnitGenre_Change() {\r\n \t$objUnitGenre = UnitGenre::Load($this->lstUnitGenre->SelectedValue);\r\n \t$objConditions = QQ::Equal(QQN::Size()->Category, $objUnitGenre->Category);\r\n \t$objSizeArray = Size::QueryArray($objConditions);\r\n \t$this->lstSize->RemoveAllItems();\r\n \tforeach($objSizeArray as $objSize) {\r\n \t\t$this->lstSize->AddItem($objSize->Value, $objSize->Id);\r\n \t} \t\r\n }", "title": "" }, { "docid": "80e3ceb83043abecd1ed915cb60fb550", "score": "0.46124136", "text": "public function getMatches();", "title": "" }, { "docid": "125c0e71045535a942020b0ed2a23f33", "score": "0.46105486", "text": "function generateBoxes() {\n global $db, $dbGame;\n $a = array(8);\n $counter = 0;\n $matches = $db->prepare(\"SELECT * FROM matches WHERE winner='undecided' AND game=?\");\n $matches->execute(array($dbGame));\n foreach($matches as $row) {\n $teams = $db->prepare(\"SELECT * FROM teams WHERE id=? OR id=?\");\n $teams->execute(array($row['team0'], $row['team1']));\n $teams = $teams->fetchAll(PDO::FETCH_ASSOC);\n $buttonClass0 = \"btn btn-info\";\n $buttonClass1 = \"btn btn-info\";\n $matchBoxClass = \"match-box upcoming\";\n \n $a[$counter++] = $teams[0]['name'];\n $a[$counter++] = $teams[1]['name'];\n \n //Checks if the user already has a bet for this match and in that case colors the appropriate button.\n if(isset($_SESSION['id'])) {\n $bet = $db->prepare(\"SELECT * FROM bets WHERE user_id=? AND match_id=? AND (team_id=? OR team_id=?)\");\n $bet->execute(array($_SESSION['id'], $row['id'], $teams[0]['id'], $teams[1]['id']));\n if($bet->rowCount() > 0) {\n $bet = $bet->fetchAll(PDO::FETCH_ASSOC);\n if($bet[0]['team_id'] === $teams[0]['id'])\n $buttonClass0 = str_replace(\"btn-info\", \"btn-success\", $buttonClass0);\n else if($bet[0]['team_id'] === $teams[1]['id'])\n $buttonClass1 = str_replace(\"btn-info\", \"btn-success\", $buttonClass1);\n }\n }\n \n //Style buttons as disabled if the match in ongoing.\n if($row['ongoing']) {\n $matchBoxClass .= \"match-box\";\n $buttonClass0 .= \" disabled\";\n $buttonClass1 .= \" disabled\";\n }\n \n //Calculate time remaining if not ongoing.\n $timeClass = \"\";\n if(!$row['ongoing']) {\n $seconds = strtotime($row['played_at']) - time();\n $hours = floor($seconds / 3600);\n $seconds %= 3600;\n $minutes = floor($seconds / 60);\n if(strlen($minutes) === 1) $minutes = \"0\".$minutes;\n $seconds %= 60;\n if(strlen($seconds) === 1) $seconds = \"0\".$seconds;\n $timeRemaining = \"Time left: $hours:$minutes:$seconds\";\n }\n else $timeRemaining = \"<strong>Ongoing</strong>\";\n\n echo\n \"\n <div class='col-md-3 col-sm-6'>\n <div class='{$matchBoxClass}' id='{$row['id']}'>\n <div class='match-header'>\n <h4>Quarter-Finals</h4>\n <p>{$teams[0]['name']} VS {$teams[1]['name']}</p>\n </div>\n <div class='match-logos'>\n <img class='team-logo' src='images/teamlogos/{$teams[0]['abbreviation']}.png' alt=\\\"{$teams[0]['name']}'s logotype.\\\"/>\n <img class='versus' src='images/vs.png' alt='Versus.'/>\n <img class='team-logo' src='images/teamlogos/{$teams[1]['abbreviation']}.png' alt=\\\"{$teams[1]['name']}'s logotype.\\\"/>\n </div>\n <button class='{$buttonClass0}' id='{$teams[0]['id']}' onclick='makeBet(this)' style='margin-right: 5px;'>Bet {$teams[0]['abbreviation']}</button>\n <button class='{$buttonClass1}' id='{$teams[1]['id']}' onclick='makeBet(this)' style='margin-left: 5px;'>Bet {$teams[1]['abbreviation']}</button>\n <p class='counter' style='margin-top: 10px;'>{$timeRemaining}</p>\n </div>\n </div>\n \";\n }\n $GLOBALS['teams'] = $a;\n}", "title": "" }, { "docid": "915266f5227467f7905a86f723433587", "score": "0.46099895", "text": "function user_get_users_list_option($instance){\n$output = '';\nglobal $wpdb; \n$users = $wpdb->get_results(\"SELECT display_name, ID FROM $wpdb->users\");\n\tforeach($users as $u){\n $uname = $u->display_name;\n $uid = $u->ID;\n $output .=\"<option value='$uid'\";\n if($instance == $uid){\n $output.= 'selected=\"selected\"';\n } \n $output.= \">$uname</option>\";\n\t}\nreturn $output;\n}", "title": "" }, { "docid": "694bbf1789f1be8c74ccb28d34dcf16b", "score": "0.46083513", "text": "public static function selectOptions();", "title": "" }, { "docid": "1dd4ab551912aefc375f5fe9f2f7bd21", "score": "0.4602802", "text": "public function createList(){\n\t\t\n\t\t$listData = \"<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" id=\\\"\".$this->listID.\"\\\" class=\\\"table table-hover\\\" width=\\\"\".$this->listWidth.\"\\\">\";\n\t\t# Create the row columns\n\t\t$listData.= \"<tr>\";\n\t\tforeach($this->ItemArr as $key => $values){\n\t\t\tunset($matches,$matches2);\n\t\t\tpreg_match_all(\"/{(.*)}/i\", $values, $matches);\n\t\t\tpreg_match_all(\"|\\[[^\\]]+\\]|i\" ,$matches[1][0], $matches2);\n\t\t\t\n\t\t\t$width = (isset($matches2[0][3]) && !empty($matches2[0][3])) ? \"width=\\\"\".$this->pregString($matches2[0][3]).\"\\\"\" : \"\";\n\t\t\t$urlKEY[$key] = (isset($matches2[0][4]) && !empty($matches2[0][4])) ? $this->pregString($matches2[0][4]) : \"\";\n\t\t\t$cssClass = (isset($matches2[0][5]) && !empty($matches2[0][5])) ? \"colHeader \".$this->pregString($matches2[0][5]) : \"colHeader\";\n\t\t\t$style = (isset($matches2[0][6]) && !empty($matches2[0][6])) ? \"style=\\\"\".$this->pregString($matches2[0][6]).\"\\\"\" : \"\";\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$useOrder = $this->pregString($matches2[0][2]);\n\t\t\t\n\t\t\t$splitField = explode(\":\",$this->pregString($matches2[0][1]));\n\t\t\t$useField[] = (!empty($splitField[1])) ? \" ' ' as \".$splitField[1]: $splitField[0];\n\t\t\t$dbField = (!empty($splitField[1])) ? $splitField[1]: $splitField[0];\n\t\t\t$dbFields[] = $dbField;\n\t\t\t\n\t\t\t\n\t\t\tswitch($dbField){\n\t\t\t\tdefault:\n\t\t\t\t\t$listData.= \"<th \".$width.\" class=\\\"\".$cssClass.\"\\\" \".$style.\" valign=\\\"middle\\\">\";\n\t\t\t\t\t$listData.= $this->pregString($matches2[0][0]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif($useOrder!='N'){\n\t\t\t\t$orderField = $orderFlag = \"\";\n\t\t\t\tlist($orderFlag,$orderField) = explode(\":\",$useOrder);\n\t\t\t\t$dbField = (!empty($orderField)) ? $orderField : $dbField;\n\t\t\t\tif($dbField==$this->orderBy){\n\t\t\t\t\t$listData.= \"<span style=\\\"padding-left:10px;\\\"><a href=\\\"\".$this->currentPageURL.\"?orderBy=$dbField&orderTyp=\".(($this->orderTyp=='asc')? \"desc\" :\"asc\").\"\".$this->extraURLPara.\"\\\">\".(($this->orderTyp=='asc')? $this->orderAsc : $this->orderDesc).\"</span>\";\n\t\t\t\t}else{\n\t\t\t\t\t$listData.= \"<span style=\\\"padding-left:10px;\\\"><a href=\\\"\".$this->currentPageURL.\"?orderBy=$dbField&orderTyp=desc\".$this->extraURLPara.\"\\\">\".$this->orderAsc.\"</span>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$listData.= \"</th>\";\n\t\t}\n\t\t\n\t\t$this->SQL = (!empty($this->SQL)) ? $this->SQL : $this->createListSQL($useField);\n\t\t\n\t\t# Create the row data\n\t\tif($result = $this->model->find_by_sql($this->SQL)){\n\t\t\tif(($this->currentPageRes = count($result)) > 0){\n\t\t\t\t\n\t\t\t\t$sql = \"select FOUND_ROWS() as totRows \";\n\t\t\t\t$cntData = $this->model->find_by_sql($sql);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->totResult = $cntData[0]->totrows;\n\t\t\t\t$listData.= \"<tr>\\n\";\n\t\t\t\tforeach($result as $item){\n\t\t\t\t\t$recID = $item->id;\n\t\t\t\t\tforeach($dbFields as $i=> $dbkey){\n\t\t\t\t\t\tswitch($dbkey){\n\t\t\t\t\t\t\tcase \"status\":\n\t\t\t\t\t\t\t\t$listData.= \"<td class=\\\"colData\\\" align=\\\"center\\\" valign=\\\"middle\\\">\".(($item->$dbkey=='0') ? $this->inactiveImg : $this->activeImg).\"</td>\\n\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"deleteField\":\n\t\t\t\t\t\t\t\t$url = $urlKEY[$i];\n\t\t\t\t\t\t\t\t$listData.= \"<td class=\\\"colData\\\" valign=\\\"middle\\\" align=\\\"center\\\"><a href=\\\"\".$url.\"/\".$recID.\"\".$this->extraURLPara.\"\\\" onclick=\\\"return confirm('\".$this->deleteMsg.\"')\\\">\".$this->deleteImg.\"</a></td>\\n\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"editField\":\n\t\t\t\t\t\t\t\t$url = $urlKEY[$i];\n\t\t\t\t\t\t\t\t$listData.= \"<td class=\\\"colData\\\" valign=\\\"middle\\\" align=\\\"center\\\"><a href=\\\"\".$url.\"/\".$recID.\"\".$this->extraURLPara.\"\\\">\".$this->editImg.\"</a></td>\\n\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$listData.= \"<td class=\\\"colData\\\" valign=\\\"top\\\">\".strip_tags(stripslashes($item->$dbkey));\n\t\t\t\t\t\t\t\t$listData.= \"</td>\\n\";\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\t$listData.= \"</tr>\\n\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->listError();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$listData.= \"</table>\";\n\t\t\n\t\tif($this->pageNavigator){\n\t\t\t$this->showPageNavigator();\n\t\t}\n\t\techo $listData;\n\t}", "title": "" }, { "docid": "8653f5ba718c6b3e929139990ede18d8", "score": "0.46017176", "text": "function box_displayInput($xmldata, $data) {\n\tglobal $gSession, $Auth, $g_pageID,$input_language;\n\t\t\n\t## we need to load the language specific strings\n\tinclude(ENGINE.\"datatypes/box/interface/lang/\".$Auth->auth[\"language\"].\".php\");\n\n\t## init the vars\n\t$return = \"\";\n\n\t## we should open our own template\n\t$template = new Template(ENGINE.\"datatypes/box/interface/\");\n\t$template->set_templatefile(array(\"box\" => \"interface.tpl\",\"boxmax\" => \"interface.tpl\",\"box_row\" => \"interface.tpl\",\"box_foot\" => \"interface.tpl\"));\n\t\n\t## set the vars\n\t$template->set_var('element_name',$xmldata['NAME']);\n\t$template->set_var('BOXID',$xmldata['NAME']);\n\t$template->set_var('element_desc',$xmldata['DESC']);\n\t\t\n\t## prepare the vars\n\t$linklistID = $data['id'];\n\t$basename \t= $xmldata['TEMPLATE'];\n\t\n\t## prepare the url\n\t$addlinkURL = SITE.\"datatypes/box/editor.php?op=add&page_id=\".$g_pageID.\"&identifier=\".$xmldata['NAME'].\"&language=\".$input_language.\"&linklistID=\".$linklistID.\"&basename=\".$basename;\n\t$addlinkURL = $gSession->url($addlinkURL);\t\n\t\n\t$deletelinkURL = SITE.\"datatypes/box/editor.php?op=delete&page_id=\".$g_pageID.\"&identifier=\".$xmldata['NAME'].\"&language=\".$input_language.\"&linklistID=\".$linklistID;\t\t\n\t$deletelinkURL = $gSession->url($deletelinkURL);\n\t\n\t## the sort link (we will use our own editor, not the admin.php\n\t$sortURL = SITE.\"datatypes/box/editor.php?op=sort&page_id=\".$g_pageID.\"&identifier=\".$xmldata['NAME'].\"&language=\".$input_language.\"&linklistID=\".$linklistID;\n\t$sortURL = $gSession->url($sortURL);\t\n\t\n\t## set the vars\n\t$template->set_var('addlinkItemURL',$addlinkURL);\t\n\t$template->set_var('deletelinkItemURL',$deletelinkURL);\n\t$template->set_var('sortURL',$sortURL);\n\t\n\tif(!$xmldata['TAG']) {\n\t\t$template->set_var('element_tag',LANG_box_Title);\n\t} else {\n\t\t$template->set_var('element_tag',$xmldata['TAG']);\n\t}\t\n\t\n\t## get the number of records\n\t$items = $data['length'];\n\t## now check if we are allowed to set another one\n\tif($items >= $xmldata['MAXCOUNT'] && isset($items) && isset($xmldata['MAXCOUNT'])) {\n\t\t## output the stripped down block\n\t\t$return = $template->fill_block(\"boxmax\");\n\t} else {\n\t\t$return = $template->fill_block(\"box\");\n\t}\n\t\n\t## process the entry settings first we need to find out what type the entry field is\n\t$options = _box_generateOptions($xmldata['ENTRY']);\t\n\t$entries = _box_generateEntries($xmldata['ENTRY']);\t\n\t\n\t## loop through all records\n\tfor($i=0; $i< $items; $i++) {\n\t\t$description = \"\";\t\n\t\t## we need to output all specified options\n\t\t## so we get them here\n\t\t$page_data = page_getPage($data[$i][\"target\"],$options);\n\t\t## and now we loop through the data\n\t\tforeach($entries as $current_entry) {\n\t\t\t$element_type = $current_entry['TYPE'];\n\t\t\t$element_name = $current_entry['NAME'];\t\n\n\t\t\tswitch($element_type) {\n\t\t\t\tcase 'LINK':\n\t\t\t\tcase 'DATE':\n\t\t\t\tcase 'IMAGE':\n\t\t\t\tcase 'LINKLIST':\n\t\t\t\tcase 'FILE':\n\t\t\t\tcase 'COPYTEXT':\t\t\t\t\n\t\t\t\tcase 'TEXT': {\n\t\t\t\t\t$target = strtolower($element_type);\n\t\t\t\t\tif(function_exists($target.\"_displayPreview\")) {\t\t\t\t\n\t\t\t\t\t\teval(\"\\$preview .= \".$target.\"_displayPreview(\\$current_entry,\\$page_data[\\$element_name]);\");\n\t\t\t\t\t\tif($preview != \" \" && $preview !=\"\") {\n\t\t\t\t\t\t\t$description .= $preview.'<br>';\n\t\t\t\t\t\t\t$preview = '';\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\t\t\t\t\t\t\t\n\n\t\t## okay we have contents- we also need to output the template that was used\n\t\t$template->set_var('decription',$description);\n\n\t\t$templateInfo = template_getTemplate($data[$i][\"target\"]);\n\t\tif(isset($templateInfo['title'])) {\n\t\t\t$template_text = ''.$templateInfo['title'].'&nbsp;';\n\t\t} else {\n\t\t\t$template_text = ''.$data[$i][\"item_id\"].'&nbsp;';\n\t\t}\t\t\t\t\t\t\t\n\t\t$template->set_var('template',$template_text);\n\t\t\t\t\t\n\t\t$template->set_var('linkID',$data[$i]['item_id']);\t\t\n\t\t$return .= $template->fill_block(\"box_row\");\n\t\t\n\t\t## reset the vars\n\t\t$template->set_var('decription','');\n\t\t$template->set_var('template','');\n\t}\n\t$return .= $template->fill_block(\"box_foot\");\n\t\t\t\t\t\t\n\treturn $return;\n}", "title": "" } ]
0add178b0c8c4d701aaa1e6f8e352367
Update the specified venue in storage
[ { "docid": "f6c30af33f85cfe23db88a27097e8eb0", "score": "0.659463", "text": "public function update(VenueRequest $request, Venue $venue)\n {\n $venue->update($request->all());\n\n return redirect()->route('media.venue.index')->withStatus(__('Venue successfully updated.'));\n }", "title": "" } ]
[ { "docid": "eeae6644fb373e3671040c41dd6448da", "score": "0.633516", "text": "public function update(Request $request, $id)\n {\n $request->user()->authorizeRoles(['administrator', 'manager']);\n $this->validate($request, [\n 'name' => 'required|max:80',\n 'description' => 'required',\n 'date_from' => 'required|date_format:Y-m-d',\n 'date_to' => 'required|date_format:Y-m-d|after_or_equal:date_from',\n 'venue_name_livesearch' => 'required|exists:venues,name',\n 'img' => 'image|nullable|max:1999'\n ]);\n\n //Handle file upload\n if($request->hasFile('img')){\n //Get filename with the extension\n $filenamewithExt = $request->file('img')->getClientOriginalName();\n //Get just filename\n $filename = pathinfo($filenamewithExt,PATHINFO_FILENAME); \n //Get just ext\n $extension = $request->file('img')->guessClientExtension(); \n //FileName to store\n $fileNameToStore = time().'.'.$extension; \n //Upload Image\n $path = $request->file('img')->storeAs('public/cover_images/',$fileNameToStore);\n }\n\n \n\n\n //Update event\n $venue_id = Venue::where('name', ($request->input('venue_name_livesearch')))->first()->id;\n\n $event = Event::find($id);\n\n\n //Delete image if changed\n if($request->hasFile('cover_image')){\n if($event->cover_image != 'noimage.jpg') {\n Storage::delete('public/cover_images/' . $event->cover_image);\n }\n $event->cover_image = $fileNameToStore;\n }\n\n $event->name = $request->input('name');\n $event->description = $request->input('description');\n $event->date_from = $request->input('date_from');\n $event->date_to = $request->input('date_to');\n $event->venue_id = $venue_id;\n\n\n\n if($request->hasFile('img')){\n if($event->img != 'noimage.jpg'){\n Storage::delete('public/cover_images/'.$event->img);\n }\n $event->img = $fileNameToStore;\n }\n\n $event->save();\n\n //Categories\n $categories_checkbox = $request->get('category');\n Event::find($id)->event_category()->sync($categories_checkbox);\n\n //Tickets\n $event->ticket()->delete();\n if ($request->ticket){\n foreach ($request->ticket as $value) { \n \n $ticket = new Ticket;\n $ticket->name = $value['name'];\n $ticket->price = $value['price'];\n $ticket->event_id = $id;\n $ticket->save();\n }\n }\n\n return redirect('/events')->with('success', 'Akce byla úspěšně upravena!');\n \n }", "title": "" }, { "docid": "be2d5c2409aa40b60646e3c1832fc5cf", "score": "0.6109442", "text": "public function update(Request $request, Venue $venue)\n {\n try {\n $validator = Validator::make($request->all(), [\n 'municipio' => 'required|numeric',\n 'nombre' => 'required|string|min:2',\n 'status' => 'required|numeric',\n ]);\n\n if ($validator->fails()) {\n $errors = $validator->errors();\n return response()->json(['success' => false, 'message' => $errors->first()], 400);\n }\n\n $venue->update([\n 'ID_MUNICIPIO' => $request->get('municipio'),\n 'CENTRO' => $request->get('nombre'),\n 'ACTIVO' => $request->get('status'),\n ]);\n\n return response()->json([\n 'success' => true,\n 'message' => 'El centro de consumo se actualizó correctamente!',\n 'venue' => $venue\n ], 201);\n } catch (\\Exception $ex) {\n return response()->json(['success' => false, 'message' => \"Error, código 500\"], 500);\n }\n }", "title": "" }, { "docid": "6acf98069c9402c3205b2845f0494940", "score": "0.5994272", "text": "public function update()\n {\n //\n $vesselid = Request::input('vesselid');\n $vessel = Vessels::find($vesselid);\n\n $vessel->type_id = Request::input('vesseltype');\n $vessel->name = Request::input('vesselname');\n $vessel->tracking_id = Request::input('trackingid');\n $vessel->reg_number = Request::input('registrationnumber');\n $vessel->capacity_seat = Request::input('capacity_seats');\n $vessel->capacity_volume = Request::input('capacity_volume');\n $vessel->capacity_weight = Request::input('capacity_weight');\n $vessel->speed = Request::input('speed');\n $vessel->description = Request::input('description');\n\n if($vessel->save()) {\n return redirect()->back()->with(['error_caption' => 'Success!', 'error_type' => 'success', 'error_message' => 'Vessel informations updated successfully.']);\n } else {\n return redirect()->back()->with(['error_caption' => 'Error!', 'error_type' => 'error', 'error_message' => 'Vessel informations updated failed. Please try again.']);\n }\n }", "title": "" }, { "docid": "11632d0bfbe602277de7e4379ac352ed", "score": "0.59517306", "text": "public function put($data){\n\tif(isset($data['id'])){$this->id = (int) $data['id'];}\n\tif(isset($data['user_id'])){$this->userId = (int) $data['user_id'];}\n\tif(isset($data['venue_id'])){$this->venueId = (int) $data['venue_id'];}\n\tif(isset($data['status'])){$this->status = sanitize_text_field($data['status']);}\n\tif(isset($data['preferred'])){$this->preferred = sanitize_text_field($data['preferred']);}\n\tif(isset($data['name'])){$this->name = sanitize_text_field(stripslashes($data['name']));}\n\tif(isset($data['description'])){ \n\t\t$this->description = stripslashes(wp_filter_kses( substr( $data['description'], 0, get_option('eom_description_max')))); \n\t}\n\tif(isset($data['price']) && is_numeric($data['price'])){ $this->price = $data['price']; }\n\tif(isset($data['image'])){$this->image = sanitize_text_field($this->valid_url(stripslashes($data['image'])));}\n\tif(isset($data['url'])){$this->url = sanitize_text_field($this->valid_url(stripslashes($data['url'])));}\n\t//if(!$this->name){$this->error[] = 'Invalid Event Name';}\n\t//if(!$this->description){$this->error[] = 'Invalid Event Description';}\n}", "title": "" }, { "docid": "b743d37c52d097cc14915bd0a16b770e", "score": "0.58430594", "text": "public function update_put() {\n\n }", "title": "" }, { "docid": "3793a5cc22b9f3ccfe463614188e3f28", "score": "0.5747775", "text": "public function update(UpdateVenueRequest $request, Venue $venue)\n {\n $venue = $this->venuesRepository->update($request->all(), $venue->id);\n\n if (!$venue) {\n \\Session::flash('flash_message_error', 'Faield to update Venue.');\n return redirect()->back()->withInput();\n }\n\n \\Session::flash('flash_message_success', 'Venue Updated.');\n return redirect('/admin/venues');\n }", "title": "" }, { "docid": "0790e43dc42f5bd10f56cb86b65a32b6", "score": "0.5721694", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'nama_tempat' =>'required',\n 'harga' =>'required',\n 'deskripsi' =>'required',\n\n ]);\n \n\n $venue = Venue::find($id);\n if(empty($request->image)){\n $venue->nama_tempat = $request->get('nama_tempat');\n $venue->harga = $request->get('harga');\n $venue->deskripsi = $request->get('deskripsi');\n $venue->save();\n return redirect('/venue')->with('success', 'Data venue Berhasil Terupdate'); \n } else { \n $imageName = time().'.'.$request->image ->getClientOriginalExtension();\n $request->image->move(public_path('images'), $imageName); \n $venue->nama_tempat = $request->get('nama_tempat');\n $venue->harga = $request->get('harga');\n $venue->deskripsi = $request->get('deskripsi');\n $venue->image = $imageName;\n $venue->save();\n return redirect('/venue')->with('success', 'Data venue Berhasil Terupdate');\n } \n \n }", "title": "" }, { "docid": "4238630fe835e2630790aa3af70cdd6d", "score": "0.56961346", "text": "public function update($segement);", "title": "" }, { "docid": "c4d9d4175474fede208175f283236fe4", "score": "0.5672246", "text": "function updateVenue($fields) {\n $queryString = \"update venue set \";\n $updateId = 0;\n $numRows = 0;\n $items = array();\n $types = \"\";\n foreach ($fields as $k=>$v) {\n switch($k) {\n case \"name\":\n $queryString .= \"name = ?,\";\n $items[] = &$fields[$k]; //may have to come back and change\n $types .= \"s\";\n break;\n case \"capacity\":\n $queryString .= \"capacity = ?,\";\n $items[] = &$fields[$k]; //may have to come back and change\n $types .= \"i\";\n break;\n case \"id\":\n $updateId = intVal($v);\n break;\n }\n }\n $queryString = trim($queryString, \",\");\n $queryString .= \" where idvenue = ?\";\n $types .= \"i\";\n $items[] = &$updateId;\n\n if ($stmt = $this->dbh->prepare($queryString)) {\n $refArr = array_merge(array($types), $items);\n $ref = new ReflectionClass(\"mysqli_stmt\");\n $method = $ref->getMethod(\"bind_param\");\n $method->invokeArgs($stmt, $refArr);\n $stmt->execute();\n $stmt->store_result();\n $numRows = $stmt->affected_rows;\n }\n\n return $numRows;\n }", "title": "" }, { "docid": "1b1a8249e5bf533ccc08a1446e59e4e0", "score": "0.5645261", "text": "public function update(Request $request)\n {\n // $request_all = $request->all(); \n\n $request->validate([\n 'title' => 'required',\n 'address_street' => 'required|max:255',\n 'street_number' => 'required|max:10',\n 'city' => 'required|max:100',\n 'zip_code' => 'required|max:10',\n 'province' => 'required|max:100',\n 'nation' => 'required|max:100',\n 'rooms_number' => 'required|integer',\n 'beds_number' => 'required|integer',\n 'bathrooms_number' => 'required|integer',\n 'floor_area' => 'required|numeric',\n ]);\n\n $formData = $request->all();\n \n $apartmentId = (int)$request->apartment_id;\n\n $apartment = Apartment::findOrFail($apartmentId);\n\n // $apartment->apartment_id = $formData['apartment_id'];\n if (!key_exists(\"extraServices\", $formData)) {\n $formData[\"extraServices\"] = [];\n }\n\n $apartment->extra_services()->sync($formData[\"extraServices\"]);\n\n if (key_exists(\"img_url\", $formData)) {\n \n if ($apartment->img_url) {\n Storage::delete($apartment->img_url);\n }\n\n $storageResult = Storage::put(\"img_url\", $formData[\"img_url\"]);\n\n $formData[\"img_url\"] = $storageResult;\n }\n $apartment->update($formData);\n\n return redirect()->route('admin.apartments.index');\n }", "title": "" }, { "docid": "b43424d9f6cf6e340706fe59c73f73bb", "score": "0.5629383", "text": "public function update(Request $request)\n {\n\n //dd($request->all());\n\n $variant_name = VehicleVariant::findOrFail($request->variant)->name;\n\n //dd($variant_name);\n\n $segment_details=VehicleSegmentDetail::updateOrCreate(\n [\n 'vehicle_make_id'=>$request->make,\n 'vehicle_model_id'=>$request->model,\n 'vehicle_variant_id'=>$request->variant\n ],[\n 'vehicle_segment_id' => $request->segment,\n 'vehicle_make_id'=>$request->make,\n 'vehicle_model_id'=>$request->model,\n 'vehicle_variant_id'=>$request->variant,\n 'vehicle_variant_name'=>$variant_name,\n 'created_by'=>Auth::user()->id,\n ]);\n // dd($segment_details);\n // $segment_details->save();\n return response()->json(['status' => 1, 'message' => 'segment details'.config('constants.flash.updated'),'data'=> $segment_details]);\n\n // return response()->json(['status'=>1,'data'=> $segment_details]);\n }", "title": "" }, { "docid": "3b0870521132be032ce7f2a09d1434be", "score": "0.5599191", "text": "public function update(Requests\\EventFormRequest $request)\n {\n $event = Models\\Event::where('unique_id', '=', $request->id)->first();\n\n // remove existing ones\n $event->types()->detach();\n\n \\DB::transaction(function () use ($event, $request) {\n\n // update - short_description;student_pick,faculty_only, faculty_enrichment\n // venue, event types,recommendation text\n\n //Save thumbnail\n if (isset($request['website_thumbnail'])) {\n\n $thumbnail_name =\n pathinfo($request->file('website_thumbnail')\n ->getClientOriginalName(), PATHINFO_FILENAME) . \"_\" . time() . '.' .\n $request->file('website_thumbnail')->getClientOriginalExtension();\n\n $request->file('website_thumbnail')->move(\n base_path() . '/public/images/events/', $thumbnail_name\n );\n $event->website_image_url_small = base_path() . '/public/images/events/' . $thumbnail_name;\n\n }\n\n // Featured image\n if (isset($request['website_featured'])) {\n $website_featured = pathinfo($request->file('website_featured')->getClientOriginalName(), PATHINFO_FILENAME) . \"_\" . time() . '.' .\n $request->file('website_featured')->getClientOriginalExtension();\n\n $request->file('website_featured')->move(\n base_path() . '/public/images/events/', $website_featured\n );\n\n\n $event->website_featured = base_path() . '/public/images/events/' . $website_featured;\n }\n\n // update event table\n $event->short_description = $request['short_description'];\n $event->student_pick = $request['student_pick'];\n $event->review_id = $request['reviewId'];\n\n $event->faculty_only = $request['faculty_only'];\n $event->faculty_enrichment = $request['faculty_enrichment'];\n $event->venue_id = $request['venue'];\n\n // remove existing ones\n\n if (isset($request['event_types'])) {\n foreach ($request['event_types'] as $type) {\n $event->types()->attach($type,\n ['update_user' => $this->currentUser]);\n }\n\n }\n\n $event->recommendation = $request['recommendation'];\n $event->update_user = $this->currentUser;\n\n $event->save();\n\n });\n\n //redirect to show page\n \\Session::flash('message', 'Successfully updated the event!');\n return redirect()->action('EventsController@show', ['id' => $event->unique_id]);\n\n }", "title": "" }, { "docid": "b0958694c8a05a7c50958025b021cbc1", "score": "0.5566281", "text": "function update_event($event_name, $event_date, $event_desc, $event_scope, $e_type_id, $venue_name, $venue_address, $venue_city, $venue_state, $venue_zipcode, $e_recurring_id, $event_id) {\n\tglobal $link;\n\n\t// check if the zipcode already in the location table, if not insert and get the e_loc_id\n\t// insert the venue name, address, e_loc_id into venue table and get the last inserted venue_id\n\t//then insert the event details into event table.\n\n\t// create new location or update existing location\n\t$q = \"INSERT INTO \" . LOCATION . \"(city, state, zipcode) VALUES ('$venue_city', '$venue_state', '$venue_zipcode') ON DUPLICATE KEY UPDATE city='$venue_city', state='$venue_state'\";\n\t// echo $q . \"|||\";\n\n\tmysqli_query($link,$q) or die(mysqli_error($link));\n\n\t// get the location id for the location updated above\n\t$e_loc_id = mysqli_insert_id($link);\n\tif ($e_loc_id == 0) {\n\t\t$e_loc_id = insert_zipcode_location($venue_zipcode);\n\t}\n\n\t//insert venue details into venue table\n\t$q_venue_check = mysqli_query($link,\"SELECT venue_id from \".VENUE. \" WHERE venue_name LIKE '\".$venue_name. \"' and venue_address LIKE '\".$venue_address.\"' AND e_loc_id =\".$e_loc_id. \" LIMIT 1;\") or die(mysqli_error($link));\n\tif(mysqli_num_rows($q_venue_check) !=0) {\n\t\t$row = mysqli_fetch_assoc($q_venue_check);\n\t\t$venue_id = $row['venue_id'];\n\t}\n\telse {\n\t\t$q_venue = mysqli_query($link,\"INSERT INTO \" .VENUE. \" (venue_name,venue_address,e_loc_id) VALUES ('$venue_name','$venue_address',$e_loc_id)\") or die(mysqli_error($link));\n\t $venue_id = mysqli_insert_id($link);\n\t\t// echo $venue_id;\n\t}\n\n\t// query to update the event\n\t$q = \"UPDATE \" . EVENT . \" SET event_name='$event_name', event_date='$event_date', event_desc='$event_desc', event_scope='$event_scope', e_type_id='$e_type_id', venue_id='$venue_id', e_recurring_id='$e_recurring_id' WHERE event_id = $event_id\";\n\n\tmysqli_query($link,$q) or die(mysqli_error($link));\n\n\t// Query for updated event details, including location information and users\n\t$select = \"SELECT t1.event_id, t1.venue_id, t1.event_name, t3.venue_name, t3.venue_address, t4.city, t4.state, t4.zipcode, t2.event_type, t1.event_date, t1.event_desc,t1.event_scope, t1.user_id\";\n\n\t$from = \" FROM \" . EVENT . \" AS t1\n\t\tLEFT JOIN \" . USERS . \" AS t5 ON t1.user_id = t5.user_id\n\t\tLEFT JOIN \" . EVENT_TYPE . \" AS t2 ON t1.e_type_id = t2.e_type_id\n\t\tLEFT JOIN \" . VENUE . \" AS t3 ON t1.venue_id = t3.venue_id\n\t\tLEFT JOIN \" . LOCATION . \" AS t4 ON t3.e_loc_id = t4.e_loc_id\";\n\n\t// returns only the updated event id\n\t$where = \" WHERE event_id = \" . $event_id;\n\n\t// build the query\n\t$q = $select . $from . $where . \";\";\n\t// echo $q . \"|||\";\n\n\t// execute the query\n\tif($event_query = mysqli_query($link,$q)) {\n\t\twhile ($row = mysqli_fetch_assoc($event_query)) {\n\t\t\t$results[] =$row;\n\t\t\t// print_r($results);\n\t\t}\n\t}\n\n\treturn $results;\n}", "title": "" }, { "docid": "197e7a21333fc070f7c6d7f75cb97d11", "score": "0.55642176", "text": "public function update(Request $request, Tournament $tournament)\n {\n //\n\n\n $data = $this->validateRequest();\n\n if ($request->hasFile('location')) {\n\n $baseurl = url('/');\n\n $images = $request->file('location');\n\n $extension = $images->extension();\n $filename = time() . '.' . $extension;\n $path = $images->storeAs('tournament', $filename, 'public');\n $fullpathurl = $baseurl . '/storage/' . $path;\n $data['location'] = $fullpathurl;\n\n $enddate = Carbon::parse($data['enddate']);\n $data['enddate'] = $enddate;\n $data['updateby'] = Auth::user()->id;\n\n $tournament->update($data);\n return redirect()->route('tournament.index')->with('update', 'Data Update');\n\n }\n\n else\n {\n $enddate = Carbon::parse($data['enddate']);\n $data['enddate'] = $enddate;\n $tournament->update($data);\n return redirect()->route('tournament.index')->with('update', 'Data Update');\n }\n\n\n }", "title": "" }, { "docid": "3cea179c48f8885ada81a37c5c330fc4", "score": "0.55451113", "text": "public function updated(Apartment $apartment)\n {\n //\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.55347687", "text": "public function updateExisting();", "title": "" }, { "docid": "216165b1bcb85ce7103b3a3910d4d747", "score": "0.5500723", "text": "public function update(StoreGov $request, $id)\n {\n $gov = Gov::findOrFail($id);\n list($name) = MyHelper::sanitizeString($request->name);\n\n $gov->name = $name;\n $gov->save();\n\n session()->flash('success', 'تم التعديل بنجاح');\n return redirect()->route('govs.index');\n }", "title": "" }, { "docid": "c6c472e9a208986431a784c1ec5cc1f6", "score": "0.54942024", "text": "public function update(){}", "title": "" }, { "docid": "c6c472e9a208986431a784c1ec5cc1f6", "score": "0.5493889", "text": "public function update(){}", "title": "" }, { "docid": "bcde5beb25a7f1c1e2c7c1ccb46bce0f", "score": "0.54904157", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required',\n 'description' => 'required',\n 'address' => 'required',\n 'price' => 'required'\n ]);\n\n if ($validator->fails()) {\n return redirect(\"dashboard/estates/$id/edit\")\n ->withErrors($validator)\n ->withInput();\n } else {\n\n $obj = Estate::find($id);\n $obj->title = $request->title;\n $obj->address = $request->address;\n $obj->price = $request->price;\n $obj->description = $request->description;\n $obj->map = $request->map;\n $obj->add_type = $request->add_type;\n $obj->room_num = $request->room_num;\n $obj->hole_num = $request->hole_num;\n $obj->bath_num = $request->bath_num;\n $obj->kitchen_num = $request->kitchen_num;\n $obj->enterance_num = $request->enterance_num;\n $obj->area = $request->area;\n $obj->ground_area = $request->ground_area ;\n $obj->street_area = $request->street_area ;\n $obj->street_area2 = ($request->street_area2)?$request->street_area2:'' ;\n $obj->driver_room = $request->driver_room ;\n $obj->maid_room = $request->maid_room ;\n $obj->watertank_num = $request->watertank_num ;\n $obj->cities_id = $request->cities_id ;\n if ($request->image) {\n $imageName = time() . '.' . $request->image->getClientOriginalExtension();\n $request->image->move(storage_path('app/public/estate'), $imageName);\n $obj->image = 'storage/estate/' . $imageName;\n }\n $obj->update();\n Session::put('successes', ['تم التعديل بنجاح']);\n Session::save();\n return redirect('dashboard/estates');\n }\n }", "title": "" }, { "docid": "bf19adbdeb7d6e0ce1e33164caa371b6", "score": "0.5468882", "text": "public function update(Request $request, Venta $venta)\n {\n //\n }", "title": "" }, { "docid": "bf19adbdeb7d6e0ce1e33164caa371b6", "score": "0.5468882", "text": "public function update(Request $request, Venta $venta)\n {\n //\n }", "title": "" }, { "docid": "bf19adbdeb7d6e0ce1e33164caa371b6", "score": "0.5468882", "text": "public function update(Request $request, Venta $venta)\n {\n //\n }", "title": "" }, { "docid": "868f27e093cb2b12c122b06733cf55b2", "score": "0.54678917", "text": "public function update(UpdateApartmentRequest $request)\r\n {\r\n $apartment = Apartment::where('id', $request->id)->where('user_id', \\Auth::user()->id)->first();\r\n if (!$apartment) {\r\n return response()->json([\r\n 'return' => false,\r\n 'msg' => 'Apartment not found'\r\n ], 404);\r\n }\r\n\r\n // apartment\r\n $apartment->price = $request->post('price');\r\n $apartment->bedrooms = $request->post('bedrooms');\r\n $apartment->bathrooms = $request->post('bathrooms');\r\n $apartment->street = $request->post('street');\r\n $apartment->available_date = $request->post('date');\r\n $apartment->apartment_number = $request->post('apartment_number');\r\n $apartment->description = $request->post('description');\r\n $apartment->latitude = $request->post('latitude');\r\n $apartment->longitude = $request->post('longitude');\r\n $apartment->neighborhood_id = $request->post('neighborhood_id');\r\n $apartment->zip_code = $request->post('zip_code');\r\n $apartment->save();\r\n\r\n // feature\r\n $features = [];\r\n if ($request->post('features')) {\r\n foreach ($request->post('features') as $key => $value) {\r\n $features[] = $key;\r\n }\r\n } \r\n $apartment->features()->sync($features);\r\n\r\n //photo\r\n if (session('apartment_photo_temp')) {\r\n $i=0;\r\n foreach (session('apartment_photo_temp') as $tempPhoto) {\r\n $filename = basename($tempPhoto);\r\n $sourceFile = public_path('img/apartment/photos/'.$tempPhoto);\r\n $destinationFileRelative = 'img/apartment/photos/' . $apartment->id . \"/\" . $filename;\r\n $destinationFile = public_path($destinationFileRelative);\r\n $storedFilename = asset($destinationFileRelative);\r\n\r\n $exisitingPhoto = ApartmentPhoto::where('photo', $tempPhoto)->where('apartment_id', $apartment->id)->first();\r\n\r\n if (!$exisitingPhoto) {\r\n $folder = public_path('img/apartment/photos/' . $apartment->id);\r\n if(!is_dir($folder)) {\r\n mkdir($folder, 0755);\r\n }\r\n rename($sourceFile, $destinationFile);\r\n $exisitingPhoto = new ApartmentPhoto;\r\n $exisitingPhoto->apartment_id = $apartment->id;\r\n $exisitingPhoto->photo = $storedFilename;\r\n $exisitingPhoto->order = $i;\r\n $exisitingPhoto->save();\r\n } else { // update ordering\r\n $exisitingPhoto->order = $i;\r\n $exisitingPhoto->save();\r\n } \r\n $i++;\r\n }\r\n }\r\n if (session('apartment_photo_delete')) {\r\n foreach (session('apartment_photo_delete') as $tempPhotoDelete) {\r\n $filename = basename($tempPhotoDelete);\r\n $fileStoredInApartment = public_path('img/apartment/photos/'.$apartment->id.\"/\".$filename);\r\n $fileStoredTemp = public_path('img/apartment/photos/tmp/'.$filename);\r\n $exisitingPhoto = ApartmentPhoto::where('photo', $tempPhotoDelete)->where('apartment_id', $apartment->id)->delete();\r\n if (file_exists($fileStoredInApartment)) {\r\n unlink($fileStoredInApartment);\r\n } else if (file_exists($fileStoredTemp)) {\r\n unlink($fileStoredTemp);\r\n }\r\n }\r\n }\r\n\r\n $data = [\r\n 'price' => '$ ' . number_format($request->price),\r\n 'bedrooms' => $request->bedrooms,\r\n 'street' => $request->street,\r\n 'remarks' => $request->remarks,\r\n 'date' => $request->date,\r\n 'apartment_number' => $request->apartment_number,\r\n ];\r\n\r\n $request->session()->flash('success', 'Apartment was successfully updated!');\r\n return redirect()->route('agent.listings');\r\n }", "title": "" }, { "docid": "a0c6cf7690eae321b8e73473071e7291", "score": "0.54663175", "text": "public function update(Request $request, $id)\n {\n\n $vessel = Vessel::find($id);\n if ($request->has('name')) $vessel->name = request('name');\n if ($request->has('imo')) $vessel->imo = request('imo');\n if ($request->has('official_number')) $vessel->official_number = request('official_number');\n if ($request->has('mmsi')) $vessel->mmsi = request('mmsi');\n if ($request->has('vessel_type_id')) $vessel->vessel_type_id = request('vessel_type_id');\n if ($request->has('dead_weight')) $vessel->dead_weight = request('dead_weight');\n if ($request->has('tanker')) $vessel->tanker = request('tanker');\n if ($request->has('active')) $vessel->active = request('active');\n if ($request->has('deck_area')) $vessel->deck_area = request('deck_area');\n if ($request->has('oil_tank_volume')) $vessel->oil_tank_volume = request('oil_tank_volume');\n if ($request->has('oil_group')) $vessel->oil_group = request('oil_group');\n if ($request->has('company_id')) $vessel->company_id = request('company_id');\n if ($request->has('primary_poc_id')) $vessel->primary_poc_id = request('primary_poc_id');\n if ($request->has('secondary_poc_id')) $vessel->secondary_poc_id = request('secondary_poc_id');\n if ($request->has('sat_phone_primary')) $vessel->sat_phone_primary = request('sat_phone_primary');\n if ($request->has('sat_phone_secondary')) $vessel->sat_phone_secondary = request('sat_phone_secondary');\n if ($request->has('email_primary')) $vessel->email_primary = request('email_primary');\n if ($request->has('email_secondary')) $vessel->email_secondary = request('email_secondary');\n\n if ($vessel->save()) {\n if ($request->has('qi')) {\n $vessel->vendors()->detach();\n $vessel->vendors()->attach(array_merge(\n request('qi'),\n request('pi'),\n request('societies'),\n request('insurers'),\n request('providers')\n ));\n }\n\n if ($request->has('fleet_id')) {\n $vessel->fleets()->sync(request('fleet_id'));\n }\n $vesselIds = [];\n $vesselIds[] = $vessel->id;\n $ids = '';\n foreach($vesselIds as $vesselId)\n {\n $ids .= $vesselId.',';\n }\n $ids = substr($ids, 0, -1);\n TrackChange::create([\n 'changes_table_name_id' => 2,\n 'action_id' => 3,\n 'count' => 1,\n 'ids' => $ids,\n ]);\n\n return response()->json(['message' => 'Vessel updated.']);\n }\n return response()->json(['message' => 'Can\\'t save. Something unexpected happened.']);\n }", "title": "" }, { "docid": "a9e85721920ed84b24c1356c0ae63fea", "score": "0.5466166", "text": "public function showUpdateVenue(Request $request, $id)\n {\n $venue = Venue::find($id);\n\n return view('coursesmanagement.edit-venue', [\n \"venue\" => $venue\n ]);\n }", "title": "" }, { "docid": "856565ec824ce5258ad4fcdd26fd72ff", "score": "0.5463584", "text": "function updateVenueService($name, $venueTypeId = 0) {\r\n if ( empty($name)) return false;\r\n //debug($neighbourhood);\r\n $this->Containable = false;\r\n $result = $this->findByName($name);\r\n\r\n if (!$result) {\r\n $this->create();\r\n $data = array('VenueService' => array('name' => $name,\r\n 'venue_type_id' => $venueTypeId) );\r\n \r\n $this->save( $data);\r\n $id = $this->id;\r\n } else {\r\n $id = $result['VenueService']['id'];\r\n }\r\n\r\n return($id);\r\n }", "title": "" }, { "docid": "df021c18f82910c4eb6d4302e55f7f7f", "score": "0.5451625", "text": "function newUpdate(DomainObject $obj)\n {\n $id = $obj->getId();\n $cond = null;\n $values['name'] = $obj->getName();\n if($id >1){\n $cond['id'] = $id;\n }\n return $this->buildStatement(\"venue\", $values, $cond);\n }", "title": "" }, { "docid": "622f78b7c258e2cd32dd0be02bace5c8", "score": "0.5445928", "text": "public function update()\n {\n $exchange = Company::select('*')->get();\n $keywords = array();\n $companies = array();\n $file = env('SCRAPPER_KEYWORDS_REPO') . \"BY_\";\n if(file_exists(($file.'COMPANY.JSON')))\n $companies = json_decode(file_get_contents($file.'COMPANY.JSON'), true);\n if(file_exists(($file.'KEYWORD.JSON')))\n $keywords = json_decode(file_get_contents($file.'KEYWORD.JSON'), true);\n\n $by_sec = $this->bySector($exchange);\n $this->parseColumn($exchange, $keywords, $companies, 'industry');\n $this->parseColumn($exchange, $keywords, $companies, 'sector');\n\n\n file_put_contents(($file.'SECTOR.JSON'), json_encode($by_sec, JSON_FORCE_OBJECT));\n file_put_contents(($file.'COMPANY.JSON'), json_encode($companies));\n file_put_contents(($file.'KEYWORD.JSON'), json_encode($keywords));\n\n file_put_contents(($file.'SECTOR_PP.JSON'), json_encode($by_sec, JSON_PRETTY_PRINT));\n file_put_contents(($file.'COMPANY_PP.JSON'), json_encode($companies, JSON_PRETTY_PRINT));\n file_put_contents(($file.'KEYWORD_PP.JSON'), json_encode($keywords, JSON_PRETTY_PRINT));\n }", "title": "" }, { "docid": "735a80de4c4f0dd7337611bb80731dad", "score": "0.5439967", "text": "public function testUpdateWarehouse()\n {\n }", "title": "" }, { "docid": "35e31f23ac72ac762f91afb86c718196", "score": "0.5431835", "text": "public function venueLocation($course_id, $location)\n {\n \t$data = [\n\t\t\t'location_code' => $location['location_code'],\n \t'location_name' => $location['name'],\n \t'address'\t => $location['address1'],\n \t'address2' \t => $location['address2'],\n \t'town' \t\t => $location['town'],\n \t'county' \t => $location['county'],\n \t'post_code' => $location['postcode'],\n \t'country' \t => $location['country'],\n \t'vendor' => \"british_red_cross\",\n\t\t];\n\n \t// 'lat'\t\t => $get_data['lat'],\n \t// 'longitude'\t => $get_data['long'],\n \t// 'is_site_allow' => 0,\n\n \t$venue = Venue::where('location_code', $location['location_code'])->first();\n \tif($venue){\n \t\tif($venue->address\t== $location['address1']){\n \t\t\t$venue->update($data);\n \t\t}else{\n \t\t\t$address = $location['address1'].\",\".$location['town'].\" \".$location['postcode'].\",\".$location['county'].\" \".$location['country'];\n \t\t\t$get_data = $this->getCoordinates($address);\n\n \t\t\t$data['lat'] \t\t\t= $get_data['lat'];\n\t \t\t$data['longitude'] \t\t= $get_data['long'];\n\t \t\t// $data['is_site_allow'] \t= 0;\n\n \t\t\t$venue->update($data);\n \t\t}\n \t}else{\n \t\t$address = $location['address1'].\",\".$location['town'].\" \".$location['postcode'].\",\".$location['county'].\" \".$location['country'];\n\t\t\t$get_data = $this->getCoordinates($address);\n\n \t\t$data['lat'] \t\t\t= $get_data['lat'];\n \t\t$data['longitude'] \t\t= $get_data['long'];\n \t\t$data['is_site_allow'] \t= 0;\n\n \t\t$venue = Venue::create( $data);\n \t}\n \treturn $venue;\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5427867", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5427867", "text": "public function update($data);", "title": "" }, { "docid": "ea1d2a3af02775fab77e5344fe877fc8", "score": "0.5402836", "text": "function updateService($name, $venueId, $venueTypeId = null ) {\r\n if ( empty($name)) return false;\r\n\r\n $this->Containable = false;\r\n $result = $this->findByName($name);\r\n\r\n if (!$result) {\r\n $data = array(\r\n 'VenueService' => array('name' => $name, 'venue_type_id' => $venueTypeId),\r\n 'Venue' => array('Venue' => array($venueId) )\r\n );\r\n }else { // product already in list\r\n $id = $result['VenueService']['id'];\r\n // get list of venues with this product already\r\n $venues = $this->VenuesVenueService->find('list', array(\r\n 'fields' => array('venue_id'),\r\n 'conditions' => array( 'venue_service_id' => $id ) ) );\r\n $venues[] = $venueId;\r\n sort($venues);\r\n $data = array(\r\n 'VenueService' => array( 'id' => $id, 'name' => $name, 'venue_type_id' => $venueTypeId),\r\n 'Venue' => array('Venue' => (array)$venues )\r\n );\r\n }\r\n $this->create();\r\n $this->save( $data, array('validate' => false));\r\n $id = $this->id;\r\n\r\n return($id);\r\n }", "title": "" }, { "docid": "3f583692393a3ccaac771d6ea8244eff", "score": "0.53999275", "text": "public function update(Request $request, vehiclereport $vehiclereport)\n {\n //\n }", "title": "" }, { "docid": "1026ac52277e896db1a53e57c46cbb5b", "score": "0.53992146", "text": "public function updated(ProvinceVaccine $vaccine): void\n {\n //\n }", "title": "" }, { "docid": "bbef5dce53172b8958ef27862e12c1b9", "score": "0.53901714", "text": "public function save_venue_data( $postID = null, $post = null ) {\n\t\t\t// was a venue submitted from the single venue post editor?\n\t\t\tif ( empty( $_POST['post_ID'] ) || $_POST['post_ID'] != $postID || empty( $_POST['venue'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// is the current user allowed to edit this venue?\n\t\t\tif ( ! current_user_can( 'edit_tribe_venue', $postID ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$data = stripslashes_deep( $_POST['venue'] );\n\t\t\t/**\n\t\t\t * When a new venue is saved set the value for ShowMap and ShowMapLink if they are not present as if\n\t\t\t * a checkbox is set to false $_POST is not going to send the value and is not going to be present inside\n\t\t\t * of the array. This action is fired on update or creation from the admin so it's not goint to affect\n\t\t\t * external components like Community Plugin.\n\t\t\t */\n\t\t\t$data = wp_parse_args( (array) $data, array(\n\t\t\t\t'ShowMap' => 'false',\n\t\t\t\t'ShowMapLink' => 'false',\n\t\t\t) );\n\t\t\tTribe__Events__API::updateVenue( $postID, $data );\n\t\t}", "title": "" }, { "docid": "8602ec396422036043266da188928e5d", "score": "0.5384989", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required',\n 'band' => 'required',\n ]);\n\n $vinyl = Vinyl::find($id);\n\n $vinyl->title = $request->get('title');\n $vinyl->band = $request->get('band');\n $vinyl->year = $request->get('year');\n $vinyl->genre = $request->get('genre');\n $vinyl->state = $request->get('state');\n $vinyl->cover = $request->get('cover');\n\n $vinyl->save();\n\n return redirect('/vinyls')->with('success', 'Vinyl updated!');\n }", "title": "" }, { "docid": "89a38e2e0d93604a7012cab79b10b28c", "score": "0.53694516", "text": "function suppleir_put(){\n\n\t\tif(update('tbl_supplier',[\n\n\t\t\t\n\t\t 'vendor_id'=>parsejson()['vendor_id'],\n\t\t 'supplier_name'=>parsejson()['supplier_name'],\n\t\t 'supplier_mobile'=>parsejson()['supplier_mobile'],\n\t\t 'supplier_address'=>parsejson()['supplier_address'],\n\t\t 'supplier_latitude'=>parsejson()['supplier_latitude'],\n\t\t 'supplier_longitude'=>parsejson()['supplier_longitude'],\n\t\t 'supplier_open'=>parsejson()['supplier_open'],\n\t\t 'supplier_close'=>parsejson()['supplier_close'],\n\t\t 'supplier_holiday'=>parsejson()['supplier_holiday'],\n\t\t 'supplier_website'=>parsejson()['supplier_websit'],\n\t\t 'supplier_url'=>parsejson()['supplier_url'],\n\t\t 'supplier_banner'=>parsejson()['supplier_banner'],\n\t\t 'supplier_display_name'=>parsejson()['supplier_display_name'],\n\t\t 'supplier_description'=>parsejson()['supplier_description'],\n\t\t 'supplier_unicode'=>parsejson()['supplier_unicode'],\n\n\t\t],['suppleir_id'=>parsejson()['suppleir_id']])):\n\n\t\t\tjson_bind(true,CONST_HTTP_STATUS_OK,'Record Updated !',true);\n\n\t\telse:\n\n\t\t\tjson_bind(false,CONST_HTTP_STATUS_OK,'Error !',false);\n\n\t\tendif;\n\n\t}", "title": "" }, { "docid": "e53420be3a9524e20f2c4bc89d0d8cd3", "score": "0.5369241", "text": "public function update(Request $request, GoodsVendor $vendor)\n {\n if($vendor->site_id != $request->user()->getSite()['id'])\n throw new \\Exception(\"unvlid operate\");\n $vendor->name = $request->has('name') ? $request->input('name') : '';\n $vendor->address = $request->has('address') ? $request->input('address') : '';\n $vendor->code = $request->has('code') ? $request->input('code') : '';\n $vendor->desc = $request->has('desc') ? $request->input('desc') : '';\n $vendor->index = $request->has('index') ? $request->input('index') : 0;\n if($request->hasFile('cover')) {\n $vendor->cover = $request->cover->store('images');\n $file = new File();\n $file->name = $vendor->cover;\n $file->hash = md5_file(storage_path('/app/public/' .$vendor->cover));\n $file->u_id = $request->user()['id'];\n $file->save();\n }\n $vendor->save();\n return redirect()->route('vendors.index');\n \n }", "title": "" }, { "docid": "9b51b8f0039ca2c70648314fd227a487", "score": "0.5367696", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set kind_id=\\\"$this->kind_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "10fab53edcb1321a268ad449def7e0d5", "score": "0.53559494", "text": "public function update(Request $request, Apartment $apartment)\n {\n $request->validate([\n 'title' => 'required|max:255',\n 'indirizzo' => 'required|max:100',\n 'city' => 'required|max:100',\n 'state' => 'required|max:100',\n 'descrizione_appartamento'=> 'required',\n 'posti_letto'=> 'required|max:2',\n 'stanze' => 'required|max:2',\n 'bagni' => 'required|max:2',\n 'metri_quadri' => 'required|max:6'\n ]);\n\n $dati = $request->all();\n if (!empty($dati['cover_image'])) {\n\n $cover_image = $dati['cover_image'];\n $cover_image_path = Storage::put('uploads', $cover_image);\n\n $dati['cover_image'] = $cover_image_path;\n }\n\n $via = $request->indirizzo;\n $citta = $request->city;\n $stato = $request->state;\n $cap = $request->cap;\n\n $indirizzo = $via . ' ' . $citta .' '. $cap;\n\n $client = new Client();\n\n \t$response = $client->request('GET', 'https://api.tomtom.com/search/2/geocode/' . $indirizzo . '.json?countrySet='. $stato. '&key=YPixAIIG2SgrHPBm2WGBWUa9L4JiGcFe');\n\n \t$statusCode = $response->getStatusCode();\n\n \t$body = $response->getBody()->getContents();\n\n $body = json_decode($body);\n\n $prova = $body->results[0];\n\n\n $lat = $prova->position->lat;\n $lon = $prova->position->lon;\n\n $old_coordinate = Coordinate::where('id', $apartment->coordinates_id)->first();\n $old_coordinate->lat = $lat;\n $old_coordinate->lon = $lon;\n $old_coordinate->update();\n $apartment->update($dati);\n\n if (!empty($dati['service_id'])) {\n $apartment->services()->sync($dati['service_id']);\n }\n else {\n $apartment->services()->sync([]);\n }\n\n\n return redirect()->route('admin.apartments.index');\n }", "title": "" }, { "docid": "ee8cdd9d7a907937ce79086e18097a3b", "score": "0.5354084", "text": "public function update(CompanyStorageRequest $request, $id)\n {\n return $this->save($request,$id); \n }", "title": "" }, { "docid": "f3ea8f774acba6e75f590632db845723", "score": "0.5353636", "text": "public function update()\r\n {\r\n $body = $this->getBody('PUT');\r\n $client = $this->initialize();\r\n # set elastic query\r\n $params = [\r\n 'index' => $body['database'],\r\n 'type' => $body['table'],\r\n 'id' => $body['key'],\r\n 'body' => [\r\n 'doc' => $body['fields']\r\n ]\r\n ];\r\n\r\n # update\r\n $response = $client->update($params);\r\n\r\n # set version\r\n $result = ['version' => $response['_version']];\r\n\r\n # return result\r\n $this->result(true, $result, null, null);\r\n }", "title": "" }, { "docid": "de609828d03f5ecb94fd94776b0e5b9a", "score": "0.5353223", "text": "public function updateStoreGoods()\n {\n }", "title": "" }, { "docid": "275568db330c85ab3b4697b7ad8e7272", "score": "0.53502184", "text": "public function testUpdateByAssetId()\n {\n $this->assertTrue($this->server->updateByAssetId('87864', [\n 'name' => 'O2662',\n 'brand' => 'Samsung'\n ]));\n }", "title": "" }, { "docid": "14841372afb8dab285d5fed59026e189", "score": "0.5347129", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'store_name_1' => 'required|string|max:255',\n 'store_name_2' => 'max:255',\n 'district_id' => 'required',\n 'photo_file' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n $store = Store::where('id', $id)->first();\n $oldPhoto = \"\";\n \n if($store->photo != null && $request->photo_file != null) {\n /* Save old photo path */\n $oldPhoto = $store->photo;\n }\n // Upload file process\n ($request->photo_file != null) ? \n $photo_url = $this->getUploadPathName($request->photo_file, \"store/\".$this->getRandomPath(), 'STORE') : $photo_url = \"\";\n \n if($request->photo_file != null) $request['photo'] = $photo_url;\n\n /* Delete if any relation exist in store distributor */\n $storeDist = StoreDistributor::where('store_id', $store->id);\n if($storeDist->count() > 0){\n $storeDist->delete();\n }\n\n /* CREATE HISTORY AFTER UPDATE */\n\n $history = $store;\n $history['store_re_id'] = $store->store_id;\n $history['store_id'] = $store->id;\n\n StoreHistory::create($history->toArray());\n\n // ------>\n\n // UPDATING\n\n Store::where('id', $id)->first()->update($request->all());\n\n // $store->update($request->all());\n\n if($request->photo_file != null){\n /* Upload updated image */\n $imagePath = explode('/', $store->photo);\n $count = count($imagePath);\n $imageFolder = \"store/\" . $imagePath[$count - 2];\n $imageName = $imagePath[$count - 1];\n\n $this->upload($request->photo_file, $imageFolder, $imageName);\n }\n\n /* Store Distributor */\n if($request['distributor_ids']){\n foreach ($request['distributor_ids'] as $distributorId) {\n StoreDistributor::create([\n 'store_id' => $store->id,\n 'distributor_id' => $distributorId,\n ]);\n }\n } \n\n return response()->json(\n ['url' => url('/store'), 'method' => $request->_method]);\n }", "title": "" }, { "docid": "d9dfa985a23d52a88c5d6e0bc4baac1d", "score": "0.53427345", "text": "public function updateAction()\n {\n if ($this->request->hasArgument('uUID')) {\n $uuid = $this->request->getArgument('uUID');\n }\n if (empty($uuid)) {\n $this->throwStatus(400, 'Required uUID not provided', null);\n }\n $ordenstypObj = $this->ordenstypRepository->findByIdentifier($uuid);\n if (is_object($ordenstypObj)) {\n $ordenstypObj->setOrdenstyp($this->request->getArgument('ordenstyp'));\n $this->ordenstypRepository->update($ordenstypObj);\n $this->persistenceManager->persistAll();\n $this->throwStatus(200, null, null);\n } else {\n $this->throwStatus(400, 'Entity Ordenstyp not available', null);\n }\n }", "title": "" }, { "docid": "421e0a8e87c4e07884d75c408e99742b", "score": "0.5327501", "text": "public function update(Request $request, Vinyl $vinyl)\n {\n $vinyl->name = $request['name'];\n $vinyl->hours = $request['hours'];\n $vinyl->description = $request['description'];\n $vinyl->save();\n return redirect(route('vinyls.show', $vinyl));\n }", "title": "" }, { "docid": "147790a3f5ad39cd613a5c57615509c1", "score": "0.53274375", "text": "public function updateFromApi();", "title": "" }, { "docid": "62b97e93802f90aa1577f525a55cc5a2", "score": "0.53139424", "text": "public function update()\n {\n $data = \\Request::all();\n $expense = ExpenseService::load(\\Request::input('id'))->update($data);\n $expense->tags()->sync($data['tags'] ?? []);\n \\Msg::success(($expense->notes ?: 'Expense') . ' has been <strong>updated</strong>');\n return redir('account/expenses');\n }", "title": "" }, { "docid": "7542a7d20aa59fbc1ae45bc5de39c038", "score": "0.531282", "text": "public function updateEvent(){\n\t\t$records=Input::all();\t\n\t\t$event_id=array_get($records,'event_id');\n\t\t$event_name=array_get($records, 'eventname');\n\t\t$start_date=array_get($records, 'start_date');\n\t\t$end_date=array_get($records, 'end_date');\t\t\n\t\t$tech_lead=array_get($records, 'tech_lead');\t\n\n\t\t$event_to_update=Occasion::where('id','=',$event_id)->first();\t\t\n\t\t$event_to_update->name=$event_name;\n\t\t$event_to_update->start_date=$start_date;\n\t\t$event_to_update->end_date=$end_date;\t\t\n\t\t$event_to_update->technical_lead=$tech_lead;\t\t\n\t\t$event_to_update->save();\t\t\n\n\t\treturn Redirect::action('EventController@viewEvent')->withMessage('Event details successfully updated');\n\t}", "title": "" }, { "docid": "bb424a02be71412f7bac04112b14c6ce", "score": "0.5308715", "text": "public function update(Request $request, Uv $uv)\n {\n //\n }", "title": "" }, { "docid": "82dea4a48b80657331cbfd5c532ed380", "score": "0.5305831", "text": "public function _put() {\n\t\tif (!empty($this->id)) {\n\t\t\t$row = $this->getDb()[$this->id];\n\t\t\tif ($row) {\n\t\t\t\t$this->result = $row->update($this->data);\n\t\t\t}\n\t\t}\n\t\t$this->result;\n\t}", "title": "" }, { "docid": "779edf0bc6b9a5b8444bb2e559d91d26", "score": "0.53049463", "text": "public function update(Request $request, House $house)\n {\n $id = $house->id;\n\n /* query per settare il valore a 0*/\n $query = DB::table('houses')\n ->where('id', '=', $id)\n ->update(['status' => '0']);\n\n /*validazione dei dati*/\n $validateData = $request->validate([\n 'title' => 'required|max:100',\n 'n_beds' => 'required|integer|between:1, 50',\n 'n_wc' => 'required|integer|between:1, 50',\n 'mq' => 'required|integer|between:1, 1000',\n 'address' => 'required|max:100',\n 'img' => 'image'\n /*espressione regolare => 'not_regex:/^.+$/i'*/\n ]);\n\n $data = $request->all();\n // dd($data);\n $data['slug'] = Str::slug($data['title']);\n if (!empty($data['img'])) {\n\n $img = Storage::put('upload_file', $data['img']);\n $house->img = $img;\n\n }\n\n if(!empty($data['feature'])){\n $house->features()->sync($data['feature']);\n } else {\n $house->features()->sync([]);\n }\n\n $house->update($data);\n\n return redirect()->route('house.index');\n\n }", "title": "" }, { "docid": "6d6e58d133f9408400ba626008b84663", "score": "0.53041327", "text": "public function update(): void\n {\n (new SellInUpdateCommand($this))->execute();\n (new QualityUpdateCommand($this, new ChangeQualityCommand($this)))->execute();\n }", "title": "" }, { "docid": "c63e2a57e397e6cf407f1a6d617150e2", "score": "0.5299238", "text": "private static function updateRegions(){\n $json = file_get_contents('https://gbfs.bluebikes.com/gbfs/en/system_regions.json');\n if ($regions_data = json_decode($json)){\n global $wpdb;\n\n foreach ($regions_data->data->regions as $region) {\n $sql = \"INSERT INTO region (region_id, name) VALUES (%d, %s) ON DUPLICATE KEY UPDATE name = %s\";\n $sql = $wpdb->prepare($sql, $region->region_id, $region->name, $region->name);\n $wpdb->query($sql);\n }\n }\n }", "title": "" }, { "docid": "230908ae7d7d80b78d8c413ea598e44e", "score": "0.52988684", "text": "private function update() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$wpdb->update(\"ffi_be_apis\", array (\n\t\t\t\"CloudinaryCloudName\" => $this->cloudinaryName,\n\t\t\t\"CloudinaryAPIKey\" => $this->cloudinaryAPIKey,\n\t\t\t\"CloudinaryAPISecret\" => $this->cloudinaryAPISecret,\n\t\t\t\"IndexDenURL\" => $this->indexDenURL,\n\t\t\t\"IndexDenIndex\" => $this->indexDenName,\n\t\t\t\"IndexDenUsername\" => $this->indexDenUsername,\n\t\t\t\"IndexDenPassword\" => $this->indexDenPassword,\n\t\t\t\"InvisibleHandAppID\" => $this->invisibleHandAppID,\n\t\t\t\"InvisibleHandAppKey\" => $this->invisibleHandAppKey,\n\t\t\t\"MandrillKey\" => $this->mandrill\n\t\t), array (\n\t\t\t\"ID\" => 1\n\t\t), array (\n\t\t\t\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"\n\t\t), array (\n\t\t\t\"%d\"\n\t\t));\n\t\t\n\t\twp_redirect(admin_url() . \"admin.php?page=book-exchange/admin/api.php&updated=1\");\n\t\texit;\n\t}", "title": "" }, { "docid": "75445285247e28d4dd744de1afce70c2", "score": "0.5297562", "text": "public function update($budget);", "title": "" }, { "docid": "539c6403f747c34c8b3c1562c2f4a72f", "score": "0.52928776", "text": "public function updateStore()\n {\n }", "title": "" }, { "docid": "2b9bbe626ec3bac2c0fb546322535686", "score": "0.5284381", "text": "public function update(Request $request, $id)\n {\n $event=event::find($id);\n $event->event_title=$request->event_title;\n $event->event_category=$request->event_category;\n $event->event_description=$request->event_description;\n $event->event_start=$request->event_start;\n if($request->file('event_image'))\n {\n $event_photo = $request->file('event_image');\n $extension = $event_photo->getClientOriginalExtension();\n Storage::disk('public')->put($event_photo->getFilename().'.'.$extension, File::get($event_photo));\n $event->event_image=$event_photo->getFilename().'.'.$extension;\n } \n else{\n $event->event_image=$event->event_image;\n }\n $event->save();\n return redirect('/admin/events')->with('success','Event edited successfully!');\n }", "title": "" }, { "docid": "1c2a7d9050c16337a27bf486a1213e13", "score": "0.52829397", "text": "function put() {\n\t\t\treturn $this->set_query(sprintf(\"\n\t\t\t\tUPDATE \n\t\t\t\t\t%s \n\t\t\t\tSET \n\t\t\t\t\t%s \n\t\t\t\tWHERE \n\t\t\t\t\tId = %d\", \n\t\t\t\t\t$this->entity,\n\t\t\t\t\t$this->data, \n\t\t\t\t\t$this->Id\n\t\t\t\t)\n\t\t\t);\n\n\t\t}", "title": "" }, { "docid": "fba068496614e7529fb1cb40280ee1c7", "score": "0.527905", "text": "function update($voedingssupplement)\n {\n $this->db->where('id', $voedingssupplement->id);\n $this->db->update('voedingssupplement', $voedingssupplement);\n }", "title": "" }, { "docid": "afb69997608df85f7f2e2838e6625aaa", "score": "0.5278692", "text": "private function _updateGene()\n {\n // to import it from external databases\n $gene = Doctrine_Core::getTable('Gene')->findOneBy('ncbiGeneId', $this->ncbiGeneId);\n if (!$gene) {\n $gene = Doctrine_Core::getTable('Gene')->import($this->ncbiGeneId);\n }\n\n if ($gene) {\n $this->geneId = $gene->id;\n }\n }", "title": "" }, { "docid": "13bf1886392e66fcf38e9503ee3db85b", "score": "0.526874", "text": "public function updated(aboutus $aboutus)\n {\n //code...\n }", "title": "" }, { "docid": "9dc6cc6ea2770dd19d358423b987084b", "score": "0.5268591", "text": "public function update(Request $request, $id)\n {\n $event=Event::find($id);\n $this->validate($request,array(\n 'date'=>'required|max:255',\n 'name' =>'required|max:255',\n 'description'=>'required',\n 'venue' =>'required',\n ));\n $event->date = $request->date;\n $event->name = $request->name;\n $event->description = $request->description;\n $event->venue = $request->venue;\n $event->save();\n Session::flash('success','The event was successfully saved !');\n return redirect()->route('events.index');\n }", "title": "" }, { "docid": "9597f2dbc4718b9f333e4446e6945f31", "score": "0.52650744", "text": "public function update($data) {\n }", "title": "" }, { "docid": "1a0e11f145f972714a95f97630325b63", "score": "0.52635646", "text": "public function put_update()\n\t{\n\t\t$id = Input::get('id');\n\t\t$validation = Team::validate(Input::all());\n\t\t\n\t\tif ($validation->fails())\n\t\t{\n\t\t\treturn Redirect::to_route('edit_team', $id)->with_errors($validation);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tTeam::update($id, array(\n\t\t\t\t'name' => Input::get('name'),\n\t\t\t\t'venue' => Input::get('venue'),\n\t\t\t\t'website' => Input::get('website'),\n\t\t\t\t'latitude' => Input::get('latitude'),\n\t\t\t\t'longitude' => Input::get('longitude'),\n\t\t\t\t'crest' => Input::get('crest')\n\t\t\t));\n\t\t\t\n\t\t\treturn Redirect::to_route('teams')->with('flash', 'Team updated successfully');\n\t\t}\n\t}", "title": "" }, { "docid": "2d1edf3f15938c1239c4fbe6233a17c8", "score": "0.5253018", "text": "public function setEventVenue($newEventVenue) {\n\n\t\t// Verify that eventVenue is secure\n\t\t$newEventVenue = trim($newEventVenue);\n\t\t$newEventVenue = filter_var($newEventVenue, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\t\tif(empty($newEventVenue) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"eventVenue is empty or insecure\"));\n\t\t}\n\n\t\t// Verify that eventVenue will fit in the database\n\t\tif(strlen($newEventVenue) > 50) {\n\t\t\tthrow(new \\RangeException(\"eventVenue has too many characters in it\"));\n\t\t}\n\n\t\t// Store the eventVenue\n\t\t$this->eventVenue = $newEventVenue;\n\n\t}", "title": "" }, { "docid": "f626a4a41ec546ac20328f64d345fc34", "score": "0.5248515", "text": "public function updateSeoData(UpdateSeoDataRequest $request, $event_id)\n\t{\n\t\t$event = new EventCreator($this->eventRepo);\n $event->editSeoData(Input::all(), $event_id);\n\n\t\treturn redirect('admin/events/'. $event_id .'/show');\n\t}", "title": "" }, { "docid": "fed621db17151c74a2397dac11d340d5", "score": "0.5247769", "text": "public function update(Request $request, NearbyProd $nearbyProd)\n {\n //\n }", "title": "" }, { "docid": "2b7cc77285242bb678315f1507b56767", "score": "0.52413404", "text": "public function put();", "title": "" }, { "docid": "fcbb8aa272243ff1148fb420a9930d94", "score": "0.52364993", "text": "public function update()\n {\n $this->validate(request(), [\n 'title' => 'required|max:255',\n 'pages' => 'integer',\n 'year' => 'integer',\n 'isbn' => 'required',\n ]);\n\n $book = Book::findOrFail(request('id'));\n $raw = request(['title', 'isbn', 'price', 'description', 'format', 'year', 'pages', 'source', 'publisher', 'series', 'availability', 'bookbinding']);\n $raw['image'] = $book->image;\n $book->prepare($raw)->update();\n\n $book->attach(request(['author', 'category', 'publisher']));\n\n if (is_array(request('price'))) {\n $book->updatePrices(request('price'));\n }\n\n session()->flash('success_message', 'Книга обновлена');\n return redirect()->route('book.list');\n }", "title": "" }, { "docid": "ea58c2eff1cc55afc509792b9fde6c27", "score": "0.5231837", "text": "public function updateSeoData(UpdateSeoDataRequest $request, $organizer_id)\n\t{\n $request->persist($this->organizerRepo, $organizer_id);\n\n\t\treturn redirect('admin/organizers/'. $organizer_id .'/show');\n\n\t}", "title": "" }, { "docid": "a6f51100ed15befafa3da554104f7992", "score": "0.5231643", "text": "public function update(Request $request)\n {\n $delivery_detail = DeliveryDetail::find($request->id);\n $delivery_detail->final_offer = $request->final_offer;\n $save = $delivery_detail->save();\n\n if ($save) {\n $delivery = Delivery::find($delivery_detail->delivery_id);\n\n $delivery->delivery_man = Auth::user()->id;\n $delivery->status_id = 2;\n $delivery->save();\n \n $delivery->detail;\n // dd($delivery);\n event(new NotificationsPushEvent($delivery));\n }\n \n }", "title": "" }, { "docid": "4f1dce617f952406dcd66f7bd37e1ac1", "score": "0.5229556", "text": "public function updateArea(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'string|min:2',\n 'lat' => 'required|numeric', \n 'lon' => 'required|numeric', \n ]);\n $validator->validate();\n\n $hid_id = $request->hid_id;\n $update_offer_data = Area::where('id', $hid_id)->update(['name' => $request->name, 'lat' => $request->lat, 'lon' => $request->lon]); \n return redirect()->route('admin.manage_areas');\n }", "title": "" }, { "docid": "2839f481c176e19dacfcd34e6264d053", "score": "0.52202666", "text": "public function update(Request $request, Ouvrage $ouvrage)\n {\n //\n }", "title": "" }, { "docid": "c89806fda95a35c599d032130207037c", "score": "0.52157706", "text": "public function testUpdateEntity()\n {\n }", "title": "" }, { "docid": "e1dd2410e811980f9c21a687f992ada6", "score": "0.52156365", "text": "public function update (RevenueTypeVO $revenueTypeVO);", "title": "" }, { "docid": "e1dd2410e811980f9c21a687f992ada6", "score": "0.52156365", "text": "public function update (RevenueTypeVO $revenueTypeVO);", "title": "" }, { "docid": "836cf6f894ad9a15f2217c516f35b96f", "score": "0.52151525", "text": "public function update(Request $request, $id)\n {\n $region=Region::find($id);\n $region->region_name=$request->input('region_name');\n $region->country_id=$request->input('country_id');\n \n \n $region->update();\n\n // Alert::success('Updated', 'Record Updated successfully'); \n return Redirect()->back()->with('status', 'Region updated successfully!');\n }", "title": "" }, { "docid": "687f93a74818e791282066807d708348", "score": "0.52151215", "text": "public function update(Request $request, Event $event)\n {\n $event->title = $request->title;\n $event->picture_path = $request->picture_path;\n $event->short_description = $request->short_description;\n $event->duration = $request->duration;\n $event->description = $request->description;\n $event->event_date = $request->event_date;\n $event->hour = $request->hour;\n $event->event_capacity = $request->event_capacity;\n $event->outstanding = $request->outstanding;\n\n $event->save();\n return redirect()->route('adminDashboard');\n }", "title": "" }, { "docid": "cc632726cee163e207582a4755333d30", "score": "0.52149546", "text": "public function update(Request $request)\n\t{\n\t\tDB::update('update sub_event_masters set e_id = ' . $request->get('e_id') . ', s_e_name = \"' . $request->get('s_e_name') . '\"\n , s_e_discription = \"' . $request->get('s_e_discription') . '\", s_e_duration = \"' . $request->get('s_e_duration') . '\"\n where s_e_id = ' . $request->s_e_id);\n\t\treturn redirect('/admin/subevent');\n\t}", "title": "" }, { "docid": "477d4b97b18736403fe825ea1b6b5a23", "score": "0.5213425", "text": "public function update(Request $request)\n {\n $user = Sentinel::check();\n if($user)\n {\n $id = base64_decode($request->input('update_id'));\n $solution_name = $request->input('solution_name'); \n $product_name = $request->input('product_name');\n\n $update_data = array('solution_name'=>$solution_name,'product_id'=>$product_name);\n $isUpdate = $this->solutionDtl->where('id','=',$id)->update($update_data);\n\n $updateVideos = $this->store_videos($id,$request,'update');\n\n if($updateVideos){\n Session::flash('success','Solution details updated successfully');\n return redirect()->back();\n }else{\n Session::flash('error','Something went wrong');\n return redirect()->back();\n }\n }\n else\n {\n return redirect(config('app.project.admin_panel_slug'));\n }\n\n }", "title": "" }, { "docid": "87a5c33988b7cb1ffb85a05b682412bd", "score": "0.5209271", "text": "public function putUpdate($id){\n\t\t$model = Tag::find($id);\n\t\tif(empty($model)){\n\t\t\tApp::abort(404);\n\t\t}\n\t\t$this->rules['name']\t= 'max:128|required|unique:tags,name,'.$model->id;\n\t\t$validator = Validator::make($data = Input::all(), $this->rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'name' \t\t\t\t=> Input::get('name'),\n\t\t 'frequency' \t\t=> Input::get('frequency'),\n\t\t 'freq_regions' \t\t=> Input::get('freq_regions'),\n\t\t 'mainpages_yandex' \t=> Input::get('mainpages_yandex'),\n\t\t 'titles_yandex' \t=> Input::get('titles_yandex'),\n\t\t 'mainpages_google' => Input::get('mainpages_google'),\n\t\t 'titles_google' \t=> Input::get('titles_google'),\n\t );\n\t $data['summ_google']\t= $data['mainpages_google']+$data['titles_google']; \n\t $data['summ_yandex']\t= $data['mainpages_yandex']+$data['titles_yandex']; \n \t$model->update($data);\n\t\t}\n\t\tSession::flash('success', 'Tag successfully updated!');\n\t\treturn Redirect::to('/admin/tags');\n\t}", "title": "" }, { "docid": "7e33a535f1f77ed5cbb3ceba42977048", "score": "0.5207967", "text": "public function update(Request $request, Vendedor $vendedore)\n {\n $request->validate([\n 'nombre'=>['required'],\n 'apellidos'=>['required']\n ]);\n \n if($request->has('foto')){\n $request->validate([\n 'foto'=>['image']\n ]);\n \n $file=$request->file('foto');\n $nombre='foto/'.time().'_'.$file->getClientOriginalName();\n Storage::disk('public')->put($nombre, \\File::get($file));\n \n if(basename($vendedore->foto)!='default.jpg'){\n unlink($vendedore->foto);\n }\n \n $vendedore->update($request->all());\n $vendedore->update(['foto'=>\"img/$nombre\"]);\n }\n else{\n $vendedore->update($request->all());\n }\n $vendedore->save();\n return redirect()->route('vendedores.index')->with(\"mensaje\", \"Vendedor se le cambio el contrato con exito!!!\");\n }", "title": "" }, { "docid": "e4879a8082e39a9a7f2a0ba0465a5446", "score": "0.52005017", "text": "public function update(Request $request, Vendor $vendor)\n {\n //\n }", "title": "" }, { "docid": "1854ec6ce703988c96f01b16967f37d5", "score": "0.519381", "text": "function update() {\r\n\r\n $this->autoRender = FALSE;\r\n\r\n $vars = $this->params['url'];\r\n\r\n $this->Event->id = $vars['id'];\r\n\r\n $this->Event->saveField('start', $vars['start']);\r\n\r\n $this->Event->saveField('end', $vars['end']);\r\n\r\n if (isset($vars['allDay'])) {\r\n\r\n $this->Event->saveField('all_day', $vars['allday']);\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "a6e0b35591c10c552545ea641e2d8474", "score": "0.51913255", "text": "public function updateApartment(Request $request, $slugUser, $slugApartment)\n {\n $apartment = Apartment::where('slug', '=', $slugApartment)->first();\n\n if ($request->button == \"update\") {\n $apartment->price = $request->price;\n //$apartment->currency = $request->currency;\n $apartment->description = $request->description;\n $apartment->county_id = $request->county_id;\n $apartment->stars = $request->stars;\n $apartment->save();\n } else if ($request->button == \"delete\") {\n $apartment->delete();\n } else if ($request->button == \"block\") {\n $apartment->validation = -1;\n $apartment->save();\n }\n\n return redirect(route('admin.users.user', $slugUser));\n }", "title": "" }, { "docid": "33dfdf75588b1d7e7c34808d9a9354e8", "score": "0.5186612", "text": "public function update(Request $request, $id)\n {\n $cbv = InCbv::findOrFail($id);\n $data = $request->all();\n $data['cbv_date'] = Carbon::parse($data['cbv_date']);\n $data['invoices'] = $this->getUpload($request, $cbv);\n $cbv->fill($data);\n $cbv->save();\n\n flash('Successfully updated cbv details.');\n\n return redirect()->away($request->get('ref'));\n }", "title": "" }, { "docid": "72143dd428b04aa076035592667fe71f", "score": "0.51863134", "text": "public function updateToDb()\n {\n try {\n $sql = 'UPDATE company\n SET title=\"' . $this->_title . '\", city_id=' . $this->_city->getId() . ', multi_city=' . $this->_multiCity . ',\n description=\"' . $this->_description . '\", order_email=\"' . $this->_orderEmail . '\",\n ofsite=\"' . $this->_ofSite . '\", constant_discount=\"' . $this->_constantDiscount . '\"\n WHERE id=' . $this->_id;\n $this->_db->query($sql);\n\n $fName = $this->_file->download('file');\n if ($fName !== false) {\n $this->_file->createPreview(190, 110);\n $sql = 'UPDATE company SET file=\"' . $fName . '\" WHERE id=' . $this->_id;\n $this->_db->query($sql);\n }\n\n //$this->saveAttributeList();\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "569c1a4ee457841ba3f5d15229558a4f", "score": "0.5183674", "text": "public function update(Request $request, event $event)\n {\n //dd($request->all());\n\n request()->validate([\n 'nama_event' =>'required',\n 'tanggal' => 'required',\n 'waktu' => 'required',\n 'tempat' => 'required',\n 'deskripsi' => 'required',\n ]);\n\n if ($request->upload){\n $upload = $request->file('upload')->store('event');\n $upload_path = $event->upload;\n if (Storage::exists($upload_path)){\n Storage::delete($upload_path);\n }\n $event->update([\n 'nama_event' => request('nama_event'),\n 'upload' => $upload,\n 'tanggal' => request('tanggal'),\n 'waktu' => request('waktu'),\n 'tempat' => request('tempat'),\n 'deskripsi' => request('deskripsi')\n \n ]);\n \n }else{\n $event->update([\n 'nama_event' => request('nama_event'),\n 'tanggal' => request('tanggal'),\n 'waktu' => request('waktu'),\n 'tempat' => request('tempat'),\n 'deskripsi' => request('deskripsi'),\n ]);\n }\n \n return redirect()->route('event');\n \n}", "title": "" }, { "docid": "392577f49a363fbae17cf8bec0b71b11", "score": "0.51785713", "text": "public function update(Request $request, $location)\n {\n DB::beginTransaction();\n try {\n $FormObj = $this->GetForm($request);\n\n\n $obj = Location::find($location);\n $obj['location_name'] = $FormObj[\"location_name\"];\n $obj['location_address'] = $FormObj[\"location_address\"];\n $obj['location_city'] = $FormObj[\"location_city\"];\n $obj['location_zip_code'] = $FormObj[\"location_zip_code\"];\n $obj['location_country'] = $FormObj[\"location_country\"];\n $obj['location_phone'] = $FormObj[\"location_phone\"];\n $obj['location_status'] = $FormObj[\"location_status\"];\n $obj->save();\n \n // $storeObj = Location::where('id', $location)\n // ->update([\n // 'location_name' => $FormObj[\"location_name\"],\n // 'location_address' => $FormObj[\"location_address\"],\n // 'location_city' => $FormObj[\"location_city\"],\n // 'location_zip_code' => $FormObj[\"location_zip_code\"],\n // 'location_country' => $FormObj[\"location_country\"],\n // 'location_phone' => $FormObj[\"location_phone\"],\n // 'location_phone' => $FormObj[\"location_phone\"],\n // 'location_status' => $FormObj[\"location_status\"],\n // ]);\n\n DB::commit();\n return response()->json([\n 'success' => true,\n 'status' => 200,\n 'message' => 'LOCATION UPDATED SUCCESSFULLY',\n 'data' => $obj,\n 'req' => $FormObj\n ]);\n } catch (\\Exception $e) {\n DB::rollBack();\n DevelopmentErrorLog($e->getMessage(), $e->getLine());\n return response()->json([\n 'success' => false,\n 'message' => 'PLEASE TRY AGAIN LATER',\n ], 500);\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.51781493", "text": "public function update($entity);", "title": "" }, { "docid": "60def5c10e605e428815cd11adefe8cc", "score": "0.5174518", "text": "public function update(Request $request, $street)\n {\n\t\t$end = auth()->user()->street()->find($street);\n\t\t$data = $request->all();\t\t\n\n\t\t$end->update($data);\n\n flash('Dados Atualizados com Sucesso')->success();\n\t\treturn redirect()->route('street.index');\n\n }", "title": "" }, { "docid": "d35aadaddfad90313f20abf669f82861", "score": "0.5173539", "text": "public function update(Request $request, Waiver $waiver)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n 'waiver_type_id' => 'required',\n 'amount' => 'required',\n ]);\n \n if ($validator->fails()){\n return redirect()->back()\n ->withErrors($validator)\n ->withInput();\n } \n\n $waiver->name = $request->name;\n $waiver->waiver_type_id = $request->waiver_type_id;\n $waiver->amount = $request->amount;\n $waiver->status = 1;\n $waiver->save();\n $notification = array(\n 'message' => 'Waiver Updated Successfully!',\n 'alert-type' => 'success'\n );\n\n return redirect()->route('admin.waiver.index')->with($notification);\n }", "title": "" }, { "docid": "f7aac801192091c6aa8274f60466ecf9", "score": "0.5170885", "text": "public function updated(FeaturedVideo $featuredVideo)\n {\n //\n }", "title": "" }, { "docid": "4e0459cd0c26ace4b6f4572a71da6d62", "score": "0.5167191", "text": "public function updateAlbum()\n {\n //$updatedEntry = $createdEntry->save();\n }", "title": "" }, { "docid": "6f451e84c9f7d45a609241899c324346", "score": "0.51662284", "text": "public function update(AssetLocation $location,Request $request)\n {\n $data = [ \n 'name' => $request->name, \n 'description' => $request->description, \n 'user_id' => Sentinel::getUser()->id,\n 'Updated_at' => now(),\n ]; \n $location->update($data);\n Session::flash('success', 'Asset Location Update Succeed!');\n Pharma::activities(\"Update\", \"Asset Category \", \"Updated Asset Location \");\n return redirect('asset/location');\n }", "title": "" }, { "docid": "c5e2979638f4c81d90fe05be0779db2b", "score": "0.516522", "text": "public function updateVote($params)\n {\n //\n }", "title": "" } ]
f3712b2f1593a1ef235096980d8f60fd
Unescapes a hexadecimal string into its original string representation.
[ { "docid": "76dcdf3b544f8502f9871740d806a32e", "score": "0.7093471", "text": "public static function unescape($value)\n {\n return preg_replace_callback('/\\\\\\([0-9A-Fa-f]{2})/', function ($matches) {\n return chr(hexdec($matches[1]));\n }, $value);\n }", "title": "" } ]
[ { "docid": "83b98a36e8603cb4b8fcac052536da76", "score": "0.6601657", "text": "protected function unescape($string) {\n $str = preg_replace_callback(\"/\\\\\\\\(u[0-9a-fA-F]{4}|x[0-9a-fA-F]{2}|.)/\", function ($match) {\n if (preg_match('/^\\\\\\\\x(.*)$/', $match[0], $code)) {\n return utf8_encode(chr(hexdec($code[1])));\n }\n return json_decode('\"' . $match[0] . '\"');\n }, $string);\n return $str;\n }", "title": "" }, { "docid": "20e0f47e9c459562eea43e5c50ae0447", "score": "0.64484245", "text": "public function testUnescape(): void {\n $input = 'Secretaria de Tecnologia da Informa\\C3\\A7\\C3\\A3o';\n $output = ConversionHelper::unescapeDnValue($input);\n self::assertEquals('Secretaria de Tecnologia da Informação', $output);\n }", "title": "" }, { "docid": "83f1c55716559919a95272f41329ade3", "score": "0.6329821", "text": "function regex_bash_hex($hex_entity)\n\t{\n\t\treturn html_entity_decode( \"&#\".hexdec( $hex_entity ).\";\" );\n\t}", "title": "" }, { "docid": "0ffaec7dd701bac5b4eb6958f02907df", "score": "0.63256127", "text": "function unescape($string){\n $result = '';\n $string = (string)$string;\n if ($string != null) {\n $i = 0;\n $chars = array();\n $length = strlen($string);\n while ($i < $length) {\n $ch = $string[$i++];\n if ($ch === '%') {\n if ($i + 1 < $length\n && $this->_isHex($string[$i])\n && $this->_isHex($string[$i + 1])) {\n $ch = (hexdec($string[$i]) << 4) + hexdec($string[$i + 1]);\n $i += 2;\n } else if ($i + 4 < $length && $string[$i] === 'u'\n && $this->_isHex($string[$i + 1])\n && $this->_isHex($string[$i + 2])\n && $this->_isHex($string[$i + 3])\n && $this->_isHex($string[$i + 4])) {\n $ch = (((((hexdec($string[$i + 1]) << 4)\n + hexdec($string[$i + 2])) << 4)\n + hexdec($string[$i + 3])) << 4)\n + hexdec($string[$i + 4]);\n $i += 5;\n }\n }\n if (is_int($ch)) {\n $ch = $this->unicode->chr($ch);\n }\n $result .= $ch;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "be768133878c5383320fe92fd2692feb", "score": "0.6209969", "text": "function _unescapeUTF8EscapeSeq($str) {\n return preg_replace_callback(\"/\\\\\\u([0-9a-f]{4})/i\", create_function('$matches', 'return rewrite::_bin2utf8(hexdec($matches[1]));'), $str);\n }", "title": "" }, { "docid": "2fd8edf47e908fa269617f9860b38bde", "score": "0.61716264", "text": "public function decodeHex($hash);", "title": "" }, { "docid": "92c8c3b09e2d17f6ab3fe597d9f66b3d", "score": "0.61415416", "text": "function unescape($str){\n\treturn str_replace(array('\\&', '\\\\'), array('&', ''), $str);\n }", "title": "" }, { "docid": "597947f1c337ed7e6404a977522c8a6a", "score": "0.61132383", "text": "function _decode_hex($matches) {\n return $this->unichr(hexdec($matches[1]));\n }", "title": "" }, { "docid": "e795a9af835b0baccad73fb1cac14f12", "score": "0.60964185", "text": "public static function hex_decode($hex) {\n\t\treturn gmp_strval(gmp_init($hex, 16), 10);\n\t}", "title": "" }, { "docid": "8b2d3d9293c056fc9bc4b7e057b633b6", "score": "0.60901487", "text": "function strtohex($x)\n{\n $s='';\n foreach (str_split($x) as $c) $s.=sprintf(\"%02X\",ord($c));\n return($s);\n}", "title": "" }, { "docid": "379db3fe50f2fc970ac4ce6f6166e961", "score": "0.59543884", "text": "protected function _unescapeUTF8EscapeSeq($str) {\n\t\treturn preg_replace_callback(\"/\\\\\\u([0-9a-f]{4})/i\", create_function('$matches', 'return TranslateComponent::_bin2utf8(hexdec($matches[1]));'), $str);\n\t}", "title": "" }, { "docid": "f1f1936f46d0a12522f6965de3a1bff5", "score": "0.5922632", "text": "private function reverse($hex)\n {\n }", "title": "" }, { "docid": "4ea691e4d84bd651100748287c192309", "score": "0.5822882", "text": "function _unescapeUTF8EscapeSeq($str) {\n return preg_replace_callback(\"/\\\\\\u([0-9a-f]{4})/i\", create_function('$matches', 'return Google_Translate_API::_bin2utf8(hexdec($matches[1]));'), $str);\n }", "title": "" }, { "docid": "147b71c04edfb5ed6760341b717e5ac7", "score": "0.57872844", "text": "function unescape($str)\n\t{\n\t\treturn (get_magic_quotes_gpc() == 1) ? stripslashes($str) : $str;\n\t}", "title": "" }, { "docid": "9bf042fc5f0cf68f67e341a4fa6fee37", "score": "0.57846713", "text": "function unescape($s) {\n\t\t\n\t\t$sl=strlen($s);\t \n\t\t$s2 = \"\";\n\t\tfor ($a=0;$a<$sl;$a++) {\n\t\t\t$c=substr($s,$a,1);\t \n\t\t\tif ($c == \"\\\\\") {\n\t\t\t\t\n\t\t\t\t$tmp = substr($s,$a+1,1);\n\t\t\t\tswitch ($tmp) {\n\t\t\t\t\tcase \"0\": \n\t\t\t\t\t\t$c=\"\";\t\n\t\t\t\t\t\tbreak;\t\n\n\t\t\t\t\tcase \"n\": \n\t\t\t\t\t\t$c=\"n\";\t \n\t\t\t\t\t\tbreak;\t\n\n\t\t\t\t\tcase \"t\": \n\t\t\t\t\t\t$c=\"t\";\t \n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\t \n\t\t\t\t\tcase \"r\": \n\t\t\t\t\t\t$c=\"r\";\t \n\t\t\t\t\t\tbreak;\t\n\n\t\t\t\t\tcase \"b\": \n\t\t\t\t\t\t$c=\"b\";\t \n\t\t\t\t\t\tbreak;\t\n\t \n\t\t\t\t\tcase \"'\": \n\t\t\t\t\t\t$c=\"'\";\t \n\t\t\t\t\t\tbreak;\t\n\n\t\t\t\t\tcase '\"': \n\t\t\t\t\t\t$c='\"';\t \n\t\t\t\t\t\tbreak;\t\n\n\t\t\t\t\tcase \"\": \n\t\t\t\t\t\t$c=\"\";\t\n\t\t\t\t\t\tbreak;\t\n\n\t\t\t\t\tcase \"%\": \n\t\t\t\t\t\t$c=\"%\";\t \n\t\t\t\t\t\tbreak;\t\n\n\t\t\t\t\tcase \"_\": \n\t\t\t\t\t\t$c=\"_\";\t \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t \n\t\t\t\t\tcase \"\\\\\":\n\t\t\t\t\t\t$c = \"\";\n\t\t\t\t\t\tbreak; \n\n\t\t\t\t\tdefault: \n\t\t\t\t\t\techo(\"unhandled exception! $tmp<br>\");\n\t\t\t\t}\n\t\t\t\t$a++;\n\t\t\t}\n\t\t\t$s2 .= $c; \n\t\t\t\n\t\t}\n\n\t\treturn $s2;\n\t}", "title": "" }, { "docid": "c91a34b9349b8ea57d57b03b3111631b", "score": "0.5775057", "text": "public function fromHex($hex);", "title": "" }, { "docid": "70134a5baffc17be4e59c0dae7add9a0", "score": "0.57727665", "text": "function __unescapeUTF8EscapeSeq($str) {\n return preg_replace_callback(\"/\\\\\\u([0-9a-f]{4})/i\", create_function('$matches', 'return html_entity_decode(\\'&#x\\'.$matches[1].\\';\\', ENT_NOQUOTES, \\'UTF-8\\');'), $str);\n }", "title": "" }, { "docid": "70134a5baffc17be4e59c0dae7add9a0", "score": "0.57727665", "text": "function __unescapeUTF8EscapeSeq($str) {\n return preg_replace_callback(\"/\\\\\\u([0-9a-f]{4})/i\", create_function('$matches', 'return html_entity_decode(\\'&#x\\'.$matches[1].\\';\\', ENT_NOQUOTES, \\'UTF-8\\');'), $str);\n }", "title": "" }, { "docid": "90cd49a967339ddf19c36a3d2c430dec", "score": "0.574443", "text": "private function convertFromSQLHex(string $value): string\n {\n $matches = [];\n if (preg_match_all('/(?:(?:\\A|[^\\d])0x[a-f\\d]{3,}[a-f\\d]*)+/im', $value, $matches)) {\n foreach ($matches[0] as $match) {\n $converted = '';\n foreach (str_split($match, 2) as $hex_index) {\n if (preg_match('/[a-f\\d]{2,3}/i', $hex_index)) {\n $converted .= chr(hexdec($hex_index));\n }\n }\n $value = str_replace($match, $converted, $value);\n }\n }\n // take care of hex encoded ctrl chars\n $value = preg_replace('/0x\\d+/m', ' 1 ', $value);\n return $value;\n }", "title": "" }, { "docid": "3d718ca7f5eec37c0c6703e4aa720eab", "score": "0.5738387", "text": "function _unescape($s) {\n $out = '';\n for ($count = 0, $n = strlen($s); $count < $n; $count++) {\n if ($s[$count] != '\\\\' || $count == $n-1) {\n $out .= $s[$count];\n } else {\n switch ($s[++$count]) {\n case ')':\n case '(':\n case '\\\\':\n $out .= $s[$count];\n break;\n case 'f':\n $out .= chr(0x0C);\n break;\n case 'b':\n $out .= chr(0x08);\n break;\n case 't':\n $out .= chr(0x09);\n break;\n case 'r':\n $out .= chr(0x0D);\n break;\n case 'n':\n $out .= chr(0x0A);\n break;\n case \"\\r\":\n if ($count != $n-1 && $s[$count+1] == \"\\n\")\n $count++;\n break;\n case \"\\n\":\n break;\n default:\n // Octal-Values\n if (ord($s[$count]) >= ord('0') &&\n ord($s[$count]) <= ord('9')) {\n $oct = ''. $s[$count];\n \n if (ord($s[$count+1]) >= ord('0') &&\n ord($s[$count+1]) <= ord('9')) {\n $oct .= $s[++$count];\n \n if (ord($s[$count+1]) >= ord('0') &&\n ord($s[$count+1]) <= ord('9')) {\n $oct .= $s[++$count]; \n } \n }\n \n $out .= chr(octdec($oct));\n } else {\n $out .= $s[$count];\n }\n }\n }\n }\n return $out;\n }", "title": "" }, { "docid": "b1352a3b24f7f6af19d4e29b44595ae8", "score": "0.57128847", "text": "function _unval($val)\n{\n\twhile (preg_match('/\\\\\\u([0-9A-F]{2})([0-9A-F]{2})/i', $val, $reg))\n\t{\n\t // single, escaped unicode character\n\t $utf16 = chr(hexdec($reg[1])) . chr(hexdec($reg[2]));\n\t $utf8 = utf162utf8($utf16);\n\t $val=preg_replace('/\\\\\\u'.$reg[1].$reg[2].'/i',$utf8,$val);\n\t}\n\treturn $val;\n}", "title": "" }, { "docid": "e5dd9a32a7ad1be7c8f251ce279e11fe", "score": "0.5705545", "text": "function xmlUnescape($str){\n return html_entity_decode($str,ENT_COMPAT, \"UTF-8\");\n }", "title": "" }, { "docid": "5d824e7c06a16287c292784605ddb345", "score": "0.5628042", "text": "public static function unescape($string) {\n return html_entity_decode($string, ENT_QUOTES, 'UTF-8');\n }", "title": "" }, { "docid": "b092d65102b778b8fe8520e60f7ca287", "score": "0.56096584", "text": "protected static function unescapeString($matches) {\n\t\tstatic $map = ['n' => \"\\n\", 'r' => \"\\r\", 't' => \"\\t\", 'v' => \"\\v\", 'f' => \"\\f\"];\n\t\t\n\t\tif (!empty($matches[2]))\n\t\t\treturn chr(octdec($matches[2]));\n\t\telseif (!empty($matches[3]))\n\t\t\treturn chr(hexdec($matches[3]));\n\t\telseif (isset($map[$matches[1]]))\n\t\t\treturn $map[$matches[1]];\n\t\t\n\t\treturn $matches[1];\n\t}", "title": "" }, { "docid": "ea0488fbe067b89814e6d3a15d685630", "score": "0.5575632", "text": "function preg_unescape ( $value ) {\r\n\t\t/*\r\n\t\t * When using the e modifier, this function escapes some characters (namely ', \", \\ and null) in the strings that replace the backreferences.\r\n\t\t * This is done to ensure that no syntax errors arise from backreference usage with either single or double quotes (e.g. 'strlen(\\'$1\\')+strlen(\"$2\")').\r\n\t\t * Make sure you are aware of PHP's string syntax to know exactly how the interpreted string will look like.\r\n\t\t */\r\n\t\t$result = str_replace(array(\"\\\\'\", '\\\\\"', '\\\\\\\\', '\\\\0'), array(\"'\", '\"', '\\\\', '\\0'), $value);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "56365f52f57782394ca6d97f1887db65", "score": "0.55582756", "text": "function escape_sequence_decode($str)\n{\n\n // [U+D800 - U+DBFF][U+DC00 - U+DFFF]|[U+0000 - U+FFFF]\n $regex = '/\\\\\\u([dD][89abAB][\\da-fA-F]{2})\\\\\\u([dD][c-fC-F][\\da-fA-F]{2})\n |\\\\\\u([\\da-fA-F]{4})/sx';\n\n return preg_replace_callback($regex, function ($matches) {\n\n if (isset($matches[3])) {\n $cp = hexdec($matches[3]);\n } else {\n $lead = hexdec($matches[1]);\n $trail = hexdec($matches[2]);\n\n // http://unicode.org/faq/utf_bom.html#utf16-4\n $cp = ($lead << 10) + $trail + 0x10000 - (0xD800 << 10) - 0xDC00;\n }\n\n // https://tools.ietf.org/html/rfc3629#section-3\n // Characters between U+D800 and U+DFFF are not allowed in UTF-8\n if ($cp > 0xD7FF && 0xE000 > $cp) {\n $cp = 0xFFFD;\n }\n\n // https://github.com/php/php-src/blob/php-5.6.4/ext/standard/html.c#L471\n // php_utf32_utf8(unsigned char *buf, unsigned k)\n\n if ($cp < 0x80) {\n return chr($cp);\n } else if ($cp < 0xA0) {\n return chr(0xC0 | $cp >> 6) . chr(0x80 | $cp & 0x3F);\n }\n\n return html_entity_decode('&#' . $cp . ';');\n }, $str);\n}", "title": "" }, { "docid": "a5cc3ca9320a1406e2ea2ea675169618", "score": "0.55528045", "text": "function hexToStr($string) {\n\t\t$pattern = array(' ', '-', '\\x', '0x', ',', ':');\n\t\t$string = str_replace($pattern, '', $string);\n\t\t$str = pack('H*', $string);\n\n\t\tif(!ctype_xdigit($string)) {\n\t\t\t$_SESSION['errors'] = \"HEX field contains invalid characters\";\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "5c6e9859c7a6db676520cb847e6f3f18", "score": "0.5546564", "text": "private function _strtohex( $x ) {\n $rVal = '';\n\n foreach (str_split($x) as $c) {\n $rVal .= sprintf(\"%02X\", ord($c));\n }\n\n return($rVal);\n }", "title": "" }, { "docid": "7fa80ad41dd6514baf004e1503cc76c5", "score": "0.5528097", "text": "public function DecodeHex()\n {\n $hexadecimal = intval($this->hexValue, 16);\n $hexadecimal2 = $hexadecimal;\n $hexadecimal3 = $hexadecimal;\n $hexadecimal1 = (($hexadecimal2 &= 0x7F00) >> 1) + ($hexadecimal3 &= 0x7F);\n $hexadecimal1 = $hexadecimal1 -8192;\n return $hexadecimal1;\n }", "title": "" }, { "docid": "9722090914296df902cd2b8551905a33", "score": "0.5503154", "text": "private function escapeHex($string)\n {\n if ($this->hexTable === null) {\n $chars = array_merge(range(0, 47), range(58, 64), range(91, 94), array(96), range(123, 255));\n foreach ($chars as $char) {\n $this->hexTable[chr($char)] = 'x' . strtoupper(bin2hex(chr($char)));\n }\n }\n \n return strtr($string, $this->hexTable);\n }", "title": "" }, { "docid": "11166acafcb3b94f60d5b6f56705421f", "score": "0.55021304", "text": "protected static function unescape_utf16($string) {\n\t\t$string = preg_replace_callback(\n\t\t\t'/\\\\\\\\u(D[89ab][0-9a-f]{2})\\\\\\\\u(D[c-f][0-9a-f]{2})/i',\n\t\t\tarray('Generic_Kobra', 'callback'), $string);\n\t\t/* now the rest */\n\t\t$string = preg_replace_callback('/\\\\\\\\u([0-9a-f]{4})/i',\n\t\t\tarray('Generic_Kobra', 'callback'), $string);\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "d0eec188bd865b03d12f4377589afc41", "score": "0.5421365", "text": "function unicode_decode($str) {\n\treturn preg_replace_callback ( '/\\\\\\\\u([0-9a-f]{4})/i', 'replace_unicode_escape_sequence', $str );\n}", "title": "" }, { "docid": "25c88113790a9f627fbf7ac336328556", "score": "0.5415075", "text": "function string2hex($string)\n\t{\n\t\t$array = str_split($string);\t\t\n\t\tforeach ($array as $value) \n\t\t{\n\t\t\t\t$final .= \"00\" .bin2hex($value);\t\t\t \n\t\t}\n\t\t$final = strtoupper($final);\n\t\treturn $final;\n\t}", "title": "" }, { "docid": "cf71606a9cace21e1345f0aba43ba21b", "score": "0.5405612", "text": "function binhex_reverse($hexin)\n{\n return strtoupper(bin2hex(strrev(pack(\"H*\", $hexin))));\n}", "title": "" }, { "docid": "7cab85f55e87d89e93793819cf89cfa6", "score": "0.53856754", "text": "function nice_hex($str) {\n return strtoupper(implode(' ',str_split($str,2)));\n}", "title": "" }, { "docid": "5c4db6037c0ed16dbe4f1303f1bc750b", "score": "0.5376265", "text": "function unescapeSpecial ($in) {\n // before writing to database\n if ($in == \"\\\\0\") {\n return null;\n } else {\n $in = str_replace (\"\\\\\\\\\", \"\\\\\", $in);\n $in = str_replace ('\\\\\"', '\"', $in);\n $in = str_replace (\"\\\\n\", \"\\r\\n\", $in);\n if (CHARSET != \"UTF-8\") {\n $in = iconv (\"UTF-8\", CHARSET, $in);\n }\n return ($in);\n }\n}", "title": "" }, { "docid": "8604ed65bf3278186621719d56e000e6", "score": "0.53724724", "text": "function of_sanitize_hex( $hex, $default = '' ) {\r\n\tif ( of_validate_hex( $hex ) ) {\r\n\t\treturn $hex;\r\n\t}\r\n\treturn $default;\r\n}", "title": "" }, { "docid": "25255facff2e35cfda398c4991715a6c", "score": "0.53531814", "text": "public function str_to_hex($string){\n $hex='';\n for ($i=0; $i < strlen($string); $i++){\n $hex .= dechex(ord($string[$i]));\n }\n return $hex;\n}", "title": "" }, { "docid": "21d575c9e1c2e87c1d61902c510466ba", "score": "0.53527135", "text": "public static function unescapeRef(string $str): string {\n return str_replace(['~2', '~1', '~0'], ['$', '/', '~'], $str);\n }", "title": "" }, { "docid": "23875dfe182e8d98e46f3830c391184e", "score": "0.5343096", "text": "function _unescape($s)\r\n{\r\n\t$s = preg_replace_callback(\r\n\t\t'/% (?: u([A-F0-9]{1,4}) | ([A-F0-9]{1,2})) /sxi',\r\n\t\t\"_unescape_callback\",\r\n\t\t$s\r\n\t);\r\n\r\n\treturn $s;\r\n}", "title": "" }, { "docid": "438fb79dbf464a2d07451f5ef39efd8c", "score": "0.5284121", "text": "public static function GetHexFromString($str)\n {\n //---\n $result = '';\n for($i = 0; $i < strlen($str); $i++)\n {\n $result .= sprintf(\"%02x\", ord($str[$i]));\n }\n //---\n return $result;\n }", "title": "" }, { "docid": "4aad74e7ea4bd90e53b667cc559d82d0", "score": "0.5267035", "text": "private function str2hex($string)\n {\n $unpack = unpack('H*', $string);\n return array_shift($unpack);\n }", "title": "" }, { "docid": "3a2e19cffe1a5bbb697d6d1f0b637ca1", "score": "0.5267012", "text": "function of_sanitize_hex( $hex, $default = '' ) {\n\tif ( of_validate_hex( $hex ) ) {\n\t\treturn $hex;\n\t}\n\n\treturn $default;\n}", "title": "" }, { "docid": "3b70619c51707088888945111755347f", "score": "0.5253374", "text": "function hexentities_to_decentities($chaine)\n{\n preg_match_all('/&#([a-zA-Z0-9]*);/', $chaine, $matches);\n $cpt = 0;\n foreach($matches[0] as $subval)\n {\n //echo $subval.'<br />';\n $rep = '&#' . hexdec($matches[1][$cpt]) . ';';\n $chaine = str_replace($subval, $rep, $chaine);\n $cpt++;\n }\n return($chaine);\n}", "title": "" }, { "docid": "3485b2fcf29b10f0e87e95f2f6e4e04c", "score": "0.5201445", "text": "private function unescapeLatinCharacters($str)\n {\n if ($this->latinCharacters) {\n $str = vsprintf($str, $this->latinCharacters);\n $this->latinCharacters = array();\n }\n\n return $str;\n }", "title": "" }, { "docid": "5cc324cbfa9e6ebc5b3b1c0602f0fd9f", "score": "0.5181677", "text": "#[Pure]\nfunction quoted_printable_decode(string $string): string {}", "title": "" }, { "docid": "71d73373d97c693711d7792cc5438b33", "score": "0.516787", "text": "function htmldecode($str)\n {\n\n // Hex encoding '&#x20;' -> ' '\n $str = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec(\"\\\\1\"))', $str);\n\n // Hex encoding without semicolons '&#x20' -> ' '\n $str = preg_replace('~&#x([0-9a-f]+)~ei', 'chr(hexdec(\"\\\\1\"))', $str);\n\n // UTF-8 Unicode encoding '&#32;' -> ' '\n $str = preg_replace('~&#([0-9]+);~e', 'chr(\"\\\\1\")', $str);\n\n // UTF-8 Unicode encoding without semicolons '&#32' -> ' '\n $str = preg_replace('~&#([0-9]+)~e', 'chr(\"\\\\1\")', $str);\n\n return $str;\n }", "title": "" }, { "docid": "6a592876392a6f434fe986e2b75a7b4d", "score": "0.5164265", "text": "public static function GetFromHex($str_hex)\n {\n $length = strlen($str_hex);\n if(($length % 2)) return 0;\n //---\n $result = '';\n for($i = 0; $i < $length; $i += 2)\n {\n $result .= chr(hexdec(substr($str_hex, $i, 2)));\n }\n //---\n return $result;\n }", "title": "" }, { "docid": "34577911e0810ab22d0a37ab3b2980dc", "score": "0.5148486", "text": "public function ircStripper($input)\n {\n return preg_replace(\"#\\x16|\\x1d|\\x1f|\\x02|\\x03(?:\\d{1,2}(?:,\\d{1,2})?)?#\",'',$input);\n }", "title": "" }, { "docid": "ba90b18788fd0ac8f17ea3daa436c717", "score": "0.5129056", "text": "public static function un_escape($text)\n\t{\n\t\treturn trim(htmlspecialchars_decode((string)$text, ENT_QUOTES | ENT_HTML401));\n\t}", "title": "" }, { "docid": "21e0b97ea9f1f8f68cc47d35ac83942d", "score": "0.51054025", "text": "function pureblog_sanitize_hexcolor($color) {\n if ($unhashed = sanitize_hex_color_no_hash($color))\n return '#' . $unhashed;\n return $color;\n}", "title": "" }, { "docid": "5c7627d186291f44758ed367c15a7bf0", "score": "0.5101153", "text": "function hex2str($hex)\n {\n \t$str=0;\n for($i=0;$i<strlen($hex);$i+=2)\n \n $str += ord(chr(hexdec(substr('0x'.$hex,$i,2))));\n\n return dechex($str);\n }", "title": "" }, { "docid": "7ad3a5be1729a262fccb538e96cef901", "score": "0.5088271", "text": "function unescapeSQLString($string, $concat = null){\n static $tr = array(\n '\\0' => \"\\x00\",\n \"\\\\'\" => \"'\",\n '\\\\\"' => '\"',\n '\\b' => \"\\x08\",\n '\\n' => \"\\x0A\",\n '\\r' => \"\\x0D\",\n '\\t' => \"\\t\",\n '\\Z' => \"\\x1A\",// (Ctrl-Z)\n '\\\\\\\\' => '\\\\',\n '\\%' => '%',\n '\\_' => '_'\n );\n if ($concat !== null && ord($string) === ord($concat)) {\n $string = $this->concatStringTokens($string, $concat);\n }\n $string = strtr($string, $tr);\n return $string;\n }", "title": "" }, { "docid": "cd63fe4f471390b9f5b0cbf5bf223ce7", "score": "0.50737274", "text": "private function quotedPrintableDecode($input)\n {\n // Remove soft line breaks\n $input = preg_replace(\"/=\\r?\\n/\", '', $input);\n\n // Replace encoded characters\n\t\t$input = preg_replace('/=([a-f0-9]{2})/ie', \"chr(hexdec('\\\\1'))\", $input);\n\n return $input;\n }", "title": "" }, { "docid": "8e9f467b9e888e3170ea236ed60794ce", "score": "0.5068447", "text": "protected function doTransform($value)\n {\n if (!ctype_xdigit($value) || strlen($value)!==32) {\n throw new T_Exception_Filter(\"Invalid hexadecimal 32-char hash $value\");\n }\n return $value;\n }", "title": "" }, { "docid": "296fc0cc5dfe2656cc108f49c23bfd9e", "score": "0.5056213", "text": "public function unprepare($string) {\r\n $rmap = array('/\"\\s+\"/', '/\\\\\\\\n/', '/\\\\\\\\r/', '/\\\\\\\\t/', '/\\\\\\\\\"/');\r\n $smap = array('', \"\\n\", \"\\r\", \"\\t\", '\"');\r\n return (string) preg_replace($smap, $rmap, $string);\r\n }", "title": "" }, { "docid": "c80483e377fb14096c07fe856105ed96", "score": "0.50495285", "text": "public function dec($hex)\n {\n for($i = 0, $hexLen = strlen($hex); $i < $hexLen; $i = $i + 2)\n {\n $delimiter = ((($i / 2) + 1) % 4 === 0 AND $i !== 0) ? \" \":\" \"; //Tab or space\n $delimiter = ((($i / 2) + 1) % 16 === 0 AND $i !== 0) ? \"\\n\" :$delimiter; //New line after 4 colums (16/4=4)\n $result .= sprintf(\"%-3s\", hexdec(substr($hex, $i, 2))) . $delimiter;\n }\n \n return trim($result);\n }", "title": "" }, { "docid": "9578a1156d4781906f43271e6ba29c53", "score": "0.50105", "text": "public static function fromHex($hex)\r\n {\r\n $string = \"\";\r\n\r\n if(strlen($hex)%2 == 1)\r\n {\r\n throw new TeamSpeak3_Helper_Exception(\"given parameter '\" . $hex . \"' is not a valid hexadecimal number\");\r\n }\r\n\r\n foreach(str_split($hex, 2) as $chunk)\r\n {\r\n $string .= chr(hexdec($chunk));\r\n }\r\n\r\n return new self($string);\r\n }", "title": "" }, { "docid": "3cbd8d6f9a49b37a59b376ad25218082", "score": "0.50079787", "text": "public static function unsanitizeInputValue($value)\n {\n return htmlspecialchars_decode($value, self::HTML_ENCODING_QUOTE_STYLE);\n }", "title": "" }, { "docid": "9825a18d2d86a942509dc32f55734310", "score": "0.5000967", "text": "abstract public function escape($unescapedValue);", "title": "" }, { "docid": "604f8c34850108b4ae12952b79c4f299", "score": "0.4998698", "text": "private function remove_unicode_sequences($struct)\n\t{\n\t\treturn preg_replace(\"/\\\\\\\\u([a-f0-9]{4})/e\", \"iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))\", $struct);\n\t}", "title": "" }, { "docid": "c0196570fe7dd1514ea15029567d6ab1", "score": "0.4991092", "text": "function magic_parse_str ($data)\n { \n $data = preg_replace_callback('/(?:^|(?<=&))[^=[]+/', function($match) {\n return bin2hex(urldecode($match[0]));\n }, $data);\n parse_str($data, $values);\n return @array_combine(array_map('hextobin', array_keys($values)), $values);\n }", "title": "" }, { "docid": "825f6289e1efd81d3b7743fcad8b1f6b", "score": "0.4983313", "text": "public static function unescape_ical_chars($string)\n {\n $string = str_replace(array(\"\\\\r\", \"\\\\n\", \"\\\\;\", \"\\\\,\", \"\\\\\\\\\"), array(\"\\r\", \"\\n\", \";\", \",\", \"\\\\\"), $string);\n return $string;\n }", "title": "" }, { "docid": "6321c0c71e5972b3be306765b39f0652", "score": "0.4980708", "text": "public static function asc2hex32($string)\n {\n for ($i = 0; $i < strlen($string); $i++) {\n $char = substr($string, $i, 1);\n if (ord($char) < 32) {\n $hex = dechex(ord($char));\n if (strlen($hex) == 1) $hex = '0'.$hex;\n $string = str_replace($char, '\\\\'.$hex, $string);\n }\n }\n return $string;\n }", "title": "" }, { "docid": "8f233782fb088ec5aad01972e0a32969", "score": "0.49761754", "text": "function unichr($u) { return mb_convert_encoding('&#' . intval($u) . ';', 'UTF-8', 'HTML-ENTITIES');}", "title": "" }, { "docid": "1fc9898ea1972a0db1024d441c241122", "score": "0.49637237", "text": "public function getHexValue(): string;", "title": "" }, { "docid": "11b9da2376c7e8f3224a1747172777d6", "score": "0.49494463", "text": "static public function hexDump( $string ){\r\n \r\n echo '<pre>';\r\n for( $position = 0; $position < strlen($string); $position++ ){\r\n\r\n $character = $string[$position];\r\n if( $position != 0 ){\r\n echo \" \";\r\n if( $position % 4 == 0 ){\r\n echo \" \";\r\n }\r\n if( $position % 16 == 0 ){\r\n echo \"\\n\";\r\n }\r\n }\r\n echo dechex(ord($character));\r\n \r\n }\r\n exit();\r\n \r\n }", "title": "" }, { "docid": "2d49a1116d9b45b9524000301e566135", "score": "0.494714", "text": "private function unescape_command($str)\n {\n /* Check if given value is a command (/[a-z]/ ..)\n */\n if(preg_match(\"/^\\//\",$str)){\n $cmd = preg_replace(\"/^([^ ]*).*$/\",\"\\\\1\",$str);\n $val = preg_replace(\"/^[^ ]*(.*)$/\",\"\\\\1\",$str);\n $val = preg_replace(array(\"/\\\\\\\\\\\\\\\\/\",\"/\\\\\\\\,/\",\"/\\\\\\\\:/\",\"/\\\\\\\\=/\"),\n array(\"\\\\\",\",\",\":\",\"=\"),$val);\n $str = $cmd.$val;\n }\n return($str);\n }", "title": "" }, { "docid": "bddae4650c1995666838f6e3db1e04b4", "score": "0.49388468", "text": "function pun_htmlspecialchars_decode($str)\n{\n\tif (function_exists('htmlspecialchars_decode'))\n\t\treturn htmlspecialchars_decode($str, ENT_QUOTES);\n\n\tstatic $translations;\n\tif (!isset($translations))\n\t{\n\t\t$translations = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES);\n\t\t$translations['&#039;'] = '\\''; // get_html_translation_table doesn't include &#039; which is what htmlspecialchars translates ' to, but apparently that is okay?! http://bugs.php.net/bug.php?id=25927\n\t\t$translations = array_flip($translations);\n\t}\n\n\treturn strtr($str, $translations);\n}", "title": "" }, { "docid": "b072947ba48b71ee4920b879bd3007fd", "score": "0.49309993", "text": "protected function convertToHex()\n {\n $ary = str_split($this->properties['data']);\n $length = count($ary);\n\n for ($i = 0; $i < $length; $i++) {\n $this->properties['hex'] .= bin2hex($ary[$i]);\n }\n }", "title": "" }, { "docid": "9172b1775f39e8961e00129fc95ef5db", "score": "0.492649", "text": "protected function decode($str)\n\t{\n\t\tif ($this->config['decodeHtmlEntities'] && strpos($str, '&') !== false)\n\t\t{\n\t\t\t$str = html_entity_decode($str, ENT_QUOTES, 'UTF-8');\n\t\t}\n\t\t$str = str_replace(\"\\x1A\", '', $str);\n\n\t\tif ($this->hasEscapedChars)\n\t\t{\n\t\t\t$str = strtr(\n\t\t\t\t$str,\n\t\t\t\t[\n\t\t\t\t\t\"\\x1B0\" => '!', \"\\x1B1\" => '\"', \"\\x1B2\" => \"'\", \"\\x1B3\" => '(',\n\t\t\t\t\t\"\\x1B4\" => ')', \"\\x1B5\" => '*', \"\\x1B6\" => '[', \"\\x1B7\" => '\\\\',\n\t\t\t\t\t\"\\x1B8\" => ']', \"\\x1B9\" => '^', \"\\x1BA\" => '_', \"\\x1BB\" => '`',\n\t\t\t\t\t\"\\x1BC\" => '~'\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "342b48a472cf9b35799108a120c842df", "score": "0.49220252", "text": "function swoole_native_curl_unescape(CurlHandle $handle, string $string): string|false\n{\n}", "title": "" }, { "docid": "bcc54452e9494da0423ee90baceaee10", "score": "0.4921364", "text": "public static function urldecodeRFC3986($string)\r\n {\r\n return rawurldecode($string); // no exta stuff needed for ~, goes correctly automatically\r\n }", "title": "" }, { "docid": "d98ae1132328345d3cf2ec2ba62e6111", "score": "0.49096027", "text": "function FixFeed(&$rawFeed)\n{\n $rawFeed = preg_replace('/[^(\\x20-\\x7F)]*/', '', $rawFeed);\n}", "title": "" }, { "docid": "de478e6590365ad796aa8c92835c0080", "score": "0.4903954", "text": "function unmask($text) {\n\t$length = ord($text[1]) & 127;\n\tif($length == 126) {\n\t\t$masks = substr($text, 4, 4);\n\t\t$data = substr($text, 8);\n\t}\n\telseif($length == 127) {\n\t\t$masks = substr($text, 10, 4);\n\t\t$data = substr($text, 14);\n\t}\n\telse {\n\t\t$masks = substr($text, 2, 4);\n\t\t$data = substr($text, 6);\n\t}\n\t$text = \"\";\n\tfor ($i = 0; $i < strlen($data); ++$i) {\n\t\t$text .= $data[$i] ^ $masks[$i%4];\n\t}\n\treturn $text;\n}", "title": "" }, { "docid": "959564d8a9c9c7dfee4fb6656809aea9", "score": "0.48877656", "text": "function raw_u($string=\"\") {\n return rawurldecode($string);\n }", "title": "" }, { "docid": "18ac8a091531476c8b79040ed1bca800", "score": "0.4886642", "text": "public function _decodeQuotedPrintable($value)\n {\n $result = \"\";\n \n for($i = 0; $i < strlen($value); $i++) {\n \n if ($value[$i] == '=') {\n $char = $value[$i+1] . $value[$i+2];\n $result .= chr(hexdec($char));\n $i+= 2;\n } else {\n $result .= $value[$i];\n }\n \n }\n \n return $result;\n }", "title": "" }, { "docid": "b4d005244208fa6b584af6394a73cecb", "score": "0.4879569", "text": "function repackUTF7Callback($str)\r\n {\r\n $str = base64_decode($str[1]);\r\n $str = preg_replace_callback('/^((?:\\x00.)*)((?:[^\\x00].)+)/', array($this, 'repackUTF7Back'), $str);\r\n return preg_replace('/\\x00(.)/', '$1', $str);\r\n }", "title": "" }, { "docid": "eb04719724dae547b0e375ebc01b2d41", "score": "0.48761567", "text": "function mygengo_reverse_escape($str) {\n\t$search=array(\"\\\\\\\\\",\"\\\\0\",\"\\\\n\",\"\\\\r\",\"\\Z\",\"\\'\",'\\\"');\n\t$replace=array(\"\\\\\",\"\\0\",\"\\n\",\"\\r\",\"\\x1a\",\"'\",'\"');\n\treturn str_replace($search,$replace,$str);\n}", "title": "" }, { "docid": "5589deea9450bccc7dcfeb70db7821fb", "score": "0.48667404", "text": "public abstract function hexvalue($value, $collation = '', $charset = '');", "title": "" }, { "docid": "f14435c211727f21dadc4cd0b5ef49bb", "score": "0.4864785", "text": "public function encodeHex($str);", "title": "" }, { "docid": "c9ec39f4313edec9c3377c346e728330", "score": "0.4847542", "text": "protected function _unescape($var)\n\t\t{\n\t\tif (is_array($var))\n\t\t\t{\n\t\t\tforeach ($var as $key=>$value)\n\t\t\t\t{\n\t\t\t\t$var[$key] = $this->_unescape($value);\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tif (is_string($var))\n\t\t\t\t$var = htmlspecialchars_decode($var, ENT_QUOTES);\n\t\t\t}\n\t\treturn $var;\n\t\t}", "title": "" }, { "docid": "8631342c96cf203154db22d7a2446d2e", "score": "0.48443067", "text": "public static function sanitize_hex( $color ) {\n\t\t\t// sanitize_hex_color() は undefined function くらう\n\t\t\t$color = ltrim( $color, '#' );\n\t\t\treturn preg_match( '/([A-Fa-f0-9]{3}){1,2}$/', $color ) ? $color : '';\n\t\t}", "title": "" }, { "docid": "adcc3262e08004ec4f3d4dc39d034f2e", "score": "0.4843295", "text": "function SK_hex2str( $hexa )\r\n { $length= strlen($hexa);\r\n $retour= '';\r\n for ($i=0 ; $i<$length ; $i+=2)\r\n $retour.= chr(hexDec( substr($hexa, $i, 2) ));\r\n return( $retour );\r\n }", "title": "" }, { "docid": "2a25f0455919e05cf251d9cb5c2b4e98", "score": "0.48232058", "text": "public static function unmask($text) {\n\t\t$length = ord($text[1]) & 127;\n\t\tif($length == 126) {\n\t\t\t$masks = substr($text, 4, 4);\n\t\t\t$data = substr($text, 8);\n\t\t}\n\t\telseif($length == 127) {\n\t\t\t$masks = substr($text, 10, 4);\n\t\t\t$data = substr($text, 14);\n\t\t}\n\t\telse {\n\t\t\t$masks = substr($text, 2, 4);\n\t\t\t$data = substr($text, 6);\n\t\t}\n\t\t$text = \"\";\n\t\tfor ($i = 0; $i < strlen($data); ++$i) {\n\t\t\t$text .= $data[$i] ^ $masks[$i%4];\n\t\t}\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "cbeae4901e32833b579cc1b5f3082366", "score": "0.48154715", "text": "public static function sanitize_hex( $color = '#FFFFFF', $hash = true ) {\n\t \tif ( ! $hash ) {\n\t \t\treturn ltrim( self::sanitize_color( $color, 'hex' ), '#' );\n\t \t}\n\t \treturn self::sanitize_color( $color, 'hex' );\n\t}", "title": "" }, { "docid": "70ac7186be70741c41319f59508ae224", "score": "0.4813456", "text": "function unmask($text) {\n\t\t$length = ord($text[1]) & 127;\n\t\tif($length == 126){\n\t\t\t$masks = substr($text, 4, 4);\n\t\t\t$data = substr($text, 8);\n\t\t}elseif($length == 127){\n\t\t\t$masks = substr($text, 10, 4);\n\t\t\t$data = substr($text, 14);\n\t\t}else{\n\t\t\t$masks = substr($text, 2, 4);\n\t\t\t$data = substr($text, 6);\n\t\t}\n\t\t$text = \"\";\n\t\tfor($i = 0; $i < strlen($data); ++$i){\n\t\t\t$text .= $data[$i] ^ $masks[$i%4];\n\t\t}\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "a22c4dac3500da4062ae6c24bd5c7f14", "score": "0.48088998", "text": "function decode($string){ \n\t\t$nopermitidos = array(\"'\",'\\\\','<','>',\"\\\"\",\"-\",\"%\");\n\t\t$string = str_replace($nopermitidos, \"\", $string);\n\t\treturn $string;\n }", "title": "" }, { "docid": "14a76b1f731229f0ed252ec5c3bed945", "score": "0.4806799", "text": "function SK_str2hex( $string )\r\n { $length= strlen($string);\r\n $retour= '';\r\n for ($i=0 ; $i<$length ; $i++)\r\n $retour.= str_pad( decHex(ord($string[$i])), 2, '0', STR_PAD_LEFT );\r\n// $retour.= ( strlen(decHex(ord($string[$i]))) % 2 ) ? '0'.decHex( ord($string[$i]) ) : decHex( ord($string[$i]) ); \r\n return( $retour ); \r\n }", "title": "" }, { "docid": "1a30779980be86633ce009800689db93", "score": "0.48037937", "text": "public function xmlentities($s, $hex = true) {\n // if the string is empty\n if (empty($s)) {\n // just return it\n return $s;\n }\n\n // create the return string\n $r = '';\n // get the length\n $l = strlen($s);\n\n // iterate the string\n for ($i = 0; $i < $l; $i++) {\n // get the value of the character\n $o = $this->unicode_ord($s, $i);\n\n // valid cahracters\n $v = (\n // \\t \\n <vertical tab> <form feed> \\r\n ($o >= 9 && $o <= 13) ||\n // <space> !\n ($o == 32) || ($o == 33) ||\n // # $ %\n ($o >= 35 && $o <= 37) ||\n // ( ) * + , - . /\n ($o >= 40 && $o <= 47) ||\n // numbers\n ($o >= 48 && $o <= 57) ||\n // : ;\n ($o == 58) || ($o == 59) ||\n // = ?\n ($o == 61) || ($o == 63) ||\n // @\n ($o == 64) ||\n // uppercase\n ($o >= 65 && $o <= 90) ||\n // [ \\ ] ^ _ `\n ($o >= 91 && $o <= 96) ||\n // lowercase\n ($o >= 97 && $o <= 122) ||\n // { | } ~\n ($o >= 123 && $o <= 126)\n );\n\n // if it's valid, just keep it\n if ($v) {\n $r .= $s[$i];\n\n // &\n } elseif ($o == 38) {\n $r .= '&amp;';\n\n // <\n } elseif ($o == 60) {\n $r .= '&lt;';\n\n // >\n } elseif ($o == 62) {\n $r .= '&gt;';\n\n // '\n } elseif ($o == 39) {\n $r .= '&apos;';\n\n // \"\n } elseif ($o == 34) {\n $r .= '&quot;';\n\n // unknown, add it as a reference\n } elseif ($o > 0) {\n if ($hex) {\n $r .= '&#x'.strtoupper(dechex($o)).';';\n\n } else {\n $r .= '&#'.$o.';';\n }\n }\n }\n\n return $r;\n}", "title": "" }, { "docid": "2798114c9c8164da617961dd5176eb5e", "score": "0.4796853", "text": "function unEscapeSpecialCharacters($data)\n{\n\t$data = is_array($data) ? array_map('unEscapeSpecialCharacters', $data) :stripslashes($data);\n return $data;\n}", "title": "" }, { "docid": "c987068f7f03711031b3c4a760cbb390", "score": "0.47887188", "text": "function remove_double_slashes($str)\n {\n $str = str_replace(\"://\", \"{:SS}\", $str);\n $str = str_replace(\":&#47;&#47;\", \"{:SHSS}\", $str); // Super HTTP slashes saved!\n $str = preg_replace(\"#/+#\", \"/\", $str);\n $str = preg_replace(\"/(&#47;)+/\", \"/\", $str);\n $str = str_replace(\"&#47;/\", \"/\", $str);\n $str = str_replace(\"{:SHSS}\", \":&#47;&#47;\", $str);\n $str = str_replace(\"{:SS}\", \"://\", $str);\n\n return $str;\n }", "title": "" }, { "docid": "93ba35955edcf31891d2c73f243ce15b", "score": "0.47779882", "text": "function tep_html_unquote($string) {\n return str_replace(\"&#39;\", \"'\", $string);\n }", "title": "" }, { "docid": "6916e0eb6512f29f72f23d605f8d3d26", "score": "0.47770467", "text": "function bintohex($data) {\r\n\treturn bin2hex($data);\r\n}", "title": "" }, { "docid": "f36ef17bd2cfc0e17c6dd246f5680105", "score": "0.47685218", "text": "public static function convertStringToHexString($s) {\n\t\t$bs = '';\n\t\t$chars = preg_split('//', $s, -1, PREG_SPLIT_NO_EMPTY);\n\t\tforeach ($chars as $c) {\n\t\t\t$bs .= sprintf('%02s', dechex(ord($c)));\n\t\t}\n\t\treturn $bs;\n\t}", "title": "" }, { "docid": "76d3026df50ff543d966aa35bfba7e25", "score": "0.4763653", "text": "public static function hex($input, ValidationInfo $info = null)\n {\n if (ctype_xdigit($input)) {\n return $input;\n }\n throw new Invalid('Expecting only hexadecimal digits.');\n }", "title": "" }, { "docid": "1618e5ae766299233097830ad38fb894", "score": "0.47466233", "text": "function StripInvalidXMLChars($input)\n\t{\n\t\t// attempt to strip using replace first\n\t\t$replace_input = @preg_replace(\"/\\p{C}/u\", \" \", $input);\n\t\tif (!is_null($replace_input)) {\n\t\t\treturn $replace_input;\n\t\t}\n\n\t\t// manually check each character\n\t\t$output = \"\";\n\t\tfor ($x = 0; $x < isc_strlen($input); $x++) {\n\t\t\t$char = isc_substr($input, $x, 1);\n\t\t\t$code = uniord($char);\n\n\t\t\tif ($code === false) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($code == 0x9 ||\n\t\t\t\t$code == 0xA ||\n\t\t\t\t$code == 0xD ||\n\t\t\t\t($code >= 0x20 && $code <= 0xD7FF) ||\n\t\t\t\t($code >= 0xE000 && $code <= 0xFFFD) ||\n\t\t\t\t($code >= 0x10000 && $code <= 0x10FFFF)) {\n\n\t\t\t\t$output .= $char;\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "0351ef84bf54dd99b082d79fddc23ee5", "score": "0.47463375", "text": "public function decode($string);", "title": "" }, { "docid": "0351ef84bf54dd99b082d79fddc23ee5", "score": "0.47463375", "text": "public function decode($string);", "title": "" }, { "docid": "39c4af8653a73c73567d132284e63b01", "score": "0.47341576", "text": "function strToHex($string){\r\n $hex = '';\r\n for ($i=0; $i<strlen($string); $i++){\r\n $ord = ord($string[$i]);\r\n $hexCode = dechex($ord);\r\n $hex .= substr('0'.$hexCode, -2);\r\n }\r\n return strToUpper($hex);\r\n}", "title": "" } ]
875f200f99332f453dae2f274ca6e714
Checks whether manager has an active transaction
[ { "docid": "ba9179e3bfd2c9ee5f8e858ab23bd3f1", "score": "0.0", "text": "public function has(): bool;", "title": "" } ]
[ { "docid": "3c04dce823195374ae05a8692fbf8e1c", "score": "0.74733996", "text": "public function hasActiveTransaction()\n\t{\n\t\treturn $this->hasActiveTransaction;\n\t}", "title": "" }, { "docid": "7a56ba84940ee18a22be304b7b68bf89", "score": "0.71267986", "text": "public function inTransaction(): bool;", "title": "" }, { "docid": "71d50c82afaf365696e2ee4c42fbdfb3", "score": "0.7090894", "text": "public function inTransaction(): bool\n {\n return $this->pdo->inTransaction();\n }", "title": "" }, { "docid": "3aaabc621d485a01ee3b596b3e561ee9", "score": "0.7051102", "text": "public function hasTransactions();", "title": "" }, { "docid": "9e08e59c592326b1b04d776356007a18", "score": "0.70286894", "text": "public function inTransaction()\n\t{\n\t\treturn ($this->transactionDepth > 0);\n\t}", "title": "" }, { "docid": "4fac9baedec4f9b97b29ea0ed00d0f71", "score": "0.699182", "text": "public function isTransaction()\n {\n return true;\n }", "title": "" }, { "docid": "c78632ed223443696bf8d33c8584348e", "score": "0.69918096", "text": "public function transactionCheck()\n {\n return $this->driver->transactionCheck();\n }", "title": "" }, { "docid": "7bf19526284a6b4c507f55e156632a5e", "score": "0.6944327", "text": "public function isTransaction()\n {\n return false;\n }", "title": "" }, { "docid": "855ac7bc223b27f9bc906b3b4a92ad03", "score": "0.6902022", "text": "public function inTransaction () {\n return (bool) $this->transactionStarted;\n }", "title": "" }, { "docid": "04c01a990725d3313fe5bd8a21841813", "score": "0.6885904", "text": "protected function hasTransaction()\n {\n return isset($this->data->Payment->TxnList->Txn);\n }", "title": "" }, { "docid": "c88624e88eee15277d4aa822cda3105c", "score": "0.6846867", "text": "static function inTransaction(): bool;", "title": "" }, { "docid": "eb9369f4711bed35ffd0ba0c2926db0a", "score": "0.68194026", "text": "public function inTransaction()\n {\n return (bool) $this->conn->inTransaction();\n }", "title": "" }, { "docid": "52740790dd710525531d073041ea47bb", "score": "0.6790479", "text": "public static function isTransactionEnabled()\n\t{\n\t\treturn DatabaseConnectionModel::$isTransactionEnabled;\n\t}", "title": "" }, { "docid": "3490b445480f6fd3faac7d19c8481112", "score": "0.6782345", "text": "public function hasOtherTransaction()\n { // if there is such, respond error -31008\n $transaction = $this->findTransactionByReference();\n if ($transaction &&\n ($transaction['state'] == Transaction::STATE_CREATED ||\n $transaction['state'] == Transaction::STATE_COMPLETED)\n ) {\n $this->error(self::ERROR_COULD_NOT_PERFORM, 'Невозможно выполнить данную операцию.');\n }\n }", "title": "" }, { "docid": "71a1af1ba1419eaa9028ac23e71999d7", "score": "0.6716597", "text": "public function isTransactionOpened() {\n\t\treturn $this->transactions>0;\n\t}", "title": "" }, { "docid": "8674c8addbea19caff9a8507cce3e84a", "score": "0.66960984", "text": "function db_transaction_started()\n {\n return DB::getPdo()->inTransaction();\n }", "title": "" }, { "docid": "c25eb32feb22a4bbeee3f4db6f1b0be0", "score": "0.6577331", "text": "public function inTransaction()\n {\n return !!$this->in_transaction;\n }", "title": "" }, { "docid": "e59a16b0a385f7cdbfd809bcc8c3737c", "score": "0.6512221", "text": "public function hasTransactionInProgress() {\n\n\t return $this->transactionInProgress;\n\t }", "title": "" }, { "docid": "b146c7dec37bd438e4eb4470590875d7", "score": "0.6498369", "text": "public function CheckTransactionUser() {\n\t\t\ttry{\n\t\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}catch(ErrorException $ex){\n\t\t\t\techo \"Message:\".$ex->getMessage();\t\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "1001cf21f718a5415a6064fa9196e84c", "score": "0.6469569", "text": "public function isTransactional() : bool\n {\n return false;\n }", "title": "" }, { "docid": "fa4bb23185a62348e3519eb6b39ff31f", "score": "0.6454761", "text": "public function inTransaction() {\n return self::$intransaction;\n }", "title": "" }, { "docid": "145fc3315012e254dfef2b2b1d2aaf37", "score": "0.644823", "text": "public function inTransaction() {\n\t\treturn $this->_inTransaction;\n\t}", "title": "" }, { "docid": "709db2aabeb3568fdacf3092d9df04ac", "score": "0.64457124", "text": "protected function shouldBeginTransaction()\n {\n return ! $this->open && (empty($this->size) || $this->count === 1);\n }", "title": "" }, { "docid": "be531d3487f021c05b1a848ea92bde50", "score": "0.64363056", "text": "public function requireTransaction()\n {\n if ($this->getDb()->transaction === null || !$this->getDb()->transaction->isActive) {\n \\Yii::info('Begin Transaction');\n $this->getDb()->beginTransaction();\n }\n }", "title": "" }, { "docid": "1d4bd55605a70597e1ad3ddd4c84644e", "score": "0.6436292", "text": "public function CheckTransactionUser() {\n\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4297c33d45bf5c0cc5aee7bd9623bdb6", "score": "0.64318514", "text": "public function isManager()\n {\n if ($this->isOwner() || $this->isAdministrator()) {\n return true;\n }\n\n if (auth()->check() && $this->subscription()->exists()) {\n \n $subscription = $this->subscription()->first();\n\n // Check if subscription expired\n if (!now()->gte($subscription->expires_at)) {\n return true;\n }else{\n return false;\n }\n\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "e3da1384f1f054094ec85e3d69f14848", "score": "0.63853836", "text": "public function inTransaction() {\n\t}", "title": "" }, { "docid": "4542b4912dc036485d82bf73e2438404", "score": "0.63815254", "text": "public function inTransaction()\n {\n return $this->inTransaction;\n }", "title": "" }, { "docid": "25cb35b2242193d1199a30d6662c73af", "score": "0.6358272", "text": "protected function requireTransaction() {\n $tx = $this->getPersistenceFacade()->getTransaction();\n if (!$tx->isActive()) {\n $tx->begin();\n $this->startedTransaction = true;\n }\n }", "title": "" }, { "docid": "9821b58763bb92933c0edda0eec42215", "score": "0.63339955", "text": "public function inTransaction();", "title": "" }, { "docid": "9821b58763bb92933c0edda0eec42215", "score": "0.63339955", "text": "public function inTransaction();", "title": "" }, { "docid": "9821b58763bb92933c0edda0eec42215", "score": "0.63339955", "text": "public function inTransaction();", "title": "" }, { "docid": "1be61306342d5136e5e2f505c8aa5b17", "score": "0.63028365", "text": "function transaction_check(){\n }", "title": "" }, { "docid": "255655d9865f71e9b0f7431816d2c24e", "score": "0.62973297", "text": "public function beginTransaction()\n{\n\t$result = \\mssql_query('BEGIN TRANSACTION', $this->dbh);\n\treturn !empty($result) && ($this->transaction = TRUE);\n}", "title": "" }, { "docid": "9cd63c719a8046cdfdc0f6b9b0d64721", "score": "0.629", "text": "public function inTransaction() {\n\t\treturn $this->pdo->inTransaction();\n\t}", "title": "" }, { "docid": "fb6dfbbf17a2012c307c953fe7e3807c", "score": "0.62695485", "text": "public function begin(): bool\n {\n return $this->pdo->beginTransaction();\n }", "title": "" }, { "docid": "aaae8c1526feff05ec2ab364935e934a", "score": "0.61705184", "text": "public function beginTransaction() {\n\t\tif ($this->inTransaction()) {\n\t\t\tthrow new Exception('Transaction already is active');\n\t\t}\n\t\t$this->_inTransaction = true;\n\t\t$this->_commitMode = (PHP_VERSION_ID >= 503020) ? OCI_NO_AUTO_COMMIT : OCI_DEFAULT;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a6d5dd771adf8718358bc33d4e8015a7", "score": "0.61683965", "text": "public function insideManager() {\n return is_object($this->context) && ($this->context->get('key') === 'mgr');\n }", "title": "" }, { "docid": "cc2ae793129282fbb81cf37d6430a992", "score": "0.6136731", "text": "public function beginTransaction() : bool;", "title": "" }, { "docid": "2e5d3256068f363a889a757626773f7d", "score": "0.6093014", "text": "public function isManager()\n {\n return $this->attributes['level'] > 1;\n }", "title": "" }, { "docid": "2235df3ec3099b48105c9cf3f4d4c4ee", "score": "0.6076876", "text": "public function begin_transaction ( ) {\n\t\t\t\n\t\t\t// if we're already in a transaction, abort, you can't nest them\n\t\t\tif ( $this->in_transaction ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->pdo->beginTransaction() ) {\n\t\t\t\t$this->in_transaction = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b03bdebfa14a1d4596dc129825a9864a", "score": "0.605921", "text": "public static function hasActive()\n {\n try {\n static::fetchActive();\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "070db8a34e0a5dc60af03addea3e5c96", "score": "0.603723", "text": "protected function getIsLockModeTransactional(): bool\n {\n return PdoSessionAdapterInterface::LOCK_TRANSACTIONAL === $this->lockMode;\n }", "title": "" }, { "docid": "301dfe7bdefe0dac84e65e703d1b2cbe", "score": "0.6031411", "text": "public function inTransaction()\n {\n $db = $this->getResource();\n\n if (method_exists($db, 'inTransaction')) {\n $this->_inTransaction = $db->inTransaction();\n }\n\n return $this->_inTransaction;\n }", "title": "" }, { "docid": "fbfd4f857fb692889c06ed2c8679f319", "score": "0.59778166", "text": "private function guardAgainstSyncingDuringActiveRollbacks()\n {\n return Rollback::whereNull('processed_at')->doesntExist();\n }", "title": "" }, { "docid": "ad28e21be4106ac7bdbe8f3b66bcf8f2", "score": "0.5969201", "text": "public function checkModuleIsEnabled()\n {\n return $this->scopeConfig->getValue(\"carriers/ENGlobalTranzLTL/active\", ScopeInterface::SCOPE_STORE);\n }", "title": "" }, { "docid": "cbc665e2a9615fa121d1834865d2ffb8", "score": "0.5968469", "text": "function HasTransactions($proid){\n\t\t\t$has = FALSE;\n\t\t\ttry{\n\t\t\t\t$db = new DbObject();\n\t\t\t\t$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\t\n\t\t\t\t$sql=\"SELECT * FROM `protocol_transactions` WHERE protocol_id=\".$proid;\n\t\t\t\t$stmt = $db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$total = $stmt->rowCount();\n\t\t\t\tif($total>0){\n\t\t\t\t\t$has = TRUE;\n\t\t\t\t\treturn $has;\n\t\t\t\t}\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c27e0c0182414337e7af60d86205180c", "score": "0.59680814", "text": "public static function hasManager()\n {\n return static::$_manager instanceof Zend_Cache_Manager;\n }", "title": "" }, { "docid": "58b2a14019d848eabf372aab3c1e3cca", "score": "0.5953631", "text": "public function transaction_held();", "title": "" }, { "docid": "df4be1024f92bad85c0a23bc4a6ac9d8", "score": "0.59316885", "text": "public function isTransactionSuccessful()\n {\n return $this->getErrorCode() === '0';\n }", "title": "" }, { "docid": "83999224a1a073ecfd7c2ac5edb159c2", "score": "0.5899078", "text": "public function transaction_operations_allowed()\n\t{\n\t\t$has_transactions = $this->payment_transactions->count;\n\t\tif (!$has_transactions)\n\t\t\treturn false;\n\n\t\tif (!$this->payment_method)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "70f91617f37c7eb68ac64035e4898ce0", "score": "0.5868233", "text": "public function isActive() {\n\t\t\t$lock = Symphony::Database()->fetchRow(0, sprintf('\n\t\t\t\t\tSELECT\n\t\t\t\t\t\ttime\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`tbl_task_locks`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`name` = \"%s\"\n\t\t\t\t\tLIMIT 1\n\t\t\t\t',\n\t\t\t\t$this->name\n\t\t\t));\n\n\t\t\t// Lock does not exist:\n\t\t\tif (empty($lock)) return false;\n\n\t\t\treturn time() - $lock['time'] < $this->time;\n\t\t}", "title": "" }, { "docid": "21abd8ce942a38c9fc2766f30cbac901", "score": "0.5841032", "text": "public function testHasManagerReturnsTrueIfManagerIsAvailable()\n {\n AspectPHP_Container::setManager($this->createManager());\n $this->assertTrue(AspectPHP_Container::hasManager());\n }", "title": "" }, { "docid": "1c6fd9aa3ead38265d697b54fcfeb4aa", "score": "0.5792981", "text": "public function isManager()\n\t{\n\t\treturn $this->role === self::ROLE_MANAGER;\n\t}", "title": "" }, { "docid": "fe47ebed3747d4680fd23b0df1fa7777", "score": "0.57793546", "text": "public function active(): bool\n {\n return $this->getStore()->has($this->key);\n }", "title": "" }, { "docid": "a98f38f895bead7b845162946c07809c", "score": "0.57645684", "text": "public function isStoreActive()\n {\n return $this->_storeManager->getStore()->isActive();\n }", "title": "" }, { "docid": "e5c7f30e4003f90f4f17ed10e4ef0bc3", "score": "0.5755829", "text": "public function getCurrentTransaction();", "title": "" }, { "docid": "f8466e1924e7ee8dba6bb5a75aff39de", "score": "0.5730959", "text": "public function supportsTransactions()\n {\n Deprecation::trigger(\n 'doctrine/dbal',\n 'https://github.com/doctrine/dbal/pull/4724',\n 'AbstractPlatform::supportsTransactions() is deprecated.',\n );\n\n return true;\n }", "title": "" }, { "docid": "e31ca3fd4350ceb80d3b953c268dfcb8", "score": "0.5723622", "text": "function beginTransaction() {\n\t\n\t\treturn $this->query(OWA_SQL_BEGIN_TRANSACTION);\n\t}", "title": "" }, { "docid": "174a6227e9583820b7bbf2d22a0e55e9", "score": "0.57192737", "text": "function isManager() {\n return $this instanceof Manager;\n }", "title": "" }, { "docid": "b251179ec8bfa18f25108d98746497fa", "score": "0.57164145", "text": "public function checkInactiveTask()\r\n {\r\n $history = $this->attributeWasChanged('estado');\r\n\r\n if ($history->changed && $history->newValue == 0) {\r\n TareaNotificacion::executeUpdate([\r\n 'estado' => 0\r\n ], [\r\n 'fk_tarea' => $this->getPK()\r\n ]);\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "37843ecd667f5e18f6fe36c62228a9bc", "score": "0.5706372", "text": "public static function begin_transaction() {\n\n\t// Begin transaction\n\tif (!mysqli_begin_transaction(self::$conn)) { \n\t\tself::dberror('begin_transaction', 'begin_transaction');\n\t}\n\n\t//EwReturn\n\treturn true;\n\n}", "title": "" }, { "docid": "2ea9120689281202c2fac44db0a8d85c", "score": "0.56866634", "text": "private function verifyTransactionAtGateway()\n {\n $transactionRef = request()->query('trxref');\n\n $this->response = $this->paystack->transactions()->verify($transactionRef);\n }", "title": "" }, { "docid": "cf4340bd05eff8a3f57f35db7efd0367", "score": "0.56809205", "text": "public function isManager()\n {\n $title = $this->titles()->where('to_date', '9999-01-01')->first();\n\n if (!empty($title))\n $status = ($title->title === 'Manager') ? true : false;\n else\n $status = false;\n return $status;\n }", "title": "" }, { "docid": "cdc5600cb0c621f6766c2aa8862f8964", "score": "0.5679436", "text": "public function canUseCheckout()\n {\n $token = $this->_scopeConfig->getValue('payment/smartex/token');\n\n if (false === isset($token) || true === empty($token)) {\n /**\n * Merchant must goto their account and create a pairing code to\n * enter in.\n */\n $this->getHelper()->debugData('[ERROR] In \\Smartex\\Core\\Model\\Method\\Ethereum::canUseCheckout(): There was an error retrieving the token store param from the database or this Magento store does not have a Smartex token.');\n\n return false;\n }\n\n $this->getHelper()->debugData('[INFO] Leaving \\Smartex\\Core\\Model\\Method\\Ethereum::canUseCheckout(): token obtained from storage successfully.');\n\n return true;\n }", "title": "" }, { "docid": "38bc0b7dd9095e7473ff1bb8cf4d2810", "score": "0.56083447", "text": "abstract public function hasFailedTrans();", "title": "" }, { "docid": "da9c7ff1dd37e53202f79c0f2bc7a7ec", "score": "0.56025565", "text": "static public function hasActive(): bool\n {\n return null !== self::$active;\n }", "title": "" }, { "docid": "c656eb28ef6a78afbd94efea655f8319", "score": "0.5597238", "text": "function is_manager()\n {\n $is_admin = manager();\n warn($is_admin, \"please log in as a manager to continue.\");\n return $is_admin;\n }", "title": "" }, { "docid": "8c16255eda2a4c8342a78f4f80305d90", "score": "0.5592025", "text": "public function isEntityFilled(Transaction $object);", "title": "" }, { "docid": "58c860e6e1f8673aeddd04683612fbd9", "score": "0.55918694", "text": "abstract function requireTransactions();", "title": "" }, { "docid": "701413b4bfafbe68ffddc68ef2e9d031", "score": "0.5583022", "text": "protected function shouldCloseTransaction()\n {\n return true;\n }", "title": "" }, { "docid": "43803afa58d4ee210408ed2c5a46288a", "score": "0.5549375", "text": "public function hasAccountLocked()\n {\n return $this->account_locked !== null;\n }", "title": "" }, { "docid": "8183b290d82df50a9c9912f32fcdc125", "score": "0.5546557", "text": "public function canUseCheckout()\n {\n\t\t\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $helper = $objectManager->create('LiteGoio\\LightningPayments\\Helper\\Data');\n\t\t$storeManager = $objectManager->create('\\Magento\\Store\\Model\\StoreManagerInterface');\n\t\t\n\t\t$storeId=$storeManager->getStore()->getId();\n\t\t\n\t\t$active=$helper->getConfigValue('active', $storeId);\n \n $litego_testnet=$helper->getConfigValue('litego_testnet', $storeId);\n \n if($litego_testnet)\n {\n $merchant_id=$helper->getConfigValue('litego_sandbox_merchant_id', $storeId);\n $secret=$helper->getConfigValue('litego_sandbox_secret', $storeId);\n }\n else\n {\n $merchant_id=$helper->getConfigValue('litego_merchant_id', $storeId);\n $secret=$helper->getConfigValue('litego_secret', $storeId);\n }\n\t\t\n\t\tif($merchant_id && $secret && $active) return true;\n\t\t\n return false;\n }", "title": "" }, { "docid": "20bac4b3ca50dc5074fde29002679ce7", "score": "0.5533612", "text": "public function isActive(): bool\n {\n return $this->status() !== null;\n }", "title": "" }, { "docid": "de9178d49a10a1549c64a30240e4498e", "score": "0.5529446", "text": "public function isActive()\n {\n return (!$this->isBlocked() && !$this->isLocked());\n }", "title": "" }, { "docid": "92e6b40b26bda11676b4a284577d0a81", "score": "0.5528585", "text": "public function hasRootMenumanager(){\n\t\t$root = $this->getRoot();\n\t\tif ($root && $root->getId()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "be9858a673a200b5d3311204658c6eb2", "score": "0.55276453", "text": "public function isMet() {\n\t\t$settings = $this->configurationManager->getConfiguration(\\TYPO3\\Flow\\Configuration\\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow');\n\t\ttry {\n\t\t\t\\Doctrine\\DBAL\\DriverManager::getConnection($settings['persistence']['backendOptions'])->connect();\n\t\t} catch(\\PDOException $e) {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "02a69891645d4ff6ee1a8c5e18bf318c", "score": "0.552579", "text": "public function isUnderTransaction(...$args)\n {\n return $this->uses()->isUnderTransaction(...$args);\n }", "title": "" }, { "docid": "355682c94f99c32d19924ae1ea66c3fe", "score": "0.5508586", "text": "public function manager()\n {\n $this->executeStrategiesMethod('manager');\n\n return $this->passed();\n }", "title": "" }, { "docid": "d25e20f750a75a66c95769569cc9c9bb", "score": "0.54991686", "text": "public function isActive()\n\t{\n\t\treturn $this->quantity > 0;\n\t}", "title": "" }, { "docid": "136834b7e1451a90b016b2765764a17f", "score": "0.5494888", "text": "public function isTransactionalAutoGenerateProxy()\n {\n return $this->transactionalAutoGenerateProxy;\n }", "title": "" }, { "docid": "a8be1e724217569f2706f5313d60779d", "score": "0.5492973", "text": "function checkTransaction($data)\n {\n \n\n /*$checkquery = \"select * from ledger where method='$method' and transaction_id='$transaction_id'\";\n $checkstmt = $this->dbObj->link->query($checkquery);\n if ($checkstmt) {\n if ($checkstmt->num_rows > 0) {\n return true;\n }else{\n return false;\n }\n }*/\n }", "title": "" }, { "docid": "7da8a10c2dd66ce8fdf8224d013beb42", "score": "0.54854995", "text": "public function isTransactionVerificationValid()\n {\n $this->verifyTransactionAtGateway();\n\n $result = $this->getResponse()['status'];\n\n switch ($result) {\n case self::VERIFICATION_SUCCESSFUL:\n $validate = true;\n break;\n default:\n $validate = false;\n break;\n }\n\n return $validate;\n }", "title": "" }, { "docid": "1012dd0feff962537e6bc2cc2346d907", "score": "0.5469009", "text": "function startinTranscation()\n\t{\n\t\t$errNo=$this->DDL_executeQry(\"start transaction\");\n\t\tif($errNo>0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn $errNo;\n\t}", "title": "" }, { "docid": "8e3c7b6f38994cd9704f0bf9ff30b016", "score": "0.54584825", "text": "private function singleUseState()\n {\n if ($this->type === self::TYPE_SINGLE_USE) {\n if ($this->state === self::STATE_SINGLE_USE_USED) {\n throw new \\BadMethodCallException('This single-use transaction has already been used.');\n }\n\n $this->state = self::STATE_SINGLE_USE_USED;\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "c5ebfa99ae31b6affc1517d2d7c50fe7", "score": "0.5452541", "text": "public function checkModuleActive()\n {\n return Mage::getStoreConfig('adminlog/general/is_active',Mage::app()->getStore() ? true : false);\n }", "title": "" }, { "docid": "c829a263347b4392552629d455c3d532", "score": "0.5446313", "text": "private function checkDBConnection()\n {\n try {\n // call setActive with true to open connection.\n Yii::$app->db->open();\n // return the current connection state.\n return Yii::$app->db->getIsActive();\n } catch (Exception $e) {\n $this->stderr($e->getMessage());\n }\n return false;\n }", "title": "" }, { "docid": "6cec20a014623eb20c530e5bf6fa6841", "score": "0.54453367", "text": "public function hasActivationToken() : bool\n {\n return ! is_null($this->token);\n }", "title": "" }, { "docid": "0cd3995485ae41f9c93324838390a9ee", "score": "0.5436155", "text": "public function is_active() {\n\t\treturn $this->itemstatus == self::ITEMSTATUS_ACTIVE;\n\t}", "title": "" }, { "docid": "e1f8e6fccee21e86c5dd68ecd74764e0", "score": "0.54325646", "text": "public function beginTransaction () {}", "title": "" }, { "docid": "3ca9adc34b8f9a78ed411df34ff8254c", "score": "0.543033", "text": "public function isManager()\r\n {\r\n if ($this->Session->read('Auth.User.user_group_id') == '2') {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "f1ba425a5859a6af8c5673383e0f513f", "score": "0.54233724", "text": "public function getActive(): bool\n {\n return $this->active;\n }", "title": "" }, { "docid": "f1ba425a5859a6af8c5673383e0f513f", "score": "0.54233724", "text": "public function getActive(): bool\n {\n return $this->active;\n }", "title": "" }, { "docid": "29533a097c314256fc037ea41fbbcbb3", "score": "0.5414913", "text": "public function testHasManagerReturnsFalseIfNoManagerIsAvailable()\n {\n $this->assertFalse(AspectPHP_Container::hasManager());\n }", "title": "" }, { "docid": "33e9f2d7b86684ec586132daa2be57b3", "score": "0.54123193", "text": "function is_started()\n {\n if ($this->trans_no == 0)\n return false;\n $order_no = array_keys($this->trans_no);\n\n return is_sales_order_started(reset($order_no));\n }", "title": "" }, { "docid": "7cab65eb4c5af2e547e9a4b8c05ba47f", "score": "0.54032964", "text": "public static function isActive() {\n\t\treturn Yii::$app->user->identity->status == self::STATUS_ACTIVE;\n\t}", "title": "" }, { "docid": "81e072cccbc571a2c5c0331d00e957a8", "score": "0.5394216", "text": "public function is_available() {\n\t\treturn parent::is_available() &&\n\t\t\t$this->getMethodHasSetting(\n\t\t\t\tself::SETTING_KEY_TRANSACTION_TYPES\n\t\t\t);\n\t}", "title": "" }, { "docid": "19b99c99a98951eece03d154b8d16446", "score": "0.53941035", "text": "public function beginTransaction();", "title": "" }, { "docid": "6459f1114fd218b7876f71b8a25a7318", "score": "0.5391178", "text": "protected function _preflightCheck()\n {\n if (empty($this->template)) {\n Mage::getModel('adminhtml/session')->addError($this->__('No transactional email specified'));\n return false;\n }\n\n if ($this->storeId < 1) {\n Mage::getModel('adminhtml/session')->addError($this->__('You need to specify a specific Store View'));\n return false;\n }\n\n if (empty($this->orderId)) {\n Mage::getModel('adminhtml/session')->addError($this->__('You need to specify a sales order'));\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "cd8e87ed54b50d6c18cc4fee9819b97b", "score": "0.53892183", "text": "public function supportsSchemaTransactions()\n {\n return $this->transactions;\n }", "title": "" }, { "docid": "f294540437b04b48e98d851d6173ee9b", "score": "0.53882605", "text": "public static function transaction_begin() {\n\t\treturn self::$_connection->autocommit(false);\n\t}", "title": "" } ]
4212bc4f4f35d2157eb51880411fb71e
Method returns common headers
[ { "docid": "83fca871ad40066a56dc47763a42b1fb", "score": "0.8221503", "text": "protected function getCommonHeaders(): array\n {\n $result = $this->headers;\n\n if ($this->idempotencyKey !== '') {\n $result[] = 'Idempotency-Key: ' . $this->idempotencyKey;\n }\n\n return $result;\n }", "title": "" } ]
[ { "docid": "d6c89d21b9ccd2b982737cb9d527b5d1", "score": "0.8142871", "text": "abstract public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.78817594", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.78817594", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.78817594", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.78817594", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.78817594", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.78817594", "text": "public function getHeaders();", "title": "" }, { "docid": "41dc9f7a893e7155c296018d93734b17", "score": "0.78733486", "text": "public static function headers();", "title": "" }, { "docid": "517439460851a0196d49a2d726c72253", "score": "0.7798833", "text": "public function getResponseHeaders();", "title": "" }, { "docid": "517439460851a0196d49a2d726c72253", "score": "0.7798833", "text": "public function getResponseHeaders();", "title": "" }, { "docid": "873b5e02ec49c07dccd2f4fa21d05bd1", "score": "0.7774405", "text": "function getAllHeaders();", "title": "" }, { "docid": "11bd651b45fddb0a40555cfcd5fad756", "score": "0.75456214", "text": "public function getHttpHeaders();", "title": "" }, { "docid": "3b01c8edc1f4b482f582fb8652c421fa", "score": "0.7540936", "text": "function getallheaders()\n {\n $headers = array();\n $copy_server = array(\n 'CONTENT_TYPE' => 'Content-Type',\n 'CONTENT_LENGTH' => 'Content-Length',\n 'CONTENT_MD5' => 'Content-Md5',\n );\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) === 'HTTP_') {\n $key = substr($key, 5);\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\n $headers[$key] = $value;\n }\n } elseif (isset($copy_server[$key])) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n if (!isset($headers['Authorization'])) {\n if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n } elseif (isset($_SERVER['PHP_AUTH_USER'])) {\n $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';\n $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);\n } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "e46b9d9cb136ca24994ee6700e46fb01", "score": "0.7454583", "text": "function qm_get_headers()\n {\n return \\Quantum\\Request::getHeaders();\n }", "title": "" }, { "docid": "2cc86a558c037ebfaa03b8828ab5f63a", "score": "0.7452595", "text": "private static function buildHeaders()\n {\n return [\n 'User-Agent' => 'ChallongePHP/' . CHALLONGE_VERSION . ' ChallongePHP (https://github.com/interludic/ChallongePHP, ' . CHALLONGE_VERSION . ')'\n ];\n }", "title": "" }, { "docid": "c36cc9e30017f672e4c33d892590feaa", "score": "0.7445185", "text": "protected function doHttpHeaders() {\n return [\n 'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3506.71 Safari/537.36',\n ];\n }", "title": "" }, { "docid": "7fab6ebeffaf60d9b6484ee6964cf9b8", "score": "0.744024", "text": "public function getRequiredHeaders();", "title": "" }, { "docid": "90a16b042d6ec11d7b248ad5c449cf6f", "score": "0.7424779", "text": "private function getHeaders() {\n\n $contentType = $this->apiVersion == '1.5' ? 'application/x-www-form-urlencoded' : 'application/json';\n\n switch ($this->apiVersion) {\n case '1.5':\n return array(\n 'Content-type:' . $contentType\n );\n break;\n case '3':\n default :\n return array(\n 'MerchantId:' . $this->merchantId,\n 'MerchantKey:' . $this->merchantKey,\n 'Content-type:' . 'application/json'\n );\n break;\n }\n }", "title": "" }, { "docid": "97a740679d851396fe8d05b7bfb8bffa", "score": "0.7395869", "text": "private function makeHeaders() {\n $headers = array_merge($this->caliperConfig->getHttpHeaders(), [\n 'Content-Type' => 'application/json',\n 'Authorization' => $this->caliperConfig->getApiKey(),\n 'User-Agent' => 'Resque worker class: ' . __CLASS__,\n ]);\n\n return $headers;\n }", "title": "" }, { "docid": "dae839bfe6073fc05e1bc87ee8758d9f", "score": "0.73818105", "text": "function sapi_request_headers ()\n{\n return getallheaders();\n}", "title": "" }, { "docid": "89e8e1ddece7f37e069495b89f6c0294", "score": "0.7377131", "text": "protected function _getAllHeaders() \n { \n $headers = ''; \n foreach ($_SERVER as $name => $value) \n { \n if (substr($name, 0, 5) == 'HTTP_') \n { \n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; \n } \n } \n return $headers; \n }", "title": "" }, { "docid": "fd12d1b542aee8c5dc8d694c2c23c671", "score": "0.7364155", "text": "public static function getall_headers()\n{ \n\n $headers = array();\n foreach ($self::$http_headers_keys as $key => $orig) { \n $headers[$orig] = self::$http_headers[$key];\n }\n return $headers;\n}", "title": "" }, { "docid": "e615be252f8d018fb001e49e63758b1c", "score": "0.7285116", "text": "public static function get_res_all_headers() { return self::$res_http_headers; }", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.72782755", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.72782755", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.72782755", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.72782755", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "bce20b6068e833569d281d36ffc49231", "score": "0.7274105", "text": "static function get_all(){\n\t\tstatic $headers;\n\t\tif($headers) return $headers;\n\t\tif (!function_exists('getallheaders')){\n\t\t\tforeach ($_SERVER as $name => $value){\n\t\t\t\tif (substr($name, 0, 5) == 'HTTP_'){\n\t\t\t\t\t$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else $headers=getallheaders();\t\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "8bcb96ac63366dbf4e3e05484e717257", "score": "0.7267255", "text": "public function getHeaders() {\n\t\t$mergeWith = array();\n\n\t\tif($this->lastModified) {\n\t\t\t$mergeWith['Last-Modified'] =\n\t\t\t\t$this->lastModified->format(\\DateTime::RFC2822);\n\t\t}\n\n\t\tif($this->ETag) {\n\t\t\t$mergeWith['ETag'] = '\"' . $this->ETag . '\"';\n\t\t}\n\n\t\treturn array_merge($mergeWith, $this->headers);\n\t}", "title": "" }, { "docid": "02ef464cb1cd6fd756f7162d627ed351", "score": "0.72583807", "text": "public function getHTTPHeaders() {\n\t\treturn array(\n\t\t\t'User-Agent' => $this->useragent\n\t\t);\n\t}", "title": "" }, { "docid": "c78d232711906b2fa3a4ac4d7e70adda", "score": "0.72561187", "text": "public function getHeaders() \n {\n return $this->response['headers'];\n }", "title": "" }, { "docid": "d007c9e73abdaac5f97ad8bab7aba256", "score": "0.72461593", "text": "function getResponseHeaders() {\r\n\t\tglobal $instanceSimpleHTTP;\r\n\t\treturn (isset($instanceSimpleHTTP))\r\n\t\t? $instanceSimpleHTTP->responseHeaders\r\n\t\t: array();\r\n\t}", "title": "" }, { "docid": "5cb4d7cf5a73367e125e259ae9212080", "score": "0.7237776", "text": "public function getConfiguredHeaders()\n {\n $headers = [];\n $contentType = $this->getContentType();\n if (empty($contentType)===false) {\n $headers['Content-Type'] = $contentType;\n }\n $location = $this->getLocation();\n if (empty($location)===false) {\n $headers['Location'] = $location;\n }\n return $headers;\n }", "title": "" }, { "docid": "435d9311c8738b0307a446a5dae846dd", "score": "0.72363704", "text": "public function getHeaders()\n {\n \n // The 'Expect:' header is required to prevent the server responding \n // with '100 Continue' headers\n $headers = array(\n 'Content-Type: application/json',\n 'Expect:',\n );\n \n if ($this->prettyJSON) {\n $headers[] = 'X-Pretty: 1';\n }\n \n if ($this->dontLog) {\n $headers[] = 'X-Dont-Log: 1';\n }\n \n return \\array_merge($headers, $this->getCredentialHeader());\n \n }", "title": "" }, { "docid": "5eca472655a0bff27a17fbd620cde193", "score": "0.7230696", "text": "protected function requestHeaders()\n\t{\n\t\tif(function_exists(\"apache_request_headers\")) // If apache_request_headers() exists...\n\t\t{\n\t\t\tif($headers = apache_request_headers()) // And works...\n\t\t\t{\n\t\t\t\treturn $headers; // Use it\n\t\t\t}\n\t\t}\n\t\t$arh = array();\n\t\t$rx_http = '/\\AHTTP_/';\n\t\tforeach($_SERVER as $key => $val) {\n\t\t\t\tif( preg_match($rx_http, $key) ) {\n\t\t\t\t\t\t$arh_key = preg_replace($rx_http, '', $key);\n\t\t\t\t\t\t$rx_matches = array();\n\t\t\t\t\t\t// do some nasty string manipulations to restore the original letter case\n\t\t\t\t\t\t// this should work in most cases\n\t\t\t\t\t\t$rx_matches = explode('_', strtolower($arh_key));\n\t\t\t\t\t\tif( count($rx_matches) > 0 and strlen($arh_key) > 2 ) {\n\t\t\t\t\t\t\t\tforeach($rx_matches as $ak_key => $ak_val) $rx_matches[$ak_key] = ucfirst($ak_val);\n\t\t\t\t\t\t\t\t$arh_key = implode('-', $rx_matches);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$arh[$arh_key] = $val;\n\t\t\t\t}\n\t\t}\n\t\tif(isset($_SERVER['CONTENT_TYPE'])) $arh['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\t\tif(isset($_SERVER['CONTENT_LENGTH'])) $arh['Content-Length'] = $_SERVER['CONTENT_LENGTH'];\n\t\treturn( $arh );\t\t\t\n\t}", "title": "" }, { "docid": "a08f33a693acfa1829c776b059f0e214", "score": "0.72056514", "text": "public function getHeaders(): void;", "title": "" }, { "docid": "f5327b9d550f28a7aab77cda68c8bf37", "score": "0.7162957", "text": "abstract public function getHeader();", "title": "" }, { "docid": "cb92b277ea5b1d1c43f81de43cc1d2a8", "score": "0.7162161", "text": "public function getAll() {\n\t\t\t\n\t\tif (! isset($this->headers)) {\n\t\t\t\t\n\t\t\t$this->headers = array();\n\t\t\t\n\t\t\tif (function_exists('apache_request_headers')) {\n\t\t\t\t$_headers = apache_request_headers();\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif (isset($this->_server['CONTENT_TYPE'])) {\n\t\t\t\t\t$this->headers['content-type'] = $this->_server['CONTENT_TYPE'];\n\t\t\t\t}\n\t\t\t\tif (isset($this->_server['CONTENT_LENGTH'])) {\n\t\t\t\t\t$this->headers['content-length'] = $this->_server['CONTENT_LENGTH'];\n\t\t\t\t}\n\n\t\t\t\t$_headers = array();\n\t\t\t\t$misfits = array('CONTENT_MD5'=>1, 'AUTH_TYPE'=>1, 'PHP_AUTH_USER'=>1, 'PHP_AUTH_PW'=>1, 'PHP_AUTH_DIGEST'=>1);\n\t\t\t\t\n\t\t\t\tforeach ($this->_server as $key => $value) {\n\t\t\t\t\tif (0 === strpos($key, 'HTTP_')) {\n\t\t\t\t\t\t$_headers[$key] = $value;\n\t\t\t\t\t} else if (isset($misfits[$key])) {\n\t\t\t\t\t\t$_headers[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($_headers as $key => $value) {\n\t\t\t\t$key = str_replace(array('http_', '_'), array('', '-'), strtolower($key));\n\t\t\t\t$this->headers[$key] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "c8479b27a33e855d05b5416f2ce8f4a5", "score": "0.71589315", "text": "private function getRequestHeaders() : array\n {\n // Default Headers Set\n $headers = [\n 'Content-Type' => 'application/x-ndjson',\n 'User-Agent' => sprintf('apm-agent-php/%s', Agent::VERSION),\n ];\n\n // Add Secret Token to Header\n if ($this->config->get('secretToken') !== null) {\n $headers['Authorization'] = sprintf('Bearer %s', $this->config->get('secretToken'));\n }\n\n return $headers;\n }", "title": "" }, { "docid": "f9263ff4e7435cac0f4ee84dc10c94ee", "score": "0.7153165", "text": "public function getDefaultHeaders();", "title": "" }, { "docid": "b1effec39be583208bb402156953c948", "score": "0.71520454", "text": "public function getHeader();", "title": "" }, { "docid": "316452db8afc2edeee3640a72d8befb0", "score": "0.7145793", "text": "public function getHeaders() {\n\t\t$headers = [];\n\t\tforeach ($this->headers as $name => $values) {\n\t\t\tforeach ($values as $value) {\n\t\t\t\t$headers[] = strtolower($name) . ': ' . $value;\n\t\t\t}\n\t\t}\n\t\t$headers[] = self::HEADER_KEY_CONTENT_LENGTH . ': ' . strlen($this->getBody());\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "393528a7ed8b9b95cbabae2c708d2a6d", "score": "0.7144435", "text": "static public function get_default_headers()\n {\n return self::$headers;\n }", "title": "" }, { "docid": "d44e76b6b0c322bb6c1b46c84aa5dc35", "score": "0.71399003", "text": "protected function getHeaders()\n {\n return [\n 'Host' => 'data.usajobs.gov',\n 'Authorization-Key' => $this->get('AuthorizationKey'),\n 'User-Agent' => null, // This prevents Guzzle from setting a user agent, which causes the API call to fail\n ];\n }", "title": "" }, { "docid": "1e1c5a4e45b4bdbd33da49682c8c8d01", "score": "0.71359944", "text": "public function getHeaders() {\n return get_headers($this->original_url, 1);\n }", "title": "" }, { "docid": "231ea99c7063ca3deae1a27c9272d00f", "score": "0.7124201", "text": "public function getHeaderData()\n\t{\n\t\t$headers = array();\n\t\tforeach ($_SERVER as $name => $value) {\n\t\t\tif (substr($name, 0, 5) == 'HTTP_') {\n\t\t\t\t$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "1cb79326f6522bfd20c8a091a91c3b24", "score": "0.7120672", "text": "private function get_headers(): array {\n $headers = [];\n $headers[] = get_string('status');\n $headers[] = get_string('gradenoun');\n $headers[] = get_string('attemptedon', 'report_embedquestion');\n return $headers;\n }", "title": "" }, { "docid": "c6d8a46d615865040b943038edd7fe1c", "score": "0.7116959", "text": "private function _getHeaders()\n {\n $headers = array();\n if (count($this->_to) > 1) {\n $headers['Cc'] = implode(', ', array_slice($this->_to, 1));\n }\n $headers['From'] = $this->_from;\n $headers['MIME-Version'] = '1.0';\n $headers['Content-Type'] = 'text/plain; charset=UTF-8';\n $headers['Content-transfer-encoding'] = 'base64';\n\n return implode(\n \"\\r\\n\",\n array_map(\n create_function('$v, $k', 'return $k . \": \" . $v;'),\n $headers,\n array_keys($headers)\n )\n );\n }", "title": "" }, { "docid": "b26a5bcec9aa044c580a9a6f65e26354", "score": "0.7114215", "text": "abstract protected function getHeader();", "title": "" }, { "docid": "a56c64885fe1c75a4e1d24e37e3d3853", "score": "0.7113569", "text": "public static function headers() {\n\t\tif ( function_exists( 'getallheaders' ) ) {\n\t\t\treturn getallheaders();\n\t\t}\n\t\t\n\t\t$headers = array();\n\t\t\n\t\tforeach( $_SERVER as $k => $v ) {\n\t\t\tif ( 0 === strpos( $k, 'HTTP_' ) ) {\n\t\t\t\t/**\n\t\t\t\t * Remove HTTP_ and turn turn '_' to spaces\n\t\t\t\t */\n\t\t\t\t$hd\t= str_replace( '_', ' ', substr( $k, 5 ) );\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * E.G. ACCEPT LANGUAGE to Accept-Language\n\t\t\t\t */\n\t\t\t\t$uw\t= ucwords( strtolower( $hd ) );\n\t\t\t\t$uw\t= str_replace( ' ', '-', $uw );\n\t\t\t\t\n\t\t\t\t$headers[ $uw ] = $v;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "022572e22e058d104a71ba3add9a127e", "score": "0.71047175", "text": "public static function getHeaders() {\n\t\treturn self::$headers;\n\t}", "title": "" }, { "docid": "08b035a8a634c3ceb859afee390a6521", "score": "0.70936877", "text": "function getallheaders()\n {\n return call_user_func('apache_request_headers');\n }", "title": "" }, { "docid": "08b035a8a634c3ceb859afee390a6521", "score": "0.70936877", "text": "function getallheaders()\n {\n return call_user_func('apache_request_headers');\n }", "title": "" }, { "docid": "299cd5dec502730f24a8f9adcfb947d1", "score": "0.7078698", "text": "public function getHeaders(){\n\t\t// Define a headers array\n\t\t$headers = array();\n\t\tforeach ($this->server as $key => $value) {\n\t\t\t// Does our server attribute have our header prefix?\n\t\t\tif (self::hasPrefix($key, self::$http_header_prefix)) {\n\t\t\t\t// Add our server attribute to our header array\n\t\t\t\t$headers[substr($key, strlen(self::$http_header_prefix))] = $value;\n\t\t\t} elseif (in_array($key, self::$http_nonprefixed_headers)) {\n\t\t\t\t// Add our server attribute to our header array\n\t\t\t\t$headers[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "664a53adf392b797f99968e9190f297d", "score": "0.7078105", "text": "public function getHeaders()\n {\n return [\n Http::HEADER_CONTENT_TYPE => $this->service->useMsgPack ? 'application/msgpack' : 'application/json; charset=utf-8',\n Http::HEADER_CONTENT_ID => $this->request->id,\n ];\n }", "title": "" }, { "docid": "789a6fba5ca46a53fa4411220e79816a", "score": "0.707481", "text": "public function headers(){\n \n }", "title": "" }, { "docid": "cae501f29549246be7db5d9379ba755c", "score": "0.7021588", "text": "abstract public function getHeaderInfo();", "title": "" }, { "docid": "5b10ef48abb10784ed3654545b338798", "score": "0.701934", "text": "public static function get_headers() {\n if (function_exists('apache_request_headers')) {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n $headers = apache_request_headers();\n\n // sanitize the output of apache_request_headers because\n // we always want the keys to be Cased-Like-This and arh()\n // returns the headers in the same case as they are in the\n // request\n $out = array();\n foreach( $headers AS $key => $value ) {\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"-\", \" \", $key)))\n );\n $out[$key] = $value;\n }\n } else {\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n if( isset($_SERVER['CONTENT_TYPE']) )\n $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n if( isset($_ENV['CONTENT_TYPE']) )\n $out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) == \"HTTP_\") {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5))))\n );\n $out[$key] = $value;\n }\n }\n }\n return $out;\n }", "title": "" }, { "docid": "bac92e0c3af5a3c27324ef0964e6a195", "score": "0.70192593", "text": "private function getHeaders() {\n $headers = array();\n $keys = preg_grep('{^HTTP_}i', array_keys($_SERVER));\n foreach ($keys as $val) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($val, 5)))));\n $headers[$key] = $_SERVER[$val];\n }\n return $headers;\n }", "title": "" }, { "docid": "73d46e760277c1494898dcf3e1959f35", "score": "0.7018179", "text": "public function getHeaders() {\n return [];\n }", "title": "" }, { "docid": "73d46e760277c1494898dcf3e1959f35", "score": "0.7018179", "text": "public function getHeaders() {\n return [];\n }", "title": "" }, { "docid": "811cb25ebbb71b92b4e9e723f6a3bcdc", "score": "0.70166343", "text": "public function getHeaders()\n {\n return ['x-api-key' => $this->appId];\n }", "title": "" }, { "docid": "a6d57f28e413093cf575a84d64ef3d91", "score": "0.70141536", "text": "function apache_request_headers()\n {\n return qm_get_headers();\n }", "title": "" }, { "docid": "71ca92277ca812ba2d9d13b5d9beec31", "score": "0.70065886", "text": "public function get_headers()\r\n\t{\r\n\t\treturn $this->get_attr('headers');\r\n\t}", "title": "" }, { "docid": "d7ddadfb350df81890706dae89fb8aba", "score": "0.700123", "text": "function getRequestHeaders()\n{\n $headers = array();\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) <> 'HTTP_') {\n continue;\n }\n $header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));\n $headers[$header] = $value;\n }\n return $headers;\n}", "title": "" }, { "docid": "9c570f5f8a3c6e3f93508d11dca11253", "score": "0.69978136", "text": "private function buildHeaders()\n {\n $headerLines = [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'User-agent' => 'LPA-ADMIN'\n ];\n\n $apiToken = $this->getTokenData('token');\n\n // If the logged in user has an auth token already then set that in the header\n if (!is_null($apiToken)) {\n $headerLines['token'] = $apiToken;\n }\n\n return $headerLines;\n }", "title": "" }, { "docid": "b4f0ba4af1a10038be02785f3298bd30", "score": "0.6993023", "text": "private function getRequestHeaders() {\n\t\t$headers = array();\n\t\t\n\t\tforeach($_SERVER as $key => $value) {\n\t\t\tif (substr($key, 0, 5) <> 'HTTP_') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));\n\t\t\t$headers[$header] = $value;\n\t\t}\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "e2c406d776af1cc897426455dd290c85", "score": "0.69918865", "text": "public function get_header_provider() {\n return [\n [[], '', ''],\n [[], 'Missing header', ''],\n // Test indexed array.\n [['Content-Type: text'], 'Content-Type', 'text'],\n [['Content-Disposition: inline; filename=\"file.mp4\"'], 'Content-Disposition', 'inline; filename=\"file.mp4\"'],\n [['Content-Ranges: bytes 50823168-69632911/69632912'], 'Content-Ranges', 'bytes 50823168-69632911/69632912'],\n [['Content-Type: text', 'Range: bytes=0-499, -500'], 'Range', 'bytes=0-499, -500'],\n [['Content-Type: text', 'Range: bytes=0-499, -500'], 'range', 'bytes=0-499, -500'],\n // Test associative array.\n [['REQUEST_METHOD' => 'GET'], 'REQUEST_METHOD', 'GET'],\n [['REQUEST_METHOD' => 'GET'], 'request_method', 'GET'],\n [['REQUEST_METHOD' => 'GET', 'HTTP_RANGE' => 'bytes=132579328-132619239'], 'HTTP_RANGE', 'bytes=132579328-132619239'],\n ];\n }", "title": "" }, { "docid": "4010f1b03d390c725a1ca4719bdcbf11", "score": "0.6980374", "text": "function getRequestHeaders() {\n\t$headers = array();\n\tforeach($_SERVER as $key => $value) {\n\t\tif (substr($key, 0, 5) <> 'HTTP_') {\n\t\t\tcontinue;\n\t\t}\n\t\t$header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));\n\t\t$headers[$header] = $value;\n\t}\n\treturn $headers;\n}", "title": "" }, { "docid": "78cc4b0c3c02e6e29896bc250ee3fbc0", "score": "0.6977364", "text": "public function getHeaders()\n {\n $headers = array();\n $contentHeaders = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true);\n foreach ($this->parameters as $key => $value) {\n if (0 === strpos($key, 'HTTP_')) {\n $headers[substr($key, 5)] = $value;\n } elseif (isset($contentHeaders[$key])) {\n $headers[$key] = $value;\n }\n }\n if (isset($this->parameters['PHP_AUTH_USER'])) {\n $headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER'];\n $headers['PHP_AUTH_PW'] = isset($this->parameters['PHP_AUTH_PW']) ? $this->parameters['PHP_AUTH_PW'] : '';\n } else {\n /*\n * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default\n * For this workaround to work, add these lines to your .htaccess file:\n * RewriteCond %{HTTP:Authorization} ^(.+)$\n * RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n *\n * A sample .htaccess file:\n * RewriteEngine On\n * RewriteCond %{HTTP:Authorization} ^(.+)$\n * RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n * RewriteCond %{REQUEST_FILENAME} !-f\n * RewriteRule ^(.*)$ app.php [QSA,L]\n */\n $authorizationHeader = null;\n if (isset($this->parameters['HTTP_AUTHORIZATION'])) {\n $authorizationHeader = $this->parameters['HTTP_AUTHORIZATION'];\n } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) {\n $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION'];\n }\n // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic\n if (null !== $authorizationHeader && 0 === stripos($authorizationHeader, 'basic')) {\n $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)));\n if (count($exploded) == 2) {\n list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded;\n }\n }\n }\n // PHP_AUTH_USER/PHP_AUTH_PW\n if (isset($headers['PHP_AUTH_USER'])) {\n $headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']);\n }\n return $headers;\n }", "title": "" }, { "docid": "d34513a8539c394d65161e53883ed2a5", "score": "0.69755125", "text": "public function getHttpHeaders() {\n $headers = [];\n\n $headers['Authorization'] = $this->authenticate();\n\n return $headers;\n }", "title": "" }, { "docid": "9a417f032a49a6d269b29fe5f3e8ad6b", "score": "0.695914", "text": "protected function getRequestHeaders()\n {\n $userAgents = array(\n 'PHP/'.PHP_VERSION,\n str_replace(\n array(' ', \"\\t\", \"\\n\", \"\\r\"),\n '-',\n $this->configService->getIntegrationName().'/'.$this->configService->getIntegrationVersion()\n ),\n str_replace(\n array(' ', \"\\t\", \"\\n\", \"\\r\"),\n '-',\n $this->configService->getExtensionName().'/'.$this->configService->getExtensionVersion()\n ),\n );\n\n return array(\n 'accept' => 'Accept: application/json',\n 'content' => 'Content-Type: application/json',\n 'useragent' => 'User-Agent: '.implode(' ', $userAgents),\n 'token' => 'Authorization: Bearer ' . $this->configService->getAuthorizationToken(),\n );\n }", "title": "" }, { "docid": "a5c77ebf34275e357ba5e8e36cdb4300", "score": "0.69494766", "text": "public function getHeaders(): array\n {\n return [];\n }", "title": "" }, { "docid": "299ba88be3b8b234adea947f0077f79c", "score": "0.69470024", "text": "private function constructHeaders()\n\t{\n\t\treturn [\n\t\t\t'Content-Type: application/json',\n\t\t\t'Authorization: '.$this->access_token,\n\t\t];\n\t}", "title": "" }, { "docid": "28aef2089cbade10dfa8a1a86e841c5d", "score": "0.6937725", "text": "public function getHeaders(){\n\t \treturn $this->headers;\n\t }", "title": "" }, { "docid": "df660c2392838b47b6226e334fd47110", "score": "0.6922877", "text": "public function doHeaders() { }", "title": "" }, { "docid": "a930a3ae369c5a08ee507bcb84fe0594", "score": "0.6921052", "text": "public static function get_headers() {\n\t\tif ( function_exists( 'apache_request_headers' ) ) {\n\t\t\t// We need this to get the actual Authorization header because apache tends\n\t\t\t// to tell us it doesn't exist.\n\t\t\t$headers = apache_request_headers();\n\n\t\t\t// Sanitize the output of apache_request_headers because we always want the\n\t\t\t// keys to be Cased-Like-This and arh() returns the headers in the same case\n\t\t\t// as they are in the request.\n\t\t\t$out = array();\n\t\t\tforeach ( $headers as $k => $v ) {\n\t\t\t\t$k = str_replace(\n\t\t\t\t\t' ',\n\t\t\t\t\t'-',\n\t\t\t\t\tucwords( strtolower( str_replace( '-', ' ', $k ) ) )\n\t\t\t\t);\n\t\t\t\t$out[$k] = $v;\n\t\t\t}\n\t\t} else {\n\t\t\t// Otherwise we don't have apache and are just going to have to hope that\n\t\t\t// $_SERVER actually contains what we need.\n\t\t\t$out = array();\n\t\t\tif ( isset( $_SERVER['CONTENT_TYPE'] ) )\n\t\t\t\t$out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\t\t\tif ( isset( $_ENV['CONTENT_TYPE'] ) )\n\t\t\t\t$out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\n\t\t\tforeach ( $_SERVER as $k => $v ) {\n\t\t\t\tif ( substr( $k, 0, 5 ) == 'HTTP_' ) {\n\t\t\t\t\t// This is chaos, basically it is just there to capitalize the first\n\t\t\t\t\t// letter of every word that is not an initial HTTP and strip HTTP\n\t\t\t\t\t$k = str_replace(\n\t\t\t\t\t\t' ',\n\t\t\t\t\t\t'-',\n\t\t\t\t\t\tucwords( strtolower( str_replace( '_', ' ', substr( $k, 5 ) ) ) )\n\t\t\t\t\t);\n\t\t\t\t\t$out[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "472876245e51d69b208c415c1cedb066", "score": "0.6919431", "text": "public function headers() {\n return [];\n }", "title": "" }, { "docid": "9b9088305a8274707bea03e8ced08df7", "score": "0.6917478", "text": "protected function getHeaders()\n {\n return array_filter_key(array_change_key_case($_SERVER), function ($key) {\n return Str::startsWith($key, 'http_') && !array_key_exists($key, array_flip($this->guardedHeaders));\n });\n }", "title": "" }, { "docid": "943be674fd0e11c6f1f3f00ce4602020", "score": "0.69095916", "text": "public function getHeader()\n {\n return [self::AGENT_HEADER_KEY => [\"$this->clientName/$this->clientVersion \".\n \"$this->codeGenName/$this->codeGenVersion gax/$this->gaxVersion \".\n \"php/$this->phpVersion\"]];\n }", "title": "" }, { "docid": "665bd084ae55c2e709b32159dbf80764", "score": "0.69060326", "text": "public function getHeaders(){\n return $this->headers;\n }", "title": "" }, { "docid": "5113cad15aec5167fad4ade36b6ace68", "score": "0.69029015", "text": "public function getRawHeaders();", "title": "" }, { "docid": "6b6a689b4770ffc0322bd145a4222365", "score": "0.68972754", "text": "public function getHeaders()\n {\n $headers = static::getDefaultHeaders();\n\n return array_merge($this->headers, $headers);\n }", "title": "" }, { "docid": "155d18bef3f5c00c4bbbbabb0315149f", "score": "0.6895901", "text": "protected function getRequestHttpHeaders()\n\t{\n\t\treturn array(\n\t\t\t'Content-Type: text/xml'\n\t\t);\n\t}", "title": "" }, { "docid": "5224dec1ff28ee729deacf6eb6f82299", "score": "0.6890133", "text": "protected function getRequestHttpHeaders()\n\t{\n\t\treturn array(\n\t\t\t'Content-Type: application/com.vantivcnp.payfac-v13+xml',\n\t\t\t'Accept: application/com.vantivcnp.payfac-v13+xml'\n\t\t);\n\t}", "title": "" }, { "docid": "da1f7d07bf9ae7396f631233e18fa889", "score": "0.6886194", "text": "public function fetchHeaders()\n {\n // start with all the \"custom\" headers.\n // we will apply header-value encoding at the end.\n $headers = $this->_headers;\n \n // Content-Type:\n $content_type = $this->_type;\n \n if ($this->_charset) {\n $content_type .= '; charset=\"' . $this->_charset . '\"';\n }\n \n if ($this->_boundary) {\n $content_type .= ';' . $this->_crlf\n . ' boundary=\"' . $this->_boundary . '\"';\n }\n \n $headers['Content-Type'] = $content_type;\n \n // Content-Disposition:\n if ($this->_disposition) {\n $disposition = $this->_disposition;\n if ($this->_filename) {\n $disposition .= '; filename=\"' . $this->_filename . '\"';\n }\n $headers['Content-Disposition'] = $disposition;\n }\n \n // Content-Transfer-Encoding:\n if ($this->_encoding) {\n $headers['Content-Transfer-Encoding'] = $this->_encoding;\n }\n \n // now loop through all the headers and build the header block,\n // using header-value encoding as we go.\n $output = '';\n foreach ($headers as $label => $value) {\n $label = Solar_Mime::headerLabel($label);\n $value = Solar_Mime::headerValue(\n $label,\n $value,\n $this->_charset,\n $this->_crlf\n );\n $output .= \"$label: $value{$this->_crlf}\";\n }\n \n return $output;\n }", "title": "" }, { "docid": "f1160196d7e895bfed6a18298736bef6", "score": "0.6885429", "text": "public function getHeaders(): array\n {\n return [];\n }", "title": "" }, { "docid": "a27ad6f90b881d4d3b25074e665efc35", "score": "0.6870659", "text": "function apache_request_headers()\n {\n $headers = array();\n\n $copy_server = array(\n 'CONTENT_TYPE' => 'Content-Type',\n 'CONTENT_LENGTH' => 'Content-Length',\n 'CONTENT_MD5' => 'Content-Md5',\n );\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) === 'HTTP_') {\n $key = substr($key, 5);\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\n $headers[$key] = $value;\n }\n } elseif (isset($copy_server[$key])) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n\n if (!isset($headers['Authorization'])) {\n if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n } elseif (isset($_SERVER['PHP_AUTH_USER'])) {\n $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';\n $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);\n } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }", "title": "" }, { "docid": "7ab761ab0b2f8ef0e457f7bfdeb3a489", "score": "0.68703663", "text": "public function buildHeaders()\n {\n $now = new \\DateTime();\n $headers = $this->headers + array(\n 'Accept' => '*/*',\n 'Content-Length' => strlen($this->getContent()),\n 'Content-Type' => 'text/html',\n 'Date' => $now->format(\\DateTime::RFC1123)\n );\n\n $return = array();\n\n foreach ($headers as $name => $value) {\n $return[] = \"$name: $value\";\n }\n\n return $return;\n }", "title": "" }, { "docid": "5f29b0a4752d00631a7c5ad2d9edc854", "score": "0.6845301", "text": "public function getHeaders() {\n $headers= array();\n foreach ($this->headers as $name => $values) {\n $headers[$name]= end($values);\n }\n return $headers;\n }", "title": "" }, { "docid": "5314621ee2a3ce0848ccdff07ce05d23", "score": "0.68450123", "text": "public function getHeaders() {\n\t\treturn $this->headers;\t\n\t}", "title": "" }, { "docid": "6bd7bc549150a8d3fd886ea2c1c01732", "score": "0.68402517", "text": "public function getDefaultHttpHeaders()\n {\n return array(\n 'Content-Type' => 'text/plain',\n 'User-Agent' => $this->client->getUserAgent(),\n 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Language' => 'en-us;q=0.7,en;q=0.3',\n 'Accept-Encoding' => 'gzip, deflate',\n 'Accept-Charset' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n 'Connection' => 'keep-alive',\n 'Keep-Alive' => '300',\n 'Cache-Control' => 'max-age=0',\n 'Pragma' => '',\n );\n }", "title": "" }, { "docid": "ee757aea524db80920133a77626bea95", "score": "0.6838826", "text": "private function addHeader() {\n\t\t$this -> _headers = \"MIME-Version: \" . $this -> _mime_version . \"\\r\\n\";\n\t\t$this -> _headers .= \"Content-Type: \" . $this -> _content_type . \" charset=\" . $this -> _encoding . \"\\r\\n\";\n\t\t$this -> _headers .= \"From: \" . $this -> _from_name . \" <\" . $this -> _from_email . \">\\r\\n\";\n\t\t$this -> _headers .= \"Reply-To: \" . $this -> _from_email . \"\\r\\n\";\t\t\t\n\t\t$this -> _headers .= \"X-Mailer: PHP/\" . phpversion();\n\t\treturn $this -> _headers;\n\t}", "title": "" }, { "docid": "dc72f648df06bbdd115c23701e0ef525", "score": "0.68351513", "text": "public function getAllHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "96bc46d78805e4292cb44a4f79ab63b7", "score": "0.68267375", "text": "protected function get_header()\n\t{\n\t\tif ($this->service == 'CustomerManagement')\n\t\t{\n\t\t\t$headers = '\n\t\t\t\t<ApiUserAuthHeader xmlns=\"http://adcenter.microsoft.com/syncapis\">\n\t\t\t\t\t<UserName>'.$this->api_user.'</UserName>\n\t\t\t\t\t<Password>'.$this->api_pass.'</Password>\n\t\t\t\t\t<UserAccessKey>'.$this->get_key('access_key').'</UserAccessKey>\n\t\t\t\t</ApiUserAuthHeader>\n\t\t\t';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$headers = '\n\t\t\t\t<ApplicationToken></ApplicationToken>\n\t\t\t\t<DeveloperToken>'.$this->get_key('access_key').'</DeveloperToken>\n\t\t\t\t<UserName>'.$this->api_user.'</UserName>\n\t\t\t\t<Password>'.$this->api_pass.'</Password>\n\t\t\t\t<CustomerAccountId>'.$this->ac_id.'</CustomerAccountId>\n\t\t\t';\n\t\t}\n\t\treturn ($headers);\n\t}", "title": "" }, { "docid": "9aaa0d9960ea692be38759d13ec63296", "score": "0.68258935", "text": "function getHeaders() {\r\n\t\treturn $this->headers;\r\n\t}", "title": "" }, { "docid": "a17ec612241c0281c56f4fceeae84def", "score": "0.6825752", "text": "public function __getLastRequestHeaders()\n {\n }", "title": "" }, { "docid": "9b5b950365834f8ca56468d55962484e", "score": "0.68197554", "text": "public function getRequestHeaders() {\n\n\t\t// If Apache function is enabled.\n\t\tif (function_exists(\"apache_request_headers\")) {\n\n\t\t\t// And if we get data from functiuon.\n\t\t\tif($headers = apache_request_headers()) {\n\n\t\t\t\t// Return data.\n\t\t\t\treturn $headers;\n\n\t\t\t}\n\t\t}\n\n\t\t// Set empty header array.\n\t\t$headers = array();\n\n\t\t// Get the IF_MODIFIED_SINCE header as Server variable.\n\t\tif (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {\n\n\t\t\t$headers['If-Modified-Since'] = $_SERVER['HTTP_IF_MODIFIED_SINCE'];\n\n\t\t}\n\n\t\treturn $headers;\n\n\t}", "title": "" }, { "docid": "cba97c7d9c3574d2acaaa54aff6dac9a", "score": "0.68184817", "text": "public function getRequestHeaders()\n {\n return [];\n }", "title": "" }, { "docid": "18ec3054de6a76a3802a880acd2fdd2c", "score": "0.68062985", "text": "abstract function configHeaders();", "title": "" } ]
68b1b49db37381708a3e8e5bfb6564d6
This function is used in includeAttachments() function.
[ { "docid": "333bb15592d7b20e625e9949381313e9", "score": "0.0", "text": "private function includeDeleteButtons($encryptedFilePath, $showDeleteButtons = false, $isAdminAttachment = false) {\n $htmlResponse = '';\n if ($_SESSION['user_type'] == Constants::USER_TYPE_PURCHASING_PERSON ||\n $_SESSION['user_type'] == Constants::USER_TYPE_ADMINISTRATOR ||\n $showDeleteButtons) {\n $htmlResponse = \"&nbsp;&nbsp;\";\n if ($isAdminAttachment) {\n $htmlResponse .= \"<a class='button attachment-buttons' onclick=\\\"deleteAdminAttachment('$encryptedFilePath')\\\"><img src='images/x-icon.png'/></a></a>\";\n } else {\n $htmlResponse .= \"<a class='button attachment-buttons' onclick=\\\"showDeleteConfirmationWindow('$encryptedFilePath')\\\"><img src='images/x-icon.png'/></a></a>\";\n }\n }\n return $htmlResponse;\n }", "title": "" } ]
[ { "docid": "354b9f64666e2f8100d43e2a48e91946", "score": "0.6551689", "text": "private function __attachFiles ()\n\t{\n\t\t$content = '' ;\n\t\t\n\t\tif ( is_array ( $this->__current['attachments'] ) && !empty ( $this->__current['attachments'] ) )\n\t\t{\n\t\t\t$files = array();\n\t\t\tforeach ($this->__current['attachments'] as $attachment)\n\t\t\t{\n\t\t\t\tif ( !is_null ( $this->attachPath ) )\n\t\t\t\t{\n\t\t\t\t\tif ( file_exists($this->attachPath.$attachment) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$files[] = $this->attachPath . $attachment ;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->__log ( array ( 'Attachment file not found :: ' . $this->attachPath . $attachment ) , false ) ;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( file_exists( WWW_ROOT . $attachment) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$files[] = WWW_ROOT . $attachment;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->__log ( array ( 'Attachment file not found :: ' . WWW_ROOT . $attachment ) , false ) ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($files as $file) \n\t\t\t{\n\t\t\t\t$mime = $this->getMimeType ( $file ) ;\n\t\t\t\tif ( !is_null ( $mime ) )\n\t\t\t\t{\n\t\t\t\t\t$handle = fopen($file, 'rb');\n\t\t\t\t\t$data = fread($handle, filesize($file));\n\t\t\t\t\t$data = chunk_split( base64_encode($data) , $this->lineLength , $this->_eol ) ;\n\t\t\t\t\tfclose($handle);\n\n\t\t\t\t\t$content .= '' . $this->_eol;\n\t\t\t\t\t$content .= '--' . $this->__boundary . $this->_eol;\n\t\t\t\t\t$content .= 'Content-Type: ' . $mime . $this->_eol;\n\t\t\t\t\t$content .= 'Content-Transfer-Encoding: base64' . $this->_eol;\n\t\t\t\t\t$content .= 'Content-Disposition: attachment; filename=\"' . basename($file) . '\"' . $this->_eol;\n\t\t\t\t\t$content .= '' . $this->_eol;\n\t\t\t\t\t$content .= $data . $this->_eol;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$content .= '--' . $this->__boundary . '--' . $this->_eol;\n\t\t}\n\t\t\n\t\treturn $content ;\n\t}", "title": "" }, { "docid": "0817636bf7b5ccad8658ee98997fab97", "score": "0.65277004", "text": "public function getAttachments()\n {\n }", "title": "" }, { "docid": "bc78f5a140ff7973e9af645bc03e8c54", "score": "0.6512441", "text": "function prepend_attachment($content)\n{\n}", "title": "" }, { "docid": "64b6dfab38aa4342b9af789b3a7128a6", "score": "0.64999723", "text": "function coreAttachments($info=\"\",$pages=\"\",$attachments) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<h3 class='ipsType_subtitle'>{$this->lang->words['m_attach']}</h3>\n<br />\n<div class='row1'>\t\n\t<if test=\"hasAttachLimit:|:$info['has_limit'] == 1\">\n\t\t<div id='space_allowance' class='general_box'>\n\t\t\t<p><strong>{$info['attach_space_used']}</strong></p>\n\t\t\t<p class='progress_bar <if test=\"attachAlmostFull:|:$info['full_percent'] > 80\">limit</if>' title='{$this->lang->words['ucp_attach_allowance']} {$info['full_percent']}% {$this->lang->words['ucp_full']}'>\n\t\t\t\t<span style='width: {$info['full_percent']}%'>{$info['full_percent']}%</span>\n\t\t\t</p>\n\t\t\t<p class='desc'>{$info['attach_space_count']}</p>\n\t\t</div>\n\t</if>\n\t<if test=\"hasPagesTop:|:$pages\">\n\t\t<div class='topic_controls'>\n\t\t\t{$pages}\n\t\t</div>\n\t\t<br class='clear' />\n\t</if>\n\t<!-- ATTACHMENTS TABLE -->\n\t<form action=\"{parse url=\"app=core&amp;module=usercp&amp;tab=core&amp;area=updateAttachments&amp;do=saveIt\" base=\"public\"}\" id=\"checkBoxForm\" method=\"post\">\n\t<table class='ipb_table' summary=\"{$this->lang->words['ucp_user_attach']}\">\n\t\t<tr class='header'>\n\t\t\t\t<th scope='col' style='width: 2%'>&nbsp;</th>\n\t\t\t\t<th scope='col' style='width: 35%'>{$this->lang->words['attach_title']}</th>\n\t\t\t\t<th scope='col' style='width: 7%'>{$this->lang->words['attach_hsize']}</th>\n\t\t\t\t<th scope='col' style='width: 27%'>{$this->lang->words['attach_topic']}</th>\n\t\t\t\t<th scope='col' class='short' style='width: 3%'><input class='input_check' id=\"checkAllAttachments\" type=\"checkbox\" value=\"{$this->lang->words['check_all']}\" /></th>\n\t\t\t</tr>\n\t\t\t<if test=\"hasAttachments:|:count($attachments)\">\n\t\t\t\t{parse striping=\"attach\" classes=\"row1,row2\"}\n\t\t\t\t<foreach loop=\"attach:$attachments as $idx => $data\">\n\t\t\t\t\t<tr id=\"a{$data['attach_id']}\" class='{parse striping=\"attach\"}'>\n\t\t\t\t\t\t\t<td class='short altrow'>\n\t\t\t\t\t\t\t\t<if test=\"attachmentThumbLocation:|:$data['attach_thumb_location']\">\n\t\t\t\t\t\t\t\t\t<a href=\"{parse url=\"app=core&amp;module=attach&amp;section=attach&amp;attach_rel_module={$data['_type']}&amp;attach_id={$data['attach_id']}\" base=\"public\"}\" title=\"{$data['attach_file']}\"><img src=\"{$this->settings['upload_url']}/{$data['attach_thumb_location']}\" width=\"30\" height=\"30\" alt='{$this->lang->words['attached_file']}' /></a>\n\t\t\t\t\t\t\t\t<else />\n\t\t\t\t\t\t\t\t\t<img src=\"{$this->settings['mime_img']}/{$data['image']}\" alt=\"{$this->lang->words['attached_file']}\" />\n\t\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<a href=\"{parse url=\"app=core&amp;module=attach&amp;section=attach&amp;attach_rel_module={$data['_type']}&amp;attach_id={$data['attach_id']}\" base=\"public\"}\" title=\"{$data['attach_file']}\">{$data['short_name']}</a><br />\n\t\t\t\t\t\t\t\t<span class=\"desc\">( {$this->lang->words['attach_hits']}: {$data['attach_hits']} )</span>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='short altrow'>{$data['real_size']}</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<if test=\"attachmentPost:|:$data['attach_rel_id'] > 0 AND $data['attach_rel_module'] == 'post'\">\n\t\t\t\t\t\t\t\t\t<a href=\"{parse url=\"showtopic={$data['tid']}&amp;view=findpost&amp;p={$data['attach_rel_id']}\" base=\"public\"}\" title='{$this->lang->words['ucp_view_org']}'>{$data['title']}</a>\n\t\t\t\t\t\t\t\t<else />\n\t\t\t\t\t\t\t\t\t{$data['title']}\n\t\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<span class=\"desc\">{$data['attach_date']}</span>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='altrow short'><input type=\"checkbox\" name=\"attach[{$data['attach_id']}]\" value=\"1\" class=\"input_check checkall\" /></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t</foreach>\n\t\t\t<else />\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"5\" class='no_messages'>{$this->lang->words['splash_noattach']}</td>\n\t\t\t\t</tr>\n\t\t\t</if>\n\t\t</table>\n\t\t<if test=\"attachmentMultiDelete:|:count($attachments)\">\n\t\t\t<div class='moderation_bar rounded with_action clear' id='topic_mod'>\n\t\t\t\t<input type=\"hidden\" name=\"authKey\" value=\"{$this->member->form_hash}\" />\n\t\t\t\t<input type=\"submit\" value=\"{$this->lang->words['attach_delete']}\" class=\"input_submit alt\" />\n\t\t\t</div>\n\t\t</if>\n\t</form>\n</div>\n<if test=\"hasPagesBottom:|:$pages\">\n\t<div class='topic_controls'>\n\t\t{$pages}\n\t</div>\n\t<br class='clear' />\n</if>\n<script type='text/javascript'>\n\tipb.global.registerCheckAll( 'checkAllAttachments', 'checkall' );\n</script>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "ecc6c2de94547c27d97df23ea81c8f83", "score": "0.63993376", "text": "abstract public function attachments(): array;", "title": "" }, { "docid": "10f93d5514da511027c6ea776a488528", "score": "0.6369366", "text": "function multi_attach_mail($to, $subject, $message, $senderMail, $senderName, $files, $c_id)\n\t{\n\n\t\t$base_url=base_url();\n\t\t$dirname=getcwd();\n\n\t\t$from = $senderName.\" <\".$senderMail.\">\"; \n\t\t$headers = \"From: $from\";\n\n\t\t// boundary \n\t\t$semi_rand = md5(time()); \n\t\t$mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n\n\t\t// headers for attachment \n\t\t$headers .= \"\\nMIME-Version: 1.0\\n\" . \"Content-Type: multipart/mixed;\\n\" . \" boundary=\\\"{$mime_boundary}\\\"\"; \n\n\t\t// multipart boundary \n\t\t$message = \"--{$mime_boundary}\\n\" . \"Content-Type: text/html; charset=\\\"UTF-8\\\"\\n\" .\n\t\t\"Content-Transfer-Encoding: 7bit\\n\\n\" . $message . \"\\n\\n\"; \n\n\t\t// preparing attachments\n\t\tif(count($files) > 0)\n\t\t{\n\t\t\t\n\t\t\tfor($i=0;$i<count($files);$i++)\n\t\t\t{\n\t\t\t\t/*if(is_file($files[$i]))\n\t\t\t\t{*/\n\t\t\t\t\t\n\t\t\t\t\t$message .= \"--{$mime_boundary}\\n\";\n\t\t\t\t\t$fp = @fopen($dirname.'/assets/uploads/'.$files[$i],\"rb\");\n\t\t\t\t\t$data = @fread($fp,filesize($dirname.'/assets/uploads/'.$files[$i]));\n\t\t\t\t\t@fclose($fp);\n\t\t\t\t\tprint_r($fp);\n\t\t\t\t\t$data = chunk_split(base64_encode($data));\n\t\t\t\t\t$message .= \"Content-Type: image/jpg; name=\\\"\".$files[$i].\"\\\"\\n\" . \n\t\t\t\t\t\"Content-Description: \".$files[$i].\"\\n\" .\n\t\t\t\t\t\"Content-Disposition: attachment;\\n\" . \" filename=\\\"\".$files[$i].\"\\\"; size=\".filesize($dirname.'/assets/uploads/'.$files[$i]).\";\\n\" . \n\t\t\t\t\t\"Content-Transfer-Encoding: base64\\n\\n\" . $data . \"\\n\\n\";\n\t\t\t\t//}\n\t\t\t}\n\t\t}\n\t\t//print_r($message);exit;\n\t\t$message .= \"--{$mime_boundary}--\";\n\t\t$returnpath = \"-f\" . $senderMail;\n\t\t\n\t\t//send email\n\t\t$mail = @mail($to, $subject, $message, $headers, $returnpath); \n\t\t//function return true, if email sent, otherwise return fasle\n\t\tif($mail)\n\t\t{\n\t\t\t$this->session->set_flashdata('section','photos');\n\t\t\t$this->session->set_flashdata('email_pic_msg', '<b style=\"color:green;\">Image Set Mailed Successfully to '.$to.' </b>');\n\t\t\t//$data['message'] ='<div class=\"text-success-wrapper\">Booking Updated Successfully <span class=\"text-success-close\">x</span></div>';\n\t\t\tredirect(site_url().'stylist/manageclient/'.$c_id.'#photos');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->set_flashdata('section','photos');\n\t\t\t$this->session->set_flashdata('email_pic_msg', '<b style=\"color:red;\">Image Set Mail Failed to '.$to.' </b>');\n\t\t\t//$data['message'] ='<div class=\"text-success-wrapper\">Booking Updated Successfully <span class=\"text-success-close\">x</span></div>';\n\t\t\tredirect(site_url().'stylist/manageclient/'.$c_id.'#photos');\n\t\t}\n\t}", "title": "" }, { "docid": "3182de6e901f875e9ed25213618422b9", "score": "0.6300273", "text": "function fetch_inline_attachment_filelist($userid = 0, $projectid = 0, $attachtype = 'project', $printimage = false)\n{\n \n global $ilance, $ilconfig, $ilpage, $phrase;\n\t\t//herakle kkk\n\t\t\t\t\t\tif($_SESSION['ilancedata']['user']['isstaff'] == '1')\n\t\t\t\t\t\t$pro_val_id = $projectid;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t$pro_val_id = intval($projectid);\n \n $html = '';\n $sql = $ilance->db->query(\"\n SELECT attachid, visible, filename, filesize, filehash\n FROM \" . DB_PREFIX . \"attachment\n WHERE attachtype = '\" . $ilance->db->escape_string($attachtype) . \"'\n AND project_id = '\" . $pro_val_id . \"'\n \" . (($userid > 0) ? \"AND user_id = '\" . intval($userid) . \"'\" : '') . \"\n \");\n while ($res = $ilance->db->fetch_array($sql))\n {\n $moderated = '';\n if ($res['visible'] == 0)\n {\n $moderated = '[' . $phrase['_review_in_progress'] . ']';\n $attachment_link = $res['filename'];\n }\n else\n {\n if ($printimage)\n {\n $attachment_link = '<img src=\"' . HTTP_SERVER . $ilpage['attachment'] . '?cmd=thumb&amp;id=' . $res['filehash'] . '\" border=\"0\" alt=\"\" />';\n }\n else\n {\n $attachment_link = '<a href=\"' . HTTP_SERVER . $ilpage['attachment'] . '?id=' . $res['filehash'] . '\" target=\"_blank\">' . $res['filename'] . '</a>';\n }\n }\n \n $html .= '<div><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'paperclip.gif\" border=\"0\" alt=\"' . $res['filename'] . '\" /> ' . $attachment_link . ' (' . $res['filesize'] . ' ' . $phrase['_bytes'] . ') ' . $moderated . '</div>';\n }\n \n return $html;\n}", "title": "" }, { "docid": "79681d2e5a5d33c7c5d8ea463c656ac3", "score": "0.62622786", "text": "function getAttachmentsModule();", "title": "" }, { "docid": "404d7c7d24df0f543221527c40b48b0c", "score": "0.6226303", "text": "function handle_supports_attachments($supportid)\n{\n $CI = & get_instance();\n $id_E = $CI->session->userdata('staff_user_id_entreprise');\n\n $path = SUPPORTS_ATTACHMENTS_FOLDER . $id_E . '/';\n if (!file_exists($path)) {\n mkdir($path);\n }\n $path .= $supportid . '/';\n\n $uploaded_files = array();\n if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != '') {\n // Get the temp file path\n $tmpFilePath = $_FILES['file']['tmp_name'];\n\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n // Setup our new file path\n $filename = unique_filename($path, $_FILES[\"file\"][\"name\"]);\n $newFilePath = $path . $filename;\n\n if (!file_exists($path)) {\n mkdir($path);\n fopen($path . 'index.html', 'w');\n }\n\n // Upload the file into the temp dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n array_push($uploaded_files, array(\n 'filename' => $filename,\n 'filetype' => $_FILES[\"file\"][\"type\"]\n ));\n }\n }\n }\n\n if (count($uploaded_files) > 0) {\n return $uploaded_files;\n }\n\n return false;\n}", "title": "" }, { "docid": "8b665b38049f7c9890caff17f165fa3a", "score": "0.6209483", "text": "function handleEmailAttachments(&$attach,&$msg) {\n $imgarr = getEmailImages($msg);\n\n if (count($imgarr)==0) return false;\n\n //our directory for storing the attachments\n $dir = TMP_DIR.\"/\".USER_LOGIN.\"/email\";\n $c = count($attach);\n \n foreach ($imgarr AS $img) \n {\n\n $d = new DOCMGR_OBJECT($img[\"object_id\"]);\n $info = $d->getInfo();\n $data = $d->getContent();\n\n //make sure it's not already attached\n if (!checkAttached($attach,$dir.\"/\".$info[\"name\"])) continue;\n\n //write the file to our temp directory\n file_put_contents($dir.\"/\".$info[\"name\"],$data);\n\n $ext = fileExtension($info[\"name\"]);\n $cid = md5(uniqid()).\".\".$ext;\n\n\n //add to the attachment array\n $attach[$c][\"path\"] = $dir.\"/\".$info[\"name\"];\n $attach[$c][\"name\"] = $info[\"name\"];\n $attach[$c][\"cid\"] = $cid;\n $c++;\n\n //now replace the original source in the message with the inline cid source\n $msg = str_replace($img[\"src\"],\"cid:\".$cid,$msg);\n \n }\n\n}", "title": "" }, { "docid": "4b80cbbe20010677c604a18efdfff3be", "score": "0.6154188", "text": "public function testGetAttachments()\n {\n $this->markTestIncomplete(\n 'Test of \"getAttachments\" method has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "6a514ff1ea5cfe3086ee8a913b480fda", "score": "0.61116683", "text": "public function includeMainmedia()\n {\n if (!$this->_item->getMainmedia()) {\n return false;\n }\n\t\t\n\t\t//$this->original = \n\t\t\n\t\t//$media = new Mediasharex_Manager_MediaItem($this->_item->getMainmedia());\n //$media->includeOriginal();\n //$this->_item->setMainmedia($media->getItemArray());\n }", "title": "" }, { "docid": "d2a40856686fcd280e1a2ce13c77056c", "score": "0.60653013", "text": "public function processFileAttachments()\n {\n if (isset($_FILES['imagedata'])\n && is_uploaded_file($_FILES['imagedata']['tmp_name'])\n && $_FILES['imagedata']['error']==UPLOAD_ERR_OK) {\n global $_UNL_UCBCN;\n $this->imagemime = $_FILES['imagedata']['type'];\n $this->imagedata = file_get_contents($_FILES['imagedata']['tmp_name']);\n }\n }", "title": "" }, { "docid": "dd4edcc79f4b3f457427e6e3867dd9bb", "score": "0.6053901", "text": "function allow_fetch_attachments() {\n return apply_filters('import_allow_fetch_attachments', true);\n }", "title": "" }, { "docid": "fde486296aafc1131e7208a70669119c", "score": "0.6046902", "text": "private function _addAttachmentMessage()\n {\n $this->body = \"--\" . $this->boundary .\"\\n\" . \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\" . \"Content-Transfer-Encoding: 7bit\\n\\n\" . $this->body . \"\\n\\n\" . \"--{\" . $this->boundary . \"}\\n\"; \n \n return TRUE;\n }", "title": "" }, { "docid": "b36ed27a765a6d8d06410e9d801f832b", "score": "0.6032224", "text": "function attachmentHandle($issue_id, $issue_token){\n if (isset($_FILES['attachments']['name']) && count($_FILES['attachments']['name']) > 0) {\n if (is_array($_FILES['attachments']['name']) && count($_FILES['attachments']['name']) > 0 && isset($_FILES['attachments']['name'])) {\n for ($f = 0; $f < count($_FILES['attachments']['name']); $f++) {\n $fileArr[] = array(\n \"name\" => $_FILES['attachments']['name'][$f],\n \"type\" => $_FILES['attachments']['type'][$f],\n \"tmp_name\" => $_FILES['attachments']['tmp_name'][$f],\n \"error\" => $_FILES['attachments']['error'][$f],\n \"size\" => $_FILES['attachments']['size'][$f]);\n }\n for ($i = 0; $i < count($fileArr); $i++) {\n $fileName = '';\n\n if (trim($fileArr[$i]['name']) <> \"\" && $fileArr[$i]['size'] > 0 && $fileArr[$i]['error'] == 0) {\n $fileValArr = explode('.', $fileArr[$i]['name']);\n $filePathInfo = pathinfo($fileArr[$i]['name'], PATHINFO_EXTENSION);\n $mediaArr = array('mp4');\n $imgArr = array('png', 'jpg', 'jpeg', 'gif');\n $docArr = array('txt', 'doc', 'docx', 'pdf');\n\n if (in_array(strtolower($filePathInfo), $imgArr)) {\n $fileName = replaceString($fileValArr[0]) . '_' . $issue_token . $issue_id . '.' . $filePathInfo;\n move_uploaded_file($fileArr[$i]['tmp_name'], ISSUES_PHY_PATH . $fileName);\n $dataArr['img'][] = $fileName;\n resize_image($fileName, ISSUES_PHY_PATH, 70);\n } else if (in_array(strtolower($filePathInfo), $mediaArr)) {\n $mediaFileName = replaceString($fileValArr[0]) . '_' . $issue_token . $issue_id . '.' . $filePathInfo;\n move_uploaded_file($fileArr[$i]['tmp_name'], ISSUES_PHY_PATH . $mediaFileName);\n $dataArr['media'][] = $mediaFileName;\n } else if (in_array(strtolower($filePathInfo), $docArr)) {\n $docFileName = replaceString($fileValArr[0]) . '_' . $issue_token . $issue_id . '.' . $filePathInfo;\n move_uploaded_file($fileArr[$i]['tmp_name'], ISSUES_PHY_PATH . $docFileName);\n $dataArr['doc'][] = $docFileName;\n }\n }\n }\n }\n }\n\n if (count($dataArr) > 0) {\n $data_json = json_encode($dataArr);\n } else {\n $data_json = '';\n }\n $data = array(\"attachments\" => $data_json);\n return $this->questions_m->updateIssue($issue_id, $data);\n }", "title": "" }, { "docid": "7c001866f8e2c58400f288c330b4dde2", "score": "0.60218745", "text": "function _build_attachments () {\r\n $sep = chr(13).chr(10);\r\n $ata = array();\r\n $k=0;\r\n\r\n for ($i=0; $i < count( $this->attachments); $i++) {\r\n $filename = $this->attachments[$i];\r\n $basename = basename($filename);\r\n $mimetype = $this->mimetypes[$i];\r\n $disposition = $this->dispositions[$i];\r\n $contentID = $this->contentIDs[$i];\r\n if (preg_match('/^[a-zA-Z]+:\\/\\//', $filename)) { // figure out if local or remote\r\n \t$upart = parse_url($filename);\r\n \t$newfilename = $upart['scheme'].'://';\r\n \tif (!empty($upart['user'])) $newfilename .= $upart['user'].':'.$upart['pass'].'@';\r\n \t$newfilename .= $upart['host'];\r\n \tif (!empty($upart['port'])) $newfilename .= ':'.$upart['port'];\r\n \t$newfilename .= '/';\r\n \tif (!empty($upart['path'])) {\r\n \t\t$upart['path'] = substr($upart['path'], 1);\r\n \t\t$newpath = explode('/', $upart['path']);\r\n \t\tfor($i=0; $i<count($newpath); $i++) $newpath[$i] = rawurlencode($newpath[$i]);\r\n \t\t$newfilename .= implode('/',$newpath);\r\n \t}\r\n \tif (!empty($upart['query'])) $newfilename .= '?'.urlencode($upart['query']);\r\n \tif (!empty($upart['fragment'])) $newfilename .= ':'.$upart['fragment'];\r\n\r\n\t $fp = fopen($newfilename, 'rb');\r\n\t while(!feof($fp)) $data .= fread($fp,1024);\r\n\t }\r\n\t else {\r\n\t if(!file_exists($filename)) {\r\n\t vlibMimeMailError::raiseError('VM_ERROR_NOFILE', FATAL, $filename);\r\n\t }\r\n\t $fp = fopen($filename, 'rb');\r\n\t $data = fread($fp, filesize($filename));\r\n\t }\r\n $subhdr = '--'.$this->boundary.\"\\nContent-Type: \".$mimetype.\";\\n\\tname=\\\"\".$basename.\"\\\"\\nContent-Transfer-Encoding: base64\\nContent-Disposition: \".$disposition.\";\\n\\tfilename=\\\"\".$basename.\"\\\"\\n\";\r\n // почему-то было закомментировано, из-за этого нельзя было сделать ссылки в тексте на вложенные документы\r\n if ($contentID) $subhdr .= 'Content-ID: <'.$contentID.\">\\n\";\r\n $ata[$k++] = $subhdr;\r\n $ata[$k++] = chunk_split(base64_encode($data)).\"\\n\\n\";\r\n fclose($fp);\r\n }\r\n $this->fullBody .= \"\\n\".implode($sep, $ata);\r\n }", "title": "" }, { "docid": "90744c296504ae034e72401711b41be5", "score": "0.6020349", "text": "function _attachments()\n\t{\n\t\tif(empty($this->message_id))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t$this->Attachment->attach($this->message_id, $this->attachments);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tthrow new RuntimeException($e->getMessage());\n\t\t}\n\n\t\t$this->attached = true;\n\t}", "title": "" }, { "docid": "1908485c6171bf36a9fcad3fedb63c03", "score": "0.59765774", "text": "function loadAttachmentToMedia( $globalFiles, $fileHandler, $postID, $set_thu = false ) {\n\t$_FILES = $globalFiles;\n\tif ( $_FILES[ $fileHandler ]['error'] !== UPLOAD_ERR_OK ) {\n\t\t__return_false();\n\t}\n\n\trequire_once( ABSPATH . \"wp-admin\" . '/includes/image.php' );\n\trequire_once( ABSPATH . \"wp-admin\" . '/includes/file.php' );\n\trequire_once( ABSPATH . \"wp-admin\" . '/includes/media.php' );\n\n\t$attachID = media_handle_upload( $fileHandler, $postID );\n\n\tif ( is_wp_error( $attachID ) ) {\n\t\twp_send_json_error( 'Upload was canceled, unable upload file to library' );\n\t}\n\n\n\treturn $attachID;\n}", "title": "" }, { "docid": "094ce3f0f8b4f407789458f3eaaff422", "score": "0.5973191", "text": "function _search_images(){\n\t\tif ($this->attachments_index != 0){\n\t\t\tforeach($this->attachments as $key => $value){\n\t\t\t\tif (preg_match('/(css|image)/i', $value['type']) && preg_match('/\\s(background|href|src)\\s*=\\s*[\\\"|\\'](' . $value['name'] . ')[\\\"|\\'].*>/is', $this->mail_html)) {\n\t\t\t\t\t$img_id = md5($value['name']) . \".nomad@mimemail\";\n\t\t\t\t\t$this->mail_html = preg_replace('/\\s(background|href|src)\\s*=\\s*[\\\"|\\'](' . $value['name'] . ')[\\\"|\\']/is', ' \\\\1=\"cid:' . $img_id . '\"', $this->mail_html);\n\t\t\t\t\t$this->attachments[$key]['embedded'] = $img_id;\n\t\t\t\t\t$this->attachments_img[] = $value['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8f55cfbe20d5c071285eaf57a9b4e5ee", "score": "0.5967622", "text": "function _makeHeaders(){\n $this->part1 = 0;\n $this->part2 = 0;\n $this->boundary = \"_\".md5(uniqid(time()));\n $this->inlineImg = array();\n \n $mailHeader = '';\n $mailHeader .=\"MIME-Version: 1.0\\r\\n\";\n if($this->method =='smtp')\n $mailHeader .= \"Subject: {$this->mailSubject}\\r\\n\";\n $mailHeader .= \"From: \".$this->Sender.\"\\r\\n\"; \n $mailHeader .= \"X-Mailer: PHP/\".phpversion().\"\\r\\n\";\n $mailHeader .= \"Content-Type: multipart/\".(count($this->Attachs)>0?\"mixed\":\"related\").\"; boundary=\\\"{$this->boundary}0\\\"\\r\\n\"; \n $mailHeader .= \"This is a MIME encoded message.\\r\\n\\r\\n\";\n\n \n $mailHeader .= $this->_startPart(\"multipart/related\"); \n $mailHeader .= $this->_startPart(\"multipart/alternative\");\n\n $mailHeader .= \"--{$this->boundary}2\\r\\n\";\n $mailHeader .= \"Content-Type: text/{$this->Format}; charset={$this->Charset}\\r\\n\";\n $mailHeader .= \"Content-Transfer-Encoding: 7bit\\r\\n\"; \n return $mailHeader;\n }", "title": "" }, { "docid": "4bf02b2c6167c4839b308016e47c0750", "score": "0.5949611", "text": "function hys_attach_attachments($heyyou_post_id) {\n\tglobal $hys;\n\t\n\t$attachments \t\t\t= '';\n\t$lightbox_links \t\t= '';\n\t$lightbox_links_first \t= '';\n\t\n\t//add attachments\n\tif (/* @$hys['hys_page_config']['attachments_gallery'] && */ function_exists('attachments_get_attachments')) {\n\t\n\t\t$post_images \t= attachments_get_attachments($heyyou_post_id); \n\t\t$total_images \t= count($post_images);\n\t\tif ($total_images > 0 && isset($post_images[0]['id'])) {\n\t\t\t$attachments .= \"\n\t\t\t\n\t\t\t<!-- HEYYOU POST ATTACHMENTS -->\n\t\t\t<div class='hys_attach hys_gallery'>\n\t\t\t\t<ul>\\n\";\n\t\t\tfor ($i = 0; $i < $total_images; $i++) {\n\t\t\t\tif (isset($post_images[$i]) && get_post($post_images[$i]['id'])) {\n\t\t\t\t\t$req_size = (!empty($hys['hys_page_config']['img_size'])) ? $hys['hys_page_config']['img_size'] : 'large';\n\t\t\t\t\t$full_download\t= wp_get_attachment_image_src( $post_images[$i]['id'], 'full', 1 );\n\t\t\t\t\t$lrg_download \t= wp_get_attachment_image_src( $post_images[$i]['id'], $req_size, 1 );\n\t\t\t\t\t$low_download \t= wp_get_attachment_image_src( $post_images[$i]['id'], 'medium', 1 );\n\t\t\t\t\t$lbtitle = (!empty($post_images[$i]['caption'])) ? str_replace(\"'\",'&rsquo;',$post_images[$i]['caption']) : '';\n\t\t\t\t\t\n\t\t\t\t\tif (@$hys['settings']['attach_use_titles'] == 1 || !empty($post_images[$i]['caption'])) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$lbtitle = $post_images[$i]['title'];\n\t\t\t\t\t\t$lbtitle .= (!empty($post_images[$i]['caption'])) ? \" --- {$post_images[$i]['caption']}\" : ''; //unbold caption\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$lbtitle = str_replace(\"'\",'&rsquo;',$lbtitle); //remove \"<br />\" from titles for alt=''s\n\t\t\t\t\t\n\t\t\t\t\t$attachments .= \"\n\t\t\t\t\t<li>\n\t\t\t\t\t <div class='attach_image'>\n\t\t\t\t\t\t<a href='{$lrg_download[0]}' rel='lightbox[gallery{$heyyou_post_id}]' title=\\\"{$lbtitle}\\\">\".\n\t\t\t\t\t\t\twp_get_attachment_image( $post_images[$i]['id'], 'thumbnail', 1 ).\n\t\t\t\t\t\t\"</a>\n\t\t\t\t\t </div>\\n\";\n\t\t\t\t\t\n\t\t\t\t\tif (@$hys['hys_page_config']['show_pg_img_printlabel'] == 1) {\n\t\t\t\t\t\tif ($hys['settings']['attach_use_titles'] == 1) {\n\t\t\t\t\t\t$attachments .= \"\n\t\t\t\t\t \t\t<div class='attach_title'>{$post_images[$i]['title']}</div>\n\t\t\t\t\t\t\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$attachments .= \"\n\t\t\t\t\t <div class='attach_caption'>{$post_images[$i]['caption']}</div>\n\t\t\t\t\t\t\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tif (@$hys['hys_page_config']['downloadattach'] == 1) {\n\t\t\t\t\t\t$attachments .= \"\n\t\t\t\t\t <div class='attach_download'>\n\t\t\t\t\t\t<span class='attach_download_title'>Download:</span>\n\t\t\t\t\t\t<a href='\".hys_return_url().\"?download={$full_download[0]}' target='_Blank' class='attach_download_hi'>Hi Res</a>\n\t\t\t\t\t\t<span class='attach_download_seperator'> | </span>\n\t\t\t\t\t\t<a href='\".hys_return_url().\"?download={$low_download[0]}' target='_Blank' class='attach_download_low' rel='lightbox[smallgallery{$heyyou_post_id}]'>Low Res</a>\n\t\t\t\t\t </div>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t$attachments .= \"\n\t\t\t\t\t</li>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset($lrg_download) && is_array($lrg_download) && isset($lrg_download[0])) {\n\t\t\t\t\t//Add \"%lightbox_gallery%\" Lightbox Link\n\t\t\t\t\tif (empty($lightbox_links_first)) {\n\t\t\t\t\t\t$lb_text = @ trim($hys['settings']['lightbox_gallery_link']);\n\t\t\t\t\t\t$lb_text = (empty($lb_text)) ? 'View Gallery' : $lb_text;\n\t\t\t\t\t\t$lightbox_links_first = \"<a href='{$lrg_download[0]}' rel='lightbox[hidden_attach{$heyyou_post_id}]' title='{$lbtitle}'>{$lb_text}</a>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$lightbox_links .= \"<a href='{$lrg_download[0]}' rel='lightbox[hidden_attach{$heyyou_post_id}]' style='display:none;' title='{$lbtitle}'></a>\";\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t$attachments .= \"\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<!-- END HEYYOU POST ATTACHMENTS -->\n\t\t\t\n\t\t\t\";\n\t\t}\n\t}\n\t\n\treturn array('attachments' => $attachments, 'lightboxlinks' => $lightbox_links, 'lightboxlinksfirst' => $lightbox_links_first);\n}", "title": "" }, { "docid": "4f7dc55b441ce36928a697f04adb6db4", "score": "0.59260505", "text": "function multi_attach_mail($to, $files, $sendermail){\n $from = \"Files attach <\".$sendermail.\">\"; \n $subject = date(\"d.M H:i\").\" F=\".count($files); \n $message = date(\"Y.m.d H:i:s\").\"\\n\".count($files).\" attachments\";\n $headers = \"From: $from\";\n \n // boundary \n $semi_rand = md5(time()); \n $mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n \n // headers for attachment \n $headers .= \"\\nMIME-Version: 1.0\\n\" . \"Content-Type: multipart/mixed;\\n\" . \" boundary=\\\"{$mime_boundary}\\\"\"; \n \n // multipart boundary \n $message = \"--{$mime_boundary}\\n\" . \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\" .\n \"Content-Transfer-Encoding: 7bit\\n\\n\" . $message . \"\\n\\n\"; \n \n // preparing attachments\n for($i=0;$i<count($files);$i++){\n if(is_file($files[$i])){\n $message .= \"--{$mime_boundary}\\n\";\n $fp = @fopen($files[$i],\"rb\");\n $data = @fread($fp,filesize($files[$i]));\n @fclose($fp);\n $data = chunk_split(base64_encode($data));\n $message .= \"Content-Type: application/octet-stream; name=\\\"\".basename($files[$i]).\"\\\"\\n\" . \n \"Content-Description: \".basename($files[$i]).\"\\n\" .\n \"Content-Disposition: attachment;\\n\" . \" filename=\\\"\".basename($files[$i]).\"\\\"; size=\".filesize($files[$i]).\";\\n\" .\n \"Content-Transfer-Encoding: base64\\n\\n\" . $data . \"\\n\\n\";\n }\n }\n $message .= \"--{$mime_boundary}--\";\n $returnpath = \"-f\" . $sendermail;\n $ok = @mail($to, $subject, $message, $headers, $returnpath); \n if($ok){ return $i; } else { return 0; }\n }", "title": "" }, { "docid": "a21498a77e61dbefd3bdcb5476edf3ea", "score": "0.5921438", "text": "function wp_ajax_query_attachments()\n{\n}", "title": "" }, { "docid": "5fcb6626b06a63f11c5a113f855a3d04", "score": "0.59077114", "text": "public function action_ulattach()\n\t{\n\t\tglobal $context, $modSettings, $txt;\n\n\t\t$resp_data = array();\n\t\tTxt::load('Errors');\n\t\t$context['attachments']['can']['post'] = !empty($modSettings['attachmentEnable']) && $modSettings['attachmentEnable'] == 1 && (allowedTo('post_attachment') || ($modSettings['postmod_active'] && allowedTo('post_unapproved_attachments')));\n\n\t\t// Set up the template details\n\t\t$template_layers = theme()->getLayers();\n\t\t$template_layers->removeAll();\n\t\ttheme()->getTemplates()->load('Json');\n\t\t$context['sub_template'] = 'send_json';\n\n\t\t// Make sure the session is still valid\n\t\tif (checkSession('request', '', false) !== '')\n\t\t{\n\t\t\t$context['json_data'] = array('result' => false, 'data' => $txt['session_timeout_file_upload']);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// We should have files, otherwise why are we here?\n\t\tif (isset($_FILES['attachment']))\n\t\t{\n\t\t\tTxt::load('Post');\n\n\t\t\t$attach_errors = AttachmentErrorContext::context();\n\t\t\t$attach_errors->activate();\n\n\t\t\tif ($context['attachments']['can']['post'] && empty($this->_req->post->from_qr))\n\t\t\t{\n\t\t\t\trequire_once(SUBSDIR . '/Attachments.subs.php');\n\n\t\t\t\tprocessAttachments($this->_req->getPost('msg', 'intval', 0));\n\t\t\t}\n\n\t\t\t// Any mistakes?\n\t\t\tif ($attach_errors->hasErrors())\n\t\t\t{\n\t\t\t\t$errors = $attach_errors->prepareErrors();\n\n\t\t\t\t// Bad news for you, the attachments did not process, lets tell them why\n\t\t\t\tforeach ($errors as $error)\n\t\t\t\t{\n\t\t\t\t\t$resp_data[] = $error;\n\t\t\t\t}\n\n\t\t\t\t$context['json_data'] = array('result' => false, 'data' => $resp_data);\n\t\t\t}\n\t\t\t// No errors, lets get the details of what we have for our response back to the upload dialog\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tmp_attachments = new TemporaryAttachmentsList();\n\t\t\t\tforeach ($tmp_attachments->toArray() as $val)\n\t\t\t\t{\n\t\t\t\t\t// We need to grab the name anyhow\n\t\t\t\t\tif (!empty($val['tmp_name']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$resp_data = array(\n\t\t\t\t\t\t\t'name' => $val['name'],\n\t\t\t\t\t\t\t'attachid' => $val['public_attachid'],\n\t\t\t\t\t\t\t'size' => $val['size'],\n\t\t\t\t\t\t\t'resized' => !empty($val['resized']),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$context['json_data'] = array('result' => true, 'data' => $resp_data);\n\t\t\t}\n\t\t}\n\t\t// Could not find the files you claimed to have sent\n\t\telse\n\t\t{\n\t\t\t$context['json_data'] = array('result' => false, 'data' => $txt['no_files_uploaded']);\n\t\t}\n\t}", "title": "" }, { "docid": "571eb3afcc1c210713fc3c5335f36d22", "score": "0.589104", "text": "private function _process_attachments($i)\n\t{\n\t\tif ($this->_boundary_section[$i]->headers['content-disposition'] === 'attachment' || $this->_boundary_section[$i]->headers['content-disposition'] === 'inline' || isset($this->_boundary_section[$i]->headers['content-id']))\n\t\t{\n\t\t\t// Get the attachments file name\n\t\t\tif (isset($this->_boundary_section[$i]->headers['x-parameters']['content-disposition']['filename']))\n\t\t\t{\n\t\t\t\t$file_name = $this->_boundary_section[$i]->headers['x-parameters']['content-disposition']['filename'];\n\t\t\t}\n\t\t\telseif (isset($this->_boundary_section[$i]->headers['x-parameters']['content-type']['name']))\n\t\t\t{\n\t\t\t\t$file_name = $this->_boundary_section[$i]->headers['x-parameters']['content-type']['name'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Load the attachment data\n\t\t\t$this->attachments[$file_name] = $this->_boundary_section[$i]->body;\n\n\t\t\t// Inline attachments are a bit more complicated.\n\t\t\tif (isset($this->_boundary_section[$i]->headers['content-id']) && $this->_boundary_section[$i]->headers['content-disposition'] === 'inline')\n\t\t\t{\n\t\t\t\t$this->inline_files[$file_name] = trim($this->_boundary_section[$i]->headers['content-id'], ' <>');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8ed34818efb562b5747943de87fe9564", "score": "0.5884588", "text": "function MAIL_attach($file, &$header, $message, $fileName = \"\")\n{\n\t//Generate unique ID for the eMail\n\t$messageID = md5(uniqid(rand()));\n\n\tif (is_file($file))\n\t\t{\n\t\t\t//Extract the file name from the full path\n\t\t\t$fileName = basename($file);\n\t\t\t$attachment = fread(fopen($file, \"r\"), filesize($file));\n\t\t}\n\telse\n\t\t{\n\t\t\t$attachment = $file;\n\t\t}\n\n\t// Das sind die Kopfzeilen der Multipart Mail\n\t$header.= \"MIME-Version: 1.0\\n\";\n\t$header.= \"Content-Type: multipart/mixed; boundary = \\\"$messageID\\\"\\n\";\n\n\t//Write block with the message part\n\t$out = \"--\".$messageID.\"\\n\";\n\t$out.= \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\";\n\t$out.= \"Content-Transfer-Encoding: 8bit\\n\\n\";\n\t$out.= \"$message\\n\";\n\n\t//Write next block with the attachement\n\t$out.= \"--\".$messageID.\"\\n\";\n\t$out.= \"Content-Type: \".mime_content_type($file).\"; name=\\\"$fileName\\\"\\n\";\n\t$out.= \"Content-Transfer-Encoding: base64\\n\";\n\t$out.= \"Content-Disposition: attachment; filename=\\\"$fileName\\\"\\n\\n\";\n\t$out.= chunk_split(base64_encode($attachment)).\"\\n\";\n\t$out.= \"--\".$messageID.\"--\\n\";\n\t\n\treturn($out);\n}", "title": "" }, { "docid": "c5a43f62ef8f7ea3d175160d7f17c62b", "score": "0.58754516", "text": "public function attachmentExists()\n {\n }", "title": "" }, { "docid": "51fce59ac3ff994686e50b6e5559fbca", "score": "0.58375216", "text": "function MediaAttach_external_display($args)\n{\n $dom = ZLanguage::getModuleDomain('MediaAttach');\n $fileid = (int) FormUtil::getPassedValue('fileid', (isset($args['fileid'])) ? $args['fileid'] : null, 'GET');\n $displaymode = FormUtil::getPassedValue('displaymode', (isset($args['displaymode'])) ? $args['displaymode'] : 'embed', 'GET');\n if ($displaymode != 'link' && $displaymode != 'embed') $displaymode = 'embed';\n $floatmode = FormUtil::getPassedValue('floatmode', (isset($args['floatmode'])) ? $args['floatmode'] : 'none', 'GET');\n if ($floatmode != 'none' && $floatmode != 'left' && $floatmode != 'right') $floatmode = 'none';\n $thumbnr = FormUtil::getPassedValue('thumbnr', (isset($args['thumbnr'])) ? $args['thumbnr'] : 0, 'GET');\n if ($thumbnr != 'original') $thumbnr = (int) $thumbnr;\n if ($thumbnr != 'original' && !is_numeric($thumbnr)) {\n $thumbnr = pnModGetVar('MediaAttach', 'defaultthumb');\n }\n unset($args);\n\n if (!($file = pnModAPIFunc('MediaAttach', 'user', 'getupload', array('fileid' => $fileid)))) {\n return LogUtil::registerError(__('Error! Could not load items.', $dom));\n }\n\n if (!SecurityUtil::checkPermission('MediaAttach::', \"$file[modname]:$file[objectid]:$fileid\", ACCESS_OVERVIEW)) {\n return LogUtil::registerPermissionError();\n }\n\n $currentUser = pnUserGetVar('uid');\n $ownHandling = pnModGetVar('MediaAttach', 'ownhandling');\n $file = _maIntPrepFileForTemplate($file, $currentUser, $ownHandling);\n\n $render = & pnRender::getInstance('MediaAttach', false);\n $render->assign('currentuser', $currentUser);\n $render->assign('file', $file);\n $render->assign('displaymode', $displaymode);\n $render->assign('floatmode', $floatmode);\n $render->assign('thumbnr', $thumbnr);\n\n return $render->fetch(_maIntChooseTemplate($render, 'external', 'display', 'MediaAttach'));\n}", "title": "" }, { "docid": "091c54a09bc4c03207d291bdae775096", "score": "0.5835871", "text": "public function clearAttachments()\n {\n }", "title": "" }, { "docid": "361e980d824ed928f2b60daee2270d12", "score": "0.5825867", "text": "function addAttachments($params)\r\n\t{\r\n\t\t//get attachments\r\n\t\t$pluginManager = FabrikWorker::getPluginManager();\r\n\t\t$data = $this->getEmailData();\r\n\t\t$groups = $this->formModel->getGroupsHiarachy();\r\n\t\tforeach ($groups as $groupModel) {\r\n\t\t\t$elementModels = $groupModel->getPublishedElements();\r\n\t\t\tforeach ($elementModels as $elementModel) {\r\n\r\n\t\t\t\t$elName = $elementModel->getFullName(false, true, false);\r\n\t\t\t\tif (array_key_exists($elName, $this->data)) {\r\n\r\n\t\t\t\t\tif (method_exists($elementModel, 'addEmailAttachement')) {\r\n\t\t\t\t\t\tif (array_key_exists($elName . '_raw',$data)) {\r\n\t\t\t\t\t\t\t$val = $data[$elName . '_raw'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$val = $data[$elName];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_array($val)) {\r\n\t\t\t\t\t\t\t$val = implode(\",\", $val);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//$aVals = explode(GROUPSPLITTER, $val );\r\n\t\t\t\t\t\t$aVals = FabrikWorker::JSONtoData($val, true);\r\n\t\t\t\t\t\tforeach ($aVals as $v) {\r\n\t\t\t\t\t\t\t$file = $elementModel->addEmailAttachement($v);\r\n\t\t\t\t\t\t\tif ($file !== false) {\r\n\t\t\t\t\t\t\t\t$this->_aAttachments[] = $file;\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// $$$ hugh - added an optional eval for adding attachments.\r\n\t\t// Eval'ed code should just return an array of file paths which we merge with $this->_aAttachments[]\r\n\t\t$w = new FabrikWorker();\r\n\t\t$email_attach_eval = $w->parseMessageForPlaceholder($params->get('email_attach_eval', ''), $this->data, false);\r\n\t\tif (!empty($email_attach_eval)) {\r\n\t\t\t$email_attach_array = @eval($email_attach_eval);\r\n\t\t\tFabrikWorker::logEval($email_attach_array, 'Caught exception on eval in email email_attach_eval : %s');\r\n\t\t\tif (!empty($email_attach_array)) {\r\n\t\t\t\t$this->_aAttachments = array_merge($this->_aAttachments, $email_attach_array);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bf86753b086725a943f4d2383fe25173", "score": "0.58243865", "text": "function media_upload_header()\n{\n}", "title": "" }, { "docid": "43a264efc25f8e87116a021738573310", "score": "0.5803504", "text": "function dw_send_mail_attachment($to, $from, $subject, $body, $files) {\n $random_hash = md5(date('r', time()));\n // $random_hash = md5(date('r', time()));\n $random_hash = '-----=' . md5(uniqid(mt_rand())); \n\n // headers \n $headers = 'From: '.$from.\"\\n\"; \n // $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: multipart/mixed; boundary=\"'.$random_hash.'\"'; \n\n // message \n $message = 'This is a multi-part message in MIME format.'.\"\\n\\n\"; \n\n $message .= '--'.$random_hash.\"\\n\"; \n $message .= 'Content-Type: text/plain; charset=\"iso-8859-1\"'.\"\\n\"; \n $message .= 'Content-Transfer-Encoding: 8bit'.\"\\n\\n\"; \n $message .= $body.\"\\n\\n\"; \n\n // attached files\n foreach ($files as $fn => $file) {\n $path = $file[\"path\"];\n $format = $file[\"format\"];\n $attachment = chunk_split(base64_encode(file_get_contents($path)));\n $message .= '--'.$random_hash.\"\\n\"; \n $message .= 'Content-Type: '. $format .'; name=\"'. $fn .'\"'.\"\\n\"; \n $message .= 'Content-Transfer-Encoding: base64'.\"\\n\"; \n $message .= 'Content-Disposition:attachement; filename=\"'. $fn . '\"'.\"\\n\\n\"; \n $message .= $attachment.\"\\n\"; \n }\n\n DatawrapperHooks::execute(DatawrapperHooks::SEND_EMAIL,\n $to, $subject, $message, $headers\n );\n}", "title": "" }, { "docid": "db7a4e559b34ed7b036b51cb9b2ef9f0", "score": "0.5786852", "text": "private function _hasAttachments()\n {\n foreach ($this->getParts() as $part) {\n if ($part->ifdisposition && $part->disposition == 'attachment') {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "840ffcfe84d3afd8965057e99187ca8a", "score": "0.5778996", "text": "function handle_okrs_attachments($okr_id, $index_name = 'attachments')\n{\n\n $path = OKR_MODULE_UPLOAD_FOLDER .'/okrs_attachments/'. $okr_id . '/';\n $uploaded_files = [];\n if($_FILES[$index_name]['name'][0] != \"\"){\n if (isset($_FILES[$index_name])) {\n for ($i = 0; $i < count($_FILES[$index_name]); $i++) {\n if ($i <= get_option('maximum_allowed_okrs_attachments')) {\n // Get the temp file path\n $tmpFilePath = $_FILES[$index_name]['tmp_name'][$i];\n\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n // Getting file extension\n $extension = strtolower(pathinfo($_FILES[$index_name]['name'][$i], PATHINFO_EXTENSION));\n $allowed_extensions = explode(',', get_ticket_form_accepted_mimes());\n $allowed_extensions = array_map('trim', $allowed_extensions);\n\n // Check for all cases if this extension is allowed\n if (!in_array('.' . $extension, $allowed_extensions)) {\n continue;\n }\n _maybe_create_upload_path($path);\n $filename = unique_filename($path, $_FILES[$index_name]['name'][$i]);\n $newFilePath = $path . $filename;\n // Upload the file into the temp dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI = & get_instance();\n $attachment = [];\n $attachment[] = [\n 'file_name' => $filename,\n 'filetype' => $_FILES[$index_name]['type'][$i],\n ];\n $CI->misc_model->add_attachment_to_database($okr_id,$index_name, $attachment);\n }\n }\n }\n }\n\n }\n if (count($attachment) > 0) {\n return $attachment;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "a3782657e1f06073fb40bee06c2d99e0", "score": "0.57624424", "text": "public static function loadAttachmentData()\r\n\t{\r\n\t\tglobal $context, $smcFunc, $sourcedir, $scripturl, $user_info, $txt, $modSettings, $issue;\r\n\t\r\n\t\t$attachmentData = array();\r\n\t\r\n\t\t$request = $smcFunc['db_query']('', '\r\n\t\t\tSELECT\r\n\t\t\t\ta.id_attach, a.id_folder, a.id_msg, a.filename, IFNULL(a.size, 0) AS filesize, a.downloads, a.approved,\r\n\t\t\t\ta.fileext, a.width, a.height, IFNULL(mem.real_name, t.poster_name) AS real_name, t.poster_ip' . (empty($modSettings['attachmentShowImages']) || empty($modSettings['attachmentThumbnails']) ? '' : ',\r\n\t\t\t\tIFNULL(thumb.id_attach, 0) AS id_thumb, thumb.width AS thumb_width, thumb.height AS thumb_height') . '\r\n\t\t\tFROM {db_prefix}issue_attachments AS ia\r\n\t\t\t\tINNER JOIN {db_prefix}attachments AS a ON (a.id_attach = ia.id_attach)' . (empty($modSettings['attachmentShowImages']) || empty($modSettings['attachmentThumbnails']) ? '' : '\r\n\t\t\t\tLEFT JOIN {db_prefix}attachments AS thumb ON (thumb.id_attach = a.id_thumb)') . '\r\n\t\t\t\tLEFT JOIN {db_prefix}members AS mem ON (mem.id_member = ia.id_member)\r\n\t\t\t\tLEFT JOIN {db_prefix}project_timeline AS t ON (t.id_event = ia.id_event)\r\n\t\t\tWHERE ia.id_issue = {int:issue}\r\n\t\t\t\tAND a.attachment_type = {int:attachment_type}' . (!$modSettings['postmod_active'] || allowedTo('approve_posts') ? '' : '\r\n\t\t\t\tAND a.approved = {int:is_approved}'),\r\n\t\t\tarray(\r\n\t\t\t\t'issue' => $issue,\r\n\t\t\t\t'attachment_type' => 0,\r\n\t\t\t\t'is_approved' => 1,\r\n\t\t\t)\r\n\t\t);\r\n\t\r\n\t\twhile ($row = $smcFunc['db_fetch_assoc']($request))\r\n\t\t{\r\n\t\t\t$i = $row['id_attach'];\r\n\t\r\n\t\t\t$attachmentData[$i] = array(\r\n\t\t\t\t'id' => $i,\r\n\t\t\t\t'name' => preg_replace('~&amp;#(\\\\d{1,7}|x[0-9a-fA-F]{1,6});~', '&#\\\\1;', htmlspecialchars($row['filename'])),\r\n\t\t\t\t'href' => $scripturl . '?action=dlattach;issue=' . $issue . '.0;attach=' . $i,\r\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '?action=dlattach;issue=' . $issue . '.0;attach=' . $i . '\">' . htmlspecialchars($row['filename']) . '</a>',\r\n\t\t\t\t'extension' => $row['fileext'],\r\n\t\t\t\t'downloads' => comma_format($row['downloads']),\r\n\t\t\t\t'poster' => $row['real_name'],\r\n\t\t\t\t'ip' => $row['poster_ip'],\r\n\t\t\t\t'size' => round($row['filesize'] / 1024, 2) . ' ' . $txt['kilobyte'],\r\n\t\t\t\t'byte_size' => $row['filesize'],\r\n\t\t\t\t'is_image' => !empty($row['width']) && !empty($row['height']) && !empty($modSettings['attachmentShowImages']),\r\n\t\t\t\t'is_approved' => $row['approved'],\r\n\t\t\t);\r\n\t\r\n\t\t\tif (!$attachmentData[$i]['is_image'])\r\n\t\t\t\tcontinue;\r\n\t\r\n\t\t\t$attachmentData[$i] += array(\r\n\t\t\t\t'real_width' => $row['width'],\r\n\t\t\t\t'width' => $row['width'],\r\n\t\t\t\t'real_height' => $row['height'],\r\n\t\t\t\t'height' => $row['height'],\r\n\t\t\t);\r\n\t\r\n\t\t\tif (!empty($modSettings['attachmentThumbnails']) && !empty($modSettings['attachmentThumbWidth']) && !empty($modSettings['attachmentThumbHeight']) && ($row['width'] > $modSettings['attachmentThumbWidth'] || $row['height'] > $modSettings['attachmentThumbHeight']) && strlen($row['filename']) < 249)\r\n\t\t\t{\r\n\t\t\t\t// ...\r\n\t\r\n\t\t\t\t$attachmentData[$i]['width'] = $row['thumb_width'];\r\n\t\t\t\t$attachmentData[$i]['height'] = $row['thumb_height'];\r\n\t\t\t}\r\n\t\r\n\t\t\tif (!empty($row['id_thumb']))\r\n\t\t\t\t$attachmentData[$i]['thumbnail'] = array(\r\n\t\t\t\t\t'id' => $row['id_thumb'],\r\n\t\t\t\t\t'href' => $scripturl . '?action=dlattach;issue=' . $issue . '.0;attach=' . $row['id_thumb'] . ';image',\r\n\t\t\t\t);\r\n\t\t\t$attachmentData[$i]['thumbnail']['has_thumb'] = !empty($row['id_thumb']);\r\n\t\r\n\t\t\t// If thumbnails are disabled, check the maximum size of the image.\r\n\t\t\tif (!$attachmentData[$i]['thumbnail']['has_thumb'] && ((!empty($modSettings['max_image_width']) && $row['width'] > $modSettings['max_image_width']) || (!empty($modSettings['max_image_height']) && $row['height'] > $modSettings['max_image_height'])))\r\n\t\t\t{\r\n\t\t\t\tif (!empty($modSettings['max_image_width']) && (empty($modSettings['max_image_height']) || $row['height'] * $modSettings['max_image_width'] / $row['width'] <= $modSettings['max_image_height']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$attachmentData[$i]['width'] = $modSettings['max_image_width'];\r\n\t\t\t\t\t$attachmentData[$i]['height'] = floor($row['height'] * $modSettings['max_image_width'] / $row['width']);\r\n\t\t\t\t}\r\n\t\t\t\telseif (!empty($modSettings['max_image_width']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$attachmentData[$i]['width'] = floor($row['width'] * $modSettings['max_image_height'] / $row['height']);\r\n\t\t\t\t\t$attachmentData[$i]['height'] = $modSettings['max_image_height'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif ($attachmentData[$i]['thumbnail']['has_thumb'])\r\n\t\t\t{\r\n\t\t\t\t// If the image is too large to show inline, make it a popup.\r\n\t\t\t\tif (((!empty($modSettings['max_image_width']) && $attachmentData[$i]['real_width'] > $modSettings['max_image_width']) || (!empty($modSettings['max_image_height']) && $attachmentData[$i]['real_height'] > $modSettings['max_image_height'])))\r\n\t\t\t\t\t$attachmentData[$i]['thumbnail']['javascript'] = 'return reqWin(\\'' . $attachmentData[$i]['href'] . ';image\\', ' . ($row['width'] + 20) . ', ' . ($row['height'] + 20) . ', true);';\r\n\t\t\t\telse\r\n\t\t\t\t\t$attachmentData[$i]['thumbnail']['javascript'] = 'return expandThumb(' . $i . ');';\r\n\t\t\t}\r\n\t\r\n\t\t\tif (!$attachmentData[$i]['thumbnail']['has_thumb'])\r\n\t\t\t\t$attachmentData[$i]['downloads']++;\r\n\t\t}\r\n\t\t$smcFunc['db_free_result']($request);\r\n\t\r\n\t\t$context['attachments'] = &$attachmentData;\r\n\t}", "title": "" }, { "docid": "b66f928433c18200d6e7ba52917221fb", "score": "0.5760288", "text": "abstract protected function manageUploadedFiles();", "title": "" }, { "docid": "145c75d8f43674cfc5aa401e258059f2", "score": "0.575605", "text": "function wpabstracts_manageAttachments($id, $files, $action){\n global $wpdb;\n if($files) {\n foreach($files['attachments']['error'] as $key=>$error) {\n if($error==0) {\n $fileName = $files['attachments']['name'][$key];\n $tmpName = $files['attachments']['tmp_name'][$key];\n $fileSize = $files['attachments']['size'][$key];\n $fileType = $files['attachments']['type'][$key];\n $fileExtension = explode('.',$fileName);\n $fileExt = strtolower($fileExtension[count($fileExtension)-1]);\n $approvedExtensions = explode(',',get_option('wpabstracts_permitted_attachments'));\n // checks for approved extension and file size\n if(in_array($fileExt, $approvedExtensions) and $fileSize<=get_option('wpabstracts_max_attach_size')) {\n $fp = fopen($tmpName, 'r');\n $fileContent = rawurlencode(fread($fp, $fileSize));\n fclose($fp);\n switch ($action){\n case 'insert':\n $wpdb->show_errors();\n $wpdb->query($wpdb->prepare(\"INSERT INTO \".$wpdb->prefix.\"wpabstracts_attachments (abstracts_id,filecontent,filename,filetype,filesize)\n VALUES (%d,%s,%s,%s,%s)\",$id,$fileContent,$fileName,$fileType,$fileSize));\n break;\n }\n } else{\n // return error TODO\n }\n }\n }\n }\n}", "title": "" }, { "docid": "ed2cb7b35611be4bb03f4f0db959de21", "score": "0.5748367", "text": "function handle_leadquotation_attachments($quotationid, $index_name = 'file', $form_activity = false)\n{\n if (isset($_FILES[$index_name]) && empty($_FILES[$index_name]['name']) && $form_activity) {\n return;\n }\n\n if (isset($_FILES[$index_name]) && _perfex_upload_error($_FILES[$index_name]['error'])) {\n header('HTTP/1.0 400 Bad error');\n echo _perfex_upload_error($_FILES[$index_name]['error']);\n die;\n }\n\n $CI =& get_instance();\n if (isset($_FILES[$index_name]['name']) && $_FILES[$index_name]['name'] != '') {\n do_action('before_upload_leadquotation_attachment', $quotationid);\n $path = get_upload_path_by_type('leadquotation') . $quotationid . '/';\n // Get the temp file path\n $tmpFilePath = $_FILES[$index_name]['tmp_name'];\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n if (!_upload_extension_allowed($_FILES[$index_name][\"name\"])) {\n return false;\n }\n\n _maybe_create_upload_path($path);\n\n $filename = unique_filename($path, $_FILES[$index_name][\"name\"]);\n $newFilePath = $path . $filename;\n // Upload the file into the company uploads dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI =& get_instance();\n $CI->load->model('Leadquotation_model');\n $data = array();\n $data[] = array(\n 'file_name' => $filename,\n 'filetype' => $_FILES[$index_name][\"type\"],\n );\n $CI->Leadquotation_model->add_attachment_to_database($quotationid, $data, false, $form_activity);\n\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "d2bcbca1804060b93acc5080542c48e1", "score": "0.574828", "text": "function acf_upload_files($ancestors = array()) {}", "title": "" }, { "docid": "0394681aa734c23ba12ed88c4f0b6b53", "score": "0.5744672", "text": "function getAttachments($input, array $commonAttachments) {\n $attachments = array();\n if (!count($input) && !$commonAttachments) {\n return $attachments;\n }\n\n if (!\\RightNow\\Utils\\Connect::isFileAttachmentType($input)){\n echo $this->reportError(Config::getMessage(FILELISTDISPLAY_DISP_FILE_ATTACH_MSG));\n return $attachments;\n }\n\n // convert connect object to array and merge in common attachments if present\n $input = (array) $input;\n if ($commonAttachments) {\n $input = array_merge(array_values($input), array_values($commonAttachments));\n }\n\n $openInNewWindow = trim(Config::getConfig(EU_FA_NEW_WIN_TYPES));\n $attachmentUrl = '/ci/fattach/get/%s/%s' . Url::sessionParameter() . '/filename/%s';\n $showCreatedTime = Text::beginsWith($this->data['attrs']['name'], 'Incident.');\n foreach ($input as $item) {\n if ($item->Private) {\n continue;\n }\n $item->Target = ($openInNewWindow && preg_match(\"/{$openInNewWindow}/i\", $item->ContentType)) ? '_blank' : '_self';\n $item->Icon = \\RightNow\\Utils\\Framework::getIcon($item->FileName);\n $item->ReadableSize = Text::getReadableFileSize($item->Size);\n $item->AttachmentUrl = sprintf($attachmentUrl, $item->ID, $showCreatedTime ? $item->CreatedTime : 0, urlencode($item->FileName));\n $item->ThumbnailUrl = $item->ThumbnailScreenReaderText = null;\n if($this->data['attrs']['display_thumbnail'] && Text::beginsWith($item->ContentType, 'image')) {\n $fileExtension = pathinfo($item->AttachmentUrl, PATHINFO_EXTENSION);\n $fileExtension = Text::escapeHtml($fileExtension);\n $item->ThumbnailScreenReaderText = sprintf(Config::getMessage(FILE_TYPE_PCT_S_LBL), $fileExtension);\n // ThumbnailUrl may change in the future, but for now is the same as $item->AttachmentUrl\n $item->ThumbnailUrl = $item->AttachmentUrl;\n }\n $attachments[] = $item;\n }\n\n return $attachments;\n }", "title": "" }, { "docid": "d34b0eff0b6adacce782d98c2bb1967a", "score": "0.574237", "text": "abstract protected function sendAttachment($bTest = FALSE);", "title": "" }, { "docid": "aec10e621e970b92259e85ff9c1eb694", "score": "0.5740338", "text": "function _filter_query_attachment_filenames($clauses)\n{\n}", "title": "" }, { "docid": "2e224e5726ce0edf9be34bc7dfbf81c0", "score": "0.5724807", "text": "public function bp_attachments_pre_get_attachment($return, $r){\n // Return if this is a recursive call.\n if(!empty($r['recursive'])){\n return $return;\n }\n\n try {\n $debug_backtrace = \\debug_backtrace(false);\n\n // Making sure we only return GCS link if the type is url.\n if(!empty($debug_backtrace[3]['args'][0]) && $debug_backtrace[3]['args'][0] == 'url'){\n $r['recursive'] = true;\n\n $url = bp_attachments_get_attachment('url', $r);\n $name = apply_filters( 'wp_stateless_file_name', $url);\n\n $root_dir = ud_get_stateless_media()->get( 'sm.root_dir' );\n $root_dir = trim( $root_dir, '/ ' ); // Remove any forward slash and empty space.\n\n if(!empty($name) && $root_dir . \"/\" != $name){\n $full_path = bp_attachments_get_attachment(false, $r);\n do_action( 'sm:sync::syncFile', $name, $full_path, false, array('stateless' => false));\n $return = ud_get_stateless_media()->get_gs_host() . '/' . $name;\n }\n\n }\n } catch (\\Throwable $th) {\n //throw $th;\n }\n\n\n return $return;\n }", "title": "" }, { "docid": "827a0c4483367a97267182cbbf0b8ef7", "score": "0.5718957", "text": "function handleDocmgrAttachments(&$attach,&$msg) {\n if (!$_REQUEST[\"docmgrAttachments\"]) return false;\n\n //our directory for storing the attachments\n $dir = TMP_DIR.\"/\".USER_LOGIN.\"/email\";\n\n //loop through and get our files\n $docarr = explode(\",\",$_REQUEST[\"docmgrAttachments\"]);\n $c = count($attach);\n\n foreach ($docarr AS $docId) \n {\n\n $d = new DOCMGR_OBJECT($docId);\n $info = $d->getInfo();\n $data = $d->getContent();\n\n //log that each one was sent\n logEvent(OBJ_EMAILED,$docId);\n \n //make sure it's not already attached\n if (!checkAttached($attach,$dir.\"/\".$info[\"name\"])) continue;\n\n //if a document, extract content from the xml\n if ($info[\"object_type\"]==\"document\") $info[\"name\"] .= \".html\";\n\n //write the file to our temp directory\n file_put_contents($dir.\"/\".$info[\"name\"],$data);\n\n //add to the attachment array\n $attach[$c][\"path\"] = $dir.\"/\".$info[\"name\"];\n $attach[$c][\"name\"] = $info[\"name\"];\n $c++;\n\n }\n\n}", "title": "" }, { "docid": "6948f2dc6f5d321a23071752d41b4675", "score": "0.5711113", "text": "public function buildHtml()\n {\n // The images will be attached to the email but these will be not\n // showed inline\n $this->setType(Zend_Mime::MULTIPART_RELATED);\n\n $matches = array();\n\n preg_match_all(\"#file://([^'\\\"]+)#i\",\n $this->getBodyHtml(true),\n $matches);\n $matches = array_unique($matches[1]);\n\n if (count($matches ) > 0) {\n foreach ($matches as $key => $filename) {\n if (is_readable($filename)) {\n $at = $this->createAttachment(file_get_contents($filename));\n $at->type = $this->mimeByExtension($filename);\n $at->disposition = Zend_Mime::DISPOSITION_INLINE;\n $at->encoding = Zend_Mime::ENCODING_BASE64;\n $at->id = 'cid_' . md5_file($filename);\n $this->setBodyHtml(str_replace('file://' . $filename,\n 'cid:' . $at->id,\n $this->getBodyHtml(true)),\n 'UTF-8',\n Zend_Mime::ENCODING_8BIT);\n }\n }\n }\n }", "title": "" }, { "docid": "1b33f998b30497dc24bb869d928b44a8", "score": "0.5707825", "text": "public function getAttachments(): array;", "title": "" }, { "docid": "2b630a4bd0caf1b9e4835e81f45e32f3", "score": "0.5676141", "text": "public function GetAttach()\n {\n }", "title": "" }, { "docid": "6d37b48e5a2996b278dee7ac448eb1c9", "score": "0.5663211", "text": "function display_embedded_html_images(&$content, $attachmentParts) {\r\n global $conf;\r\n\r\n foreach ($attachmentParts as $attachmentPart) { //for all attachment parts...\r\n $partStructure = $attachmentPart->getPartStructure();\r\n\r\n if ($partStructure->getInternetMediaType()->isImage() && $partStructure->hasId() && $conf->display_img_attach) { //if embedded image...\r\n $imageType = (string)$attachmentPart->getInternetMediaType();\r\n if (NOCC_Security::isSupportedImageType($imageType)) {\r\n $new_img_src = 'get_img.php?mail=' . $_REQUEST['mail'] . '&amp;num='\r\n . $attachmentPart->getPartNumber() . '&amp;mime=' . $imageType . '&amp;transfer=' . (string)$attachmentPart->getEncoding();\r\n $img_id = 'cid:' . trim($partStructure->getId(), '<>');\r\n $content['body'] = str_replace($img_id, $new_img_src, $content['body']);\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "8fefe4e4045a4f6b9e07ebc1fba10b8f", "score": "0.56631696", "text": "protected function prepare_starter_content_attachments($attachments)\n {\n }", "title": "" }, { "docid": "d19a9b1d46691c9c5ad71f601ff4c3ba", "score": "0.5662222", "text": "function send_raw_email($to, $from, $subject, $body, $attachments = array()) {\n\t//so we use the MD5 algorithm to generate a random hash \n\t$random_hash = md5(date('r', time())); \n\t\n\t//define the headers we want passed. Note that they are separated with \\r\\n \n\t$headers = \"From: $from\\r\\nReply-To: $from\\r\\nSubject: $subject\"; \n\t\n\t//recipients\n\t#$headers .= (is_array($to))? \"\\r\\nTo: \".implode(', ', $to) : $headers = \"\\r\\nTo: $to\";\n\t$to = (is_array($to))? implode(', ', $to) : $to;\n\t\n\t//add boundary string and mime type specification \n\t$headers .= \"\\r\\nContent-Type: multipart/mixed; boundary=\\\"PHP-mixed-\".$random_hash.\"\\\"\"; \n\t\n\t//read the atachment file contents into a string,\n\t//encode it with MIME base64,\n\t//and split it into smaller chunks\n\tforeach($attachments as $file => &$a) {\n\t\t$a = chunk_split(base64_encode($a));\n\t} \n\t\n\t//define the body of the message. \n\tob_start(); //Turn on output buffering\n?> \n--PHP-mixed-<?php echo $random_hash; ?> \nContent-Type: multipart/alternative; boundary=\"PHP-alt-<?php echo $random_hash; ?>\" \n\n<? if(isset($body['text'])): ?>\n--PHP-alt-<?php echo $random_hash; ?> \nContent-Type: text/plain; charset=\"iso-8859-1\" \nContent-Transfer-Encoding: 7bit\n\n<?=$body['text'];?>\n<? endif; ?><? if(isset($body['html'])): ?>\n--PHP-alt-<?php echo $random_hash; ?> \nContent-Type: text/html; charset=\"iso-8859-1\" \nContent-Transfer-Encoding: 7bit\n\n<?=$body['html'];?> \n<? endif; ?>\n--PHP-alt-<?php echo $random_hash; ?>-- \n\n<? foreach($attachments as $file => $attachment): ?><?php $type = (stripos($file, '.htm') !== FALSE)? 'html' : 'plain'; ?>\n--PHP-mixed-<?php echo $random_hash; ?> \nContent-Type: text/<?=$type;?>; name=\"<?=$file;?>\" \nContent-Transfer-Encoding: base64 \nContent-Disposition: attachment \n\n<?php echo $attachment; ?>\n<? endforeach; ?>\n--PHP-mixed-<?php echo $random_hash; ?>-- \n\n<?php\n\t\n\t//copy current buffer contents into $message variable and delete current output buffer \n\t$message = ob_get_clean();\n\t\n\t//send message\n\treturn mail($to, $subject, $message, $headers);\t\n\n}", "title": "" }, { "docid": "05b6a7d5ddc090cad5be0cf3a7a97f1f", "score": "0.5660785", "text": "function wc_prepare_attachment_for_js($response)\n {\n }", "title": "" }, { "docid": "34e25ca257fc1ec6f3e8b9c23906488d", "score": "0.5650721", "text": "public function initAttachmentFiles()\n\t{\n\t\t$this->collAttachmentFiles = array();\n\t}", "title": "" }, { "docid": "8cceb0afaef5c9505b0c34fb5876a4be", "score": "0.56322396", "text": "function _getAttachments($optDry) {\n global $attachmentIDs;\n global $source;\n\n $attachmentDetails = [];\n\n if (empty($attachmentIDs)) {\n return;\n }\n\n $attachmentsList = implode(',', $attachmentIDs);\n $sql = \"\n SELECT *\n FROM civicrm_file\n WHERE id IN ($attachmentsList)\n \";\n $attachments = CRM_Core_DAO::executeQuery($sql);\n\n while ($attachments->fetch()) {\n $attachmentDetails[$attachments->id] = [\n 'file_type_id' => $attachments->file_type_id,\n 'mime_type' => $attachments->mime_type,\n 'uri' => $attachments->uri,\n 'upload_date' => $attachments->upload_date,\n 'source_file_path' => $source['files'].'/'.$source['domain'].'/civicrm/custom/'.$attachments->uri,\n ];\n }\n //bbscript_log(LL::TRACE, '_getAttachments $attachmentDetails', $attachmentDetails);\n $attachments->free();\n\n self::prepareData( ['attachments' => $attachmentDetails], $optDry, '_getAttachments' );\n }", "title": "" }, { "docid": "e4b0b9ac132b0dee4194569e7bbe97a1", "score": "0.56158423", "text": "function mail_send($email_from,$subject,$sendto_email,$html_body,$plain_body,$randpath,$randfile)\r\r\n {\r\r\n \r\r\n $file = \r\r\n $html_mime_mail = new htmlMimeMail();\r\r\n $html_mime_mail->setFrom($email_from);\r\r\n $html_mime_mail->setSubject($subject);\r\r\n $html_mime_mail->setHtml($html_body, $plain_body);\r\r\n if($randpath!='' && $randfile!=''){\r\r\n $html_mime_mail->addAttachment($html_mime_mail->getFile($randpath.$randfile),$randfile);\r\r\n }\r\r\n $success = $html_mime_mail->send(array($sendto_email),'smtp');\r\r\n return $success;\r\r\n \r\r\n }", "title": "" }, { "docid": "06410a97149c711bddfde5aa91adac3e", "score": "0.5611718", "text": "function philosophy_attachments( $attachments ) {\n\n $post_id = null;\n\n if ( isset( $_REQUEST['post'] ) || isset( $_REQUEST['post_ID'] ) ) {\n $post_id = empty( $_REQUEST['post_ID'] ) ? $_REQUEST['post'] : $_REQUEST['post_ID'];\n }\n\n if ( !$post_id || get_post_format( $post_id ) != \"gallery\" ) {\n return;\n }\n $fields = [\n [\n 'name' => 'title', // unique field name\n 'type' => 'text', // registered field type\n 'label' => __( 'Title', 'philosophy' ), // label to display\n 'default' => 'title', // default value upon selection\n ],\n ];\n\n $args = [\n 'label' => 'Gallery',\n 'post_type' => [ 'post' ],\n 'position' => 'normal',\n 'priority' => 'high',\n 'filetype' => [ 'image' ],\n 'append' => true,\n 'button_text' => __( 'Attach Image', 'philosophy' ),\n 'router' => 'browse',\n 'post_parent' => false,\n 'fields' => $fields,\n\n ];\n\n $attachments->register( 'gallery', $args ); // unique instance name\n}", "title": "" }, { "docid": "92e2fc55dc600d44c3e550c6936eaa80", "score": "0.55999583", "text": "public function get_uploaded_header_images()\n {\n }", "title": "" }, { "docid": "2d290510c24300fa4c079f1272089a7e", "score": "0.55832756", "text": "function handleAttachments(&$attach) {\n $files = @scandir(TMP_DIR.\"/\".USER_LOGIN.\"/email\");\n\n //remove directory markers\n array_shift($files);\n array_shift($files);\n \n if (count($files)>0) {\n\n //prepend the directory name to the file\n for ($i=0;$i<count($files);$i++) {\n\n //setup our attachment array using the files in our temp directory\n $attach[$i][\"path\"] = TMP_DIR.\"/\".USER_LOGIN.\"/email/\".$files[$i];\n $attach[$i][\"name\"] = $files[$i];\n \n }\n\n }\n\n}", "title": "" }, { "docid": "59348345e6488c4998f1d04d09a90127", "score": "0.55801266", "text": "function wp_edit_attachments_query($q = \\false)\n{\n}", "title": "" }, { "docid": "805c4300604c1fe4d23e53c4427dcdcb", "score": "0.5578198", "text": "function image_media_send_to_editor($html, $attachment_id, $attachment)\n{\n}", "title": "" }, { "docid": "8edfbb448191701f23b4b27e0d95e7d2", "score": "0.5575319", "text": "function handle_lead_attachments($leadid, $index_name = 'file', $form_activity = false)\n{\n if (isset($_FILES[$index_name]) && empty($_FILES[$index_name]['name']) && $form_activity) {\n return;\n }\n\n if (isset($_FILES[$index_name]) && _perfex_upload_error($_FILES[$index_name]['error'])) {\n header('HTTP/1.0 400 Bad error');\n echo _perfex_upload_error($_FILES[$index_name]['error']);\n die;\n }\n\n $CI =& get_instance();\n if (isset($_FILES[$index_name]['name']) && $_FILES[$index_name]['name'] != '') {\n do_action('before_upload_lead_attachment', $leadid);\n $path = get_upload_path_by_type('lead') . $leadid . '/';\n // Get the temp file path\n $tmpFilePath = $_FILES[$index_name]['tmp_name'];\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n if (!_upload_extension_allowed($_FILES[$index_name][\"name\"])) {\n return false;\n }\n\n _maybe_create_upload_path($path);\n\n $filename = unique_filename($path, $_FILES[$index_name][\"name\"]);\n $newFilePath = $path . $filename;\n // Upload the file into the company uploads dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI =& get_instance();\n $CI->load->model('Lead_model');\n $data = array();\n $data[] = array(\n 'file_name' => $filename,\n 'filetype' => $_FILES[$index_name][\"type\"],\n );\n $CI->Lead_model->add_attachment_to_database($leadid, $data, false, $form_activity);\n\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "f2b31e0a0f8ea7517a97bfd235420936", "score": "0.5571558", "text": "public function testGetFileAttachments()\n {\n }", "title": "" }, { "docid": "f2b31e0a0f8ea7517a97bfd235420936", "score": "0.5571558", "text": "public function testGetFileAttachments()\n {\n }", "title": "" }, { "docid": "d4da1912e79a940892577528e22edb10", "score": "0.55701077", "text": "function vm_handleAttachment($file_handler,$post_id,$set_thu=false) {\n if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false();\n \n require_once(ABSPATH . \"wp-admin\" . '/includes/image.php');\n require_once(ABSPATH . \"wp-admin\" . '/includes/file.php');\n require_once(ABSPATH . \"wp-admin\" . '/includes/media.php');\n require_once(ABSPATH . \"wp-admin\" . '/includes/post.php');\n \n $attach_id = media_handle_upload( $file_handler, $post_id );\n\n // If you want to set a featured image frmo your uploads. \n //if ($set_thu) set_post_thumbnail($post_id, $attach_id);\n\n $filePath = get_attached_file($attach_id);\n //url adresa $filePath = wp_get_attachment_url($attach_id);\n return $filePath;\n }", "title": "" }, { "docid": "97e315a7794a021d6c9f4bb35a9ae3a2", "score": "0.5560257", "text": "public function processIncludes() {}", "title": "" }, { "docid": "925e3d114d08f9550c54d61b711436f5", "score": "0.55595", "text": "function handle_userdocument_attachments($documentid, $index_name = 'file', $form_activity = false)\n{\n if (isset($_FILES[$index_name]) && empty($_FILES[$index_name]['name']) && $form_activity) {\n return;\n }\n\n if (isset($_FILES[$index_name]) && _perfex_upload_error($_FILES[$index_name]['error'])) {\n header('HTTP/1.0 400 Bad error');\n echo _perfex_upload_error($_FILES[$index_name]['error']);\n die;\n }\n\n $CI =& get_instance();\n if (isset($_FILES[$index_name]['name']) && $_FILES[$index_name]['name'] != '') {\n do_action('before_upload_document_attachment', $documentid);\n $path = get_upload_path_by_type('userdocument') . $documentid . '/';\n // Get the temp file path\n $tmpFilePath = $_FILES[$index_name]['tmp_name'];\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n if (!_upload_extension_allowed($_FILES[$index_name][\"name\"])) {\n return false;\n }\n\n _maybe_create_upload_path($path);\n\n $filename = unique_filename($path, $_FILES[$index_name][\"name\"]);\n $newFilePath = $path . $filename;\n // Upload the file into the company uploads dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI =& get_instance();\n $CI->load->model('Document_model');\n $data = array();\n $data[] = array(\n 'file_name' => $filename,\n 'filetype' => $_FILES[$index_name][\"type\"],\n );\n $CI->Document_model->add_attachment_to_database($documentid, $data, false, $form_activity);\n\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "76f28769354adf77fff03259f4e5213b", "score": "0.555349", "text": "function handle_quotation_attachments($quotationid, $index_name = 'file', $form_activity = false)\n{\n if (isset($_FILES[$index_name]) && empty($_FILES[$index_name]['name']) && $form_activity) {\n return;\n }\n\n if (isset($_FILES[$index_name]) && _perfex_upload_error($_FILES[$index_name]['error'])) {\n header('HTTP/1.0 400 Bad error');\n echo _perfex_upload_error($_FILES[$index_name]['error']);\n die;\n }\n\n $CI =& get_instance();\n if (isset($_FILES[$index_name]['name']) && $_FILES[$index_name]['name'] != '') {\n do_action('before_upload_quotation_attachment', $quotationid);\n $path = get_upload_path_by_type('quotation') . $quotationid . '/';\n // Get the temp file path\n $tmpFilePath = $_FILES[$index_name]['tmp_name'];\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n if (!_upload_extension_allowed($_FILES[$index_name][\"name\"])) {\n return false;\n }\n\n _maybe_create_upload_path($path);\n\n $filename = unique_filename($path, $_FILES[$index_name][\"name\"]);\n $newFilePath = $path . $filename;\n // Upload the file into the company uploads dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI =& get_instance();\n $CI->load->model('Quotation_model');\n $data = array();\n $data[] = array(\n 'file_name' => $filename,\n 'filetype' => $_FILES[$index_name][\"type\"],\n );\n $CI->Quotation_model->add_attachment_to_database($quotationid, $data, false, $form_activity);\n\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "aae6d5ec89bf279f68a9765e99b009f2", "score": "0.5540818", "text": "function multi_attach_mail1($to, $files,$files1,$bcc,$cc,$quotation_subject,$dbcon,$msg){\n\t$mailin = new Mailin(\"https://api.sendinblue.com/v2.0\",\"c7JbvKzptTHNLw82\");\n\tif(empty($quotation_subject))\n\t{\n\t\t$quotation_subject=\" Mail From \".TITLE;\n\t}\n\t//var_dump($to);\n\t//var_dump($files1);\n\t$attch=array();\n\tif(0<count($files)){\n\t\tfor($x=0;$x<count($files);$x++){\n\t\t\t$file = fopen(invoice_A.$files[$x],\"rb\");\n\t\t\t$data = fread($file,filesize(invoice_A.$files[$x]));\n\t\t\tfclose($file);\n\t\t\t$data = chunk_split(base64_encode($data));\n\t\t\t$attch[$files[$x]]= $data;\n\t\t}\n\t}\n\t/* if(0<count($files1)){\n\t\tfor($x=0;$x<count($files1);$x++){\n\t\t\t$file = fopen(qut_pdfA.$files1[$x],\"rb\");\n\t\t\t$data = fread($file,filesize(qut_pdfA.$files1[$x]));\n\t\t\tfclose($file);\n\t\t\t$data = chunk_split(base64_encode($data));\n\t\t\t$attch[$files1[$x]]= $data;\n\t\t}\n\t} */\n\t\n\t//var_dump(array($files[0]=>$data,$files[1]=>$data));\n\n\t//exit;\n\t$c='echo //';\n\t$c1='echo //';\n\tif($cc!='')\n\t{\n\t\t$c='';\n\t}\n\tif($bcc!='')\n\t{\n\t\t$c1='';\n\t}\n\t# Define the campaign settings\\\n\t//var_dump($attch);\n\tif($attch){\n\t\t$data = array( \n\t\t\"to\" => array($to=>$to),\n\t\t$c.\"cc\" => array($cc=>$cc),\n\t\t$c1.\"bcc\" => array($bcc=>$bcc),\n\t\t\"from\" => array(ADMIN_EMAIL,ADMIN_EMAIL),\n\t\t\"subject\" => $quotation_subject,\n\t\t\"html\" => $msg,\n\t\t//\"attachment\" => array(\"https://www.metrtechnology.com/img/logo.png\")\n\t\t\"attachment\" => $attch\n\t\t);\n\t}else{\n\t\t$data = array( \n\t\t\"to\" => array($to=>$to),\n\t\t$c.\"cc\" => array($cc=>$cc),\n\t\t$c1.\"bcc\" => array($bcc=>$bcc),\n\t\t\"from\" => array(ADMIN_EMAIL,ADMIN_EMAIL),\n\t\t\"subject\" => $quotation_subject,\n\t\t\"html\" => $msg\n\t\t//\"attachment\" => array(\"https://www.metrtechnology.com/img/logo.png\")\n\t\t//\"attachment\" => $attch\n\t\t);\n\t}\n\t//var_dump($data);\n\t//var_dump($mailin->send_email($data));\n\t$mailin->send_email($data);\n\t\n\tif(0<count($files)){\n\t\tfor($x=0;$x<count($files);$x++){\n\t\t\tunlink(invoice_A.$files[$x]);\n\t\t}\n\t}\n\tunlink($dirname.\"/\".$file);\n\t\n}", "title": "" }, { "docid": "efc1ad36f19a41727ae0807876e25b0d", "score": "0.5540814", "text": "public function retrieve_other_files() \n {\n }", "title": "" }, { "docid": "1fa26ab23c31cc431223915732898352", "score": "0.5535494", "text": "function handle_assignment_attachments($assignmentid, $index_name = 'file', $form_activity = false)\n{\n if (isset($_FILES[$index_name]) && empty($_FILES[$index_name]['name']) && $form_activity) {\n return;\n }\n\n if (isset($_FILES[$index_name]) && _perfex_upload_error($_FILES[$index_name]['error'])) {\n header('HTTP/1.0 400 Bad error');\n echo _perfex_upload_error($_FILES[$index_name]['error']);\n die;\n }\n\n $CI =& get_instance();\n if (isset($_FILES[$index_name]['name']) && $_FILES[$index_name]['name'] != '') {\n do_action('before_upload_assignment_attachment', $assignmentid);\n $path = get_upload_path_by_type('assignment') . $assignmentid . '/';\n // Get the temp file path\n $tmpFilePath = $_FILES[$index_name]['tmp_name'];\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n if (!_upload_extension_allowed($_FILES[$index_name][\"name\"])) {\n return false;\n }\n\n _maybe_create_upload_path($path);\n\n $filename = unique_filename($path, $_FILES[$index_name][\"name\"]);\n $newFilePath = $path . $filename;\n // Upload the file into the company uploads dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI =& get_instance();\n $CI->load->model('Assignment_model');\n $data = array();\n $data[] = array(\n 'file_name' => $filename,\n 'filetype' => $_FILES[$index_name][\"type\"],\n );\n $CI->Assignment_model->add_attachment_to_database($assignmentid, $data, false, $form_activity);\n\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "049fd62a5131c2cc0bb9dfa53d785a06", "score": "0.5534466", "text": "function get_attached_file($attachment_id, $unfiltered = \\false)\n{\n}", "title": "" }, { "docid": "99d9b35c498db25e97887be2836447c4", "score": "0.55313915", "text": "function get_uploaded_header_images()\n{\n}", "title": "" }, { "docid": "2e643748a792dac0b5e3d0338cea1221", "score": "0.55209565", "text": "function clean_attachments()\n\t{\n\t\trequire_once( KERNEL_PATH.'class_upload.php' );\n\t\t\n\t\t$upload = new class_upload();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\t\t\n\t\t$done = 0;\n\t\t$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;\n\t\t$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;\n\t\t$dis = $end + $start;\n\t\t$output = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Pop open the directory and\n\t\t// peek inside...\n\t\t//-----------------------------------------\n\t\t\n\t\t$i = 0;\n\t\t\n\t\t$dh = opendir( $this->ipsclass->vars['upload_dir'] );\n \t\t\n \t\twhile ( false !== ( $file = readdir( $dh ) ) )\n \t\t{\n\t\t\tif ( $file == '.' OR $file == '..' )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t \t\t$fullfile = $this->ipsclass->vars['upload_dir'].'/'.$file;\n\t \t\t\n\t \t\tif( is_dir( $fullfile ) )\n\t \t\t{\n\t\t \t\t$ndh = opendir( $fullfile );\n\t\t \t\t\n\t\t \t\twhile( false !== ( $nfile = readdir( $ndh ) ) )\n\t\t \t\t{\n\t\t\t\t\tif ( $nfile == '.' OR $nfile == '..' )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t \t\t\tif ( strstr( $nfile, 'post-' ) )\n\t\t \t\t\t{\n\t\t \t\t\t\t$i++;\n\t\t \t\t\t\t\n\t\t \t\t\t\t//-----------------------------------------\n\t\t \t\t\t\t// Already started?\n\t\t \t\t\t\t//-----------------------------------------\n\t\t \t\t\t\t\n\t\t \t\t\t\tif ( $start > $i )\n\t\t \t\t\t\t{\n\t\t \t\t\t\t\tcontinue;\n\t\t \t\t\t\t}\n\t\t \t\t\t\t\n\t\t \t\t\t\t//-----------------------------------------\n\t\t \t\t\t\t// Done for this iteration?\n\t\t \t\t\t\t//-----------------------------------------\n\t\t \t\t\t\t\n\t\t \t\t\t\tif ( $i > $dis )\n\t\t \t\t\t\t{\n\t\t \t\t\t\t\tbreak;\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// Try and get attach row\n\t\t \t\t\t\t//-----------------------------------------\n\t\t \t\t\t\t\n\t\t \t\t\t\t$found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => \"attach_location='{$file}/{$nfile}' OR attach_thumb_location='{$file}/{$nfile}'\" ) );\n\t\t \t\t\t\t\n\t\t \t\t\t\tif ( ! $found['attach_id'] )\n\t\t \t\t\t\t{\n\t\t \t\t\t\t\t@unlink( $fullfile . '/' . $nfile );\n\t\t \t\t\t\t\t$output[] = \"<span style='color:red'>Removed orphan: $nfile</span>\";\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$output[] = \"<span style='color:gray'>Attached File OK: $nfile</span>\";\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\tclosedir( $ndh );\n\t\t\t}\n \t\t\telse if ( strstr( $file, 'post-' ) )\n \t\t\t{\n \t\t\t\t$i++;\n \t\t\t\t\n \t\t\t\t//-----------------------------------------\n \t\t\t\t// Already started?\n \t\t\t\t//-----------------------------------------\n \t\t\t\t\n \t\t\t\tif ( $start > $i )\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\t//-----------------------------------------\n \t\t\t\t// Done for this iteration?\n \t\t\t\t//-----------------------------------------\n \t\t\t\t\n \t\t\t\tif ( $i > $dis )\n \t\t\t\t{\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//-----------------------------------------\n \t\t\t\t// Try and get attach row\n \t\t\t\t//-----------------------------------------\n \t\t\t\t\n \t\t\t\t$found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => \"attach_location='$file' OR attach_thumb_location='$file'\" ) );\n \t\t\t\t\n \t\t\t\tif ( ! $found['attach_id'] )\n \t\t\t\t{\n \t\t\t\t\t@unlink( $fullfile );\n \t\t\t\t\t$output[] = \"<span style='color:red'>Removed orphan: $file</span>\";\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\t$output[] = \"<span style='color:gray'>Attached File OK: $file</span>\";\n \t\t\t\t}\n\t\t\t}\n \t\t}\n \t\t\n \t\tclosedir( $dh );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish - or more?...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $i < $dis)\n\t\t{\n\t\t \t//-----------------------------------------\n\t\t\t// Done..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$text = \"<b>Rebuild completed</b><br />\".implode( \"<br />\", $output );\n\t\t\t$url = \"{$this->ipsclass->form_code}\";\n\t\t\t$time = 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// More..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$text = \"<b>Up to $dis processed so far, continuing...</b><br />\".implode( \"<br />\", $output );\n\t\t\t$url = \"{$this->ipsclass->form_code}&code=\".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;\n\t\t\t$time = 0;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Bye....\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->redirect( $url, $text, 0, $time );\n\t}", "title": "" }, { "docid": "3ad05608be2470fa1730dfaf986b4e01", "score": "0.5516841", "text": "function handle_customerdocument_attachments($documentid, $index_name = 'file', $form_activity = false)\n{\n if (isset($_FILES[$index_name]) && empty($_FILES[$index_name]['name']) && $form_activity) {\n return;\n }\n\n if (isset($_FILES[$index_name]) && _perfex_upload_error($_FILES[$index_name]['error'])) {\n header('HTTP/1.0 400 Bad error');\n echo _perfex_upload_error($_FILES[$index_name]['error']);\n die;\n }\n\n $CI =& get_instance();\n if (isset($_FILES[$index_name]['name']) && $_FILES[$index_name]['name'] != '') {\n do_action('before_upload_customerdocument_attachment', $documentid);\n $path = get_upload_path_by_type('customerdocument') . $documentid . '/';\n // Get the temp file path\n $tmpFilePath = $_FILES[$index_name]['tmp_name'];\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n if (!_upload_extension_allowed($_FILES[$index_name][\"name\"])) {\n return false;\n }\n\n _maybe_create_upload_path($path);\n\n $filename = unique_filename($path, $_FILES[$index_name][\"name\"]);\n $newFilePath = $path . $filename;\n // Upload the file into the company uploads dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI =& get_instance();\n $CI->load->model('Document_model');\n $data = array();\n $data[] = array(\n 'file_name' => $filename,\n 'filetype' => $_FILES[$index_name][\"type\"],\n );\n $CI->Document_model->add_attachment_to_database($documentid, $data, false, $form_activity);\n\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "a23e1aa59bb7967a0a79950cb5140aaf", "score": "0.55075383", "text": "abstract protected function getXmlAttachmentFilename(): string;", "title": "" }, { "docid": "59052082aeec34f02890be4b2d5c176b", "score": "0.5492598", "text": "public function handleAttachments() {\n $this->setPlaceholder('max_attachments',$this->modx->getOption('discuss.attachments_max_per_post',null,5));\n if ($this->thread->canPostAttachments()) {\n $this->setPlaceholder('attachment_fields',$this->discuss->getChunk('post/disAttachmentFields',$this->getPlaceholders()));\n } else {\n $this->setPlaceholder('attachment_fields','');\n }\n $this->modx->regClientHTMLBlock('<script type=\"text/javascript\">\n DIS.config.attachments_max_per_post = '.$this->getPlaceholder('max_attachments').';\n </script>');\n }", "title": "" }, { "docid": "3d54911bad239c999220416ee8a7b243", "score": "0.5479388", "text": "function wrapImagesInline($htmlContent) {\n\tglobal $_INLINED_IMAGES;\n\t$_INLINED_IMAGES = null;\n\t\n\t$replacedContent = imageRewriter($htmlContent, 'wrapImagesInline_rewriter($URL)');\n\t\n\t\n\t// Make the HTML part\n\t$headers[\"Content-Type\"] = \"text/html; charset=\\\"utf-8\\\"\";\n\t$headers[\"Content-Transfer-Encoding\"] = \"quoted-printable\";\n\t$multiparts[] = processHeaders($headers, QuotedPrintable_encode($replacedContent));\n\t\n\t// Make all the image parts\t\t\n\tglobal $_INLINED_IMAGES;\n\tforeach($_INLINED_IMAGES as $url => $cid) {\n\t\t$multiparts[] = encodeFileForEmail($url, false, \"inline\", \"Content-ID: <$cid>\\n\");\t\t\n\t}\n\n\t// Merge together in a multipart\n\tlist($body, $headers) = encodeMultipart($multiparts, \"multipart/related\");\n\treturn processHeaders($headers, $body);\n}", "title": "" }, { "docid": "aebcf06425383db744688976e66d3313", "score": "0.546894", "text": "public function attachments(): array\n {\n return [];\n }", "title": "" }, { "docid": "d19e5a8e92225b921ffdab2bf76bf6b9", "score": "0.54657644", "text": "function handle_contract_attachment($id)\n{\n if (isset($_FILES['file']) && _perfex_upload_error($_FILES['file']['error'])) {\n header('HTTP/1.0 400 Bad error');\n echo _perfex_upload_error($_FILES['file']['error']);\n die;\n }\n if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != '') {\n do_action('before_upload_contract_attachment', $id);\n $path = get_upload_path_by_type('contract') . $id . '/';\n // Get the temp file path\n $tmpFilePath = $_FILES['file']['tmp_name'];\n // Make sure we have a filepath\n if (!empty($tmpFilePath) && $tmpFilePath != '') {\n _maybe_create_upload_path($path);\n $filename = unique_filename($path, $_FILES[\"file\"][\"name\"]);\n $newFilePath = $path . $filename;\n // Upload the file into the company uploads dir\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\n $CI =& get_instance();\n $attachment = array();\n $attachment[] = array(\n 'file_name'=>$filename,\n 'filetype'=>$_FILES[\"file\"][\"type\"],\n );\n $CI->misc_model->add_attachment_to_database($id, 'contract', $attachment);\n\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "318f123a701b7407a053a94fb38d0bfb", "score": "0.5461719", "text": "function the_attachment_links($id = \\false)\n{\n}", "title": "" }, { "docid": "354d5ed18a076f8434242d72834b39ab", "score": "0.54611176", "text": "function attachFile($contactID, $fileType){\r\n\t\t\r\n\t\tglobal $file_upload_folder;\r\n\t\t\r\n\t\t//extensions that can be uploaded\r\n\t\t$allowed_ext = 'jpg,gif,png,pdf,doc,docx,txt,zip,mp3,jpeg,xls,xlsx,ppt,pptx';\t\r\n\t\t\r\n\t\t// important file variables\r\n\t\t$userfile_name = $_FILES['userfile']['name'];\r\n\t\t$userfile_size = $_FILES['userfile']['size'];\r\n\t\t$userfile_type = $_FILES['userfile']['type'];\r\n\t\t$userfile_error = $_FILES['userfile']['error'];\r\n\t\t$userfile_tmp_name = $_FILES['userfile']['tmp_name'];\r\n\t\t$max_file_size = $_POST['MAX_FILE_SIZE'];\r\n\t\t// get issue id\r\n\t\t$query = \"SELECT `Issue` FROM `contacts` WHERE ID='$contactID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$result = mysql_fetch_array($result);\t\r\n\t\t$issueID = $result['Issue'];\r\n\t\t\r\n\t\tif( $this->userCanAttachFile($sessionID, $issueID)){\r\n\t\t\r\n\t\t\t// test link\r\n\t\t\tif(empty($this->link)){\r\n\t\t\t\techo \"Not connected to database You must instantiate the DataAccessManager before performing\r\n\t\t\t\t\tdatabase accesses.\";\r\n\t\t\t\texit;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// begin hack to generate attachment id\r\n\t\t\t$IDs = array();\r\n\t\t\t$ID = date('m').date('d').date('Y').'-';\r\n\t\t\t$result = mysql_query(\"SELECT * FROM attachments WHERE ID like '%$ID%'\");\r\n\t\t\tfor($i=0; $results = mysql_fetch_assoc($result); $i++){\r\n\t\t\t\t$IDs[$i] = $results['ID'];\r\n\t\t\t}\r\n\t\t\t$idnumber = mysql_num_rows($result) + 1;\r\n\t\t\twhile(in_array('A'.$ID.$idnumber, $IDs)){\r\n\t\t\t\t$idnumber++;\r\n\t\t\t}\r\n\t\t\t$ID ='A'.$ID.$idnumber;\r\n\t\t\t// end hack to generate id\r\n\t\t\t\r\n\t\t\t// get extension\r\n\t\t\t$extension = pathinfo($userfile_name);\r\n\t\t\t$extension = $extension[extension];\r\n\t\t\t$extension = strtolower($extension);\r\n\t\t\r\n\t\t\t// check entension\r\n\t\t\t$allowed_paths = explode(',', $allowed_ext);\r\n\t\t\tfor($i = 0; $i < count($allowed_paths); $i++){\r\n\t\t\t\tif ($allowed_paths[$i] == $extension){\r\n\t\t\t\t\t$ok = '1';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($ok != '1') {\r\n\t\t\t\tprint '<font color=\"red\">Sorry, incorrect file type. File extension must be one of: '.$allowed_ext.'</font>';\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// do the upload\r\n\t\t\tmkdir(\"$file_upload_folder$ID\");\r\n\t\t\tif(move_uploaded_file($userfile_tmp_name, \"$file_upload_folder$ID/$userfile_name\")) {\r\n\t\t\t\t// send queries to update 'attachments' table\r\n\t\t\t\t$query = \"insert into `attachments` (id, extension, alias, contactid, admissionsfile)\r\n\t\t\t\t\tvalues ('$ID','$extension','$userfile_name', '$contactID', '$fileType')\";\r\n\t\t\t\tmysql_query($query);\t\t\r\n\r\n\t\r\n\t\t\t\treturn $ID;\r\n\t\t\t} \r\n\t\t\telse{\r\n\t\t\t\tswitch ($userfile_error){\r\n\t\t\t \tcase 1:\r\n\t\t\t\t\tprint '<font color=\"red\">Error: The file is bigger than this PHP installation allows.</font>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tprint '<font color=\"red\">Error: File must be no greater than '.($max_file_size / 1000).' KB.</font>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tprint '<font color=\"red\">Error: Only part of the file was uploaded - please try again.</font>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tprint '<font color=\"red\">Error: No file was uploaded.</font>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tprint '<font color=\"red\">Unknown error - please retry.</font>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t \r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\techo 'Permission to attach files denied.';\r\n\t\treturn false; // user doesn't have permission\r\n\t}", "title": "" }, { "docid": "89ee53e04b55cb9cd51602a519725981", "score": "0.5460101", "text": "public function getAttach_file()\n {\n return $this->attach_file;\n }", "title": "" }, { "docid": "a1f013e306863dcbb7166d4853e6ad32", "score": "0.5459703", "text": "static function list_attachments( $atts = array() ) {\r\n global $post, $wp_query;\r\n\r\n $r = '';\r\n\r\n if ( !is_array( $atts ) ) {\r\n $atts = array();\r\n }\r\n\r\n $atts = array_merge( array(\r\n 'type' => NULL,\r\n 'orderby' => NULL,\r\n 'groupby' => NULL,\r\n 'order' => NULL,\r\n 'post_id' => false,\r\n 'before_list' => '',\r\n 'after_list' => '',\r\n 'opening' => '<ul class=\"attachment-list flawless_attachment_list\">',\r\n 'closing' => '</ul>',\r\n 'before_item' => '<li>',\r\n 'after_item' => '</li>',\r\n 'show_descriptions' => true,\r\n 'include_icon_classes' => true,\r\n 'showsize' => false\r\n ), $atts );\r\n\r\n if ( isset( $atts[ 'post_id' ] ) && is_numeric( $atts[ 'post_id' ] ) ) {\r\n $post = get_post( $atts[ 'post_id' ] );\r\n }\r\n\r\n if ( !$post ) {\r\n return;\r\n }\r\n\r\n if ( !empty( $atts[ 'type' ] ) ) {\r\n $types = explode( ',', str_replace( ' ', '', $atts[ 'type' ] ) );\r\n } else {\r\n $types = array();\r\n }\r\n\r\n $showsize = ( $atts[ 'showsize' ] == true || $atts[ 'showsize' ] == 'true' || $atts[ 'showsize' ] == 1 ) ? true : false;\r\n $upload_dir = wp_upload_dir();\r\n\r\n $op = clone $post;\r\n $oq = clone $wp_query;\r\n\r\n foreach ( array( 'before_list', 'after_list', 'opening', 'closing', 'before_item', 'after_item' ) as $htmlItem ) {\r\n $atts[ $htmlItem ] = str_replace( array( '&lt;', '&gt;' ), array( '<', '>' ), $atts[ $htmlItem ] );\r\n }\r\n\r\n $args = array(\r\n 'post_type' => 'attachment',\r\n 'numberposts' => -1,\r\n 'post_status' => null,\r\n 'post_parent' => $post->ID,\r\n );\r\n\r\n if ( !empty( $atts[ 'orderby' ] ) ) {\r\n $args[ 'orderby' ] = $atts[ 'orderby' ];\r\n }\r\n if ( !empty( $atts[ 'order' ] ) ) {\r\n $atts[ 'order' ] = ( in_array( $atts[ 'order' ], array( 'a', 'asc', 'ascending' ) ) ) ? 'asc' : 'desc';\r\n $args[ 'order' ] = $atts[ 'order' ];\r\n }\r\n if ( !empty( $atts[ 'groupby' ] ) ) {\r\n $args[ 'orderby' ] = $atts[ 'groupby' ];\r\n }\r\n\r\n $attachments = get_posts( $args );\r\n\r\n if ( $attachments ) {\r\n $grouper = $atts[ 'groupby' ];\r\n $test = $attachments;\r\n $test = array_shift( $test );\r\n if ( !property_exists( $test, $grouper ) ) {\r\n $grouper = 'post_' . $grouper;\r\n }\r\n\r\n $attlist = array();\r\n\r\n foreach ( $attachments as $att ) {\r\n $key = ( !empty( $atts[ 'groupby' ] ) ) ? $att->$grouper : $att->ID;\r\n $key .= ( !empty( $atts[ 'orderby' ] ) ) ? $att->$atts[ 'orderby' ] : '';\r\n\r\n $attlink = wp_get_attachment_url( $att->ID );\r\n\r\n if ( count( $types ) ) {\r\n foreach ( $types as $t ) {\r\n if ( substr( $attlink, ( 0 - strlen( '.' . $t ) ) ) == '.' . $t ) {\r\n $attlist[ $key ] = clone $att;\r\n $attlist[ $key ]->attlink = $attlink;\r\n }\r\n }\r\n } else {\r\n $attlist[ $key ] = clone $att;\r\n $attlist[ $key ]->attlink = $attlink;\r\n }\r\n }\r\n if ( $atts[ 'groupby' ] ) {\r\n if ( $atts[ 'order' ] == 'asc' ) {\r\n ksort( $attlist );\r\n } else {\r\n krsort( $attlist );\r\n }\r\n }\r\n }\r\n\r\n if ( count( $attlist ) ) {\r\n $open = false;\r\n $r = $atts[ 'before_list' ] . $atts[ 'opening' ];\r\n foreach ( $attlist as $att ) {\r\n\r\n $container_classes = array( 'attachment_container' );\r\n\r\n //** Determine class to display for this file type */\r\n if ( $atts[ 'include_icon_classes' ] ) {\r\n\r\n switch ( $att->post_mime_type ) {\r\n\r\n case 'application/zip':\r\n $class = 'zip';\r\n break;\r\n\r\n case 'vnd.ms-excel':\r\n $class = 'excel';\r\n break;\r\n\r\n case 'image/jpeg':\r\n case 'image/png':\r\n case 'image/gif':\r\n case 'image/bmp':\r\n $class = 'image';\r\n break;\r\n\r\n default:\r\n $class = 'default';\r\n break;\r\n }\r\n }\r\n\r\n $icon_class = ( $class ? 'flawless_attachment_icon file-' . $class : false );\r\n\r\n //** Determine if description shuold be displayed, and if it is not empty */\r\n $echo_description = ( $atts[ 'show_descriptions' ] && !empty( $att->post_content ) ? ' <span class=\"attachment_description\"> ' . $att->post_content . ' </span> ' : false );\r\n\r\n $echo_title = ( $att->post_excerpt ? $att->post_excerpt : __( 'View ', 'flawless' ) . apply_filters( 'the_title_attribute', $att->post_title ) );\r\n\r\n if ( $icon_class ) {\r\n $container_classes[ ] = 'has_icon';\r\n }\r\n\r\n if ( !empty( $echo_description ) ) {\r\n $container_classes[ ] = 'has_description';\r\n }\r\n\r\n //** Add conditional classes if class is not already passed into container */\r\n if ( !strpos( $atts[ 'before_item' ], 'class' ) ) {\r\n $this_before_item = str_replace( '>', ' class=\"' . implode( ' ', $container_classes ) . '\">', $atts[ 'before_item' ] );\r\n }\r\n\r\n $echo_size = ( ( $showsize ) ? ' <span class=\"attachment-size\">' . WPP_F::get_filesize( str_replace( $upload_dir[ 'baseurl' ], $upload_dir[ 'basedir' ], $attlink ) ) . '</span>' : '' );\r\n\r\n if ( !empty( $atts[ 'groupby' ] ) && $current_group != $att->$grouper ) {\r\n if ( $open ) {\r\n $r .= $atts[ 'closing' ] . $atts[ 'after_item' ];\r\n $open = false;\r\n }\r\n $r .= $atts[ 'before_item' ] . '<h3>' . $att->$grouper . '</h3>' . $atts[ 'opening' ];\r\n $open = true;\r\n $current_group = $att->$grouper;\r\n }\r\n $attlink = $att->attlink;\r\n $r .= $this_before_item . '<a href=\"' . $attlink . '\" title=\"' . $echo_title . '\" class=\"flawless_attachment ' . $icon_class . '\">' . apply_filters( 'the_title', $att->post_title ) . '</a>' . $echo_size . $echo_description . $atts[ 'after_item' ];\r\n }\r\n if ( $open ) {\r\n $r .= $atts[ 'closing' ] . $atts[ 'after_item' ];\r\n }\r\n $r .= $atts[ 'closing' ] . $atts[ 'after_list' ];\r\n }\r\n\r\n $wp_query = clone $oq;\r\n $post = clone $op;\r\n\r\n return $r;\r\n\r\n }", "title": "" }, { "docid": "6ea3a31cf9883adcb357b15f535e3357", "score": "0.5459436", "text": "function addAttachment($name, $pathToAttachment, $mimeType='application/unknown') \n { \n $file_content = file_get_contents($pathToAttachment); \n \n if($file_content === false) \n return false; \n \n $attachment = base64_encode($file_content); \n $attachment = chunk_split($attachment); \n \n $attachmentContent = \"Content-type: {$mimeType}; name={$name}\\nContent-disposition: attachment; filename={$name}\\nContent-transfer-encoding: base64\\n\\n{$attachment}\"; \n \n $this->attachment[] = trim($attachmentContent); \n return true; \n }", "title": "" }, { "docid": "5ee38ce803b34cd8633446b8276f29aa", "score": "0.54588187", "text": "function _form_attachments()\n\t{\n\t\t$template = $this->_load_element('form_attachment_rows');\n\t\n\t\t$str = '';\n\t\t$kbs = 0;\n\t\tforeach ($this->attachments as $id)\n\t\t{\t\n\t\t\t$query = $this->EE->db->query(\"SELECT filename, filesize, extension FROM exp_forum_attachments WHERE attachment_id = '{$id}'\");\n\t\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\tforeach ($query->result_array() as $row)\n\t\t\t\t{\n\t\t\t\t\t$temp = $template;\n\t\t\t\t\t$temp = str_replace('{attachment_name}',\t$row['filename'], $temp);\n\t\t\t\t\t$temp = str_replace('{attachment_size}',\t$row['filesize'].' KB', $temp);\n\t\t\t\t\t$temp = str_replace('{attachment_id}',\t\t$id, $temp);\n\t\t\t\t\t$str .= $temp;\n\t\t\t\t\t\n\t\t\t\t\t$kbs += $row['filesize'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$size = ($this->_fetch_pref('board_max_attach_size') - $kbs);\n\t\n\t\treturn $this->_var_swap($this->_load_element('form_attachments'), \n\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t\t'lang:remaining_space' \t\t\t=> str_replace('%x', $size.' KB', $this->EE->lang->line('remaining_space')),\n\t\t\t\t\t\t\t\t\t\t'lang:total_attach_allowed'\t\t=> $this->EE->lang->line('total_attach_allowed').'&nbsp;'.$this->_fetch_pref('board_max_attach_perpost'),\n\t\t\t\t\t\t\t\t\t\t'include:form_attachment_rows'\t=> $str\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\t\t\n\t}", "title": "" }, { "docid": "fb12d278ac04f2e0a02bbcf11ffbb244", "score": "0.5456954", "text": "private function includes() {\n\t\t}", "title": "" }, { "docid": "4f70ea4a3e7e78477e220c3a6d209f39", "score": "0.5452712", "text": "private function setAttachmentData()\n {\n $attachments = [];\n foreach($this->getAttachments() as $attachment){\n $attachments[] = [\n 'content' => base64_encode(file_get_contents($attachment['file']->getRealPath())),\n 'name' => $attachment['name'],\n 'type' => $attachment['type']\n ];\n }\n return $attachments;\n }", "title": "" }, { "docid": "69f13d9464309c7bdd5079f539619f70", "score": "0.545104", "text": "function wp_prepare_attachment_for_js($attachment)\n{\n}", "title": "" }, { "docid": "be490ee63b27a8794a4ffdf0502ef057", "score": "0.5442592", "text": "public function getHasAttachments()\n {\n if (array_key_exists(\"hasAttachments\", $this->_propDict)) {\n return $this->_propDict[\"hasAttachments\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "bcab778e88231b1c4b4d3783fa29f270", "score": "0.54421896", "text": "function get_okrs_attachment($id){\n $CI = & get_instance();\n $CI->db->where('rel_id',$id);\n $CI->db->where('rel_type','attachments');\n return $CI->db->get(db_prefix().'files')->result_array();\n}", "title": "" }, { "docid": "0597e724b9e91de1fb1cdeaee0abc020", "score": "0.5438999", "text": "public function readAttachments() {\n\t\tif (MODULE_ATTACHMENT == 1 && !empty($this->attachmentObjectIDs)) {\n\t\t\t$this->attachmentList = new GroupedAttachmentList('com.woltlab.wcf.conversation.message');\n\t\t\t$this->attachmentList->getConditionBuilder()->add('attachment.objectID IN (?)', [$this->attachmentObjectIDs]);\n\t\t\t$this->attachmentList->readObjects();\n\t\t}\n\t}", "title": "" }, { "docid": "fe84f5f3aa258f6a15bec685e6f3ee5d", "score": "0.5438327", "text": "function change_user_notification_attachments( $notification, $form, $entry ) {\n if($notification[\"name\"] == \"Online employment application\"){\n\n $fileupload_fields = GFCommon::get_fields_by_type($form, array(\"fileupload\"));\n\n if(!is_array($fileupload_fields))\n return $notification;\n\n $attachments = array();\n $upload_root = RGFormsModel::get_upload_root();\n foreach($fileupload_fields as $field){\n $url = $entry[$field[\"id\"]];\n $attachment = preg_replace('|^(.*?)/gravity_forms/|', $upload_root, $url);\n if($attachment){\n $attachments[] = $attachment;\n }\n }\n\n $notification[\"attachments\"] = $attachments;\n\n }\n\n return $notification;\n}", "title": "" }, { "docid": "4ea1b931010d12003b2f9259b494305a", "score": "0.5422481", "text": "function hasAttachment(){\n\t\t$real_path = BASE_PATH.DIRECTORY_SEPARATOR.\"uploads\".DIRECTORY_SEPARATOR.\"users\".DIRECTORY_SEPARATOR.\"user_\";\n\t\t$real_path = $real_path.$this->getUserID().DIRECTORY_SEPARATOR.\"benefits\".DIRECTORY_SEPARATOR.$this->getFilename();\n\t\t// debugMessage($real_path);\n\t\tif(file_exists($real_path) && !isEmptyString($this->getFilename())){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d59782611cfe3b180dd55d904025cc67", "score": "0.5414652", "text": "function get_attached_content_objects_as_html()\n {\n $object = $this->get_content_object();\n if ($object instanceof AttachmentSupport)\n {\n $attachments = $object->get_attached_content_objects();\n if (count($attachments))\n {\n /*$html = array();\n $html[] = '<div class=\"attachments\" style=\"margin-top: 1em;\">';\n $html[] = '<div class=\"attachments_title\">'.htmlentities(Translation :: get('Attachments')).'</div>';\n $html[] = '<ul class=\"attachments_list\">';\n Utilities :: order_content_objects_by_title($attachments);\n foreach ($attachments as $attachment)\n {\n $disp = self :: factory($attachment);\n $html[] = '<li><img src=\"'.Theme :: get_common_image_path().'treemenu_types/'.$attachment->get_type().'.png\" alt=\"'.htmlentities(Translation :: get('TypeName', null, ContentObject :: get_content_object_type_namespace($attachment->get_type()))).'\"/> '.$disp->get_short_html().'</li>';\n }\n $html[] = '</ul>';\n $html[] = '</div>';\n return implode(\"\\n\", $html);*/\n\n //$html[] = '<h4>Attachments</h4>';\n $html[] = '<div class=\"attachments\" style=\"margin-top: 1em;\">';\n $html[] = '<div class=\"attachments_title\">' . htmlentities(Translation :: get('Attachments')) . '</div>';\n Utilities :: order_content_objects_by_title($attachments);\n $html[] = '<ul class=\"attachments_list\">';\n foreach ($attachments as $attachment)\n {\n $url = Path :: get_launcher_application_path(true) . 'index.php?' . Application :: PARAM_APPLICATION . '=attachment_viewer&' . RepositoryManager :: PARAM_CONTENT_OBJECT_ID . '=' . $attachment->get_id();\n $url = 'javascript:openPopup(\\'' . $url . '\\'); return false;';\n $html[] = '<li><a href=\"#\" onClick=\"' . $url . '\"><img src=\"' . Theme :: get_image_path(ContentObject :: get_content_object_type_namespace($attachment->get_type())) . 'logo/' . Theme :: ICON_MINI . '.png\" alt=\"' . htmlentities(Translation :: get('TypeName', null, ContentObject :: get_content_object_type_namespace($attachment->get_type()))) . '\"/> ' . $attachment->get_title() . '</a></li>';\n }\n $html[] = '</ul>';\n $html[] = '</div>';\n return implode(\"\\n\", $html);\n }\n }\n return '';\n }", "title": "" }, { "docid": "67cf445a6f439198289b8dbb3ca2c513", "score": "0.5413444", "text": "public function getAttachments()\n {\n if (array_key_exists(\"attachments\", $this->_propDict)) {\n return $this->_propDict[\"attachments\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "67cf445a6f439198289b8dbb3ca2c513", "score": "0.5413444", "text": "public function getAttachments()\n {\n if (array_key_exists(\"attachments\", $this->_propDict)) {\n return $this->_propDict[\"attachments\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "6a261bce34cc0f0222c2dd1732d8bf63", "score": "0.5408296", "text": "function makeEmail($email_from='', $name_from='', $html='')\n {\n if (empty($email_from))\n $email_from = ' ';\n\n if (empty($name_from))\n $name_from = $email_from;\n\n $imageFiles = getImageFiles($html);\n\n if (mb_strtolower(mb_substr(PHP_OS,0,3))=='win')\n $eol=\"\\r\\n\";\n elseif (mb_strtolower(mb_substr(PHP_OS,0,3))=='mac')\n $eol=\"\\r\";\n else\n $eol=\"\\n\";\n\n\n if (mb_strlen(Text::stripTags($html))==mb_strlen($html))\n $html = str_replace($eol, '<br />',$html);\n $html = preg_replace(\"#(?<!\\r)\\n#siu\", \"\\r\\n\", $html);\n $uId = mb_strtolower(uniqid(time()));\n $charset = 'utf-8';\n\n $eheader = '';\n $eheader .= 'X-Priority: 3'.$eol;\n $eheader .= 'X-MSMail-Priority: Normal'.$eol;\n $eheader .= 'X-Mailer: PHP v'.phpversion().$eol;\n $eheader .= 'From: '.headerEncode($name_from, $charset).' <'.$email_from.'>'.$eol;\n $eheader .= 'Return-path: <'.$email_from.'>'.$eol;\n $eheader .= 'Reply-To: '.headerEncode($name_from, $charset).' <'.$email_from.'>'.$eol;\n $eheader .= 'Mime-Version: 1.0'.$eol;\n $eheader .= 'Content-Type: multipart/related'.$eol; # If you use multipart/mixed - then all files wiil be shown in the bottom of the letter as attached (attachment)\n $eheader .= 'boundary=----------'.$uId.$eol.$eol;\n \n $ebody = '------------'.$uId.$eol;\n $ebody .= 'Content-Type:text/html; charset='.$charset.$eol;\n $ebody .= 'Content-Transfer-Encoding: 8bit'.$eol.$eol.$html.$eol.$eol;\n\n if ($imageFiles)\n {\n if (is_array($imageFiles)) {\n foreach($imageFiles as $k=>$v)\n $files[$k] = $v;\n } else { # if a single file is attached\n $files[] = $imageFiles;\n }\n \n $imageMimeTypes = [\n 'jpg'=>'image/jpeg',\n 'jpeg'=>'image/jpeg',\n 'gif'=>'image/gif',\n 'png'=>'image/png'\n ];\n\n\n foreach($files as $k=>$v)\n {\n $mime = 'application/octet-stream';\n $content = null;\n if (is_array($v)) {\n if ($v['src'] && $v['content']) {\n $ex = array_reverse(explode('.', $v['src']));\n if ($ex['0'] && $ex['1'] && $imageMimeTypes[ $ex['0'] ]) {\n $mime = $imageMimeTypes[ $ex['0'] ];\n $file_name = $ex['1'].'.'.$ex['0'];\n $content = $v['content']; # Get the content of a file to be attached\n }\n }\n } else {\n $lines = explode($eol, $v);\n if (count($lines)>1) {\n $file_name = $k;\n $content = $v;\n } else {\n $ex_name = array_reverse(explode('/', $v));\n $file_name = Text::stripTags($ex_name['0'],'strip-quotes');\n $content = file_get_contents($v); # Get the content of a file to be attached\n }\n }\n\n if ($content) {\n # Build the header\n $ebody .= \"------------\".$uId.\"\\n\";\n $ebody .= \"Content-Type: \".$mime.\"; \";\n $ebody .= \"name=\\\"\".basename($file_name).\"\\\"\\n\";\n if ($v['src']) {\n $ebody .= \"Content-Location: \".$v['src'].\"\\n\";\n $ebody .= \"Content-Transfer-Encoding:base64\\n\\n\";\n } else {\n $ebody .= \"Content-Transfer-Encoding:base64\\n\";\n $ebody .= \"Content-Disposition:attachment;\";\n $ebody .= \"filename=\\\"\".basename($file_name).\"\\\"\\n\\n\";\n }\n $ebody .= chunk_split(base64_encode($content)).\"\\n\";\n }\n }\n }\n return ['body'=>$ebody, 'header'=>$eheader];\n }", "title": "" }, { "docid": "04b5b6ade0888d04981a54c2f1e7ea00", "score": "0.54040533", "text": "public function getFileUploads();", "title": "" }, { "docid": "fb00fc06d197f40931b65693da878859", "score": "0.5401851", "text": "function viewAttachedFiles($sessionID, $contactID){\r\n\t\tif( $this->userCanViewFiles( $sessionID, $contactID )){\r\n\t\t\t$query = \"SELECT * FROM `attachments` WHERE `contactid` = '$contactID'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\tfor($i=0; $results = mysql_fetch_array($result); $i++){\r\n\t\t\t\t$IDs[$i]=$results['ID'];\r\n\t\t\t}\r\n\t\t\tif(empty($IDs)) return;\r\n\t\t\telse return $IDs;\t\t\r\n\t\t}\r\n\t\t//echo 'permission denied to view files';\r\n\t}", "title": "" }, { "docid": "b35c2d61132f337a5c5edf022ee5c24b", "score": "0.540161", "text": "function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)\r\n{\r\n\tglobal $message_parser, $_CLASS;\r\n\r\n\t$message_parser->attachment_data = array();\r\n\r\n\t$message_parser->filename_data['filecomment'] = '';\r\n\t$message_parser->filename_data['filename'] = $upload_dir . '/' . $filename;\r\n\r\n\t$filedata = upload_attachment('local', $forum_id, true, $upload_dir . '/' . basename($filename));\r\n\r\n\tif ($filedata['post_attach'] && !sizeof($filedata['error']))\r\n\t{\r\n\t\t$message_parser->attachment_data = array(\r\n\t\t\t'post_msg_id'\t\t=> $post_id,\r\n\t\t\t'poster_id'\t\t\t=> $_CLASS['core_user']->data['user_id'],\r\n\t\t\t'topic_id'\t\t\t=> $topic_id,\r\n\t\t\t'in_message'\t\t=> 0,\r\n\t\t\t'physical_filename'\t=> $filedata['physical_filename'],\r\n\t\t\t'real_filename'\t\t=> $filedata['real_filename'],\r\n\t\t\t'comment'\t\t\t=> $message_parser->filename_data['filecomment'],\r\n\t\t\t'extension'\t\t\t=> $filedata['extension'],\r\n\t\t\t'mimetype'\t\t\t=> $filedata['mimetype'],\r\n\t\t\t'filesize'\t\t\t=> $filedata['filesize'],\r\n\t\t\t'filetime'\t\t\t=> $filedata['filetime'],\r\n\t\t\t'thumbnail'\t\t\t=> $filedata['thumbnail']\r\n\t\t);\r\n\r\n\t\t$message_parser->filename_data['filecomment'] = '';\r\n\t\t$filedata['post_attach'] = FALSE;\r\n\r\n\t\t// Submit Attachment\r\n\t\t$attach_sql = $message_parser->attachment_data;\r\n\r\n\t\t$_CLASS['core_db']->sql_transaction();\r\n\r\n\t\t$sql = 'INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $_CLASS['core_db']->sql_build_array('INSERT', $attach_sql);\r\n\t\t$_CLASS['core_db']->sql_query($sql);\r\n\r\n\t\t$sql = 'UPDATE ' . POSTS_TABLE . \"\r\n\t\t\tSET post_attachment = 1\r\n\t\t\tWHERE post_id = $post_id\";\r\n\t\t$_CLASS['core_db']->sql_query($sql);\r\n\r\n\t\t$sql = 'UPDATE ' . TOPICS_TABLE . \"\r\n\t\t\tSET topic_attachment = 1\r\n\t\t\tWHERE topic_id = $topic_id\";\r\n\t\t$_CLASS['core_db']->sql_query($sql);\r\n\r\n\t\t$_CLASS['core_db']->sql_transaction('commit');\r\n\r\n\t\tadd_log('admin', sprintf($_CLASS['core_user']->lang['LOG_ATTACH_FILEUPLOAD'], $post_id, $filename));\r\n\t\techo '<span style=\"color:green\">' . $_CLASS['core_user']->lang['SUCCESSFULLY_UPLOADED'] . '</span><br /><br />';\r\n\t}\r\n\telse if (sizeof($filedata['error']))\r\n\t{\r\n\t\techo '<span style=\"color:red\">' . sprintf($_CLASS['core_user']->lang['ADMIN_UPLOAD_ERROR'], implode(\"<br />\\t\", $filedata['error'])) . '</span><br /><br />';\r\n\t}\r\n}", "title": "" }, { "docid": "88267c0f8c7ef60b168c43dbd7401d10", "score": "0.5401527", "text": "public function itemOperationsGetAttachmentData($filereference) { }", "title": "" } ]
42058ab81de36cbcb3bb02d19a36d156
author: TrieuNT create date: 20181115 04:02 PM
[ { "docid": "0e1edf2a12e34169bf8be2e4bab4606f", "score": "0.0", "text": "public function getGooglePlus(Request $request)\n {\n $url = $request->get('url');\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_URL, 'https://plusone.google.com/_/+1/fastbutton?url=' . urlencode($url));\n $curl_result = curl_exec($curl);\n curl_close($curl);\n\n libxml_use_internal_errors(true);\n $doc = new \\DOMDocument();\n $doc->loadHTML($curl_result);\n $counter = $doc->getElementById('aggregateCount');\n $request = ($counter) ? $counter->nodeValue : 0;\n return new JsonResponse($request);\n }", "title": "" } ]
[ { "docid": "009d6bac02de28a1941a33502d7d0dec", "score": "0.58792645", "text": "function get_creation_time()\r\n {\r\n return 0;\r\n }", "title": "" }, { "docid": "62993599eafed4c9dd60ae0eb3e922d8", "score": "0.5823622", "text": "private function timestamps(){\n }", "title": "" }, { "docid": "98039d0dc3a3f1531a22c90817406444", "score": "0.5811408", "text": "private function timestamp()\n {\n }", "title": "" }, { "docid": "bf1d24b76d56f4020612eee0757bcc2a", "score": "0.5693393", "text": "public function create()///no lo uso\n {\n //\n }", "title": "" }, { "docid": "d7015ee715630a1ee9faa153c5e56517", "score": "0.5634587", "text": "public function fornecedor();", "title": "" }, { "docid": "630679b410161914eea60b0d0872db3d", "score": "0.5631035", "text": "private function get_uuid_time_high_and_version(){\n \n }", "title": "" }, { "docid": "1c326d4dbbeb3f7a04cd7eaaafe95463", "score": "0.5619358", "text": "private function create(){\r\n\r\n }", "title": "" }, { "docid": "8055020c5cdd5700075fcb1e2e4f7e34", "score": "0.5616494", "text": "function ________utils___________(){}", "title": "" }, { "docid": "f302331fff4dbe30614c8658f68eb05c", "score": "0.5526703", "text": "public function create()\n {\n \t#\n\n }", "title": "" }, { "docid": "fe6317d6c24b6d671ac66794e5eb02ae", "score": "0.5510244", "text": "public function createFirstInformation()\n {\n }", "title": "" }, { "docid": "fe6317d6c24b6d671ac66794e5eb02ae", "score": "0.5510244", "text": "public function createFirstInformation()\n {\n }", "title": "" }, { "docid": "32c2ba18ae957c002ae4471dd90b1a9d", "score": "0.5481982", "text": "function createReferentenFromTemplate() {\n\t// SIEHE NOTIFICATIONS Seminar ohne Referent\n }", "title": "" }, { "docid": "380badaa970a8cff96c860c1a21bfdcb", "score": "0.54725456", "text": "public function run()\n {\n $faker = Faker\\Factory::create('vi_VN'); // zone\n $tz = 'Asia/Ho_Chi_Minh'; //GMT+7 UTC\n $nComments = 100;\n $now = new Carbon('2018-1-1', $tz);\n $times = [];\n for ($i=1; $i <= $nComments; $i++)\n array_push($times, $faker->dateTimeThisYear('now', $tz));\n sort($times);\n $list = [];\n foreach ($times as $key => $value) {\n $created = $now->copy()->addSeconds($faker->numberBetween(1, 259200));\n $updated = $created->copy()->addSeconds($faker->numberBetween(1, 172800));\n array_push($list, [\n 'kh_taiKhoan' => $faker->unique()->userName,\n 'kh_matKhau' => $faker->password,\n 'kh_hoTen' => $faker->name,\n 'kh_gioiTinh' => $faker->numberBetween(0, 1),\n 'kh_email' => $faker->unique()->email,\n 'kh_ngaySinh' => $faker->date('Y-m-d','now'),\n 'kh_diaChi' => $faker->address,\n 'kh_dienThoai' => $faker->unique()->phoneNumber,\n 'kh_taoMoi' => $created,\n 'kh_capNhat' => $updated,\n 'kh_trangThai' => $faker->numberBetween(1, 3)\n ]);\n }\n DB::table('khachhang')->insert($list);\n }", "title": "" }, { "docid": "4ff419f0e8ddb491a0d612bd88753770", "score": "0.5464194", "text": "public function timestampInPostEditor()\n {\n }", "title": "" }, { "docid": "7cb4881a31a49c48bcab69c89fac9c5b", "score": "0.54070145", "text": "public function obtenerTarjeta();", "title": "" }, { "docid": "75d118fa80e5a2c21bac2aabe4b3f409", "score": "0.538668", "text": "public function create()\r\n\t {\r\n\r\n\t }", "title": "" }, { "docid": "ed3dbe809ffa6b7d33399d22f395672d", "score": "0.5386538", "text": "public function tes(){\n $jadwal=Jadwal::all();\n\n print_r($jadwal);\n //return Uuid::uuid4()->getHex();\n }", "title": "" }, { "docid": "983a069d6d771e63dfbc641658e11c54", "score": "0.53827184", "text": "public function createstruktur()\n {\n //\n }", "title": "" }, { "docid": "632fa45ad2667abd92d1fb6f652ee525", "score": "0.5382431", "text": "public function creation(){return $this->_creation;}", "title": "" }, { "docid": "87b714d94ebe022d9a4caf6d4894ef23", "score": "0.53733766", "text": "public static function create(){\n\t\n\t}", "title": "" }, { "docid": "871b47e7d0011c3bfe97ad0a573ab7e6", "score": "0.5373331", "text": "public function create()\n {\n\t\t\t\t\n\t }", "title": "" }, { "docid": "21bc3877521a77a9f0cde082ea41bda0", "score": "0.5370645", "text": "public function create()\n\t{\n\t\t\t\n\t}", "title": "" }, { "docid": "de34af38048328e75585f095cea69ca0", "score": "0.53601587", "text": "public function create () {\n\t\t//\n\t}", "title": "" }, { "docid": "4a878c61858d97d50963cf02c7e16dd3", "score": "0.5356989", "text": "public function create()\n\t{\n\t\n\t}", "title": "" }, { "docid": "4a878c61858d97d50963cf02c7e16dd3", "score": "0.5356989", "text": "public function create()\n\t{\n\t\n\t}", "title": "" }, { "docid": "9e5f23699d1f74c62eb399d13a72247d", "score": "0.53482956", "text": "public function index()\n {\n\n $this->add('kiko','Steak','Reis');\n //$this->printBestellungen();\n return $this->mTm();\n\n }", "title": "" }, { "docid": "e91732b9d1576dae2ebce69429663b7a", "score": "0.5347937", "text": "public function crear()\n {\n \n }", "title": "" }, { "docid": "9104f1e16b6603603b989d769bd606ba", "score": "0.5326769", "text": "public function create()\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "9104f1e16b6603603b989d769bd606ba", "score": "0.5326769", "text": "public function create()\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "9104f1e16b6603603b989d769bd606ba", "score": "0.5326769", "text": "public function create()\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "e2549c41bc9c180289f95c1795881cf3", "score": "0.5317216", "text": "public function PreRender()\n {\n $user = new CSessionUser(\"user\");\n\t\tCAuthorizer::RestoreUserFromSession(&$user);\n if ($user->authorized)\n {\n\n $user = new CSessionUser($user->type);\n CAuthorizer::AuthentificateUserFromCookie(&$user);\n CAuthorizer::RestoreUserFromSession(&$user);\n \n if ($user->type ==\"user\")\n {\n $tbl = \"tbl__registered_user\";\n }\n else { $tbl = \"tbl__\".$user->type.\"_doc\"; }\n\n SQLProvider::ExecuteNonReturnQuery(\"update $tbl set last_visit_date=NOW() WHERE tbl_obj_id = $user->id AND last_visit_date<DATE_SUB(NOW(), INTERVAL 1 MINUTE) \");\n\n }\n \n \n \n $metadata = $this->GetControl(\"metadata\");\n $metadata->keywords = \"банкетные залы, рестораны, особняки и усадьбы, выставочные залы, конференц-залы, концертные залы, площадки для тест-драйва, летние веранды, банкетоходы, загородные усадьбы\";\n $metadata->description = \"EventCatalog.ru – удобный поиск площадки для проведения мероприятия, праздника или свадьбы: банкетные залы, рестораны, выставочные залы, концертные площадки, открытие площадки… и многое другое!\";\n\n $app = CApplicationContext::GetInstance();\n /*Провека адреса*/\n $av_rwParams = array(\n \"type\", \"subtype\", \"page\", \"letter\",\n \"area_doc_place\", \"area_doc_location\",\n \"area_doc_cost_from\", \"area_doc_cost_to\",\n \"area_doc_banquet_from\", \"area_doc_banquet_to\",\n \"area_doc_buffet_from\", \"area_doc_buffet_to\",\n \"metro\", \"category\", \"mdist\", \"mhighway\", \"mcity\",\"capacity\",\"cost\",\"invite_catering\",\"city\",\n \"car_into\",\"my_catering\");\n CURLHandler::CheckRewriteParams($av_rwParams);\n $rewriteParams = $_GET;\n $first = \"NULL\";\n $filter = \"\";\n \n $category = GP(\"category\");\n if (isset($category)) {\n $ts = preg_split('/_/', $category);\n if(sizeof($ts) > 1) {\n $type = $ts[0];\n $subtype = $ts[1];\n }\n else {\n if ($ts[0]>0)\n $type = $ts[0];\n else\n $type = null;\n $subtype = null;\n }\n }\n \n $city = GP(\"city\");\n \n $filter = \"\";\n $currentFind = \"\";\n \n $capacity = GP(\"capacity\");\n if (isset($capacity) && is_array($capacity)) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $cup_filter = \"\";\n $cup_title = \"\";\n foreach($capacity as $val) {\n if (strlen($cup_filter)>0)\n {\n $cup_filter .= \" or \";\n $cup_title .= \", \";\n }\n $diap = preg_split('/_/', $val);\n $cup_filter .= \"sum_places_banquet between $diap[0] and $diap[1]\";\n if ($diap[1] > 1500)\n $diap[1] = '...';\n $cup_title .= \"$diap[0] - $diap[1]\";\n }\n $filter .= \"($cup_filter)\";\n \n $currentFind .= \"<div style='padding:0 0 5px 5px;color:#3399FF'>Вместимость: $cup_title </div>\";\n }\n \n $cost = GP(\"cost\");\n if (isset($cost) && is_array($cost)) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $cost_filter = \"\";\n $cost_title = \"\";\n foreach($cost as $val) {\n if (strlen($cost_filter)>0)\n {\n $cost_filter .= \" or \";\n $cost_title .= \", \";\n }\n $diap = preg_split('/_/', $val);\n $cost_filter .= \"ifnull(cost_banquet,0) between $diap[0] and $diap[1]\";\n if ($diap[1] > 3500)\n $diap[1] = '...';\n $cost_title .= \"$diap[0] - $diap[1]\";\n }\n $filter .= \"($cost_filter)\";\n $currentFind .= \"<div style='padding:0 0 5px 5px;color:#3399FF'>Стоимость: $cost_title </div>\";\n }\n \n $metro = GP(\"metro\");\n if (isset($metro) && is_array($metro)) { \n $metro_filter = \"\";\n foreach($metro as $val) {\n if ($val > 0) {\n if (strlen($metro_filter)>0) {\n $metro_filter .= \",\";\n }\n $metro_filter .= $val;\n }\n }\n if (strlen($metro_filter)>0) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $metro_title = SQLProvider::ExecuteScalar(\"select GROUP_CONCAT(title order by title SEPARATOR ', ') from tbl__metro_stations where tbl_obj_id in ($metro_filter)\");\n $filter .= \"tbl_obj_id in (select area from tbl__area_metro where metro_station in ($metro_filter))\";\n $currentFind .= \"<div style='padding:0 0 5px 5px;color:#3399FF'>Станции метро: $metro_title </div>\";\n }\n }\n $mdist = GP(\"mdist\");\n if (isset($mdist) && is_array($mdist)) {\n $mdist_filter = \"\";\n foreach($mdist as $val) {\n if ($val > 0) {\n if (strlen($mdist_filter)>0) {\n $mdist_filter .= \",\";\n }\n $mdist_filter .= $val;\n }\n }\n if (strlen($mdist_filter)>0) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $mdist_title = SQLProvider::ExecuteScalar(\"select GROUP_CONCAT(title order by title SEPARATOR ', ') from tbl__moscow_districts where tbl_obj_id in ($mdist_filter)\");\n $filter .= \"moscow_district in ($mdist_filter)\";\n $currentFind .= \"<div style='padding:0 0 5px 5px;color:#3399FF'>Округа: $mdist_title </div>\";\n }\n }\n \n \n $invite_catering = GP(\"invite_catering\");\n if (!IsNullOrEmpty($invite_catering)) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $filter.=\" invite_catering like '%$invite_catering%' \";\n $currentFind .=\n \"<div style='padding:0 0 5px 5px;color:#3399FF'>Возможность приглашения стороннего кейтеринга: \".\n ($invite_catering ? \"есть\":\"нет\").\"</div>\";\n }\n \n $car_into = GP(\"car_into\");\n if (!IsNullOrEmpty($car_into)) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $filter.=\" car_into like '%$car_into%' \";\n $currentFind .= \"<div style='padding:0 0 5px 5px;color:#3399FF'>Возможность установки автомобиля внутри площадки: \".\n ($car_into ? \"есть\":\"нет\").\"</div>\";\n }\n $mcity = GP(\"mcity\");\n if (isset($mcity) && is_array($mcity)) { \n $mcity_filter = \"\";\n foreach($mcity as $val) {\n if ($val > 0) {\n if (strlen($mcity_filter)>0) {\n $mcity_filter .= \",\";\n }\n $mcity_filter .= $val;\n }\n }\n if (strlen($mcity_filter)>0) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $mcity_title = SQLProvider::ExecuteScalar(\"select GROUP_CONCAT(title order by title SEPARATOR ', ') from tbl__moscow_cities where tbl_obj_id in ($mcity_filter)\");\n $filter .= \"tbl_obj_id in (select area_id from tbl__area_m_cities where moscow_city_id in ($mcity_filter))\";\n $currentFind .= \"<div style='padding:0 0 5px 5px;color:#3399FF'>Города Московской области: $mcity_title </div>\";\n }\n }\n $mhighway = GP(\"mhighway\");\n if (isset($mhighway) && is_array($mhighway)) { \n $mhighway_filter = \"\";\n foreach($mhighway as $val) {\n if ($val > 0) {\n if (strlen($mhighway_filter)>0) {\n $mhighway_filter .= \",\";\n }\n $mhighway_filter .= $val;\n }\n }\n if (strlen($mhighway_filter)>0) {\n if (strlen($filter)>0)\n {\n $filter.=\" and \";\n }\n $mhighway_title = SQLProvider::ExecuteScalar(\"select GROUP_CONCAT(title order by title SEPARATOR ', ') from tbl__moscow_highways where tbl_obj_id in ($mhighway_filter)\");\n $filter .= \"tbl_obj_id in (select area_id from tbl__area_m_highways where moscow_highway_id in ($mhighway_filter))\";\n $currentFind .= \"<div style='padding:0 0 5px 5px;color:#3399FF'>Шоссе Московской области: $mhighway_title </div>\";\n }\n }\n \n \n $this->GetControl(\"currentFind\")->html = $currentFind;\n \n \n \n \n $type = GP(\"type\");\n $page = GP(\"page\", 1);\n $subtype = GP(\"subtype\");\n \n \n $area_doc_place = GP(\"area_doc_place\");\n $area_doc_location = GP(\"area_doc_location\");\n $area_doc_cost_from = GP(\"area_doc_cost_from\");\n $area_doc_cost_to = GP(\"area_doc_cost_to\");\n $area_doc_banquet_from = GP(\"area_doc_banquet_from\");\n $area_doc_banquet_to = GP(\"area_doc_banquet_to\");\n $area_doc_buffet_from = GP(\"area_doc_buffet_from\");\n $area_doc_buffet_to = GP(\"area_doc_buffet_to\");\n\n $letter_filter = GP(\"letter\");\n if (!IsNullOrEmpty($letter_filter)) {\n $letter_filter = urldecode($letter_filter);\n }\n\n if (!IsNullOrEmpty($area_doc_banquet_from)) {\n $capacityTitle = \"<div style='padding:0 0 10px 5px;color:#3399FF'>Вместимость: \";\n $capacityTitle .= \"$area_doc_banquet_from - \";\n $rewriteParams['area_doc_banquet_from'] = $area_doc_banquet_from;\n if (!IsNullOrEmpty($area_doc_banquet_to)) {\n $capacityTitle .= \"$area_doc_banquet_to\";\n $rewriteParams['area_doc_banquet_to'] = $area_doc_banquet_to;\n }\n else {\n $capacityTitle .= \"...\";\n }\n $capacityTitle .= \"</div>\";\n $this->GetControl(\"currentCapacity\")->html = $capacityTitle;\n }\n $filter = $this->BuildFilter($filter, \"city_location\", $area_doc_location);\n $filter = $this->BuildFilter($filter, \"area_cost\", $area_doc_cost_from, \">=\");\n $filter = $this->BuildFilter($filter, \"area_cost\", $area_doc_cost_to, \"<=\");\n $filter = $this->BuildFilter($filter, \"max_sitting_man\", $area_doc_banquet_from, \">=\");\n $filter = $this->BuildFilter($filter, \"max_sitting_man\", $area_doc_banquet_to, \"<=\");\n $filter = $this->BuildFilter($filter, \"max_count_man\", $area_doc_buffet_from, \">=\");\n $filter = $this->BuildFilter($filter, \"max_count_man\", $area_doc_buffet_to, \"<=\");\n if (is_string($area_doc_place)) {\n if (strlen($filter) > 0)\n $filter .= \" and \";\n $filter .= \" title like '%$area_doc_place%' \";\n }\n if (is_numeric($type)) {\n $first = SQLProvider::ExecuteQuery(\n \"select r.tbl_obj_id\n from tbl__area_types t\n join tbl__area_doc r on r.tbl_obj_id = t.first_id\n where t.tbl_obj_id=$type\n and r.active=1\");\n if (sizeof($first) > 0)\n $first = $first[0][\"tbl_obj_id\"];\n else\n $first = \"NULL\";\n if (strlen($filter) > 0)\n $filter .= \" and \";\n $filter .= \" tbl_obj_id in (select area_id from tbl__area2subtype a2s \" .\n \" join tbl__area_subtypes s on s.tbl_obj_id = a2s.subtype_id where s.parent_id=$type) \";\n $rewriteParams[\"type\"] = $type;\n }\n if (is_numeric($subtype)) {\n $first = SQLProvider::ExecuteQuery(\n \"select r.tbl_obj_id\n from tbl__area_subtypes t\n join tbl__area_doc r on r.tbl_obj_id = t.first_id\n where t.tbl_obj_id=$subtype\n and r.active=1\");\n if (sizeof($first) > 0)\n $first = $first[0][\"tbl_obj_id\"];\n else\n $first = \"NULL\";\n if (strlen($filter) > 0)\n $filter .= \" and \";\n $filter .= \" tbl_obj_id in (select area_id from tbl__area2subtype where subtype_id=$subtype) \";\n $rewriteParams[\"subtype\"] = $subtype;\n }\n if (is_numeric($type)) {\n $rewriteParams[\"type\"] = $type;\n }\n if (!IsNullOrEmpty($letter_filter)) {\n if (strlen($filter) > 0)\n $filter .= \" and \";\n $filter .= \" title like '$letter_filter%' \";\n }\n\n $this->is_main = strlen($filter) == 0;\n if (!$this->is_main) {\n if (is_numeric($city) && $city > 0)\n $filter = $this->BuildFilter($filter, \"city\", $city);\n $filter = \" where $filter \";\n $count = SQLProvider::ExecuteQuery(\"select count(*) as quan from `vw__area_list_pro` $filter \");\n $count = $count[0][\"quan\"];\n $pages = floor($count / $this->pageSize) + (($count % $this->pageSize == 0) ? 0 : 1);\n if (($page > $pages) && ($pages > 0)) {\n $page = $pages;\n $rewriteParams[\"page\"] = $page;\n CURLHandler::Redirect(CURLHandler::$currentPath . CURLHandler::BuildQueryParams($rewriteParams));\n }\n if ($page == 1)\n unset($rewriteParams[\"page\"]);\n $areas = SQLProvider::ExecuteQuery(\n \"select * from `vw__area_list_pro` $filter\n\t\t\t\torder by if(tbl_obj_id=$first,0,1), pro_type desc, pro_cost desc, pro_date_pay desc, title limit \" . (($page - 1) * $this->pageSize) . \",\" . $this->pageSize);\n $areaList = $this->GetControl(\"areaList\");\n\t\t\t// echo \"select * from `vw__area_list_pro` $filter\";\n\t\t\t// die('!');\n\t\t foreach ($areas as &$area)\n {\n switch ($area[\"selection\"]) {\n case 1:\n $area[\"selection_type\"] = \"color:#EE0000; font-weight:bold;\";\n break;\n case 2:\n $area[\"selection_type\"] = \"color:#000; font-weight:bold;\";\n break;\n case 3:\n $area[\"selection_type\"] = \"color:#EE0000; font-weight:bold;\";\n break;\n default:\n $area[\"selection_type\"] = \"color:#000; font-weight:bold;\";\n break;\n }\n\n $gr = SQLProvider::ExecuteQuery(\"select * from tbl__area_subtypes, tbl__area2subtype where area_id=\" . $area[\"tbl_obj_id\"] . \" and subtype_id=tbl_obj_id\");\n $area['category'] = \"\";\n foreach ($gr as $gkey => $value) {\n if ($area['category'] != \"\")\n $area['category'] .= \" / \";\n $area['category'] .= '<a class=\"common\" href=\"/area?type=' . $value['parent_id'] . '&subtype=' . $value['tbl_obj_id'] . '\">' . $value['title'] . '</a>';\n }\n\n\n $area['links'] = \"\";\n /*$photos = SQLProvider::ExecuteQuery(\"select 1 from tbl__area_photos where parent_id = \".$area['tbl_obj_id']);\n if (sizeof($photos)) {\n $area['links'] .= '<a class=\"common\" href=\"/area/'.$area['title_url'].'?page=photos\" style=\"margin: 0 10px 0 0\">Фото</a>';\n }\n if ($area[\"youtube_video\"]) {\n $area['links'] .= '<a class=\"common\" href=\"/area/'.$area['title_url'].'?page=video\" style=\"margin: 0 10px 0 0\">Видео</a>';\n }*/\n $area[\"info\"] = CutString(strip_tags($area[\"description\"]), $this->descriptionSize);\n $area[\"resident_type\"] = \"area\";\n $area[\"space_height\"] = \"10\";\n $area['class'] = \"area_table_hover\";\n\t\t\t\t$area[\"city_item\"] = (!empty($area[\"city_title\"])) ? '<span style=\"color: #000;\">('.$area[\"city_title\"].')</span>' : '';\n //PRO\n $area['background']\t\t= '0';\n $area['pro_logo']\t\t= '';\n\t\t\t\t$area['pro_logo_prew']\t= '';\n if($area['pro_type'] == 1 || $area['pro_type'] == 2) {\n\t\t\t\t\t$area['border']\t\t\t= 'border:2px solid '.getProBackgroud('area').';';\n\t\t\t\t\t$area['pro_logo_prew']\t= getProLogoForPreview('area');\n\t\t\t\t\t$area['pro_logo']\t\t= getProLogo();\n }\n }\n $areaList->dataSource = $areas;\n\n //SEO text\n if (isset($subtype)) {\n $ft = SQLProvider::ExecuteQuery(\"select seo_text from tbl__area_subtypes where tbl_obj_id=\" . $subtype);\n $ft[\"seo_text\"] = $ft[0][\"seo_text\"];\n }\n else {\n $ft[\"seo_text\"] = \"\";\n }\n $footerText = $this->GetControl(\"footerText\");\n $footerText->dataSource = $ft;\n\n \n //setting pager\n $pager = $this->GetControl(\"pager\");\n $pager->currentPage = $page;\n $pager->totalPages = $pages;\n $pager->rewriteParams = $rewriteParams;\n }\n else\n {\n /*recommended list*/\n\t\t\t// ar.`area` resident_type, - было в запросе !!!!!!!!!!!!!!!!!!!!!!!!!! // && и не зря!!! вернул обратно\n $recommended = SQLProvider::ExecuteQuery(\"select ar.tbl_obj_id,ar.recommended as recommended, ar.title, ar.description, ar.logo as logo_image, 'area' resident_type, ar.title_url, city.title as city_name\n from `tbl__area_doc` ar\n LEFT JOIN tbl__area_city city ON ar.city = city.tbl_obj_id\n where ar.recommended>0\n order by recommended, ar.tbl_obj_id desc limit $this->recommendedLimit\"); \n \t$recommended_conts_2 = array();\t\t\t\n\t\t\t$recommended_conts_1 = array();\n\t\t\tforeach($recommended as $key=>$value){\n\t\t\t\tif($value['recommended']<11){\n\t\t\t\t\t$recommended_conts_2[] = $value;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$recommended_conts_1[] = $value;\n\t\t\t\t}\n\t\t\t}\n\n $recomedList_1 = $this->GetControl(\"RecomedList_1\");\n $recomedList_1->dataSource = $this->PrepareAreasMain($recommended_conts_1); \n\t\t\t\n\t\t\t$recomedList_2 = $this->GetControl(\"RecomedList_2\");\n $recomedList_2->dataSource = $this->PrepareAreasMain($recommended_conts_2);\n\n // $recomedList = $this->GetControl(\"RecomedList\");\n // $recomedList->dataSource = $this->PrepareAreasMain($recommended);\n\t\t /*end recommended list*/\n\n /*new list*/\n $new = SQLProvider::ExecuteQuery(\"select tbl_obj_id, title, description,\n\t\t\t DATE_FORMAT(registration_date,'%d.%m.%y') as formatted_date,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'area' resident_type, title_url\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom `tbl__area_doc`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere active = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torder by registration_date desc limit $this->newLimit\");\n \n\t\t\t$new_conts_1 = array_slice($new, 0, floor(count($new)/2));\n\t\t\t$new_conts_2 = array_slice($new, floor(count($new)/2), count($new));\n \n $newList_1 = $this->GetControl(\"NewList_1\");\n $newList_1->dataSource = $this->PrepareAreasMain($new_conts_1); \n\t\t\t\n\t\t\t $newList_2 = $this->GetControl(\"NewList_2\");\n $newList_2->dataSource = $this->PrepareAreasMain($new_conts_2);\n\t\t\t\n\t\t\t // $newList = $this->GetControl(\"NewList\");\n // $newList->dataSource = $this->PrepareAreasMain($new);\n /*end new list*/\n\n /*news list*/\n /*\n $news = SQLProvider::ExecuteQuery(\"select\n\t\t\t rn.tbl_obj_id, rn.title, DATE_FORMAT(rn.date,'%d.%m.%y') as `strdate`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trn.resident_type, rn.resident_id, res.title_url\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom `tbl__resident_news` rn\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjoin `tbl__area_doc` res on res.tbl_obj_id = rn.resident_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere rn.`active`=1 and rn.`resident_type`='area'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torder by rn.`date` DESC limit $this->newsLimit\");\n $newsList = $this->GetControl(\"NewsList\");\n $newsList->dataSource = $news;\n */\n \t\t$res_news = SQLProvider::ExecuteQuery(\n \"select rn.*, DATE_FORMAT(date,'%d.%m.%y') as `strdate`\n \t\t\t\t\t\t from `tbl__resident_news` rn\n \t\t\t\t\t\t\t\t\t\t\t\twhere rn.`active`=1 and rn.`resident_type`='area'\n \t\t\t\t\t\t\t\t\t\t\t\torder by rn.`date` DESC limit $this->newsLimit\n \t\t\t\t\t\t\t\t\t\t\t\t\");\n \t\tforeach($res_news as $key => $val) {\n \t\t\t$res = SQLProvider::ExecuteQuery(\"SELECT * FROM tbl__\".$res_news[$key][\"resident_type\"].\"_doc WHERE tbl_obj_id=\".$res_news[$key][\"resident_id\"]);\n \t\t\t$res_news[$key][\"title_url\"] = $res[0]['title_url'];\n \t\t\t$res_news[$key][\"res_title\"] = $res[0]['title'];\n \t\t\t\n \t\t\tif(!empty($res_news[$key][\"logo_image\"])) {\n $res_news[$key][\"logo\"] = $res_news[$key][\"logo_image\"];\n }\n \t\t\telse {\n \t\t\tif (isset($res[0]['logo'])) {\n \t\t\t\t$res_news[$key][\"logo\"] = $res[0]['logo'];\n \t\t\t}\n \t\t\telse {\n \t\t\t\t$res_news[$key][\"logo\"] = $res[0]['logo_image'];\n \t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t$res_news[$key][\"title\"] = CutString($res_news[$key][\"title\"]);\n \t\t\t$res_news[$key][\"text\"] = strip_tags(CutString($res_news[$key][\"text\"], 90));\n \t\t\tswitch($val['resident_type']) {\n \t\t\tcase 'area': $res_news[$key]['sub'] = 'Площадка'; break;\n \t\t\tcase 'artist': $res_news[$key]['sub'] = 'Новость артиста'; break;\n \t\t\tcase 'contractor': $res_news[$key]['sub'] = 'Новость подрядчика'; break;\n \t\t\tcase 'agency': $res_news[$key]['sub'] = 'Агентство'; break;\n \t\t\t}\n \t\t}\n \t\t$this->GetControl(\"NewsList\")->dataSource = $res_news;\n /*end news list*/\n\n /*rate list*/\n $ratings = SQLProvider::ExecuteQuery(\"select ul.to_resident_id as tbl_obj_id, c.title ,count(ul.tbl_obj_id) as voted, c.title_url\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom tbl__userlike ul\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjoin tbl__area_doc c on c.tbl_obj_id = ul.to_resident_id and ul.to_resident_type='area'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere c.active = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroup by ul.to_resident_id, c.title\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torder by voted desc, tbl_obj_id limit $this->ratedLimit\");\n $user = new CSessionUser(\"user\");\n CAuthorizer::AuthentificateUserFromCookie(&$user);\n CAuthorizer::RestoreUserFromSession(&$user);\n\n foreach ($ratings as $key => &$rating) {\n $rating[\"index\"] = $key + 1;\n $rating[\"resident_type\"] = 'area';\n if (!$user->authorized)\n $rating[\"msg_vote\"] = \"onclick=\\\"javascript: ShowLikeMessage(); return false;\\\"\";\n else\n $rating[\"msg_vote\"] = \"\";\n }\n $ratingList = $this->GetControl(\"RatingList\");\n $ratingList->dataSource = $ratings;\n /*end rate list*/\n \n //PRO2-list\n $pro2_list = $this->GetControl(\"pro2List\");\n $pro2_list->dataSource = getPro2List('area');\n }\n\n //groups\n $groups = SQLProvider::ExecuteQuery(\"select\n\t\t\t\t\t sg.`tbl_obj_id` AS `child_id`,\n\t\t\t\t\t sg.`parent_id`,\n\t\t\t\t\t sg.`title`,\n\t\t\t\t\t sg.`title_url`,\n\t\t\t\t\t sg.`priority`\n\t\t\t\t\tfrom\n\t\t\t\t\t `tbl__area_subtypes` sg\n\t\t\t\t\tunion\n\t\t\t\t\tselect\n\t\t\t\t\t g.`tbl_obj_id` AS `child_id`,\n\t\t\t\t\t 0 AS `parent_id`,\n\t\t\t\t\t g.`title` AS `title`,\n\t\t\t\t\t g.`title_url`,\n\t\t\t\t\t g.`priority`\n\t\t\t\t\tfrom\n\t\t\t\t\t `tbl__area_types` g\n\t\t\t\t\tORDER by priority desc\");\n foreach ($groups as $key => $value) {\n $cpars = array();\n if (!IsNullOrEmpty($area_doc_banquet_from) && !IsNullOrEmpty($area_doc_banquet_to)) {\n $cpars['area_doc_banquet_from'] = $area_doc_banquet_from;\n $cpars['area_doc_banquet_to'] = $area_doc_banquet_to;\n }\n $groups[$key][\"selected\"] = $value[\"child_id\"] == $type || $value[\"child_id\"] == $subtype ? 'id=\"selectBlue\"' : \"\";\n $groups[$key][\"blue\"] = $value[\"child_id\"] == $type || $value[\"child_id\"] == $subtype ? \"\" : \"blue\";\n $groups[$key][\"link\"] = \"/area/\".$value['title_url'] . CURLHandler::BuildQueryParams($cpars);\n\n }\n $groupList = $this->GetControl(\"typeList\");\n $groupList->dataSource = $groups;\n\n $titlefilter = array();\n $titlefilterLinks = array();\n if (isset($type)) {\n $type_finded = false;\n $subtype_finded = false;\n foreach ($groups as $gr) {\n if ($gr[\"child_id\"] == $type) {\n $urlparams = array();\n $urlparams[\"type\"] = $gr[\"child_id\"];\n $link = \"/area/\" . CURLHandler::BuildQueryParams($urlparams);\n array_unshift($titlefilter, CStringFormatter::buildCategoryLinks($gr['title'], null));\n array_unshift($titlefilterLinks, CStringFormatter::buildCategoryLinks($gr['title'], $link, \"area\"));\n $type_finded = true;\n }\n else if ($gr[\"child_id\"] == $subtype) {\n $urlparams = array();\n $urlparams[\"type\"] = $gr[\"parent_id\"];\n $urlparams[\"subtype\"] = $gr[\"child_id\"];\n $link = \"/area/\" . CURLHandler::BuildQueryParams($urlparams);\n array_push($titlefilter, CStringFormatter::buildCategoryLinks($gr['title'], null));\n array_push($titlefilterLinks, CStringFormatter::buildCategoryLinks($gr['title'], $link, \"area\"));\n $subtype_finded = true;\n }\n }\n if (!$type_finded || (isset($subtype) && !$subtype_finded))\n CURLHandler::ErrorPage();\n }\n\n $titlefil = $this->GetControl(\"titlefilter\");\n if (sizeof($titlefilter))\n $titlefil->text = implode(\" / \", $titlefilter) . \" - \";\n if (sizeof($titlefilterLinks))\n $this->GetControl(\"titlefilterLinks\")->html = '<div class=\"titlefilter area\">' . implode(\" / \", $titlefilterLinks) . '</div>';\n else\n $this->GetControl(\"titlefilterLinks\")->html = '';\n\n //setting letter\n $letters = array();\n $len = strlen(FILTER_LETTERS);\n $fl = FILTER_LETTERS;\n for ($i = 0; $i < $len; $i++)\n {\n $pars = $rewriteParams;\n $pars[\"letter\"] = urlencode($fl[$i]);\n $link = CURLHandler::$currentPath . CURLHandler::BuildQueryParams($pars);\n $let = array(\"letter\" => $fl[$i], \"link\" => $link, \"selected\" => ($fl[$i] == $letter_filter));\n array_push($letters, $let);\n }\n $letterFilter = $this->GetControl(\"letterFilter\");\n $letterFilter->dataSource = $letters;\n\n //setting capacity filter\n $cpars = $rewriteParams;\n unset($cpars[\"area_doc_banquet_from\"]);\n unset($cpars[\"area_doc_banquet_to\"]);\n $url = CURLHandler::$currentPath . CURLHandler::BuildRewriteParams($cpars);\n if (!IsNullOrEmpty($area_doc_banquet_to)) {\n $capacityFilter = $this->buildCapacityFilter($url, \"ВСЕ\");\n }\n else {\n $capacityFilter = $this->buildCapacityFilter($url, \"ВСЕ\", false, true);\n }\n\n $capacityRanges = array(\n array(\"from\" => 0, \"to\" => 10, \"title\" => \"0-10\"),\n array(\"from\" => 10, \"to\" => 50, \"title\" => \"10-50\"),\n array(\"from\" => 50, \"to\" => 100, \"title\" => \"50-100\"),\n array(\"from\" => 100, \"to\" => 200, \"title\" => \"100-200\"),\n array(\"from\" => 200, \"to\" => 300, \"title\" => \"200-300\"),\n array(\"from\" => 300, \"to\" => 400, \"title\" => \"300-400\"),\n array(\"from\" => 400, \"to\" => 500, \"title\" => \"400-500\"),\n array(\"from\" => 500, \"to\" => 600, \"title\" => \"500-600\"),\n array(\"from\" => 600, \"to\" => 700, \"title\" => \"600-700\"),\n array(\"from\" => 700, \"to\" => 800, \"title\" => \"700-800\"),\n array(\"from\" => 800, \"to\" => 900, \"title\" => \"800-900\"),\n array(\"from\" => 900, \"to\" => 1000, \"title\" => \"900-1000\"),\n array(\"from\" => 1000, \"to\" => 1500, \"title\" => \"1000-1500\"),\n array(\"from\" => 1500, \"to\" => 10000, \"title\" => \"1500-...\"),\n );\n\n foreach ($capacityRanges as $range) {\n $urlParams = $rewriteParams;\n $urlParams['area_doc_banquet_from'] = $range[\"from\"];\n $urlParams['area_doc_banquet_to'] = $range[\"to\"];\n $url = CURLHandler::$currentPath . CURLHandler::BuildQueryParams($urlParams);\n if (!($area_doc_banquet_to == $range['to'])) {\n $capacityFilter .= $this->buildCapacityFilter($url, $range[\"title\"], $range[\"from\"] >= 100);\n }\n else {\n $capacityFilter .= $this->buildCapacityFilter($url, $range['title'], $range[\"from\"] >= 100, true);\n }\n }\n\n $this->GetControl(\"capacityFilter\")->html = $capacityFilter;\n\t\t\n \n /*\n $mainMenu = $this->GetControl(\"menu\");\n $mainMenu->dataSource[\"shelk\"] =\n\t\t\t\tarray(\"link\" => \"http://shelkevent.ru/\",\n\t\t\t\t\"imgname\" => \"shelk\",\n\t\t\t\t\"title\"=>\"\",\n\t\t\t\t\"ads_class\"=>\"reklama\",\n\t\t\t\t\"target\" => \"target='_blank'\");\n \t\t*/\n \n \n $areasearch = $this->GetControl(\"areasearch\");\n $areasearch->headerTemplate =\n '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>';\n $areasearch->footerTemplate =\n '<td class=\"area\"><div style=\"text-align:justify !important;\"><p>\n <a href=\"\" class=\"area\" onclick=\"javascript: DlgByPlace(); return false;\">Поиск по местоположению</a>&nbsp;/&nbsp;<a href=\"\" class=\"area\" onclick=\"javascript: DlgByCapacity(); return false;\">Поиск по вместимости</a>&nbsp;/&nbsp;<a href=\"\" class=\"area\" onclick=\"javascript: DlgByCost(); return false;\">Поиск по стоимости</a>&nbsp;/&nbsp;<a href=\"\" class=\"area\" onclick=\"javascript: DlgAdditional(); return false;\">Расширенный поиск</a></p></div></td></tr></table>';\n \n $capacityRanges = array(\n array(\"from\"=>0,\"to\"=>10,\"title\"=>\"до 10\", \"checked\"=>\"\"),\n array(\"from\"=>10,\"to\"=>50,\"title\"=>\"10-50\", \"checked\"=>\"\"),\n array(\"from\"=>50,\"to\"=>100,\"title\"=>\"50-100\", \"checked\"=>\"\"),\n array(\"from\"=>100,\"to\"=>200,\"title\"=>\"100-200\", \"checked\"=>\"\"),\n array(\"from\"=>200,\"to\"=>300,\"title\"=>\"200-300\", \"checked\"=>\"\"),\n array(\"from\"=>300,\"to\"=>400,\"title\"=>\"300-400\", \"checked\"=>\"\"),\n array(\"from\"=>400,\"to\"=>500,\"title\"=>\"400-500\", \"checked\"=>\"\"),\n array(\"from\"=>500,\"to\"=>600,\"title\"=>\"500-600\", \"checked\"=>\"\"),\n array(\"from\"=>600,\"to\"=>700,\"title\"=>\"600-700\", \"checked\"=>\"\"),\n array(\"from\"=>700,\"to\"=>800,\"title\"=>\"700-800\", \"checked\"=>\"\"),\n array(\"from\"=>800,\"to\"=>900,\"title\"=>\"800-900\", \"checked\"=>\"\"),\n array(\"from\"=>900,\"to\"=>1000,\"title\"=>\"900-1000\", \"checked\"=>\"\"),\n array(\"from\"=>1000,\"to\"=>1500,\"title\"=>\"1000-1500\", \"checked\"=>\"\"),\n array(\"from\"=>1500,\"to\"=>10000,\"title\"=>\"1500-...\", \"checked\"=>\"\")\n );\n \n $caps = $this->GetControl(\"capacityList\");\n $caps->dataSource = $capacityRanges;\n \n $costRanges = array(\n array(\"from\"=>0,\"to\"=>1000,\"title\"=>\"до 1000 руб.\"),\n array(\"from\"=>1000,\"to\"=>1500,\"title\"=>\"1000-1500 руб.\"),\n array(\"from\"=>1500,\"to\"=>2000,\"title\"=>\"1500-2000 руб.\"),\n array(\"from\"=>2000,\"to\"=>2500,\"title\"=>\"2000-2500 руб.\"),\n array(\"from\"=>2500,\"to\"=>3000,\"title\"=>\"2500-3000 руб.\"),\n array(\"from\"=>3000,\"to\"=>3500,\"title\"=>\"3000-3500 руб.\"),\n array(\"from\"=>3500,\"to\"=>99999,\"title\"=>\"более 3500 руб.\")\n );\n \n $costs = $this->GetControl(\"costList\");\n $costs->dataSource = $costRanges;\n\n \n $this->GetControl(\"jsArea\")->dataSource = array(\n \"show_metro\"=> (empty($city) or $city == 204)?\"true\":\"false\",\n \"city\"=>isset($city)?\"$city\":\"204\",\n \"cap_list\"=>$caps->RenderHTML(),\n \"cost_list\"=>$costs->RenderHTML(),\n \"params\"=>CURLHandler::BuildQueryParams($rewriteParams)\n ); \n\t\t\n\t\t// && всего резидентов\n\t\t$counts = SQLProvider::ExecuteQuery(\"select vm.`login_type`, COUNT(*) as `count` from `vw__all_users` vm\n\t\t\t\t\t\t\t\t\t\t\t\twhere vm.`active`=1 and vm.`login_type`<>'user'\n\t\t\t\t\t\t\t\t\t\t\t\tgroup by vm.`login_type`\n\t\t\t\t\t\t\t\t\t\t\t\torder by vm.`login_type` desc\n\t\t\t\t\t\t\t\t\t\t\t\t\");\n\t\t\n\t\t$chart = array();\n\t\t\n\t\t$chart[\"count\"] = $counts[0][\"count\"]+$counts[1][\"count\"]+$counts[2][\"count\"]+$counts[3][\"count\"];\n\t\t$chart[\"cont_count\"] = $counts[0][\"count\"];\n\t\t$chart[\"area_count\"] = $counts[2][\"count\"];\n\t\t$chart[\"arti_count\"] = $counts[1][\"count\"];\n\t\t$chart[\"agen_count\"] = $counts[3][\"count\"];\n\t\t$max = max($counts[0][\"count\"],$counts[1][\"count\"],$counts[2][\"count\"],$counts[3][\"count\"]);\n\t\t$h = 70;\n\t\t$k = $h/$max;;\n\t\t$chart[\"cont_height\"] = floor($counts[0][\"count\"]*$k);\n\t\t$chart[\"area_height\"] = floor($counts[2][\"count\"]*$k);\n\t\t$chart[\"arti_height\"] = floor($counts[1][\"count\"]*$k);\n\t\t$chart[\"agen_height\"] = floor($counts[3][\"count\"]*$k);\n\t\t\n\t\t$chart[\"cont_percent\"] = floor($counts[0][\"count\"]/$chart[\"count\"]*100);\n\t\t$chart[\"area_percent\"] = floor($counts[2][\"count\"]/$chart[\"count\"]*100);\n\t\t$chart[\"arti_percent\"] = floor($counts[1][\"count\"]/$chart[\"count\"]*100);\n\t\t$chart[\"agen_percent\"] = floor($counts[3][\"count\"]/$chart[\"count\"]*100);\t\t\n\t\t\n\t\t$chartObj = $this->GetControl(\"chart\");\n\t\t$chartObj->dataSource = $chart;\n \n }", "title": "" }, { "docid": "a41434d3caea9b26274dd9eaee7e1cf8", "score": "0.52857494", "text": "public function create()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a41434d3caea9b26274dd9eaee7e1cf8", "score": "0.52857494", "text": "public function create()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a41434d3caea9b26274dd9eaee7e1cf8", "score": "0.52857494", "text": "public function create()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a41434d3caea9b26274dd9eaee7e1cf8", "score": "0.52857494", "text": "public function create()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a41434d3caea9b26274dd9eaee7e1cf8", "score": "0.52857494", "text": "public function create()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "feb63d0be633df2297535040b880857e", "score": "0.52845985", "text": "public function buscarTicketxFecha(){\n \n }", "title": "" }, { "docid": "ecb220065ad1d1d1a2550ca7cc43f307", "score": "0.5282205", "text": "public function create()\n\t\t{\n\t\t\t\t//\n\t\t}", "title": "" }, { "docid": "ecb220065ad1d1d1a2550ca7cc43f307", "score": "0.5282205", "text": "public function create()\n\t\t{\n\t\t\t\t//\n\t\t}", "title": "" }, { "docid": "22bae140fa7265016d7d6f2608f79b16", "score": "0.528119", "text": "public function how_it_works(){\n\t\t\n\t}", "title": "" }, { "docid": "9974133d8e82612312b77dee31b2f811", "score": "0.5268898", "text": "public function __construct() {\n $this->fecha_registro =new DateTime('now');\n \n \n }", "title": "" }, { "docid": "2322087c4e4156c3f0a6251c23a711dd", "score": "0.5261861", "text": "public function create()\n\t {\n\t\t \n\t }", "title": "" }, { "docid": "06fe578813e73a081a8dde902d6759c0", "score": "0.525752", "text": "public function create()\n {\n // 새 모델 입력을 위한 폼페이지\n }", "title": "" }, { "docid": "62fb6ef5f578cdda56db273b367b6c1d", "score": "0.5255579", "text": "function create(){\n\t\t$this->createdit();\n\t}", "title": "" }, { "docid": "8c5b3d9378e0402566e06e9cf8b36dd0", "score": "0.52270657", "text": "function etamXByuW3OwS20lINtz()\n{\n\n \n}", "title": "" }, { "docid": "31efe560e622c6c3be8a2ef89da5388d", "score": "0.52103215", "text": "private function __construct() {\n $this->id = \"Jedina instanca stvorena\";\n }", "title": "" }, { "docid": "8dd5b347e31af4b6046b11414e168b7a", "score": "0.52092755", "text": "public function run()\n {\n $Tipo_examen_altura= New Tipo_examen_altura;\n $Tipo_examen_altura->descripcion = 'PATOLOGIA METABOLICAS';\n $Tipo_examen_altura->save();\n $Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'DIABETES DESCOMPENSADA';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'HIPERTIROIDISMO DESCOMPENSADO';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'HIPOTIROIDISMO DESCOMPENSADO';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n $Tipo_examen_altura->descripcion = 'ALTERACIONES EN COLESTEROL POR ENCIMA DE 300';\n $Tipo_examen_altura->save();\n $Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'ALTERACIONES EN TRIGLICERIDOS POR ENCIMA DE 300';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'ALTERACIONES CARDIOVASCULARES';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'ARRITMIA CARDIACA DESCOMPENSADA';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n $Tipo_examen_altura->descripcion = 'INSUFICIENCIA CARDIACA DESCOMPENSADA';\n $Tipo_examen_altura->save();\n $Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'PSICOSIS';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'PSICOSIS MANIACO DEPRESIVA';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'SINDROME DEPRESIVO AGUDO';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n $Tipo_examen_altura->descripcion = 'SINDROME VERTIGINOSO AGUDO';\n $Tipo_examen_altura->save();\n $Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'VERTIGO DE MENIERE AGUDO';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'HIPOACUSIA NEUROSENSORIAL SEVERA BILATERAL';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'DEFECTO DE REFRACCION SEVERO QUE NO CORRIGE CON LENTES';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n $Tipo_examen_altura->descripcion = 'ALTERACION EN DISCRIMINACÓN EN VISION DE COLORES';\n $Tipo_examen_altura->save();\n $Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'PRESENCIA DE FOBIAS A ALTURAS';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'EPILEPSIA';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'HAY PRESENCIA DE CUALQUIER TIPO DE NISTAGMUS';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura->save();\n $Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'HAY SIGNO DE ROMBERG POSITIVA';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'HAY PRUEBA DE BABINSKY WEIL POSITIVA';\n\t\t$Tipo_examen_altura->save();\n\t\t$Tipo_examen_altura= New Tipo_examen_altura;\n \t$Tipo_examen_altura->descripcion = 'HAY PRUEBA DE WODAC POSITIVA';\n\t\t$Tipo_examen_altura->save();\n }", "title": "" }, { "docid": "70a6401d1b5f7b01c4fbd35eaf7f7db8", "score": "0.5208953", "text": "protected function generate()\n {\n $this->description = 'Internationale Dag ter bestrijding van misbruik van en onwettige handel in drugs';\n\n $this->setupDateTimeObjects($this->generateDateTime($this->year, 6, 26));\n }", "title": "" }, { "docid": "0b6656032ad773db1ae79bff5d95716e", "score": "0.5207082", "text": "public function create()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "0b6656032ad773db1ae79bff5d95716e", "score": "0.5207082", "text": "public function create()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "0b6656032ad773db1ae79bff5d95716e", "score": "0.5207082", "text": "public function create()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "1816813a858e71982b1eb8c203427ae8", "score": "0.52055067", "text": "public function create(){\n // Function is not used.\n }", "title": "" }, { "docid": "55dc6c89a35e3c3be2fde62ad116829c", "score": "0.5204423", "text": "public function create()\n {\n \n \n \n }", "title": "" }, { "docid": "8808471be98582abbe6e90dbf3d704e8", "score": "0.52022797", "text": "function partageur_autoriser(){}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5192187", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" } ]
134f2085a14138be046afa926a09e08f
Redirect the user to the authentication page for the provider.
[ { "docid": "8f5db6cf5044dedf3849acabeb4bc51b", "score": "0.0", "text": "public function redirect()\n {\n $this->request->session()->put(\n 'oauth.temp', $temp = $this->server->getTemporaryCredentials()\n );\n\n return new RedirectResponse($this->server->getAuthorizationUrl($temp));\n }", "title": "" } ]
[ { "docid": "a71a17ca1533e9ce19c29689255ebf79", "score": "0.70312786", "text": "public function handleProviderCallback()\n {\n $user = Socialite::driver('google')->user();\n\n $userModel = $this->persistTribeUser($user);\n\n Auth::login($userModel);\n\n\t\treturn redirect('home');\n }", "title": "" }, { "docid": "6bfb67cc2e9be0d50fe76ec362f42cf4", "score": "0.7027124", "text": "public function redirectToProvider()\n { \n return redirect($this->newTwitchApi->getOauthApi()->getAuthUrl($this->redirect_uri, 'code', implode(' ', $this->scopes), false, $this->state));\n }", "title": "" }, { "docid": "5835e984e94821674d3b9ae34da6697b", "score": "0.69757086", "text": "public function redirectToProvider($provider)\n {\n \tif (!in_array($provider, $this->availableDrivers)) {\n \t\treturn redirect()->route('login');\n \t}\n \n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "fd58042317a5e132a9025b124797a6f4", "score": "0.6916752", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('facebook')->user();\n } catch (Exception $e) {\n return Redirect::to('auth/facebook');\n }\n\n $authUser = $this->findOrCreateUser($user);\n\n Auth::login($authUser, true);\n\n return Redirect::to($this->socialRedirectTo);\n }", "title": "" }, { "docid": "dfb7b9c85d01429eb9aa685519c67f78", "score": "0.689605", "text": "public function handleProviderCallback($provider)\n {\n try {\n $user = Socialite::driver($provider)->user();\n } catch (Exception $e) {\n return redirect('/login');\n }\n\n $authUser = $this->findOrCreateUser($user, $provider);\n Auth::login($authUser, true);\n\n return redirect($this->redirectTo);\n }", "title": "" }, { "docid": "841030ca3dd15afd6c63ef046932e5bf", "score": "0.68889815", "text": "public function handleProviderCallback()\n {\n $user = Socialite::driver('github')->user();\n $authUser = $this->findOrCreateUser($user);\n\n Auth::login($authUser, true);\n\n return redirect('/');\n }", "title": "" }, { "docid": "f77619c643236a03a4fe8cd6d1e06912", "score": "0.67998004", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->stateless()->redirect();\n }", "title": "" }, { "docid": "8ff12a579eb993698303af4ec3572816", "score": "0.6781128", "text": "public function handleProviderCallback($provider)\n {\n $user = Socialite::driver($provider)->user();\n\n $authUser = $this->findOrCreateUser($user,$provider);\n Auth::login($authUser, true);\n return redirect($this->redirectTo);\n }", "title": "" }, { "docid": "dac4bfd9fff174fd118e3753e69b7d70", "score": "0.67633206", "text": "public function redirectToProvider($provider)\n {\n // dd(request()->redirect);\n if (request()->redirect) {\n session(['redirect' => request()->redirect]);\n }\n $this->validateProvider($provider);\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "1ae7eb0c7ed26b5b6c2459358e232837", "score": "0.6755142", "text": "public function loginRedirectAction()\n {\n if ($this->isGranted('ROLE_USER')) {\n return $this->redirectToRoute('patent_index');\n } else {\n return $this->redirectToRoute('fos_user_security_login');\n }\n }", "title": "" }, { "docid": "56dc35865d8c5fdbe4946cb10f2b6eda", "score": "0.674413", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->with(['rl' => 'student'])->redirect();\n }", "title": "" }, { "docid": "b8f075f88ee02f10a341d50588cb3e7d", "score": "0.67293036", "text": "public function redirectToProvider() {\n\t\treturn Socialite::driver( 'slack' )->stateless()->redirect();\n\t}", "title": "" }, { "docid": "d1021b77b559927a521cdd5578c8226d", "score": "0.6714565", "text": "public function redirectToProvider($provider) {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "465c30e70f2180e4347607306208cf45", "score": "0.67097044", "text": "public function redirectToProvider($provider)\n { \n\n \n Session::put('socialRouteName',Route::currentRouteName());\n return Socialite::driver($provider)->redirect('/consumer/home');\n }", "title": "" }, { "docid": "09f2075c86602449c7c9173bca77470a", "score": "0.6706954", "text": "public function handleProviderCallback($provider)\n {\n try {\n $providerUser = Socialite::driver($provider)->user();\n } catch (\\Throwable | \\Exception $e) {\n // Send actual error message in development\n if (config('app.debug')) {\n throw $e;\n }\n // Lets suppress this error\n return redirect()->route('login')\n ->with('error', __('Unable to authenticate. Please try again.'));\n }\n $user = $this->findOrCreateUser($provider, $providerUser);\n Auth::loginUsingId($user->id, true);\n if (strpos(\\Session::get('url.intended', url('/')), 'home') !== false) {\n return redirect('/');\n }\n return redirect()->intended('/');\n }", "title": "" }, { "docid": "e1fd56c57b8ab905fad0bae783c49617", "score": "0.6702826", "text": "public function redirectToProvider() {\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "9297e850f3cfeaa58c2e768194c95050", "score": "0.67014384", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "f3f0479c71b073cde307187aec5b2f4a", "score": "0.6692887", "text": "public function redirectUser(){\n if ($this->ion_auth->is_admin()){\n redirect('auth', 'refresh');\n }\n redirect('/', 'refresh');\n }", "title": "" }, { "docid": "7ef239e189b5e22024fca08a9a0295dd", "score": "0.6689691", "text": "public function handleGoogleCallback()\n {\n $googleUser = $this->getProviderUser('google');\n\n Auth::login($googleUser);\n\n return redirect(config('fortify.home'));\n }", "title": "" }, { "docid": "0d93d4fc036575c1f616c1b550bf3339", "score": "0.66852796", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "0d93d4fc036575c1f616c1b550bf3339", "score": "0.66852796", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "0d93d4fc036575c1f616c1b550bf3339", "score": "0.66852796", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "0d93d4fc036575c1f616c1b550bf3339", "score": "0.66852796", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "0d93d4fc036575c1f616c1b550bf3339", "score": "0.66852796", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "8d0ecda911b08cf083aeb384f406925b", "score": "0.66813457", "text": "protected function _redirectForAuthentication()\n {\n $token = $this->_consumer->getRequestToken();\n $this->_session->requestToken = serialize($token);\n $params = array();\n $this->_consumer->redirect($this->_parameters);\n die('Redirecting...');\n }", "title": "" }, { "docid": "febbeda29022ee98bc469350b43ea0f4", "score": "0.66707504", "text": "public function redirectToProvider()\n\t\t\t\t {\n\t\t\t\t return Socialite::driver('facebook')->redirect();\n\t\t\t\t }", "title": "" }, { "docid": "7f821f70c4d181285ee650933e872045", "score": "0.66600496", "text": "public function redirect($provider)\n {\n\n\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.665446", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "7b4defe997188d734ba2581a168de65f", "score": "0.665446", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "79897c1056e2920feef8d04b12a15fa8", "score": "0.66436374", "text": "public function redirectToProvider( $provider)\n {\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "05a9c821277f82530b1f83cd80fbf804", "score": "0.6632698", "text": "public function login($provider)\n {\n return $this->getSocialiteFactory()->driver($provider)->redirect();\n }", "title": "" }, { "docid": "aeb6bd2af2d2d50d2f718b1151d1aed6", "score": "0.662774", "text": "public function handleProviderCallback()\n {\n try {\n $user = \\Laravel\\Socialite\\Facades\\Socialite::driver('facebook')->user();\n } catch (Exception $e) {\n return redirect('auth/facebook');\n }\n\n $authUser = $this->findOrCreateUser($user);\n\n $this->loginUser($authUser);\n\n $redirect = $this->redirectAfterLogin();\n return redirect(url($redirect));\n }", "title": "" }, { "docid": "1ade0b21da32658f111d8f3a3fb76ad8", "score": "0.6623666", "text": "public function redirectToProvider($provider)\n {\n \t//dd(\\Socialite::driver($provider)->redirect());\n return \\Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "b50835eed02f39ea18a2bbd53bdbd969", "score": "0.6620886", "text": "private function __goLogin()\n {\n redirect('login');\n }", "title": "" }, { "docid": "97fbad9813348e3a7064c41c92a68784", "score": "0.6612631", "text": "public function redirectToProvider(){\n return Socialite::driver('facebook')->redirect();\n }", "title": "" }, { "docid": "07abdb3b38ca9c9f0bbc11ae5ce47d8a", "score": "0.66072494", "text": "public function redirectLogin() {\n\t\tif ($this->Session->read('Auth.User')) {\n\t\t\techo 'Redirect group to right url.';\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->Redirect($this->Auth->loginAction);\n\t\t}\n\t}", "title": "" }, { "docid": "939dc867ad599b6f1b0f81ed08169a4c", "score": "0.6597458", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('github')->scopes(['repo_deployment', 'read:org', 'repo'])->user();\n } catch (Exception $e) {\n return Redirect::to('auth/github');\n }\n\n // Store the user details from socialite.\n $authUser = $this->updateOrCreateUser($user);\n\n // Immediately log the user in.\n Auth::login($authUser, true);\n\n return Redirect::to('/');\n }", "title": "" }, { "docid": "a86da14d676bd4370c711c589e15eefc", "score": "0.6583935", "text": "public function redirect()\n {\n $options=[];\n $scopes= $this->config[\"scopes\"];\n if (!empty($scopes)) {\n $options['scope'] = implode(\" \",$scopes);\n }\n $url = $this->provider->getAuthorizationUrl($options);\n // set the state (unless we're stateless)\n if (!$this->isStateless) {\n die();\n $this->getSession()->set(\n self::OAUTH2_SESSION_STATE_KEY,\n $this->provider->getState()\n );\n }\n throw new RedirectException(new RedirectResponse($url));\n }", "title": "" }, { "docid": "6eccf69d85c013fe9992bd0ca07cddd3", "score": "0.65635437", "text": "function redirect_to_login() {\n header('Location: ' . $this->api()->login_url());\n exit();\n }", "title": "" }, { "docid": "2dba5c5974615ba41bb9e018a5a6bb8e", "score": "0.655876", "text": "public function redirectToAuthenticationPage($url = null)\n {\n if ($url) {\n $this->Auth->redirectUrl($url);\n } else {\n $this->Auth->redirectUrl($this->request->here(false));\n }\n \n $this->controller->redirect(Router::url([\n 'plugin' => 'Beskhue/CookieTokenAuth', \n 'controller' => 'CookieTokenAuth',\n 'prefix' => false,\n '_base' => false\n ]));\n }", "title": "" }, { "docid": "99490d626c885df85b5dc15bb2296929", "score": "0.65512854", "text": "public function redirectToProvider($provider='')\n {\n/* if( $provider == 'facebook' ) {\n return Socialite::driver('facebook')->scopes(['public_profile', 'email'])->asPopup()->redirect();\n }*/\n\n return Socialite::driver($provider)->redirect();\n\n // Socialite::driver('google')->scopes(['profile','email'])->redirect()\n }", "title": "" }, { "docid": "4820a9a72200a46ec5aa7454d1e1d169", "score": "0.654967", "text": "private function ssoAuthenticationReturnAction()\n {\n if (!$this->stateHandler->isAuthenticated()) {\n $url = $this->generateUrl($this->registrationRoute->getAuthenticationRoute());\n $this->logger->warning(sprintf(\n 'User was not authenticated by the application, redirect user back the authentication route \"%s\"',\n $url\n ));\n return new RedirectResponse($url);\n }\n return $this->createSamlResponse();\n }", "title": "" }, { "docid": "1b1d64beef909fcb957601023dfbe1ad", "score": "0.6543321", "text": "public function redirectToProvider($provider)\n {\n if( ! config('services.' . $provider)) {\n return app()->abort(404);\n }\n\n if($provider === 'facebook') {\n return Socialite::driver('facebook')->fields([\n 'first_name', 'last_name', 'email'\n ])->scopes(['email'])->redirect();\n }\n\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "79fcd8766f2611fd714e1eccd38f20e0", "score": "0.653438", "text": "public function redirectToProvider()\n {\n return Socialite::with('hail')->redirect();\n }", "title": "" }, { "docid": "bece05f723cd317659c2ab2256b12678", "score": "0.65322334", "text": "public function redirect($provider)\n {\n $providerClientId = config('services.' . $provider . '.client_id');\n\n if (empty($providerClientId)) {\n abort(404);\n }\n \n session()->put('lang', App::currentLocale());\n return Socialite::driver($provider)->redirect();\n }", "title": "" }, { "docid": "cdd42d9354e1fcb89022a9fc286345ad", "score": "0.65278554", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')\n ->with(['hd' => 'tri.be'])\n ->redirect();\n }", "title": "" }, { "docid": "d6cf17dfa8a829c2f12dc63b9e1479de", "score": "0.6520642", "text": "public function handleProviderCallback()\n {\n \t$user = User::saveFbUser(\n \t\tSocialite::driver('facebook')->user()\n \t)->login(); \n \t\n \treturn redirect()->route('home'); \n }", "title": "" }, { "docid": "1ffebdbd86a666ab58746ab1a3e41057", "score": "0.6519572", "text": "public function redirectToProvider()\n {\n return Socialite::driver('twitch')->redirect();\n }", "title": "" }, { "docid": "a89a70184478e9bbe49003ef75ef1780", "score": "0.6508749", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')\n ->scopes(config('services.github.scopes'))\n ->redirect();\n }", "title": "" }, { "docid": "6e495a6bad0e869a32c6ac6eea6c7742", "score": "0.649616", "text": "public function redirectToProvider($provider)\n {\n return Socialite::driver($provider)\n ->stateless()\n ->with([\"access_type\" => \"offline\", \"prompt\" => \"consent select_account\"])\n ->redirect();\n }", "title": "" }, { "docid": "6213d480f363ad72be2909333a6c2395", "score": "0.6495104", "text": "public function handleProviderCallback()\n {\n // Setting can by found in config/services.php \n \n $user = Socialite::driver('github')->user();\n\n $authUser = $this->findOrCreateUser($user);\n Auth::login($authUser, true);\n return redirect('/');\n }", "title": "" }, { "docid": "a37b45bb07362e05d3521301356d6b6c", "score": "0.64926386", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('facebook')->fields(['first_name', 'last_name', 'email'])->user();\n } catch (Exception $e) {\n return redirect('auth/facebook');\n }\n\n $authUser = $this->findOrCreateUser($user);\n\n Auth::login($authUser, true);\n\n return redirect('/contul-meu');\n }", "title": "" }, { "docid": "29b4310bef9fa93974d5cc7e988a860d", "score": "0.6491374", "text": "public function redirectToProvider()\n {//die;\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "6bac6ea9c2565c8b051258badce4926f", "score": "0.64832693", "text": "public function redirectToProvider($auth=Null)\n {\n // $providerKey = \\Config::get(app_path().'/config/google.php');\n // if(empty($providerKey))\n // return view('welcome')\n // ->with('error','No such provider');\n\n //$oauth= new Socialite(app_path().'/config/google.php');\n //$provider = $oauth->authenticate('Google');\n\n\n return Socialite::driver('Google')->redirect();\n\n //return 1;\n }", "title": "" }, { "docid": "51032797b167f4a315e93412a69d8220", "score": "0.64775294", "text": "public function handleProviderCallback()\n {\n $user = Socialite::driver('google')->stateless()->user();\n // dd($user);\n\n $authuser = $this->findOrCreateUser($user);\n Auth::login($authuser);\n // $user->token;\n\n return redirect('/user/home');\n }", "title": "" }, { "docid": "bd619fdc08ff89a38bdfbfb5c23626d3", "score": "0.6468939", "text": "public function auth()\n {\n $plugins = $this->serviceLocator->get('ControllerPluginManager');\n $this->plugins = $plugins;\n $params = $plugins->get('Params');\n $query = $params->fromQuery();\n $isCallback = boolval($params->fromRoute('callback'));\n $state = $plugins->get('Url')->fromRoute('backend/auth');\n $redirectUrl = $plugins->get('Url')->fromRoute(\n 'backend/auth.social',\n array(\n 'provider' => 'facebook',\n 'callback' => 'callback'\n ),\n array('force_canonical' => true)\n );\n if (!$isCallback) {\n return $this->goToAuth($redirectUrl, $state);\n }\n if (isset($query['error'])) {\n return $this->ifQueryError($query);\n }\n if (isset($query['code'])) {\n return $this->ifQueryCode($query, $state, $redirectUrl);\n }\n $plugins->get('FlashMessenger')->addErrorMessage('Try again');\n return $plugins->get('Redirect')->toRoute('backend/auth.login');\n }", "title": "" }, { "docid": "32074c828be675f399d84c91f5e01f2e", "score": "0.6465022", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('google')->user();\n } catch (\\Exception $e) {\n return redirect('/login');\n }\n // check if they're an existing user\n $existingUser = User::where('email', $user->email)->first();\n if($existingUser) {\n // log them in\n auth()->login($existingUser, true);\n } else {\n // create a new user\n $newUser = new User;\n $newUser->name = $user->name;\n $newUser->email = $user->email;\n $newUser->provider_id = $user->id;\n $newUser->provider = \\Config::get('constants.TYPE_REGISTER.GOOGLE');;\n $newUser->save();\n auth()->login($newUser, true);\n }\n return redirect()->to('/');\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.64519763", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.64519763", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.64519763", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.64519763", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.64519763", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.64519763", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "c30b78765eea8e0ec91df9ce8d7c86be", "score": "0.64519763", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n }", "title": "" }, { "docid": "428fe0d76bff7687688a01906ac47678", "score": "0.6449722", "text": "public function handleProviderCallback($provider)\n {\n try{\n $user = Socialite::driver($provider)->user();\n } catch (\\GuzzleHttp\\Exception\\ClientException $e) {\n abort(403, 'Unauthorized action.');\n return redirect()->to('/');\n }\n $attributes = [\n 'provider' => $provider,\n 'provider_id' => $user->getId(),\n 'name' => $user->getName(),\n 'email' => $user->getEmail(),\n 'password' => isset($attributes['password']) ? $attributes['password'] : bcrypt(str_random(16)),\n 'idrol' => 1,\n\n ];\n\n $user = User::where('provider_id', $user->getId() )->first();\n if (!$user){\n try{\n $user= User::create($attributes);\n }catch (ValidationException $e){\n return redirect()->to('/auth/login');\n }\n }\n\n $this->guard()->login($user);\n return redirect()->to($this->redirectTo);\n\n }", "title": "" }, { "docid": "ede354031582d5bf26c66c4df5311c43", "score": "0.6442549", "text": "protected function redirectTo()\n {\n return route('user.login.form');\n }", "title": "" }, { "docid": "18de6a6e7138df575abcf5e5ad1cf4bc", "score": "0.6431432", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')\n ->scopes(['user_posts','public_profile','publish_actions'])\n ->redirect();\n }", "title": "" }, { "docid": "4254653294763f83153948cf26c5872c", "score": "0.6421934", "text": "public function handleGoogleCallback()\n {\n try {\n $user = Socialite::driver('google')->user();\n } catch (\\Exception $e) {\n return redirect('/');\n }\n\n $authUser = $this->findOrCreateUser($user);\n\n Auth::login($authUser, true);\n\n return redirect($this->redirectTo);\n }", "title": "" }, { "docid": "4254653294763f83153948cf26c5872c", "score": "0.6421934", "text": "public function handleGoogleCallback()\n {\n try {\n $user = Socialite::driver('google')->user();\n } catch (\\Exception $e) {\n return redirect('/');\n }\n\n $authUser = $this->findOrCreateUser($user);\n\n Auth::login($authUser, true);\n\n return redirect($this->redirectTo);\n }", "title": "" }, { "docid": "835c1dcc6fa2d2f41c7835df0c37791a", "score": "0.6414445", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->setScopes(['read:user', 'repo', 'delete_repo', 'repo:status', 'repo_deployment'])->redirect();\n }", "title": "" }, { "docid": "8e30e89d5af8e357d96af95b34c590c0", "score": "0.64074403", "text": "function appthemes_auth_redirect_login() {\n\tif ( ! is_user_logged_in() ) {\n\t\tnocache_headers();\n\t\twp_redirect( wp_login_url( scbUtil::get_current_url() ) );\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "11b0f88fa9f8f4c191c08954effdb45b", "score": "0.64013994", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('google')->user();\n } catch (\\Exception $e) {\n\t\t\tsession()->put('error', 'error');\n return redirect()->back();\n\t\t}\n // check if they're an existing user\n $existingUser = User::where('email', $user->email)->first();\n if($existingUser){\t\t\t\n\t\t\tsession()->put('response', 'true');\n\t\t\tAuth::login($existingUser, true); \n } else {\n // create a new user\n $newUser = new User;\n $newUser->name = $user->name;\n $newUser->email = $user->email;\n $newUser->provider_id = $user->id;\n $newUser->avatar = $user->avatar;\n $newUser->rol = 'usuario';\n\t\t\t$newUser->save();\n\t\t\tsession()->put('response', 'true');\n\t\t\tAuth::login($newUser, true);\t\t\t\n\t\t}\n\t\t\t\n\t\t\treturn redirect()->back();\n\t\t}", "title": "" }, { "docid": "811f53abb6b3d82a4881559815a6e11d", "score": "0.63962513", "text": "public function redirect()\n\t{\n\t\tif (!isset($_SESSION['is_logged'])) {\n\t\t\theader(\"Location: \" . ROOT_PATH . \"users/login\");\n\t\t}\n\t}", "title": "" }, { "docid": "f85ff0ff170c21e1795c1d9c9dafa046", "score": "0.63943666", "text": "public function redirectToProvider()\n {\n return Socialite::with('vkontakte')->redirect();\n }", "title": "" }, { "docid": "a97e677ddc3decc419a0e018d8d8e49a", "score": "0.63905567", "text": "public function handleFacebookCallback()\n {\n $facebookUser = $this->getProviderUser('facebook');\n\n Auth::login($facebookUser);\n\n return redirect(config('fortify.home'));\n }", "title": "" }, { "docid": "14cfcb864942625911bc4c6d7d85016b", "score": "0.63884896", "text": "public function loginRedirectAction()\n {\n $user = $this->getUser();\n\n if (!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY'))\n {\n return $this->redirectToRoute('login');\n // throw $this->createAccessDeniedException();\n }\n\n\n if ($this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')) {\n return $this->redirectToRoute('admin_dashboard');\n } else {\n return $this->redirectToRoute('login');\n }\n\n\n }", "title": "" }, { "docid": "bf293af41c8c53548275bd1ba9b37287", "score": "0.63793796", "text": "protected function goToLoginPage(){\n if($this->is_session_auth){\n $this->is_session_auth = false;\n $this->auth_user = array();\n unset($_SESSION['user']['auth_key']);\n unset($_SESSION['user']);\n }\n // ClassTools::redirect('login');\n ClassTools::redirect('');\n exit;\n }", "title": "" }, { "docid": "468d59c672af38ed80ba088fea5b47ce", "score": "0.6356719", "text": "public function actionAuth() {\n\t\t$this->redirectUrl($this->flickrAuth->getAuthUrl());\n\t}", "title": "" }, { "docid": "24372883974ef1caff705ca0af0f774e", "score": "0.6343405", "text": "public function redirectToProvider($provider)\n {\n $validated = $this->validateProvider($provider);\n if (! is_null($validated)) {\n return $validated;\n }\n\n return Socialite::driver($provider)->stateless()->redirect();\n }", "title": "" }, { "docid": "2693638838f820e30969fa81c3fa892e", "score": "0.6338212", "text": "public function redirectToProvider()\n {\n return Socialite::driver('google')->redirect();\n\n\n }", "title": "" }, { "docid": "39d53d75046eed08d1630ef8111c2714", "score": "0.6336868", "text": "public function goToLogin() {\n $this->redirect($this->createUrl('/user/login'));\n }", "title": "" }, { "docid": "829a9ee7b456a8649d0359773602666b", "score": "0.63367224", "text": "private function redirect()\n {\n // reload the user module\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/user');\n }", "title": "" }, { "docid": "829a9ee7b456a8649d0359773602666b", "score": "0.63367224", "text": "private function redirect()\n {\n // reload the user module\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/user');\n }", "title": "" }, { "docid": "d10a0f68477e192ec8930b5127f97d68", "score": "0.6333897", "text": "public function redirectToProvider()\n {\n return Socialite::driver('github')->scopes([])->redirect();\n }", "title": "" }, { "docid": "cd4361cd54896f7f48dc3030cb1e58b9", "score": "0.6327617", "text": "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('google')->user();\n } catch (\\Exception $e) {\n // print_r($e->getMessage());die;\n return abort(500);\n }\n // only allow people with @company.com to login\n // if(explode(\"@\", $user->email)[1] !== 'company.com'){\n // return redirect()->to('/');\n // }\n // check if they're an existing user\n $existingUser = User::where('email', $user->email)->first();\n if($existingUser){\n auth()->login($existingUser, true);\n } else {\n }\n return redirect()->to('/home');\n }", "title": "" }, { "docid": "529b765491df98505791f628e8d3dff8", "score": "0.63218546", "text": "public function handleProviderCallback()\n {\n\n try {\n $user = Socialite::driver('google')->user();\n } catch (\\Exception $e) {\n return redirect('/home');\n }\n \n // check if they're an existing user\n $existingUser = User::where('email', $user->email)->first(); \n if($existingUser){\n // log them in\n auth()->login($existingUser, true);\n } else {\n // create a new user\n $newUser = new User;\n $newUser->name = $user->name;\n $newUser->email = $user->email;\n $newUser->google_id = $user->id;\n // Creates a random cryptographically secure password that is 20 characters long\n // Uses https://www.php.net/manual/en/function.random-bytes.php\n $newUser->password = Hash::make(Str::random(20));\n $newUser->email_verified_at = date('Y-m-d H:i:s'); // Setting email verification time since it is verified by Google\n $newUser->save();\n auth()->login($newUser, true);\n }\n return redirect()->to('/home');\n }", "title": "" }, { "docid": "aa44126f0031c97e2762b886c88cf4fc", "score": "0.63141215", "text": "public function handleProviderCallback($provider)\n {\n try {\n \t//dd('here');\n $user = \\Socialite::with($provider)->user();\n } catch (\\Exception $e) {\n \t//dd('or here');\n return redirect('/login');\n }\n $authUser = $this->findOrCreate(\n $user,\n $provider\n );\n\n auth()->login($authUser, true);\n\n return redirect()->intended('/mycv')->with('success-msg','Welcome '.$authUser->name);\n }", "title": "" }, { "docid": "8b8d76792cd97de5214753d522faedcb", "score": "0.63134164", "text": "public function redirectToLogin() {\n\t\tif (Auth::guest())\t{\n\t\t\treturn Redirect::guest('login');\n\t\t}\n\t\telse {\n\t\t\treturn View::make('housing.post');\n\t\t}\n\t}", "title": "" }, { "docid": "ba457b5ae44dfd30f161cfa56b748854", "score": "0.6297579", "text": "public static function redirect() {\n if (defined('OPENID_REDIRECTURL')) {\n $url = OPENID_REDIRECTURL;\n } else if (isset($_SESSION['openid']['redirect'])) {\n $url = $_SESSION['openid']['redirect'];\n } else {\n $url = self::getCurrentURL();\n }\n\n self::doRedirect($url);\n }", "title": "" }, { "docid": "7e6382d0bc1e6b78dcc3845969a9c242", "score": "0.6294866", "text": "function implicitAuthReturn() {\n\t\t$this->validate();\n\n\t\tif (Validation::isLoggedIn()) {\n\t\t\tPKPRequest::redirect(null, 'user');\n\t\t}\n\n\t\t// Login - set remember to false\n\t\t$user = Validation::login(Request::getUserVar('username'), Request::getUserVar('password'), $reason, false);\n\n\t\tPKPRequest::redirect(null, 'user');\n\t}", "title": "" }, { "docid": "b5b9a442979d64f99c4a1daee59744bf", "score": "0.6292216", "text": "public function login() {\n header(\"location:\" . $this->loginServiceUrl . '?original_uri=' . urlencode($this->origin . \"&return=1\"));\n }", "title": "" }, { "docid": "b5b9a442979d64f99c4a1daee59744bf", "score": "0.6292216", "text": "public function login() {\n header(\"location:\" . $this->loginServiceUrl . '?original_uri=' . urlencode($this->origin . \"&return=1\"));\n }", "title": "" } ]
7d8c1e66debb3d124fd951c4a4fe2955
Format an error response
[ { "docid": "0ecf3da0107483f7815b1f2cbe552734", "score": "0.0", "text": "private function _handleError( $statusCode, $data = NULL, $errorType = NULL )\n {\n /**\n * If not specified, attempt to determine data-type of passed error\n */\n if ( is_null( $errorType ) )\n {\n if ( is_object( $data ) )\n {\n $errorType = get_class( $data ); \n }\n elseif ( is_array( $data ) )\n {\n $errorType = self::DATATYPE_ARRAY;\n }\n elseif (is_string( $data ) )\n {\n $errorType = self::DATATYPE_STRING;\n }\n elseif ( is_int( $data ) )\n {\n $errorType = self::DATATYPE_CODE;\n }\n }\n \n /**\n * Parse error message from payload\n */\n switch ( $errorType )\n {\n case self::DATATYPE_ARRAY :\n $message = NULL;\n \n if ( !empty ( $data[ self::KEY_MESSAGE ] ) )\n {\n $message = $data[ self::KEY_MESSAGE ];\n }\n break;\n \n\t\t\tcase self::DATATYPE_EXCEPTION_LDAP:\n if ( $data->getCode() == \n \\core\\errorhandling\\LdapException::NO_RESULTS)\n {\n $message = NULL;\n $statusCode = self::STATUS_NOT_FOUND;\n }\n else\n {\n $message = $data->getMessage();\n $code = $data->getCode();\n if ( $code > 500 AND $code != $statusCode )\n {\n $statusCode = $code;\n }\n else\n {\n $statusCode = self::STATUS_ERROR;\n }\n break;\n }\n break;\n \n case self::DATATYPE_EXCEPTION :\n $message = $data->getMessage();\n $code = $data->getCode();\n if ( $code > 500 AND $code != $statusCode )\n {\n $statusCode = $code;\n }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$statusCode = self::STATUS_ERROR;\n\t\t\t\t}\n break;\n \n case self::DATATYPE_INVALID_ARG :\n $message = $data->getMessage();\n $statusCode = $data->getCode();\n if ( $statusCode === 0 ) $statusCode = self::STATUS_BAD_REQUEST;\n break;\n \n case self::DATATYPE_STRING :\n if (stristr( $data, self::DELIMITER ) )\n {\n $dataSegments = explode( self::DELIMITER, $data );\n $statusCode = intval( $dataSegments[ self::ENUM_CODE ] );\n $message = $dataSegments[ self::ENUM_MESSAGE ];\n }\n else\n {\n $message = $data;\n }\n break;\n \n case self::DATATYPE_CODE :\n $message = NULL;\n $statusCode = $data;\n break;\n \n default :\n $message = NULL;\n }\n \n throw new RestException( $statusCode, $message );\n }", "title": "" } ]
[ { "docid": "76242a45d7ce41adb18270d064810472", "score": "0.7234382", "text": "static function formatError(object $response): array;", "title": "" }, { "docid": "f7df394de28c3120ba7867a26bf909b4", "score": "0.71747833", "text": "function libhours_api_error(\n $format = 'html',\n $errormsg = 'Unknown error occurred.'\n) {\n\n switch ($format) {\n case 'json':\n $return['status'] = $errormsg;\n $output = json_encode($return);\n drupal_set_header('Content-Type: application/json');\n break;\n\n default:\n $output = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">'\n . '<html><head><title>Error</title></head><body><strong>Error: </strong> ' . $errormsg . '</body></html>';\n break;\n }\n\n print $output;\n die();\n}", "title": "" }, { "docid": "027fddb5682c8f70911c1576adae14a7", "score": "0.7045506", "text": "abstract protected function format_response($response);", "title": "" }, { "docid": "32099c9de064862ba95a53a3d8aca830", "score": "0.67273456", "text": "public function formaterResponseErrorData($response,$request)\n {\n $national = str_replace(\".\",\",\",str_replace(\",\",\"\",$response['amount']));\n //$foreign = RateExteriorCalculator::calculateRateChange($national);\n //new RateExteriorCalculator($this->rf,'USD');\n //$dollar = RateExteriorCalculator::calculateRateChange($national);\n $name = $request['holder'];\n return [\n 'id' => null,\n 'success' => false,\n 'code' => $response['status'],\n 'reference' => null,\n 'status' => 2,\n //'amount' => $foreign,\n 'response' => json_encode($response),\n 'currency' => $this->currency,\n //'dollarPrice' => $dollar,\n 'nationalPrice' => $national,\n 'responsecode' => $response['type'],\n 'holder' => $name,\n 'message' => $response['message'],\n ];\n }", "title": "" }, { "docid": "7a8d0f845309246c888d3df3cb6fa7c8", "score": "0.663932", "text": "public static function errorFormat($statuscode = 404, $message) {\n\n $result = array('code' => $statuscode, 'error' => $message);\n return response()->json($result, $statuscode);\n }", "title": "" }, { "docid": "f187668a0381a1cdb71c406644e1f6ea", "score": "0.6633074", "text": "public function getResponseErrors();", "title": "" }, { "docid": "d2a29fef45bcc82ffb75531be4ac2ba4", "score": "0.6572584", "text": "public function getErrorFromResponse($response) {\r\n\t\treturn str_replace(array(\"\\r\", \"\\n\"), \" \", strip_tags($response));\r\n\t}", "title": "" }, { "docid": "d6e71e2088024392fc4c3417f099fb05", "score": "0.654117", "text": "public function formatException($e) {\n\t\t$error = new RestError (@$e->getCode(), @$e->getMessage(), @$e->getTraceAsString(), @$e->getFile(), 500);\n\t\treturn $this->format($error->asArray());\n\t}", "title": "" }, { "docid": "8c6c3a434f6940058717f3faec4cd680", "score": "0.64953685", "text": "protected static function error() {\n $response = ['success' => false, 'message' => 'Something went wrong'];\n return json_encode($response);\n }", "title": "" }, { "docid": "4b16b37ec2c2015db442ecbee3a46a23", "score": "0.6485747", "text": "protected function formatResultErrors()\n\t{\n\t\tif (!$this->errorCollection->isEmpty())\n\t\t{\n\t\t\t/** @var Main\\Error $error */\n\t\t\tforeach ($this->errorCollection->toArray() as $error)\n\t\t\t{\n\t\t\t\t$this->arResult['errorMessage'][] = $error->getMessage();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "db3f6ccacc47eaac8ba46f28ebb07f0d", "score": "0.6471692", "text": "function outputURLError()\r\n {\r\n\r\n $this->outputError(\"400\", \"error\", \"Query failed\", \"URL string has incorrect format.\");\r\n\r\n }", "title": "" }, { "docid": "a59c8fe5a5c83814fcf261186acf43b2", "score": "0.645858", "text": "function error_response($error_message, $error_code = 400){\n $responses = array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Time-out',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Large',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested range not satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Time-out',\n 505 => 'HTTP Version not supported',\n );\n if (isset($responses[$error_code])) {\n header(\"HTTP/1.0 \".$error_code.\" \".$responses[$error_code]);\n echo $error_message;\n exit();\n }\n}", "title": "" }, { "docid": "cae091e83a2403e2e24c6df4aabee03f", "score": "0.6426316", "text": "public function renderError();", "title": "" }, { "docid": "d88390be44b1739c6b9df80aa37c5c22", "score": "0.63931197", "text": "public function get_validation_error(array $response): string {\n $isgradable = $this->is_gradable_response($response);\n if ($isgradable) {\n return '';\n }\n return lang::one_answer_per_row();\n }", "title": "" }, { "docid": "35b42cdd8734731cb7ab7c09048dfc50", "score": "0.63698184", "text": "function extractError($response)\n{\n if (strcasecmp($response['status'], \"ok\")===0) {\n return \"ok\";\n }\n $message = \"ok\";\n //below two for auth related and rate limited\n if ($response['result']['errors']['message']) {\n if ($response['result']['errors']['code']<9000) {\n $message = $response['result']['errors']['message'];\n }\n } elseif (is_array($response['result']['errors'])) {\n if ($response['result']['errors'][0]['message']) {\n if ($response['result']['errors'][0]['code']<9000) {\n $message = $response['result']['errors'][0]['message'];\n }\n }\n }\n if (strcmp($message, \"you are not permitted to access this information\")===0) {\n return \"ok\";\n } else {\n return $message;\n }\n}", "title": "" }, { "docid": "b07b9534ef490b300cdfc18510ed3f76", "score": "0.63586175", "text": "function renderAsError() {\n\t\theader('Content-type: text/xml; charset='.$this->charset);\n\t\theader('X-JSON: false');\n\t\tdie('<t3err>'.htmlspecialchars($this->errorMessage).'</t3err>');\n\t}", "title": "" }, { "docid": "3071306b18b25f3f58b230cd5fbdc8dd", "score": "0.6346225", "text": "public function outputErrors() {\n // if accept text/html\n if (isset($_SERVER['HTTP_ACCEPT']) && strstr($_SERVER['HTTP_ACCEPT'],'text/html')) {\n require_once(JELIX_LIB_CORE_PATH.'response/jResponseBasicHtml.class.php');\n $response = new \\jResponseBasicHtml();\n $response->outputErrors();\n }\n else {\n // output text response\n header(\"HTTP/{$this->httpVersion} 500 Internal jelix error\");\n header('Content-type: text/plain');\n echo App::router()->getGenericErrorMessage();\n }\n }", "title": "" }, { "docid": "01ff7421ac17191fa73f70a4d619b1d4", "score": "0.63113624", "text": "function _formatError($error)\n\t{\n\t\tif(!is_array($error)) return $error;\n\t\t\n\t\t$lang = $this->params['lang'];\n\t\t$allLangs = $lang->getAll();\n\n\t\t$output = \"\";\n\t\t\n\t\tforeach($error as $key => $msg) \n\t\t{\n\t\t\tif(!is_numeric($key)) $output .= \"$msg<br />\";\n\t\t}\n\n\t\t// Display any language-related errors with their language\n\t\tforeach($allLangs as $lang) \n\t\t{\n\t\t\tif(isset($error[$lang['id']]))\n\t\t\t{\n\t\t\t\tif(count($allLangs) > 1) $output .= $this->Html->link($lang['code'], '#', array('onclick' => \"LDF.changeFieldLangs('\".$lang['id'].\"');return false;\")) . \": \";\n\t\t\t\t$output .= $error[$lang['id']] . \"<br />\";\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "6be6e58e05d7476a61d6946e8990c523", "score": "0.6298713", "text": "function sendError( $errMesg )\r\n{\r\n echo \"<error>$errMesg</error>\";\r\n echo \"<status></status>\";\r\n echo \"<username></username>\";\r\n echo \"<name></name>\";\r\n\r\n echo \"</responseData>\";\r\n exit;\r\n}", "title": "" }, { "docid": "7fbf14408967f859e6fbeddc66896a3b", "score": "0.6294821", "text": "protected function formatResponse() : string {\n $responses = array();\n\n foreach (func_get_args() as $response) {\n $responses = array_merge($responses, (array) $response);\n }\n\n return array_to_newlines($responses);\n }", "title": "" }, { "docid": "d47726fe6a49c2d34624180861d1a226", "score": "0.62768465", "text": "function send_error($code, $message){\n global $responses;\n $response = $code . \" - \" . $responses[400] . \": \" . $message;\n header($_SERVER['SERVER_PROTOCOL'] . \" \" . $response);\n $errors[\"error\"] = $response; \n print(json_encode($errors));\n Die();\n}", "title": "" }, { "docid": "defda6ab02aaede12ea293f293879dc6", "score": "0.6274134", "text": "private function getError($code){ \n\t\t$response['error_code'] = $code;\n\t\treturn ['res_code'=>$code, 'response'=>$response];\n\t}", "title": "" }, { "docid": "aff66338f893bc43ee7114e2888ec65e", "score": "0.62681913", "text": "private function getError()\n {\n return json_encode(Array('error' => 1, 'info' => $this->errMessage));\n }", "title": "" }, { "docid": "8150514209741ada71007d5a0efffac4", "score": "0.6247166", "text": "function errorMessage($error){\r\n\theader(\"HTTP/1.1 409 \".$error);\r\n\techo $error;\r\n\texit;\r\n}", "title": "" }, { "docid": "709c3b264eabda92d7ee8cf44ebeb809", "score": "0.62236434", "text": "function build_error_response( $message ){\n\t\t$response = array();\n\t\t$response['success'] = false;\n\t\t$response['error'] = $message;\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "c2e2679b3f9eb06be16e2014819e541c", "score": "0.62160033", "text": "function ErrorResponse($msg) {\r\n}", "title": "" }, { "docid": "c940f4f6b196aeeaaba4e6ac3ae62fef", "score": "0.6199424", "text": "protected function response_error( $response ) {\n\t\t$this->label = esc_html__( 'An error occurred while checking whether your site can be found by search engines', 'wordpress-seo' );\n\t\t$this->status = self::STATUS_RECOMMENDED;\n\t\t$this->badge['color'] = 'red';\n\n\t\t$this->description = sprintf(\n\t\t\t'%s<br><br>%s',\n\t\t\tsprintf(\n\t\t\t\t/* translators: %1$s: Expands to 'Ryte', %2$s: Expands to 'Yoast SEO'. */\n\t\t\t\tesc_html__( '%1$s offers a free indexability check for %2$s users. The request to %1$s to check whether your site can be found by search engines failed due to an error.', 'wordpress-seo' ),\n\t\t\t\t'Ryte',\n\t\t\t\t'Yoast SEO'\n\t\t\t),\n\t\t\tsprintf(\n\t\t\t\t/* translators: 1: The Ryte response raw error code, if any. 2: The error message. 3: The WordPress error code, if any. */\n\t\t\t\t__( 'Error details: %1$s %2$s %3$s', 'wordpress-seo' ),\n\t\t\t\t$response['raw_error_code'],\n\t\t\t\t$response['message'],\n\t\t\t\t$response['wp_error_code']\n\t\t\t)\n\t\t);\n\n\t\t$this->actions = sprintf(\n\t\t\t/* translators: %1$s: Opening tag of the link to the Yoast help center, %2$s: Link closing tag. */\n\t\t\tesc_html__( 'If this is a live site, %1$sit is recommended that you figure out why the check failed.%2$s', 'wordpress-seo' ),\n\t\t\t'<a href=\"' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/onpagerequestfailed' ) ) . '\" target=\"_blank\">',\n\t\t\tWPSEO_Admin_Utils::get_new_tab_message() . '</a>'\n\t\t);\n\t\t$this->actions .= '<br /><br />';\n\n\t\t$this->add_ryte_link();\n\t}", "title": "" }, { "docid": "6a9fa5d0f23b8fb225e92def8ee5bb9e", "score": "0.61942816", "text": "function error_response($response, $error_code = 200) \n{\n http_response_code($error_code);\n header(\"Content-Type: application/json\");\n echo json_encode($response);\n exit(0);\n}", "title": "" }, { "docid": "ec3e204ab40a09897aa9e24f277fd314", "score": "0.61771137", "text": "public function getErrorsFromResponse($response)\n {\n if (is_array($response)) {\n return implode(' ', $response);\n } else {\n $response;\n }\n }", "title": "" }, { "docid": "af326906505cc0a635caeb563148052c", "score": "0.61711746", "text": "function invalid_request_response() { #API2\r\n return \"['ERROR: Request is invalid']\";\r\n}", "title": "" }, { "docid": "974651d986638904ffc499b54fcef3dd", "score": "0.61568093", "text": "public function getErrorsToString($response, $asHtml = false, $addSlashes = true)\n\t{\n\t\t$errmsg = '';\n\t\t\n\t\tif (count($response->getErrors()))\n\t\t\tforeach ($response->getErrors() as $errorEle)\n\t\t\t\t$errmsg .= '#' . $errorEle->getErrorCode() . ' : ' . ($asHtml ? htmlentities($errorEle->getLongMessage()) : $errorEle->getLongMessage()) . ($asHtml ? \"<br>\" : \"\\r\\n\");\n\n\t\tif ($addSlashes)\n\t\t\treturn addslashes($errmsg);\n\t\telse \n\t\t\treturn $errmsg;\n\t}", "title": "" }, { "docid": "f90822b5ae40f1b28887e41f1aa67ef9", "score": "0.6151693", "text": "public function _formatResponseMessage() : string\n {\n $message = ucfirst($this->_statSelected).\" \".$this->_identifierSelected.\"s per \".\n $this->_periodSelected.\" retrieved successfully.\";\n\n return $message;\n }", "title": "" }, { "docid": "0403821304ef93391c3cd227ed4c5ebb", "score": "0.61344", "text": "public abstract function last_error_as_html ();", "title": "" }, { "docid": "1d67ac1da0d2ef662b44ba3cc7824f6a", "score": "0.6125867", "text": "public function api_error_message() {\r\n return $this->api_error;\r\n }", "title": "" }, { "docid": "36f35f117c7b655aff29f2d8b93ed007", "score": "0.61198646", "text": "public function wrongApiFormat(string $else)\n {\n header('Content-Type: application/json');\n echo json_encode([\n 'status' => 'error',\n 'error' => [\n 'type' => 'wrong API request',\n 'value' => $else,\n 'message' => 'not a valid API request'\n ]\n ], JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "d2bc14833aef7f2fefa8fb6517dbc785", "score": "0.61094475", "text": "public function responseError(\\Exception $exception)\n {\n return $this->formatResponse->responseError($exception);\n }", "title": "" }, { "docid": "25d4b0033de97ec18d57890adc827508", "score": "0.61017823", "text": "private function getErrorMessage(ResponseInterface $response): string\n {\n $httpCode = $response->getStatusCode();\n $statusCodeMessage = \"Server responded with {$httpCode}\";\n\n if (\n $response->hasHeader('Content-Type') &&\n $response->getHeader('Content-Type')[0] !== 'application/json'\n ) {\n return $statusCodeMessage;\n }\n\n $jsonData = Json::decode((string)$response->getBody());\n\n $errorCode = $jsonData['code'] ?? 'Error';\n\n // Throw the error message that's included in the response.\n if (isset($jsonData['errors'][0]['property']) && isset($jsonData['errors'][0]['message'])) {\n $errorMessage = $jsonData['errors'][0]['property'] . ': ' . $jsonData['errors'][0]['message'];\n return \"{$errorCode} - {$errorMessage}\";\n }\n\n // Throw a general error message.\n return \"{$errorCode} - {$statusCodeMessage}\";\n }", "title": "" }, { "docid": "ea58cd7ce010deab3c28b75bb3a2f044", "score": "0.6100899", "text": "public function getResponseException(Exception $e)\n\t{\n\t\t$message = htmlentities($e->getMessage(), ENT_COMPAT, \"UTF-8\");\n\t\tswitch($this->outputFormat)\n\t\t{\n\t\t\tcase 'original':\n\t\t\t\tthrow $e;\n\t\t\tbreak;\n\t\t\tcase 'xml':\n\t\t\t\t@header(\"Content-Type: text/xml;charset=utf-8\");\n\t\t\t\t$return =\n\t\t\t\t\t\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n\" .\n\t\t\t\t\t\"<result>\\n\".\n\t\t\t\t\t\"\\t<error message=\\\"\".$message.\"\\\" />\\n\".\n\t\t\t\t\t\"</result>\";\n\t\t\tbreak;\n\t\t\tcase 'json':\n\t\t\t\t@header( \"Content-type: application/json\" );\n\t\t\t\t// we remove the \\n from the resulting string as this is not allowed in json\n\t\t\t\t$message = str_replace(\"\\n\",\"\",$message);\n\t\t\t\t$return = '{\"result\":\"error\", \"message\":\"'.$message.'\"}';\n\t\t\tbreak;\n\t\t\tcase 'php':\n\t\t\t\t$return = array('result' => 'error', 'message' => $message);\n\t\t\t\tif($this->caseRendererPHPSerialize())\n\t\t\t\t{\n\t\t\t\t\t$return = serialize($return);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$return = 'Error: '.$message;\n\t\t\tbreak;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "4e27f25a63d1d02e3d5d631fac723354", "score": "0.60735327", "text": "public static function output_error($error_message, $error_header = 404, $exit = true) {\n $messages = array(\n // Client Error 4xx\n 400 => \"Bad Request\",\n 401 => \"Unauthorized\",\n 402 => \"Payment Required\",\n 403 => \"Forbidden\",\n 404 => \"Not Found\",\n 405 => \"Method Not Allowed\",\n 406 => \"Not Acceptable\",\n 407 => \"Proxy Authentication Required\",\n 408 => \"Request Timeout\",\n 409 => \"Conflict\",\n 410 => \"Gone\",\n 411 => \"Length Required\",\n 412 => \"Precondition Failed\",\n 413 => \"Request Entity Too Large\",\n 414 => \"Request-URI Too Long\",\n 415 => \"Unsupported Media Type\",\n 416 => \"Requested Range Not Satisfiable\",\n 417 => \"Expectation Failed\",\n // Server Error 5xx\n 500 => \"Internal Server Error\",\n 501 => \"Not Implemented\",\n 502 => \"Bad Gateway\",\n 503 => \"Service Unavailable\",\n 504 => \"Gateway Timeout\",\n 505 => \"HTTP Version Not Supported\",\n 509 => \"Bandwidth Limit Exceeded\"\n );\n /* any $message (event \"X\") is valid, but it's recommended to send the right message to the browser */\n $message = \"X\";\n if (isset($messages[$error_header])) {\n $message = $messages[$error_header];\n }\n header(\"HTTP/1.0 {$error_header} {$message}\", true, $error_header);\n echo $error_message;\n if ($exit) {\n exit;\n }\n }", "title": "" }, { "docid": "127d1d232fa44ff154a11d650ed7043a", "score": "0.60733324", "text": "public function render()\n {\n return response()->json(['error' => 'Превышено число сообщений для отправки на этот номер телефона, попробуйте позже.'], 422);\n }", "title": "" }, { "docid": "7712acfca56e7d1985bc9544e1635726", "score": "0.6067415", "text": "public static function jsonError()\n {\n $msg = array('status' => \"Fail\", \"msg\" => \"Invalid Json format\");\n $msg = array(\"error\"=>$msg);\n REST::response($msg,400);\n }", "title": "" }, { "docid": "1456be17d96c95259ab99d941fc8ff7e", "score": "0.6063947", "text": "private function getErrorResponse($response, $reason , $param){\r\n \r\n $this->response = new stdClass(); \r\n $this->response->status = self::ERROR ;\r\n $this->response->errorReason = str_replace(\"%s\", $param, $reason); \r\n $this->response->jsonResponse = !function_exists('json_decode') ? $this->response : json_encode($this->response); \r\n\r\n\r\n}", "title": "" }, { "docid": "d10443681e0554c0e8789af12598ae3c", "score": "0.6063897", "text": "function errorOutput($output, $code = 500) {\n http_response_code($code);\n echo json_encode($output);\n}", "title": "" }, { "docid": "b853b8ef2c57e16739e3f20330356e80", "score": "0.60595983", "text": "private function formatResponse() {\n try {\n $outputType = $this->getOutputType();\n switch($outputType) {\n case self::RESP_SOAP:\n case self::RESP_RAW:\n break;\n case self::RESP_JSON:\n $this->setResponse(json_encode($this->getResponse()));\n break;\n case self::RESP_XML:\n case self::RESP_XML_TEST:\n $resp = $this->getResponse();\n $rootNode = $this->getRootNode();\n $xml = new \\SimpleXMLElement(\"<?xml version=\\\"1.0\\\"?><\" . $rootNode . \"></\" . $rootNode . \">\");\n $this->arrayToXml($resp, $xml);\n $this->setResponse($xml->asXML());\n break;\n }\n } catch(\\Exception $ex) {\n throw new \\Exception(\"Response formatting error\", self::ERROR_500);\n }\n return $this;\n }", "title": "" }, { "docid": "75d125e092830e5923a5389b32043d06", "score": "0.60590446", "text": "private function errorResponse($message) {\n \\Yii::$app->response->statusCode = 400;\n\n return $this->asJson(['error' => $message]);\n }", "title": "" }, { "docid": "ca19e712274ce06e6726ae52e8604a0b", "score": "0.6055669", "text": "function returnError($msg)\n{\n\theader('Content-Type: application/json');\n\t$response = array\n\t(\n\t\t\"error\" => $msg\n\t);\n\techo json_encode($response);\n\tdie;\n}", "title": "" }, { "docid": "c3e8c3bbac5a3944d394c873bf5e4a92", "score": "0.6041389", "text": "public function errorAction()\n {\n $res = $this->getResponse();\n $res->setStatusCode(Response::HTTP_INTERNAL_SERVER_ERROR);\n $res->setContent(self::ERROR_CONTENT);\n\n return($res);\n }", "title": "" }, { "docid": "6e7f6a01a1c05eec1d20272e28b0ab5c", "score": "0.60353345", "text": "public function processErrors($response)\n {\n\n if (!empty($this->_error_stack)) {\n $error = '';\n foreach ($this->_error_stack as $_error) {\n $error .= '; ' . $_error;\n }\n }\n\n return $error;\n }", "title": "" }, { "docid": "a92d430114f4cb31cd7be45ccfff8dc5", "score": "0.6033578", "text": "function errorResponse ($messsage) {\n header('HTTP/1.1 400 Bad Request');\n echo json_encode(array('message' => $messsage));\n exit(0);\n}", "title": "" }, { "docid": "bf7ef32eaaf7eeaab78563a934a7a901", "score": "0.6008977", "text": "protected function validateResponseError($error){\n $this->status_code = 422;\n return $this->apiResponse(null , $error->errors());\n }", "title": "" }, { "docid": "f21bc3b6d6181b4ac426c63f25260255", "score": "0.60043067", "text": "function error_reports($error_msg) {\n\n $response[\"success\"] = 0;\n $response[\"message\"] = $error_msg;\n echo json_encode($response);\n die();\n }", "title": "" }, { "docid": "8bf8dc4f12d88376905dbf80632527aa", "score": "0.6003861", "text": "public function getError($error){\n \n if(in_array($error , $this->errorArray )){\n \n return \"<span class='errorMessage'>$error</span>\" ;\n\n }\n \n }", "title": "" }, { "docid": "a7ba45cb6b2acf31c00ddfa75cbf0baf", "score": "0.6000905", "text": "public function getClientErrorDescription();", "title": "" }, { "docid": "db2a3d5ffd0e2978802c12774bb16a75", "score": "0.5991893", "text": "function error($msg) {\n header(\"HTTP/1.1 400 Invalid request\");\n header(\"Content-type: text/plain\");\n echo $msg;\n }", "title": "" }, { "docid": "e9d8968ee77cfff919c67c0dfb009454", "score": "0.59837526", "text": "function print_errors($msg) {\n header(\"HTTP/1.1 400 Invalid Request\");\n header(\"Content-type: text/plain\");\n echo $msg;\n }", "title": "" }, { "docid": "470769ee709dc7b44be13f8078a8f0f2", "score": "0.59792954", "text": "function returnWithError($err) {\n $retValue = '{\"id\":0, \"firstName\":\"\", \"lastName\":\"\", \"error\":\"' . $err . '\"}';\n sendResultInfoAsJson( $retValue );\n }", "title": "" }, { "docid": "dea8da61d40f631546f01271c135f516", "score": "0.59732664", "text": "protected function formatResponse()\n {\n // $this->response->withHeaders(['Content-Type' => 'vnd.api+json']);\n $this->response->withHeaders(['Content-Type' => 'application/json']);\n }", "title": "" }, { "docid": "d8cea59a9c694056379d33cdbbeebc90", "score": "0.5968552", "text": "protected function formatError($message) {\n\t\t$output = '<div style=\"border: solid 2px black;\tbackground-color: #f00; color: #fff; padding: 10px; font-weight: bold; margin: 10px 0px 10px 0px;\">';\n\t\t$output .= nl2br(htmlspecialchars($message));\n\t\t$output .= '</div>';\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "ebea0aefb537a17b65f1c6becec7d291", "score": "0.59651595", "text": "protected function routeError()\n {\n return $this->jsonResponse('Not a valid endpoint', 404);\n }", "title": "" }, { "docid": "6ca1fb07b94be880ff695ea0e1c2baa6", "score": "0.59625477", "text": "function badRequest($response, $msg = \"Bad Request. The request could not be understood by the server due to malformed syntax.\") {\n $data = array(\"error\" => true, \"msg\" => $msg);\n return echoResponse($response, $data, 400);\n}", "title": "" }, { "docid": "4b75ebd4bbf7d246028d148a8ea18fe9", "score": "0.5959189", "text": "private function errorResponse($class)\n {\n call_user_func(\"$class::macro\", 'error', function ($data = 'invalid', $code = 400) {\n return $this->json([\n 'success' => false,\n 'data' => $data\n ], $code);\n });\n }", "title": "" }, { "docid": "e5b0c4298458224096342ee15d5a127c", "score": "0.5957366", "text": "public function error_str() {\n\t\treturn implode(\"\\r\\n\", $this->errors);\n\t}", "title": "" }, { "docid": "77f2c0d49f0b20971c7354be12f6cce2", "score": "0.5954374", "text": "function result_response_parse_error($message) {\n $result = array(\n 'success' => false,\n 'error' => ERROR_RESPONSE_PARSE,\n 'message' => $message,\n );\n return $result;\n}", "title": "" }, { "docid": "0544db7562f52bff5cf5f4fbf1ec29af", "score": "0.594681", "text": "public function formatError($error)\n\t{\n\t\treturn call_user_func($this->error_message_formatter, $error);\n\t}", "title": "" }, { "docid": "5caf763a10065a293dfdbf746d65621c", "score": "0.5945683", "text": "function set_and_return_error( $err_string ) {\r\n $return_array = array(\r\n \"error\" => true,\r\n \"error_msg\" => \"Server: \" . $err_string,\r\n );\r\n\r\n echo json_encode( $return_array );\r\n}", "title": "" }, { "docid": "12bce899ec1defaf3c55dfe213a42fe2", "score": "0.59387404", "text": "public function formatErrors()\n {\n $result = '';\n foreach($this->getErrors() as $attribute => $errors) {\n $result .= implode(\" \", $errors).\" \";\n }\n return $result;\n }", "title": "" }, { "docid": "12bce899ec1defaf3c55dfe213a42fe2", "score": "0.59387404", "text": "public function formatErrors()\n {\n $result = '';\n foreach($this->getErrors() as $attribute => $errors) {\n $result .= implode(\" \", $errors).\" \";\n }\n return $result;\n }", "title": "" }, { "docid": "a78b82dbc2c7167f56bf1cee504bc328", "score": "0.5937019", "text": "protected function getErrorMessage(Response $response): string\n {\n return $response->json('error_message') ?? $response->body();\n }", "title": "" }, { "docid": "e95e6c2998e0bf12f5a17ec517e2af9d", "score": "0.5936704", "text": "function errorResponse ($messsage) {\n header('HTTP/1.1 500 Internal Server Error');\n die(json_encode(array('message' => $messsage)));\n }", "title": "" }, { "docid": "e95e6c2998e0bf12f5a17ec517e2af9d", "score": "0.5936704", "text": "function errorResponse ($messsage) {\n header('HTTP/1.1 500 Internal Server Error');\n die(json_encode(array('message' => $messsage)));\n }", "title": "" }, { "docid": "b62750e3748f8e5707d14f11ebec8b57", "score": "0.59350145", "text": "function produceError($message){\n echo json_encode(['status'=>'error','message'=>$message]);\n }", "title": "" }, { "docid": "084c50745cac9542905529dcc576b60e", "score": "0.5934725", "text": "function restserver_error(string $error, int $code = 400){\n\n\t\t//Return response\n\t\trestserver_response(\n\t\t\tarray(\n\t\t\t\t\"error\" => array(\n\t\t\t\t\t\"message\" => $error,\n\t\t\t\t\t\"code\" => $code,\n\t\t\t\t)\n\t\t\t)\n\t\t\t, $code\n\t\t);\n\t}", "title": "" }, { "docid": "94d7167a9442a50efc8787159d9a6b2b", "score": "0.5931246", "text": "protected function responseError($message)\n\t{\n\t\t$this->_result['error'] = $message;\n\t\t$this->output();\n\t}", "title": "" }, { "docid": "badb4fbedf8113c84b0171b6df2c6b40", "score": "0.59292364", "text": "public static function responseGetErrorMsg( $response )\n\t{\n\t\t$msg = '';\n\t\tif( self::responseHasErrors( $response ) ) \n\t\t{\t\t\t\t\t\t\n\t\t\tif( isset( $response->msg ) )\n\t\t\t\t$msg = $response->msg;\n\t\t\telseif( isset( $response->description ) )\n\t\t\t\t$msg = $response->description;\t\t\t\n\t\t}\n\t\t\t\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "c1d8452cd2626a899c9db3d079815790", "score": "0.59281284", "text": "private function response()\n {\n $response = (new Response())->json(array_reverse($this->errors),500);\n ResponseFoundation::send($response);\n }", "title": "" }, { "docid": "9e92911c43df38a44e88235964931b57", "score": "0.59260994", "text": "public function getErrorData(){\n\t\t//If error exists publish it\n\t\tif($this->error_type!=null)\n\t\t{\n\t\t\t//Creates and returns the full error message \n\t\t\treturn \"<p class='msg \".$this->error_type.\"'>\".$this->error_message.\"</p>\";\n\t\t}\n\t}", "title": "" }, { "docid": "86a1ca0764f29a20790428548d99d92e", "score": "0.59242165", "text": "function respond_error($error, $error_msg, $error_ext = '')\n{\n\tglobal $harubi_respond_with_logs;\n\tglobal $harubi_logs;\n\t\n\t$respond = array(\n\t\t'status' => 0,\n\t\t'data' => array(\n\t\t\t'error' => $error, \n\t\t\t'error_msg' => $error_msg,\n\t\t\t'error_ext' => $error_ext\n\t\t\t)\n\t\t);\n\t\t\n\tif ($harubi_respond_with_logs)\n\t\t$respond['data']['logs'] = $harubi_logs;\n\t\t\n\treturn $respond;\n}", "title": "" }, { "docid": "6208e078b8e7e1d590f40ba0225426d7", "score": "0.5923222", "text": "public function testErrorResponse()\n {\n $error = new Error();\n $error->setStatus('400');\n $error->setTitle('Bad request');\n $error->setDetail('The request was not formed well');\n\n $error2 = new Error();\n $error->setStatus('400');\n $error2->setTitle('Bad request 2');\n $error2->setDetail('The request was not formed well either');\n\n $test_errors = [$error, $error2];\n\n // make 2 manually checked correct arrays:\n $validated_array = [\n 'errors' => [\n // remember to clear nulls by flattening using process()\n $error->process(),\n $error2->process()\n ],\n 'meta' => (object)['status' => null],\n 'jsonapi' => (object)['version' => '1.0']\n ];\n $validated_array2 = [\n 'errors' => [\n // remember to clear nulls by flattening using process()\n $error2->process()\n ],\n 'meta' => (object)['status' => null],\n 'jsonapi' => (object)['version' => '1.0']\n ];\n\n $validated_json = json_encode($validated_array, true);\n $validated_json2 = json_encode($validated_array2, true);\n\n $json_api_formatter = new JsonApiFormatter();\n $json_api_formatter->setErrors($test_errors);\n\n $response = $json_api_formatter->errorResponse();\n $this->assertEquals($validated_json, $response);\n\n $json_api_formatter = new JsonApiFormatter();\n $response = $json_api_formatter->errorResponse([$error2]);\n $this->assertEquals($validated_json2, $response);\n }", "title": "" }, { "docid": "abe8bcf67aa6436946aec197dc4223e7", "score": "0.5919357", "text": "public function get_errors_html() {\n $html = '';\n foreach ($this->errors as $error) {\n $html .= $error . \"<br />\";\n }\n return $html;\n }", "title": "" }, { "docid": "5a9b735403850f888a5d8e59bddb63d2", "score": "0.59174275", "text": "public function generateDummyFailureResponse() {\r\n $failureResponseArr = $this->parseResponse($this->failureResponseTemplate);\r\n\r\n $failureResponseArr['L_ERRORCODE0'] = '81002';\r\n $failureResponseArr['L_SHORTMESSAGE0'] = 'Undefined Method';\r\n $failureResponseArr['L_LONGMESSAGE0'] = 'Method specified is not supported';\r\n\r\n return http_build_query($failureResponseArr);\r\n }", "title": "" }, { "docid": "56c504344b902a138e7800d270c30115", "score": "0.5916244", "text": "public static function unsuccessfulResponse($error){\n if (is_array($error)){\n $result['errors'] = $error;\n }\n else {\n array_push($result['errors'], $error);\n }\n $result['success'] = false;\n echo json_encode($result);\n }", "title": "" }, { "docid": "b7205ebc3b8e2ae8a310e2e08e551bc9", "score": "0.59154135", "text": "function errorMessage($message, $code)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\theader('Content-Type: application/json; charset=UTF-8');\n\tdie(json_encode(array('code' => $code, 'message' => $message)));\n}", "title": "" }, { "docid": "d7c5c15e546fb294c73ff70cba0c363a", "score": "0.5914858", "text": "private function errorResponse($message)\n {\n \\Yii::$app->response->statusCode = 400;\n\n return $this->asJson(['error' => $message]);\n }", "title": "" }, { "docid": "d8eb7749db798bdcc0ec65eb0b8d4867", "score": "0.5911321", "text": "protected function assertErrorFormat(TestResponse $response, $status, $data = [])\n {\n $response->assertStatus($status);\n $this->checkRequiredResponseHeaders($response);\n PHPUnit::assertMatchesRegularExpression(\n \"/\" . trim(\n View::file(\n config('digitonic.api-test-suite.templates.base_path') . 'errors/' . $status . '.blade.php',\n $data\n )->with(\n\n ['exception' => $response->exception\n ]\n )->render()\n\n) . \"/\",\n $response->getContent(),\n\n 'Error response structure doesn\\'t follow the template set up in '\n .config('digitonic.api-test-suite.templates.base_path').' errors/{errorStatusCode}.blade.php.'\n );\n }", "title": "" }, { "docid": "eb3ca412d34fe492a868c7f693b684fb", "score": "0.59025866", "text": "public function errorCommand($response, $error) {\n $response = array(\n 'Status' => self::ERROR_STATUS,\n 'Error' => array(\n 'ErrorCode' => $error\n )\n );\n return $response;\n }", "title": "" }, { "docid": "83c85756ec58fb4164533ce017552527", "score": "0.5893771", "text": "public static function generateErrResponse($status,$msg)\n\t{\n\t\t$resp=new BaseResponse();\t\t\t\n\t\t$resp->setStatus($status);\t\t\n\t\t$resp->setData(array(\"text\" => $msg));\t\t\n\t\treturn $resp;//error response\n\t}", "title": "" }, { "docid": "eb951a07999c528a1f4de01e49deec6c", "score": "0.58869934", "text": "public function processErrors($response)\n {\n preg_match('/<span id=\\\"lblErrStr\\\">(.*)<\\/span>/i', $response, $matches);\n\n $error = !empty($matches[1]) ? $matches[1] : __('error_occurred');\n\n if (!empty($this->error_stack)) {\n foreach ($this->error_stack as $_error) {\n $error .= '; ' . $_error;\n }\n }\n\n return $error;\n }", "title": "" }, { "docid": "7b063f2663b72bce410b2b409deaeed8", "score": "0.5883906", "text": "public function errorString() {\n return $this->error_string;\n }", "title": "" }, { "docid": "e7c297ebd355144bdb903d175b1ace2a", "score": "0.5872693", "text": "protected function getErrors(){\n\t\t$resp = array();\n\t\tforeach ($this->errors as $val) {\n\t\t\tswitch($val['error']){\n\t\t\t\tcase 'required':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field']. ' es requerido';\n\t\t\t\tbreak;\n\t\t\t\tcase 'min_len':\n\t\t\t\t\t$resp[$val['error']] = 'La longitud del campo '.$val['field'].' no puede ser menor a ' .$val['len']. ' caracteres';\n\t\t\t\tbreak;\n\t\t\t\tcase 'max_len':\n\t\t\t\t\t$resp[$val['error']] = 'La longitud del campo '.$val['field'].' no puede ser mayor a ' .$val['len']. ' caracteres';\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'alpha_numeric':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener caracteres alfanumericos';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alpha_spaces':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener caracteres alfanumericos con espacios';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alphabetic':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener letras';\n\t\t\t\tbreak;\n\t\t\t\tcase 'integer':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener numeros enteros';\n\t\t\t\tbreak;\n\t\t\t\tcase 'float':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener numeros enteros o decimales';\n\t\t\t\tbreak;\n\t\t\t\tcase 'email':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' contiene una direccion de email invalida';\n\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' tiene un formato incorrecto';\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_exists':\n\t\t\t\t\t$resp[$val['error']] = 'No subio ningun archivo '.$val['field'];\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_validate_problem':\n\t\t\t\t\t$resp[$val['error']] = 'El archivo '.$val['field'].' ha tenido algun problema';\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_validate_format':\n\t\t\t\t\t$resp[$val['error']] = 'El archivo '.$val['field'].' no cuenta con una extension valida';\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_validate_size':\n\t\t\t\t\t$resp[$val['error']] = 'El archivo '.$val['field'].' es muy grande';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\treturn $resp;\n\t}", "title": "" }, { "docid": "b7ec577f5c8c40bcae137a93d9619a24", "score": "0.586449", "text": "public function getError($error) {\n if (!in_array($error, $this->errorArray)) {\n $error = \"\";\n }return \"<span class='errorMessage'>$error</span>\";\n }", "title": "" }, { "docid": "85097aa83f69f05e5d855e0ce21138bd", "score": "0.5857967", "text": "public function error()\n {\n if (!is_array($this->errors)) {\n $this->errors = array((string) $this->errors);\n }\n $message = '';\n foreach ($this->errors as $error) {\n $message .= $error.\"\\n\";\n }\n\n return $message;\n }", "title": "" }, { "docid": "9624f6c0830cf9e993aaf7f584e65eed", "score": "0.5856362", "text": "protected function formatError($message)\n {\n if (version_compare(TYPO3_branch, '7', '>=')) {\n $output = '<div class=\"alert alert-error\">';\n $output .= '<div class=\"media\">';\n $output .= '<div class=\"media-body\">';\n //$output .= '<h4 class=\"alert-title\">Message head</h4>';\n $output .= '<p class=\"alert-message\">' . nl2br(htmlspecialchars($message)) . '</p>';\n $output .= '</div></div></div>';\n } else {\n $output = '<div class=\"typo3-message message-error\">';\n //$output .= '<div class=\"message-header\">Message head</div>';\n $output .= '<div class=\"message-body\">' . nl2br(htmlspecialchars($message)) . '</div>';\n $output .= '</div>';\n }\n\n return $output;\n }", "title": "" }, { "docid": "e15ba0fdd50e8d04e6721e9e493d028a", "score": "0.58512217", "text": "public function outputErrors()\n {\n $errors = '';\n foreach ($this->getErrors() as $key => $error) {\n $i = $key + 1;\n $errors .= $i . '. ' . $error->getMessage() . \"\\n\";\n $errors .= ' ' . $error->getMethod() . \"\\n\";\n $errors .= ' ' . $error->getFile() . \"\\n\";\n $errors .= ' Line ' . $error->getLine() . \"\\n\";\n }\n return $this->output($errors);\n }", "title": "" }, { "docid": "c84cea41e8bfb1e81ed1af8372cab09e", "score": "0.5849999", "text": "function errorFormatHTML($error)\r\n{\r\n\t$openBal = '<div class=\"alert alert-danger\" role=\"alert\"><strong>';\r\n\t$closeBal = '</strong></div>';\r\n\r\n\tif (is_string($error))\r\n\t{\r\n\t\treturn $openBal . $error . $closeBal;\r\n\t}\r\n\r\n\tif (is_array($error))\r\n\t{\r\n\t\tforeach ($error as $errorKey => $errorText)\r\n\t\t{\r\n\t\t\tif ($errorText <> '')\r\n\t\t\t{\r\n\t\t\t\t$error[$errorKey] = $openBal . $errorText . $closeBal;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $error;\r\n\t}\r\n\r\n\treturn '';\r\n\r\n\t\r\n}", "title": "" }, { "docid": "0e3fc229a08e5b6f425f25e2646824a9", "score": "0.58494323", "text": "function show_error($error) {\n\n\techo json_encode([\"errormsg\" => $error]);\n\texit;\n}", "title": "" }, { "docid": "d061d23f3ee27d1ab01dfcbc42541188", "score": "0.5847231", "text": "private function errorResponse($requestid, $errorcode){\n $error = [\n 'requestId' => $requestid,\n 'payload' => [\n 'errorCode' => $errorcode \n ]\n ];\n\n return response()->json($error);\n }", "title": "" }, { "docid": "33174b8e9561b9eceb3547c1f941dca4", "score": "0.584583", "text": "public function toResponseFormat()\n {\n return;\n }", "title": "" }, { "docid": "f3cc54e4720762bf291c82a452416220", "score": "0.584494", "text": "public static function output_error( $error=true, $msg='Missing required parameter $msg!', $redirect=null, $fields=array() ) { \r\r\n $result = array(\r\r\n 'error' => $error,\r\r\n 'msg' => $msg,\r\r\n );\r\r\n if( $redirect!=null ) {\r\r\n $result['redirect']= $redirect;\r\r\n }\r\r\n $result['fields'] = $fields;\r\r\n echo json_encode( $result );\r\r\n die();\r\r\n }", "title": "" }, { "docid": "549d79e3d4981bfa539eec57e53b8d32", "score": "0.5841767", "text": "function error($status, $body){\n return response($status, array(\"error\" => $body));\n}", "title": "" }, { "docid": "2283584ad6f61745a0d9516af43f6269", "score": "0.5839434", "text": "public function errorResponse(): JsonResponse\n {\n return new JsonResponse($this->messageBus->getMessagesJson());\n }", "title": "" }, { "docid": "10996f62c2757e75ae9ade11c06a91c7", "score": "0.58369553", "text": "static function error ($error_code) {\n\t\t$error_list = self::error_list();\n\t\tif (array_key_exists($error_code, $error_list)) {\n\t\t\t$payload = __($error_list[$error_code]);\n\t\t}\n\t\t$error_array[IDT] = IDT_ERROR;\n\t\t$error_array['error_code'] = $error_code;\n\t\tif (!isset($payload)) {\n\t\t\t$error_array['payload'] = NULL;\n\t\t} else {\n\t\t\t$error_array['payload'] = $payload;\n\t\t}\n\t\t$json = json_encode($error_array);\n\t\tif ($json) {\n\t\t\treturn $json;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}", "title": "" } ]
deb67c61e490358efd5aaad8714e1c71
Set the meta description
[ { "docid": "dc6ecccc745553c63457cf29977c9fce", "score": "0.8148186", "text": "public function setMetaDescription($metaDescription)\n {\n $this->metaDescription = $metaDescription;\n }", "title": "" } ]
[ { "docid": "38a8342d4c12fcc605418c7169c4dbe7", "score": "0.8529808", "text": "function md_set_the_meta_description($description) {\n\n // Call the properties class\n $properties = (new MidrubBase\\Classes\\Properties);\n\n // Set meta description\n $properties->set_the_single_property('description', $description);\n \n }", "title": "" }, { "docid": "123caeb990bc64239252ff6d49c9e399", "score": "0.829065", "text": "function set_the_seo_meta_description() {\n\n // Get the seo meta's description\n $meta_value = md_the_single_content_meta('quick_seo_meta_description');\n\n if ($meta_value) {\n md_set_the_meta_description($meta_value);\n }\n \n }", "title": "" }, { "docid": "273fd3b395dbe4bf51b0236fec6970f9", "score": "0.82559824", "text": "function setDescription($value) {\n self::setMetaTag('description', $value);\n }", "title": "" }, { "docid": "cd097a1e158ebc461bf5764215f86aa9", "score": "0.82216555", "text": "protected function _set_meta_desc($desc) \n {\n try{\n $this->meta_desc = $desc;\n }\n catch(Exception $err_obj)\n {\n show_error($err_obj->getMessage());\n } \n }", "title": "" }, { "docid": "be181217119bab58c95269fea54ac05a", "score": "0.7830437", "text": "public function setDescription($data)\n {\n Render::$configuration['template_meta']['description'] = $data;\n }", "title": "" }, { "docid": "278983a69c3ed99e5b8d30ae7a04f15a", "score": "0.76881224", "text": "public function test_it_sets_the_description_attribute()\n {\n $meta = New Meta;\n $msg1 = 'It works!';\n $meta->setDescription($msg1);\n $this->assertContains('<meta name=\"description\" content = \"' . $msg1 . '\"/>', $meta->getDescription());\n $this->assertContains('<meta name=\"description\" content = \"' . $msg1 . '\"/>', $meta->dump());\n\n }", "title": "" }, { "docid": "3726b54484754c0b02288eb60c9ef13d", "score": "0.76247305", "text": "public function setDescription($description) { $this->description = $description; }", "title": "" }, { "docid": "b3b56d984a0093fc512d933400bbbba6", "score": "0.7615482", "text": "public function set_description($value) {\n $this->description=$value;\n }", "title": "" }, { "docid": "a3cad77084d7d7b707902ab0e40162e9", "score": "0.7581666", "text": "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "title": "" }, { "docid": "a3cad77084d7d7b707902ab0e40162e9", "score": "0.7581666", "text": "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "title": "" }, { "docid": "a3cad77084d7d7b707902ab0e40162e9", "score": "0.7581666", "text": "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "title": "" }, { "docid": "dd1da7d607ee949b7fe90e27a9a7388a", "score": "0.75662404", "text": "function power_seo_meta_description() {\n\n\t$description = power_get_seo_meta_description();\n\n\t// Add the description if one exists.\n\tif ( $description ) {\n\t\techo '<meta name=\"description\" content=\"' . esc_attr( $description ) . '\" />' . \"\\n\";\n\t}\n}", "title": "" }, { "docid": "dab6dd43ef34dae2b035469f6e5c6cdd", "score": "0.75280833", "text": "public function testBetterMetaDescriptionMetaDescSetManually()\n {\n $obj = $this->objFromFixture('Page', 'dataobjecttest');\n $response = $this->get($obj->Link());\n $needle = '<meta name=\"description\" content=\"'.$obj->MetaDescription.'\">';\n $body = strpos($response->getBody(), $needle);\n $this->assertTrue(is_numeric($body), 'Could not find the MetaDescription Tag with the correct data which would be a manual set MetaDescription');\n }", "title": "" }, { "docid": "39b3e8f8d34cbd5f21f7485650f07a49", "score": "0.75242686", "text": "function setDescription($description) {\n $this->description = $description;\n }", "title": "" }, { "docid": "ea9fbec8027bc6251c808f23111c36fc", "score": "0.7513047", "text": "function md_get_the_meta_description() {\n \n // Verify meta's description exists\n if ( isset((new MidrubBase\\Classes\\Properties)::$the_single_property['description']) ) {\n\n echo \"<meta name=\\\"description\\\" content=\\\"\" . (new MidrubBase\\Classes\\Properties)::$the_single_property['description'] . \"\\\" />\\n\";\n\n }\n \n }", "title": "" }, { "docid": "ab42808365c86e23aed8ffea63f3dbd7", "score": "0.7459176", "text": "public function set_description( $description ) {\n\n\t\t$this->set_prop( 'description', wp_kses_post( $description ) );\n\t}", "title": "" }, { "docid": "24d14d32411af0d719379a262b7a5cf5", "score": "0.7455868", "text": "public function setdescription($descr) {\n\t\t$this->head->setdescription($descr);\n\t}", "title": "" }, { "docid": "e66cd561327c2f496ef45eb1097f2f0f", "score": "0.743776", "text": "public function setMetaDescription($description)\n {\n $this->metaDescription = $description;\n return $this;\n }", "title": "" }, { "docid": "66e05573f925174b4abbd439a83ccde5", "score": "0.7426024", "text": "public function setDescription($val) {\n $this->_description = $val;\n }", "title": "" }, { "docid": "76478c7153bd488a746c9d6d155a94e9", "score": "0.7409788", "text": "public function setDescription($description){\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "a5f291ea78965a7c871a337ec8708ad9", "score": "0.7402821", "text": "public function setDescription($desc) {\r\n\t\t$this->description = $desc;\r\n\t}", "title": "" }, { "docid": "300448fde50bf3789f7f29703cbfef1f", "score": "0.7362981", "text": "function setDescription($description = '')\n {\n $this->description = (string) $description;\n }", "title": "" }, { "docid": "414a24fb23988c65cc1d6ba07fe8c9ad", "score": "0.7353039", "text": "public function setDescription($description) {\n $this->descr = $description;\n }", "title": "" }, { "docid": "2e4f874090a93578751853ba75adf827", "score": "0.7351661", "text": "public function setDescription($description) {\n if (isset($description)) {\n $this->_description = $description;\n } else {\n $this->_description = '';\n }\n }", "title": "" }, { "docid": "6228c5050c4dec5eb49ce7992143ef85", "score": "0.733844", "text": "public function setMetaDescription($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->meta_description !== $v) {\n\t\t\t$this->meta_description = $v;\n\t\t\t$this->modifiedColumns[] = Cre8MenuContentPeer::META_DESCRIPTION;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7331686", "text": "public function setDescription($description);", "title": "" }, { "docid": "6d8a0c5885e95fcf4c57d8d05d7eae3d", "score": "0.7327482", "text": "public function setMetaDescription(string $desc)\n\t{\n\t\t$this->addMeta('description', $desc);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "dfc8a89229ab0d2ceedf623e5b65a2b3", "score": "0.7323194", "text": "public function setDescription(string $description);", "title": "" }, { "docid": "2a716a9b30951c108cb10e7cfed9c135", "score": "0.7321588", "text": "public function setDescription(string $desc){\n $this->description = $desc;\n }", "title": "" }, { "docid": "d14c47c552448494d2ea7fc31e5df92d", "score": "0.7318412", "text": "public function test_it_updates_the_description_attribute()\n {\n $meta = New Meta;\n $msg1 = 'It works!';\n $msg2 = 'It still works!';\n $meta->setDescription($msg1);\n $this->assertContains('<meta name=\"description\" content = \"' . $msg1 . '\"/>', $meta->getDescription());\n $meta->setDescription($msg2);\n $this->assertNotContains('<meta name=\"description\" content = \"' . $msg1 . '\"/>', $meta->getDescription());\n $this->assertContains('<meta name=\"description\" content = \"' . $msg2 . '\"/>', $meta->getDescription());\n }", "title": "" }, { "docid": "807d50b8f919f2aa3cb23388fc08964e", "score": "0.7293677", "text": "public function setDescription($newDesc) {\r\n\t\t$this->description = $newDesc;\r\n\t}", "title": "" }, { "docid": "15b545cbafa408e3a7e58fc9b2791853", "score": "0.726927", "text": "public function setDescription(string $description)\n\t{\n\t\t$this->description=$description; \n\t\t$this->keyModified['description'] = 1; \n\n\t}", "title": "" }, { "docid": "15b545cbafa408e3a7e58fc9b2791853", "score": "0.726927", "text": "public function setDescription(string $description)\n\t{\n\t\t$this->description=$description; \n\t\t$this->keyModified['description'] = 1; \n\n\t}", "title": "" }, { "docid": "a4aa0fdafc9dbb4115fc370199b67338", "score": "0.726658", "text": "function setDescription( &$value )\r\n {\r\n $this->Description = $value;\r\n }", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.72598314", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.72598314", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.72598314", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.72598314", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.72598314", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "ffa5818a1a7f6e833ec984b3ddfb0822", "score": "0.7229712", "text": "public function setDescription ($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "2de74bbb9dd2cf41fe61f9c57f0224d1", "score": "0.7214167", "text": "public function setDescription($description) {\n $this->description = $description;\n }", "title": "" }, { "docid": "b0f3f82e37803cde9117b660fa464574", "score": "0.7210709", "text": "public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n }", "title": "" }, { "docid": "42d61ae3a8b6cf4581f2d062e2d153d0", "score": "0.7205807", "text": "public function getMetaDescription();", "title": "" }, { "docid": "42d61ae3a8b6cf4581f2d062e2d153d0", "score": "0.7205807", "text": "public function getMetaDescription();", "title": "" }, { "docid": "3def139f27fc9b34c4836605d587ea50", "score": "0.72018176", "text": "public function setDescription($description)\n {\n $this->description = $description;\n\n }", "title": "" }, { "docid": "b9828d89f30c5f335fe083bf3809246b", "score": "0.7199585", "text": "function setDescription($description);", "title": "" }, { "docid": "7ebd60c7fabbb48300f7db9ea722e6b2", "score": "0.719532", "text": "public function setDescription($description)\n {\n $this->_description = $description;\n }", "title": "" }, { "docid": "dc1231b0ce0520eeb2148ab5db17cb01", "score": "0.7185732", "text": "public function setDescription ($value) {\n $this->params['DESCRIPTION'] = $value;\n }", "title": "" }, { "docid": "9987d3b7a56c794ab18a4adf794417bd", "score": "0.71800363", "text": "public function getMetaDescription()\n {\n return $this->meta_description;\n }", "title": "" }, { "docid": "9987d3b7a56c794ab18a4adf794417bd", "score": "0.71800363", "text": "public function getMetaDescription()\n {\n return $this->meta_description;\n }", "title": "" }, { "docid": "9987d3b7a56c794ab18a4adf794417bd", "score": "0.71800363", "text": "public function getMetaDescription()\n {\n return $this->meta_description;\n }", "title": "" }, { "docid": "1bdfed401d2818c639fc0fff677fecc7", "score": "0.71770996", "text": "public function set_description($prop) {\n $this->category->set_description($prop);\n }", "title": "" }, { "docid": "86cf876dde3c997b0526c656b9ba6b27", "score": "0.7169956", "text": "public function setDescription(string $value):void\n {\n $this->webManifest['description'] = $value;\n }", "title": "" }, { "docid": "4052a4e112f1d7e1135d0738fccbd692", "score": "0.7159267", "text": "private function setDescription(string $description) {\n $this->description = $description;\n }", "title": "" }, { "docid": "4cb669a362a139d1f7417bbee4ba6070", "score": "0.71490514", "text": "public function setDescription( $description ) {\n\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.7134059", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "56a5df456a5af970a89984753c44b416", "score": "0.7130534", "text": "public function set_description($description) \n\t{\n\t\t$tag = ($this->version == ATOM)? 'summary' : 'description'; \n\t\t$this->add_element($tag, $description);\n\t}", "title": "" }, { "docid": "9ad5714fcf0e173c4b27635924c3655f", "score": "0.7128039", "text": "public function meta_description($site_description = '')\n\t{\n\t\tif ($site_description == '')\n\t\t{\n\t\t\t$site_description = $this->_ci->settings->get_setting('site_description');\n\t\t}\n\t\t$this->_description = $site_description;\n\t\treturn $site_description;\n\t}", "title": "" }, { "docid": "034c4dc289d29a9ad985d6af35ae26ad", "score": "0.71264255", "text": "public function getMetaDescription()\n\t{\n\t\treturn $this->meta_description;\n\t}", "title": "" }, { "docid": "eb3467d14d0cf95f83c59ee5ed4a9d7f", "score": "0.7123468", "text": "public function generateMetaDescription()\n {\n $this->generateEntityByTypeIdForLandingPage(\n LandingPage::TYPE_LANDING_PAGE_META_DESCRIPTION\n );\n }", "title": "" }, { "docid": "94d41ab9af96bf5c0318e4ac78d2d880", "score": "0.71086484", "text": "public function getMetaDescription()\n {\n return $this->metaDescription;\n }", "title": "" }, { "docid": "94d41ab9af96bf5c0318e4ac78d2d880", "score": "0.71086484", "text": "public function getMetaDescription()\n {\n return $this->metaDescription;\n }", "title": "" }, { "docid": "1c4896a85293bb8759b2d9e6e339ce1e", "score": "0.7097794", "text": "abstract public function getMetaDescription();", "title": "" }, { "docid": "bce7480b952edced0549400c95bc00f6", "score": "0.70973897", "text": "final public function setDesc($desc){\n $this->_desc = $desc;\n }", "title": "" }, { "docid": "1f7cfe802ccb02d87e8f28d55882903d", "score": "0.7095966", "text": "public function setDescription($description){\n $this->description = trim(strval($description));\n }", "title": "" }, { "docid": "039e67e8c55b3f6d65196bce5476e797", "score": "0.70918685", "text": "public function setDescription(string $description):void {\r\n\t\t$this->description = $description;\r\n\t}", "title": "" }, { "docid": "0775e528fdec1cc45ae0680cc0fb31a4", "score": "0.70906097", "text": "public function setDescription($description)\n {\n $this->description = (string)$description;\n }", "title": "" }, { "docid": "a2d43a96f9f96661457c33423eb56b30", "score": "0.7086338", "text": "public function setDescription($value) {\n $this->setParam('DESCRIPTION', $value);\n }", "title": "" }, { "docid": "24a58c2b7f362c8de50fee955ac4eb1f", "score": "0.7083572", "text": "function setDescription($description) {\n\t\t$this->_description = trim($description);\n\t}", "title": "" }, { "docid": "74c48cfabed89b4417ca058cd3d3b747", "score": "0.70827746", "text": "function setDescription($description) {\r\n $this->description = (string) trim($description);\r\n }", "title": "" }, { "docid": "043124d09e667ae0e906eb2aa11ca694", "score": "0.70815325", "text": "public function setDescription($description = null);", "title": "" }, { "docid": "c1d3a279ddea6136a0335f0e248917b0", "score": "0.7079334", "text": "public function set_description ($description) {\n $this->description = $description;\n }", "title": "" }, { "docid": "424d2abf2e86cf0993b96ed235c3cb13", "score": "0.7073339", "text": "function setDesc($newvalue)\n {\n return parent::set('picdesc', $newvalue);\n }", "title": "" }, { "docid": "75d69394297613c7f802fc2060ca4272", "score": "0.7072923", "text": "public static function setDescription($description)\n {\n self::$description = $description;\n }", "title": "" }, { "docid": "469062923d42d6a7357ddf3d0cab90d6", "score": "0.7056857", "text": "public static function meta()\n {\n $qo = get_queried_object();\n if ($qo instanceof WP_Post) {\n $description = Str::limit(esc_attr(strip_tags($qo->post_content)), 200, '');\n } else {\n $description = sprintf('%s - %s', get_bloginfo('name'), get_bloginfo('description'));\n }\n echo View::make(\n 'blocks' . DS . 'meta',\n array(\n 'description' => $description,\n )\n );\n }", "title": "" }, { "docid": "0775d0c014c0dd3b3bb7a7fa0bb874ae", "score": "0.70527995", "text": "public function set_description($new) {\n\t\t$path = $this->git_directory_path();\n\t\tfile_put_contents($path.\"/description\", $new);\n\t}", "title": "" }, { "docid": "234981f23410b368685dc3749f1f7777", "score": "0.7040012", "text": "public function setDescription( $description ) {\n\t\t$this->description = substr( $description, 0, 32 );\n\t}", "title": "" }, { "docid": "3cec86920db6d57a2b844cfc199424c3", "score": "0.70398694", "text": "protected function assignDescription()\n {\n $this->description = 'This is a test for a simple Plugin migration class';\n }", "title": "" }, { "docid": "ac3da6b2dcaa2ecf507470251e77dc9b", "score": "0.7036721", "text": "public function setDescription($desc)\n {\n $this->headers->set(\"Content-Description\", $desc);\n }", "title": "" }, { "docid": "c7e6a4d36eee51305e88cbf6ca36fd3a", "score": "0.7015569", "text": "public function setDescription($description)\n {\n $this->initialized['description'] = true;\n $this->description = $description;\n }", "title": "" }, { "docid": "75ce8c7922f4e7e502f7c0e25998b3dd", "score": "0.6992196", "text": "public function setDescriptionForStringSetsDescription() {\n\t\t$this->subject->setDescription('Conceived at T3CON10');\n\n\t\t$this->assertAttributeEquals(\n\t\t\t'Conceived at T3CON10',\n\t\t\t'description',\n\t\t\t$this->subject\n\t\t);\n\t}", "title": "" }, { "docid": "0ce80af31113b338918e9da44e38d682", "score": "0.6985839", "text": "public function setDescription($content);", "title": "" }, { "docid": "31edf74fa5b6cd532f2a670ff697e9eb", "score": "0.6953667", "text": "function wpcom_vip_meta_desc() {\n\t$text = wpcom_vip_get_meta_desc();\n\tif ( !empty( $text ) ) {\n\t\techo \"\\n<meta name=\\\"description\\\" content=\\\"$text\\\" />\\n\";\n\t}\n}", "title": "" }, { "docid": "13cf920ab3b720c3e4ed072137a7ac41", "score": "0.69490635", "text": "public function setDescription($description)\n {\n assert('is_string($description)');\n\n $this->_description = $description;\n $this->_modified = true;\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "d83e64b69b80af2975c049484c145e41", "score": "0.0", "text": "public function update(Request $request, Passwords $password)\n {\n if(parent::checkLogin() == false){\n return parent::response(\"There is a problem with your session\",301);\n }\n\n $newCategory = Category::where('name',$request->category_id)->first();\n $password->category_id = $newCategory;\n\n $password->update($request->all());\n return parent::response(\"Password modified\", 200);\n }", "title": "" } ]
[ { "docid": "1e58026b8952df10026ace5fc59fe274", "score": "0.7423347", "text": "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "title": "" }, { "docid": "08694713de71165eda639b86061c2dd3", "score": "0.70622426", "text": "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70568657", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "64141ab468cf691ac341537b76914234", "score": "0.6896551", "text": "public function updateStream($resource);", "title": "" }, { "docid": "896d8cce99ddf179cc210c3eea9dbc85", "score": "0.65835553", "text": "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "title": "" }, { "docid": "3a9725a518af00151301cd75bfacc9b9", "score": "0.64519453", "text": "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "title": "" }, { "docid": "a240b851b94ee0b2528d8320a97277d9", "score": "0.6348333", "text": "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "title": "" }, { "docid": "1833fc434e2b6d8845470c7071f16b05", "score": "0.6212436", "text": "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "e894dc3cd202ec4ba70765b750e0aef8", "score": "0.61450946", "text": "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "title": "" }, { "docid": "0926078283b626a7cbcf1c37921b4293", "score": "0.6122591", "text": "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "title": "" }, { "docid": "d897a40d307670c0a2b7bba76cbe8e66", "score": "0.6114199", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "title": "" }, { "docid": "7b0c66c5755e566e561fc492c4c6cef4", "score": "0.6101911", "text": "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "title": "" }, { "docid": "78d3c773d3a549209d09486c7233c7b5", "score": "0.60876113", "text": "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "title": "" }, { "docid": "f6f8def0ac709abf6dd95f0dfa35d868", "score": "0.60528636", "text": "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "title": "" }, { "docid": "5334ba4a6880a32048930c6aab0c2e72", "score": "0.60177964", "text": "public function update($path);", "title": "" }, { "docid": "b63b74da9b6109b98718289434f6d2cf", "score": "0.6006609", "text": "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "title": "" }, { "docid": "9f880585b8f772551748224960e1114a", "score": "0.59725446", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "title": "" }, { "docid": "5fcb6827bd712d2ceee63009eacfae99", "score": "0.594558", "text": "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "title": "" }, { "docid": "8bf08d6952a759b61a0c0f2a1c1e4e68", "score": "0.59395295", "text": "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.5938792", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5893703", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ec460d4bbd98e23f7e38b492a7d650e", "score": "0.5862337", "text": "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.58523124", "text": "public function update($data) {}", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.58523124", "text": "public function update($data) {}", "title": "" }, { "docid": "c8cfc09f393219dca339ad89d530539a", "score": "0.5851579", "text": "public function putStream($resource);", "title": "" }, { "docid": "52b1b7a30044d88d43eaebbf3d0a34c5", "score": "0.5815571", "text": "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.58067423", "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": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.5750728", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.5750728", "text": "public function update($entity);", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.5736541", "text": "public function setResource($resource);", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723664", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "cbf8435986892ace3d4dbcfbf62f6804", "score": "0.5715135", "text": "public function isUpdateResource();", "title": "" }, { "docid": "c5002bf927543520ff53e2b1ecdcf2a1", "score": "0.56949675", "text": "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "title": "" }, { "docid": "8cfd45d18cf017442f2ebe0b78d0ddc0", "score": "0.5691129", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "7e42fedef6bb33a605a9a912390eb1f7", "score": "0.56882757", "text": "public function store($data, Resource $resource);", "title": "" }, { "docid": "8a46c9ac29aec2f0c66f61cd6abd3e2a", "score": "0.5669375", "text": "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "title": "" }, { "docid": "b247170cc6ffc22ce838d918ca6c8698", "score": "0.5655524", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "title": "" }, { "docid": "c59db4eff4b7b3a830f6e52a576536c0", "score": "0.56517446", "text": "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "title": "" }, { "docid": "9d8e7ab90193c578a62deba30a0b7c06", "score": "0.5647158", "text": "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "title": "" }, { "docid": "56c2b493ee3f6a8e2fe0dddef47259ba", "score": "0.5636521", "text": "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "title": "" }, { "docid": "f4e8f9eee2210f80fc3b28674c2ddfe5", "score": "0.563466", "text": "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "title": "" }, { "docid": "509df81c3a0f4ec1c8e5ccbf89e5931d", "score": "0.5632965", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "title": "" }, { "docid": "0e9e693dffd49cdb7c6c20a03ff5efd8", "score": "0.56322825", "text": "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "title": "" }, { "docid": "bbd99fadb318f4a784afaa2bfa18ce90", "score": "0.56291395", "text": "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "title": "" }, { "docid": "8eb8ff4a40a42fb82a98ac5091c3a8b4", "score": "0.56202215", "text": "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "title": "" }, { "docid": "df5d4e0cf5f9405287ea81aaef9d998b", "score": "0.56087196", "text": "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "f646252110cf32a5b2f73f7d1462f12e", "score": "0.56020856", "text": "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "title": "" }, { "docid": "4c98bff950158ea59ef3f361bcba0f67", "score": "0.5591966", "text": "public function update(Qstore $request, $id)\n {\n //\n }", "title": "" }, { "docid": "87604b965f2923e2345b489944eb16ab", "score": "0.5581127", "text": "public function update(IEntity $entity);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.5581055", "text": "public function update($request, $id);", "title": "" }, { "docid": "4a6724648abb94db5f42559e4cb12724", "score": "0.558085", "text": "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "title": "" }, { "docid": "b1223c0e87edc0874663308fb5757224", "score": "0.5575458", "text": "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "07a38b06bdddb569c910315d5b73bb88", "score": "0.55706805", "text": "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55670804", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "2f2babfe63e8f2a416fc581447274425", "score": "0.55629116", "text": "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "title": "" }, { "docid": "c596fddf408b359acc12fe17624de997", "score": "0.5562565", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "title": "" }, { "docid": "b3d8abec86ebbd8bf61bddeb5110ba38", "score": "0.5558853", "text": "abstract public function put($data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "90cec2e0050ecd5971be612c49157c4a", "score": "0.555572", "text": "public function testUpdateSupplierUsingPUT()\n {\n }", "title": "" }, { "docid": "9c243572303715ea37744cfc162e1a3c", "score": "0.5555007", "text": "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "title": "" }, { "docid": "137b494fd7c0c6a148f3726e66f7b425", "score": "0.5553948", "text": "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.5553837", "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": "45212faae39cc84fb7d386bd5ccbacd2", "score": "0.5553147", "text": "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "title": "" }, { "docid": "9bd927a2b7c7b6455cfb1d5512fcad31", "score": "0.55429846", "text": "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "title": "" }, { "docid": "6e27acd0248f696913d7581142ab1983", "score": "0.5541925", "text": "public abstract function update($object);", "title": "" }, { "docid": "1756a9bc04ac536de80753840f877cda", "score": "0.5540208", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "efa4460a1f0a94dc49a588c86ce1c95e", "score": "0.5539145", "text": "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "dbf9ef4add161249e917da82a07a52d8", "score": "0.5536157", "text": "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "title": "" }, { "docid": "c4d2a2fa9101020663f7a49d7cc6ddac", "score": "0.55350804", "text": "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "title": "" }, { "docid": "6e9e95959e33006f578a3965f633d7d6", "score": "0.5534241", "text": "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "title": "" }, { "docid": "294674761e7a90c0f3c7b7cbb244ad5a", "score": "0.5523782", "text": "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "title": "" }, { "docid": "f30d20b4690f862c2d69a1ff92501896", "score": "0.5518406", "text": "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "title": "" }, { "docid": "7f3bb76e340f6d3efbef92bcbabfbbfa", "score": "0.55147856", "text": "public function update($entity)\n {\n \n }", "title": "" }, { "docid": "2f7ad5c7cf9222645876124364520b78", "score": "0.5513397", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "title": "" }, { "docid": "f83dd36256d02e1f966e7e748f03289a", "score": "0.550961", "text": "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "title": "" }, { "docid": "0dc3227cc620ff2bfcf02b42a09128f6", "score": "0.55072165", "text": "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55067354", "text": "public function update($id, $input);", "title": "" }, { "docid": "7cc9fd709d5dbe533ccc58575aee12e8", "score": "0.5503418", "text": "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "title": "" }, { "docid": "561edf3b1e08c4105ca00f8114894949", "score": "0.5501671", "text": "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "title": "" }, { "docid": "95f824afd6b94282d27a0d4cc2cee7bf", "score": "0.55010796", "text": "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "title": "" }, { "docid": "98955a07074c5f9d7b65cb4edac55bd6", "score": "0.54998124", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "title": "" }, { "docid": "b6c9eceaee979e0c01a261caf5a48b14", "score": "0.5497327", "text": "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "title": "" }, { "docid": "a3080528f24f5a6310506fe05f776170", "score": "0.54942787", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54942036", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54942036", "text": "public function update($id);", "title": "" }, { "docid": "48fef9aa4b1db49fbd41de594ae52cd6", "score": "0.54935455", "text": "public function put($path, $data = null);", "title": "" }, { "docid": "04652c1da37c7a438475c8d281a1b9fb", "score": "0.549267", "text": "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "title": "" }, { "docid": "9ecc82591ba06b6a36749ed98ac6605d", "score": "0.5491964", "text": "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "title": "" }, { "docid": "d93eb8ea18e437ad56170f6f49f20674", "score": "0.5489983", "text": "public function update(Entity $entity);", "title": "" }, { "docid": "2a7096bf2a727a86ecc99d0ede5d263f", "score": "0.54833627", "text": "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "title": "" }, { "docid": "b03a96e7dd0db2b1c6ad43b7c2cb89da", "score": "0.54794145", "text": "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "title": "" }, { "docid": "61329b7ef8ead3531f1a05acebdc3cd5", "score": "0.5478835", "text": "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "title": "" }, { "docid": "2c0c433441de9cacab9878463a13e7bc", "score": "0.5478348", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "title": "" }, { "docid": "dc09c6048588c09b320af9c0d862323d", "score": "0.5465178", "text": "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "title": "" }, { "docid": "2ba9e2fb1c6450012bb0ef54decacbcc", "score": "0.54648995", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "title": "" }, { "docid": "3898cbff513b04923b83b4748c2c7fa8", "score": "0.54607797", "text": "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "title": "" }, { "docid": "5b72ae8e940480dd3b49bab90e39b090", "score": "0.54571307", "text": "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }", "title": "" } ]
bc0165ac867dfa5015436226c8045506
Returns all matching company's ids and names.
[ { "docid": "96d86d887282c050ec29089ab29ae772", "score": "0.0", "text": "public static function getAllCompanies( $str_to_match, $limit= NULL, $offset=NULL)\n\t{\n\t\t$em = \\Zend_Registry::get('em');\n\t\t$qb_1 = $em->createQueryBuilder();\n\t\t$q_1 = $qb_1->select('comp')\n\t\t\t->from( '\\Entities\\company_ref', 'comp' )\n\t\t\t->where( \"comp.status =:comp_status\")\n\t\t\t->andWhere( \"comp.name LIKE :comp_name\")\n\t\t\t->setFirstResult( $offset )\n\t\t\t->setMaxResults( $limit )\n\t\t\t->setParameter('comp_name','%'.$str_to_match.'%')\n\t\t\t->setParameter('comp_status',self::COMPANY_STATUS_ACTIVE);\n\t\treturn $q_1->getQuery()->getResult();\n\n\t}", "title": "" } ]
[ { "docid": "00ed771a06918711d5267f7767477fcc", "score": "0.75645435", "text": "function getCompanies() {\n\n\t\t/******************************\n\t\t* Get which fields to fetch\n\t\t******************************/\n\n\t\t$ids = array();\n\n\t\tfor($i = 0, $num = func_num_args(); $i < $num; $i++) {\n\t\t\t$arg = func_get_arg($i);\n\n\t\t\tif (is_array($arg)) {\n\t\t\t\t$ids = array_merge($ids, $arg);\n\t\t\t} else {\n\t\t\t\t$ids[] = $arg;\n\t\t\t}\n\t\t}\n\n\t\t$ids = array_unique($ids);\n\t\t$got_ids = array_keys($this->companies);\n\n\t\t// Only get the ones that aren't already cachced\n\t\t$fetch_ids = array_diff($ids, $got_ids);\n\n\n\t\t/******************************\n\t\t* Get the comps\n\t\t******************************/\n\n\t\tif ($fetch_ids) {\n\t\t\tglobal $db;\n\n\t\t\t$db->query(\"\n\t\t\t\tSELECT * FROM user_company\n\t\t\t\tWHERE id IN \" . array2sql($fetch_ids) . \"\n\t\t\t\");\n\n\t\t\twhile ($comp = $db->row_array()) {\n\t\t\t\t$this->companies[$comp['id']] = $comp;\n\t\t\t}\n\t\t}\n\n\n\t\t/******************************\n\t\t* Return them\n\t\t******************************/\n\n\t\t$ret = array();\n\n\t\tforeach ($ids as $id) {\n\t\t\t$ret[$id] = $this->companies[$id];\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "350008d6b9cad6318cff9e7e85adb1d6", "score": "0.7245689", "text": "public function allCompanies()\n {\n return allCompanies::collection(Company::all());\n }", "title": "" }, { "docid": "ab5802bc1f0a7458defbb5e9d540993b", "score": "0.71190965", "text": "public function load_all_companies()\r\n {\r\n $results = [$this->company_id];\r\n \r\n $companies = company::all_children_for($this->company_id);\r\n if (empty($companies)) {\r\n return $results;\r\n }\r\n \r\n foreach ($companies as $company_id) {\r\n $results[] = $company_id;\r\n }\r\n \r\n return $results;\r\n }", "title": "" }, { "docid": "ef74dac1329d8246a0f82d5f1bd32aa2", "score": "0.7009091", "text": "public function getAll()\n {\n return Company::orderBy( 'name', 'asc' )->get();\n }", "title": "" }, { "docid": "ed668af635d90e10921c9fd2435fc705", "score": "0.69525903", "text": "function companyByUser(){\n\n\t\t$cadena_sql=$this->sql->get(\"companyByUser\",$this->sessionId);\n\t\t$result=$this->resource->execute($cadena_sql,\"busqueda\");\n\n\t\t$cadena_sql=$this->sql->get(\"companyListAll\");\n\t\t$allCompanies=$this->resource->execute($cadena_sql,\"busqueda\");\n\n\n\t\t$this->companies=array(); \n\t\t\n\n\t\t$i=0;\n\t\twhile(isset($result[$i]['IDCOMPANY'])){\n\n\t\t\t$this->companyByParent($result[$i]['IDCOMPANY'],$allCompanies);\n\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $this->companies;\n\t}", "title": "" }, { "docid": "3ab95e35aa284a60e0a4346c672ed242", "score": "0.6922586", "text": "protected function _getOxcomAdminSearchCompanies()\n {\n $sViewName = $this->_sViewNameGenerator->getViewName(\"oxuser\");\n $sSql = \"SELECT oxid, oxcompany FROM $sViewName WHERE oxcompany LIKE \" . \\OxidEsales\\Eshop\\Core\\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');\n\n return $this->_getOxcomAdminSearchData($sSql, 'admin_user');\n }", "title": "" }, { "docid": "5ae705b92f536afbd5cf0366fca63a62", "score": "0.6898687", "text": "public function retrieveCompaniesNames() {\n\t\treturn $this->companyRepository->retrieveCompaniesNames();\n\t}", "title": "" }, { "docid": "6dc333a5392755b567eb3f699983853d", "score": "0.6814629", "text": "public function getAllByCompany($id)\n\t{\n\t\treturn $this->repository->findBy(array(\n\t\t\t'company' => $id\n\t\t\t));\n\t}", "title": "" }, { "docid": "73996a8a56a93f8e1a918b3146089e83", "score": "0.671834", "text": "public function getCompanies(): array\n {\n return $this->companies;\n }", "title": "" }, { "docid": "a2d83cb8da808ced340c38bdfa16f27e", "score": "0.66994905", "text": "public function getCompanies()\n {\n return array(\n new Company(\n 'Company A',\n array(\n array(\n 'apartment',\n 'house',\n 'or'\n ),\n array(\n 'property_insurance',\n 'none'\n ),\n 'and'\n )\n ),\n new Company(\n 'Company B',\n array(\n array(\n '5_door_car',\n '4_door_car',\n 'or'\n ),\n array(\n 'drivers_licence',\n 'car_insurance',\n 'and'\n ),\n 'and'\n )\n ),\n new Company(\n 'Company C',\n array(\n array(\n 'social_security',\n 'work_permit',\n 'and'\n ),\n 'none'\n )\n ),\n new Company(\n 'Company D',\n array(\n array(\n 'apartment',\n 'flat',\n 'house',\n 'or'\n ),\n 'none'\n )\n ),\n new Company(\n 'Company E',\n array(\n array(\n 'drivers_licence',\n 'none'\n ),\n array(\n '2_door_car',\n '3_door_car',\n '4_door_car',\n '5_door_car',\n 'or'\n ),\n 'and'\n )\n ),\n new Company(\n 'Company F',\n array(\n array(\n 'scooter',\n 'bike',\n 'motorcycle',\n 'or'\n ),\n array(\n 'drivers_licence',\n 'motorcycle_insurance',\n 'and'\n ),\n 'and'\n )\n ),\n new Company(\n 'Company G',\n array(\n array(\n 'massage_qualification',\n 'liability_licence',\n 'and'\n ),\n 'none'\n )\n ),\n new Company(\n 'Company H',\n array(\n array(\n 'storage_place',\n 'garage',\n 'or'\n ),\n 'none'\n )\n ),\n new Company(\n 'Company J',\n array(\n array(),\n 'none'\n )\n ),\n new Company(\n 'Company K',\n array(\n array(\n 'paypal_account',\n ),\n 'none'\n )\n ),\n );\n }", "title": "" }, { "docid": "e1f37bb960a8d9337c36afc3d9226b49", "score": "0.6665295", "text": "public function getCompanyListAction() {\n $em = $this->getDoctrine()->getEntityManager();\n $allCompany = $em->getRepository('AppBundle:Company')->findAll();\n return $allCompany;\n }", "title": "" }, { "docid": "1b333e6e12f16e317c80f5f35284a4b0", "score": "0.66512346", "text": "public function get_client_names( $company_id ) {\r\n \t\t $statement = $this->db->query('SELECT `client_key_fname`, `client_key_lname`, client_id FROM `clients` \r\n LEFT JOIN companies ON companies.company_id = clients.`company_id` WHERE \r\n\t\t\t\t\t\tclients.`company_id` = '. $company_id.''); \r\n\t\t\t\t\t\t\t\t\t \r\n \t \r\n $statement->setFetchMode(PDO::FETCH_ASSOC);\t\t \r\n\t\t $clients = array(); \r\n\t\t if ($statement->rowCount() > 0) {\t \r\n \r\n while( $row = $statement->fetch() ) { \r\n $clients[] = $row; \r\n \r\n }\r\n return $clients; \r\n } else {\r\n\t\treturn FALSE;\r\n\t\t}\r\n }", "title": "" }, { "docid": "3169ecb24810a16252936db59b40bd1c", "score": "0.65793353", "text": "public function fetchCompanies($id) {\n\t\t// Companies database\n\t $q = $this->db->prepare(\n\t\t\t'SELECT * FROM COMPANY WHERE IDCOMPANY IN ( SELECT IDCOMPANY FROM HAVE_COMPANY WHERE IDGAME=:id )');\n\t\t$q->bindValue(':id', $id, PDO::PARAM_INT);\n\t\t$q->execute();\n\t\t$companiesDB = $q->fetchAll();\n\n\t\treturn $companiesDB;\n\t}", "title": "" }, { "docid": "b1c294ee261f25a30917aeec7bfbd205", "score": "0.6562369", "text": "public function getAllClients()\n\t{\n\t\t$clientsServices = new CompaniesServices();\n\t\t$clients = $clientsServices->fetchAll(1);\n\t\t$result = array();\n\t\n\t\tforeach ($clients as $c){\n\t\t\t//$result[] = ['attributes'=> ['data-est'=>$s_m['id']], 'value' => $s_m['id'], 'label' => $s_m['state'] ];\n\t\t\t$result[$c['id_company']] = $c['name_company'];\n\t\t}\n\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "00db7311b7685686bb59622ec0a51e71", "score": "0.6516662", "text": "public function getAllInInsuranceCompanies();", "title": "" }, { "docid": "69eaa87318555ab823ba3c45a02864c2", "score": "0.64930075", "text": "public function company()\n {\n $companies = '';\n $myCompanies = explode(',', $this->companies);\n foreach ($myCompanies as $key => $value) {\n $companies = $companies.' , '.Companies::findOrFail($value)->name;\n } \n return $companies;\n }", "title": "" }, { "docid": "fd5832503ba92383b8a3496a4042f911", "score": "0.6485397", "text": "function oilContribsByCompany() {\n\t#DEPRECATED\n\t$query = \"select b.Name, sum(Amount) as cash from contribs_clean a join oilcompanies b on a.CompanyID = b.id join candidates_main c on a.CandidateID = c.CandidateID where a.CandidateID like 'P%' group by a.COmpanyID order by cash\";\n\treturn dbLookupArray($query);\n}", "title": "" }, { "docid": "8c551b7bc79e02255820ee7a69f07b0d", "score": "0.6449924", "text": "public function getAll($companyId = null) {\r\n return $this->getTable()->getQueryToFetchAll($companyId)->execute();\r\n }", "title": "" }, { "docid": "5e1f55d898f3cb3622a494449df18075", "score": "0.6373221", "text": "public static function find_all()\n {\n return \\DB::query(\"SELECT * FROM `company` ORDER BY state ASC\")->as_object()->execute();\n }", "title": "" }, { "docid": "ce2f7b8477832739af6a4f1c61d7ee3c", "score": "0.635248", "text": "public function index()\n {\n $companies = $this->companyInterface->getAllCompanies();\n return $companies;\n }", "title": "" }, { "docid": "594f793b6e5ed0e17dc1f4881ee423ed", "score": "0.6295993", "text": "public function get_key_contacts ( $company_id ) {\r\n \t\t $statement = $this->db->query('SELECT * FROM `clients` \r\n LEFT JOIN companies ON companies.company_id = clients.`company_id` WHERE \r\n\t\t\t\t\t\tclients.`company_id` = '. $company_id.''); \r\n\t\t\t\t\t\t\t\t\t \r\n \t \r\n $statement->setFetchMode(PDO::FETCH_ASSOC);\t\t \r\n\t\t $clients = array(); \r\n\t\t if ($statement->rowCount() > 0) {\t \r\n \r\n while( $row = $statement->fetch() ) { \r\n $clients[] = $row; \r\n \r\n }\r\n return $clients; \r\n } else {\r\n\t\treturn FALSE;\r\n\t\t}\r\n }", "title": "" }, { "docid": "3bda5ff7a07d655250c7896465774e4f", "score": "0.6289064", "text": "function getCompanyInternships($company) {\n global $dbc;\n\n $q = \"SELECT id\n FROM Internship\n WHERE company = :company\";\n $stmt = $dbc->prepare($q);\n $stmt->bindParam(\":company\", $company, PDO::PARAM_INT);\n $stmt->execute();\n\n $ret = array();\n for ($i=0; $i < $stmt->rowCount(); $i++) {\n array_push($ret, intval($stmt->fetch()[\"id\"]));\n }\n return $ret;\n}", "title": "" }, { "docid": "58cc495f74aa014555a638c230308034", "score": "0.62711537", "text": "public function getResearchCompanies()\n {\n $array = $this->find()\n ->order([\n 'order ASC',\n ])\n ->toArray();\n\n return $array;\n }", "title": "" }, { "docid": "aa2858685b378fec6b3481a1d02634bc", "score": "0.6178719", "text": "public function getCompany();", "title": "" }, { "docid": "f6e414a0773cd9cec728056f871bd4a3", "score": "0.61609936", "text": "public function contactsByCompanyId($id)\n {\n // Get contacts by company id\n $contactsByCompany = Contact::where('company_id', $id)->get();\n\n // Return collection of contacts as a resource\n return ContactResource::collection($contactsByCompany);\n }", "title": "" }, { "docid": "4eea8d5fb985b0da107abf9afc735827", "score": "0.6150722", "text": "public function getAll($company_id)\n {\n return $this->Record->select()->\n from('softaculous_queued_services')->\n where('company_id', '=', $company_id)->\n fetchAll();\n }", "title": "" }, { "docid": "be9a30c0aa1239488ff451e43bb8932b", "score": "0.61315995", "text": "function allContribsFromCompanies() {\n\t#DEPRECATED\n\t$query = \"select b.Name, sum(Amount) as cash from contribs_clean a join oilcompanies b on a.CompanyID = b.id group by a.COmpanyID order by cash\";\n\treturn dbLookupArray($query);\n}", "title": "" }, { "docid": "5d8257bdc99c169528fd73e10bb444a9", "score": "0.611792", "text": "public function listAll($options = array())\n {\n return $this->em\n ->getRepository('SkedAppCoreBundle:Company')\n ->getAllActiveCompaniesQuery($options);\n }", "title": "" }, { "docid": "62ebc2089003e0f049a62cbe7379e94f", "score": "0.6095284", "text": "public function getArrayOfInInsuranceCompany();", "title": "" }, { "docid": "f7a247e75404082b7b60611d9df1b450", "score": "0.6088176", "text": "public function getCompanies()\n {\n return $this->hasMany(Companies::className(), ['barracks_id' => 'id']);\n }", "title": "" }, { "docid": "02500d7e7c86a628bf4728e16c0f1a6c", "score": "0.6053015", "text": "public function m_getSelectCompany(){\n $sql = \"select COMPANYID,COMPANYNAME from ADM_COMPANY\";\n $data = $this->db->query($sql)->result();\n return $data;\n }", "title": "" }, { "docid": "8553c1294db2a1f1c47ce90d30a1ab0e", "score": "0.6001874", "text": "public function testSuccessListingHotelsByCompany()\n {\n $uuid = UuidV4::fromString('253e0f90-8842-4731-91dd-0191816e6a28');\n\n $expectedResult = ['HOTEL1', 'HOTEL2'];\n\n $companyMock = \\Mockery::mock(Company::class);\n $companyMock->shouldReceive('getHotels')\n ->once()\n ->withNoArgs()\n ->andReturnSelf();\n\n $companyMock->shouldReceive('getValues')\n ->once()\n ->withNoArgs()\n ->andReturn($expectedResult);\n\n $companyRepositoryMock = \\Mockery::mock(ICompanyRepository::class);\n $companyRepositoryMock->shouldReceive('listHotels')\n ->once()\n ->with($uuid)\n ->andReturn($companyMock);\n\n $hotelRepositoryMock = \\Mockery::mock(IHotelRepository::class);\n $hotelDomainService = new HotelService($companyRepositoryMock, $hotelRepositoryMock);\n\n $result = $hotelDomainService->listHotelsByCompany($uuid);\n\n $this->assertEquals($result, $expectedResult);\n }", "title": "" }, { "docid": "628ed959082af97e56746036ea0451d1", "score": "0.59799826", "text": "public function getAll()\n\t{\n\t\t$data=$this->Company_model->getlist_company();\t\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "37955a3798a161bc5aaf6db27a87b5f9", "score": "0.5954587", "text": "public function fetch_company()\n {\n $cdata = $this->company->make_datatables();\n $this->data = array();\n foreach($cdata as $row)\n {\n $sub_array = array();\n $sub_array[] = $row->id;\n $sub_array[] = $row->name;\n $sub_array[] = $row->shortname;\n $sub_array[] = $row->tin;\n $sub_array[] = $row->tax_company_identifier;\n $sub_array[] = $row->ghpost_code;\n $sub_array[] = $row->code;\n $sub_array[] = $row->email;\n $sub_array[] = $row->phone;\n $sub_array[] = $row->address;\n $sub_array[] = $row->latitude;\n $sub_array[] = $row->longitude;\n $sub_array[] = $row->opening_date;\n $sub_array[] = $row->closed_date;\n $sub_array[] = $row->added_date;\n $sub_array[] = ' <a name=\"update\" id=\"' . $row->id .'\" class=\"update\"><i class=\"fa fa-edit edit\"></i></a>';\n $sub_array[] = ' <a name=\"delete\" id=\"' . $row->id .'\" class=\"delete\" ><i class=\"fa fa-trash delete\"></i></a>';\n $this->data[] = $sub_array;\n }\n $output = array(\n \"recordsTotal\" => $this->company->get_all_data(),\n \"recordsFiltered\" => $this->company->get_filtered_data(),\n \"data\" => $this->data,\n );\n echo json_encode($output);\n }", "title": "" }, { "docid": "5a8e51033d7bef0637fb621d7eee455e", "score": "0.59456515", "text": "function getContractors()\r\n {\r\n $sql = \"SELECT * FROM contractor\";\r\n\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n $statement->execute();\r\n\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "9c2ce49b3274343b5dc0cea8b920d095", "score": "0.5944597", "text": "public function index()\n {\n return $companies = Company::all();\n }", "title": "" }, { "docid": "ae1419455819c797da99599a26776dac", "score": "0.59193736", "text": "public function getAllInsurances($id_company = null) {\n\t\ttry {\t\t\t\n\t\t\tglobal $con;\t\t\t\n\t\t\t/* Statement declaration */\n\t\t\t$sql = \t\"SELECT * \".\n\t\t\t\t\t\"FROM insurances \".\n\t\t\t\t\t\"WHERE id_company = :id_company\";\n\t\t\t\t\t\n\t\t\t/* Statement values & execution */\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindParam(':id_company', $id_company);\n\t\t\t\n\t\t\t/* Statement execution */\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t/* Handle errors */\n\t\t\tif ($stmt->errno)\n\t\t\t throw new PDOException($stmt->error);\n\t\t\telse\n\t\t\t return $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\n\t\t\t/* Close statement */\n\t\t\t$stmt->close();\n\t\t} catch(PDOException $e) {\n\t\t\treturn array(\"error\" => $e->getMessage());\n\t\t}\n }", "title": "" }, { "docid": "3cd7bfd61b37e676c3918567be5d6975", "score": "0.59166294", "text": "public function list_companies($params=array()){\n $this->_name = \"content\";\n $select = $this->select()->from(\"company\",array(\"id\",\"company_name\") )\n ->joinLeft(\"location\", \"company.location_id=location.id\", array(\"city\"))\n ->joinLeft(\"company_category\", \"company.company_category_id=company_category.id\", array(\"category\"));\n if (isset($params['query']) && isset($params['qtype'])){\n $select->where($params['qtype'].\" LIKE ? \",\"%\".$params['query'].\"%\");\n }\n $subselect = clone $select;\n if (isset($params['sortname']) && isset($params['sortorder'])){\n $select->order($params['sortname'].\" \".$params['sortorder']);\n }\n $select->limitPage($params['page'],$params['rp']);\n return array(\n \t\"data\" => $select->query()->fetchAll(),\n \"total\" => $subselect->query()->rowCount(),\n \"page\"\t => $params['page'],\n \"column\" => array(\"company_name\",\"city\",\"category\"),\n \"defaultId\"=> \"id\"\n );\n }", "title": "" }, { "docid": "957ccf2d971951831a8624211c700554", "score": "0.58773893", "text": "public function getCompanyNameById($id){\n \n $result=self::find($id)\n ->select(\"name\")\n ->first();\n \n \n return $result;\n }", "title": "" }, { "docid": "81080d56ad44c538d7716326faa1e4bc", "score": "0.5856588", "text": "public function getPlacementCompanies($selected='',$conditions='') {\n $results = CommonQueryManager::getInstance()->getPlacementCompaniesData($conditions);\n $returnValues = '';\n if(isset($results) && is_array($results)) {\n $count = count($results);\n for($i=0;$i<$count;$i++) {\n if($results[$i]['companyId']==$selected) {\n $returnValues .='<option value=\"'.$results[$i]['companyId'].'\" SELECTED=\"SELECTED\">'.strip_slashes($results[$i]['companyCode']).'</option>';\n }\n else {\n $returnValues .='<option value=\"'.$results[$i]['companyId'].'\">'.strip_slashes($results[$i]['companyCode']).'</option>';\n }\n }\n\n }\n return $returnValues;\n }", "title": "" }, { "docid": "0c9f17f9b25c7fa8381aeb561878ecc3", "score": "0.5835264", "text": "public function getAllAuthors() {\n $queryStr = \"SELECT a.author_id, a.first_name, a.last_name, CONCAT(a.place_of_birth, ', ', a.country) AS bornIn, \"\n . \"a.gender, c.category FROM authors a \"\n . \"JOIN categories c ON a.cat_id = c.cat_id ORDER BY a.author_id ASC\";\n return $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'author_id');\n }", "title": "" }, { "docid": "2143e5fda088904f73d570e822778431", "score": "0.5821126", "text": "public function get($company_id)\n {\n return Company::find($company_id);\n }", "title": "" }, { "docid": "302e7b1bf3bdf5e6c577765952cf40bb", "score": "0.58195597", "text": "function retrieveCompanyDetails() {\n\tglobal $adb;\n\t$companyDetails = array();\n\t$mod = CRMEntity::getInstance('cbCompany');\n\t$query = $adb->pquery(\n\t\t'SELECT c.*,a.*\n\t\t\tFROM vtiger_cbcompany c\n\t\t\tJOIN '.$mod->crmentityTable.' as vtiger_crmentity on vtiger_crmentity.crmid = c.cbcompanyid\n\t\t\tLEFT JOIN vtiger_seattachmentsrel s ON c.cbcompanyid = s.crmid\n\t\t\tLEFT JOIN vtiger_attachments a ON s.attachmentsid = a.attachmentsid\n\t\t\tWHERE c.defaultcompany = 1 and vtiger_crmentity.deleted = 0',\n\t\tarray()\n\t);\n\tif ($query && $adb->num_rows($query) > 0) {\n\t\t$companyDetails['name'] = $companyDetails['companyname'] = decode_html($adb->query_result($query, 0, 'companyname'));\n\t\t$companyDetails['website'] = $adb->query_result($query, 0, 'website');\n\t\t$companyDetails['email'] = $adb->query_result($query, 0, 'email');\n\t\t$companyDetails['siccode'] = $adb->query_result($query, 0, 'siccode');\n\t\t$companyDetails['accid'] = $adb->query_result($query, 0, 'accid');\n\t\t$companyDetails['address'] = decode_html($adb->query_result($query, 0, 'address'));\n\t\t$companyDetails['city'] = decode_html($adb->query_result($query, 0, 'city'));\n\t\t$companyDetails['state'] = decode_html($adb->query_result($query, 0, 'state'));\n\t\t$companyDetails['country'] = decode_html($adb->query_result($query, 0, 'country'));\n\t\t$companyDetails['postalcode'] = $companyDetails['code'] = decode_html($adb->query_result($query, 0, 'postalcode'));\n\t\t$companyDetails['phone'] = $adb->query_result($query, 0, 'phone');\n\t\t$companyDetails['fax'] = $adb->query_result($query, 0, 'fax');\n\t\tfor ($i=0; $i<$adb->num_rows($query); $i++) {\n\t\t\t$path = $adb->query_result($query, $i, 'path');\n\t\t\t$attachmentsid = $adb->query_result($query, $i, 'attachmentsid');\n\t\t\t$favicon = decode_html($adb->query_result($query, $i, 'favicon'));\n\t\t\t$companylogo = decode_html($adb->query_result($query, $i, 'companylogo'));\n\t\t\t$applogo = decode_html($adb->query_result($query, $i, 'applogo'));\n\t\t\t$name = $adb->query_result($query, $i, 'name'); // attachmentname\n\t\t\tif ($name == $favicon && !isset($companyDetails['favicon'])) {\n\t\t\t\t$companyDetails['favicon'] = $path.$attachmentsid.'_'.$favicon;\n\t\t\t}\n\t\t\tif ($name == $companylogo && !isset($companyDetails['companylogo'])) {\n\t\t\t\tif (file_exists($path.$attachmentsid.'_'.$companylogo)) {\n\t\t\t\t\t$companyDetails['companylogo'] = $path.$attachmentsid.'_'.$companylogo;\n\t\t\t\t} else {\n\t\t\t\t\t$companyDetails['companylogo'] = 'themes/images/coreboslogo.png';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($name == $applogo && !isset($companyDetails['applogo'])) {\n\t\t\t\t$companyDetails['applogo'] = $path.$attachmentsid.'_'.$applogo;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$companyDetails['name'] = $companyDetails['companyname'] = GlobalVariable::getVariable('Application_UI_Name', 'coreBOS');\n\t}\n\t$companyDetails = setDefaultCompanyParams($companyDetails);\n\treturn $companyDetails;\n}", "title": "" }, { "docid": "d521172db28fd022dc06e0ca07b1952d", "score": "0.5814526", "text": "public function index(){\n return Responser::ok('Companies list',Company::with(['users' => function($query){\n $query->where('id',Auth::user()->id);\n }])->get()->toArray());\n }", "title": "" }, { "docid": "82942fc8cc63ba6c8548ce5a46ff5f1a", "score": "0.58077276", "text": "function getCompanyData($id = null)\n\t{\n\t\t$CI =& get_instance();\n $CI->db->from('company');\n $CI->db->where('id',1);\n $query = $CI->db->get();\n return $query->row();\n\t}", "title": "" }, { "docid": "e2eeb6b10aebcc8ae2e72d0e9638c720", "score": "0.57899606", "text": "public function list()\n {\n $company = CompanyService::getList();\n return response()->json(array(\n 'companies' => $company\n ),200);\n }", "title": "" }, { "docid": "67b7162e8f1870179cf3396690b1a134", "score": "0.5783402", "text": "public function getsitecompany($id_company = null) {\n\t\ttry {\n\t\t\tglobal $con;\n\t\t\t/* Statement declaration */\n\t\t\t$sql = \"SELECT si.name, id_site\n\t\t\t\t\tFROM companies co, sites si\n\t\t\t\t\tWHERE si.id_company=co.id_company\n\t\t\t\t\tAND si.id_company = \".$id_company.\"\";\n\t\t\t/* Statement values & execution */\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t\n\t\t\t/* Statement execution */\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t/* Handle errors */\n\t\t\tif ($stmt->errno)\n\t\t\t throw new PDOException($stmt->error);\n\t\t\telse\n\t\t\t return $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\n\t\t/* Close statement */\n\t\t\t$stmt->close();\n\t\t} catch(PDOException $e) {\n\t\t\treturn array(\"error\" => $e->getMessage());\n\t\t}\n }", "title": "" }, { "docid": "cd07933b1d09213538545fa540d5e4cf", "score": "0.5779426", "text": "private function loadCompanies() {\n\t\tif ($this->loaded) $this->data['companies'] = $this->db()->query('usersCompanies', array('user_id' => $this->id), array('transpose' => array('selectKey' => 'company_id', 'selectValue' => true)));\n\t}", "title": "" }, { "docid": "829208be2fde0981270231d3e1afba40", "score": "0.5762444", "text": "public function getAllActiveCompaniesQuery($options)\n {\n\n $defaultOptions = array(\n 'searchText' => '',\n 'sort' => 'c.id',\n 'direction' => 'asc'\n );\n\n foreach ($options as $key => $values) {\n if (!$values){\n $options[$key] = $defaultOptions[$key];\n } \n }\n\n $qb = $this->createQueryBuilder('c')->select('c');\n $qb->where('c.isDeleted = :status')->setParameter('status', false);\n \n // search\n if ($options['searchText']) {\n if ($options['searchText'] != \"search..\") {\n $qb->andWhere($qb->expr()->orx(\n $qb->expr()->like('c.name', $qb->expr()->literal('%' . $options['searchText'] . '%'))\n ));\n }\n }\n \n $qb->orderBy($options['sort'], $options['direction']);\n return $qb->getQuery()->execute();\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.57621497", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.57621497", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.57621497", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "ebf5823c2af2190c89ba0488b5de0255", "score": "0.5760744", "text": "public function getDriversByCompanies($id_company = null) {\n\t\ttry {\n\t\t\tglobal $con;\t\t\t\n\t\t\t/* Statement declaration */\n\t\t\t$sql = \t\"SELECT * \".\n\t\t\t\t\t\"FROM drivers \".\n\t\t\t\t\t\"WHERE id_company = :id_company\";\n\t\t\t\t\t\n\t\t\t/* Statement values & execution */\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindParam(':id_company', $id_company);\n\t\t\t\n\t\t\t/* Statement execution */\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t/* Handle errors */\n\t\t\tif ($stmt->errno)\n\t\t\t throw new PDOException($stmt->error);\n\t\t\telse\n\t\t\t return $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\n\t\t\t/* Close statement */\n\t\t\t$stmt->close();\n\t\t} catch(PDOException $e) {\n\t\t\treturn array(\"error\" => $e->getMessage());\n\t\t}\n }", "title": "" }, { "docid": "3888a94702a23fac4c3b0b4855554a42", "score": "0.57599795", "text": "public function getPiCompanyList($studyId, $companyId) {\n\t$studyPiObj = new PhvStudyPi();\n\t$companyObj = new PhvCompany();\n\t$companyPiObj = new PhvCompanyPis();\n\t$query = new \\Doctrine\\ORM\\QueryBuilder($this->getEntityManager());\n\t$query = $query->select('cp.id as compPid','sp.id', 'c.company_name')\n\t\t\t->from($studyPiObj->getTableName(), 'sp')\n\t\t\t->Join($companyPiObj->getTableName(), 'cp', \"ON\", 'cp.id=sp.company_pis_id')\n\t\t\t->leftJoin($companyObj->getTableName(), 'c', \"ON\", 'c.id=cp.pi_id')\n\t\t\t->where($query->expr()->eq('sp.study_id', $studyId))\n\t\t\t->andWhere($query->expr()->eq('cp.company_id', $companyId));\n\t\n\t$result = $this->getEntityManager()->getConnection()->executeQuery($query)->fetchAll();\n $tempArr = array();\n\tif(count($result) > 0) {\n\t foreach ($result as $val) {\n\t\t$tempArr[] = $val['company_name'];\n\t }\n\t}\n return $tempArr;\n }", "title": "" }, { "docid": "9a4c13aed886e895cc6bc10782c86cbf", "score": "0.5744669", "text": "function get_company_by_id($id) {\n\t// Open the database connection\n\t$db = db_open ();\n\n\t// Get the user information\n\t$stmt = $db->prepare ( \"SELECT * FROM company WHERE value = :value\" );\n\t$stmt->bindParam ( \":value\", $id, PDO::PARAM_INT );\n\t$stmt->execute ();\n\n\t// Store the list in the array\n\t$array = $stmt->fetchAll ();\n\n\t// Close the database connection\n\tdb_close ( $db );\n\n\treturn $array [0];\n}", "title": "" }, { "docid": "21f5ccfe25da014427560e54d300da57", "score": "0.5725881", "text": "public function companies()\n {\n return $this->hasMany(Company::class);\n }", "title": "" }, { "docid": "21f5ccfe25da014427560e54d300da57", "score": "0.5725881", "text": "public function companies()\n {\n return $this->hasMany(Company::class);\n }", "title": "" }, { "docid": "1f779d547132635157ca9bc31b94a7e2", "score": "0.5723381", "text": "public function companies()\n {\n return view('companies.view', [\n 'viewCompanies' =>Employer::orderBy('company_name', 'asc')->distinct('id')->paginate(10)\n ]);\n \n }", "title": "" }, { "docid": "c27cb696372234177d551412ff1dc37a", "score": "0.5717556", "text": "public function getCounselorList()\n {\n $conn = $this->getEntityManager() //calls the Doctrine entity manager to start a query\n ->getConnection();\n\n $sql = '\n SELECT DISTINCT c.counselorId, c.firstName, c.lastName, c.initial, c.department, c.position, c.isAdmin, c.isActive as active\n FROM counselor c \n ORDER BY c.firstName ASC';\n $stmt = $conn->prepare($sql); //finishing the query\n $stmt->execute();\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "81839d53cdff4003738ed2d2b4688570", "score": "0.57030785", "text": "public function getCompanyId()\n {\n return $this->companyId;\n }", "title": "" }, { "docid": "2754966aaf5e6fc21e4b54c818bc0a2b", "score": "0.5700672", "text": "public function getCompanyByTokenAndCompanyId($data)\n {\n $db=$this->db;\n\n $sql = \"\n SELECT\n company_id\n FROM\n oauth_companies\n WHERE\n company_id = ?\n AND\n token = ?\";\n\n $params[] = $data['company_id'];\n $params[] = $data['token'];\n\n $query = $db->prepare($sql);\n if ($query->execute($params) === false) {\n return false;\n }\n\n $result = $query->fetch(\\PDO::FETCH_ASSOC);\n if (!$result) {\n return array();\n }\n\n return $result;\n }", "title": "" }, { "docid": "12af6cb2bc8710d9253d374565d7937a", "score": "0.5675365", "text": "function getCompany($id) {\n\n\t\t$id = (int)$id;\n\n\t\tif (!isset($this->companies[$id])) {\n\t\t\tglobal $db;\n\n\t\t\t$this->companies[$id] = $db->query_return(\"\n\t\t\t\tSELECT * FROM user_company\n\t\t\t\tWHERE id = $id\n\t\t\t\");\n\t\t}\n\n\t\treturn $this->companies[$id];\n\t}", "title": "" }, { "docid": "487e453782d3d34a8f33f912c60557c9", "score": "0.56707287", "text": "public function getCompany_id()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "ae0e6a986a2349b541e834c66938f7c0", "score": "0.5667694", "text": "private function findnullcompanies($company_id) {\n\t\t\n\t\t/**\n\t\t * *************** getting details for basic information****************\n\t\t */\n\t\t$databasicinfo = TblAcaBasicInformation::find ()->where ( [ \n\t\t\t\t'company_id' => $company_id \n\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for basic additional details****************\n\t\t */\n\t\t$databasicinfoadditionaldetails = TblAcaBasicAdditionalDetail::find ()->where ( [ \n\t\t\t\t'company_id' => $company_id \n\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for emp status track****************\n\t\t */\n\t\t// $datacompanyreportingperiod = TblAcaCompanyReportingPeriod::find()->where(['company_id'=>$company_id])->one();\n\t\t$dataempstatus = TblAcaEmpStatusTrack::find ()->where ( [ \n\t\t\t\t'company_id' => $company_id \n\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for plan criteria****************\n\t\t */\n\t\t$dataplancreteria = TblAcaPlanCriteria::find ()->where ( [ \n\t\t\t\t'company_id' => $company_id \n\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for dge****************\n\t\t */\n\t\t$datadesignatedgovtentity = TblAcaDesignatedGovtEntity::find ()->where ( [ \n\t\t\t\t'company_id' => $company_id \n\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for aggregate group****************\n\t\t */\n\t\t$dataaggregategroup = TblAcaAggregatedGroup::find ()->where ( [ \n\t\t\t\t'company_id' => $company_id \n\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for General plan info****************\n\t\t */\n\t\t$datageneralplaninfo = TblAcaGeneralPlanInfo::find ()->where ( [\n\t\t\t\t'company_id' => $company_id\n\t\t\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for mec coverage****************\n\t\t */\n\t\t$datameccoverage = TblAcaMecCoverage::find ()->where ( [\n\t\t\t\t'company_id' => $company_id\n\t\t\t\t] )->one ();\n\t\t\n\t\t/**\n\t\t * *************** getting details for plan coverage type****************\n\t\t */\n\t\t$dataplancoveragetype = TblAcaPlanCoverageType::find ()->where ( [\n\t\t\t\t'company_id' => $company_id\n\t\t\t\t] )->one ();\n\t\t\n\t\t\n\t\t\n\t\tif (! empty ( $databasicinfo ) || ! empty ( $databasicinfoadditionaldetails ) || ! empty ( $dataempstatus ) || ! empty ( $dataplancreteria ) \n\t\t|| ! empty ( $datadesignatedgovtentity ) || ! empty ( $dataaggregategroup) || ! empty ( $datageneralplaninfo ) || ! empty ( $datameccoverage )|| ! empty ( $dataplancoveragetype )) {\n\t\t\t\n\t\t\t$value = 1;\n\t\t} else {\n\t\t\t$value = 0;\n\t\t}\n\t\t\n\t\treturn $value;\n\t\t// print_R($datacompanyreportingperiod);\n\t\t// print_r($databasicinfo.'-'.$databasicinfoadditionaldetails.'-'.$datacompanyreportingperiod.'-'.$dataempstatus.'-'.$dataplancreteria.'-'.$datadesignatedgovtentity.'-'.$dataaggregategroup) ;\n\t}", "title": "" }, { "docid": "a8343d2c612fa0c92defa9904e29486e", "score": "0.5656695", "text": "public function get_companies_from_sic($sic) {\n $this->db->select('company_name, (select 1 from dual) as count')->from($this->table)->where(array(\"sic\" => $sic));\n return $this->db->get()->result();\n }", "title": "" }, { "docid": "352d4c911fdc2cb49cd692d5458f4bb3", "score": "0.56556714", "text": "function get_companies(){\n $q=\"SELECT * FROM business JOIN tbl_state on bus_stateid = state_id\";\n $result = $this->connect->query($q);\n \n $display = $result->fetch_assoc();\n \n $row=[]; \n while($display = $result->fetch_assoc()){;\n $row[] = $display;\n }return $row;\n \n }", "title": "" }, { "docid": "dea3e96c2525bd66d77d111ffffb720b", "score": "0.564161", "text": "public function getCompanyName() {\n return $this->_aData['company'];\n }", "title": "" }, { "docid": "55fd15999fb2935bc30a44a5c61a3325", "score": "0.5631971", "text": "public function findByCompanyId($companyId)\n {\n return $this->find(sprintf('companies-by-id/%s', $companyId));\n }", "title": "" }, { "docid": "8adeb6b109d1f3321d583b693775bf0b", "score": "0.5630276", "text": "public function company($id)\n\t{\n\t\t//\n\t\t$list = Lists::with(array('tags','keyproduct','productcatalog'))->where('id', $id)->orderBy('created_at','DESC')->first();\n\n\t\t// return $list;\n\n $this->layout->content = View::make('search.show_company_product')->with('list', $list)->with('id', $id);\n\n\t}", "title": "" }, { "docid": "3cd61602d90fcc9ffca7a3e1d71174e5", "score": "0.56228656", "text": "public static function getCompanyFields() {\n\t\t$presets = self::getCompanyPresets();\n\t\t$result = [\n\t\t\t'company' => [\n\t\t\t\t'title' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_COMPANY_TITLE\"),\n\t\t\t\t'items' => [\n\t\t\t\t\t'NAME' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_COMPANY_NAME\"),\n\t\t\t\t\t'PHONE' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_COMPANY_PHONE\"),\n\t\t\t\t\t'EMAIL' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_COMPANY_EMAIL\"),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'requisite' => [\n\t\t\t\t'title' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_TITLE\"),\n\t\t\t\t'items' => [\n\t\t\t\t\t'PRESET_ID' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_PRESET_ID\"),\n\t\t\t\t\t'RQ_FIRST_NAME' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_FIRST_NAME\"),\n\t\t\t\t\t'RQ_LAST_NAME' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_LAST_NAME\"),\n\t\t\t\t\t'RQ_SECOND_NAME' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_SECOND_NAME\"),\n\t\t\t\t\t'RQ_COMPANY_NAME' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_COMPANY_NAME\"),\n\t\t\t\t\t'RQ_COMPANY_FULL_NAME' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_COMPANY_FULL_NAME\"),\n\t\t\t\t\t'RQ_DIRECTOR' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_DIRECTOR\"),\n\t\t\t\t\t'RQ_INN' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_INN\"),\n\t\t\t\t\t'RQ_KPP' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_KPP\"),\n\t\t\t\t\t'RQ_OGRN' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_OGRN\"),\n\t\t\t\t\t'RQ_OGRNIP' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_OGRNIP\"),\n\t\t\t\t\t'RQ_OKPO' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_OKPO\"),\n\t\t\t\t\t'RQ_OKTMO' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_OKTMO\"),\n\t\t\t\t\t'RQ_OKVED' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_REQUISITE_RQ_OKVED\"),\n\t\t\t\t],\n\t\t\t\t'values' => [\n\t\t\t\t\t'PRESET_ID' => $presets,\n\t\t\t\t],\n\t\t\t\t'value_def' => [\n\t\t\t\t\t'PRESET_ID' => 1,\n\t\t\t\t],\n\t\t\t],\n\t\t\t'bankdetail' => [\n\t\t\t\t'title' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_BANKDETAIL_TITLE\"),\n\t\t\t\t'items' => [\n\t\t\t\t\t'RQ_BANK_NAME' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_BANKDETAIL_RQ_BANK_NAME\"),\n\t\t\t\t\t'RQ_BANK_ADDR' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_BANKDETAIL_RQ_BANK_ADDR\"),\n\t\t\t\t\t'RQ_BIK' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_BANKDETAIL_RQ_BIK\"),\n\t\t\t\t\t'RQ_ACC_NUM' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_BANKDETAIL_RQ_ACC_NUM\"),\n\t\t\t\t\t'RQ_ACC_CURRENCY' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_BANKDETAIL_RQ_ACC_CURRENCY\"),\n\t\t\t\t\t'RQ_COR_ACC_NUM' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_BANKDETAIL_RQ_COR_ACC_NUM\"),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'address_jur' => [\n\t\t\t\t'title' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_JUR_TITLE\"),\n\t\t\t\t'items' => [\n\t\t\t\t\t'ADDRESS_1' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_ADDRESS_1\"),\n\t\t\t\t\t'ADDRESS_2' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_ADDRESS_2\"),\n\t\t\t\t\t'CITY' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_CITY\"),\n\t\t\t\t\t'POSTAL_CODE' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_POSTAL_CODE\"),\n\t\t\t\t\t'REGION' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_REGION\"),\n\t\t\t\t\t'PROVINCE' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_PROVINCE\"),\n\t\t\t\t\t'COUNTRY' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_COUNTRY\"),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'address_fact' => [\n\t\t\t\t'title' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_FACT_TITLE\"),\n\t\t\t\t'items' => [\n\t\t\t\t\t'ADDRESS_1' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_ADDRESS_1\"),\n\t\t\t\t\t'ADDRESS_2' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_ADDRESS_2\"),\n\t\t\t\t\t'CITY' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_CITY\"),\n\t\t\t\t\t'POSTAL_CODE' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_POSTAL_CODE\"),\n\t\t\t\t\t'REGION' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_REGION\"),\n\t\t\t\t\t'PROVINCE' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_PROVINCE\"),\n\t\t\t\t\t'COUNTRY' => Loc::getMessage(\"CRM_PORTAL_INFO_COMPANY_ADDRESS_COUNTRY\"),\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0b42725035b0b517c765703060532cf5", "score": "0.5619065", "text": "public function getOrdersByCompanyId($id)\n\t{\n\t\t$qb = $this->_em->createQueryBuilder();\n\t\t$qb->select('o.id, c.name as company, u.firstName, u.lastName, o.createdAt, s.name as status, p.name as objectName, p.address1, p.town, p.country, p.zipcode')\n\t\t ->from('App\\Entity\\Commerce\\Order', 'o')\n\t\t ->leftJoin('App\\Entity\\Management\\Company','c','WITH','c.id = o.companyId')\n\t\t ->leftJoin('App\\Entity\\Management\\User','u','WITH','u.id = o.userId')\n\t\t ->leftJoin('App\\Entity\\Commerce\\Status','s','WITH','s.id = o.orderStatusId')\n\t\t ->leftJoin('App\\Entity\\Realestate\\Object','p','WITH','p.id = o.objectId')\n\t\t ->where('o.companyId = :companyId')\n\t\t ->setParameter('companyId', $id);\n\n\t\t \n\t\t$queryResult = $qb->getQuery()->getArrayResult();\n\t\tif(!empty($queryResult)) {\n\t\t\tforeach ($queryResult as $key => $value) {\n\t\t\t\t$queryResult[$key]['createdAt'] = $value['createdAt']->format('c');\n\t\t\t}\n\t\t\treturn $queryResult;\n\t\t} \n\t\t\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f16eee377c4d9731fdae757c48063656", "score": "0.5619054", "text": "public function getCompanies()\n {\n $data['companies'] = Company::all()->toArray();\n\n return view('admin.companies.view', $data);\n }", "title": "" }, { "docid": "fec11b05cbd281c622017369e17f8022", "score": "0.561126", "text": "public function index()\n {\n return $this->yclients->getCompanyList()\n ->json();\n }", "title": "" }, { "docid": "ab9bd4ed98809f740c5a56f79d264b79", "score": "0.5607292", "text": "public function getSites($id_company = null) {\n\t\ttry {\n\t\t\tglobal $con;\n\t\t\t/* Statement declaration */\n\t\t\t$sql = \t\"SELECT * \".\n\t\t\t\t\t\"FROM sites \".\n\t\t\t\t\t\"WHERE id_company = \".$id_company.\";\";\n\t\t\t\n\t\t\t/* Statement values & execution */\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t\n\t\t\t/* Statement execution */\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t/* Handle errors */\n\t\t\tif ($stmt->errno)\n\t\t\t throw new PDOException($stmt->error);\n\t\t\telse\n\t\t\t return $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\n\t\t/* Close statement */\n\t\t\t$stmt->close();\n\t\t} catch(PDOException $e) {\n\t\t\treturn array(\"error\" => $e->getMessage());\n\t\t}\n }", "title": "" }, { "docid": "6ab580f8007f180a1932e2ddb577daa6", "score": "0.56023324", "text": "function get_company_details($company_id) {\n\t$sql = \"SELECT * FROM \".DB_PREFIX.\"companies WHERE company_id = \".$company_id;\n\t$company = DB::queryFirstRow($sql);\n\tif ($company) {\n\treturn $company ;\n\t} else {\n\treturn false ;\n\t}\n}", "title": "" }, { "docid": "747911cc86b1ddd2142641f2ebc67101", "score": "0.5601679", "text": "public function getCompanyName();", "title": "" }, { "docid": "5c9a52c45e05bcfbb05d4ce951fc80fd", "score": "0.5593741", "text": "public function index()\n {\n return CompanyResource::collection(Company::all());\n }", "title": "" }, { "docid": "5c9a52c45e05bcfbb05d4ce951fc80fd", "score": "0.5593741", "text": "public function index()\n {\n return CompanyResource::collection(Company::all());\n }", "title": "" }, { "docid": "a24922c3c2f2930b59109deede3ad2a1", "score": "0.55907774", "text": "public function get_location_list($company_id)\n\t{\n\t\t$this->db->join('company_location b','b.location_id=a.location_id');\n\t\t$this->db->where('b.company_id',$company_id);\n\t\t$query = $this->db->get('location a');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "534965e4689847bae275319a53b5dd35", "score": "0.5590291", "text": "public function getBudgetRegisterCompanies($id){\n $budgetsRegisters = DB::table('itcp_budgets_register')\n ->join('itcp_service', 'itcp_budgets_register.service_id', '=', 'itcp_service.id_service')\n ->select('*')\n ->where('itcp_budgets_register.id_register_budgets', '=', $id)\n ->get();\n \n foreach ($budgetsRegisters as $budgetsRegister){\n $budgetsRegister->service_id = $this->getRelationship($budgetsRegister->service_id, 'itcp_service', 'id_service');\n }\n return $budgetsRegisters;\n }", "title": "" }, { "docid": "8bde7ade16c86a070bf5bad3283dfa83", "score": "0.55812085", "text": "public function getCompaniesList($keyword = '', $limit = false) \n {\n \tif($keyword === '')\n \t{\n \t\treturn false;\n \t}\n \t \n \t$rowset = $this->tableGateway->select(function (\\Zend\\Db\\Sql\\Select $select) use ($keyword, $limit) \n \t\t\t\t\t{\n\t \t\t\t\t\t$select->where->nest\n\t\t\t\t \t\t->like('symbol', '%'.$keyword.'%')\n\t\t\t\t \t\t->or->like('name', '%'.$keyword.'%')\n\t\t\t\t \t\t->unnest;\n\t \t\t\t\t\t$select->order('name ASC');\n\t \t\t\t\t\tif($limit)\n\t \t\t\t\t\t{\n\t \t\t\t\t\t\t$select->limit($limit);\n\t \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t$companies = array();\n\t\t\n\t\tif ($rowset)\n\t\t{\n\t\t\tforeach($rowset as $row)\n\t\t\t{\n\t\t\t\t$companies[$row->symbol] = $row->name;\t\n\t\t\t}\n\t\t}\n \n\t\treturn $companies;\n }", "title": "" }, { "docid": "5b05944a5b1056536035c1173e90c17e", "score": "0.5573024", "text": "public static function queryCompany($companyId)\n {\n try {\n $stmt = DB::get()->prepare(\"\n SELECT\n stores.*, UNIX_TIMESTAMP(stores.DateCreated) as sDateCreated,\n store_features.id as FeaturesID,\n store_features.CollectionTemplate,\n store_features.CollectionLocation,\n store_features.SessionCheck,\n store_features.WelcomeMessage,\n store_features.AllowComments,\n store_features.CommentMessage,\n locations.id as LocationID,\n locations.Country,\n locations.Province,\n locations.City,\n locations.PostalCode,\n locations.Longitude,\n locations.Latitude\n FROM stores\n JOIN store_features ON store_features.id = stores.FeaturesID\n JOIN locations ON locations.id = stores.LocationID\n WHERE stores.CompanyID = :id\n \");\n $stmt->bindValue(':id', (int) $companyId, \\PDO::PARAM_INT);\n $stmt->execute();\n return array_map(function ($row) {\n return self::from($row);\n }, $stmt->fetchAll(\\PDO::FETCH_ASSOC));\n } catch (\\PDOException $ex) {\n \\App::log()->error($ex->getMessage());\n }\n\n return null;\n }", "title": "" }, { "docid": "70aeba4bb89e54224bbb0880d8ac9597", "score": "0.5557625", "text": "public function getCompanyId () {\n\t\treturn($this->companyId);\n\t}", "title": "" }, { "docid": "f20c7a7702fd7dd68df37630c72a0b6e", "score": "0.5553662", "text": "public function ownedcompanies()\n {\n return $this->hasMany('Company', 'company_id');\n }", "title": "" }, { "docid": "b47072c0dccb5dc9d150b598ae0c17e1", "score": "0.55493575", "text": "public function getProviders($company){ \n $providers = new Provider();\n $providers->changeTable($company->model_name);\n $providers->addConnection($company->model_name);\n\n return $providers->get()->load('activeFoil');\n }", "title": "" }, { "docid": "7f028838797f27f11b2f298926f07017", "score": "0.5546757", "text": "public function findAllContacts()\n {\n $db= $this->getBdd();\n $data=$db->query( \"SELECT * FROM `contact`\")->fetchAll();\n \n return $data;\n }", "title": "" }, { "docid": "b3132cf4a8999f0cafac44d65ae87278", "score": "0.5543037", "text": "public function getCompanions($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collCompanions === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collCompanions = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(CompanionPeer::PERSON_ID, $this->id);\n\n\t\t\t\tCompanionPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collCompanions = CompanionPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(CompanionPeer::PERSON_ID, $this->id);\n\n\t\t\t\tCompanionPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastCompanionCriteria) || !$this->lastCompanionCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collCompanions = CompanionPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastCompanionCriteria = $criteria;\n\t\treturn $this->collCompanions;\n\t}", "title": "" }, { "docid": "a4c30756675a0536946f2938b15403fb", "score": "0.5515183", "text": "public function getContacts() {\n\t\t$query = \"SELECT c2.*, i.name as instrumentname \";\n\t\t$query .= \"FROM \";\n\t\t$query .= \" (SELECT c.*, a.street, a.city, a.zip \";\n\t\t$query .= \" FROM contact c \";\n\t\t$query .= \" LEFT JOIN address a \";\n\t\t$query .= \" ON c.address = a.id) as c2 \";\n\t\t$query .= \"LEFT JOIN instrument i \";\n\t\t$query .= \"ON c2.instrument = i.id \";\n\t\treturn $this->database->getSelection($query);\n\t}", "title": "" }, { "docid": "942c1af356f18a095f144942e414734c", "score": "0.5490168", "text": "public function companyListAction() {\n $companies = $this->companyRepository->findAll();\n // \\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($companies);\n $this->view->assign('mainmenu', '2');\n $this->view->assign('topmenu', '5');\n $this->view->assign('companies', $companies);\n }", "title": "" }, { "docid": "ef713a28b94eb76674554a804122d077", "score": "0.5487365", "text": "public function actionGetByCompany() {\n\t\t// Get the respective model instance\n\t\t$criteria = new CDbCriteria ();\n\n\t\tif (!isset ( $_GET [Params::param_Company_Id] )) {\n\t\t\tResponse::MissingParam(Params::param_Company_Id);\n\t\t}\n\t\t\n\t\tif (isset ( $_GET [Params::param_Offset] )) {\n\t\t\t$criteria->offset = $_GET [Params::param_Offset];\n\t\t}\n\t\tif (isset ( $_GET [Params::param_Limit] )) {\n\t\t\t$criteria->limit = $_GET [Params::param_Limit];\n\t\t}\n\t\tif (isset ( $_GET [Params::param_Order] )) {\n\t\t\t$criteria->order = $_GET [Params::param_Order];\n\t\t}\n\t\t$criteria->condition = 't.company_id=:company_id';\n\t\t$criteria->params = array (\n\t\t\t\t':company_id' => $_GET [Params::param_Company_Id]\n\t\t);\n\t\t$criteria->with = array (\n\t\t\t\t'userLevel',\n\t\t\t\t'deviceOs'\n\t\t);\n\t\t$models = User::model ()->findAll ( $criteria );\n\t\t\t\n\t\t// Did we get some results?\n\t\tif (empty ( $models )) {\n\t\t\t// No\n\t\t\tResponse::NoRecord( $this->modelName );\n\t\t} else {\n\t\t\t// Prepare response\n\t\t\tResponse::Success($this->modelName, $models);\n\t\t}\n\t}", "title": "" }, { "docid": "3810fafe81c5c2c31fd3922d47adf32f", "score": "0.5486514", "text": "public static function getAllList()\n {\n \treturn self::orderBy('name')->get()->pluck('name', 'id')->toArray();\n }", "title": "" }, { "docid": "bf51ce2dda734c1317bae2e67a133551", "score": "0.5485384", "text": "static public function getCompanysIdByName( $company_name )\n\t{\n\t\t$em = \\Zend_Registry::get('em');\n\t\t$qb_1 = $em->createQueryBuilder();\n\t\t$q_1 = $qb_1->select('cp')\n\t\t->from( '\\Entities\\company_ref', 'cp' )\n\t\t->where( \"cp.name LIKE :comp_name\")\n\t\t->setParameter('comp_name','%'.$company_name.'%');\n\t\t$finalResult=$q_1->getQuery()->getResult();\n\t\t$em->getConnection()->close();\n\t\tif($finalResult)\n\t\t{\n\t\t\treturn $finalResult[0]->getId();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "6a8a72e09e337f27f91022bed72808bb", "score": "0.5482557", "text": "public function show(companies $companies)\n {\n //\n }", "title": "" }, { "docid": "c42f41c8cafe15b80ab0c4abc57560aa", "score": "0.5474501", "text": "public function get_companydata($CompanyId=Null)\n\t{\n\t\ttry{\n\t if($CompanyId)\n\t {\t\t \n\t\t\t$this->db->select('com.CompanyId,com.ParentId,com.IndustryId,com.Name,com.EmailAddress as EmailAddressCom,com.Website,com.AddressesId,com.PhoneNumber,com.IsActive,add.AddressesId as AddressesId2,add.Address1,add.Address2,add.CountryId,add.StateId,add.City,add.ZipCode,add.IsActive');\n\t\t\t$this->db->join('tblmstaddresses add','add.AddressesId = com.AddressesId', 'left');\n\n\t\t\t$this->db->where('com.CompanyId',$CompanyId);\n\t\t\t$result = $this->db->get('tblcompany com');\n\t\t\t$db_error = $this->db->error();\n\t\t\t\tif (!empty($db_error) && !empty($db_error['code'])) { \n\t\t\t\t\tthrow new Exception('Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message']);\n\t\t\t\t\treturn false; // unreachable return statement !!!\n\t\t\t\t}\n\t\t\t$company_data= array();\n\t\t\tforeach($result->result() as $row)\n\t\t\t{\n\t\t\t\t$company_data=$row;\t\t\t\t\n\t\t\t}\n\t\t \treturn $company_data;\t\t \n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\tcatch(Exception $e){\n\t\ttrigger_error($e->getMessage(), E_USER_ERROR);\n\t\treturn false;\n\t}\n\t}", "title": "" }, { "docid": "f36d1fae7449f1911826d43551e31d16", "score": "0.54729176", "text": "public static function getAllList()\n {\n return self::orderBy('name')->get()->pluck('name', 'id')->toArray();\n }", "title": "" }, { "docid": "fdd4ef8653211865efca246e9854f0a3", "score": "0.5470209", "text": "public function get_all_contracts(){\n\t\t$contract_sql = \"\n\t\t\tSELECT \n\t\t\t\tc.id,\n o.price,\n\t\t\t\ta1.username as employer_username,\n\t\t\t\ta2.username as employee_username,\n\t\t\t\tt.title,\n\t\t\t\tc.offer_id,\n\t\t\t\tc.created_datetime,\n\t\t\t\tc.last_updated_datetime,\n\t\t\t\tc.completion_status\n\t\t\tFROM \n\t\t\t\tcontract c, \n account a1, \n account a2, \n task t,\n offer o\n\t\t\tWHERE\n\t\t\t\ta1.id = c.employer_id AND\n\t\t\t\ta2.id = c.employee_id AND\n\t\t\t\tt.id = c.task_id AND \n o.id = c.offer_id\n ORDER BY\n c.id\n\t\t\";\n\t\treturn $this->db->query($contract_sql)->result_array();\n\t}", "title": "" }, { "docid": "70b4b5b887b2365da86309c9e23c24aa", "score": "0.54669034", "text": "public function getConfirmedCompanies(): Collection\n {\n return $this->confirmedCompanies;\n }", "title": "" }, { "docid": "8a06357cc8d0d70036408b25387e584d", "score": "0.54631174", "text": "function getCompanyAdmins($account_id)\n {\n $accountAdmins = User::whereHas('roles', function ($q) {\n $q->where('name', 'admin');\n })->where('company_id', $account_id)->get(['id', 'email']);\n\n return $accountAdmins;\n }", "title": "" }, { "docid": "5faaa643d4bea83651b6432834eacbae", "score": "0.54605085", "text": "public function getDataForDataTable()\n { \n $search = \\Request::get('search') ?: '';\n $perPage = \\Request::get('per_page') ?: 5;\n // Get companies\n $companies = Company::where(function ($query) use($search) {\n $query->where('name', 'like', '%' . $search . '%')\n ->orWhere('type', 'like', '%' . $search . '%')\n ->orWhere('phone_number', 'like', '%' . $search . '%');\n })\n ->orderBy('name', 'asc')\n ->paginate($perPage);\n\n // Return collection of companies as a resource\n return CompanyDatatableResource::collection($companies);\n }", "title": "" }, { "docid": "c21747e5551ac38d3faf1201e300ef59", "score": "0.5456995", "text": "function get_contacts()\r\n\t{\r\n\t\trequire_once('modules/Contacts/Contact.php');\r\n\t\t$this->load_relationship('contacts');\r\n\t\t$query_array=$this->contacts->getQuery(true);\r\n\t\t\r\n\t\t//update the select clause in the retruned query.\r\n\t\t$query_array['select']=\"SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.email1, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id \";\r\n\t\r\n\t\t$query='';\r\n\t\tforeach ($query_array as $qstring) {\r\n\t\t\t$query.=' '.$qstring;\r\n\t\t}\t\r\n\t $temp = Array('id', 'first_name', 'last_name', 'title', 'email1', 'phone_work', 'opportunity_role', 'opportunity_rel_id');\r\n\t\treturn $this->build_related_list2($query, new Contact(), $temp);\r\n\t}", "title": "" }, { "docid": "79faaf9b1d10ea2116a0694d715a2691", "score": "0.54512864", "text": "public function get_single_company($company_id) {\r\n $statement = $this->db->query(\"SELECT * FROM `companies` WHERE `company_id` = $company_id\"); \r\n $statement->setFetchMode(PDO::FETCH_ASSOC);\r\n \r\n $row = $statement->fetch(); \r\n \r\n return $row; \r\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "10291edd37279e18c8caf3423051fc6f", "score": "0.0", "text": "public function destroy($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "6f5cb91b0423a11c78f100fc165554df", "score": "0.6959094", "text": "public function delete(ResourceInterface $resource);", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "55490a425cec5f2c2efea8b737497612", "score": "0.6737496", "text": "public function deleteGameResource($resource){\n if($this->gameResourceExists($resource)){\n unlink($this->getResourceDataPath() . $resource . \".dat\");\n }\n }", "title": "" }, { "docid": "ef862fedfa2a9a53bdc0c931abd5b9ef", "score": "0.6707853", "text": "public function destroy()\n {\n $this->resource->delete();\n }", "title": "" }, { "docid": "033a3fd474fdaf2c9dbcf9853f451cd2", "score": "0.664397", "text": "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\"); \n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\", \n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "title": "" }, { "docid": "4f49f964d082c69a3fe92671d08d3bc7", "score": "0.66371554", "text": "public function delete($cacheResource, $ignoreLifetime = false);", "title": "" }, { "docid": "47236fb1482f779e9251fd6998158877", "score": "0.65373594", "text": "public function deleteResource(PersistentResource $resource, $unpublishResource = true)\n {\n $this->initialize();\n\n $collectionName = $resource->getCollectionName();\n\n $result = $this->resourceRepository->countBySha1AndCollectionName($resource->getSha1(), $collectionName);\n if ($result > 1) {\n $this->logger->debug(sprintf('Not removing storage data of resource %s (%s) because it is still in use by %s other PersistentResource object(s).', $resource->getFilename(), $resource->getSha1(), $result - 1));\n } else {\n if (!isset($this->collections[$collectionName])) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it refers to the unknown collection \"%s\".', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n $storage = $this->collections[$collectionName]->getStorage();\n if (!$storage instanceof WritableStorageInterface) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it its collection \"%s\" is read-only.', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n try {\n $storage->deleteResource($resource);\n } catch (\\Exception $exception) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s): %s.', $resource->getFilename(), $resource->getSha1(), $exception->getMessage()), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n if ($unpublishResource) {\n /** @var TargetInterface $target */\n $target = $this->collections[$collectionName]->getTarget();\n $target->unpublishResource($resource);\n $this->logger->debug(sprintf('Removed storage data and unpublished resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n } else {\n $this->logger->debug(sprintf('Removed storage data of resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n }\n }\n\n $resource->setDeleted();\n $this->resourceRepository->remove($resource);\n\n return true;\n }", "title": "" }, { "docid": "73af02f86d4e877d5ec7756885285cd4", "score": "0.6409313", "text": "function delete($resourceName);", "title": "" }, { "docid": "fd5668b2d59626254ea2b308c3b7b195", "score": "0.63944584", "text": "public function removeResource(Row_AclResource $resource)\r\n\t{\r\n\t\t$row = $this->_getAclRow($resource);\r\n\t\t$row->allow = 0;\r\n\t\t$row->save();\r\n\t}", "title": "" }, { "docid": "66cab78c708362190959631c44dd73a1", "score": "0.6300312", "text": "public function remove( $resource ) {\n \n $res = $this->get( $resource );\n \n if ($res == false) {\n return $this;\n }\n \n $resourceId = $res->getResourceId();\n \n $resourcesRemoved = array( $resourceId );\n if ( null !== ( $resourceParent = $this->_resources[$resourceId]['parent'] ) ) {\n unset( $this->_resources[$resourceParent->getResourceId()]['children'][$resourceId] );\n }\n foreach ( $this->_resources[$resourceId]['children'] as $childId => $child ) {\n $this->remove( $childId );\n $resourcesRemoved[] = $childId;\n }\n // удаляет и правила для рессурса\n foreach ( $resourcesRemoved as $resourceIdRemoved ) {\n foreach ( $this->_rules['byResourceId'] as $resourceIdCurrent => $rules ) {\n if ( $resourceIdRemoved === $resourceIdCurrent ) {\n unset( $this->_rules['byResourceId'][$resourceIdCurrent] );\n }\n }\n }\n\n unset( $this->_resources[$resourceId] );\n\n\n return $this;\n }", "title": "" }, { "docid": "2a10b35926876411b2e80108cfe22fca", "score": "0.6298291", "text": "public function remove() {\n // determine the name of the file\n $filename = $this->engine->cache_file_path($this->key(), $this->options);\n @unlink($filename);\n }", "title": "" }, { "docid": "89ce35850dffc0e6605778465129a8fa", "score": "0.62484", "text": "public function destroy(Resource $resource)\n {\n if (count($resource->photos)) { // delete photos from filesystem and storage.\n foreach ($resource->photos as $key => $photo) {\n $resource->deletePhoto($photo);\n }\n }\n $resource->delete();\n return redirect('/home')->with(['status' => 'Deivce successfully deleted']);\n }", "title": "" }, { "docid": "2367dd4337c36bfe160c73cbfe965a9c", "score": "0.6222181", "text": "public function testRemoveResource() {\n\n\t\t$file = $this->tempDir . DIRECTORY_SEPARATOR . 'test.txt';\n\t\tfile_put_contents($file, 'test');\n\n\t\t$this->assertTrue(file_exists($file));\n\n\t\t$container = new FilesystemResourceContainer($this->tempDir, FileResource::TYPE);\n\t\t$container->remove('test.txt');\n\n\t\t$this->assertFalse(file_exists($file));\n\t}", "title": "" }, { "docid": "07b2c5af4c184e58bf2887516d95f2ee", "score": "0.6152366", "text": "public function clearResource(){\n\t\t\tif ($this->resource !== null){\n\t\t\t\timagedestroy($this->resource);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7e83a85a6ecaba18a97b363f757bfe88", "score": "0.61334383", "text": "public function remove() {\n\t\tunlink($this->getSrcImagePath());\n\t}", "title": "" }, { "docid": "0fd71148a5c7f18c479bf79390410ee6", "score": "0.6105545", "text": "public function delete(): void\n {\n if ($this->has($this->file))\n unlink($this->file);\n }", "title": "" }, { "docid": "eaf52922cf2f9f3851b5dee384bd6ceb", "score": "0.60544735", "text": "public static function remove($storageId) {\n\t\t$storageCache = new Storage($storageId);\n\t\t$numericId = $storageCache->getNumericId();\n\n\t\tif (strlen($storageId) > 64) {\n\t\t\t$storageId = md5($storageId);\n\t\t}\n\t\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($storageId));\n\n\t\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($numericId));\n\t}", "title": "" }, { "docid": "5d67ccf5357bc568ae73bc2554b4fcb3", "score": "0.60279834", "text": "function destroying_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "98d22295493f0020f84c312075af1ad7", "score": "0.60123336", "text": "function deleting_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a7e206f667720084df5493157a69cfb1", "score": "0.59848213", "text": "static private function _delResCache($resource)\n {\n $hash = self::getHashByResource($resource);\n foreach (self::$res as &$items) {\n if (!empty($items[$hash])) {\n unset($items[$hash]);\n }\n } \n }", "title": "" }, { "docid": "896e95e8d1abd4f6c5eecd1940391bef", "score": "0.5978198", "text": "public function unlinkStorage(): self\n {\n unlink($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "46e2a3c32c6b5a596ae0cf2bf703c970", "score": "0.5958219", "text": "public function destroy($id)\n {\n $get=Document::where('id',$id)->first();\n if($get->photo!=null&&file_exists(\"/storage/$get->photo\")){\n unlink('storage/'.$get->photo);\n }\n $get->delete();\n return redirect()->route('listDocument');\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "970f51bb911499288a1748bfe0157efa", "score": "0.5912158", "text": "public function delete($id) {\n $this->connectStorage($id);\n $this->storage->delete();\n }", "title": "" }, { "docid": "f1553c7757cc3676299373a5d3a835f9", "score": "0.5907517", "text": "public function destroy($id)\n {\n $uniforme = Uniforme::find();\n Storage::delete('file.jpg');\n }", "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": "47945b59946db62fc806604498e46323", "score": "0.58641815", "text": "public function remove(FileInterface $file): FileInterface;", "title": "" }, { "docid": "d3158d405d4b489191764d14126b6336", "score": "0.5857253", "text": "public function destroy($id)\n {\n $trigger = Resource::where('id', $id)->first();\n $file = $trigger->file;\n if (!empty($file)) {\n $upFile = new UploadFile();\n $upFile->deleteCurrentFile($file, 'resource');\n }\n $trigger->delete();\n return back();\n }", "title": "" }, { "docid": "ce513fb382cd88ef0817a244ce395271", "score": "0.5824645", "text": "public function destroy($id)\n {\n $image= Image::find($id); \n $name = $image->name;\n $file = '/images/'.$name;\n $thumbnail = '/uploads/thumbnail/'.$name;\n Storage::delete([$file, $thumbnail]); // delete from folder $image->delete(); // delete from table return redirect()->back(); \n }", "title": "" }, { "docid": "b6078f9d34f26c367a9797120d6006ab", "score": "0.5818996", "text": "public function resourceHasBeenDeleted();", "title": "" }, { "docid": "c8394dead7326b95b49dd4f6c575a34a", "score": "0.58155316", "text": "public function destroy($resource, $id)\n {\n $model = $this->model->find($id);\n $model->delete();\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource', [\n 'resource' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "915ec80e489f9eed2bde0417b2f10a19", "score": "0.580295", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->addResource($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "b4ee6dc4b9942eba341457d6bf4d5638", "score": "0.5796796", "text": "public function removeFromStore()\n {\n if ($this->getHash() && $this->getType()) {\n $this->getFileStore()->delete($this->getHash(), $this->getType());\n } else {\n throw new SwompException(\"Cannot remove from Store - Hash and Type is required\");\n }\n }", "title": "" }, { "docid": "b48e565472dafa6e553cf8aee6f42a6a", "score": "0.578793", "text": "public function destroy($id)\n {\n $product = Pruduct::where('id', $id)->first();\n unlink('storage/' . $product->image);\n\n $product->delete();\n Session::flash('messege', 'Data berhasil di hapus.');\n return redirect()->back();\n }", "title": "" }, { "docid": "532f8d58b20e101c1f5035990ba18e7e", "score": "0.57871205", "text": "public function cleanStorage();", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "0009889a5268b3415309c6899e972909", "score": "0.57663226", "text": "public function delete()\r\n {\r\n $path = $this->path;\r\n parent::delete();\r\n\r\n // Delete file if exists\r\n if($this->id && file_exists($path))\r\n {\r\n unlink($path);\r\n }\r\n\r\n }", "title": "" }, { "docid": "62c6b6bfe5aeaa08992c1c1ff2c5e9ec", "score": "0.5732295", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n \n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "b6294af388de3ae8b010bbdd0e147a65", "score": "0.57102996", "text": "function destroyed_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a1d82443b72d201e5ede999d05bf59f5", "score": "0.57096094", "text": "public function unsetStorageId()\r\n\t{\r\n\t\tunset($this->_storage_id);\r\n\t}", "title": "" }, { "docid": "9591ec5177ac179477cbd3c3ccaa275a", "score": "0.5706215", "text": "public function destroy($id)\n {\n $file = FileTask::findOrFail($id);\n Storage::delete($file->path); //delete from disk\n $file->delete(); //delete from db\n flash('File was removed!');\n return back();\n }", "title": "" }, { "docid": "cf195d4a522e74edc7019e572a06923c", "score": "0.5694188", "text": "public function destroy($id)\n {\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return response()->json(['status' => 'success']);\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "fe53bca8d325675dd4f80c6d519ce470", "score": "0.5679682", "text": "public function destroy($id)\n {\n \n $delete = Product::find($id);\n $image_path ='public/image/'. $delete->photo;\n unlink( $image_path);\n $delete->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "c1ecca5c35e22313e1c38b1ddca48883", "score": "0.56521606", "text": "public function destroy(FILE $file)\n {\n \n\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n\n $file->delete();\n\n return redirect()->route('admin.files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "ac44db6cd2e11be0502437646b98bec0", "score": "0.56515306", "text": "public function untagResource($payload, $headers=[]) {\n $method = 'DELETE';\n $path = sprintf('/%s/tag', $this->apiVersion);\n $headers = $this->buildCommonHeaders($method, $path, $headers);\n $content = json_encode($payload);\n $headers['content-length'] = strlen($content);\n return $this->doRequest($method, $path, $headers, $data = $content);\n }", "title": "" }, { "docid": "3c36d7803d6dcac2a74d7850bf05b529", "score": "0.56461364", "text": "function deleteResource($model)\n {\n }", "title": "" }, { "docid": "198fe5623de140ddb980a64f1228ee9c", "score": "0.5643258", "text": "public function shutdownObject()\n {\n /** @var PersistentResource $resource */\n foreach ($this->resourceRepository->getAddedResources() as $resource) {\n if ($this->persistenceManager->isNewObject($resource)) {\n $this->deleteResource($resource, false);\n }\n }\n }", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "ddb7a7e1bd529da0193a6825c4588bde", "score": "0.5632143", "text": "function deleted_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "cfb60ffcc989888bf5132bd8f18d28f3", "score": "0.563189", "text": "public function destroy(string $storageKey): bool;", "title": "" }, { "docid": "227d7db0fe495cc1b0734cf71cbc6374", "score": "0.5627202", "text": "public function destroy($id)\n {\n try {\n $resource = Resource::findOrFail($id);\n auth()->user()->resources()->detach($id);\n } catch (\\Throwable $e) {\n throw abort(404);\n }\n\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-saved',\n 'message' => $resource->getMedia()[0]->file_name . ' was unsaved successfully!',\n 'resource_id' => $id\n ]);\n }", "title": "" }, { "docid": "b2deedc135e4e9a6d691a34bc62901e4", "score": "0.5602831", "text": "public function delete(): void\n {\n if ($this->exists()) {\n File::delete($this->path());\n }\n }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "2551dae05d41b0f050dbd034df4e2093", "score": "0.5595374", "text": "public function remove()\n {\n $res = unlink($this->_path);\n return $res;\n }", "title": "" }, { "docid": "2dfd4b7a5b42f50b0f3186c2425fc4a3", "score": "0.55950236", "text": "public abstract function deleteAsset(Asset $asset);", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "eb676b82c99dc848aabda71793e9f00a", "score": "0.55856013", "text": "public function destroy()\n {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "0f5a2d5d4ccb6690f2c9b7c1ad81379c", "score": "0.55815697", "text": "public function delete() {\n\t\treturn unlink($this->path);\n\t}", "title": "" }, { "docid": "abcaf8d103f03089c84f7aa510afb02a", "score": "0.5578945", "text": "public function delete()\n {\n if (null !== $this->repository) {\n $this->repository->close();\n }\n\n $this->file->delete($this->filePath);\n $this->filePath = '';\n }", "title": "" }, { "docid": "6955ff701e4315c5cfa7e2767eafdbcf", "score": "0.55788815", "text": "public function clear($in_storage_too = true);", "title": "" }, { "docid": "f576b22c84d78e83b91d5036361a095c", "score": "0.55780953", "text": "public function delete($filename = null);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "930240c93dd67bc31042064adb044402", "score": "0.55683106", "text": "public function destroy($id) {\n $data = Product::findOrFail($id);\n @unlink(storage_path('app/public/product/' . $data->product_image));\n $data->delete();\n return redirect('product')->with('success', 'Product is successfully deleted');\n }", "title": "" }, { "docid": "f7e801c4eebb9a1d03e7feec4ecd5f21", "score": "0.5567041", "text": "public function destroy($id)\n {\n $realestate = Realestate::findOrfail($id);\n if( count($realestate->files) > 0 )\n {\n if(Storage::disk('public')->exists($realestate->files[0]->path))\n Storage::disk('public')->delete($realestate->files[0]->path);\n\n $realestate->files()->delete();\n }\n\n $realestate->delete();\n\n\n return redirect()->route('realestate_index');\n\n }", "title": "" }, { "docid": "f392b1ed7db16f604f843adb672ef950", "score": "0.55653834", "text": "public function destroy($id)\n {\n $slide = Slide::find($id);\n if(Storage::delete('public/slides/'.$slide->slides)){\n $slide->delete();\n return redirect('Viewall/All_slide')->with('error','Slide deleted');\n }\n}", "title": "" }, { "docid": "0a10bad03f5df8b55f39176b0c613baa", "score": "0.55647546", "text": "public function remove(string $path)\n {\n $this->set($path, null);\n }", "title": "" }, { "docid": "adc4e9de22fd8f0d6314e35dcee0b8e0", "score": "0.5563022", "text": "public function remove(string $object): void;", "title": "" }, { "docid": "37d5927bb51b78bdcea795a632988120", "score": "0.55617017", "text": "public function removeTransactionResource($hash)\n\t{\n\t\t$path = $this->getTransactionResourcePath($hash);\n\t\treturn $this->deleteTransactionResource($path);\n\t}", "title": "" }, { "docid": "61d679086bf634ff55d0bc8a41a70710", "score": "0.5561249", "text": "public function destroy($id)\n {\n $user =DB::table('users')->where('id',$id)->first();\n $photo = $user->photo;\n \n unlink($photo);\n DB::table('users')->where('id',$id)->delete();\n \n }", "title": "" }, { "docid": "40424bbe7e79c788acc8e40fa96c2e17", "score": "0.5556214", "text": "public function destroy($id)\n {\n \n $product = Product::findOrFail($id);\n\n if($product->delete()) {\n\n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "b877c987e8cb3298dc4c9f11662792f9", "score": "0.55559146", "text": "public function destroy($id)\n {\n $path = File::findOrFail($id)->path; \n //esto me va a borrar del storage el archivo que le diga. De todas formas el find or fail me tiene que traer la dirreccion\n Storage::delete( $path ); \n\t\tFile::findOrFail($id)->delete(); \n\t\treturn redirect('/home');\n }", "title": "" }, { "docid": "09d16b97894d6829ff484d20cf378f8f", "score": "0.555526", "text": "public function destroy(Request $request, $id){\n $file = File::whereCodeName($id)->firstOrFail();\n //unlink elimina el archivo de la aplicacion\n unlink(public_path('storage/'. Auth::id() .'/' . $file->code_name));\n\n //eliminar de base de datos\n $file->delete();\n\n //avisar que se ha borrado archivo al usuario\n Alert::info('¡Ateción!', 'Se ha eliminado el archivo');\n return back();\n }", "title": "" }, { "docid": "19530e0d90a5511cefec030646832ac7", "score": "0.55509293", "text": "function deleteResource($id)\n\t{\n\t if(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n\t\t$this->db_delete($this->_table, array('id'=>$id));\n\t}", "title": "" }, { "docid": "3fa04699fe14eb03c48cfde3470db201", "score": "0.55502915", "text": "public function destroy($id)\n {\n $file = Upload::findOrFail($id);\n if(File::exists(public_path($file->filename))){\n unlink(public_path($file->filename));\n File::delete(public_path($file->filename));\n }\n $file->delete();\n return redirect()->back()->with('success','Deleted Successfully');\n //\n }", "title": "" }, { "docid": "94b6f2ef01c97218c0ea77ca980a8947", "score": "0.55452746", "text": "public function wipeStorage(): void\n {\n $this->storageAdapter->wipeStorage();\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": "51ecf73cbf0ed20291ef32754f32287e", "score": "0.55377126", "text": "public function destroy($id)\n {\n $site_image = DB::table('site_images')->where('id',$id)->first();\n $image=$site_image->image_name;\n unlink($image);\n DB::table('site_images')->where('id',$id)->delete();\n\n redirect()->back()->with('success', 'site image removed successfully');\n }", "title": "" }, { "docid": "30d0b23b0b35054a9dcfaf9fdc529aa5", "score": "0.5532588", "text": "public function destroy($id)\n {\n\n $p = Product::where('id' , $id)->first();\n if(File::exists($p->image)){\n File::delete($p->image);\n }\n $p->delete();\n return redirect()->back();\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": "" } ]
9af009919e4be3c75e6f8d1524c5db86
add_group method. Add a new Form_Group object to form
[ { "docid": "59d7abdcafadb97e4e4d811382c67c16", "score": "0.5977088", "text": "public function add_group($name, $values, $info=NULL)\n\t{\n\t\t$add_name = strtolower(preg_replace('/\\[\\]/','',$name));\n\n\t\t$defaults = $this->_make_defaults($add_name, $add_name);\n\t\t$defaults_globals = array_merge($this->_globals, $defaults);\n\t\t\n\t\t$this->$add_name = Formo_Group::factory($name, $values, $info);\n\n\t\tforeach ($defaults_globals as $setting => $value)\n\t\t{\n\t\t\t$this->$add_name->$setting = $value;\n\t\t}\n\n\t\tself::$last_accessed = $add_name;\n\t\t\t\t\t\t\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "f3c0bf1ece60363b35424bf3f38ff9e0", "score": "0.8077251", "text": "public function add()\n {\n $group = $this->Groups->newEntity();\n if ($this->request->is('post') && !empty($this->request->data)) {\n $this->Groups->patchEntity($group, $this->request->data);\n if ($this->Groups->save($group)) {\n $this->Flash->success(__d('wasabi_core', 'The group <strong>{0}</strong> has been created.', $this->request->data['name']));\n $this->redirect(['action' => 'index']);\n return;\n } else {\n $this->Flash->error($this->formErrorMessage);\n }\n }\n $this->set('group', $group);\n }", "title": "" }, { "docid": "3572b16d0064e71604c0ebeeb9894494", "score": "0.7507777", "text": "function so_forms_add_group_submit($form, &$form_state) {\n\n $group = array(\n 'id' => '',\n 'sfid' => $form_state['values']['sfid'],\n 'label' => $form_state['values']['add_group']['label'],\n 'field' => '',\n 'params' => array(\n 'form_region' => 'advanced',\n 'enabled' => false\n ),\n 'field_type' => 'group',\n 'widget' => '',\n 'weight' => 50,\n );\n\n so_forms_store_field($group);\n\n return;\n}", "title": "" }, { "docid": "d7b64ec2db56f81ef574b61a52c71d12", "score": "0.706084", "text": "public function addGroup()\n {\n // simple message to show where you are\n //echo 'Message from Controller: You are in the Controller: Groups, using the method addGroup().';\n\n // if we have POST data to create a new group entry\n if (isset($_POST[\"submit\"]) && !empty($_POST[\"name\"]) ) {\n // load model, perform an action on the model\n $groups_model = $this->loadModel('GroupModel');\n $groups_model->addGroup($_POST[\"name\"]);\n }\n\n // where to go after group has been added\n header('location: ' . URL . 'group/index');\n }", "title": "" }, { "docid": "78f69af4e797e9bafc21ce48e59ae967", "score": "0.7049211", "text": "function add_group() {\r\n\r\n\t\tgreen::$watches['pageHeading'] = 'Create template group';\r\n\r\n\t\tgreen::$watches['toggleSidebar'] = TRUE;\r\n\r\n\t\t\r\n\r\n\t\t$this->display('templates/add_group');\r\n\r\n\t}", "title": "" }, { "docid": "0108574cf3faed6f786b9ce7abade275", "score": "0.7024861", "text": "public function addGroup($group_id);", "title": "" }, { "docid": "65cce9b2f7858ebbc4c4c1448bd40f5f", "score": "0.69358367", "text": "public function addGroup(array &$form, FormStateInterface $form_state)\n {\n $eid = $form_state->get('eid');\n $vals = $form_state->getValues();\n\n if (!empty($vals['new_group']['group_name'])) {\n $config = \\Drupal::getContainer()->get('config.factory')->getEditable('simple_conreg.settings.'.$eid);\n $configGroupName = 'clickup_option_groups.'.$vals['new_group']['group_name'];\n // Only add group if not already present.\n if (empty($config->get($configGroupName))) {\n $config->set($configGroupName, []);\n $config->save();\n \\Drupal::messenger()->addMessage($this->t('Option group @name has been added.', ['@name' => $vals['group_name']]));\n }\n $form_state->setValue(['groups', $groupName, '#value'], '');\n }\n\n $form_state->setRebuild();\n }", "title": "" }, { "docid": "036b29fa3d96e4bda513a2ebcd55a150", "score": "0.6766386", "text": "public function add()\n {\n $update_data = $this->insert_global_model->globalinsert($this->tbl_exam_users_activity,array('user_id'=>$this->logged_in_user->id,\n 'activity_time'=>date('Y-m-d H:i:s'),'activity'=>'Add New Admin Group'));\n // set page specific variables\n $page_info['title'] = 'Add New Admin Group'. $this->site_name;\n $page_info['view_page'] = 'administrator/admin_group_form_view';\n $page_info['message_error'] = '';\n $page_info['message_success'] = '';\n $page_info['message_info'] = '';\n $page_info['is_edit'] = false;\n\n $this->_set_fields();\n\n // determine messages\n if ($this->session->flashdata('message_error')) {\n $page_info['message_error'] = $this->session->flashdata('message_error');\n }\n\n if ($this->session->flashdata('message_success')) {\n $page_info['message_success'] = $this->session->flashdata('message_success');\n }\n\n // load view\n\t$this->load->view('administrator/layouts/default', $page_info);\n }", "title": "" }, { "docid": "1b7f709ff3114d9f20048bfb63065de9", "score": "0.6643455", "text": "function addForm()\n {\n // Get the display groups added to the session (if there are some)\n $displayGroupIds = $this->session->get('displayGroupIds');\n $displayGroups = [];\n\n if (count($displayGroupIds) > 0) {\n foreach ($displayGroupIds as $displayGroupId) {\n if ($displayGroupId == -1)\n continue;\n\n $displayGroup = $this->displayGroupFactory->getById($displayGroupId);\n\n if ($this->getUser()->checkViewable($displayGroup))\n $displayGroups[] = $displayGroup;\n }\n }\n\n // get the default longitude and latitude from CMS options\n $defaultLat = (float)$this->getConfig()->getSetting('DEFAULT_LAT');\n $defaultLong = (float)$this->getConfig()->getSetting('DEFAULT_LONG');\n\n $this->getState()->template = 'schedule-form-add';\n $this->getState()->setData([\n 'commands' => $this->commandFactory->query(),\n 'dayParts' => $this->dayPartFactory->allWithSystem(),\n 'displayGroupIds' => $displayGroupIds,\n 'displayGroups' => $displayGroups,\n 'help' => $this->getHelp()->link('Schedule', 'Add'),\n 'reminders' => [],\n 'defaultLat' => $defaultLat,\n 'defaultLong' => $defaultLong\n ]);\n }", "title": "" }, { "docid": "b84ec85ae311edb4a4a2dd8e30d70a5e", "score": "0.6639151", "text": "public function actionCreateGroup() {\n if (Yii::$app->getRequest()->isAjax) {\n $model = new \\backend\\modules\\ezforms2\\models\\EzformFieldsLibGroup();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->lib_group_id = \\appxq\\sdii\\utils\\SDUtility::getMillisecTime();\n\n Yii::$app->response->format = Response::FORMAT_JSON;\n if ($model->save()) {\n $result = [\n 'status' => 'success',\n 'action' => 'create',\n 'message' => SDHtml::getMsgSuccess() . Yii::t('app', 'Data completed.'),\n 'data' => $model,\n ];\n return $result;\n } else {\n $result = [\n 'status' => 'error',\n 'message' => SDHtml::getMsgError() . Yii::t('app', 'Can not create the data.'),\n 'data' => $model,\n ];\n return $result;\n }\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n 'action' => 'group',\n ]);\n }\n } else {\n throw new NotFoundHttpException('Invalid request. Please do not repeat this request again.');\n }\n }", "title": "" }, { "docid": "579c4bde825184e0ab2b97dd641086af", "score": "0.6622641", "text": "public function addGroupField($value) {}", "title": "" }, { "docid": "d4550856408c978783172bcafc403c93", "score": "0.6622295", "text": "function create_group() {\n $this->data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) {\n redirect($this->_home, 'refresh');\n }\n\n //validate form input\n $this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash|xss_clean');\n $this->form_validation->set_rules('description', $this->lang->line('create_group_validation_desc_label'), 'xss_clean');\n\n if ($this->form_validation->run() == TRUE) {\n $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n if ($new_group_id) {\n // check to see if we are creating the group\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect($this->_home, 'refresh');\n }\n } else {\n //display the create group form\n //set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['group_name'] = array(\n 'name' => 'group_name',\n 'id' => 'group_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('group_name'),\n );\n $this->data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('description'),\n );\n\n $this->_render_page('ipphone/create_group', $this->data);\n }\n }", "title": "" }, { "docid": "1bcd60cfbba207f3da8f502a6aedc12c", "score": "0.6607767", "text": "public function addGroupForm(FormBuilderInterface $builder, array $options = array())\n {\n $builder->add('group_id', 'choice', array_replace_recursive(array(\n 'required' => true,\n 'expanded' => false,\n 'multiple' => false,\n 'label' => 'admin.form.client',\n 'choices' => GroupQuery::create()\n ->setComment(sprintf('%s l:%s', __METHOD__, __LINE__))\n ->find()\n ->toKeyValue('Id', 'Label')\n ), $options));\n }", "title": "" }, { "docid": "0706647d3e0038f74e0076bb57349d6b", "score": "0.66038907", "text": "function add()\n { \n $data=array('errors'=>0);\n \n \n if($this->input->post(\"action\")==\"add\")\n {\n $info=$this->_check_group_fields();\n \n if(!$info['errors'])\n {\n if(!$this->product_group->add($info['_name'], $info['_descr']))\n {\n $data['errors']=4;\n }\n else\n {\n $data['errors']=-1;\n }\n }\n else\n {\n $data['errors']=$info['errors'];\n }\n }\n \n if($data['errors']>0)\n { \n make_response(\"error\", $data['errors'], TRUE);\n \n }\n else\n {\n if($data['errors']==-1)\n $res='';\n else\n $res=$this->load->view(\"/admin/product_group/add\", $data, TRUE );\n \n make_response(\"output\", $res, TRUE);\n }\n simple_admin_log('product_group_add',false,($data['errors']>0),\"not_added\");\n }", "title": "" }, { "docid": "83d223e453e99a80af5b46618cf8d13a", "score": "0.65870607", "text": "function create_group()\n\t{\n\t\t$this->data['title'] = $this->lang->line('create_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t{\n\t\t\tredirect('auth', 'refresh');\n\t\t}\n\t\t//validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash');\n\n\t\tif ($this->form_validation->run() == TRUE)\n\t\t{\n\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\tif($new_group_id)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\tredirect(\"auth\", 'refresh');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//display the create group form\n\t\t\t//set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['group_name'] = array(\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t\t);\n\t\t\t$this->data['description'] = array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t\t);\n\n\t\t\t$this->_render_page('auth/create_group', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "5c8514ea55fa073ce57d6bec0a18b87b", "score": "0.6546806", "text": "public function addProductGroupsAction() {\n $form = new Form_Campaigns_ProductGroups();\n\n if ($this->_request->isPost() && $form->isValid($this->_request->getPost())) {\n\n $campaign_item_groups = new CampaignItemGroups;\n\n $item_pack_size_id = $this->_em->getRepository('ItemPackSizes')->find($form->item_id_add->getValue());\n $campaign_item_groups->setItemPackSize($item_pack_size_id);\n\n $campaign_item_groups->setAgeGroup1Min($form->age_group1_min->getValue());\n $campaign_item_groups->setAgeGroup1Max($form->age_group1_max->getValue());\n $campaign_item_groups->setAgeGroup2Min($form->age_group2_min->getValue());\n $campaign_item_groups->setAgeGroup2Max($form->age_group2_max->getValue());\n\n $created_by = $this->_em->find('Users', $this->_user_id);\n $campaign_item_groups->setCreatedBy($created_by);\n $campaign_item_groups->setCreatedDate(App_Tools_Time::now());\n $campaign_item_groups->setModifiedBy($created_by);\n $campaign_item_groups->setModifiedDate(App_Tools_Time::now());\n\n $this->_em->persist($campaign_item_groups);\n $this->_em->flush();\n }\n $this->_redirect(\"/campaign/manage-campaigns/product-groups?success=1\");\n }", "title": "" }, { "docid": "5a9b3db91881ea160eceda4c34c2cdef", "score": "0.6525263", "text": "public function create()\n\t{\n\t\t$title = \"Add Group\";\n\t\t$buttons = [ \n\t\t\t'create' => [ \n\t\t\t\t'action' => 'GroupsController@handleCreate', \n\t\t\t\t'classes' => 'operations btn-primary submit', \n\t\t\t\t'label' => 'Create' \n\t\t\t],\n\t\t\t'cancel' => [\n\t\t\t\t'action' => 'GroupsController@index', \n\t\t\t\t'classes' => 'operations btn-link', \n\t\t\t\t'label' => 'Cancel' \n\t\t\t] \n\t\t];\n\t\treturn View::make('groups.create', compact('title', 'buttons'));\n\t}", "title": "" }, { "docid": "1e460cee8077e49b41c1b3e554151ec5", "score": "0.64967316", "text": "public function addGroup(Request $request) {\r\n try {\r\n $this->logger->info(\"Entering AdminController.addGroup()\");\r\n //validate the form date (note will automatically redirect back to login\r\n //view if errors\r\n $this->validateForm($request);\r\n \r\n //recieves data inputed from user\r\n $name = $request->input('groupName');\r\n $description = $request->input('groupDesc');\r\n \r\n //create object model and save posted form data in user object model\r\n $group = new AffinityGroupModel(0, $name, $description);\r\n \r\n //execute business service and call security business service\r\n $service = new AdminBusinessService();\r\n $status = $service->addGroup($group);\r\n \r\n //process results from business service (navigation)\r\n //render a failed or redirect to table of all jobs\r\n if ($status) {\r\n \r\n return redirect()->action('AdminController@displayAllGroups');\r\n }\r\n \r\n else {\r\n return \"Failed\";\r\n }\r\n }\r\n \r\n catch (ValidationException $e1) {\r\n //note: this exception must be caught before exception bc validationexception extends from exception\r\n //must rethrow this exception in order for laravel to display your submitted page with errors\r\n //catch and rethrow data validation exception (so we can catch all others in our next exception catch block\r\n throw $e1;\r\n }\r\n \r\n catch (Exception $e){\r\n //best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)\r\n //log exception and display exception view\r\n $this->logger->error(\"Exception: \", array(\"message\" => $e->getMessage()));\r\n $data = ['errorMsg' => $e->getMessage()];\r\n return view('exception')->with($data);\r\n }\r\n }", "title": "" }, { "docid": "680d04edc0821648eb1d3dc27fcc6141", "score": "0.6464367", "text": "public function creategroupAction() {\n if ($this->getRequest()->isPost()) {\n $groupName = $_POST['groupName'];\n $groupType = $_POST['groupType'];\n $user = $_SESSION['Incite']['USER_DATA'];\n\n $group = new InciteGroup;\n $group->name = $groupName;\n $group->creator_id = $user->id;\n $group->group_type = $groupType;\n $group->instructions = \"\";\n $group->save();\n\n $groups_users = new InciteGroupsUsers;\n $groups_users->user_id = $user->id;\n $groups_users->group_id = $group->id;\n $groups_users->group_privilege = 0;\n $groups_users->seen_instruction = 1;\n $groups_users->save();\n\n $groupId = $group->id;\n\n if ($groupId > 0) {\n echo $groupId;\n } else {\n system_log('failed to create group');\n echo 'false';\n }\n }\n }", "title": "" }, { "docid": "7a2be0b6bb8c12d85f54539a00de4d0d", "score": "0.6463695", "text": "public function create()\n {\n return view('contents.groups.group_create');\n }", "title": "" }, { "docid": "d3aac542f4e9267ab311c406e76d78d2", "score": "0.6461104", "text": "public function newAction()\n {\n $form = $this->container->get('fos_user.group.form');\n $formHandler = $this->container->get('fos_user.group.form.handler');\n\n $process = $formHandler->process();\n if ($process) {\n $message = $this->container->get('translator')->trans('group.flash.created', array(), 'FOSUserBundle');\n $this->setFlash('success', $message);\n\n $url = $this->container->get('router')->generate('fos_user_group_list');\n\n return new RedirectResponse($url);\n }\n\n return $this->container->get('templating')->renderResponse('FOSUserBundle:Group:new.html.' . $this->getEngine(), array(\n 'form' => $form->createview(),\n ));\n }", "title": "" }, { "docid": "06370397db7a0fb233905c93c6d350b4", "score": "0.6447424", "text": "function addGroup()\r\n {\r\n $data = getUserDataSet(GROUP_TBL);\r\n\r\n $data['create_date'] = date('Y-m-d');\r\n\r\n $info['table'] = $this->entity_table;\r\n $info['debug'] = false;\r\n $info['data'] = $data;\r\n\r\n $add = insert($info);\r\n\r\n $groupID = $add['newid'];\r\n\r\n if ($groupID)\r\n {\r\n $userList = explode(',', getUserField('group_member'));\r\n\r\n return $this->addGroupMember($groupID, $userList);\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "78181cde372b7dbef26eeef6c075f7c8", "score": "0.64265287", "text": "protected final function addFieldGroup(FormBuilderInterface $builder, array $options, $groupName)\n {\n\n static $first = true;\n\n $groupOptions = array(\n 'inherit_data' => true,\n 'label' => $this->getGroupLabel($groupName),\n );\n\n if ($first == true) {\n $groupOptions['first'] = true;\n $first = false;\n }\n\n if ($options['crud_action'] == 'view') {\n $groupOptions['render_type'] = 'tab';\n } else {\n $groupOptions['render_type'] = 'fieldset';\n }\n\n $group = $builder->create('group_' . Helper::camelToUnderScore($groupName), 'group', $groupOptions);\n $builder->add($group);\n\n return $group;\n }", "title": "" }, { "docid": "75db95366825c18fa2d5e521962dc210", "score": "0.6388578", "text": "public function add_field_group_sermon(){\n\t}", "title": "" }, { "docid": "1f42b2afbb491608ae7361eea60b861a", "score": "0.63857764", "text": "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t'grupo_nombre' => $this->input->post('grupo_nombre'),\n\t\t\t\t'grupo_descripcion' => $this->input->post('grupo_descripcion'),\n );\n \n $grupo_id = $this->Grupo_model->add_grupo($params);\n redirect('grupo/index');\n }\n else\n { \n $data['_view'] = 'grupo/add';\n $this->load->view('layouts/main',$data);\n }\n }", "title": "" }, { "docid": "da23a8e77b5d8a564e6251ae4f0ba3e9", "score": "0.63791394", "text": "public function DoGroupCreate($form) { \r\nif($this->user->GroupCreate($form['acronym']['value'], $form['name']['value'])){ \r\n $this->AddMessage('success', \"Group successfully created\"); \r\n $this->RedirectToController('profile'); \r\n } else { \r\n $this->AddMessage('notice', \"Failed to create group.\"); \r\n $this->RedirectToController('createGroup'); \r\n } \r\n}", "title": "" }, { "docid": "c9a6d79ba0869e874b551326c7c4e11f", "score": "0.6370261", "text": "public function addGroupAction(Course $course)\n {\n\t\n\t\t// Creation of a group and definition of the Founder\n\t\t$group = new Group;\n\t\tif ($this->getUser()) { $group->setGroupFounder($this->getUser());}\n\t\t$group->setCourse($course);\n\t\t\t\t\n\t\t// Creation of the associated form\n\t\t$form = $this->createForm(new GroupType(), $group, array('roles' => $this->container->getParameter('security.role_hierarchy.roles')));\n\t\t\n\t\t// If we have a Post request, we treat the inofrmation\n\t\t$request = $this->getRequest();\n\t\tif ($request->getMethod() == 'POST')\n\t\t{\n\t\t\t$form->bind($request);\n\t\t\tif ($form->isValid())\n\t\t\t{\n\t\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$tokenGenerator = $this->get('fos_user.util.token_generator');\n\t\t\t\t$shareCode = $tokenGenerator->generateToken();\n\t\t\t\t$group->setShareCode($shareCode);\n\t\t\t\t\n\t\t\t\t$em->persist($group);\n\t\t\t\t$em->flush();\n\t\t\n\t\t\t\t$this->get('session')->getFlashBag()->add('infoGroup', 'Groupe bien ajouté');\n\t\t\t\treturn $this->redirect($this->generateUrl('course_group_edit', array('group' => $group->getId())));\n\t\t\t}\n\t\t}\n\t\treturn $this->render('InkyCourseBundle:Course:addGroup.html.twig', array('form' => $form->createView(), 'course'=>$course));\n }", "title": "" }, { "docid": "bb84be7ca5fc75bbe27f3f766c632cad", "score": "0.6361499", "text": "public function addGroupItem() {\n\t\t\tif (!$this->validCSRFToken()) $this->error(\"Invalid Request\");\n\n\t\t\t$this->requirePrivilege(\"manage products\");\n\t\t\tif (! preg_match('/^[\\w\\-\\.\\_\\s]+$/',$_REQUEST['group_code'])) $this->error(\"group_code required for addGroupItem method\");\n\t\t\tif (! preg_match('/^[\\w\\-\\.\\_\\s]+$/',$_REQUEST['item_code'])) $this->error(\"group_code required for addGroupItem method\");\n\t\n\t\t\t$group = new \\Product\\Group();\n\t\t\tif (!$group->get($_REQUEST['group_code'])) $this->error(\"Error finding group: \".$group->error());\n\t\t\tif (! $group->id) $this->error(\"Group not found\");\n\t\n\t\t\t$item = new \\Product\\Item();\n\t\t\tif (!$item->get($_REQUEST['item_code'])) $this->error(\"Error finding item: \".$item->error());\n\t\t\tif (!$item->id) $this->error(\"Item not found\");\n\t\n\t\t\t$group->addItem($item);\n\t\t\tif ($group->error()) $this->error(\"Error adding item to group: \".$group->error());\n\t\t\t$response = new \\HTTP\\Response();\n\t\t\t$response->success = 1;\n\t\n\t\t\tprint $this->formatOutput($response);\n\t\t}", "title": "" }, { "docid": "f812b8db3c9cb7b1e3c507d0aa478505", "score": "0.634455", "text": "public function addGroup($group): self;", "title": "" }, { "docid": "b614ea8b9334f52580b281ae049bc28f", "score": "0.63444805", "text": "function nt_create_group_add_row() {\n\t?>\n\t\t<div class=\"ntaddrow\">\n\t\t\t<form method=\"post\" class=\"groupForm\">\n\t\t\t\t<div class=\"nttablecellnarrow\"><input type=\"text\" name=\"nt_group_name\" value=\"Group Name\" /></div>\n\t\t\t\t<div class=\"nttablecellnarrow\"> <?php nt_create_day_menu( \"nt_group_day\" ); ?></div>\n\t\t\t\t<div class=\"nttablecellnarrow\"> <?php nt_create_timeslot_menu( \"nt_group_time\" ); ?></div>\n\t\t\t\t<div class=\"nttablecellnarrow\"> <?php nt_create_match_duration_menu( \"nt_group_match_duration\" ); ?></div>\n\t\t\t\t<div class=\"nttablecellauto\">\n\t\t\t\t<input type=\"submit\" name=\"nt_group_action\" id=\"addGroupButton\" value=\"Add Group\"/>\n\t\t\t\t</div>\t\t\n\t\t\t</form>\n\t\t</div><!-- end nttableaddrow -->\n\t<?php\n}", "title": "" }, { "docid": "e62b443bd195ad8908f0409238c1e313", "score": "0.63399714", "text": "public function CreateGroup() { \r\n$form = new CFormGroupCreate($this); \r\nif($form->Check() === false) { \r\n$this->AddMessage('notice', 'You must fill in all values.'); \r\n$this->RedirectToController('CreateGroup'); \r\n} \r\n$this->views->SetTitle('Create Group');\r\n$this->views->AddInclude(__DIR__ . '/createGroup.tpl.php', array('form' => $form->GetHTML())); \r\n}", "title": "" }, { "docid": "71abb069960a3f97de7536ad815b3351", "score": "0.63301206", "text": "public function addGroup() {\n\t\t$nb=sizeof($this->elements);\n\t\t$bg=new HtmlButtongroups($this->identifier.\"-buttongroups-\".$nb);\n\t\t$this->elements []=$bg;\n\t\treturn $bg;\n\t}", "title": "" }, { "docid": "e4ed564a5fb6deaa34d01e004233a719", "score": "0.6327813", "text": "public function addForm() {\n $this->view->addForm();\n }", "title": "" }, { "docid": "e4ed564a5fb6deaa34d01e004233a719", "score": "0.6327813", "text": "public function addForm() {\n $this->view->addForm();\n }", "title": "" }, { "docid": "29b94cc432164dede277a9017cde531e", "score": "0.63015324", "text": "public function create()\n {\n $breadcrumbs = [\n 'title' => __('groups.breadcrumbs.create'),\n 'links' => [\n [\n 'text' => __('layouts.sidebar.settings.groups'),\n 'active' => false,\n 'href' => route('groups.index'),\n ],\n [\n 'text' => __('groups.breadcrumbs.create'),\n 'active' => true,\n ],\n ]\n ];\n\n $group = new Group();\n\n return view('groups.create', compact('breadcrumbs', 'group'));\n }", "title": "" }, { "docid": "bdb4783afff66f1866fa2e43ad2f9874", "score": "0.626343", "text": "public function create()\n {\n // Create a single group\n $title = 'Add a Group';\n return view('groups.create')->with('title', $title);\n }", "title": "" }, { "docid": "8f338e4c208650c7678fbf27e6b17766", "score": "0.6258019", "text": "public function addGroup(GroupInterface $group);", "title": "" }, { "docid": "011653a0fccf17cebd2b90fbafe1184e", "score": "0.62573", "text": "public function create_group() {\n $this->data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) {\n redirect('auth', 'refresh');\n}\n\n // validate form input\n$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash');\n\nif ($this->form_validation->run() == TRUE) {\n $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n if ($new_group_id) {\n // check to see if we are creating the group\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"auth\", 'refresh');\n }\n} else {\n // display the create group form\n // set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['group_name'] = array(\n 'name' => 'group_name',\n 'id' => 'group_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('group_name'),\n );\n $this->data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('description'),\n );\n\n $this->template->load_auth('auth/create_group', $this->data);\n}\n}", "title": "" }, { "docid": "61edcb3e837df88989bf4138352a69c0", "score": "0.6255584", "text": "public function create()\n {\n return view(\"user_permission.permission_group.add\");\n }", "title": "" }, { "docid": "a1262c4e82a2015f5b757c43d96265c8", "score": "0.62492865", "text": "public function actionAddGroup() {\n $req = $this->getRequest();\n $instanceId = $req->getPost(\"instanceId\");\n $parentGroupId = $req->getPost(\"parentGroupId\");\n $user = $this->getCurrentUser();\n\n /** @var Instance $instance */\n $instance = $this->instances->findOrThrow($instanceId);\n $parentGroup = !$parentGroupId ? $instance->getRootGroup() : $this->groups->findOrThrow($parentGroupId);\n\n if ($parentGroup->isArchived()) {\n throw new InvalidArgumentException(\"It is not permitted to create subgroups in archived groups\");\n }\n\n if (!$this->groupAcl->canAddSubgroup($parentGroup)) {\n throw new ForbiddenRequestException(\"You are not allowed to add subgroups to this group\");\n }\n\n $externalId = $req->getPost(\"externalId\") === null ? \"\" : $req->getPost(\"externalId\");\n $publicStats = filter_var($req->getPost(\"publicStats\"), FILTER_VALIDATE_BOOLEAN);\n $isPublic = filter_var($req->getPost(\"isPublic\"), FILTER_VALIDATE_BOOLEAN);\n $isOrganizational = filter_var($req->getPost(\"isOrganizational\"), FILTER_VALIDATE_BOOLEAN);\n $hasThreshold = filter_var($req->getPost(\"hasThreshold\"), FILTER_VALIDATE_BOOLEAN);\n\n $group = new Group($externalId, $instance, $user, $parentGroup, $publicStats, $isPublic, $isOrganizational);\n if ($hasThreshold) {\n $threshold = $req->getPost(\"threshold\") !== null ? $req->getPost(\"threshold\") / 100 : $group->getThreshold();\n $group->setThreshold($threshold);\n }\n $this->updateLocalizations($req, $group);\n\n $this->groups->persist($group, false);\n $this->groups->flush();\n\n $this->sendSuccessResponse($this->groupViewFactory->getGroup($group));\n }", "title": "" }, { "docid": "79ef5806735344a130850007ac35b41b", "score": "0.62400997", "text": "protected function create_group() {\n global $wpdb;\n\n // REQUIRED FIELDS\n if (empty($_POST['create_group_name'])) {\n $this->admin_messages[] = array(\n 'is_error' => true,\n 'content' => '<p>Please provide a name for the group you are trying to create.</p>'\n );\n return;\n }\n\n if (empty($_POST['create_group_description'])) {\n $this->admin_messages[] = array(\n 'is_error' => true,\n 'content' => '<p>Please provide a description for the group you are trying to create.</p>'\n );\n return;\n }\n\n // do not mysql escape\n $create_group = $wpdb->insert(\n $this->groups_table_name,\n array(\n 'name' => $_POST['create_group_name'],\n 'description' => $_POST['create_group_description'],\n 'create_date' => current_time('mysql')\n ),\n array(\n '%s',\n '%s',\n '%s'\n )\n );\n\n if ($create_group === false) {\n $this->admin_messages[] = array(\n 'is_error' => true,\n 'content' => '<p>There was an error creating the group.</p>'\n );\n return;\n }\n\n $group_name = htmlspecialchars($_POST['create_group_name']);\n $this->admin_messages[] = array(\n 'is_error' => false,\n 'content' => '<p>Successfully created the group <em>' . $group_name . '</em>.</p>'\n );\n return;\n }", "title": "" }, { "docid": "b3f429b930f07a2a25b386d62be0b8d5", "score": "0.62317824", "text": "function add_group( $group_name )\r\n {\r\n $group_name = strtolower( $group_name );\r\n $new_group = $this->GROUPS[ $group_name ];\r\n if ( empty( $new_group ) )\r\n {\r\n $this->GROUPS[ $group_name ] = array();\r\n }\r\n else\r\n {\r\n $this->Error( \"Group \" . $group_name . \" exists\" );\r\n }\r\n }", "title": "" }, { "docid": "96cd07aa24e1c8b143bdf4198cd1966d", "score": "0.6212503", "text": "public function postAdd() {\n $this->_adminUserGroupRepository->addOrUpdateGroups ();\n return redirect ( $this->redirectToGroup )->withSuccess ( 'Sucessfully Added' );\n }", "title": "" }, { "docid": "68594fb8c2f345187fc7cfe3cf4f899f", "score": "0.6208295", "text": "function libero_mikado_add_admin_group($attributes) {\n $name = '';\n $title = '';\n $description = '';\n $parent = '';\n\n extract($attributes);\n\n if(!empty($name) && !empty($title) && is_object($parent)) {\n $group = new LiberoGroup($title, $description);\n $parent->addChild($name, $group);\n\n return $group;\n }\n\n return false;\n }", "title": "" }, { "docid": "3d7abf53a0755f8e4f631e86fcd7454a", "score": "0.61919636", "text": "function iver_select_add_admin_group( $attributes ) {\n\t\t$name = '';\n\t\t$title = '';\n\t\t$description = '';\n\t\t$parent = '';\n\t\t\n\t\textract( $attributes );\n\t\t\n\t\tif ( ! empty( $name ) && ! empty( $title ) && is_object( $parent ) ) {\n\t\t\t$group = new IverSelectGroup( $title, $description );\n\t\t\t$parent->addChild( $name, $group );\n\t\t\t\n\t\t\treturn $group;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "74282b3c3ca25689adfc813865475526", "score": "0.6188033", "text": "public function groupSave(Request $request, Requests\\PaymentFormGroupRequest $form)\n {\n $payment = $this->payment->createGroup($request->except('paymentDue'));\n return redirect()->action('InvoiceController@index');\n }", "title": "" }, { "docid": "c9f5ad707391b1a31371101adf9ad788", "score": "0.6179782", "text": "public function newAction( Request $request ) {\n\t\t/** @var $groupManager \\FOS\\UserBundle\\Model\\GroupManagerInterface */\n\t\t$groupManager = $this->get( 'fos_user.group_manager' );\n\t\t/** @var $formFactory \\FOS\\UserBundle\\Form\\Factory\\FactoryInterface */\n\t\t$formFactory = $this->get( 'fos_user.group.form.factory' );\n\t\t/** @var $dispatcher \\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface */\n\t\t$dispatcher = $this->get( 'event_dispatcher' );\n\n\t\t$group = $groupManager->createGroup( '' );\n\n\t\t$dispatcher->dispatch( FOSUserEvents::GROUP_CREATE_INITIALIZE, new GroupEvent( $group, $request ) );\n\n\t\t$form = $formFactory->createForm();\n\t\t$form->setData( $group );\n\n\t\t$form->handleRequest( $request );\n\n\t\tif ( $form->isValid() ) {\n\n\t\t\tforeach ( $group->getPermisoAplicacion() as $permisoAplicacion ) {\n\t\t\t\t$permisoAplicacion->setGrupo( $group );\n\t\t\t}\n\t\t\tif ( $group->getPermisoEspecialGrupo() ) {\n\t\t\t\tforeach ( $group->getPermisoEspecialGrupo() as $permisoEspecial ) {\n\t\t\t\t\t$permisoEspecial->setGrupo( $group );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$event = new FormEvent( $form, $request );\n\t\t\t$dispatcher->dispatch( FOSUserEvents::GROUP_CREATE_SUCCESS, $event );\n\n\t\t\t$groupManager->updateGroup( $group );\n\n\t\t\tif ( null === $response = $event->getResponse() ) {\n\t\t\t\t$url = $this->generateUrl( 'fos_user_group_show', array( 'groupName' => $group->getName() ) );\n\t\t\t\t$response = new RedirectResponse( $url );\n\t\t\t}\n\n\t\t\t$dispatcher->dispatch( FOSUserEvents::GROUP_CREATE_COMPLETED,\n\t\t\t\tnew FilterGroupResponseEvent( $group, $request, $response ) );\n\n\t\t\treturn $response;\n\t\t}\n\n\t\treturn $this->render( 'FOSUserBundle:Group:new.html.twig',\n\t\t\tarray(\n\t\t\t\t'form' => $form->createview(),\n\t\t\t) );\n\t}", "title": "" }, { "docid": "475f0fdbb8489b9f508f909f252f23ea", "score": "0.6174498", "text": "function addGroup($name) {\n $group = new_field_group($name)\n ->setKey($this->prefix . '_' . $name)\n ->setPrefix(true);\n \n if ($this->location) {\n $l = $this->location;\n $group->setLocationByObject($this->location);\n }\n\n return $group;\n }", "title": "" }, { "docid": "83a024626476cd3b23de292fbb1350b7", "score": "0.6172909", "text": "public function createGroup($group) {\n\t\tforeach ($this->fields as $name => $field_info) {\n\t\t\t$field = $field_info[1];\n\t\t\t$field->setGroup($group);\n\t\t}\n\t\t$this->groups[$group] = array('fields'=>$this->fields, 'buttons'=>$this->buttons);\n\t\t$this->fields = array();\n\t\t$this->buttons = array();\n\t}", "title": "" }, { "docid": "2e788cd8be8fab916cf943b6cc33b6d3", "score": "0.6169077", "text": "public function create()\n {\n //\n return view('groups.create');\n }", "title": "" }, { "docid": "9be96ef4dab29eebe4d439788f5f205b", "score": "0.61510897", "text": "public function getAdd() {\n return view ( 'user::admin.user_groups.add', [ \n 'rules' => $this->_adminUserGroupRepository->setRule ( 'name', 'required|alpha|unique|max:50' )->getRules () \n ] );\n }", "title": "" }, { "docid": "e6acd50872e22aec2b1ecfc814add0c0", "score": "0.61462396", "text": "public function create()\n {\n return view('account_group.create');\n }", "title": "" }, { "docid": "712fe544ff410ed5ac58b25d844aea34", "score": "0.6142334", "text": "public function create()\n {\n //\\\n return view('group.create');\n }", "title": "" }, { "docid": "c094f26ce02352feb01c23c1019af294", "score": "0.61344564", "text": "function nt_add_group( $thisgroup ) {\n\tglobal $wpdb;\n\tglobal $debug;\n\n\tif ( ! $debug ){\n\t\t\techo \"[nt_add_group] \";\n\t\t\techo \"<pre>\"; print_r($_POST); echo \"</pre>\";\n\t}\n\t\n\t$rows_affected = $wpdb->insert( $wpdb->prefix . constant( \"GROUP_TABLE_NAME\" ), $thisgroup );\n\t\n\tif ( 0 == $rows_affected ) {\n\t\techo \"INSERT ERROR for \" . $thisgroup[ 'nt_group_name' ] ;\n\t\tif ( $debug ){\n\t\t\techo \"[nt_add_group] Fail \";\n\t\t\techo \"<pre>\"; print_r($_POST); echo \"</pre>\";\n\t\t}\n\t\treturn false;\n\t}\n\t$thisgroup[ 'nt_group_id' ] = $wpdb->insert_id;\n\n\tif( $debug ) {\n\t\techo \"[nt_add_group] success $rows_affected\";\n\t}\n\n\tif ( 0 == nt_add_match_placeholder ( $thisgroup ) ){\n\t\tif ( $debug ){\n\t\t\techo \"[nt_add_group] Failed adding placeholder match \";\n\t\t\techo \"<pre>\"; print_r($_POST); echo \"</pre>\";\n\t\t}\n\t\treturn false;\n\t}\n\n\tif( $debug ) {\n\t\techo \"[nt_add_group] nt_add_match_placeholder success \";\n\t}\n\n\treturn $rows_affected;\n\n}", "title": "" }, { "docid": "58bc3350b443a94732f41147a6f71d70", "score": "0.61241615", "text": "public function create()\n {\n $module = $this->module;\n $name_module = Module::where('slug',$module)->first();\n $groups = Group::where('module',$this->module)->get();\n Activity::addLog('Truy cập bảng thêm danh mục cho: '.$this->module);\n return view('admin.groups.create_edit',compact('groups','module','name_module'));\n }", "title": "" }, { "docid": "c188f8f4f94d68377f182bccee224e42", "score": "0.61214954", "text": "private function getGroupNew($request)\n {\n $group = Group::where('user_id', Auth::user()->id)->first();\n\n if (is_null($group) && Session::get('antique')) {\n $group = new Group();\n }\n $data = $request->all();\n if ($request->hasFile('photoGroup')) {\n $imageName = str_random(40) . '**' . $request->file('photoGroup')->getClientOriginalName();\n $request->file('photoGroup')->move(base_path() . '/public/uploads/photoGroups/', $imageName);\n $data['image'] = $imageName;\n }\n\n unset($data['submit'], $data['photoGroup'], $data['pdfArtist']);\n $group->fill($data);\n Auth::user()->group()->save($group);\n return $group;\n }", "title": "" }, { "docid": "5c8919bdcc80280ae3b9fed11d10cc85", "score": "0.61156714", "text": "public function create()\n {\n //New Group Expenses\n return view('sectionGroups/create');\n }", "title": "" }, { "docid": "14a4ebd59ba3a4875266328166c550d7", "score": "0.6112349", "text": "public function create()\n {\n return view('admin.groups.create');\n }", "title": "" }, { "docid": "0bf23c8bfea1bc8f03c7b2919562cf87", "score": "0.6111688", "text": "function og_rules_action_add_group_node_form($settings, &$form) {\n $node = !empty($settings['og_fieldset']['og_settings']) ? $settings['og_fieldset']['og_settings'] : array();\n $og_form = og_group_form($node, array());\n $form['settings']['og_fieldset'] = array(\n '#type' => 'fieldset',\n '#title' => t('Organic groups form settings'),\n );\n $form['settings']['og_fieldset']['og_settings'] = $og_form;\n}", "title": "" }, { "docid": "3708b384959427116a8b513614f58107", "score": "0.61035013", "text": "public function create()\n {\n return view('admin::groups.create');\n }", "title": "" }, { "docid": "2329bda9b96f2e3972cc8ce02f909053", "score": "0.6099503", "text": "public function create()\n {\n return view('account-group.create');\n }", "title": "" }, { "docid": "38a786e6e6fb6ae0d917372e7cdefd7d", "score": "0.6068332", "text": "public function create()\n {\n return view('groups.create');\n }", "title": "" }, { "docid": "38a786e6e6fb6ae0d917372e7cdefd7d", "score": "0.6068332", "text": "public function create()\n {\n return view('groups.create');\n }", "title": "" }, { "docid": "38a786e6e6fb6ae0d917372e7cdefd7d", "score": "0.6068332", "text": "public function create()\n {\n return view('groups.create');\n }", "title": "" }, { "docid": "38a786e6e6fb6ae0d917372e7cdefd7d", "score": "0.6068332", "text": "public function create()\n {\n return view('groups.create');\n }", "title": "" }, { "docid": "38a786e6e6fb6ae0d917372e7cdefd7d", "score": "0.6068332", "text": "public function create()\n {\n return view('groups.create');\n }", "title": "" }, { "docid": "4e4ba92d490ce06d32052ae05a6fea28", "score": "0.6062761", "text": "function create_new_group(Request $request){\n $request ->validate([\n 'group_name'=> 'required|max:255',\n ],[ // Vérification des données du formulaire\n 'group_name.required' => 'Le nom du groupe ne peut pas être vide',\n 'group_name.max' => 'Le nom du groupe est trop long',\n ]);\n\n if(session()->has('LoggedUser')) { // Si l'utilisateur est toujours connecté, on met à jour les données\n // Récupération du nom de l'utilisateur et du tuble de la BDD correspondant à son compte\n $username = session()->get('LoggedUser'); // pseudo de l'utilisateur connecté\n $user = User::where('username', '=', $username)->first();\n\n //vérifier si l'utilisateur a déjà crée un groupe avec le même nom\n $test_group =DB::table('groups')\n ->where('id_creator', '=', $user->id)\n ->where ('name','like','%'.$request->group_name)\n ->first();\n\n if($test_group!=null){\n return back()->with('fail','OUPS! Vous avez déjà crée un groupe ayant le même nom');\n }\n\n\n $group= new Group; //instanciation d'un groupe et récolte des données entrées\n $group->name = $request->group_name;\n $group->id_creator = $user->id;\n $query = $group ->save(); //sauvegarde des infos dans la base de données (table groups)\n if($query){\n event(new Registered($group));\n return redirect('group/addingmembers');\n }else{\n return back()->with('fail','OUPS! Veuillez rééessayer plus tard.');\n }\n\n }\n\n\n\n }", "title": "" }, { "docid": "e1f6202009beb5e88c35f349aee2cc63", "score": "0.60582376", "text": "public function create(GroupFormBuilder $form)\n {\n return $form->render();\n }", "title": "" }, { "docid": "d8b01bc2f694ee1fc9dd175acb4adb31", "score": "0.6058018", "text": "public function addGroup($groupName, array $data = array());", "title": "" }, { "docid": "5530aa3d0ab28e6fe7cb98458154553c", "score": "0.6056981", "text": "public function DoGroupSave($form) {\r\n $name = $form['name']['value'];\r\n $acronym = $form['acronym']['value'];\r\n $id = $form['id']['value'];\r\n $ret = $this->user->GroupSave($name, $acronym,$id);\r\n $this->AddMessage($ret, 'Saved group.', 'Failed saving profile.');\r\n $this->RedirectToController('profile');\r\n}", "title": "" }, { "docid": "8446bb8bdc6c1d68a4b4825d448ce41a", "score": "0.6052011", "text": "public function actionSaveGroup(): Response\n {\n $this->requirePostRequest();\n $this->requireAcceptsJson();\n\n $group = new FieldGroup();\n $group->id = Craft::$app->getRequest()->getBodyParam('id');\n $group->name = Craft::$app->getRequest()->getRequiredBodyParam('name');\n\n $isNewGroup = empty($group->id);\n\n if (Craft::$app->getFields()->saveGroup($group)) {\n if ($isNewGroup) {\n Craft::$app->getSession()->setNotice(Craft::t('app', 'Group added.'));\n }\n\n return $this->asJson([\n 'success' => true,\n 'group' => $group->getAttributes(),\n ]);\n }\n\n return $this->asJson([\n 'errors' => $group->getErrors(),\n ]);\n }", "title": "" }, { "docid": "f61901269c12ddc9c529670c14282613", "score": "0.6048788", "text": "public function add()\n {\n $this->assign(GoodsService::formOptions());\n $this->display('form');\n }", "title": "" }, { "docid": "982681c6e7254d6489a5170f146d0f1f", "score": "0.60425407", "text": "function group_add($groupId, $id){\n }", "title": "" }, { "docid": "31843afe4f544e7f02b77fa0a369f1a9", "score": "0.6040256", "text": "function register() {\n if (count($this->fields) == 1) {\n $this->fields[0]->addClass('nolabel group_only_one_field');\n }\n if (method_exists($this,'preRegister')) {\n $this->preRegister();\n }\n if ($this->location) {\n $this->group['location'] = $this->location->getLocation();\n }\n $this->group['fields'] = array();\n foreach ($this->fields as $field) {\n global $post;\n $field->applyLoadFilters();\n if (is_object($field)) {$field = $field->getField();}\n array_push($this->group['fields'],$field);\n }\n // if ($this->name == 'hero') {diedump($this->group);}\n acf_add_local_field_group(\n $this->group\n );\n }", "title": "" }, { "docid": "ab2b47da8f45a74c457a0deed5c26860", "score": "0.6040146", "text": "function insert_user_group()\n\t{\n\t\t// Check user has privileges to insert user groups, else display a message to notify the user they do not have valid privileges.\n\t\tif (! $this->flexi_auth->is_privileged('Insert User Groups'))\n\t\t{\n\t\t\t$this->session->set_flashdata('message', '<p class=\"error_msg\">You do not have privileges to insert new user groups.</p>');\n\t\t\tredirect('auth_admin/manage_user_groups');\t\t\n\t\t}\n\n\t\t// If 'Add User Group' form has been submitted, insert the new user group.\n\t\tif ($this->input->post('insert_user_group')) \n\t\t{\n\t\t\t$this->load->model('demo_auth_admin_model');\n\t\t\t$this->demo_auth_admin_model->insert_user_group();\n\t\t}\n\t\t\n\t\t// Set any returned status/error messages.\n\t\t$this->data['message'] = (!isset($this->data['message'])) ? $this->session->flashdata('message') : $this->data['message'];\t\t\n\n\t\t$this->load->view('demo/admin_examples/user_group_insert_view', $this->data);\n\t}", "title": "" }, { "docid": "740df3402acb718cda92ef6ae5242cb9", "score": "0.6038529", "text": "public function admin_add() {\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$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}\n\t\t$groups = $this->User->Group->find('list');\n\t\t$this->set(compact('groups'));\n\t\t$this->render('add');\n\t}", "title": "" }, { "docid": "d63fb724ba730ae7067593005889bf17", "score": "0.60347235", "text": "public function renderNewGroup()\n {\n // auth guard\n if(!$this->session->has('user'))\n return redirect()->to('/login/index');\n $user = $this->session->get('user');\n\n echo view('common/header', ['groups' => '']);\n echo view('groups/newGroup');\n echo view('common/footer');\n }", "title": "" }, { "docid": "6fd1309ff04e6bdb018ab8e30ba63f46", "score": "0.6028475", "text": "function add() {\n if (isset($_POST) && count($_POST) > 0) {\n $params = array(\n 'FORM_NAME' => $this->input->post('FORM_NAME'),\n 'MODULE_ID' => $this->input->post('MODULE_ID'),\n 'CLIENT_ID' => $this->input->post('CLIENT_ID'),\n 'IS_ACTIVE' => $this->input->post('IS_ACTIVE'),\n 'CREATED_BY' => $this->input->post('CREATED_BY'),\n 'CREATED_DATE' => $this->input->post('CREATED_DATE'),\n );\n\n $form_id = $this->Form_model->add_form($params);\n redirect('form/index');\n } else {\n $data['_view'] = 'form/add';\n $this->load->view('layouts/main', $data);\n }\n }", "title": "" }, { "docid": "22bc22037cbee51a0661d2c92bbc5fe6", "score": "0.602683", "text": "public function createGroupAction(Request $request)\n {\n $group = new CandidateGroup();\n $formType = new CandidateGroupType();\n $redirect = $this->generateUrl('homepage');\n\n return $this->createAction(\n $request,\n $group,\n $formType,\n $redirect,\n 'Group saved successfully',\n array('pageName' => 'Create new group')\n );\n }", "title": "" }, { "docid": "2be80e2212e8904ffd0b0d57ee54a02d", "score": "0.6022901", "text": "public function addGroup($group)\n {\n $this->groups[] = $group;\n return $this;\n }", "title": "" }, { "docid": "5fa8525815d3a909e3c0421d888129a2", "score": "0.60135853", "text": "public function newGroup() {\n // auth guard\n if(!$this->session->has('user'))\n return redirect()->to('/login/index');\n $user = $this->session->get('user');\n\n $name = $this->request->getPost('group_name');\n $desc = $this->request->getPost('description');\n\n $data = [\n 'name'=>$name,\n 'description'=>$desc,\n ];\n\n if($this->request->getFile('image')->getName() != \"\") {\n $time_unique = strtotime(\"now\");\n $this->request->getFile('image')->move(ROOTPATH . 'public\\groupUploads\\\\' . $time_unique, $this->request->getFile('image')->getName());\n $data['image'] = $time_unique. \"/\". $this->request->getFile('image')->getName();\n } else\n $data['image'] = null;\n\n $groupModel = new GroupModel();\n $groupId = $groupModel->insert($data);\n\n $info = 'New group created. <br>';\n\n $group = $groupModel->find($groupId);\n\n $userModel = new UserModel();\n\n $membersToCall=[];\n $i=0;\n\n if(!empty($_POST['members'])) {\n foreach ($_POST['members'] as $member) {\n $user = $userModel->findByUsername($member);\n\n if ($user != null) {\n $membersToCall[$i++] = $user;\n }\n else{\n $info = $info . 'Wrong username: '.$member . '<br>';\n }\n\n }\n\n $info = $info . 'You can invite members in Edit';\n\n foreach ($membersToCall as $mem) {\n $this->sendCall($mem, $group);\n }\n\n }\n\n $userId = $this->session->get('user')['idUser'];\n $this->joinGroup($userId,$groupId,1);\n\n return redirect()->to(base_url('/group/index/'.$info));\n }", "title": "" }, { "docid": "1363a2512243c42c5955ce8e70a9a38a", "score": "0.6009943", "text": "public function create()\n\t{\n\t\treturn view('admin.price-group.create', ['entity' => new PriceGroup(['id' => 0])]);\n\t}", "title": "" }, { "docid": "857dd8e8380dbc4f930453bdd35b884a", "score": "0.60071844", "text": "public function test_can_add_field_to_group(): void {\n\t\t// Create input & field\n\t\t$input = Input_Text::create( 'field_key')->label('Test Field' );\n\t\t$field = Settings_Field::from_field( $input );\n\n\t\t$group = Settings_Group::create( 'key', 'label', 'slug' );\n\t\t$group->add_field( $field );\n\n\t\t$this->assertCount( 1, Objects::get_private_property( $group, 'fields' ) );\n\t\t$this->assertInstanceOf( Settings_Field::class, Objects::get_private_property( $group, 'fields' )['field_key'] );\n\t}", "title": "" }, { "docid": "ff6e28b7814d20964ee04440750b8637", "score": "0.6001758", "text": "public function getAdd(): JsonResponse\n {\n if(!AdminAuthorization::can('admin_permission_groups::edit')) {\n return $this->returnNotAuthorizedResponse();\n }\n\n $template = new Templater(AdminPermissionGroups::path('Templates' . DIRECTORY_SEPARATOR . 'group_add.php'));\n\n $template->fillDefaults();\n\n return $this->responseFormComponent(0, $template, $this->addCaption, $this->create);\n }", "title": "" }, { "docid": "f8121c42785de94be707c35173ce1ea8", "score": "0.5996171", "text": "public function add_group( array $args, $position = 0 );", "title": "" }, { "docid": "197318bd197f6e2502e6f8f1a365409b", "score": "0.5993473", "text": "public function create_fieldgroup($data)\n\t{\n\t\t//Load admon content controller\n\t\t$this->EE->load->file(PATH_THIRD.$this->_module_name.\"/classes/mock_admin_content.php\");\n\n\t\tif(!isset($data['group_name'])) show_error(\"Group name must be specified\");\n\n\t\t//Prep POST input\n\t\t$_POST['group_name'] = $data['group_name'];\n\n\t\t$c = new Mock_admin_content();\n\t\t$c->field_group_update();\n\n\t\treturn array(\"success\" => true);\n\t}", "title": "" }, { "docid": "4892003f76e34040e1a24c7ef00c486a", "score": "0.59921926", "text": "public function create()\n {\n $title = 'Create - group';\n\n return view('group.create');\n }", "title": "" }, { "docid": "418b94d70f7b8eb5e143424c9f66e1c7", "score": "0.59856987", "text": "public function add(Request $request)\n\t\t\t\t{\n\t\t\t\t\t// The id of the User who created this\n\t\t\t\t\t// group should be included in the $request\n\t\t\t\t\t\n\t\t\t\t\t// dd($data->all());\n\t\t\t\t\t$group = Group::create($request->all());\n\n\t\t\t\t\t$group_user = Group_User::create([\n\t\t\t\t\t\t'group_id' => $group->id,\n\t\t\t\t\t\t'user_id' => (int)$request['user_id'],\n\t\t\t\t\t\t'is_admin' => 1,\n\t\t\t\t\t\t'is_accepted' => 1,\n\t\t\t\t\t]);\n\n\t\t\t\t\treturn response()->json(array('group' => $group, 'group_user' => $group_user));\n\t\t\t\t}", "title": "" }, { "docid": "6bfedc093845c0a00087477a7e4c2ff2", "score": "0.5982991", "text": "public function create($group_id)\n {\n return view('groups.create', compact('group_id'));\n }", "title": "" }, { "docid": "76c7b99bd4ac59183a89b774e5e2cd90", "score": "0.5959986", "text": "function add() {\n\t\t$infra_grupo_nombre = $this->input->post('infra_grupo_nombre');\n\n\t\ttry {\n\t\t\t$infraGrupo = new InfraGrupo();\n\t\t\t$infraGrupo->infra_grupo_nombre = $infra_grupo_nombre;\n\n\t\t\t$infraConfigGrupo = Doctrine_Core :: getTable('InfraGrupo')->retrieveByMayor();\n\n\t\t\t$order = $infraConfigGrupo['infra_grupo_order'];\n\t\t\t$order++;\n\t\t\t$infraGrupo->infra_grupo_order = $order;\n\n\t\t\t$infraGrupo->save();\n\n\t\t\t$success = true;\n\t\t\t$msg = $this->translateTag('General', 'operation_successful');\n\t\t} catch (Exception $e) {\n\t\t\t$success = false;\n\t\t\t$msg = $e->getMessage();\n\t\t}\n\n\t\t$json_data = $this->json->encode(array (\n\t\t\t'success' => $success,\n\t\t\t'msg' => $msg\n\t\t));\n\t\techo $json_data;\n\t}", "title": "" }, { "docid": "d8499a911e2463ce0e1fc4ff9c54fa99", "score": "0.5949699", "text": "public function create()\n {\n // $groups = Groups::all();\n // return view('administracion/grupos', compact('administracion/grupos'));\n }", "title": "" }, { "docid": "1801726a03d791455a6f25e675ba8e16", "score": "0.5941818", "text": "public function addGroups($id)\n {\n $course = Course::find($id);\n return view('admin.course.add-groups',['title'=>trans('admin.add_groups'),'course'=>$course]);\n }", "title": "" }, { "docid": "261fbeab5c33b7e16d4c87460462991f", "score": "0.5939457", "text": "protected function registerFieldGroup()\n {\n if (function_exists('acf_add_local_field_group')) {\n\n $group = $this->group;\n\n $group['location'] = $this->locations;\n $group['menu_order'] = $this->menuOrder;\n $group['hide_on_screen'] = $this->hiddenOnScreenElements;\n\n $group['fields'] = $this->fields;\n\n $group['fields'] = array_values($group['fields']);\n\n acf_add_local_field_group($group);\n } else {\n throw new \\Exception(\"Function for registering field group does not exists, either ACF PRO plugin is missing or not yet initialized\");\n }\n }", "title": "" }, { "docid": "1b7aea4358ae894354b091e158927b53", "score": "0.593766", "text": "public function addGroup($id)\n\t{\n\t\t//TODO: complete this method\n\t\treturn true;\n\t}", "title": "" }, { "docid": "49684fa69c73c52aa51bf13471ae935d", "score": "0.5929834", "text": "public function add_group($_IDEmpresa,$_Name){\n\t\t$array=array(\"IDEmpresa\"=>$_IDEmpresa,\"Nombre\"=>$_Name);\n\t\t$this->db->insert(\"tbgruposencuestas\",$array);\n\t}", "title": "" }, { "docid": "bdaf9068c9d1ec2d88e184dd3f70c796", "score": "0.592736", "text": "public function create()\n {\n $this->groups = TicketGroup::all();\n return view('ticket-settings.group-modal', $this->data);\n }", "title": "" }, { "docid": "d19a8668634179f09357902ea075eb8d", "score": "0.59223837", "text": "public function editGroupingAction() {\n $aGetData = $this->getRequest()->getQuery();\n $id = $aGetData['id'];\n\n /*\n * Verifico si me llega un ID por POST\n */\n if (!$id) {\n $aPostData = $this->getRequest()->getPost();\n $id = $aPostData['id'];\n }\n\n /*\n * En el caso de que este el ID, busco el registro en la DB\n * En el caso que ID este null, creo un nuevo objeto\n */\n if ($id) {\n $object = $this->getEntityManager()->getRepository('Iem\\Entity\\Grouping')->find($id);\n $new = false;\n } else {\n $object = new \\Iem\\Entity\\Grouping();\n $new = true;\n }\n\n /*\n * Declar el Formulario\n * Defino el Hidratador de Doctrine\n * Hago el Bind entre el Formulario y el objeto\n */\n $form = new \\Iem\\Form\\Grouping($this->getEntityManager());\n $form->setHydrator(new \\DoctrineModule\\Stdlib\\Hydrator\\DoctrineObject($this->getEntityManager()));\n $form->bind($object);\n\n /*\n * Verifico el Post, valido formulario y persisto en caso positivo\n */\n if ($this->getRequest()->isPost()) {\n $form->setData($this->getRequest()->getPost());\n\n $form->setInputFilter($object->getInputFilter());\n if ($form->isValid()) {\n\n if ($this->zfcUserAuthentication()->hasIdentity()) {\n $user = $this->zfcUserAuthentication()->getIdentity();\n }\n\n if ($new) {\n $object->setCreatedBy($user);\n $object->setLastUpdatedBy($user);\n } else {\n $object->setLastUpdatedBy($user);\n }\n\n\n $this->getEntityManager()->persist($object);\n $this->getEntityManager()->flush();\n $form->bind($object);\n $persist = true;\n } else {\n $persist = false;\n }\n }\n\n /*\n * Paso la variable persist a la view\n * Defino terminal true para no renderizar el layout (ajax)\n */\n $view = new ViewModel(array('form' => $form,\n 'persist' => $persist));\n $view->setTerminal(true);\n return $view;\n }", "title": "" }, { "docid": "ef746ecf2d89852d8c83df39100a3d95", "score": "0.59139186", "text": "public function btnAddGroupAssessment_Click($strFormId, $strControlId, $strParameter) {\n\t $this->pnlAddGroupAssessment->Visible = true;\n\t $this->pnlAddGroupAssessment->RemoveChildControls(true);\n\t $pnlAddGroupView = new AddGroupAssessment($this->pnlAddGroupAssessment,'UpdateGroupAssessmentList',$this);\t\n\t\t}", "title": "" }, { "docid": "89499d3c67071dfaa98cde059cba9be5", "score": "0.5913379", "text": "function nt_group_handle_form( ) { \n\n\tglobal $debug;\n\n\tif ( $debug ){\n\t\t\techo \"[nt_group_handle_form] Post data\";\n\t\t\techo \"<pre>\"; print_r($_POST); echo \"</pre>\";\n\t}\n\n\tif ( ! isset( $_POST['nt_group_action'] ) ) {\n\t\treturn;\n\t} \n\n\t/** Pull common data out of the form, get specific data in handlers if necessary **/\n\t$thisgroup = array( \n\t\t\t\t/** matchID will be null on insert **/\n\t\t\t\t'nt_group_id'\t=> ( isset( $_POST['nt_group_id'] ) ? $_POST['nt_group_id'] : \"\" ),\n\t\t\t\t'nt_group_name'\t=> ( isset( $_POST['nt_group_name'] ) ? $_POST['nt_group_name'] : \"\" ),\n\t\t\t\t'nt_group_day' => ( isset( $_POST['nt_group_day'] ) ? $_POST['nt_group_day'] : \"\" ),\n\t\t\t\t'nt_group_time' => ( isset( $_POST['nt_group_time'] ) ? $_POST['nt_group_time'] : \"\" ),\n\t\t\t\t'nt_group_match_duration' => \n\t\t\t\t\t\t\t\t\t( isset( $_POST['nt_group_match_duration'] ) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ? $_POST['nt_group_match_duration']\t: \"\" )\n\n\t); // put the form input into an array\n\n\tif ( $debug ) nt_show_group( $thisgroup );\n\n\tswitch ( $_POST['nt_group_action'] ) {\n\t\tcase \"Update Group\":\n\t\tcase \"Delete Group\":\n\t\tcase \"Add Group\":\n\n\t\t\t$thisgroup['nt_group_organizer_id'] = nt_is_user_organizer ();\n\t\t\tif ( false == $thisgroup['nt_group_organizer_id'] ) {\n\t\t\t\techo \"<h3>sorry you are not an organizer, no permission to modify groups</h3>\";\n\t\t\t\treturn;\n\t\t\t} \n\t\t\tswitch ( $_POST['nt_group_action'] ) {\n\t\t\t\tcase \"Update Group\":\n\t\t\t\t\tif ( ! nt_update_group( $thisgroup ) ) {\n\t\t\t\t\t\techo \"<h3>Update Failed</h3>\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Delete Group\":\n\t\t\t\t\tif ( ! nt_delete_group( $thisgroup ) ) {\n\t\t\t\t\t\techo \"<h3>Delete Failed</h3>\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Add Group\":\n\t\t\t\t\tif ( ! nt_add_group( $thisgroup ) ) {\n\t\t\t\t\t\techo \"<h3>Add Failed</h3>\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak; // really can't get here...\n\t\t\t\t\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"Show Group details\":\n\t\t\tnt_show_group( $thisgroup );\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\techo \"[nt_group_handle_form]: bad action $action\";\n\t}\n}", "title": "" }, { "docid": "60a48e27a9fb62ee381d6b8aa4221814", "score": "0.5906277", "text": "public function create()\n {\n return view('users.groups.create');\n }", "title": "" }, { "docid": "83ebbdbad361d50817e4d5d6441261ac", "score": "0.5903224", "text": "public function create()\n {\n $countPerson[] = $this->countPerson();\n\n $countGroups[] = $this->countGroups();\n\n $state = $this->stateRepository->all();\n\n $roles = $this->roleRepository->all();\n\n $notify = $this->notify();\n\n $qtde = $notify ? count($notify) : 0;\n\n $leader = $this->getLeaderRoleId();\n\n $admin = $this->getAdminRoleId();\n\n $fields = $this->fieldsRepository->findWhere([\n 'model' => 'group',\n 'church_id' => $this->getUserChurch()\n ]);\n\n return view('groups.create', compact('countPerson', 'countGroups', 'state', 'roles',\n 'notify', 'qtde', 'leader', 'fields', 'admin'));\n }", "title": "" } ]
8b210b3f1f685827015a17e83524754f
Simulates an oil painting Applies a special effect filter that simulates an oil painting. Each pixel is replaced by the most frequent color occurring in a circular region defined by radius.
[ { "docid": "b9325320cd1bbf3b17e12174ae2df06e", "score": "0.7232747", "text": "function oilPaintImage($radius){}", "title": "" } ]
[ { "docid": "370248d48413fbbeebb1825b2683c3d3", "score": "0.7461211", "text": "public function oilPaintImage ($radius) {}", "title": "" }, { "docid": "76a448c5fb7cba1c48ccf66d98acfe14", "score": "0.7283533", "text": "public function oilpaintimage($radius){}", "title": "" }, { "docid": "de7380f47c7f386a9a2ece4c5eef25bd", "score": "0.71458495", "text": "public function oilpaintimage($radius)\n {\n }", "title": "" }, { "docid": "f0d98f2c17226dab06ace0b4f2e480a5", "score": "0.69860727", "text": "public function reduceNoiseImage ($radius) {}", "title": "" }, { "docid": "515eb90d357f8984a8cd6cadfbf32082", "score": "0.68867725", "text": "function reduceNoiseImage($radius){}", "title": "" }, { "docid": "3d3e74b1aaa76ec08303d8d479c7fcb3", "score": "0.6573641", "text": "public function reducenoiseimage($radius){}", "title": "" }, { "docid": "5a4e510369d6e99df8ce6cf1f7e9e36d", "score": "0.64041626", "text": "public function reducenoiseimage($radius)\n {\n }", "title": "" }, { "docid": "ff3ae67e4e03543a0ce1a2b8391795c5", "score": "0.63448167", "text": "public function medianfilterimage($radius){}", "title": "" }, { "docid": "c7a1417219d0fbef55c8d5b1de07d355", "score": "0.6209438", "text": "public function medianFilterImage ($radius) {}", "title": "" }, { "docid": "928a9aa9007fa812991e2b0309c625ff", "score": "0.614966", "text": "public function medianfilterimage($radius)\n {\n }", "title": "" }, { "docid": "dc492e5de87d5e7eea70f1134ee38fef", "score": "0.60857683", "text": "function medianFilterImage($radius){}", "title": "" }, { "docid": "42414decc0db97469b72cee9a5229750", "score": "0.60597897", "text": "function motionBlurImage($radius, $sigma, $angle, $channel){}", "title": "" }, { "docid": "34a11f021f0da463d45fd8d8e543aea3", "score": "0.60065234", "text": "public function charcoalImage ($radius, $sigma) {}", "title": "" }, { "docid": "543f600ba86a1f1bfeccef3922bb08d0", "score": "0.5954852", "text": "public function charcoalimage($radius, $sigma){}", "title": "" }, { "docid": "bf504caf7608eccc93b2735a11885766", "score": "0.59301674", "text": "public function addInterference()\n {\n\n for($i=0;$i<20;$i++){\n $radius = rand(0,150);\n imageellipse($this->image, rand(0,200), rand(0,200), $radius, $radius, $this->ink_color);\n }\n }", "title": "" }, { "docid": "2603dbb85b27127b5044f72c8548f82b", "score": "0.58840275", "text": "function charcoalImage($radius, $sigma){}", "title": "" }, { "docid": "e5f740d97a987414352d0c5b52e77a3d", "score": "0.58569473", "text": "public function spreadimage($radius){}", "title": "" }, { "docid": "a183066daa4795c0e0e833578b48cf70", "score": "0.58475477", "text": "function radialBlurImage($angle, $channel){}", "title": "" }, { "docid": "e03aa4c2649deff5f621660628cce3be", "score": "0.5755281", "text": "public function charcoalimage($radius, $sigma)\n {\n }", "title": "" }, { "docid": "858f29faaab181866068f41393e2d2da", "score": "0.5735994", "text": "function blurImage($radius, $sigma, $channel){}", "title": "" }, { "docid": "28d76087524ceed2b6730e068acecccb", "score": "0.5727105", "text": "public function implodeimage($radius){}", "title": "" }, { "docid": "5a67875049e8988ea61bb3879ca7f04f", "score": "0.5724435", "text": "public function spreadImage ($radius) {}", "title": "" }, { "docid": "c7d5cc530da447f11dac2565524afe9d", "score": "0.57204306", "text": "function UnsharpMask($img, $amount, $radius, $threshold)\n\t\t\t{\n\t\t\t// Attempt to calibrate the parameters to Photoshop:\n\t\t\tif ($amount > 500) $amount = 500;\n\t\t\t$amount = $amount * 0.016;\n\t\t\tif ($radius > 50) $radius = 50;\n\t\t\t$radius = $radius * 2;\n\t\t\tif ($threshold > 255) $threshold = 255;\n\t\n\t\t\t$radius = abs(round($radius)); \t// Only integers make sense.\n\t\t\tif ($radius == 0) {\treturn $img; imagedestroy($img); break;\t}\n\t\t\t$w = imagesx($img); $h = imagesy($img);\n\t\t\t$imgCanvas = $img;\n\t\t\t$imgCanvas2 = $img;\n\t\t\t$imgBlur = imagecreatetruecolor($w, $h);\n\t\n\t\t\t// Gaussian blur matrix:\n\t\t\t//\t1\t2\t1\t\t\n\t\t\t//\t2\t4\t2\t\t\n\t\t\t//\t1\t2\t1\t\t\n\n\t\t\t// Move copies of the image around one pixel at the time and merge them with weight\n\t\t\t// according to the matrix. The same matrix is simply repeated for higher radii.\n\t\t\tfor ($i = 0; $i < $radius; $i++)\n\t\t\t\t{\n\t\t\t\timagecopy\t ($imgBlur, $imgCanvas, 0, 0, 1, 1, $w - 1, $h - 1); // up left\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 1, 1, 0, 0, $w, $h, 50); // down right\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 0, 1, 1, 0, $w - 1, $h, 33.33333); // down left\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 1, 0, 0, 1, $w, $h - 1, 25); // up right\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 0, 0, 1, 0, $w - 1, $h, 33.33333); // left\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 1, 0, 0, 0, $w, $h, 25); // right\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 0, 0, 0, 1, $w, $h - 1, 20 ); // up\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 0, 1, 0, 0, $w, $h, 16.666667); // down\n\t\t\t\timagecopymerge ($imgBlur, $imgCanvas, 0, 0, 0, 0, $w, $h, 50); // center\n\t\t\t\t}\n\t\t\t$imgCanvas = $imgBlur;\t\n\t\t\t\t\n\t\t\t// Calculate the difference between the blurred pixels and the original\n\t\t\t// and set the pixels\n\t\t\tfor ($x = 0; $x < $w; $x++)\n\t\t\t\t{ // each row\n\t\t\t\tfor ($y = 0; $y < $h; $y++)\n\t\t\t\t\t{ // each pixel\n\t\t\t\t\t$rgbOrig = ImageColorAt($imgCanvas2, $x, $y);\n\t\t\t\t\t$rOrig = (($rgbOrig >> 16) & 0xFF);\n\t\t\t\t\t$gOrig = (($rgbOrig >> 8) & 0xFF);\n\t\t\t\t\t$bOrig = ($rgbOrig & 0xFF);\n\t\t\t\t\t$rgbBlur = ImageColorAt($imgCanvas, $x, $y);\n\t\t\t\t\t$rBlur = (($rgbBlur >> 16) & 0xFF);\n\t\t\t\t\t$gBlur = (($rgbBlur >> 8) & 0xFF);\n\t\t\t\t\t$bBlur = ($rgbBlur & 0xFF);\n\n\t\t\t\t\t// When the masked pixels differ less from the original\n\t\t\t\t\t// than the threshold specifies, they are set to their original value.\n\t\t\t\t\t$rNew = (abs($rOrig - $rBlur) >= $threshold) ? max(0, min(255, ($amount * ($rOrig - $rBlur)) + $rOrig)) : $rOrig;\n\t\t\t\t\t$gNew = (abs($gOrig - $gBlur) >= $threshold) ? max(0, min(255, ($amount * ($gOrig - $gBlur)) + $gOrig)) : $gOrig;\n\t\t\t\t\t$bNew = (abs($bOrig - $bBlur) >= $threshold) ? max(0, min(255, ($amount * ($bOrig - $bBlur)) + $bOrig)) : $bOrig;\n\t\t\t\t\t\n\t\t\t\t\tif (($rOrig != $rNew) || ($gOrig != $gNew) || ($bOrig != $bNew))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$pixCol = ImageColorAllocate($img, $rNew, $gNew, $bNew);\n\t\t\t\t\t\tImageSetPixel($img, $x, $y, $pixCol);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn $img;\n\t\t\t}", "title": "" }, { "docid": "22d608b14c0add3fd3ce7ca9883ed25f", "score": "0.5682614", "text": "function unsharpMaskImage($radius, $sigma, $amount, $threshold, $channel){}", "title": "" }, { "docid": "8afa215c12971d0ad0aef460da07cb2f", "score": "0.56695133", "text": "public function motionBlurImage ($radius, $sigma, $angle, $channel = Imagick::CHANNEL_DEFAULT) {}", "title": "" }, { "docid": "9972c6e1ebccfa1501647472fd61773a", "score": "0.56692713", "text": "public function implodeImage ($radius) {}", "title": "" }, { "docid": "91e8e850cf0a4898b9a5713c779ffcb5", "score": "0.5667146", "text": "public function spreadimage($radius)\n {\n }", "title": "" }, { "docid": "ffb3af276188b508b630a9515a39c8c8", "score": "0.5665318", "text": "public function implodeimage($radius)\n {\n }", "title": "" }, { "docid": "bcdb4924b339db226f7259597b4c6446", "score": "0.5640173", "text": "function adaptiveBlurImage($radius, $sigma, $channel){}", "title": "" }, { "docid": "5271906e7ff405362e0c5b9806ce558c", "score": "0.56361544", "text": "function spreadImage($radius){}", "title": "" }, { "docid": "60bd7be0ce7be9b8ec84846147d5c393", "score": "0.5598887", "text": "public function motionblurimage($radius, $sigma, $angle){}", "title": "" }, { "docid": "53374393645754f5f2ef0bb7ea7e4dc1", "score": "0.5593565", "text": "public function edgeimage($radius){}", "title": "" }, { "docid": "76963eb457be57a5d585ef8edf14aea3", "score": "0.5574306", "text": "public function round($radius = 10, $colour = \"FFFFFF\") {\n\n /* create mask for top-left corner in memory */\n $corner_image = imagecreatetruecolor($radius, $radius);\n $clear_colour = imagecolorallocate($corner_image, 0, 0, 0);\n $solid_colour = imagecolorallocate($corner_image, hexdec(substr($colour, 0, 2)), hexdec(substr($colour, 2, 2)), hexdec(substr($colour, 4, 2)));\n imagecolortransparent($corner_image, $clear_colour);\n imagefill($corner_image, 0, 0, $solid_colour);\n imagefilledellipse($corner_image, $radius, $radius, $radius * 2, $radius * 2, $clear_colour);\n\n /* render the top-left, bottom-left, bottom-right, top-right corners by rotating and copying the mask */\n $this->img_temp = $this->img;\n imagecopymerge($this->img_temp, $corner_image, 0, 0, 0, 0, $radius, $radius, 100);\n $corner_image = imagerotate($corner_image, 90, 0);\n imagecopymerge($this->img_temp, $corner_image, 0, $this->altura - $radius, 0, 0, $radius, $radius, 100);\n $corner_image = imagerotate($corner_image, 90, 0);\n imagecopymerge($this->img_temp, $corner_image, $this->largura - $radius, $this->altura - $radius, 0, 0, $radius, $radius, 100);\n $corner_image = imagerotate($corner_image, 90, 0);\n imagecopymerge($this->img_temp, $corner_image, $this->largura - $radius, 0, 0, 0, $radius, $radius, 100);\n\n /* output the image -- revise this step according to your needs */\n $this->img = $this->img_temp;\n return $this;\n }", "title": "" }, { "docid": "07b376f797357a1eb4c535064267a01e", "score": "0.55494267", "text": "public function blurimage($radius, $sigma, $channel){}", "title": "" }, { "docid": "4dc4f070497d6d1a50f54a84b8e41049", "score": "0.55492705", "text": "public function selectiveBlurImage($radius, $sigma, $threshold, $channel){}", "title": "" }, { "docid": "099af7b361b95a7c39281368a7399bca", "score": "0.55360097", "text": "function paintOpaqueImage($target, $fill, $fuzz, $channel){}", "title": "" }, { "docid": "7e39bf4fffd0fb5a2c3eaa81fc08df91", "score": "0.55292094", "text": "public function selectiveBlurImage ($radius, $sigma, $threshold, $CHANNEL = Imagick::CHANNEL_DEFAULT) { }", "title": "" }, { "docid": "f8918c0691adefa729042c5e0579a0b0", "score": "0.5501706", "text": "public function edgeImage ($radius) {}", "title": "" }, { "docid": "ed0eaa59a1088072a85445c4e3a3491f", "score": "0.54750335", "text": "function edgeImage($radius){}", "title": "" }, { "docid": "11442d38760b22a9183a5d403a5853b3", "score": "0.54724395", "text": "public function embossimage($radius, $sigma){}", "title": "" }, { "docid": "818604f3b65a0b461cb3a3549b6b4b25", "score": "0.54566145", "text": "function embossImage($radius, $sigma){}", "title": "" }, { "docid": "9c9f5473a1af270b4594f748e0fcf632", "score": "0.5441602", "text": "public function embossImage ($radius, $sigma) {}", "title": "" }, { "docid": "bc12011e90e748e5435abbd6bd1481ec", "score": "0.543531", "text": "function opaquePaintImage($target, $fill, $fuzz, $invert, $channel){}", "title": "" }, { "docid": "16bf752495e19e5e4e9eda7d7aea1409", "score": "0.5404419", "text": "public function localContrastImage($radius, $strength) { }", "title": "" }, { "docid": "9594db0a110cb54b66b4167101958025", "score": "0.5393148", "text": "function implodeImage($radius){}", "title": "" }, { "docid": "42a80571b519f54bfe6fb79a81280cb2", "score": "0.53909606", "text": "public function filter (ImagickKernel $ImagickKernel , $CHANNEL = Imagick::CHANNEL_DEFAULT) { }", "title": "" }, { "docid": "152613be00e9cda61d7b6d7c1d63cdde", "score": "0.53740835", "text": "public function blurImage ($radius, $sigma, $channel = null) {}", "title": "" }, { "docid": "33e96f26d86c7d90157826a9240411f7", "score": "0.53664726", "text": "public function radialblurimage($angle, $channel){}", "title": "" }, { "docid": "e59c0ed5d1de26bfb014fadf7c050c18", "score": "0.5354886", "text": "function ApplyRoundedCorners($image, $radius) {\n\n $image_width = ImageSX($image);\n $image_height = ImageSY($image);\n $diameter = $radius * 2;\n\n //\n // make copy of image\n //\n $output_image = ImageCreateTrueColor($image_width, $image_height);\n ImageFill($output_image, 0, 0, ImageColorExactAlpha($output_image, 0, 0, 0, 127));\n ImageAlphaBlending($output_image, false);\n ImageSaveAlpha($output_image, true);\n ImageCopyResampled($output_image, $image, 0, 0, 0, 0, $image_width, $image_height, $image_width, $image_height);\n\n //\n // create arc (template)\n //\n $arc_image = ImageCreateTrueColor($radius, $radius);\n ImageFill($arc_image, 0, 0, ImageColorExactAlpha($arc_image, 0, 0, 0, 127));\n ImageAlphaBlending($arc_image, false);\n ImageSaveAlpha($arc_image, true);\n\n ImageFilledArc(\n $arc_image,\n $radius + 1,\n $radius + 1,\n $diameter,\n $diameter,\n 180,\n 270,\n ImageColorExactAlpha($arc_image, 0, 255, 0, 0),\n 0\n );\n\n for ($y = 0; $y < $radius; $y++) {\n for ($x = 0; $x < ($radius - $y); $x++) {\n $ARC = ImageColorsForIndex($arc_image, ImageColorAt($arc_image, $x, $y));\n if ($ARC['green'] != 255) {\n ImageSetPixel($output_image, $x, $y, ImageColorExactAlpha($output_image, 255, 255, 255, 127));\n ImageSetPixel($output_image, $image_width - $x, $y, ImageColorExactAlpha($output_image, 255, 255, 255, 127));\n ImageSetPixel($output_image, $image_width - $x, $image_height - $y, ImageColorExactAlpha($output_image, 255, 255, 255, 127));\n ImageSetPixel($output_image, $x, $image_height - $y, ImageColorExactAlpha($output_image, 255, 255, 255, 127));\n }\n }\n }\n return $output_image;\n }", "title": "" }, { "docid": "75680d9f3235e6911747496458556489", "score": "0.53477883", "text": "public function edgeimage($radius)\n {\n }", "title": "" }, { "docid": "36d1b49f2bb212e74eca5a2f21aecdb4", "score": "0.5265454", "text": "public function radialBlurImage ($angle, $channel = Imagick::CHANNEL_ALL) {}", "title": "" }, { "docid": "4f6d7309e59e883a359baed639628925", "score": "0.52525645", "text": "function gaussianBlurImage($radius, $sigma, $channel){}", "title": "" }, { "docid": "523f4c7d401da9ccf9e781d0c673e0b3", "score": "0.52102125", "text": "function imagewobblecircle($img, $xc, $yc, $r, $wid, $amp, $num, $col)\n {\n $dphi = 1;\n if ($r > 0)\n $dphi = 1/(6.28*$r);\n $woffs = rand(0,100)*0.06283;\n for ($phi = 0; $phi < 6.3; $phi += $dphi) {\n $r1 = $r * (1-$amp*(0.5+0.5*sin($phi*$num+$woffs)));\n $x = $xc + $r1*cos($phi);\n $y = $yc + $r1*sin($phi);\n imagefilledrectangle($img, $x, $y, $x+$wid, $y+$wid, $col);\n }\n }", "title": "" }, { "docid": "764d262ea04b64178ee4d89bb5401253", "score": "0.5200601", "text": "public function unsharpMaskImage ($radius, $sigma, $amount, $threshold, $channel = Imagick::CHANNEL_ALL) {}", "title": "" }, { "docid": "61a62b19431ffff235ac31778ceb7516", "score": "0.51901895", "text": "public function sketchImage ($radius, $sigma, $angle) {}", "title": "" }, { "docid": "ef246565dcd71a363126a7f8692c83e2", "score": "0.517289", "text": "public function embossimage($radius, $sigma)\n {\n }", "title": "" }, { "docid": "d1cb5b2819a84d4a1a26451fc26dbd38", "score": "0.5167597", "text": "function adaptiveSharpenImage($radius, $sigma, $channel){}", "title": "" }, { "docid": "52e11dfb52c9c841e687451170f96227", "score": "0.5152577", "text": "public function blurimage($radius, $sigma, $channel = NULL)\n {\n }", "title": "" }, { "docid": "0d3bb8633d93b2b6de146bff2c988b79", "score": "0.51523566", "text": "public function sharpenImage ($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {}", "title": "" }, { "docid": "4227b7d8fd9c2613a82e0c33be6db455", "score": "0.5098736", "text": "function sketchImage($radius, $sigma, $angle){}", "title": "" }, { "docid": "23ba465861e0fbbc968a2f6ff58b1bbb", "score": "0.50949836", "text": "public function paintOpaqueImage ($target, $fill, $fuzz, $channel = Imagick::CHANNEL_ALL) {}", "title": "" }, { "docid": "2f05d999ba36a4ba3034142ceb08ed2c", "score": "0.5071974", "text": "public function adaptiveBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {}", "title": "" }, { "docid": "97a9a49e747aba5878d984981693a8e2", "score": "0.5018651", "text": "public function radius(int $radius = 20): self\n {\n $cornerImage = imagecreatetruecolor($radius, $radius);\n $black = imagecolorallocate($cornerImage, 0, 0, 0);\n $solid_colour = ImageColorAllocate($cornerImage, 255, 255, 255);\n $transparentColor = imagecolorallocate($cornerImage, 255, 0, 0);\n imagecolortransparent( $cornerImage, $transparentColor );\n imagefill($cornerImage, 0, 0, $solid_colour);\n imagefilledellipse($cornerImage, $radius, $radius, $radius * 2, $radius * 2, $black);\n \n // TOP-LEFT\n imagecolortransparent($cornerImage, $transparentColor);\n imagecopymerge($this->getImage(), $cornerImage, 0, 0, 0, 0, $radius, $radius, 100);\n \n // TOP-RIGHT\n $cornerImage = imagerotate( $cornerImage, 90, 0 );\n imagecolortransparent($cornerImage, $transparentColor);\n imagecopymerge( $this->getImage(), $cornerImage, 0, $this->height - $radius, 0, 0, $radius, $radius, 100);\n \n // BOTTOM-LEFT\n $cornerImage = imagerotate( $cornerImage, 90, 0 );\n imagecolortransparent($cornerImage, $transparentColor);\n imagecopymerge($this->getImage(), $cornerImage, $this->width - $radius, $this->height - $radius, 0, 0, $radius, $radius, 100);\n \n // BOTTOM-RIGHT\n $cornerImage = imagerotate( $cornerImage, 90, 0 );\n imagecolortransparent($cornerImage, $transparentColor);\n imagecopymerge( $this->getImage(), $cornerImage, $this->width - $radius, 0, 0, 0, $radius, $radius, 100 ); \n\n return $this;\n }", "title": "" }, { "docid": "f5c50de0f74b42fb4c0825ab3c8ac987", "score": "0.5004829", "text": "public function opaquePaintImage ($target, $fill, $fuzz, $invert, $channel = Imagick::CHANNEL_DEFAULT) {}", "title": "" }, { "docid": "7526f6f9423b2bc526209f5f2e78b417", "score": "0.4991498", "text": "function modulateImage($brightness, $saturation, $hue){}", "title": "" }, { "docid": "36f4cad145a88a9fa133e4d0722b4a1b", "score": "0.49521795", "text": "function imagecolorexact($image, $red, $green, $blue){}", "title": "" }, { "docid": "40c7dd09d642df75005f8290ddfa5854", "score": "0.48978692", "text": "public function modulateImage ($brightness, $saturation, $hue) {}", "title": "" }, { "docid": "9cf12c95578e06746561741531ad0909", "score": "0.48893362", "text": "public function modulateimage($brightness, $saturation, $hue){}", "title": "" }, { "docid": "a21b6dbc2b203fca1301c049cf4ac93a", "score": "0.48601365", "text": "public function adaptiveSharpenImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {}", "title": "" }, { "docid": "4d9683b785c9eed2e7de71a4db1f1a0b", "score": "0.48521325", "text": "public function gaussianBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {}", "title": "" }, { "docid": "59461afa0ecd767750859580c7857040", "score": "0.48321497", "text": "public function radialblurimage($angle, $channel = false)\n {\n }", "title": "" }, { "docid": "ea84ff94e2d82096fe7dd0492281f512", "score": "0.4820872", "text": "public function getimageinterlacescheme(){}", "title": "" }, { "docid": "db68f6ca31f41887fd8f0c2c0e35875a", "score": "0.48155004", "text": "protected function _img_distortion(&$image, $radius) {\n\n\t\t// Clone image for the pixels map using\n\n\t\t$old_image = @imagecreatetruecolor($this->config[\"width\"], $this->config[\"height\"]);\n\t\timagecopy($old_image, $image, 0, 0, 0, 0, $this->config[\"width\"], $this->config[\"height\"]);\n\n\t\t// Loop through the pixels and distort the image\n\n\t\tfor ($px = 0; $px < $this->config[\"width\"]; $px++) {\n\t\t\tfor ($py = 0; $py < $this->config[\"height\"]; $py++) {\n\t\t\t\t$image_width = imagesx($old_image);\n\t\t\t\t$image_height = imagesy($old_image);\n\n\t\t\t\t$x = $px - $this->config[\"width\"] / 2;\n\t\t\t $y = $py - $this->config[\"height\"] / 2;\n\t\t\t $r = sqrt($x*$x+$y*$y);\n\n\t\t\t $maxr = $radius;\n\n\t\t\t if ($r <= $maxr) {\n\t\t\t\t $a = atan2($y, $x);\n\t\t\t\t $a += 1 - ($r / $maxr)*2;\n\t\t\t\t $dx = cos($a) * $r + $this->config[\"width\"] / 2;\n\t\t\t\t $dy = sin($a) * $r + $this->config[\"height\"] / 2;\n\n\t\t\t\t if (($this->config[\"width\"] > $dx && $dx >= 0\n\t\t\t\t && $this->config[\"height\"] > $dy && $dy >= 0))\n\t\t\t\t \timagesetpixel($image, $px, $py, imagecolorat($old_image, $dx, $dy));\n\t\t\t\t else imagesetpixel($image, $px, $py, imagecolorallocate($image, 255, 255, 255));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5a6b2ef32b272cac28d9ffc0fc6bf8b3", "score": "0.47928876", "text": "function colorFloodfillImage($fill, $fuzz, $bordercolor, $x, $y){}", "title": "" }, { "docid": "164298659dba6edd550f6cd5c460b165", "score": "0.47589496", "text": "public function filter($ImagickKernel, $channel){}", "title": "" }, { "docid": "0d0358834b654d20d3b72d792fbf2e6a", "score": "0.47494873", "text": "function sepiaToneImage($threshold){}", "title": "" }, { "docid": "3c72bfa0cd356ac6c0f90b62c1ebc5fb", "score": "0.47453308", "text": "public function sepiaToneImage ($threshold) {}", "title": "" }, { "docid": "8bd58c79482dcc6b4f2a2c5b3d04c4df", "score": "0.47315893", "text": "function circle($r){\n $result = 3.14 * $r * $r;\n return $result;\n}", "title": "" }, { "docid": "29df3750ab58ffa90e18025206b31e97", "score": "0.47068927", "text": "function drawCircle($r){}", "title": "" }, { "docid": "f2c23a4e96c4976804ae0b285e7de0a7", "score": "0.47060382", "text": "function imagecolorclosest($image, $red, $green, $blue){}", "title": "" }, { "docid": "70a9cc54763bde82be304c817e2ebc2c", "score": "0.4692158", "text": "function imagecolorexact($image, $red, $green, $blue)\n {\n }", "title": "" }, { "docid": "5b42bb9edf64b3ef5b5a980586278c25", "score": "0.46702802", "text": "function imageellipse($image, $cx, $cy, $width, $height, $color){}", "title": "" }, { "docid": "7277710c8c02d95c44b9b8c6f145141d", "score": "0.46463463", "text": "public function gd_filter_vintage($im){\r\n\t\timagefilter($im, IMG_FILTER_BRIGHTNESS, 15);\r\n\t\timagefilter($im, IMG_FILTER_CONTRAST, -25);\r\n\t\timagefilter($im, IMG_FILTER_COLORIZE, -10, -5, -15);\r\n\t\timagefilter($im, IMG_FILTER_SMOOTH, 7);\r\n\t\t$im = $this -> gd_apply_overlay($im, 'scratch', 7);\r\n\t\treturn $im;\r\n\t}", "title": "" }, { "docid": "51e8510b5ac7adea0eab7496934774c2", "score": "0.46408978", "text": "public function floodFillPaintImage ($fill, $fuzz, $target, $x, $y, $invert, $channel = Imagick::CHANNEL_DEFAULT) {}", "title": "" }, { "docid": "b4c5f8eda2b51c851fcde8281da4b943", "score": "0.46376312", "text": "public function gd_filter_boost($im){\r\n\t\timagefilter($im, IMG_FILTER_CONTRAST, -35);\r\n\t\timagefilter($im, IMG_FILTER_COLORIZE, 25, 25, 25);\r\n\t\treturn $im;\r\n\t}", "title": "" }, { "docid": "52a3c3dbb81d0059967450b85d554b03", "score": "0.46316397", "text": "abstract protected function doFill(YiiImageFill $fill);", "title": "" }, { "docid": "c025e84ace7b3fd91502c8270fc0cad7", "score": "0.46270722", "text": "function imagecolorresolve($image, $red, $green, $blue){}", "title": "" }, { "docid": "4ef6aad74d10084ad564d328e89b2c05", "score": "0.4624249", "text": "function convolveImage($kernel, $channel){}", "title": "" }, { "docid": "f14436582ac82c5d887815b39354f64e", "score": "0.4598432", "text": "function imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style)\n{\n}", "title": "" }, { "docid": "b03937bc363cf6387fcfaa21d5c0e78d", "score": "0.45954564", "text": "public function testApply()\n {\n $effectsMock = new EffectsMock();\n $imageMock = new ImageMock($effectsMock);\n\n $this->filter->apply($imageMock);\n $this->assertEquals('interlace', $imageMock->called);\n }", "title": "" }, { "docid": "041c75cfd5f245dfe7d99626cd1b8b3d", "score": "0.4590803", "text": "public function getimageinterlacescheme()\n {\n }", "title": "" }, { "docid": "3bba3ddd3b0303646d218e67b296eeb9", "score": "0.4585361", "text": "public function blueShiftImage($factor){}", "title": "" }, { "docid": "5974746dfd23eb0db8a400e6c68f7df6", "score": "0.45588094", "text": "public function modulateimage($brightness, $saturation, $hue)\n {\n }", "title": "" }, { "docid": "db94b926a9eacf2333d8321742523315", "score": "0.4553969", "text": "function AddNoise($im_image,$i_width,$i_height,$i_color,$a_text_area)\n{\n\tglobal\t$bCleanText;\n\n\t$i_text_left = $a_text_area[0] - 4;\n\t$i_text_top = $a_text_area[1];\n\t$i_text_right = $a_text_area[2];\n\t$i_text_bot = $a_text_area[3] + 4;\n\t$n_pixels = mt_rand(($i_width * $i_height) / 20,($i_width * $i_height) / 10);\n\tfor ($ii = 0 ; $ii < $n_pixels ; $ii++)\n\t{\n\t\t$i_x_pos = mt_rand(0,$i_width-1);\n\t\t$i_y_pos = mt_rand(0,$i_height-1);\n\t\t\t//\n\t\t\t// within the text area, reduce probability by 66.67%\n\t\t\t//\n\t\tif ($bCleanText &&\n\t\t\t$i_x_pos >= $i_text_left && $i_x_pos <= $i_text_right &&\n\t\t\t$i_y_pos >= $i_text_top && $i_y_pos <= $i_text_bot)\n\t\t\tif (mt_rand(0,2) != 1)\n\t\t\t\tcontinue;\n\t\timagesetpixel($im_image,$i_x_pos,$i_y_pos,$i_color);\n\t}\n}", "title": "" }, { "docid": "fc80ec68ff19a8b3355a1d3ecb57b25d", "score": "0.45318678", "text": "public function convolveImage (array $kernel, $channel = Imagick::CHANNEL_ALL) {}", "title": "" }, { "docid": "f3bc4ed80f775a5b6dd31a04c146d131", "score": "0.4528798", "text": "public function setimageinterlacescheme($interlace){}", "title": "" }, { "docid": "6e654cfcbba43933124ebdf4eaa67a03", "score": "0.4523046", "text": "function imagecolorclosest($image, $red, $green, $blue)\n {\n }", "title": "" }, { "docid": "7652398302c6331cd1faa238ca77ca5f", "score": "0.4514752", "text": "public function cyclecolormapimage($displace){}", "title": "" }, { "docid": "b12b010222fba14fcef9c9508a5f5d1f", "score": "0.4511675", "text": "public function circle()\n {\n $this->ellipse();\n }", "title": "" }, { "docid": "265c1e0a8d5525d2e89345f1d506cad4", "score": "0.45109218", "text": "static function imagecircularcrop( &$img, $w, $h) {\n imagealphablending($img,true);\n $mask = imagecreatetruecolor($w,$h);\n imagealphablending($mask,true);\n $greenscreen = imagecolorallocate($mask, 0, 255, 0);\n $bluescreen = imagecolorallocate($mask, 0, 0, 255);\n imagefill($mask, 0, 0, $greenscreen);\n imagefilledellipse($mask, $w/2, $h/2, $w, $h, $bluescreen);\n imagecolortransparent($mask, $bluescreen);\n imagecopymerge($img, $mask, 0, 0, 0, 0, $w, $h, 100);\n imagecolortransparent($img, $greenscreen);\n }", "title": "" } ]
30d4829d9fdd4faa2a5bf3234ee30bc7
Performs the AJAX validation.
[ { "docid": "8847c910d8f8787bf40a7bb1e2d7250c", "score": "0.0", "text": "protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'questions-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" } ]
[ { "docid": "1510fc6b21e9a919b09df48eb986d2da", "score": "0.6821783", "text": "public function ajaxValidation($model)\n\t{\n\t\tif (Yii::$app->request->isAjax) {\n\t\t\techo Json::encode(ActiveForm::validate($model));\n\t\t\tYii::$app->end();\n\t\t}\n\t}", "title": "" }, { "docid": "ce9291dabb4cc839571768682d32e560", "score": "0.6816996", "text": "function admin_validate_data_ajax(){\n \n\t\t$this->layout = \"\";\n\t\t$this->autoRender = false;\n\t\tif($this->RequestHandler->isAjax()){\n\t\t\t$errors_msg = null;\n\t\t\t$data = $this->data;\n\t\t\tif(isset($this->data['Coupon']['id'])){\n\t\t\t\t$data['Coupon']['id'] = DECRYPT_DATA($data['Coupon']['id']);\n\t\t\t}\n\t\t\t$errors = $this->Coupon->validate_data($data['Coupon']);\n\t\t\tif ( is_array ($this->data) ){\n\t\t\t foreach ($this->data['Coupon'] as $key => $value ){\n\t\t\t\tif( array_key_exists ( $key, $errors) ){\n\t\t\t\t foreach ( $errors [ $key ] as $k => $v ){\n\t\t\t\t\t$errors_msg .= \"error|$key|$v\";\n\t\t\t\t }\t\n\t\t\t\t}else {\n\t\t\t\t\t$errors_msg .= \"ok|$key\\n\";\n\t\t\t\t}\n\t\t\t }\n\t\t\t \n\t\t\t}\n\t\t\techo $errors_msg;die();\n\t\t}\t\n\t}", "title": "" }, { "docid": "f017e58f5d1f7c115a5bdce4925676db", "score": "0.68024313", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='liquidaciones-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "7db902e780ad64f20ef1b40d432b68a1", "score": "0.67660207", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='persona-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "e56eb0ffcbbc6d59f5431fec8cdd4c57", "score": "0.67599607", "text": "function ProcessAjax() {\n\n\t// fetch the passed items from the get string\n\t$formid = $_GET[\"id\"]; // id of the form element\n\t$fvalue = urldecode($_GET[\"val\"]); // the value of the field\n\n\t// text requirements like email, date, time, zip\n\t// special requirements like unique\n\t$params = array();\n\tforeach(array_keys($_GET) as $key) {\n\t\t$check = strpos($key,'rule');\n\t\tif ( $check !== false && $check == 0 ) {\n\t\t\t$value = urldecode($_GET[$key]);\n\t\t\t$params[] = $value; // validation rules\n\t\t}\n\t}\n\n\t// required validating handled on javascript side to reduce server traffic\n\n\t// pass to the other function\n\tProcessItem($formid,$fvalue,$params,\"ajax\");\n}", "title": "" }, { "docid": "3498afe5cbe02c1f01537fe162a0e80a", "score": "0.675725", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='atividade-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "38a53792528f95ac99e02d2ddd2f50a8", "score": "0.6752813", "text": "function formValidate() {\n // $ = test_input(@$_POST['']);\n\t\t\t\t$id = @$_POST['id'];\n $factor = test_input(@$_POST['factor']);\n //Establish values that will be returned via ajax\n $return = array();\n $return['msg'] = '';\n $return['error'] = false;\n //Begin form validation functionality\n if ($factor == null){\n $return['error'] = true;\n $return['msg'] .= 1; \t\t\t\t\t\t\n }else{\n //Begin form success functionality\n\n // $ok = orderRepair::updateActiveOrderById($factor, $id);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\tif($ok){\n\t\t\t\t\t\t\t\t\t$return['msg'] = 0; \n\t\t\t\t\t\t\t\t//}else{\n\t\t\t\t\t\t\t\t//\t$return['msg'] = 50; \n\t\t\t\t\t\t\t\t//}\n \t\t\t\t\n\t\t\t\t}\n //Return json encoded results\n return json_encode($return);\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "8c865b374f5239f1f475632833322f0a", "score": "0.6752046", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='returns-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "8eb94e290770865be58c8bfa0a2f7f85", "score": "0.6743762", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='ingfactura-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "3723f1fc476b10b5d50f5a488f8c8481", "score": "0.67403513", "text": "public function post_validate(){}", "title": "" }, { "docid": "ee2e3d2637491f8a1e2fe369af1b0dea", "score": "0.67334396", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='mertimings-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "bfac4701ceee7148980328e4d0d0b373", "score": "0.6731791", "text": "protected function performAjaxValidation($model){\n if(isset($_POST['ajax']) && $_POST['ajax']==='deals-form'){\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "cec116f8467f32070d2e4649eb058530", "score": "0.6727653", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='announcements-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "c1ea7c630e771d0d6520c492a750de27", "score": "0.67243415", "text": "protected function performAjaxValidation($model){\n if(isset($_POST['ajax']) && ($_POST['ajax']==='events-doings-form' || $_POST['ajax']==='events-doings-add-form')){\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "6df0e08a7b9d23fead08cab35799ebe2", "score": "0.6720569", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='holes-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "4c1b8b89ba22718b7392fc33fea56afa", "score": "0.67205185", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pagos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "3cd35d799bb4e88aca4380f55849360b", "score": "0.6720002", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(Yii::app()->getRequest()->getIsAjaxRequest() && !isset($_SERVER['HTTP_X_PJAX']))\n\t\t{\n\t\tif( !isset($_GET['ajax'] ) || $_GET['ajax'] != 'issue-list'){\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c0757d43f901ae8e766effa1a99f1977", "score": "0.67177194", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='patrimonio-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "94e363d2a86c2f29d95a20789a5a6684", "score": "0.6712023", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='ingredients-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "9bf0311064f089d37dc50bc25bda996c", "score": "0.67114586", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='reservation-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "4207c584d614f0635c57d8ba5eb7dac2", "score": "0.670833", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST[\"ajax\"]) && $_POST[\"ajax\"] === \"goal-form\") {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "9a1846eed11f71692819b5c3226826d9", "score": "0.67058617", "text": "private function validate_ajax($element_id, $value){\r\n // disable layout/view and template system\r\n $this->reg->config->set('render_template', FALSE);\r\n $this->reg->config->set('render_view', FALSE);\r\n\r\n // strip out form id\r\n $element_id = substr($element_id, strlen($this->attributes['id'] . '_'));\r\n\r\n // strip off multiplier num if the element doesnt exist\r\n if(!isset($this->$element_id)){\r\n $element_id = str_replace(strrchr($element_id, '_'), '', $element_id);\r\n }\r\n\r\n // call the subclass's validate function\r\n $this->$element_id->validate(urldecode($value));\r\n $errors['error_message'] = $this->$element_id->get_error_message();\r\n\r\n // encode as json\r\n $json = json_encode($errors);\r\n\r\n // put error messages into array\r\n echo $json;\r\n }", "title": "" }, { "docid": "ce881517611b4a7fd6967905f01870d5", "score": "0.6702606", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'departments-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "335059725d090c40ea749c2028a68383", "score": "0.67024946", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='resources-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "48a78af263ba6b69b7e1899293ac17ce", "score": "0.67004156", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='referral-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "a3493825d527a4f1dd1dea0ead95967c", "score": "0.66989833", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'authitem-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "79a0d780b8b0d960229ac583bdc7ca05", "score": "0.6695155", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='Applicantfamily-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "12c8e2e6b395d1e270ae18aafb2f79fb", "score": "0.66925657", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='direcciones-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "a29f6bdcadedd1ab9332cd0bde4384e7", "score": "0.6686887", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='advertisement-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "095d6d5251e5029a1579aa37e5c66fc3", "score": "0.6682319", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='applicant-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "892e16e02771fcf08567f4723ce9078b", "score": "0.6672181", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='presupuesto-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "1981dc96531275dd314dd8a150aa6387", "score": "0.6660905", "text": "protected function performAjaxValidation($models) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'club-form') {\n echo CActiveForm::validate($models);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "129e8a38e854c57dc7e8bd178b0c7c5d", "score": "0.6652116", "text": "protected function performAjaxValidation($model) {\r\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'servidor-form') {\r\n echo CActiveForm::validate($model);\r\n Yii::app()->end();\r\n }\r\n }", "title": "" }, { "docid": "428827103a4c6d5c0ef01a3a4b6a233b", "score": "0.6651574", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='almacenes-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "d008c62825b39ee258761ad7897226a2", "score": "0.6648877", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'planificacion-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "db57142c3793bfdbb51df8ffce7f8b16", "score": "0.66486025", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='academia-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "f353793c174baa0b8acae07ba3431e61", "score": "0.6644473", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='producto-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "abcbe16a706cda681fa42860afb6f5a0", "score": "0.6643358", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='appointment-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "e173dfeadc0d6bb6b3c5b76fa6ff38fa", "score": "0.6642297", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dieta-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "437d749ade28ed28d5292b88781264eb", "score": "0.6641272", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='proposal-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "0c9b3397a2ddf27d0a628e6dac0de40d", "score": "0.6637538", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'solicitudeskit-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "c48b10588f65c3e98d2fbcfe0f877c32", "score": "0.66366154", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='weighing-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "455f57fe888e800f02a4bc879ca59d14", "score": "0.6636566", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='comments-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "3e16fc380aa9ceeec7c7bd77cf3e040c", "score": "0.663381", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='peserta-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "d0ec31c98a74acacf6937270504c2266", "score": "0.6631017", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'hr-functions-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "ed9851c75b593dd2ecebee73ea831921", "score": "0.6630326", "text": "protected function performAjaxValidation($model)\n {\n if(isset($_POST['ajax']) && $_POST['ajax']==='dictionary-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "4fe7cf511bb4462b64f6165b89a3bd4d", "score": "0.66290736", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='Member-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "15119ace016f9268d2b96cdb33686647", "score": "0.66272837", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='vacation-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "31126248f3efcbfbf880396ba48e0e4a", "score": "0.66242355", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='nearby-category-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "357f35d6f279f0219defa3e751ddc23d", "score": "0.6621433", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='patients-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "a29e486484ef7495f649d0c43255d929", "score": "0.66182286", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'articles-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "f5597208ac6a2528e94a1d645f5c7683", "score": "0.6617918", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'patient-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "5bd8f92854ff5f84885fe07436a096e6", "score": "0.6617493", "text": "protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'page-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "bb60a92385775ae992e82e617fde94cb", "score": "0.66156006", "text": "protected function performAjaxValidation($model)\r\n\t{\r\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='inscripcion-form')\r\n\t\t{\r\n\t\t\techo CActiveForm::validate($model);\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8bf4b316575dd42d3dc4294d46d59509", "score": "0.6613468", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='rendiciones-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "01c3e55aaab7c4e78d856c6014cdfe3d", "score": "0.6613001", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='registration-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "968e47ee003c858538d8c3d64a876d44", "score": "0.6610237", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='posts-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "11a35500f932a8d66ecf80d0224b738f", "score": "0.66099197", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pago-mes-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "8e4f7796e95218790d39d86a819dc006", "score": "0.6607893", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='import-visitor-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "98f1c7999de721bc4f32fdf757ffea42", "score": "0.66072387", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='building-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "efabd8645bb4ca8c2149650b62a3d52f", "score": "0.66059875", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='afiliado-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "6268af961d14652cbde244e5161c087d", "score": "0.6605162", "text": "protected function performAjaxValidation($model)\n {\n try\n {\n if(isset($_POST['ajax']) && $_POST['ajax']==='gas-tickets-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }\n catch (Exception $exc)\n {\n Yii::log(\"Uid: \" .Yii::app()->user->id. \" Exception \". $exc->getMessage(), 'error');\n $code = 404;\n if(isset($exc->statusCode))\n $code=$exc->statusCode;\n if($exc->getCode())\n $code=$exc->getCode();\n throw new CHttpException($code, $exc->getMessage());\n }\n }", "title": "" }, { "docid": "55fbc51ef15c9571be451ae58f42721a", "score": "0.6604842", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='szallito-futarlevelek-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "1fe036b76da03ec13c14c23c69ff2a54", "score": "0.6604394", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='practicas-profesionales-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "70f61984676d0b20cbb6609414015d08", "score": "0.6604252", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='quest-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "32992da438481e7c7e57c9db0cc6096a", "score": "0.6599175", "text": "protected function performAjaxValidation($model) {\r\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'ads-form') {\r\n echo CActiveForm::validate($model);\r\n Yii::app()->end();\r\n }\r\n }", "title": "" }, { "docid": "96b0a4953121efe5c850be40b2b9c368", "score": "0.6595954", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'supplier-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "c3b32a4f8af8486e39ca73de54edf276", "score": "0.6595943", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'expenseinvoice-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "7f304995e072cd406da58b345ff4eb34", "score": "0.6594487", "text": "protected function performAjaxValidation($model)\n\t\t{\n\t\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='gastos-form')\n\t\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b23ca663405a98d9b2fc2b1af0418057", "score": "0.6593081", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='Peticion-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "5221e65764e15d04c7b87a853ffefbed", "score": "0.6592323", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='cotizacion-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "a2cf462c3a3c1629435ad5329d232510", "score": "0.6591949", "text": "protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'person-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "621e622363ccfbdfe5ad7a79b320d81e", "score": "0.65916175", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='purchasing-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "67740ca875ac04d9f70fec83cb5679e5", "score": "0.65913606", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dptolocal-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "014300b01525a7ff84d4ae3099a7dcd3", "score": "0.659038", "text": "protected function performAjaxValidation($model)\n {\n if(isset($_POST['ajax']) && $_POST['ajax']==='templates-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "f5ec1e177b49448ba57da8c0e472ad71", "score": "0.65901065", "text": "protected function performAjaxValidation($model){\n if(isset($_POST['ajax']) && $_POST['ajax']==='banners-form'){\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "1b1bc2a60717d1077d687e44bf5e1291", "score": "0.6589723", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='patient-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "35b47b48c374ca23a0b56ece63ae9faf", "score": "0.6589526", "text": "private function validate()\n {\n $fields = $this->request->get('formFields');\n if($fields) {\n $duplicates = Helper::getDuplicateFieldNames($fields);\n if($duplicates){\n $duplicateString = implode(', ', $duplicates);\n wp_send_json([\n 'title' => sprintf( __( 'Name attribute %s has duplicate value.', 'fluentform' ), $duplicateString )\n ], 422);\n }\n }\n\n\n if (!$this->request->get('title')) {\n wp_send_json([\n 'title' => 'The title field is required.'\n ], 422);\n }\n }", "title": "" }, { "docid": "d28a942e2d391c68cdfbd1df21b20b77", "score": "0.6586343", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='livro-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "555a6dc4c1dd4d074813c12e62f17044", "score": "0.65813226", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='Content-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "2cf02c9a16be973974c1ed6cea68bc3c", "score": "0.65807724", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='paymentnotifications-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "5adca247dac9f6d4ce6a7aa3731e4a98", "score": "0.6580145", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='klinik-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "3bc2100663987207bbdbf36577663cbe", "score": "0.6579911", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='account-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\n\n\t\t}\n\t}", "title": "" }, { "docid": "7b2de0156ce6554c435114e1a9638ca1", "score": "0.65792286", "text": "protected function performAjaxValidation($model)\n {\n if(isset($_POST['ajax']) && $_POST['ajax']==='booking-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "1e4550fc371c765ef861db159486eff5", "score": "0.6578351", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='ad-client-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "5e604aaaaa70273f996a0b78b67aefae", "score": "0.65759623", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='plan-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "ef76763d4cb474f8910f144897e0ed98", "score": "0.65744525", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'offshelfsale-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "9506f23632c2f208cb6498876da0046c", "score": "0.6572957", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='wholesale-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "179c865ef32c4365350018ef32ed4e57", "score": "0.65727276", "text": "protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'wharehouses-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "775456344aab5abf482ff237ffd7b356", "score": "0.6572345", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='content-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "d390ae11ddb9a8024e9dfd33dbb043d9", "score": "0.65722114", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif (isset($_POST['ajax']) && $_POST['ajax'] === 'directions-form') {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "95edb8249b29dc948729b1a075236650", "score": "0.657112", "text": "protected function performAjaxValidation($model)\n {\n if(isset($_POST['ajax']) && $_POST['ajax']==='usuarios-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "c104bfb740903db307cb73715d28f64d", "score": "0.6570696", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='penjaminpasien-m-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "fd9791ea950a0ec866a5ecc02ab300c9", "score": "0.65706134", "text": "protected function performAjaxValidation($model)\r\n\t{\r\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='investigador-form')\r\n\t\t{\r\n\t\t\techo CActiveForm::validate($model);\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0e6e9afdd6a0453ace493831feda5473", "score": "0.65671927", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='archivo-recurso-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "5480e4cf3f521eb1714f5c3f8be0ebd8", "score": "0.65669453", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='articulos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "6b3d8e7583fd383acccefe07f12cc3b6", "score": "0.6564518", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='campaign-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "c4f8236b68afb51161bdbac9e0d9370e", "score": "0.65638906", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='employeetax-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='employeetaxdetail-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "49b03c22e7428ccd606965f26578c2ec", "score": "0.6563171", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='estudiante-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "3b8304068d807f717ea5ba57e6cf162f", "score": "0.6562972", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='part-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" }, { "docid": "e21aa6ada4c7171fd8c4db8ed4307753", "score": "0.6559959", "text": "protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='investments-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "title": "" } ]
46959b42612b16dfc393f86fb73329b5
Adds a JOIN clause to the query using the SucursalRelatedByIdsucursaldestino relation
[ { "docid": "ad8f5712bbe76fe08a94a6f27a2364c0", "score": "0.66599923", "text": "public function joinSucursalRelatedByIdsucursaldestino($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('SucursalRelatedByIdsucursaldestino');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'SucursalRelatedByIdsucursaldestino');\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "3bdf9f68bf359b456b179e55cb7afbda", "score": "0.65819216", "text": "public function useSucursalRelatedByIdsucursaldestinoQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinSucursalRelatedByIdsucursaldestino($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'SucursalRelatedByIdsucursaldestino', 'SucursalQuery');\n }", "title": "" }, { "docid": "986bfc4f7ff3f5086950c8224da1a24d", "score": "0.60749424", "text": "protected abstract function getJoinStatement();", "title": "" }, { "docid": "a98d262ab5c07c80a5c21bed09b106e0", "score": "0.5989311", "text": "public function clause_join();", "title": "" }, { "docid": "5385a1574c43c2d9c9071c0ee40c8b48", "score": "0.5951861", "text": "function SelectJoin($condicao)\n {\n\n $result = self::showField($this->tabela);\n $table = \"\";\n $tables = \"\";\n $tableFull = \"\";\n $fields = \"\";\n $join = array();\n for ($r = 0; $r < count($result); $r++) {\n $fields .= $this->tabela . \".\" . $result[$r] . \" as \" . $result[$r] . \"_\" . strrev(substr(strrev($this->tabela), 4)) . \",\";\n if ($result[$r] != \"id$this->tabela\") {\n\n if (strpos($result[$r], \"id\") || strpos($result[$r], \"Id\")) {\n $tbname = str_split($result[$r]);\n $tam = strlen($result[$r]);\n $tam = $tam - 2;\n for ($y = 0; $y < $tam; $y++)\n $table .= \"$tbname[$y]\";\n $join[] = $table . \".\" . \"id\" . $table . \" =\" . $this->tabela . \".\" . $table . \"id\";\n $tableFull .= \"$this->tabela\";\n $results = self::showField($table);\n for ($rs = 0; $rs < count($results); $rs++) {\n $fields .= $table . \".\" . $results[$rs] . \" as \" . $results[$rs] . \"_\" . strrev(substr(strrev($table), 4)) . \",\";\n if ($results[$rs] != \"id$table\") {\n\n if (strpos($results[$rs], \"id\") || strpos($results[$rs], \"Id\")) {\n $tbnames = str_split($results[$rs]);\n $tams = strlen($results[$rs]);\n $tams = $tams - 2;\n for ($ys = 0; $ys < $tams; $ys++)\n $tables .= \"$tbnames[$ys]\";\n $join[] = $tables . \".\" . \"id\" . $tables . \"=\" . $table . \".\" . $tables . \"id\";\n if (!strpos($tableFull, $table)) {\n $tableFull .= \",$table\";\n }\n $resultss = self::showField($tables);\n for ($rss = 0; $rss < count($resultss); $rss++) {\n $fields .= $tables . \" . \" . $resultss[$rss] . \" as \" . $resultss[$rss] . \"_\" . strrev(substr(strrev($tables), 4)) . \",\";\n }\n if (!strpos($tableFull, $tables)) {\n $tableFull .= \",$tables\";\n }\n } else {\n if (!strpos($tableFull, $table)) {\n $tableFull .= \",$table\";\n }\n }\n }\n }\n }\n }\n }\n $join = implode(\" and \", $join);\n $fields .= \"$fields,\";\n $fields = str_replace(\",,\", \"\", $fields);\n if ($condicao != \"\")\n $result = self::ExecuteQuery(\"SELECT {$fields} from {$tableFull} where {$join} and {$condicao}\");\n else\n $result = self::ExecuteQuery(\"SELECT {$fields} from {$tableFull} where {$join} \");\n\n return $result;\n }", "title": "" }, { "docid": "d6f3877a53f0720c331e7cd62e3bcc14", "score": "0.5851497", "text": "public function join( DQueryJoin $join );", "title": "" }, { "docid": "b9463d71277bed9999d42c8fc3970759", "score": "0.57520974", "text": "public function joinSucursalRelatedByIdsucursalorigen($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('SucursalRelatedByIdsucursalorigen');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'SucursalRelatedByIdsucursalorigen');\n }\n\n return $this;\n }", "title": "" }, { "docid": "42c308b66128feefc35a15d7e1df03c9", "score": "0.56432253", "text": "public function joiningTable(\n $related\n )\n {\n }", "title": "" }, { "docid": "42c308b66128feefc35a15d7e1df03c9", "score": "0.56432253", "text": "public function joiningTable(\n $related\n )\n {\n }", "title": "" }, { "docid": "42c308b66128feefc35a15d7e1df03c9", "score": "0.56428546", "text": "public function joiningTable(\n $related\n )\n {\n }", "title": "" }, { "docid": "612f5c9cb5ef1eb86bb42031ec5a544d", "score": "0.562673", "text": "public function get_join($table_from, $table_join, $join, $condicao = NULL)\n {\n //$this->db->select('*');\n $this->db->from($table_from);\n $this->db->join($table_join, $join);\n if($condicao != NULL)\n {\n $this->db->where($condicao);\n }\n return $this->db->get();\n //echo $str = $this->db->last_query();\n }", "title": "" }, { "docid": "dd1ffa5c5c220ec5c7496019d3fdc351", "score": "0.5571444", "text": "function rel_search_join( $join ) {\n\tglobal $pagenow, $wpdb;\n\tif ( is_admin() && $pagenow == 'edit.php' && isset( $_GET['post_type'] ) == 'listings' && isset( $_GET['s'] ) != '') { \n\t\t$join .= 'LEFT JOIN ' . $wpdb->postmeta . ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\t}\n\treturn $join;\n}", "title": "" }, { "docid": "df4ae84ea39220a203a38a5a2499f70e", "score": "0.5544787", "text": "public function addJoinForDayTable()\n {\n $this->join[] = 'tx_events2_event_day_mm ON tx_events2_domain_model_event.uid=tx_events2_event_day_mm.uid_local';\n $this->join[] = 'tx_events2_domain_model_day ON tx_events2_event_day_mm.uid_foreign=tx_events2_domain_model_day.uid';\n $this->tables[] = 'tx_events2_domain_model_day';\n }", "title": "" }, { "docid": "74bdd24a2f00d6d19475455d3627bfd2", "score": "0.5540812", "text": "final public function join($sql,$inner_join=true){\n $this->query['join'][]=($inner_join ? 'INNER JOIN ' : 'LEFT JOIN ').$sql;\n return $this;\n }", "title": "" }, { "docid": "9e63a321d549888d94c3720431c2c5bb", "score": "0.5500394", "text": "function joinClause( $join ) {\n global $wpdb;\n $taxonomy_list = implode( \"','\", $this->taxonomies );\n $join .= \" \n LEFT JOIN $wpdb->term_relationships tr ON $wpdb->posts.ID = tr.object_id\n INNER JOIN $wpdb->term_taxonomy tt ON \n (tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy IN ('$taxonomy_list'))\n INNER JOIN $wpdb->terms t ON tt.term_id = t.term_id\n \";\n return $join;\n }", "title": "" }, { "docid": "dfae5c04137428bb82c0816096fdd3b5", "score": "0.5495839", "text": "public function joinRelationships($option);", "title": "" }, { "docid": "153d9acadaa14fca8686a785d31c088e", "score": "0.5480085", "text": "public function addJoinForCategoryTable()\n {\n $this->join[] = 'sys_category_record_mm ON tx_events2_domain_model_event.uid=sys_category_record_mm.uid_foreign';\n $this->join[] = 'sys_category ON sys_category_record_mm.uid_local=sys_category.uid';\n $this->where[] = 'sys_category_record_mm.tablenames = \\''.$this->getFrom().'\\'';\n $this->tables[] = 'sys_category';\n }", "title": "" }, { "docid": "346e324c29247a7587957a5073485ea2", "score": "0.54290056", "text": "private function dispatchJoins(){\n $join = $this->join . $this->onCondition;\n DBManager::getInstance()->join($join);\n }", "title": "" }, { "docid": "a6facbff9b5af87e04576b0f4a30f29b", "score": "0.54252356", "text": "private function applyJoins(): void\n {\n foreach ($this->getAssociations() as $association) {\n switch ($association->type()) {\n case Association::MANY_TO_ONE:\n case Association::MANY_TO_MANY:\n case Association::ONE_TO_MANY:\n $this->query->leftJoinWith($association->getName());\n break;\n }\n }\n }", "title": "" }, { "docid": "4d0e41aaf183186845f208d21a50139f", "score": "0.5404157", "text": "function szub_search_custom_join($join) {\n\tglobal $wpdb;\n\tif( is_search() && szub_is_search_key() ) {\n\t\t$join = \" LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id \";\n\t}\n\treturn $join;\n}", "title": "" }, { "docid": "315ffeedd617834782545a77d2f586ad", "score": "0.5394501", "text": "private function posts_join( $join ) {\n\t\tglobal $wpdb;\n\t\t$alterations = static::alterations();\n\n\t\tif ( $alterations ) {\n\t\t\t$join .= 'LEFT JOIN ' . $wpdb->postmeta . ' post_meta_admin_search ON ' . $wpdb->posts . '.ID = post_meta_admin_search.post_id ';\n\t\t}\n\n\t\treturn $join;\n\t}", "title": "" }, { "docid": "63a78b45327fcbb39cb3fc4b28cf3866", "score": "0.53880036", "text": "private function _addJoinQuery($select, array $params = array())\n {\n if (isset($params['joinTables']) && count($params['joinTables']))\n $this->_joinTables = $params['joinTables'];\n\n /* If needs to add some data from other table, tests the joinTables\n * property. If not empty add tables and join clauses.\n */\n if (count($this->_joinTables) > 0)\n {\n // Get the constraint attribute = foreign key to link tables.\n $foreignKey = $params['foreignKey'];\n // Loop on tables list(given by object class) to build the query\n foreach ($this->_joinTables as $key => $object)\n {\n //Create an object and fetch data from object.\n $tmpObject = new $object();\n $tmpDataTable = $tmpObject->getDataTableName();\n $tmpIndexTable = $tmpObject->getIndexTableName();\n $tmpColumnData = $tmpObject->getDataColumns();\n $tmpColumnIndex = $tmpObject->getIndexColumns();\n //Add data to tables list\n $tables[$tmpDataTable] = $tmpColumnData;\n $tables[$tmpIndexTable] = $tmpColumnIndex;\n //Get the primary key of the first data object to join table\n $tmpDataId = $tmpObject->getDataId();\n // If it's the first loop, join first table to the current table\n if ($key == 0)\n {\n $select->joinLeft($tmpDataTable, $tmpDataId . ' = ' . $foreignKey);\n //If there's an index table then it too and filter according language\n if (!empty($tmpIndexTable))\n {\n $tmpIndexId = $tmpObject->getIndexId();\n $select->joinLeft(\n $tmpIndexTable, $tmpDataId . ' = ' . $tmpIndexId);\n $select->where(\n $tmpIndexTable . '.' . $tmpObject->getIndexLanguageId() . ' = ?', $this->_defaultEditLanguage);\n }\n }\n elseif ($key > 0)\n {\n // We have an other table to join to previous.\n $tmpDataId = $tmpObject->getDataId();\n\n $select->joinLeft(\n $tmpDataTable, $tmpDataId . ' = ' . $foreignKey);\n\n if (!empty($tmpIndexTable))\n {\n $tmpIndexId = $tmpObject->getIndexId();\n $select->joinLeft(\n $tmpIndexTable);\n\n $select->where(\n $tmpIndexTable . $tmpObject->getIndexLanguageId() . ' = ?', $this->_defaultEditLanguage);\n }\n }\n }\n }\n\n return $select;\n }", "title": "" }, { "docid": "5251abb3f73117ef9ca1740da65c1c16", "score": "0.5372452", "text": "function addJoin(\n\t\t$target_table = '',\n\t\t$target_field = '',\n\t\t$join_type = 'JOIN',\n\t\t$foreign_table = '',\n\t\t$foreign_field = '')\n\t{\n\n\t\tif ($target_table != '' && $target_field != '' && $join_type != '' && $foreign_table != '' && $foreign_field != '')\n\t\t{\n\t\t\t$this->isValidJoinType($join_type);\n\t\t\t$dataObj = new Data(array(\"joinStr\"));\n\t\t\t$dataObj->name = MANUAL_JOIN;\n\t\t\t$dataObj->addRow(array(\"\\n\".$join_type.\"\\n\\t\".$target_table.\" ON( \".$target_table.\".\".$target_field.\" = \".$foreign_table.\".\".$foreign_field.\" )\"));\n\t\t\t$this->addRow(array($dataObj));\n\t\t}\n\t\telseif (is_a($target_table, \"Objects\") && $target_field == '') //do we assume object linking table???\n\t\t{\n\t\t\t$this->isValidJoinType($join_type);\n\t\t\t$target_table->addValues(\"_join_type\", $join_type);\n\t\t\t$this->addRow(array($target_table));\n\t\t}\n\t\telseif (is_a($target_table, \"Objects\") && $target_field != '')\n\t\t{\n\t\t\tif ($this->isValidJoinType($target_field))\n\t\t\t{\n\t\t\t\t$target_table->addValues(\"_join_type\", $target_field);\n\t\t\t\t$this->addRow(array($target_table));\n\t\t\t}\n\t\t}\n\t\telseif(is_a($join_type, \"Filters\"))\n\t\t{\n\t\t\t///TODO\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "40e37667911b03cec0520f5a74d89adc", "score": "0.5363522", "text": "protected function buildJoinQueryString(): string\n {\n $str = \"\";\n foreach ($this->join as $id => $joinTable) {\n $str .= $joinTable . \"ON \";\n if (! isset($this->onClauses[$id]) || empty($this->onClauses[$id])) {\n throw new \\Exception(\"Join statement without any ON clause: $joinTable\");\n }\n $str .= $this->buildConditionalQueryString($this->onClauses[$id]) . \" \";\n }\n return $str;\n }", "title": "" }, { "docid": "970dcbf9f829666f3b9f3b54410be21b", "score": "0.5362876", "text": "function iconic_product_search_join( $join, $query ) {\n\tif ( ! $query->is_main_query() || is_admin() || ! is_search() || ! is_woocommerce() ) {\n\t\treturn $join;\n\t}\n\tglobal $wpdb;\n\t$join .= \" LEFT JOIN {$wpdb->postmeta} iconic_post_meta ON {$wpdb->posts}.ID = iconic_post_meta.post_id \";\n\treturn $join;\n}", "title": "" }, { "docid": "da58c24b30c860f08ec1413e08336461", "score": "0.5355555", "text": "public function processJoins(QueryBuilder $queryBuilder): void;", "title": "" }, { "docid": "cad6d62b1d01c3b7b1dcbd35bf3d865f", "score": "0.5354733", "text": "protected function performJoin(Builder $query = null)\n {\n $query = $query ?: $this->query;\n\n $farKey = $this->jsonColumn($query, $this->throughParent, $this->getQualifiedFarKeyName(), $this->secondLocalKey);\n\n $query->join($this->throughParent->getTable(), $this->getQualifiedParentKeyName(), '=', $farKey);\n\n if ($this->throughParentSoftDeletes()) {\n $query->whereNull($this->throughParent->getQualifiedDeletedAtColumn());\n }\n }", "title": "" }, { "docid": "b4e6a6431fbd0ac0233502c93a9d3a44", "score": "0.53152245", "text": "public function joinSucursal($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Sucursal');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Sucursal');\n }\n\n return $this;\n }", "title": "" }, { "docid": "b4e6a6431fbd0ac0233502c93a9d3a44", "score": "0.53152245", "text": "public function joinSucursal($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Sucursal');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Sucursal');\n }\n\n return $this;\n }", "title": "" }, { "docid": "1544f1a7a04383ae2faea2053c776437", "score": "0.5309913", "text": "function get_join() {\n // get the join from this table that links back to the base table.\n // Determine the primary table to seek\n if (empty($this->query->relationships[$this->relationship])) {\n $base_table = $this->query->base_table;\n }\n else {\n $base_table = $this->query->relationships[$this->relationship]['base'];\n }\n\n $join = views_get_table_join($this->table, $base_table);\n if ($join) {\n return clone $join;\n }\n }", "title": "" }, { "docid": "2e78bd9e94a08abfb3d8a758ea626473", "score": "0.5297301", "text": "public function useSucursalRelatedByIdsucursalorigenQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinSucursalRelatedByIdsucursalorigen($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'SucursalRelatedByIdsucursalorigen', 'SucursalQuery');\n }", "title": "" }, { "docid": "9c00bdde8097aafd2845d85cb21282a7", "score": "0.5296305", "text": "function cf_search_join( $join ) {\n\tglobal $wpdb;\n\n\tif ( is_search() )\n\t\t$join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\n\treturn $join;\n}", "title": "" }, { "docid": "d0f2248c0d90eb195487400b79284f01", "score": "0.52278686", "text": "function AddJoin($other_cctable, $joinfield, $jointype = 'LEFT OUTER' )\n {\n $name = 'j' . $this->_join_num++;\n $othername = $other_cctable->_table_name;\n $otherkey = $other_cctable->_key_field;\n\n $join = \"\\n $jointype JOIN $othername $name ON $joinfield = $name.$otherkey \";\n\n $this->_joins[$name] = $join;\n $this->_join_parts[$name] = array( $other_cctable,\n $joinfield);\n return($name);\n }", "title": "" }, { "docid": "9b5debcb81a27a924f7d5204d33f49eb", "score": "0.51846", "text": "function buildJoinStr()\n\t{\n\t\t$sql = '';\n\t\t$count = count($this->getValues(\"objects\"));\n\t\t$targetObj = $this->getValues(\"objects\", 0); ///ASSUMPTION target must be set to join and target will be set before joining\n\n \tfor ($i = 0; $i < $count; $i++)\n\t\t{\n\t\t\tfor ($j = 0; $j < $count; $j++)\n\t\t\t{\n\t\t\t\t$objI = $this->getValues(\"objects\", $i);\n\t\t\t\t$objJ = $this->getValues(\"objects\", $j);\n\t\t\t\tif ($objI->name != $objJ->name && is_a($objJ,\"Objects\") && is_a($objI,\"Objects\"))\n\t\t\t\t{\n\t\t\t\t\t$matchedFields = array_intersect($objI->getFields(), $objJ->getFields());\n\t\t\t\t\t$matchedFields = array_diff($matchedFields, $this->neverJoinOnFields);\n\t\t\t\t\t///ASSUMPTION: must pre-define the fields you do NOT want to Join on in the define at top of file\n\t\t\t\t\tif (count($matchedFields) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$idsToFilterOn = '';\n \t\t\t\t\t\t$idsToFilterOn = $objI->getValues(current($matchedFields));\n \t\t\t\tif ($idsToFilterOn == '') $idsToFilterOn = $objJ->getValues(current($matchedFields));\n \t\t\t\t\t\t$idsToFilterOn = (!is_array($idsToFilterOn) && $idsToFilterOn != '') ? array($idsToFilterOn) : $idsToFilterOn;\n \t\t\t\t\t\tif (is_array($idsToFilterOn) && count($idsToFilterOn) > 0)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\t///ASSUMPTION: want all matching fields on the ID using \"||\" //$constraint = \" && \";\n \t\t\t\t\t\t\t$this->addFilter(current($matchedFields), $idsToFilterOn, $objI->name, \"=\", \"||\");\n \t\t\t\t\t\t}\n\n\t\t\t //ASSUMPTION using addJoin only join is allowed no left inner or right\n\t\t\t if ($this->isJoinSet($sql, $objJ->db.\".\".$objJ->name) || $objJ->db.\".\".$objJ->name == $targetObj->db.\".\".$targetObj->name)\n\t\t\t {\n\t\t\t\t\t\t\t$tableJoin = $objI->db.\".\".$objI->name;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t\t\t\t$tableJoin = $objJ->db.\".\".$objJ->name;\n\t\t\t }\n\t\t\t $join_type = \"JOIN\";\n\t\t\t if ($objI->refTable == $objJ->name)\n\t\t\t {\n\t\t\t\t\t\t\tif (!$objJ->hasValue(\"_join_type\")) $objJ->addValues(\"_join_type\", $join_type);\n\t\t\t\t\t\t\t$sql .= \" \".strtoupper($objJ->get_join_type()).\" \".$tableJoin.\" ON( \".$objI->db.\".\".$objI->name.\".\".$objI->fkey.\" = \".$objJ->db.\".\".$objI->refTable.\".\".$objI->refkey.\" )\";\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t if (empty($objJ->fTable))\n\t\t\t {\n\t\t\t\t\t\t\tif (\"\".$objI->db.\".\".$objI->name.\"\" == \"\".$targetObj->db.\".\".$targetObj->name.\"\")\n\t\t\t\t\t\t\t{\n\t\t\t \tif (!$objJ->hasValue(\"_join_type\")) $objJ->addValues(\"_join_type\", $join_type);\n\t\t\t\t\t\t\t\t$sql .= \" \".strtoupper($objJ->get_join_type()).\" \".$tableJoin.\" ON( \".$objI->db.\".\".$objI->name.\".\".current($matchedFields).\" = \".$objJ->db.\".\".$objJ->name.\".\".current($matchedFields).\" )\";\n\t\t\t\t\t\t\t}else{\n\t\t\t \tif (!$objI->hasValue(\"_join_type\")) $objI->addValues(\"_join_type\", $join_type);\n\t\t\t\t\t\t\t\t$sql .= \" \".strtoupper($objI->get_join_type()).\" \".$tableJoin.\" ON( \".$objI->db.\".\".$objI->name.\".\".current($matchedFields).\" = \".$objJ->db.\".\".$objJ->name.\".\".current($matchedFields).\" )\";\n\t\t\t\t\t\t\t}\n\t\t\t }\n\t\t\t }\n\t\t\t\t\t\t//$j++;///remove line\n\t\t\t\t\t\t$i++;\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//skip do nothing\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->joinStr = $sql;\n\t}", "title": "" }, { "docid": "ac9434bf428e14290781699f9ac12548", "score": "0.51771975", "text": "protected function getCustomJoin($params = array())\n {\n $sql = \" JOIN (\";\n // Give me every opportunity\n $sql .= <<<MYCUSTOMQUERY\nSELECT\n opportunities.id AS my_custom_id\n FROM\n opportunities\nMYCUSTOMQUERY;\n $sql .= \") opportunities_to_show ON opportunities_to_show.my_custom_id = opportunities.id\";\n return $sql;\n }", "title": "" }, { "docid": "b1d6bebe65cbd41910c08b4608097532", "score": "0.517179", "text": "private function _autoJoin($reference)\n\t{\n\t\t$foreign_tbls = $this->_options->foreign_tbls;\n\t\tif( !array_key_exists($reference->_options->tbl, $foreign_tbls) ) return;\n\t\t\n\t\t$foreign = $foreign_tbls[$reference->_options->tbl];\n\t\t\n\t\t$join_type \t\t= $foreign['jointype'];\n\t\t$join_columns \t= $foreign['joincolumn'];\n\t\t$columns \t\t= !empty($foreign['column']) ? $foreign['column'] : array() ;\n\t\t$conditions = $this->_getTable();\n\t\t\n\t\t$arrJoinColumns = array();\n\t\tif( array_key_exists(0, $join_columns) )\n\t\t{\n\t\t\tforeach($join_columns as $join_column){\n\t\t\t\t$arrJoinColumns[] = $reference->_getTable(true).$join_column['name'].' = '.$this->_getTable(true).$join_column['referencedColumnName'];\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$arrJoinColumns[] = $reference->_addAliasToField($join_columns['name']).' = '.$this->_addAliasToField($join_columns['referencedColumnName']);\n\t\t}\n\t\t\n\t\t$conditions .= ' ON ('.implode(' AND ',$arrJoinColumns).')';\n\t\t\n\t\t//create join type\n\t\tswitch($join_type)\n\t\t{\n\t\t\tcase 'left':\n\t\t\t\t$this->_query->leftJoin($conditions);\n\t\t\t\tbreak;\n\t\t\tcase 'rigth':\n\t\t\t\t$this->_query->rightJoin($conditions);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->_query->join($join_type,$conditions);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//add columns to select\n\t\tif( !empty($columns) )\n\t\t\t$this->_query->select($columns);\n\t}", "title": "" }, { "docid": "f1eeea4a6707671e18515cb0650bea23", "score": "0.5166888", "text": "protected function get_from_join_snippet() {\n\n\t\treturn \" FROM {$this->wpdb->posts} p\n\t JOIN {$this->wpdb->prefix}icl_translations t\n\t\t\t\t\tON p.ID = t.element_id\n\t\t\t\t\t\tAND t.element_type = CONCAT('post_', p.post_type ) \";\n\t}", "title": "" }, { "docid": "879029d730e53f4f82ea9c541132d790", "score": "0.51621485", "text": "public function buildJoinSugarQuery(Link2 $link, $sugar_query, $options)\n {\n $linkIsLHS = $link->getSide() == REL_LHS;\n if (!empty($options['reverse'])) {\n $linkIsLHS = !$linkIsLHS;\n }\n\n $startingTable = isset($options['myAlias']) ? $options['myAlias'] : '';\n if (empty($startingTable)) {\n $startingTable = $linkIsLHS ? $this->def['lhs_table'] : $this->def['rhs_table'];\n }\n $startingKey = $linkIsLHS ? $this->def['lhs_key'] : $this->def['rhs_key'];\n\n $targetTable = $linkIsLHS ? $this->def['rhs_table'] : $this->def['lhs_table'];\n\n $targetKey = $linkIsLHS ? $this->def['rhs_key'] : $this->def['lhs_key'];\n $targetModule = $linkIsLHS ? $this->def['rhs_module'] : $this->def['lhs_module'];\n\n $join_type= isset($options['joinType']) ? $options['joinType'] : 'INNER';\n\n $joinParams = array(\n 'joinType' => $join_type,\n 'bean' => BeanFactory::getDefinition($targetModule),\n );\n $jta = $targetTable;\n if (!empty($options['joinTableAlias'])) {\n $jta = $joinParams['alias'] = $options['joinTableAlias'];\n }\n\n $join = $sugar_query->joinTable($targetTable, $joinParams);\n $join->on()->equalsField(\"{$startingTable}.{$startingKey}\", \"{$jta}.{$targetKey}\")\n ->equals(\"{$jta}.deleted\", \"0\");\n\n\n if (empty($options['ignoreRole'])) {\n $this->buildSugarQueryRoleWhere($sugar_query, $jta);\n }\n\n $this->addCustomToSugarQuery($sugar_query, $options, $linkIsLHS, $jta);\n\n return $sugar_query->join[$jta];\n }", "title": "" }, { "docid": "90b4c4e98f001b6b8973a894d1f53f95", "score": "0.51477724", "text": "function cf_search_join( $join ) {\n global $wpdb;\n if ( (is_search() && is_admin()) || is_page_template('searchresults-catalogo.php') ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' p ON '. $wpdb->posts . '.ID = p.post_id ';\n }\n return $join;\n}", "title": "" }, { "docid": "dc3d571e6fde08bdca0d03067364d90f", "score": "0.5097072", "text": "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) { \n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "title": "" }, { "docid": "dc3d571e6fde08bdca0d03067364d90f", "score": "0.5097072", "text": "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) { \n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "title": "" }, { "docid": "917a33c7e3bfc63ff207d1e684b22ca2", "score": "0.50950366", "text": "function joinContributionFromMembership() {\n $this->_from .= \" LEFT JOIN civicrm_membership_payment pp\nON {$this->_aliases['civicrm_membership']}.id = pp.membership_id\nLEFT JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}\nON pp.contribution_id = {$this->_aliases['civicrm_contribution']}.id\n\";\n }", "title": "" }, { "docid": "4012e2e8ae2ea6f3df26f1149466acf3", "score": "0.5075361", "text": "public static function add_wp_query_join( $join, $wp_query ) {\n\t\tglobal $wpdb;\n\n\t\t$search = $wp_query->get( 'search' );\n\t\tif ( $search && wc_product_sku_enabled() ) {\n\t\t\t$join = self::append_product_sorting_table_join( $join );\n\t\t}\n\n\t\tif ( $wp_query->get( 'low_in_stock' ) ) {\n\t\t\t$join = self::append_product_sorting_table_join( $join );\n\t\t\t$join .= \" LEFT JOIN {$wpdb->postmeta} AS low_stock_amount_meta ON {$wpdb->posts}.ID = low_stock_amount_meta.post_id AND low_stock_amount_meta.meta_key = '_low_stock_amount' \";\n\t\t}\n\n\t\treturn $join;\n\t}", "title": "" }, { "docid": "9c1d30b96fafb9ac0fdfd6d68c9201eb", "score": "0.5072343", "text": "public function joinFeriaRelatedByIdPaisHomenajeado($relationAlias = null, $joinType = Criteria::LEFT_JOIN)\n\t{\n\t\t$tableMap = $this->getTableMap();\n\t\t$relationMap = $tableMap->getRelation('FeriaRelatedByIdPaisHomenajeado');\n\t\t\n\t\t// create a ModelJoin object for this join\n\t\t$join = new ModelJoin();\n\t\t$join->setJoinType($joinType);\n\t\t$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n\t\tif ($previousJoin = $this->getPreviousJoin()) {\n\t\t\t$join->setPreviousJoin($previousJoin);\n\t\t}\n\t\t\n\t\t// add the ModelJoin to the current object\n\t\tif($relationAlias) {\n\t\t\t$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n\t\t\t$this->addJoinObject($join, $relationAlias);\n\t\t} else {\n\t\t\t$this->addJoinObject($join, 'FeriaRelatedByIdPaisHomenajeado');\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "127bbd428c74d9c3826e6e74fb053a93", "score": "0.50640357", "text": "function joinMembershipFromLineItem() {\n $this->_from .= \" INNER JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}\nON ( {$this->_aliases['civicrm_line_item']}.entity_id = {$this->_aliases['civicrm_contribution']}.id\nAND {$this->_aliases['civicrm_line_item']}.entity_table = 'civicrm_contribution')\nLEFT JOIN civicrm_membership_payment pp\nON {$this->_aliases['civicrm_contribution']}.id = pp.contribution_id\nLEFT JOIN civicrm_membership {$this->_aliases['civicrm_membership']}\nON pp.membership_id = {$this->_aliases['civicrm_membership']}.id\n\";\n }", "title": "" }, { "docid": "08c7841feba72840713d9af4e453d597", "score": "0.50553685", "text": "function make_join_str($joins,&$select_params,$_PREFIX='')\n\t{\n\t\t$str_join = \"\";\n\t\t$tbl_last = $select_params['table'];\n\t\tforeach ($joins as $jkey => $jval )\n\t\t{\n\t\t\t/*\t\n\t\t\tif($jval['to']['table']==$jkey)\n\t\t\t\t$str_join = $str_join.\" {$jval['jtype']} join\n\t\t\t\t$_PREFIX$jkey as `$_PREFIX{$jval['to']['table_as']}` on\n\t\t\t\t$_PREFIX{$jval['from']['table']}.{$jval['from']['field']}=\".$_PREFIX.$jkey.'.'.$jval['to']['field'].\" \";\n\t\t\telse\n\t\t\t\t$str_join = $str_join.\" {$jval['jtype']} join\n\t\t\t\t$_PREFIX{$jval['to']['table']} as `$_PREFIX{$jval['to']['table_as']}` on\n\t\t\t\t$_PREFIX{$jval['from']['table']}.{$jval['from']['field']}=$_PREFIX.$jkey.{$jval['to']['field']} \";\n\t\t\t*/\n\t\t\tif($jval['to']['table']==$jkey)\n\t\t\t\t$str_join = $str_join.\" {$jval['jtype']} join\n\t\t\t\t$_PREFIX$jkey as `$_PREFIX{$jval['to']['table_as']}` on\n\t\t\t\t$_PREFIX{$jval['from']['table']}.{$jval['from']['field']}=$_PREFIX{$jval['to']['table_as']}.{$jval['to']['field']} \";\n\t\t\telse\n\t\t\t\t$str_join = $str_join.\" {$jval['jtype']} join\n\t\t\t\t$_PREFIX{$jval['to']['table']} as `$_PREFIX{$jval['to']['table_as']}` on\n\t\t\t\t$_PREFIX{$jval['from']['table']}.{$jval['from']['field']}=$_PREFIX{$jval['to']['table_as']}.{$jval['to']['field']} \";\n\t\t\n\t\t\t\n\t\t\t//$tbl_last = $jval['jtable'];\n\t\t}\n\t\n\t\t//$str_from = $_PREFIX.$select_params['table'].$str_join;\n\t\treturn $str_join;\n\t}", "title": "" }, { "docid": "e9207ddd4b9c3b864ebaeb0a04757e8d", "score": "0.50246704", "text": "private function buildJoinsClause(AphrontDatabaseConnection $conn) {\n $joins = array();\n\n if ($this->paths) {\n $path_table = new DifferentialAffectedPath();\n $joins[] = qsprintf(\n $conn,\n 'JOIN %R paths ON paths.revisionID = r.id',\n $path_table);\n }\n\n if ($this->commitHashes) {\n $joins[] = qsprintf(\n $conn,\n 'JOIN %T hash_rel ON hash_rel.revisionID = r.id',\n ArcanistDifferentialRevisionHash::TABLE_NAME);\n }\n\n if ($this->ccs) {\n $joins[] = qsprintf(\n $conn,\n 'JOIN %T e_ccs ON e_ccs.src = r.phid '.\n 'AND e_ccs.type = %s '.\n 'AND e_ccs.dst in (%Ls)',\n PhabricatorEdgeConfig::TABLE_NAME_EDGE,\n PhabricatorObjectHasSubscriberEdgeType::EDGECONST,\n $this->ccs);\n }\n\n if ($this->reviewers) {\n $joins[] = qsprintf(\n $conn,\n 'LEFT JOIN %T reviewer ON reviewer.revisionPHID = r.phid\n AND reviewer.reviewerStatus != %s\n AND reviewer.reviewerPHID in (%Ls)',\n id(new DifferentialReviewer())->getTableName(),\n DifferentialReviewerStatus::STATUS_RESIGNED,\n $this->reviewers);\n }\n\n if ($this->noReviewers) {\n $joins[] = qsprintf(\n $conn,\n 'LEFT JOIN %T no_reviewer ON no_reviewer.revisionPHID = r.phid\n AND no_reviewer.reviewerStatus != %s',\n id(new DifferentialReviewer())->getTableName(),\n DifferentialReviewerStatus::STATUS_RESIGNED);\n }\n\n if ($this->draftAuthors) {\n $joins[] = qsprintf(\n $conn,\n 'JOIN %T has_draft ON has_draft.srcPHID = r.phid\n AND has_draft.type = %s\n AND has_draft.dstPHID IN (%Ls)',\n PhabricatorEdgeConfig::TABLE_NAME_EDGE,\n PhabricatorObjectHasDraftEdgeType::EDGECONST,\n $this->draftAuthors);\n }\n\n $joins[] = $this->buildJoinClauseParts($conn);\n\n return $this->formatJoinClause($conn, $joins);\n }", "title": "" }, { "docid": "a834ece77271ceb99f527e5bf001d768", "score": "0.50028044", "text": "private function getInnerJoin()\n {\n return \" INNER JOIN {$this->join->tableOn} ON {$this->join->tableColumnOn} = {$this->join->tableColumnJoin}\";\n }", "title": "" }, { "docid": "2b5695a3c1c165f2b37fec342b4ed3ed", "score": "0.50014305", "text": "public function addJoinForFeUsersTable()\n {\n $this->join[] = 'fe_users ON fe_users.tx_events2_organizer=tx_events2_domain_model_event.organizer';\n $this->tables[] = 'fe_users';\n }", "title": "" }, { "docid": "826100e35b4cab81719fbcda13b385f2", "score": "0.49831522", "text": "public function getQueryJoin($asReference = false)\n\t{\n\t\tif ($asReference)\n\t\t{\n\t\t\treturn $this->_queryJoin;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->_queryJoin)\n\t\t\t{\n\t\t\t\treturn clone $this->_queryJoin;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dec5d36e097416871fdc9652413f4d62", "score": "0.49798045", "text": "function joinLineItemFromMembership() {\n // another option is to cache it but I haven't tried to put that code in yet (have used it before for one hour caching\n $this->_from .= \"\nLEFT JOIN (\nSELECT contribution_civireport_direct.id AS contid, line_item_civireport.*\nFROM civicrm_contribution contribution_civireport_direct\nLEFT JOIN civicrm_line_item line_item_civireport\nON (line_item_civireport.line_total > 0 AND line_item_civireport.entity_id = contribution_civireport_direct.id AND line_item_civireport.entity_table = 'civicrm_contribution')\n\nWHERE line_item_civireport.id IS NOT NULL\n\nUNION\n\nSELECT contribution_civireport_direct.id AS contid, line_item_civireport.*\nFROM civicrm_contribution contribution_civireport_direct\nLEFT JOIN civicrm_membership_payment pp ON contribution_civireport_direct.id = pp.contribution_id\nLEFT JOIN civicrm_membership p ON pp.membership_id = p.id\nLEFT JOIN civicrm_line_item line_item_civireport ON (line_item_civireport.line_total > 0 AND line_item_civireport.entity_id = p.id AND line_item_civireport.entity_table = 'civicrm_membership')\nWHERE line_item_civireport.id IS NOT NULL\n) as {$this->_aliases['civicrm_line_item']}\nON {$this->_aliases['civicrm_line_item']}.contid = {$this->_aliases['civicrm_contribution']}.id\n\";\n }", "title": "" }, { "docid": "df1178a70e8cc1d47fb45b4c22ad61d0", "score": "0.49758142", "text": "public function joinCustomers()\n {\n $this->builder->join('customers', 'cus_id', 'bil_customer');\n }", "title": "" }, { "docid": "e266f47acdaff7c69665a44c67efa151", "score": "0.49757078", "text": "public function join($name,$rel_id,$joinType='INNER')\n {\n $index=$this->SelectSyntaxIndex('JOIN');\n \n if (! isset($this->arr[$index])) {\n $this->arr[$index]='';\n }\n \n $this->arr[$index].=\" $joinType JOIN $name ON $rel_id \";\n return $this;\n }", "title": "" }, { "docid": "25f38f23f242f75e0ef38efc7d4e81a3", "score": "0.4973333", "text": "function join_transfer_table(){\n\t\tglobal $db;\n\t\t$sql =\" SELECT t. *, u.name as claimer,l1.loc_name as locfrom ,l2.loc_name as locto \";\n\n\t\t$sql .=\" FROM transfer t\";\n\t\t$sql .=\" inner join users u on u.id=t.tran_by\";\n\t\t$sql .=\" inner join locations l1 on l1.id=t.tran_from\";\n\t\t$sql .=\" inner join locations l2 on l2.id=t.tran_to\";\n\t\t$sql .=\" where cancel_status=0 ORDER BY t.id desc\";\n\t\treturn find_by_sql($sql);\n\n\t}", "title": "" }, { "docid": "89f081c2b09a656d37979d589f657f82", "score": "0.49728334", "text": "protected function performJoin($query = null)\n {\n $query = $query ?: $this->query;\n $table = $query->getModel()->getTable();\n\n // We need to join to the intermediate table on the related model's primary\n // key column with the intermediate table's foreign key for the related\n // model instance. Then we can set the \"where\" for the parent models.\n // $baseTable = $this->related->getTable();\n\n if(!$this->children && !$this->relationKey && !$this->metadata) {\n throw new \\Exception('You do not have any conditions, this would simply return the item in stack');\n }\n\n if($this->children) {\n $query->getModel()->setAlias('r', true);\n $table = $query->getModel()->getTable();\n\n $query->join('content_relations AS '.$childrenHash = $this->getRelationCountHash(), function ($join) use ($childrenHash) {\n $join->on('contents.id', '=', $childrenHash.'.relation_id')\n ->where($childrenHash.'.relation_type_id', content_id('parent-id'));\n })\n ->join('contents AS ' . $table, $table.'.id', '=', $childrenHash.'.content_id');\n }\n\n if($this->relationKey) {\n $joinTo = $this->children ? $childrenHash.'.content_id': $query->getModel()->getTable().'.id';\n\n $query->join('content_relations AS '.$typeHash = $this->getRelationCountHash(), function ($join) use ($joinTo, $typeHash) {\n $join->on($typeHash.'.content_id', '=', $joinTo)\n ->where($typeHash.'.relation_type_id', content_id('content-type'));\n\n if(is_array($this->relationKey)) {\n $join->whereIn($typeHash.'.relation_id', content_ids($this->relationKey));\n }\n else {\n $join->where($typeHash.'.relation_id', content_id($this->relationKey));\n }\n });\n }\n\n if($this->metadata) {\n foreach($this->metadata as $metadata) {\n $query->join('content_meta AS metadata', function($join) use ($metadata, $table) {\n $join->on($table.'.id', '=', 'metadata.content_id')\n ->where('metadata.key', $metadata[0])\n ->where('metadata.value', $metadata[1], $metadata[2]);\n });\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "626c83f76210da56061a9aac307e889d", "score": "0.4949046", "text": "public function join(){\n\t\treturn $this->query(\"\n\t\t\t\t\t\t\tSELECT users.id,users.firstName,users.lastName,users.birthDate,users.adress,users.zipCode,users.phoneNumber,departments.departmentName \n\t\t\t\t\t\t\tFROM \".$this->table.\" INNER JOIN departments ON users.departmentId = departments.id\"\n\t\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "f099bd6f55cdb3817f7e41fe24a27706", "score": "0.49423775", "text": "public function join(string $sql, string $condition = ''): PdoOneQuery\n {\n if ($condition !== '') {\n $sql = \"$sql on $condition\";\n }\n if (strpos($sql, ',') === 0) {\n $sql .= $this->parent->prefixTable . $sql;\n }\n $this->from .= ($sql) ? \" inner join $sql \" : '';\n $this->parent->tables[] = explode(' ', $sql)[0];\n return $this;\n }", "title": "" }, { "docid": "8c351c47ba72014813c2a1cea94dfa91", "score": "0.49404603", "text": "public function joinBookings()\n {\n $this->builder->join('bookings', 'book_id', '=', 'bil_booking');\n }", "title": "" }, { "docid": "7dba21dc33cc52a1c802f203f28e71c6", "score": "0.49391416", "text": "public function joinDetailTransaksi($relationAlias = null, $joinType = Criteria::LEFT_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('DetailTransaksi');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'DetailTransaksi');\n }\n\n return $this;\n }", "title": "" }, { "docid": "2867274952bc9922255b9917fea9f186", "score": "0.49389243", "text": "function cf_search_join($join)\n{\n global $wpdb;\n if (is_search()) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n return $join;\n}", "title": "" }, { "docid": "186995b4433e76faf63c2ce9e208a630", "score": "0.4933129", "text": "function get_competency_join_by_id() {\t\n $sql = \"SELECT * \n FROM evs_database.evs_competency\n LEFT JOIN evs_database.evs_key_component\n ON cpn_id = kcp_cpn_id\n LEFT JOIN evs_database.evs_expected_behavior\n\t\t\t\tON ept_kcp_id = kcp_id\n\t\t\t\twhere ept_pos_id = ?\n\t\t\t\torder by cpn_competency_detail_en ASC\";\n $query = $this->db->query($sql, array($this->ept_pos_id));\n return $query;\n }", "title": "" }, { "docid": "283e973b4c94e54d5e9376b41cdc0055", "score": "0.4929343", "text": "private function __join_tr_pegawai_skpd_ref_skpd($table_pegawai_skpd) {\n $table_skpd = $this->get_schema_name(\"ref_skpd\");\n $this->db->join($table_skpd, $table_skpd . \".id_skpd = \" . $table_pegawai_skpd . \".id_skpd\");\n\n $this->db->select(\n $table_skpd . \".id_skpd, \" .\n $table_skpd . \".nama_skpd, \" .\n $table_skpd . \".abbr_skpd, \" .\n $table_skpd . \".alamat_skpd, \" .\n $table_skpd . \".kodepos, \" .\n $table_skpd . \".no_telp, \" .\n $table_skpd . \".email as email_skpd, \" .\n $table_skpd . \".website as website_skpd \", FALSE\n );\n }", "title": "" }, { "docid": "8245cf6313b53282d3084a2313bb05a7", "score": "0.4919495", "text": "public function joinResources()\n {\n $this->builder->join('resources', 'rs_id', 'book_resource');\n }", "title": "" }, { "docid": "0f2d45a75f214bc633dd2c4b8f7f63f2", "score": "0.4918976", "text": "public function joinSocioAlquiler($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n\t{\n\t\t$tableMap = $this->getTableMap();\n\t\t$relationMap = $tableMap->getRelation('SocioAlquiler');\n\n\t\t// create a ModelJoin object for this join\n\t\t$join = new ModelJoin();\n\t\t$join->setJoinType($joinType);\n\t\t$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n\t\tif ($previousJoin = $this->getPreviousJoin()) {\n\t\t\t$join->setPreviousJoin($previousJoin);\n\t\t}\n\n\t\t// add the ModelJoin to the current object\n\t\tif($relationAlias) {\n\t\t\t$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n\t\t\t$this->addJoinObject($join, $relationAlias);\n\t\t} else {\n\t\t\t$this->addJoinObject($join, 'SocioAlquiler');\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "67c0f2958f6173f315d464d02ce7d006", "score": "0.49014288", "text": "private function joinTableManipulation()\n {\n return new JoinTable($this->builder, $this->table, $this->options, $this->statement);\n }", "title": "" }, { "docid": "bccc2a8b14acddf1f6b7b55b6958f46a", "score": "0.489944", "text": "public function joinSumberDanaSekolah($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('SumberDanaSekolah');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'SumberDanaSekolah');\n }\n\n return $this;\n }", "title": "" }, { "docid": "8f3ae94a8f5cb6af33989bab18dd5b66", "score": "0.48963276", "text": "public function join(string $table1, string $table2, string $fk)\n {\n $this->joinSql .= \"JOIN {$table2} ON {$table1}.{$fk} = {$table2}.id \";\n\n return $this;\n }", "title": "" }, { "docid": "5d92a096ceccbd2e5d86af0bd951a163", "score": "0.48913425", "text": "private function joinRelations(ResourceInterface $resource, QueryBuilder $queryBuilder)\n {\n $classMetaData = $queryBuilder->getEntityManager()->getClassMetadata($resource->getEntityClass());\n\n foreach ($classMetaData->getAssociationNames() as $i => $association) {\n $mapping = $classMetaData->associationMappings[$association];\n if (ClassMetadataInfo::FETCH_EAGER === $mapping['fetch']) {\n $queryBuilder->leftJoin('o.'.$association, 'a'.$i);\n $queryBuilder->addSelect('a'.$i);\n }\n }\n }", "title": "" }, { "docid": "1c96e3338b63bb23c359ec109320998b", "score": "0.4880505", "text": "public function join($tableObj, $tableAdd, $id=-1){\n\t /*\n\t tableObj - подчиненная таблица\n\t tableAdd - основная\n\t */\n\t $tableLink = $tableObj.'_'.$tableAdd;\n\t $thisName = trim($tableAdd, 's');\n\t $modelName = trim($tableObj, 's');\n\t $query = \"SELECT obj.*, lnk.\".$modelName.\"_id \"\n .\"FROM $tableLink lnk JOIN $tableAdd obj \"\n .\"ON (obj.id = lnk.\".$thisName.\"_id)\";\n\t if ($id >= 0){\n\t $query .= \" WHERE $modelName\".\"_id = $id\";\n\t }\n\t return $this->object($this->query($query));\n\t}", "title": "" }, { "docid": "2fa3ff28fd5ae13e64b36c6bdd76f9a9", "score": "0.48737016", "text": "function join($table, $key, $type) {\n $addition = $type . ' JOIN ' . $table . ' ON ' . $key . ' ';\n $this->query .= $addition;\n }", "title": "" }, { "docid": "75aeb87ff1f70be80f8245665bfc423d", "score": "0.48719373", "text": "private function get_join_sql() {\n\n if (!is_array($this->_state['join'])) {\n return '';\n }\n\n $sql = '';\n\n foreach ($this->_state['join'] as $joins) {\n foreach ($joins as $join) {\n $sql .= $join . ' ';\n } // end foreach joins at this level\n } // end foreach of this level of joins\n\n return $sql;\n\n }", "title": "" }, { "docid": "ae37c4ee06ee38cf8284a505bc61119d", "score": "0.48695257", "text": "public function join($join)\n {\n if(is_array($join[0]))\n {\n // example : $options['join'] = $options['join'] = array(\n // array('user_files', 'users.user_id', 'user_files.user_id'),\n // array('user_payment', 'users.username', 'user_payment.username')\n // );\n // result : LEFT JOIN aws_user_files ON aws_users.user_id = aws_user_files.user_id LEFT JOIN aws_user_payment ON aws_users.username = aws_user_payment.username \n \n $joins = $join;\n \n $sql = '';\n \n foreach ($joins as $join)\n {\n $joined_table = string(DB_PREFIX. $join[0]);\n\n $main_table_column = string(DB_PREFIX . $join[1]);\n\n $joined_table_column = string(DB_PREFIX . $join[2]);\n\n $join_type = isset($join[3]) ? string($join[3]) : 'LEFT JOIN';\n\n $sql .= \" \" . $join_type . \" \" . $joined_table . ' ON ' . $main_table_column . ' = ' . $joined_table_column. \" \"; \n \n }\n \n }\n else\n {\n // example : $options['join'] = array('user_files', 'users.user_id', 'user_files.user_id');\n \n // result : aws_users LEFT JOIN aws_user_files ON aws_users.user_id = aws_user_files.user_id\n \n $joined_table = string(DB_PREFIX. $join[0]);\n \n $main_table_column = string(DB_PREFIX . $join[1]);\n \n $joined_table_column = string(DB_PREFIX . $join[2]);\n \n $join_type = isset($join[3]) ? string($join[3]) : 'LEFT JOIN';\n \n $sql = \" \" . $join_type . \" \" . $joined_table . ' ON ' . $main_table_column . ' = ' . $joined_table_column. \" \";\n }\n return $sql;\n }", "title": "" }, { "docid": "d66f5f57e77f8f9a712bbb4a0bcf60ee", "score": "0.4867784", "text": "public function joinCargoconsulta($relationAlias = null, $joinType = Criteria::LEFT_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Cargoconsulta');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Cargoconsulta');\n }\n\n return $this;\n }", "title": "" }, { "docid": "6b3d29f8f58273582fa43877acfab466", "score": "0.48589665", "text": "public function joinPesquisa($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n\t{\n\t\t$tableMap = $this->getTableMap();\n\t\t$relationMap = $tableMap->getRelation('Pesquisa');\n\n\t\t// create a ModelJoin object for this join\n\t\t$join = new ModelJoin();\n\t\t$join->setJoinType($joinType);\n\t\t$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n\t\tif ($previousJoin = $this->getPreviousJoin()) {\n\t\t\t$join->setPreviousJoin($previousJoin);\n\t\t}\n\n\t\t// add the ModelJoin to the current object\n\t\tif($relationAlias) {\n\t\t\t$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n\t\t\t$this->addJoinObject($join, $relationAlias);\n\t\t} else {\n\t\t\t$this->addJoinObject($join, 'Pesquisa');\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2e2f622b03344829b45404ac7e651439", "score": "0.48577854", "text": "public function set_join($type, $table, $source, $dest, $priority) {\n\n $this->_state['join'][$priority][$table] = strtoupper($type) . ' JOIN ' . $table . ' ON ' . $source . '=' . $dest;\n\n }", "title": "" }, { "docid": "c5231c874fbda70fb594dd79c9fcdc30", "score": "0.4853784", "text": "public function join()\r\n {\r\n $args = func_get_args();\r\n switch(count($args))\r\n {\r\n case 0:\r\n throw new Exception('sfDoctrineFinder::join() expects at least one argument');\r\n break;\r\n case 1:\r\n case 2:\r\n // $articleFinder->join('Comment')\r\n // $articleFinder->join('Comment co')\r\n // $articleFinder->join('Category', 'RIGHT JOIN')\r\n // $articleFinder->join('Category ca', 'RIGHT JOIN')\r\n list($relatedClass, $alias, $isTrueAlias) = $this->getClassAndAliasForDoctrine($args[0]);\r\n $relation = $this->findRelation($relatedClass);\r\n $operator = isset($args[1]) ? trim(str_replace('join', '', strtolower($args[1]))) : 'inner';\r\n $startClass = $this->getAlias($relation->offsetGet('localTable')->getClassnameToReturn());\r\n break;\r\n case 3:\r\n // $articleFinder->join('Article.CategoryId', 'Category.Id', 'RIGHT JOIN')\r\n // This is mostly for compatibility with Propel\r\n list($relation, $direct) = $this->findRelationFromColumns($args[0], $args[1]);\r\n $operator = trim(str_replace('join', '', strtolower($args[2])));\r\n $relatedClass = $relation->getTable()->getClassnameToReturn();\r\n if($direct)\r\n {\r\n $startClass = substr($args[0], 0, strpos($args[0], '.'));\r\n }\r\n else\r\n {\r\n $startClass = substr($args[1], 0, strpos($args[1], '.'));\r\n }\r\n $alias = '';\r\n break;\r\n case 4:\r\n // $articleFinder->join('Category cat', 'Article.CategoryId', 'cat.Id', 'RIGHT JOIN')\r\n // This is mostly for compatibility with Propel\r\n list($relatedClass, $alias) = $this->getClassAndAlias($args[0]);\r\n $col1 = str_replace($alias.'.', $relatedClass.'.', $args[1]);\r\n $col2 = str_replace($alias.'.', $relatedClass.'.', $args[2]);\r\n list($relation, $direct) = $this->findRelationFromColumns($col1, $col2);\r\n $operator = trim(str_replace('join', '', strtolower($args[3])));\r\n if($direct)\r\n {\r\n $startClass = substr($args[1], 0, strpos($args[1], '.'));\r\n }\r\n else\r\n {\r\n $startClass = substr($args[2], 0, strpos($args[2], '.'));\r\n }\r\n }\r\n $method = $operator . 'Join';\r\n $relationClass = $relation->getTable()->getClassnameToReturn();\r\n $this->query->$method($startClass.'.'.$relation->getAlias().' '.$alias);\r\n if($relationClass == $relatedClass)\r\n {\r\n $this->addAlias($relationClass, $alias);\r\n }\r\n else\r\n {\r\n // $relatedClass is in fact the relation name, not the foreign class name\r\n $this->addAlias($relatedClass, $alias);\r\n }\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "82467fee3bdd16ff1227103e5786d391", "score": "0.48440573", "text": "function add_label_join()\n\t{\n\t\t$this->db->join($this->_prefix . 'Labels', 'LabelsId = LabelId');\n\t\t$this->db->join($this->_prefix . 'Posts', 'PostId = PostsId');\n\t}", "title": "" }, { "docid": "f6ef93bca40f8b998fab7a2fa46a2916", "score": "0.48385352", "text": "function __getRLQueryFromJoins($query, $meta, $relatedModule = '') {\n\tif ($meta->getEntityName()=='Emails') {\n\t\t$mod = CRMEntity::getInstance('Emails');\n\t\t// this query is non-standard, I try to fix it a bit to get it working\n\t\t$chgFrom = 'from vtiger_activity, vtiger_seactivityrel, vtiger_contactdetails, vtiger_users, vtiger_crmentity';\n\t\t$chgTo = 'from vtiger_activity\n\t\t\t\t\tinner join '.$mod->crmentityTable.' as vtiger_crmentity on vtiger_crmentity.crmid = vtiger_activity.activityid\n\t\t\t\t\tleft join vtiger_seactivityrel on vtiger_seactivityrel.activityid = vtiger_activity.activityid\n\t\t\t\t\tleft join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid\n\t\t\t\t\tleft join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_seactivityrel.crmid ';\n\t\t$query = str_replace($chgFrom, $chgTo, $query);\n\t}\n\t$etable = $meta->getEntityBaseTable();\n\t$eindex = $meta->getIdColumn();\n\t$posFrom = stripos($query, ' from ');\n\tforeach ($meta->getEntityTableIndexList() as $tbl => $fld) {\n\t\tif ($tbl=='vtiger_crmentity' || $tbl==$etable) {\n\t\t\tcontinue; // these are always in the query\n\t\t}\n\t\tif (stripos($query, \"join $tbl\")>0) {\n\t\t\tcontinue; // it is already joined\n\t\t}\n\t\tif (stripos($query, $tbl)>$posFrom) {\n\t\t\tcontinue; // the table is present after FROM\n\t\t}\n\t\tif ($tbl=='vtiger_ticketcomments' || $tbl=='vtiger_faqcomments' || ($relatedModule=='ProductComponent' && $tbl='vtiger_seproductsrel')) {\n\t\t\tcontinue; // these are obtained through comments\n\t\t}\n\t\t$secQuery = \" left join $tbl on $tbl.$fld = $etable.$eindex \";\n\t\t$query = appendFromClauseToQuery($query, $secQuery);\n\t}\n\treturn $query;\n}", "title": "" }, { "docid": "7b55956a284e70f72484739e63bd25b2", "score": "0.4814332", "text": "protected function getJoin()\n\t{\n\t\t$sql = '';\n\n\t\tforeach ($this->parts['join'] as $table => $join)\n\t\t{\n\t\t\t$sql .= \"\\t\";\n\n\t\t\tif ($join['type'])\n\t\t\t{\n\t\t\t\t$sql .= $join['type'] . ' ';\n\t\t\t}\n\n\t\t\t$sql .= 'JOIN ' . $table . ' ON (' . implode(\"\\n\", $join['on']) . ')' . \"\\n\";\n\t\t}\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "f97b6287989247a1df7f13b4638952e0", "score": "0.48137036", "text": "function joinContributionFromContact() {\n if(empty($this->_aliases['civicrm_contact'])){\n $this->_aliases['civicrm_contact'] = 'civireport_contact';\n }\n $this->_from .= \" LEFT JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}\n ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_contribution']}.contact_id\n AND {$this->_aliases['civicrm_contribution']}.is_test = 0\n \";\n }", "title": "" }, { "docid": "39663c9323eff298140ccaab35c336a4", "score": "0.48125625", "text": "public function actionJoin($id,$id_pers=NULL){\n\t\t$model=$this->loadModel($id);\n\t\t$model->scenario='joinPers';\n\t\t$id_pers=(!empty($id_pers))?$id_pers:Yii::app()->user->id_pers;\n\t\t$pers=Personnel::model()->findByPk($id_pers);\n\t\t$model->join($id_pers);\n\n\t\tif($model->save()){\n\t\t\t$mess=new TasksActions();\n\t\t\t$mess->type=1;\n\t\t\t$mess->ttext='Подписан: '.$pers->fio_full();\n\t\t\t$mess->id_task=$model->id;\n\t\t\t$mess->save();\n\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t\t\t\n\t}", "title": "" }, { "docid": "9482535a397e304a4dacb8f0ddac5ba2", "score": "0.48117313", "text": "function joinContributionFromParticipant() {\n $this->_from .= \" LEFT JOIN civicrm_participant_payment pp\nON {$this->_aliases['civicrm_participant']}.id = pp.participant_id\nLEFT JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}\nON pp.contribution_id = {$this->_aliases['civicrm_contribution']}.id\n\";\n }", "title": "" }, { "docid": "011013001b85ffcf668d7384f985b917", "score": "0.48063764", "text": "public function get_adjacent_post_join( $join_sql, $in_same_cat, $excluded_categories ) {\n\n\t\tglobal $wpdb, $post;\n\n\t\tif ( ! array_key_exists( $post->post_type, $this->post_types ) ) {\n\t\t\treturn $join_sql;\n\t\t}\n\n\t\tif ( $in_same_cat || ! empty( $excluded_categories ) ) {\n\t\t\t$tax = $this->post_types[ $post->post_type ]['taxonomy'];\n\t\t\t$join = \" INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id\";\n\t\t\t$current_cat = get_query_var( $tax );\n\t\t\tif ( $in_same_cat && ! empty( $current_cat ) ) {\n\t\t\t\t$term_data = get_term_by( 'slug', $current_cat, $tax );\n\t\t\t\t$cat_array = wp_get_object_terms( $post->ID, $tax, array( 'fields' => 'ids' ) );\n\t\t\t\t$join .= \" AND tt.taxonomy = '\" . $tax . \"' AND tt.term_id = \" . absint( $term_data->term_id );\n\t\t\t}\n\n\t\t\treturn $join;\n\n\t\t}\n\n\t\treturn $join_sql;\n\n\t}", "title": "" }, { "docid": "6c8257df66cb3a560f42b086bb38a3aa", "score": "0.47992754", "text": "public function useSucursalQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinSucursal($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'Sucursal', 'SucursalQuery');\n }", "title": "" }, { "docid": "6c8257df66cb3a560f42b086bb38a3aa", "score": "0.47992754", "text": "public function useSucursalQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinSucursal($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'Sucursal', 'SucursalQuery');\n }", "title": "" }, { "docid": "98fc4ce8a942e3d1ce0a04d3648365f6", "score": "0.4783594", "text": "public function setQueryJoin(JDatabaseQuery $query)\n\t{\n\t\t$this->_queryJoin = $query;\n\t}", "title": "" }, { "docid": "9d1e7f95fff5a57c8ed2ae0e4a1b9c58", "score": "0.4778418", "text": "public function useDetailTransaksiQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)\n {\n return $this\n ->joinDetailTransaksi($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'DetailTransaksi', 'DetailTransaksiQuery');\n }", "title": "" }, { "docid": "bf9f2786cf4a04792d4f134b6099ee0a", "score": "0.47729093", "text": "public function AddJoin($table, $joinType = JoinType::Left)\n {\n $this->on = '';\n\n if ($joinType == JoinType::Inner)\n $this->Tablename .= ' INNER JOIN ' . trim($table);\n if ($joinType == JoinType::Left)\n $this->Tablename .= ' LEFT JOIN ' . trim($table);\n if ($joinType == JoinType::Right)\n $this->Tablename .= ' RIGHT JOIN ' . trim($table);\n if ($joinType == JoinType::Full)\n $this->Tablename .= ' FULL JOIN ' . trim($table);\n }", "title": "" }, { "docid": "f879dce3404bf586be9b7129f742a3bb", "score": "0.47687387", "text": "private static function _prepare_join_list() {\n\n $_join = '';\n\n // Add where statements to query if exists.\n if (!is_null(static::$_join) and !empty(static::$_join)) {\n\n // Enable logical operators only if\n // multiple where fields exists.\n if (count(static::$_join) <= 1) {\n static::$_logical_opt = '';\n }\n\n // Generate columns values for prepare statement.\n $_prepare_join_list = implode(' ' . static::$_logical_opt . ' ', array_map(function($_x) {\n return $_x;\n }, static::$_join[2]));\n\n // Append where statement.\n $_join = ' ' . strtoupper(static::$_join[0]) . ' JOIN ' . static::$_join[1] . ' ON ' . $_prepare_join_list;\n }\n\n return $_join;\n\n }", "title": "" }, { "docid": "049c4a10bce15daa8e6d942023451247", "score": "0.4757928", "text": "public function joinSeccion($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Seccion');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Seccion');\n }\n\n return $this;\n }", "title": "" }, { "docid": "2fa671d5505a7ac3d03ac61f40d80f01", "score": "0.47555298", "text": "function get_join($tableFrom, $tableTo, $joinCond, $where = [], $select = null, $groupBy = null, $order_col = null, $order_by = 'desc', $limit = null, $limit_offset = null, $where_in = null)\n {\n $ci =& get_instance();\n\n if (!empty($tableFrom) && !empty($tableTo) && !empty($joinCond)) {\n\n // get all query\n if (!empty($select)) {\n $ci->db->select($select);\n }\n\n $ci->db->from($tableFrom);\n\n if (!empty($tableTo) && !empty($joinCond)) {\n if (is_array($tableTo) && is_array($tableTo)) {\n foreach ($tableTo as $_key => $to_value) {\n $ci->db->join($to_value, $joinCond[$_key]);\n }\n } else {\n $ci->db->join($tableTo, $joinCond);\n }\n }\n\n // get where\n if (!empty($where)) {\n $ci->db->where($where);\n }\n\n //get where in\n if (!empty($where_in)) {\n if (is_array($where_in)) {\n foreach ($where_in as $value) {\n $ci->db->where_in($value[0], $value[1]);\n }\n }\n }\n\n // get group by\n if (!empty($groupBy)) {\n $ci->db->group_by($groupBy);\n }\n\n // get order by\n if (!empty($order_col) && !empty($order_by)) {\n $ci->db->order_by($order_col, $order_by);\n }\n\n // get limit\n if (!empty($limit) && !empty($limit_offset)) {\n $ci->db->limit($limit_offset, $limit);\n } elseif (!empty($limit)) {\n $ci->db->limit($limit);\n }\n\n // get query\n $query = $ci->db->get();\n return $query->result();\n\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a94adce4ae94df167fbb08ab75a89019", "score": "0.47545877", "text": "function get_competency_join() {\t\n $sql = \"SELECT * \n FROM evs_database.evs_competency\n LEFT JOIN evs_database.evs_key_component\n ON cpn_id = kcp_cpn_id\n LEFT JOIN evs_database.evs_expected_behavior\n\t\t\t\tON ept_kcp_id = kcp_id\n\t\t\t\torder by cpn_id\";\n $query = $this->db->query($sql);\n return $query;\n }", "title": "" }, { "docid": "de06a91f38780a2766391cd79d6d188b", "score": "0.47531435", "text": "function join($table, $field = null, $alias = null) {\n\t\t$From = $this->R->leftJoin($table, null, $alias);\n\t\t$on = $this.'.'.$this->Table->getPrimary().' = '.$From.'.'.$field;\n\t\t$From->addOn( $on );\n\t\t//$this->R->doGroupBy = true; todo\n\t\treturn $this->Froms[$alias] = $From;\n\t}", "title": "" }, { "docid": "84f093ff0b995e8655386ea552b5d629", "score": "0.4726767", "text": "public function addJoin(File_Therion_Join $join)\n {\n $this->_joins[] = $join;\n }", "title": "" }, { "docid": "69e38e99601cb92ba8f530665babb70f", "score": "0.47250217", "text": "public function join($table, $fk, $type = NULL)\n\t{\n\t\t$this->joins[] = array($table, $fk, $type);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "81ac74671c83de4c4020c527825b651a", "score": "0.47140077", "text": "public function joinName()\n {\n if (!empty($this->options['alias'])) {\n return $this->options['alias'];\n }\n return $this->table;\n }", "title": "" }, { "docid": "87f4f8bba33353bd6ecd49c2e1f3380f", "score": "0.4709645", "text": "public function join($table, $fk, $type = null) {\n $this->joins[] = [$table, $fk, $type];\n $this->db->join($table, $fk, $type);\n\n return $this;\n }", "title": "" }, { "docid": "3e7e3754aee23ebdf18107d9869dd7d7", "score": "0.47075126", "text": "function joinActivityTargetFromActivity() {\n if($this->isActivityContact()) {\n $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');\n $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts);\n $this->_from .= \"\n LEFT JOIN civicrm_activity_contact civicrm_activity_target\n ON {$this->_aliases['civicrm_activity']}.id = civicrm_activity_target.activity_id\n AND civicrm_activity_target.record_type_id = {$targetID}\n LEFT JOIN civicrm_contact {$this->_aliases['target_civicrm_contact']}\n ON civicrm_activity_target.contact_id = {$this->_aliases['target_civicrm_contact']}.id\n \";\n }\n else {\n $this->_from .= \"\n LEFT JOIN civicrm_activity_target\n ON {$this->_aliases['civicrm_activity']}.id = civicrm_activity_target.activity_id\n LEFT JOIN civicrm_contact {$this->_aliases['target_civicrm_contact']}\n ON civicrm_activity_target.target_contact_id = {$this->_aliases['target_civicrm_contact']}.id\n \";\n }\n }", "title": "" }, { "docid": "0d663d43cf650d0c6804b3f8dd11a986", "score": "0.47068065", "text": "function select_join()\r\n\t{\r\n\t\t$this->delim = \"\";\r\n\t\t\r\n\t\t$final=array();\r\n\r\n\t\t$field_flague = false;\r\n\t\t$table_flague = false;\r\n\t\t\r\n\t\t$final_fields = \"\";\r\n\t\t$final_tables = \"\";\r\n\t\t\r\n\t\tforeach ($this->join_tables as $table => $fields)\r\n\t\t\t{\r\n\t\t\tforeach($fields as $field)\r\n\t\t\t\t{\r\n\t\t\t\tif ($field_flague)\r\n\t\t\t\t\t$final_fields .= \" , \";\r\n\t\t\t\t$final_fields .= \" \" . $table . \".\" . $field . \" \";\r\n\r\n\t\t\t\t$field_flague = true;\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\tif ($table_flague)\r\n\t\t\t\t\t$final_tables .= \" , \";\r\n\t\t\t\t$final_tables .= \" `\" . $table . \"` \";\r\n\r\n\t\t\t$table_flague = true;\r\n\t\t\t}\r\n\r\n\t\t$this->query = \"SELECT \" . $final_fields . \" FROM \" . $final_tables;\r\n\r\n\t\tif (is_array($this->condition))\r\n\t\t\t$final_cond = $this->makeCondition($this->condition , \"\");\r\n\t\telseif ($this->condition)\r\n\t\t\t$final_cond = \"WHERE \" . $this->condition;\r\n\r\n\t\t$this->query .= $final_cond;\r\n\t\t\r\n\t\t$this->order_func();\r\n\t\t\r\n\t\t$result = $this->db_query();\r\n\t\tif ($result)\r\n\t\t\t{\r\n\t\t\twhile ($top = mysql_fetch_array($result, MYSQL_ASSOC))\r\n\t\t\t\tarray_push($final , $top);\r\n\r\n\t\t\treturn $final;\r\n\t\t\t}\r\n\t}", "title": "" }, { "docid": "c212ef2000fc11f117ff4fe9833bb1ce", "score": "0.47063193", "text": "public function joinSekolah($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Sekolah');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Sekolah');\n }\n\n return $this;\n }", "title": "" }, { "docid": "c212ef2000fc11f117ff4fe9833bb1ce", "score": "0.47063193", "text": "public function joinSekolah($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Sekolah');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Sekolah');\n }\n\n return $this;\n }", "title": "" } ]
58752f2b5008d1228d7d557f0fd3fe8a
/ Naudoti floor funkcija Paduodant 26 valandas resultatas turi buti 1 diena(u) ir 2 valandos(u)
[ { "docid": "b4ac69546a33a7eb405bfe0f5c86ee38", "score": "0.62161833", "text": "function kiekLaiko($valandos)\n{\n $dienos = floor($valandos / 24);\n $val = $dienos * 24;\n echo $dienos . ' dienos(u) ir ' .\n ($valandos - $val) . ' valandos(u)';\n}", "title": "" } ]
[ { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "c85e55139b3796c816273383988e66cb", "score": "0.5489116", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhalaman = ceil($jmldata/$batas);\r\nreturn $jmlhalaman;\r\n}", "title": "" }, { "docid": "14d9adb35850b22433d870f84cf3e378", "score": "0.54867125", "text": "public function Kolom($jumlah){\n $digitpertama = NULL;\n $digitkedua = NULL;\n $digitketiga = NULL;\n $jumlahdigit2 = NULL;\n $huruf1 = NULL;\n $huruf2 = NULL;\n $huruf3 = NULL;\n $jumlahdigit = floor($jumlah / 26);\n $digitketiga = $jumlah % 26;\n if($jumlahdigit > 26 && $jumlah != 702){ //3 DIGIT\n $jumlahdigit2 = $jumlahdigit / 26;\n if ($digitketiga != 0){\n $digitkedua = $jumlahdigit % 26;\n $digitpertama = floor($jumlahdigit2);\n } else {\n $digitkedua = ($jumlahdigit % 26)-1;\n if(floor($jumlahdigit2) == 1){\n $digitpertama = floor($jumlahdigit2);\n } else {\n $digitpertama = floor($jumlahdigit2)-1;\n }\n $digitketiga = 26;\n }\n if($digitkedua == 0){\n $digitkedua = 26;\n }\n $huruf1 = $this->AngkaToChar($digitpertama);\n $huruf2 = $this->AngkaToChar($digitkedua);\n $huruf3 = $this->AngkaToChar($digitketiga);\n return $huruf1.$huruf2.$huruf3;\n } else { //2 DIGIT\n if($digitketiga != 0){\n if ($jumlahdigit != 0){\n $digitpertama = $jumlahdigit;\n } else {\n $digitpertama = NULL;\n }\n $digitkedua = $digitketiga;\n } else {\n $digitpertama = $jumlahdigit-1;\n $digitkedua = 26;\n $digitketiga = 26;\n }\n if($digitkedua == 0){\n $digitkedua = 26;\n } \n $huruf1 = $this->AngkaToChar($digitpertama);\n $huruf2 = $this->AngkaToChar($digitkedua);\n return $huruf1.$huruf2;\n }\n}", "title": "" }, { "docid": "367676932e906a9fad2a078934f9aa74", "score": "0.5485", "text": "function jumlahHalaman($jmldata, $batas){\r\n$jmlhal = ceil($jmldata/$batas);\r\nreturn $jmlhal;\r\n}", "title": "" }, { "docid": "727bd2c398405518a67875f39f5c2156", "score": "0.5449459", "text": "function konversi_huruf($kkm_value, $n,$show='predikat'){\n $predikat\t= 0;\n $sikap\t\t= 0;\n $sikap_full\t= 0;\n $b = predikat($kkm_value,'b') + 1;\n $c = predikat($kkm_value,'c') + 1;\n $d = predikat($kkm_value,'d') - 1;\n \n if($n == 0){\n $predikat \t= '-';\n $sikap\t\t= '-';\n $sikap_full\t= '-';\n } elseif($n >= $b){//$settings->a_min){ //86\n $predikat \t= 'A';\n $sikap\t\t= 'SB';\n $sikap_full\t= 'Sangat Baik';\n } elseif($n >= $c){ //71\n $predikat \t= 'B';\n $sikap\t\t= 'B';\n $sikap_full\t= 'Baik';\n } elseif($n >= $d){ //56\n $predikat \t= 'C';\n $sikap\t\t= 'C';\n $sikap_full\t= 'Cukup';\n } elseif($n < $d){ //56\n $predikat \t= 'D';\n $sikap\t\t= 'K';\n $sikap_full\t= 'Kurang';\n }\n if($show == 'predikat'){\n $html = $predikat;\n } elseif($show == 'sikap'){\n $html = $sikap;\n } elseif($show == 'sikap_full'){\n $html = $sikap_full;\n } else {\n $html = 'Unknow';\n }\n return $html;\n }", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5436126", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "951614b46817ccebadabb4cd9ed8bf48", "score": "0.54074925", "text": "function millesimes_suivi(){\r\n\t$result = mysql_query(\"SHOW COLUMNS FROM gt_sx_saisie\" );\r\n\t$prem_s =2099; $dernier = 0;\r\n\twhile ($champ = mysql_fetch_assoc($result)) {\r\n\t\t$annee = substr($champ['Field'], -4); \r\n\t\tif(is_numeric($annee)){\r\n\t\t\t$prem_s \t= ($prem_s > $annee) ? $annee+1 : $prem_s;\r\n\t\t\t$dernier\t= ($dernier < $annee) ? $annee : $dernier;\r\n\t\t}\r\n\t}\r\n\treturn array($prem_s, $dernier);\r\n}", "title": "" }, { "docid": "173ddce2f8d4098bb68bbf67c45fe816", "score": "0.53666323", "text": "function numtoletras($xcifra)\n{\n $xarray = array(0 => \"Cero\",\n 1 => \"UN\", \"DOS\", \"TRES\", \"CUATRO\", \"CINCO\", \"SEIS\", \"SIETE\", \"OCHO\", \"NUEVE\",\n \"DIEZ\", \"ONCE\", \"DOCE\", \"TRECE\", \"CATORCE\", \"QUINCE\", \"DIECISEIS\", \"DIECISIETE\", \"DIECIOCHO\", \"DIECINUEVE\",\n \"VEINTI\", 30 => \"TREINTA\", 40 => \"CUARENTA\", 50 => \"CINCUENTA\", 60 => \"SESENTA\", 70 => \"SETENTA\", 80 => \"OCHENTA\", 90 => \"NOVENTA\",\n 100 => \"CIENTO\", 200 => \"DOSCIENTOS\", 300 => \"TRESCIENTOS\", 400 => \"CUATROCIENTOS\", 500 => \"QUINIENTOS\", 600 => \"SEISCIENTOS\", 700 => \"SETECIENTOS\", 800 => \"OCHOCIENTOS\", 900 => \"NOVECIENTOS\"\n );\n//\n $xcifra = trim($xcifra);\n $xlength = strlen($xcifra);\n $xpos_punto = strpos($xcifra, \".\");\n $xaux_int = $xcifra;\n $xdecimales = \"00\";\n if (!($xpos_punto === false)) {\n if ($xpos_punto == 0) {\n $xcifra = \"0\" . $xcifra;\n $xpos_punto = strpos($xcifra, \".\");\n }\n $xaux_int = substr($xcifra, 0, $xpos_punto); // obtengo el entero de la cifra a covertir\n $xdecimales = substr($xcifra . \"00\", $xpos_punto + 1, 2); // obtengo los valores decimales\n }\n\n $XAUX = str_pad($xaux_int, 18, \" \", STR_PAD_LEFT); // ajusto la longitud de la cifra, para que sea divisible por centenas de miles (grupos de 6)\n $xcadena = \"\";\n for ($xz = 0; $xz < 3; $xz++) {\n $xaux = substr($XAUX, $xz * 6, 6);\n $xi = 0;\n $xlimite = 6; // inicializo el contador de centenas xi y establezco el límite a 6 dígitos en la parte entera\n $xexit = true; // bandera para controlar el ciclo del While\n while ($xexit) {\n if ($xi == $xlimite) { // si ya llegó al límite máximo de enteros\n break; // termina el ciclo\n }\n\n $x3digitos = ($xlimite - $xi) * -1; // comienzo con los tres primeros digitos de la cifra, comenzando por la izquierda\n $xaux = substr($xaux, $x3digitos, abs($x3digitos)); // obtengo la centena (los tres dígitos)\n for ($xy = 1; $xy < 4; $xy++) { // ciclo para revisar centenas, decenas y unidades, en ese orden\n switch ($xy) {\n case 1: // checa las centenas\n if (substr($xaux, 0, 3) < 100) { // si el grupo de tres dígitos es menor a una centena ( < 99) no hace nada y pasa a revisar las decenas\n \n } else {\n $key = (int) substr($xaux, 0, 3);\n if (TRUE === array_key_exists($key, $xarray)){ // busco si la centena es número redondo (100, 200, 300, 400, etc..)\n $xseek = $xarray[$key];\n $xsub = subfijo($xaux); // devuelve el subfijo correspondiente (Millón, Millones, Mil o nada)\n if (substr($xaux, 0, 3) == 100)\n $xcadena = \" \" . $xcadena . \" CIEN \" . $xsub;\n else\n $xcadena = \" \" . $xcadena . \" \" . $xseek . \" \" . $xsub;\n $xy = 3; // la centena fue redonda, entonces termino el ciclo del for y ya no reviso decenas ni unidades\n }\n else { // entra aquí si la centena no fue numero redondo (101, 253, 120, 980, etc.)\n $key = (int) substr($xaux, 0, 1) * 100;\n $xseek = $xarray[$key]; // toma el primer caracter de la centena y lo multiplica por cien y lo busca en el arreglo (para que busque 100,200,300, etc)\n $xcadena = \" \" . $xcadena . \" \" . $xseek;\n } // ENDIF ($xseek)\n } // ENDIF (substr($xaux, 0, 3) < 100)\n break;\n case 2: // checa las decenas (con la misma lógica que las centenas)\n if (substr($xaux, 1, 2) < 10) {\n \n } else {\n $key = (int) substr($xaux, 1, 2);\n if (TRUE === array_key_exists($key, $xarray)) {\n $xseek = $xarray[$key];\n $xsub = subfijo($xaux);\n if (substr($xaux, 1, 2) == 20)\n $xcadena = \" \" . $xcadena . \" VEINTE \" . $xsub;\n else\n $xcadena = \" \" . $xcadena . \" \" . $xseek . \" \" . $xsub;\n $xy = 3;\n }\n else {\n $key = (int) substr($xaux, 1, 1) * 10;\n $xseek = $xarray[$key];\n if (20 == substr($xaux, 1, 1) * 10)\n $xcadena = \" \" . $xcadena . \" \" . $xseek;\n else\n $xcadena = \" \" . $xcadena . \" \" . $xseek . \" Y \";\n } // ENDIF ($xseek)\n } // ENDIF (substr($xaux, 1, 2) < 10)\n break;\n case 3: // checa las unidades\n if (substr($xaux, 2, 1) < 1) { // si la unidad es cero, ya no hace nada\n \n } else {\n $key = (int) substr($xaux, 2, 1);\n $xseek = $xarray[$key]; // obtengo directamente el valor de la unidad (del uno al nueve)\n $xsub = subfijo($xaux);\n $xcadena = \" \" . $xcadena . \" \" . $xseek . \" \" . $xsub;\n } // ENDIF (substr($xaux, 2, 1) < 1)\n break;\n } // END SWITCH\n } // END FOR\n $xi = $xi + 3;\n } // ENDDO\n\n if (substr(trim($xcadena), -5, 5) == \"ILLON\") // si la cadena obtenida termina en MILLON o BILLON, entonces le agrega al final la conjuncion DE\n $xcadena.= \" DE\";\n\n if (substr(trim($xcadena), -7, 7) == \"ILLONES\") // si la cadena obtenida en MILLONES o BILLONES, entoncea le agrega al final la conjuncion DE\n $xcadena.= \" DE\";\n\n // ----------- esta línea la puedes cambiar de acuerdo a tus necesidades o a tu país -------\n if (trim($xaux) != \"\") {\n switch ($xz) {\n case 0:\n if (trim(substr($XAUX, $xz * 6, 6)) == \"1\")\n $xcadena.= \"UN BILLON \";\n else\n $xcadena.= \" BILLONES \";\n break;\n case 1:\n if (trim(substr($XAUX, $xz * 6, 6)) == \"1\")\n $xcadena.= \"UN MILLON \";\n else\n $xcadena.= \" MILLONES \";\n break;\n case 2:\n if ($xcifra < 1) {\n $xcadena = \"CERO PESOS $xdecimales/100 M.N.\";\n }\n if ($xcifra >= 1 && $xcifra < 2) {\n $xcadena = \"UN PESO $xdecimales/100 M.N. \";\n }\n if ($xcifra >= 2) {\n $xcadena.= \" PESOS $xdecimales/100 M.N. \"; //\n }\n break;\n } // endswitch ($xz)\n } // ENDIF (trim($xaux) != \"\")\n // ------------------ en este caso, para México se usa esta leyenda ----------------\n $xcadena = str_replace(\"VEINTI \", \"VEINTI\", $xcadena); // quito el espacio para el VEINTI, para que quede: VEINTICUATRO, VEINTIUN, VEINTIDOS, etc\n $xcadena = str_replace(\" \", \" \", $xcadena); // quito espacios dobles\n $xcadena = str_replace(\"UN UN\", \"UN\", $xcadena); // quito la duplicidad\n $xcadena = str_replace(\" \", \" \", $xcadena); // quito espacios dobles\n $xcadena = str_replace(\"BILLON DE MILLONES\", \"BILLON DE\", $xcadena); // corrigo la leyenda\n $xcadena = str_replace(\"BILLONES DE MILLONES\", \"BILLONES DE\", $xcadena); // corrigo la leyenda\n $xcadena = str_replace(\"DE UN\", \"UN\", $xcadena); // corrigo la leyenda\n } // ENDFOR ($xz)\n return trim($xcadena);\n}", "title": "" }, { "docid": "217525ce82493c3880deccf2a775b2d5", "score": "0.5342779", "text": "public function uklad15(){\n $this->zeruj();\n $this->kkk=$this->wspolny_mianownik();\n $tab=array();\n \n if ($this->uklad6()==1){\n if ($this->debug==1) { echo \"FUNCTION (15)=wykryty streat\"; }\n return 0;\n }\n \n for ($xx=2;$xx<=14;$xx++){ $tab[$xx]=99; }\n \n for ($yy=1;$yy<=7;$yy++){\n if ($this->kkk[$yy]>0){\n $tab[$this->kkk[$yy]]=1;\n }\n }\n \n for ($zz=2;$zz<=10;$zz++){\n $spelnione=0;\n if ($tab[$zz]==1) {$spelnione++;}\n if ($tab[$zz+1]==1) {$spelnione++;} \n if ($tab[$zz+2]==1) {$spelnione++;} \n if ($tab[$zz+3]==1) {$spelnione++;} \n if ($tab[$zz+4]==1) {$spelnione++;} \n if ($spelnione==4){ \n if (($tab[$zz]==99) or ($tab[$zz+4]==99)){\n if (($this->kkk[6] == 14) or ($this->kkk[7] == 14)){ $this->ass=1; }\n if ($this->oesd==0){\n if ($tab[$zz]==99) {\n if ($tab[$zz+5]==99) {\n $this->oesd=2;\n } else {\n $this->oesd=3;\n }\n }\n }\n if ($this->oesd==0){\n if ($tab[$zz+4]==99) {\n if ($tab[$zz-1]==99) {\n $this->oesd=2;\n } else {\n $this->oesd=1;\n }\n }\n }\n if ($this->debug==1) { \n echo \" FUNCTION (15) OESD true A:$this->ass oesd: $this->oesd <br/>\"; \n \n } \n return 1;\n }\n }\n } \n if ($this->debug==1) { echo \" FUNCTION (15) OESD false <br/>\"; }\n return 0;\n }", "title": "" }, { "docid": "8013f185f13c01497fe367279afde892", "score": "0.5342545", "text": "function bilang($x) {\r\n $x = abs($x);\r\n $total = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\r\n $result = \"\";\r\n if ($x <12) {\r\n $result = \" \". $total[$x];\r\n } else if ($x <20) {\r\n $result = bilang($x - 10). \" belas\";\r\n } else if ($x <100) {\r\n $result = bilang($x/10).\" puluh\". bilang($x % 10);\r\n } else if ($x <200) {\r\n $result = \" seratus\" . bilang($x - 100);\r\n } else if ($x <1000) {\r\n $result = bilang($x/100) . \" ratus\" . bilang($x % 100);\r\n } else if ($x <2000) {\r\n $result = \" seribu\" . bilang($x - 1000);\r\n } else if ($x <1000000) {\r\n $result = bilang($x/1000) . \" ribu\" . bilang($x % 1000);\r\n } else if ($x <1000000000) {\r\n $result = bilang($x/1000000) . \" juta\" . bilang($x % 1000000);\r\n } else if ($x <1000000000000) {\r\n $result = bilang($x/1000000000) . \" milyar\" . bilang(fmod($x,1000000000));\r\n } else if ($x <1000000000000000) {\r\n $result = bilang($x/1000000000000) . \" trilyun\" . bilang(fmod($x,1000000000000));\r\n } \r\n return $result;\r\n}", "title": "" }, { "docid": "a69e529fb1814aeab5b906c3fb0f9c4c", "score": "0.5341796", "text": "function zaradaBolDo30D100Posto() {\n return round($this->karnet->getValue('satiBolDo30D100Posto') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "9936706b0be49e9a1f706386712c0301", "score": "0.5336038", "text": "function getPuntosTablaData( $equipo1, $equipo2, $deporte=null ) {\n //arma la variable a devolver\n\n $puntos = array( array('pj'=> 1), array('pj'=> 1));\n \n //se define quien gano y los puntos\n if ( (int)$equipo1['goles'] > (int)$equipo2['goles'] ) {\n //si gano equipo1: (los goles o los sets son iguales en todos los deportes)\n $puntos[0]['g'] = 1;\n $puntos[1]['g'] = 0;\n $puntos[0]['p'] = 0;\n $puntos[1]['p'] = 1;\n $puntos[0]['e'] = 0;\n $puntos[1]['e'] = 0;\n \n //se definen los goles\n $puntos[0]['gf'] = $equipo1['goles'];\n $puntos[0]['gc'] = $equipo2['goles'];\n $puntos[0]['dg'] = $equipo1['goles'] - $equipo2['goles'];\n\n $puntos[1]['gf'] = $equipo2['goles'];\n $puntos[1]['gc'] = $equipo1['goles'];\n $puntos[1]['dg'] = $equipo1['goles'] - $equipo2['goles'];\n\n //deporte futbol puntos\n $puntos[0]['puntos'] = 3;\n $puntos[1]['puntos'] = 0;\n\n } elseif ( (int)$equipo1['goles'] < (int)$equipo2['goles'] ) {\n //si gano equipo2 (los goles o los sets son iguales en todos los deportes)\n $puntos[0]['g'] = 0;\n $puntos[1]['g'] = 1;\n $puntos[0]['p'] = 1;\n $puntos[1]['p'] = 0;\n $puntos[0]['e'] = 0;\n $puntos[1]['e'] = 0;\n\n //se definen los goles\n $puntos[0]['gf'] = $equipo1['goles'];\n $puntos[0]['gc'] = $equipo2['goles'];\n $puntos[0]['dg'] = $equipo2['goles'] - $equipo1['goles'];\n\n $puntos[1]['gf'] = $equipo2['goles'];\n $puntos[1]['gc'] = $equipo1['goles'];\n $puntos[1]['dg'] = $equipo2['goles'] - $equipo1['goles'];\n\n $puntos[0]['puntos'] = 0;\n $puntos[1]['puntos'] = 3;\n\n } else {\n //si empataron\n $puntos[0]['g'] = 0;\n $puntos[1]['g'] = 0;\n $puntos[0]['p'] = 0;\n $puntos[1]['p'] = 0;\n $puntos[0]['e'] = 1;\n $puntos[1]['e'] = 1;\n //ademas define los puntos\n $puntos[0]['puntos'] = 1;\n $puntos[1]['puntos'] = 1;\n\n //y los goles\n $puntos[0]['gf'] = $equipo1['goles'];\n $puntos[0]['gc'] = $equipo2['goles'];\n $puntos[0]['dg'] = $equipo1['goles'] - $equipo2['goles'];\n\n $puntos[1]['gf'] = $equipo2['goles'];\n $puntos[1]['gc'] = $equipo1['goles'];\n $puntos[1]['dg'] = $equipo2['goles'] - $equipo1['goles'];\n }\n\n return $puntos;\n}", "title": "" }, { "docid": "9c77ccf5f96b47ff93aaeb8a66bfba68", "score": "0.5333243", "text": "function dixouplus ($tab) {\r\n $fois = 0;\r\n for ($i=0 ; $i<sizeof($tab) ; $i++) {\r\n if ($tab[$i]>=10) {\r\n $fois = $fois + 1;\r\n }\r\n }\r\n echo \"$fois ont eu la moyenne\\n\";\r\n }", "title": "" }, { "docid": "026afadc4c0650b257cdc72821b74a56", "score": "0.5242031", "text": "function malariaSlices($key, $orgType, $time_period) { \n\n$indicatorQueries = array( \n\"-1\"=> array(0, \"where 1=1\", NULL), \n\" 1\"=> array(1, \"where feverLess2+highTemp > 0\", array(-1)),\n\" 2\"=> array(1, \"where patientid in (select patientid from dw_malaria_snapshot where malariaDx+malariaDxA+rapidResultPositive+smearResultPositive = 0) and chloroquine+primaquine+quinine > 0 and feverLess2+highTemp > 0\", array(1)), \n\"-5\"=> array(0, \"where chloroquine+primaquine = 2 and malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0\", NULL),\n\" 5\"=> array(0, \"where malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0\", NULL), \n\" 3\"=> array(1, array(-5), array(5)),\n\" 4\"=> array(1, \"where feverLess2+highTemp > 0 and testsOrdered = 1\", array(1)),\n\" 6\"=> array(0, \"where smearResultPositive+smearResultNegative > 0\", NULL),\n\" 7\"=> array(0, \"where smearResultPositive = 1\", NULL),\n\" 8\"=> array(0, \"where smearResultPositive = 1 and FT+FG > 0 and Vx+Ov+Mai = 0\", NULL), \n\" 9\"=> array(0, \"where smearResultPositive = 1 and FT+FG > 0 and Vx+Ov+Mai > 0\", NULL), \n\"10\"=> array(0, \"where smearResultPositive = 1 and FT+FG = 0 and Vx+Ov+Mai > 0\", NULL), \n\"11\"=> array(0, \"where rapidResultPositive+rapidResultNegative > 0\", NULL), \n\"12\"=> array(0, \"where rapidResultPositive = 1\", NULL),\n\"-13\"=> array(0, \"where testsOrdered = 1\", NULL),\n\"13\"=> array(1, \"where rapidResultPositive+smearResultPositive+rapidResultNegative+smearResultNegative > 0\", array(-13)),\n\"14\"=> array(0, \"where feverLess2+highTemp > 0 and rapidResultPositive+smearResultPositive > 0\", NULL),\n\"15\"=> array(0, \"where malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0 and chloroquine+primaquine = 2\", NULL),\n\"16\"=> array(0, \"where malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0 and hospitalisation = 1\", NULL),\n\n\"-17\" => array(0, \", dw_pregnancy_ranges p where s.patientid = p.patientid and s.visitdate between p.startdate and p.stopdate\", NULL), \n\"17\"=> array(1, \"where isPregnant = 1 and feverLess2+highTemp > 0\", array(-17)),\n\"18\"=> array(1, \"where isPregnant = 1 and patientid in (select patientid from dw_malaria_snapshot where malariaDx+malariaDxA+rapidResultPositive+smearResultPositive = 0) and chloroquine+primaquine+quinine > 0 and feverLess2+highTemp > 0\", array(17)), \n\"-21\" => array(0, \"where isPregnant = 1 and chloroquine+primaquine = 2 and malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0\", NULL),\n\"21\"=> array(0, \"where isPregnant = 1 and malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0\", NULL),\n\"19\"=> array(1, array(-21), array(21)),\n\"20\"=> array(1, \"where isPregnant = 1 and feverLess2+highTemp > 0 and testsOrdered = 1\", array(17)),\n\"22\"=> array(0, \"where isPregnant = 1 and smearResultPositive+smearResultNegative > 0\", NULL),\n\"23\"=> array(0, \"where isPregnant = 1 and smearResultPositive = 1\", NULL),\n\"24\"=> array(0, \"where isPregnant = 1 and smearResultPositive = 1 and FT+FG > 0 and Vx+Ov+Mai = 0\", NULL), \n\"25\"=> array(0, \"where isPregnant = 1 and smearResultPositive = 1 and FT+FG > 0 and Vx+Ov+Mai > 0\", NULL), \n\"26\"=> array(0, \"where isPregnant = 1 and smearResultPositive = 1 and FT+FG = 0 and Vx+Ov+Mai > 0\", NULL), \n\"27\"=> array(0, \"where isPregnant = 1 and rapidResultPositive+rapidResultNegative > 0\", NULL), \n\"28\"=> array(0, \"where isPregnant = 1 and rapidResultPositive = 1\", NULL),\n\"-29\"=> array(0, \"where isPregnant = 1 and testsOrdered = 1\", NULL),\n\"29\"=> array(1, \"where isPregnant = 1 and rapidResultPositive+smearResultPositive+rapidResultNegative+smearResultNegative > 0\", array(-29)),\n\"30\"=> array(0, \"where isPregnant = 1 and feverLess2+highTemp > 0 and rapidResultPositive+smearResultPositive > 0\", NULL),\n\"31\"=> array(0, \"where isPregnant = 1 and malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0 and chloroquine+primaquine = 2\", NULL),\n\"32\"=> array(0, \"where isPregnant = 1 and malariaDx+malariaDxA+rapidResultPositive+smearResultPositive > 0 and hospitalisation = 1\", NULL)\n);\n\n$indicatorQueries = $indicatorQueries + genAgeGpQueries(33 , ', patient p where p.patientid = s.patientid and datediff(s.visitdate, ymdtodate(p.dobyy,6,15))/365 < 1 ');\n$indicatorQueries = $indicatorQueries + genAgeGpQueries(49 , ', patient p where p.patientid = s.patientid and datediff(s.visitdate, ymdtodate(p.dobyy,6,15))/365 between 1 and 4 ');\n$indicatorQueries = $indicatorQueries + genAgeGpQueries(65 , ', patient p where p.patientid = s.patientid and datediff(s.visitdate, ymdtodate(p.dobyy,6,15))/365 between 5 and 9 ');\t\n$indicatorQueries = $indicatorQueries + genAgeGpQueries(81 , ', patient p where p.patientid = s.patientid and datediff(s.visitdate, ymdtodate(p.dobyy,6,15))/365 between 10 and 14 ');\n$indicatorQueries = $indicatorQueries + genAgeGpQueries(97 , ', patient p where p.patientid = s.patientid and datediff(s.visitdate, ymdtodate(p.dobyy,6,15))/365 between 15 and 24 ');\n$indicatorQueries = $indicatorQueries + genAgeGpQueries(113, ', patient p where p.patientid = s.patientid and datediff(s.visitdate, ymdtodate(p.dobyy,6,15))/365 between 25 and 49 '); \n$indicatorQueries = $indicatorQueries + genAgeGpQueries(129, ', patient p where p.patientid = s.patientid and datediff(s.visitdate, ymdtodate(p.dobyy,6,15))/365 > 49 '); \n\t\n\tif (1 == 1) echo \"\\nGenerate Patient Lists start: \" . date('h:i:s') . \"\\n\";\n\t// store the patientid lists; don't need any reference to org, since pid contains site info\n\tforeach ($indicatorQueries as $indicator => $query) { \n\t\tforeach ($time_period as $period) {\n\t\t\tif ($period == \"Week\") $period_value = $period . \"(s.visitdate,2) \";\n\t\t\telse $period_value = $period . \"(s.visitdate) \";\n\t\t\tif (!is_array($query[1])) {\n\t\t\t\t$sql = \"insert into dw_malaria_patients select distinct \" . $indicator . \",?, year(s.visitdate), \" . $period_value . \", s.patientid from dw_malaria_snapshot s \" . $query[1]; \n\t\t\t\t$rc = database()->query($sql,array($period))->rowCount();\n\t\t\t\tif (1 == 1) echo \"\\nGenerate Pid List for: \" . $indicator . \" :\" . $sql . \" Rows inserted: \" . $rc . \"\\n\"; \n\t\t\t} else { \n\t\t\t\t// anytime $query[1] isn't simple, previous calculations can be used\n\t\t\t\tgeneratePidLists(\"malaria\", $indicator, $query[1], $period);\n\t\t\t}\n\t\t} \n\t}\t \n\tif (1 == 1) echo \"\\nGenerate Patient Lists end/Indicator slices start: \" . date('h:i:s') . \"\\n\";\n\t// store the indicators \n\tforeach ($indicatorQueries as $indicator => $query) { \n\t\tif ($indicator < 1) continue; // don't need slices for these \n\t\t$org_unit = 'Sitecode';\n\t\t$org_value = 't.location_id';\n\t\tswitch ($query[0]) {\n\t\tcase 0: // simple calculation\n\t\t\t$sql = \"insert into dw_malaria_slices select ?, \" . $org_value . \", \" . $indicator . \", time_period, year, period, case when t.sex in (1,2) then t.sex else 4 end, count(distinct p.patientid), 0 \n\t\t\tfrom dw_malaria_patients p, patient t where indicator = \" . $indicator . \" and p.patientid = t.patientid group by 3,4,1,2,5,6,7\"; \n\t\t\t$rc = database()->query($sql, array($org_unit))->rowCount();\n\t\t\tif (1 == 1) {\n\t\t\t\techo \"\\nGenerate simple slices for: \" . $indicator . \" :\" . $sql . \" Rows inserted: \" . $rc . \"\\n\"; \n\t\t\t\tprint_r ($argArray);\n\t\t\t} \n\t\t\tbreak;\n\t\tcase 1: // percent\n\t\t\t//generatePercents('malaria', $indicator, $org_unit, $org_value, $query);\n\t\t\tbreak;\n\t\tcase 2: // this among that\n\t\t\tgenerateAmongSlices(\"malaria\", $indicator, $org_unit, $org_value, $query);\n\t\t\tbreak;\n\t\t} \n\t} \n\tgeneratePercents('malaria'); \n\tif (1 == 1) echo \"\\nIndicator slices end: \" . date('h:i:s') . \"\\n\"; \t\n}", "title": "" }, { "docid": "7db738288e56f111cc0a911f548579b9", "score": "0.52398914", "text": "private function getDataCenso () {\n\n for ($dia = 31; $dia > 0; $dia-- ) {\n\n if ( date ( \"w\", mktime(0, 0, 0, 5, $dia, $this->iAno) ) == 3 ) {\n\n $iDia = str_pad($dia, 2, '0', STR_PAD_LEFT);\n $oData = new DBDate(\"{$iDia}/05/{$this->iAno}\");\n return $oData;\n }\n }\n }", "title": "" }, { "docid": "12247ae202cee31aa0bb935ee76c8595", "score": "0.52240413", "text": "function get_data_indikator($bulanini, $bulandepan)\n\t{\n\t\t$jenis_pengadilan = 4;\n\t\t$sql = \"SELECT \n\t\t\t\ta.id,\n\t\t\t\ta.nama,\n\t\t\t\t(if (a.id<>118,\n\t\t\t\t\t\t(SELECT \n\t\t\t\t\t\tCOUNT(p.perkara_id) \n\t\t\t\t\t\tFROM\n\t\t\t\t\t\tperkara AS p \n\t\t\t\t\t\tLEFT OUTER JOIN perkara_putusan AS putus \n\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) < '\" . $bulanini . \"' \n\t\t\t\t\t\tAND (\n\t\t\t\t\tputus.tanggal_putusan IS NULL \n\t\t\t\t\tOR LEFT(putus.tanggal_putusan, 7) >= '\" . $bulanini . \"'\n\t\t\t\t\t\t) \n\t\t\t\t\t\tAND '\" . $bulanini . \"' <= CONCAT(YEAR(CURRENT_DATE),'-',RIGHT(CONCAT('0',CAST(MONTH(CURRENT_DATE) AS CHAR(2))),2)\n\t\t\t\t\t\t)),(SELECT \n\t\t\t\t\t\t\tCOUNT(p.perkara_id)\n\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tperkara AS p \n\t\t\t\t\t\t\tLEFT JOIN perkara_putusan AS putus \n\t\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) < '\" . $bulanini . \"' \n\t\t\t\t\t\t\tAND (putus.tanggal_putusan IS NULL \n\t\t\t\t\t\tOR LEFT(putus.tanggal_putusan, 7) >= '\" . $bulanini . \"')\n\t\t\t\t\t\t\tAND p.perkara_id NOT IN (SELECT diversi.perkara_id FROM perkara_diversi AS diversi WHERE diversi.hasil_diversi = 1 \n\t\t\t\t\t\t\tAND (diversi.tgl_penetapan_kesepakatan_diversi <> '0000-00-00' \n\t\t\t\t\t\tOR LEFT(diversi.tgl_penetapan_kesepakatan_diversi,7) >= '\" . $bulandepan . \"'\n\t\t\t\t\t\t\t)))\n\t\t\t\t\t\t)) \n\t\t\t\tAS belum_putus,\n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(p.perkara_id) \n\t\t\t\tFROM\n\t\t\t\tperkara AS p \n\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) = '\" . $bulanini . \"') AS masuk,\n\t\t\t\t(IF(a.id <> 118, (SELECT \n\t\t\t\tCOUNT(p.perkara_id) \n\t\t\t\tFROM\n\t\t\t\tperkara AS p \n\t\t\t\tLEFT OUTER JOIN perkara_putusan AS putus \n\t\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) <= '\" . $bulanini . \"'\n\t\t\t\tAND LEFT(putus.tanggal_putusan, 7) = '\" . $bulanini . \"'), \n\t\t\t\tIF((SELECT \n\t\t\t\tCOUNT(p.perkara_id) \n\t\t\t\tFROM\n\t\t\t\tperkara AS p \n\t\t\t\tLEFT OUTER JOIN perkara_putusan AS putus \n\t\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) <= '\" . $bulanini . \"'\n\t\t\t\tAND LEFT(putus.tanggal_putusan, 7) = '\" . $bulanini . \"')=0,\n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(p.perkara_id)+(SELECT \n\t\t\t\t\tCOUNT(p.perkara_id) \n\t\t\t\t\tFROM\n\t\t\t\t\tperkara AS p \n\t\t\t\t\tLEFT OUTER JOIN perkara_putusan AS putus \n\t\t\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) <= '\" . $bulanini . \"'\n\t\t\t\t\tAND LEFT(putus.tanggal_putusan, 7) = '\" . $bulanini . \"') \n\t\t\t\tFROM\n\t\t\t\tperkara AS p \n\t\t\t\tLEFT OUTER JOIN perkara_diversi AS putus \n\t\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) <= '\" . $bulanini . \"'\n\t\t\t\tAND LEFT(putus.tgl_penetapan_kesepakatan_diversi, 7) = '\" . $bulanini . \"'\n\t\t\t\tAND putus.hasil_diversi=1 AND tgl_minutasi IS NOT NULL AND dibuka_kembali=0), \n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(p.perkara_id) \n\t\t\t\tFROM\n\t\t\t\tperkara AS p \n\t\t\t\tLEFT OUTER JOIN perkara_putusan AS putus \n\t\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) <= '\" . $bulanini . \"'\n\t\t\t\tAND LEFT(putus.tanggal_putusan, 7) = '\" . $bulanini . \"'))\t\t\t\n\t\t\t\t)) AS putus,\n\t\t\t\t(IF (a.id<>118,\n\t\t\t\t\t\t(SELECT \n\t\t\t\t\t\tCOUNT(p.perkara_id) \n\t\t\t\t\t\tFROM\n\t\t\t\t\t\tperkara AS p \n\t\t\t\t\t\tLEFT OUTER JOIN perkara_putusan AS putus \n\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) < '\" . $bulandepan . \"'\n\t\t\t\t\t\tAND (putus.tanggal_putusan IS NULL \n\t\t\t\t\tOR LEFT(putus.tanggal_putusan, 7) >= '\" . $bulandepan . \"')\n\t\t\t\t\t\t),(SELECT \n\t\t\t\t\t\t\tCOUNT(p.perkara_id)\n\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tperkara AS p \n\t\t\t\t\t\t\tLEFT JOIN perkara_putusan AS putus \n\t\t\t\t\t\tON p.perkara_id = putus.perkara_id \n\t\t\t\t\t\t\tWHERE p.alur_perkara_id = a.id \n\t\t\t\t\t\t\tAND LEFT(p.tanggal_pendaftaran, 7) < '\" . $bulandepan . \"' \n\t\t\t\t\t\t\tAND (putus.tanggal_putusan IS NULL \n\t\t\t\t\t\tOR LEFT(putus.tanggal_putusan, 7) >= '\" . $bulandepan . \"')\n\t\t\t\t\t\t\tAND p.perkara_id NOT IN (SELECT diversi.perkara_id FROM perkara_diversi AS diversi WHERE diversi.hasil_diversi = 1 \n\t\t\t\t\t\t\tAND tgl_minutasi IS NOT NULL AND dibuka_kembali=0\n\t\t\t\t\t\t\tAND (diversi.tgl_penetapan_kesepakatan_diversi <> '0000-00-00' \n\t\t\t\t\t\tOR LEFT(diversi.tgl_penetapan_kesepakatan_diversi,7) >= '\" . $bulandepan . \"'\n\t\t\t\t\t\t\t)))))\n\t\t\t\tAS sisa,\n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(*) \n\t\t\t\tFROM\n\t\t\t\tperkara_banding \n\t\t\t\tWHERE alur_perkara_id = a.id \n\t\t\t\tAND LEFT(permohonan_banding, 7) = '\" . $bulanini . \"') AS banding,\n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(*) \n\t\t\t\tFROM\n\t\t\t\tperkara_kasasi \n\t\t\t\tWHERE alur_perkara_id = a.id \n\t\t\t\tAND LEFT(permohonan_kasasi, 7) = '\" . $bulanini . \"' \n\t\t\t\tAND '\" . $bulanini . \"' <= '\" . $bulanini . \"' ) AS kasasi,\n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(*) \n\t\t\t\tFROM\n\t\t\t\tperkara_pk \n\t\t\t\tWHERE alur_perkara_id = a.id \n\t\t\t\tAND LEFT(permohonan_pk, 7) = '\" . $bulanini . \"'\n\t\t\t\tAND '\" . $bulanini . \"' <= '\" . $bulanini . \"' ) AS pk,\n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(*) \n\t\t\t\tFROM\n\t\t\t\tperkara_eksekusi \n\t\t\t\tWHERE alur_perkara_id = a.id \n\t\t\t\tAND LEFT(permohonan_eksekusi, 7) = '\" . $bulanini . \"'\n\t\t\t\tAND '\" . $bulanini . \"' <= '\" . $bulanini . \"' ) AS eksekusi,\n\t\t\t\t(SELECT \n\t\t\t\tCOUNT(*) \n\t\t\t\tFROM\n\t\t\t\tperkara_grasi \n\t\t\t\tWHERE alur_perkara_id = a.id \n\t\t\t\tAND LEFT(permohonan_grasi, 7) = '\" . $bulanini . \"'\n\t\t\t\tAND '\" . $bulanini . \"' <= '\" . $bulanini . \"' ) AS grasi \n\t\t\t\t\tFROM\n\t\t\t\talur_perkara AS a \n\t\t\t\t\tWHERE a.aktif = 'Y'\t\tAND jenis_pengadilan = '\" . $jenis_pengadilan . \"'\n\t\t\t\t\tORDER BY a.id \";\n\n\t\t// echo $sql;exit;\n\t\t$this->dbsipp = $this\n\t\t\t->load\n\t\t\t->database(\"dbsipp\", true);\n\t\t$query = $this\n\t\t\t->dbsipp\n\t\t\t->query($sql);\n\t\treturn $query->result();\n\n\t}", "title": "" }, { "docid": "2738a4b85d2e6b020dd457652cfca27f", "score": "0.5221881", "text": "function analisisProdukKodBahan($borang, $p, $jadual, $row, $kiraBil)\n{\n\t$kiniP = (int)$p['produk'];\n\t$kiniK = (int)$p['kosBahan'];\n\n\tforeach ($row[$kiraBil] as $key => $data):\n\t\tif ($jadual=='output' && in_array($key,array('F25'))):\n\t\t\tlist($dulu,$jum) = explode('-',$data);\n\t\t\t$nisbah = ($jum==0 || $dulu==0) ? 0 :($dulu / $jum);\n\t\t\t$nisbah2 = ($jum==0 || $dulu==0) ? 0 :(($dulu / $jum) * 100);\n\t\t\t$value = number_format($nisbah2,2,'.',',') . '%';\n\t\t\t$anggar = ($jum==0 || $dulu==0) ? 0 : (($dulu / $jum) * $kiniP);\n\t\t\t$nilai_kini = floor($anggar * 1) / 1;\n\n\t\t\t$papar = ($data==0) ? 0: \"dulu = $dulu | $value<br>\"\n\t\t\t\t. \" kini = ($dulu / $jum) x $kiniP = \" . $nilai_kini \n\t\t\t\t. \" \";\n\t\telseif ($jadual=='output' && in_array($key,array('F24'))):\n\t\t\t# produk\n\t\t\tlist($dulu,$jum) = explode('-',$borang['output'][$kiraBil]['F25']);\n\t\t\t$nisbah = ($jum==0 || $dulu==0) ? 0 :($dulu / $jum);\n\t\t\t$nisbah2 = ($jum==0 || $dulu==0) ? 0 :(($dulu / $jum) * 100);\n\t\t\t$value = number_format($nisbah2,2,'.',',') . '%';\n\t\t\t$anggar = ($jum==0 || $dulu==0) ? 0 : (($dulu / $jum) * $kiniP);\n\t\t\t$nilai_kini = floor($anggar * 1) / 1;\n\t\t\t# kuantiti\n\t\t\t$kuantiti_dulu = $data;\n\t\t\t$aup = ($data==0) ? 0: ($dulu / $data);\n\t\t\t$aup2 = number_format($aup,2,'.',',') . '';\n\t\t\t$kini = ($data==0) ? 0: $nilai_kini / $aup2;\n\t\t\t$kuantiti_kini = number_format($kini,0,'.',',') . '';\n\n\t\t\t$papar = ($kuantiti_dulu==0) ? 0 : \" dulu = $kuantiti_dulu | aup \" . $aup2 . '<br>'\n\t\t\t\t. \" kini = $nilai_kini / $aup2 = \" . ($kuantiti_kini)\n\t\t\t\t. \"\";\n\t\telseif ($jadual=='input' && in_array($key,array('F23'))):\n\t\t\tlist($dulu,$jum) = explode('-',$data);\n\t\t\t$nisbah = ($jum==0 || $dulu==0) ? 0 :($dulu / $jum);\n\t\t\t$nisbah2 = ($jum==0 || $dulu==0) ? 0 :(($dulu / $jum) * 100);\n\t\t\t$value = number_format($nisbah2,2,'.',',') . '%';\n\t\t\t$anggar = ($jum==0) ? 0 : (($dulu / $jum) * $kiniK);\n\t\t\t$nilai_kini = floor($anggar * 1) / 1;\n\t\t\t\t\t\n\t\t\t$papar = ($dulu==0) ? 0: \"dulu = $dulu | $value<br>\"\n\t\t\t\t. \" kini = ($dulu / $jum) x $kiniK = \" . $nilai_kini \n\t\t\t\t. \" \";\n\t\telseif ($jadual=='input' && in_array($key,array('F22'))):\n\t\t\t# produk\n\t\t\tlist($dulu,$jum) = explode('-',$borang['input'][$kiraBil]['F23']);\n\t\t\t$nisbah = ($jum==0 || $dulu==0) ? 0 :($dulu / $jum);\n\t\t\t$nisbah2 = ($jum==0 || $dulu==0) ? 0 :(($dulu / $jum) * 100);\n\t\t\t$value = number_format($nisbah2,2,'.',',') . '%';\n\t\t\t$anggar = ($jum==0 || $dulu==0) ? 0 : (($dulu / $jum) * $kiniP);\n\t\t\t$nilai_kini = floor($anggar * 1) / 1;\n\t\t\t# kuantiti\n\t\t\t$kuantiti_dulu = $data;\n\t\t\t$aup = ($data==0 || $dulu==0) ? 0: ($dulu / $data);\n\t\t\t$aup2 = number_format($aup,2,'.',',') . '';\n\t\t\t$kini = ($nilai_kini==0 || $aup==0) ? 0 : $nilai_kini / $aup;\n\t\t\t$kuantiti_kini = number_format($kini,0,'.',',') . '';\n\n\t\t\t$papar = ($kuantiti_dulu==0) ? 0 : \" dulu = $kuantiti_dulu | aup \" . $aup2 . '<br>'\n\t\t\t\t. \" kini = $nilai_kini / $aup2 = \" . ($kuantiti_kini)\n\t\t\t\t. \"\";\n\t\telse:\n\t\t\t$papar = $data;\n\t\tendif;\n\t\techo \"<td>$papar</td>\";\n\tendforeach;\n}", "title": "" }, { "docid": "14d3a62a9cdae8b6930fa78eec95a2d8", "score": "0.5203087", "text": "function generaFicheroBienes($Conn,$idkardex,$tipo,$numero_escritura,$fecha_numeracion,$secuencia_aj)\r\n{\r\n $sql=\"SELECT \r\n pdt.bien.descripcion AS bien,\r\n public.ubigeo.descripcion AS nombreubigeo,\r\n pdt.pais.nombre AS pais, \r\n k.idbien, k.tipo_bien,\r\n k.tipo_codigoplacas,\r\n k.numero_codigoplacas,\r\n k.numserie,k.descotro,\r\n k.origen,k.ubigeo,\r\n k.idpais,k.fecha_construccion\r\n FROM\r\n public.kardex_bien k\r\n INNER JOIN pdt.bien ON (k.idbien = pdt.bien.idbien)\r\n LEFT OUTER JOIN public.ubigeo ON (k.ubigeo = public.ubigeo.idubigeo)\r\n LEFT OUTER JOIN pdt.pais ON (k.idpais = pdt.pais.idpais)\r\n WHERE k.idkardex={$idkardex}\";\r\n $query=$Conn->Execute($sql);\r\n $tipo_bien=\"\";\r\n $idbien=\"\";\r\n $tipo_codigoplacas=\"\";\r\n $numero_codigoplacas=\"\";\r\n $numserie=\"\";\r\n $origen=\"\";\r\n $ubigeo_pais=\"\";\r\n $fecha_construccion=\"\";\r\n $descotro=\"\";\r\n //Fichero\r\n $fichero=\"\";\r\n $secuencia_b=0;\r\n foreach ($query as $row) {\r\n $secuencia_b++;\r\n $idbien=$row['idbien'];\r\n /*\r\n\t*Array Permision de Llenado de Datos para Validar las Fuentes del Kardex\r\n\t*y solo se genere los datos Correctamente Llenados\r\n\t*/\r\n\t$array_tipo_codigoplacas=array('01','07','09');\r\n\t$array_serie=array('05');\r\n\t$array_origen=array('04');\r\n\t$array_otros=array('99');\r\n\tif(in_array($idbien, $array_tipo_codigoplacas)){\r\n\t\t$tipo_codigoplacas=$row['tipo_codigoplacas'];\r\n\t\t$numero_codigoplacas=$row['numero_codigoplacas'];\r\n\t}\r\n\tif(in_array($idbien, $array_serie)){\r\n\t\t$numserie=$row['numserie'];\r\n\t}\r\n\tif(in_array($idbien, $array_origen)){\r\n\t\t$origen=$row['origen'];\r\n\t\tif($origen==1){\r\n\t\t\t$ubigeo_pais=$row['ubigeo'];\r\n\t\t}else{\r\n\t\t\t$ubigeo_pais=$row['idpais'];\r\n\t\t}\r\n if($row['fecha_construccion']!='1900-01-01')\r\n $fecha_construccion=$row['fecha_construccion'];\r\n\t}\r\n\tif(in_array($idbien, $array_otros)){\r\n\t\t$descotro=$row['descotro'];\r\n\t} \r\n $pdt=array(\r\n $tipo,$numero_escritura,\r\n $fecha_numeracion,\r\n $secuencia_aj,$secuencia_b,\r\n $tipo_bien,$idbien,\r\n $tipo_codigoplacas,$numero_codigoplacas,\r\n $numserie,$origen,$ubigeo_pais,\r\n $fecha_construccion,$descotro);\r\n $fichero.=returnRow($pdt); \r\n getFicheroOtorgantes($Conn,$idkardex,$tipo,$numero_escritura,$fecha_numeracion,$secuencia_aj,$secuencia_b);\r\n } \r\n return $fichero;\r\n \r\n}", "title": "" }, { "docid": "4499be9e3be3d41d8c879ab0a762c6ea", "score": "0.51904285", "text": "function Pascua($anio)\n{\n /* Devuelve la fecha del año en la que cae la Pascua de Resurrección.\n Se utiliza para ello el Algoritmo de Butcher */\n $a = $anio % 19;\n $b = floor($anio / 100);\n $c = $anio % 100;\n $d = floor($b / 4);\n $e = $b % 4;\n $f = floor(($b + 8) / 25);\n $g = floor(($b - $f + 1) / 3);\n $h = (19 * $a + $b - $d - $g + 15) % 30;\n $i = floor($c / 4);\n $k = $c % 4;\n $l = (32 + 2 * $e + 2 * $i - $h - $k) % 7;\n $m = floor(($a + 11 * $h - 22 * l) / 451);\n $n = $h + $l - 7 * $m + 114;\n $mes = floor($n / 31);\n $dia = 1 + $n % 31 - 2;\n\n return EncodeDate($anio, $mes, $dia);\n}", "title": "" }, { "docid": "8f857f6ad0bfa727cfd78306dece4209", "score": "0.5143556", "text": "function ubicar_en_tabla($tipo_movto, $referencia, $importe, $num_meses_periodo){\n\t\n\t/*\n\t El campo $num_meses_periodo tiene el número de meses del período que deseamos consultar,\n\t este dato nos servirá para saber cuántas quincenas mostrar en la salida.\t \n\t */\n\t\n\t$color_quincenas = \"#FAAC58\";\n\t$color_catorcenas = \"#81F7F3\";\n\t$color_semanas = \"#BEF781\";\n\t$color_meses = \"#EC7063\";\n\t\n\tif($tipo_movto == 0){ //cargo\n\t $valor = $importe;\t \n\t}\n\t\n\tif($tipo_movto == 1){ //abono\n\t\t$valor = \"-\".$importe;\n\t}\n\t\n\t$columnas = \"\";\n\t$indice = 1;\n\t\n\t//Generar dinámicamente el arreglo de las quincenas\n\tfor($i = 1; $i <= $_SESSION[\"num_quincenas\"]; $i++){\n\t\t\n\t\tif($i < 10)\n\t\t $valor_quincena = \"Q0\".$i;\n\t\telse \n\t\t $valor_quincena = \"Q\".$i;\n\t\t\n\t\t$arr_posiciones[$indice][\"encabezado\"] = $valor_quincena;\n\t\t$arr_posiciones[$indice][\"posicion\"] = $i;\t\t\n\t\t$arr_posiciones[$indice++][\"color\"] = $color_quincenas;\t\t\n\t}\n\t\n\t\n\t//Generar dinámicamente el arreglo de las catorcenas\n\tfor($i = 1; $i <= $_SESSION[\"num_catorcenas\"]; $i++){\n\t\n\t\tif($i < 10)\n\t\t\t$valor_catorcena = \"C0\".$i;\n\t\telse\n\t\t\t$valor_catorcena = \"C\".$i;\n\t\n\t\t$arr_posiciones[$indice][\"encabezado\"] = $valor_catorcena;\n\t\t$arr_posiciones[$indice][\"posicion\"] = $i;\t\t\n\t\t$arr_posiciones[$indice++][\"color\"] = $color_catorcenas;\t\t\n\t}\n\t\n\t\n\t//Generar dinámicamente el arreglo de las semanas\n\tfor($i = 1; $i <= $_SESSION[\"num_semanas\"]; $i++){\n\t\n\t\tif($i < 10)\n\t\t\t$valor_semana = \"S0\".$i;\n\t\telse\n\t\t\t$valor_semana = \"S\".$i;\n\t\n\t\t$arr_posiciones[$indice][\"encabezado\"] = $valor_semana;\n\t\t$arr_posiciones[$indice][\"posicion\"] = $i;\t\t\n\t\t$arr_posiciones[$indice++][\"color\"] = $color_semanas;\t\t\n\t}\n\t\n\t\n\t//Generar dinámicamente el arreglo de los meses\n\tfor($i = 1; $i <= $_SESSION[\"num_meses\"]; $i++){\n\t\n\t\tif($i < 10)\n\t\t\t$valor_mes = \"M0\".$i;\n\t\t\telse\n\t\t\t\t$valor_mes = \"M\".$i;\n\t\n\t\t\t\t$arr_posiciones[$indice][\"encabezado\"] = $valor_mes;\n\t\t\t\t$arr_posiciones[$indice][\"posicion\"] = $i;\n\t\t\t\t$arr_posiciones[$indice++][\"color\"] = $color_meses;\n\t}\n\t\n\t\n\tfor($i=1; $i < $indice; $i++){\t\t\n\t\t\n\t\tif($referencia == $arr_posiciones[$i][\"encabezado\"]){\t\t \n\t\t $columnas .= \"<td bgcolor='\".$arr_posiciones[$i][\"color\"].\"'>\".number_format($valor,2).\"</td>\";\t\t \n\t\t $_SESSION[$referencia] += $valor; //Aquì se acumulan los totales por referencias\n\t\t}\n\t\telse \n\t\t $columnas .= \"<td>\n\t\t \t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t \t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t \t\t </td>\";\t\t\n\t}\n\n\treturn $columnas;\t\n}", "title": "" }, { "docid": "13830bf088f51fb40ff51d9a1c4838b0", "score": "0.5141897", "text": "public function getNbMois()\n{\n$nbMois = floor(($this->getDureeTotale()%360)/30);\nreturn $nbMois;\n}", "title": "" }, { "docid": "9b5a493f1248ed08a9df3e496a3f57b1", "score": "0.51340705", "text": "function kira2($dulu,$kini)\n{\n\treturn @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n\t//@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "title": "" }, { "docid": "9baf1db05ad470969faa6447a63fdcb6", "score": "0.51298803", "text": "function ranking(){\n $alumnos = AlumnoTarea::where('cod_tarea', str_pad($this->cod_tarea, 10, \"0\", STR_PAD_LEFT));\n\n return $alumnos;\n }", "title": "" }, { "docid": "090ece006de0410ed8c70980ac110c1b", "score": "0.51202446", "text": "function capen($fil,$rt,$rw,$kew,$op=0,$m)\n\t{\n\t\tif($op=='1'){ $op ='='; }else{ $op ='LIKE'; }\n\t\t$mu=($m-1) * 25;\n\t\t$qry = $this->setQuery(\"SELECT nik,nama_lengkap,kelamin,rt,rw,\n\t\t\t\tpekerjaan,agama,pendidikan,idxPdd\n\t\t\t\tFROM view_penduduk WHERE rt LIKE ? && rw LIKE ? && $fil $op ? \n\t\t\t\tORDER BY nama_lengkap LIMIT $mu,25\");\n\t\t$qry->execute(array($rt,$rw,$kew));\n\t\t$urut=($m * 25)-24;\n\t\twhile($rs = $qry->fetch())\n\t\t{\n\t\t\techo \"\n\t\t\t<tr>\n\t\t\t\t<td>\".$urut.\"</td>\n\t\t\t\t<td>\".$rs['nik'].\"</td>\n\t\t\t\t<td><a class ='hilite' href='./?menu=urai&id=\".$rs['idxPdd'].\"'>\".$rs['nama_lengkap'].\"</a></td>\n\t\t\t\t<td>\".$rs['kelamin'].\"</td>\n\t\t\t\t<td>\".$rs['rt'].\"/\".$rs['rw'].\"</td>\n\t\t\t\t<td>\".$rs['pekerjaan'].\"</td>\n\t\t\t\t<td>\".$rs['agama'].\"</td>\n\t\t\t\t<td>\".$rs['pendidikan'].\"</td>\n\t\t\t</tr>\n\t\t\t\";\n\t\t\t$urut++;\n\t\t}\n\t}", "title": "" }, { "docid": "19ad3714fe0786c633ecf49e6470cb60", "score": "0.5112224", "text": "function terbilang($nilai)\n{\n $huruf = array(\"\", \"Satu\", \"Dua\", \"Tiga\", \"Empat\", \"Lima\", \"Enam\", \"Tujuh\", \"Delapan\", \"Sembilan\", \"Sepuluh\", \"Sebelas\");\n if ($nilai == 0) {\n return \"Kosong\";\n } elseif ($nilai < 12 & $nilai != 0) {\n return \"\" . $huruf[$nilai];\n } elseif ($nilai < 20) {\n return terbilang($nilai - 10) . \" Belas \";\n } elseif ($nilai < 100) {\n return terbilang($nilai / 10) . \" Puluh \" . terbilang($nilai % 10);\n } elseif ($nilai < 200) {\n return \" Seratus \" . terbilang($nilai - 100);\n } elseif ($nilai < 1000) {\n return terbilang($nilai / 100) . \" Ratus \" . terbilang($nilai % 100);\n } elseif ($nilai < 2000) {\n return \" Seribu \" . terbilang($nilai - 1000);\n } elseif ($nilai < 1000000) {\n return terbilang($nilai / 1000) . \" Ribu \" . terbilang($nilai % 1000);\n } elseif ($nilai < 1000000000) {\n return terbilang($nilai / 1000000) . \" Juta \" . terbilang($nilai % 1000000);\n } elseif ($nilai < 1000000000000) {\n return terbilang($nilai / 1000000000) . \" Milyar \" . terbilang($nilai % 1000000000);\n } elseif ($nilai < 100000000000000) {\n return terbilang($nilai / 1000000000000) . \" Trilyun \" . terbilang($nilai % 1000000000000);\n } elseif ($nilai <= 100000000000000) {\n return \"Maaf Tidak Dapat di Prose Karena Jumlah nilai Terlalu Besar \";\n }\n}", "title": "" }, { "docid": "e363d8e010884f54efa613e670026e47", "score": "0.50888264", "text": "function getHoraDBToInterfaz($pHora){\n\t$pHora = substr($pHora, 0, 5);\n\treturn $pHora;\n}", "title": "" }, { "docid": "9119034c397b1d6d8aea9b91f9f7b784", "score": "0.50879997", "text": "function zjistiZraneni ($zabitoCast) {\n \n $P2 = 2;\n $O2 = 0.57;\n \n \n return (1-pow($zabitoCast, $P2))*$O2;\n \n // REDUNDANT\n \n// $zabitoCast *= 1000;\n// \n// /* zranovaci tabulka, prvni sloupec udava (nasobeno 1000) kolik jednotek\n// melo zemrit z cele jednotky, tzn. $zabitoCast. Druha navratovou hodnotu \n// (v nasobcich 1000) */\n// $dmgTabulka = array (963 => 91,\n// 918 => 114,\n// 875 => 171,\n// 717 => 298,\n// 712 => 306,\n// 602 => 372,\n// 516 => 421,\n// 467 => 443,\n// 452 => 449,\n// 452 => 449,\n// 463 => 451,\n// 418 => 464,\n// 413 => 474,\n// 368 => 485,\n// 336 => 493,\n// 335 => 494,\n// 331 => 506,\n// 267 => 525,\n// 236 => 528,\n// 136 => 553,\n// 135 => 558,\n// 131 => 575,\n// 127 => 643);\n// \n// $lastValue = null;\n// //najdu v jakem intervalu lezim\n// foreach ($dmgTabulka as $key => $value) {\n// // jsem v nultem, tzn. vetsi nez prvni prvek pole\n// if ($lastValue == null && $zabitoCast > $key) {\n// $lastValue = $value;\n// break;\n// }\n// \n// //trefil jsem se presne do hranice intervalu\n// if ($zabitoCast == $key) {\n// break;\n// }\n// \n// if ($zabitoCast > $key) {\n// break;\n// }\n// \n// // jinak si ulozim posledni hodnout, at mam s cim prumerovat\n// $lastValue = $value;\n// }\n// \n// // udelam prumer z posledni a soucasne\n// return ($value + $lastValue )/2000;\n }", "title": "" }, { "docid": "0d773d8f5d8c35d40ba745bb9cd676b5", "score": "0.5078452", "text": "function getDataEditPengalamanKerja($r_key) {\n\t\t\t$sql = \"select r.*,coalesce(cast(r.masakerjathn as varchar),'0') as masakerjathn,coalesce(cast(r.masakerjabln as varchar),'0')as masakerjabln\n\t\t\t\t\tfrom \".self::table('pe_pengalamankerja').\" r \n\t\t\t\t\twhere nourutpk='$r_key'\";\n\t\t\t\n\t\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "273af5b4d2cf1ef96059ff174abdc044", "score": "0.5075131", "text": "static function get_horas_dia()\r\n\t{\r\n\t\tfor ($a = 0; $a < 24; $a++) {\r\n\t\t\t$horas[$a]['id'] = $a+1;\r\n\t\t\t$horas[$a]['desc'] = str_pad($a + 1, 2, 0, STR_PAD_LEFT);\r\n\t\t}\r\n\t\treturn $horas;\r\n\t}", "title": "" }, { "docid": "cfcab9b90d23a286173e863514710770", "score": "0.5070459", "text": "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "title": "" }, { "docid": "31a5bcf1de26301c9732db9f2cbdf01b", "score": "0.50675976", "text": "function knoten_pfad($abfrage1){\n\t$anzahl=count($abfrage1[knoten_pfad]);\n\tfor($i=0;$i<count($abfrage1[knoten_pfad]);$i++){\n\t\t$abfrage1[knoten_pfad][$i]=KNOTEN_PFAD.$abfrage1[knoten_id][$i].\"/\".$abfrage1[knoten_pfad][$i];\n\t}\n\treturn $abfrage1;\n}", "title": "" }, { "docid": "7a217bdd75fd934775c9c9df26887ca7", "score": "0.50540936", "text": "public function calculateDienNangBanRa()\n\t{\n\t // @Lưu ý: Để chạy hàm này cần setDatasetBanRa <va setGiaBan khi cần tính tiền>\n\t // $this->setGiaBan();\n\t // $this->setDatasetBanRa();\n\t // $this->setDatasetBanRaDotXuat();\n\t \n\t if(!$this->datasetBanDotXuat)\n\t {\n\t $this->setDatasetBanRaDotXuat();\n\t }\n\t \n\t if(!$this->datasetBanRa)\n\t {\n\t $this->setDatasetBanRa();\n\t }\n\t \n\t // Dien ban dinh ky cho cac don vi\n\t foreach($this->datasetBanRa as $item)\n\t {\n // Don gia\n $CongToIOID = @(int)$item->CongToIOID;\n//\t\t\t$giaDienChung = round($this->getGiaBanChung($CongToIOID));\n//\t\t\t$giaDienB1 = round($this->getGiaBanB1($CongToIOID));\n//\t\t\t$giaDienB2 = round($this->getGiaBanB2($CongToIOID));\n//\t\t\t$giaDienB3 = round($this->getGiaBanB3($CongToIOID));\n//\n//\t\t\t$item->TongSoDienChung = round($item->TongSoDienChung);\n//\t\t\t$item->TongSoDienTrungBinh = round($item->TongSoDienTrungBinh);\n//\t\t\t$item->TongSoDienThapDiem = round($item->TongSoDienThapDiem);\n//\t\t\t$item->TongSoDienCaoDiem = round($item->TongSoDienCaoDiem);\n\n\n $giaDienChung = $this->getGiaBanChung($CongToIOID);\n $giaDienB1 = $this->getGiaBanB1($CongToIOID);\n $giaDienB2 = $this->getGiaBanB2($CongToIOID);\n $giaDienB3 = $this->getGiaBanB3($CongToIOID);\n \n // Thanh tien\n $tongGiaChung = $giaDienChung * $item->TongSoDienChung;\n $tongGiaTrungBinh = $giaDienB1 * $item->TongSoDienTrungBinh;\n $tongGiaThapDiem = $giaDienB3 * $item->TongSoDienThapDiem;\n $tongGiaCaoDiem = $giaDienB2 * $item->TongSoDienCaoDiem;\n $tongBaGia = $tongGiaTrungBinh + $tongGiaThapDiem + $tongGiaCaoDiem;\n \n // Tong ba so dien cong to ba gia\n $tongBaSoDien = $item->TongSoDienThapDiem + $item->TongSoDienTrungBinh + $item->TongSoDienCaoDiem;\n \n // Dien + tien\n $soDien = ($item->LoaiGia == 1)?$item->TongSoDienChung:$tongBaSoDien;\n $soTien = ($item->LoaiGia == 1)?$tongGiaChung:$tongBaGia;\n \n $this->tongTienDienBanRa += $soTien + $item->TongTienPhatCosPi;\n $this->tongDienBanRa += $soDien;\n\t }\t\n\n\t // Dien ban khoan ban dot xuat\n\t foreach($this->datasetBanDotXuat as $item)\n\t {\n\t $this->tongTienDienBanRa += $item->ThanhTien;\n\t $this->tongDienBanRa += $item->SanLuong;\n\t }\t \n\t}", "title": "" }, { "docid": "2680307edaf41888e9625e4d11f95477", "score": "0.5048007", "text": "function codigoBasculaToCodigo13($codigoBascula,$peso){\n // echo '<br>';\n $sql=\"SELECT id_producto, codigo_producto,peso_real FROM pe_productos WHERE id_producto='$codigoBascula'\";\n if($this->db->query($sql)->num_rows()==1) \n return $this->db->query($sql)->row()->codigo_producto;\n else{\n $gew=abs($peso);\n $result=$this->db->query($sql)->result();\n $codigoAsignado=0;\n foreach($result as $k=>$v){\n $codigo_producto=$v->codigo_producto;\n $peso_real=$v->peso_real;\n if($codigoAsignado==0 && $peso_real!=0) $codigoAsignado=$codigo_producto;\n if($peso_real!=0 && $peso_real<=$gew) $codigoAsignado=$codigo_producto;\n }\n return $codigoAsignado;\n }\n }", "title": "" }, { "docid": "58cf08c9f85f05aef8388baaceb5a9dc", "score": "0.504042", "text": "function convert_unit($unit){\n if($unit>1000){\n $hasil = $unit/1000;\n return array('hasil'=>$hasil,'satuan'=>'kg.');\n }else{\n return array('hasil'=>$unit,'satuan'=>'gr.');\n }\n}", "title": "" }, { "docid": "f785ae92cb37a0a57f61c66d7ff7ab0c", "score": "0.50368905", "text": "function Agecol($fs, $ls,$row) {\n\n $o = 120 + 20 * $row;\n\t\tif(!$ls){$ls = $fs;}\n $now = time();\n\t\tglobal $retire;\n\n $tmpf = intval(100 - 100 * ($now - $fs) / ($retire * 86400));\n if ($tmpf < 0){$tmpf = 0;}\n\n $tmpl = intval(100 * ($now - $ls) / ($retire * 86400));\n if ($tmpl > 100){$tmpl = 100;}\n\n $tmpd = intval(100 * ($ls - $fs) / ($retire * 86400));\n if ($tmpd > 100){$tmpd = 100;}\n\n $f = sprintf(\"%02x\",$tmpf + $o);\n $l = sprintf(\"%02x\",$tmpl + $o);\n $d = sprintf(\"%02x\",$tmpd + $o);\n $g = sprintf(\"%02x\",$o);\n\n return array (\"$g$f$d\",\"$l$g$d\");\n}", "title": "" }, { "docid": "718e189e923205e662a964957fb535ec", "score": "0.50163686", "text": "function getKd_gudang(){\n $q = $this->db->query(\"SELECT MAX(RIGHT(kd_gudang,4)) AS kd_max FROM gudang_tb\");\n $kd = \"\";\n if($q->num_rows()>0){\n foreach($q->result() as $k){\n $tmp = ((int)$k->kd_max)+1;\n $kd = sprintf(\"%03s\", $tmp);\n }\n }else{\n $kd = \"001\";\n }\n $inisial=\"G\";\n return $inisial.$kd;\n }", "title": "" }, { "docid": "b1f303a3d33cc926cf9376409be9c621", "score": "0.5009055", "text": "function getTablaPosiciones( $zonas, $dataliga ) {\n $fechaHoy = date('Y-m-d');\n \n $data = array();\n if ( $zonas == null ) {\n \n $data = null;\n\n } else {\n\n foreach ($zonas as $zona) {\n\n $dataZona = array(\n 'liga' => $dataliga['slug'],\n 'id' => $zona['id'],\n 'slug' => $zona['slug'],\n 'name' => $zona['nombre'],\n 'nombre_interno' => $zona['nombre_interno'],\n 'deporte' => $dataliga['deporte_id'],\n );\n $equipos = array();\n \n //2. Buscar equipos de cada zona y armar un array de equipos\n if ( $zona['equipos_ids'] == '' ) {\n $data = null;\n return $data;\n }\n\n $equiposIds = explode( ',', $zona['equipos_ids'] );\n foreach ($equiposIds as $id) {\n \n $equipo = getPostsFromDeportesById( $id, 'equipos' );\n if ( $equipo != null ) {\n //le agrego estos datos para sumarlos luego\n $equipo['pj'] = 0;\n $equipo['g'] = 0;\n $equipo['e'] = 0;\n $equipo['p'] = 0;\n $equipo['gf'] = 0;\n $equipo['gc'] = 0;\n $equipo['dg'] = 0;\n $equipo['puntos'] = 0;\n\n $equipos[] = $equipo;\n }\n\n }//for each de equipos\n \n\n //3. Buscar partidos y contrastarlos con equipos para agregarle los datos puntaje\n if ( $zona['partidos_ids'] == '' ) {\n $data = null;\n return $data;\n }\n\n $partidos = explode( ',', $zona['partidos_ids'] );\n\n foreach ( $partidos as $partido ) {\n \n //data partido\n $partido = getPostsFromDeportesById( $partido, 'partidos' );\n \n //si la fecha es mayor, entonces toma en cuenta el partido porque ya se ha jugado\n \n if ($fechaHoy > $partido['fecha'] ) {\n \n $deporte = $partido['deporte_id'];\n \n //1. busca los equipos participantes\n $equiposParticipantes = explode(',', $partido['equipos_id']);\n $equipo1['id'] = $equiposParticipantes[0];\n $equipo2['id'] = $equiposParticipantes[1];\n \n //2. en los equipos solo va a buscar los goles y con esto se arma toda la tabla\n\n //si está la puntuacion se anulan los goles\n if ( $partido['puntuacion'] != '' ) {\n $puntuacion = explode(',', $partido['puntuacion']);\n $equipo1['goles'] = (int)$puntuacion[0];\n $equipo2['goles'] = (int)$puntuacion[1];\n\n } else {\n //sino esta la puntuacion se cuentan goles y sets\n\n if ( $deporte == '3' ) {\n //si el deporte es voley entonces se miran los sets\n $equipo1['sets'] = $partido['sets1'];\n $equipo2['sets'] = $partido['sets2'];\n \n } else {\n //si deporte no es voley entonces se computa como futbol\n //equipo1\n if ( $partido['goles_id1'] == '' ) {\n $equipo1['goles'] = 0;\n } else {\n //cuenta los goles\n $equipo1['goles'] = count( explode(',', $partido['goles_id1'] ) );\n }\n //equipo2\n if ( $partido['goles_id2'] == '' ) {\n $equipo2['goles'] = 0;\n } else {\n //cuenta los goles\n $equipo2['goles'] = count( explode(',', $partido['goles_id2'] ) );\n }\n\n } \n \n }\n \n //3. ahora que estan los datos tomados del partido se procesa la informacion y se lo carga al array de los $equipos\n if ( $deporte == '3' ) {\n $equipos = asignarpuntosaequipos( $equipos, $equipo1, $equipo2, 'voley' );\n } else {\n $equipos = asignarpuntosaequipos( $equipos, $equipo1, $equipo2 );\n }\n\n }//if fecha\n }//foreach partidos\n \n $equiposOrdenados = ordenarEquipos($equipos);\n $dataZona['content'] = $equiposOrdenados;\n\n array_push($data, $dataZona);\n\n }//foreach $zonas\n\n }//if zona not null\n\n $Olddata = array(\n //zona 1\n array(\n 'id' => '1',\n 'slug' => 'zona-a',\n 'name' => 'Zona A', \n //contenido por zona\n 'content' => array(\n array(\n 'equipo' => 'Vital', \n 'puntos' => '29', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '23', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '15', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '12', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '10', \n ),\n ),\n ),\n //zona 2\n array(\n 'id' => '2',\n 'slug' => 'zona-b',\n 'name' => 'Zona B', \n //contenido por zona\n 'content' => array(\n array(\n 'equipo' => 'Droguería Asoproforma', \n 'puntos' => '29', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '10', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '15', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '3', \n ),\n array(\n 'equipo' => 'Vital', \n 'puntos' => '0', \n ),\n ),\n ),\n );\n\n return $data;\n}", "title": "" }, { "docid": "fe33c7c7c5370fd743256430890b5063", "score": "0.50063914", "text": "function getPuntosTablaDataVoley( $equipo1, $equipo2, $deporte=null ) {\n //arma la variable a devolver\n $puntos = array( array('pj'=> 1), array('pj'=> 1));\n $cantidadsets = 3;\n\n if ( $equipo1['sets'] == '' ) {\n $sets1 = array(0,0,0);\n } else {\n $sets1 = explode(',', $equipo1['sets'] );\n }\n if ( $equipo2['sets'] == '' ) {\n $sets2 = array(0,0,0);\n } else {\n $sets2 = explode(',', $equipo2['sets'] );\n }\n\n $score1 = 0;\n $score2 = 0;\n $suma1 = 0;\n $suma2 = 0;\n\n for ($i=0; $i < $cantidadsets; $i++) {\n\n if ( (int)$sets1[$i] > (int)$sets2[$i] ) {\n $score1 = $score1 + 1;\n } elseif ( (int)$sets1[$i] < (int)$sets2[$i] ) {\n $score2 = $score2 + 1;\n }\n\n $suma1 = $suma1 + $sets1[$i];\n $suma2 = $suma2 + $sets2[$i];\n }\n\n //las variables internas son las mismas que en futbol, solo cambia la nomenclatura que se ve\n if ( $score1 > $score2 ) {\n $puntos[0]['g'] = 1;\n $puntos[0]['p'] = 0;\n $puntos[1]['g'] = 0;\n $puntos[1]['p'] = 1;\n } else {\n $puntos[1]['g'] = 1;\n $puntos[1]['p'] = 0;\n $puntos[0]['g'] = 0;\n $puntos[0]['p'] = 1;\n }\n //no se puede empatar en voley así que siempre es igual\n $puntos[0]['e'] = 0;\n $puntos[1]['e'] = 0;\n //se definen los goles\n $puntos[0]['gf'] = $suma1;\n $puntos[0]['gc'] = $suma2;\n $puntos[0]['dg'] = $suma1 - $suma2;\n\n $puntos[1]['gf'] = $suma2;\n $puntos[1]['gc'] = $suma1;\n $puntos[1]['dg'] = $suma2 - $suma1;\n\n //los puntos se toman como ganados 3, perdidos: si ganaron un set 1, si perdieron todos 0\n if ( $score1 > $score2 ) {\n $puntos[0]['puntos'] = 3;\n } else {\n if ($score1 > 0 ) {\n $puntos[0]['puntos'] = 1;\n } else {\n $puntos[0]['puntos'] = 0;\n }\n }\n\n if ( $score2 > $score1 ) {\n $puntos[1]['puntos'] = 3;\n } else {\n if ($score2 > 0 ) {\n $puntos[1]['puntos'] = 1;\n } else {\n $puntos[1]['puntos'] = 0;\n }\n }\n \n return $puntos;\n}", "title": "" }, { "docid": "57b9687cf08b360dd48523b3ef3b67c7", "score": "0.49931172", "text": "function calcPoints($ksID,$disziplinID,$wert,$geschlecht,$outMethod) {\n\t\t// echo \"calcPoints aufgerufen mit: $ksID, $disziplinID, $wert, $geschlecht <br>\";\n\n\t\t$orderingQuery\t= mysqli_query($GLOBALS[\"dbConnection\"], \"SELECT bezeichnung,ordering FROM disziplin WHERE id = '$disziplinID'\");\n\t\tif($row = mysqli_fetch_assoc($orderingQuery)) {\n\t\t\t$ordering\t= $row[\"ordering\"];\n\t\t\t$disziplin\t= $row[\"bezeichnung\"];\n\t\t}\n\n\t\t// echo \"SELECT valuetable FROM wertung WHERE geschlecht='$geschlecht' AND klassenstufen_id='$ksID' <br>\"; // Hier sollte die NUMMER der Klassenstufe\n\t\t$tableQuery\t= mysqli_query($GLOBALS[\"dbConnection\"], \"SELECT valuetable FROM wertung WHERE geschlecht='$geschlecht' AND klassenstufen_id='$ksID'\");\n\t\tif($row = mysqli_fetch_assoc($tableQuery)) {\n\t\t\t$valueTable\t= $row[\"valuetable\"];\n\t\t\t// echo \"$valueTable : \";\n\t\t}\n\n\t\t$wert\t= str_replace(\",\", \".\", $wert);\n\n\t\trequire_once 'excel_reader2.php';\n\n\t\t$data = new Spreadsheet_Excel_Reader(\"wertetabellen/\".$valueTable);\n\t\t$rows\t= $data->rowcount($sheet_index=0);\n\t\t$cols\t= $data->colcount($sheet_index=0);\n\n\t\tfor($i = 1; $i <= $cols; $i++) {\n\t\t\tif($data->val(2,$i) == $disziplin) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif($data->val(3,$i) == \"Punkte\") {\n\t\t\t$punkteCol\t= $i;\n\t\t\t$werteCol\t= $i+1;\n\t\t} else {\n\t\t\t$punkteCol\t= $i+1;\n\t\t\t$werteCol\t= $i+2;\n\t\t}\n\n\t\tfor($i = 5; $i <= $rows; $i++) {\n\t\t\tif($data->val($i,$werteCol) == NULL) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif($ordering == \"ASC\") {\n\t\t\t\tif($data->val($i,$werteCol) <= $wert) {\n\t\t\t\t\t$Punkte\t= $data->val($i,$punkteCol);\n\t\t\t\t\tif($wert > $data->val($i,$werteCol) && $data->val($i,$punkteCol) == \"1\") {\n\t\t\t\t\t\t$Punkte = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($data->val($i,$punkteCol) == \"100\" && $wert < $data->val($i,$werteCol)) {\n\t\t\t\t\t\t$calcPoints\t= $data->val(\"4\",$punkteCol);\n\t\t\t\t\t\t$calcWert\t= $data->val(\"4\",$werteCol);\n\t\t\t\t\t\t$restWert\t= $data->val($i,$werteCol) - $wert;\n\t\t\t\t\t\t$Punkte\t\t= ($restWert/$calcWert*$calcPoints)+100;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($ordering == \"DESC\") {\n\t\t\t\tif($data->val($i,$werteCol) <= $wert) {\n\t\t\t\t\t$Punkte\t= $data->val($i,$punkteCol);\n\n\t\t\t\t\tif($Punkte == \"100\" && $wert > $data->val($i,$werteCol)) {\n\t\t\t\t\t\t$calcPoints\t= $data->val(\"4\",$punkteCol);\n\t\t\t\t\t\t$calcWert\t= $data->val(\"4\",$werteCol);\n\t\t\t\t\t\t$restWert\t= $wert - $data->val($i,$werteCol);\n\t\t\t\t\t\t$Punkte\t\t= ($restWert/$calcWert*$calcPoints)+100;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($wert < $data->val($i,$werteCol) && $data->val($i,$punkteCol) == \"1\") {\n\t\t\t\t\t\t$Punkte = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif($outMethod == \"echo\") {\n\t\t\techo \"$Punkte\";\n\t\t} else {\n\t\t\treturn $Punkte;\n\t\t}\n\n\t\t//echo \"<p>\".$Punkte.\"</p>\";\n\t}", "title": "" }, { "docid": "5cc648f409697506dca86b0c3aaffaca", "score": "0.498991", "text": "public function getValueIndikatorWithData($data)\n\t{\n\t\t$result = [];\n\t\t//do looping, for now, skip looping\n\t\tforeach ($data as $key => $isData) {\n\t\t\t//set initial value\n\t\t\t$dataRt = $isData['datart'][0];\n\t\t\t$dataAsset = $isData['asset'][0];\n\t\t\t$dataIndividu = $isData['individu'];\n\n\t\t\t$tempResult['data']['all'] = $isData;\n\t\t\t$tempResult['data']['individu'] = $dataIndividu;\n\t\t\t\n\t\t\t//indikator rumah\n\t\t\t$tempResult['rumah'] = $this->indiRumah($this->isNotNullData($dataRt['b3_k1a']), $this->isNotNullData($dataRt['b3_k1b']), $this->isNotNullData($dataRt['b3_k3']), $this->isNotNullData($dataRt['b3_k4a']));\n\n\t\t\t//indikator listrik\n\t\t\t$tempResult['listrik'] = $this->indiListrik($this->isNotNullData($dataRt['b3_k9a']), $this->isNotNullData($dataRt['b3_k9b']));\n\n\t\t\tforeach ($dataIndividu as $key => $isDataIndividu) {\n\t\t\t\t//indikator kesehatan => individu\n\t\t\t\t$tempResult['kesehatan'][$key] = $this->indiKesehatan($this->isNotNullData($isDataIndividu['b4_k13']), $this->isNotNullData($isDataIndividu['b4_k14']));\n\n\t\t\t\t//indikator pendidikan\n\t\t\t\t$tempResult['pendidikan'][$key] = $this->indiPendidikan($this->isNotNullData($isDataIndividu['b4_k15']), $this->isNotNullData($isDataIndividu['b4_k16']), $this->isNotNullData($isDataIndividu['b4_k17']), $this->isNotNullData($isDataIndividu['b4_k18']));\n\t\t\t\t\n\t\t\t\t//indikator pekerjaan\n\t\t\t\t$tempResult['pekerjaan'][$key] = $this->indiPekerjaan($this->isNotNullData($isDataIndividu['b4_k19a']));\n\t\t\t\t\n\t\t\t\t//indikator kelengkapan persuratan\n\t\t\t\t$tempResult['kelengkapanpersuratan'][$key] = $this->indiKelengkapanPersuratan($this->isNotNullData($isDataIndividu['b4_k9']), $this->isNotNullData($isDataIndividu['b4_k11']));\n\t\t\t}\n\n\t\t\t//indikator fasilitas MCK\n\t\t\t$tempResult['fasilitasmck'] = $this->indiFasilitasMck($this->isNotNullData($dataRt['b3_k11a']));\n\n\t\t\t//indikator fasilitas memasak\n\t\t\t$tempResult['fasilitasmemasak'] = $this->indiFasilitasMemasak($this->isNotNullData($dataRt['b3_k10']), $this->isNotNullData($dataAsset['b5_k1a']));\n\n\t\t\t//indikator peserta kks/kps\n\t\t\t//$a = $this->isNotNullData($dataAsset['b5_k6a']);\n\t\t\t$indiKks = isset($dataAsset['b5_k6a']) ? $dataAsset['b5_k6a'] : null;\n\t\t\t$tempResult['pesertakks'] = $this->indiPesertaKks($indiKks);\n\n\t\t\t//indikator peserta program rastra\n\t\t\t$indiRastra = isset($dataAsset['b5_k6h']) ? $dataAsset['b5_k6h'] : null;\n\t\t\t$tempResult['pesertarastra'] = $this->indiPesertaRastra($indiRastra);\n\n\t\t\t//indikator peserta program kur\n\t\t\t$indiKur = isset($dataAsset['b5_k6i']) ? $dataAsset['b5_k6i'] : null;\n\t\t\t$tempResult['pesertakur'] = $this->indiPesertaKur($indiKur);\n\n\t\t\t//indikator peserta program pkh\n\t\t\t$indiPkh = isset($dataAsset['b5_k6g']) ? $dataAsset['b5_k6g'] : null;\n\t\t\t$tempResult['pesertapkh'] = $this->indiPesertaPkh($indiPkh);\n\n\t\t\t//indikator kip\n\t\t\t$indiKip = isset($dataAsset['b5_k6b']) ? $dataAsset['b5_k6b'] : null;\n\t\t\t$tempResult['kip'] = $this->indiKip($indiKip);\n\n\t\t\t//indikator kis/bpjs\n\t\t\t$indiKis = isset($dataAsset['b5_r6c']) ? $dataAsset['b5_r6c'] : null;\n\t\t\t$indiBpjs = isset($dataAsset['b5_r6d']) ? $dataAsset['b5_r6d'] : null;\n\t\t\t$tempResult['kisbpjs'] = $this->indiKisBpjs($indiKis, $indiBpjs);\n\n\t\t\t//indikator kesehatan lain\n\t\t\t$indiKesehatanLain = isset($dataAsset['b5_r6d']) ? $dataAsset['b5_r6d'] : null;\n\t\t\t$tempResult['kesehatan_lain'] = $this->indiKesehatanLain($indiKesehatanLain);\n\n\t\t\t//count each\n\t\t\t//array push to result var\n\t\t\tarray_push($result, $tempResult);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4d446b6646826bd11d1753fe4f52f132", "score": "0.49880257", "text": "function osnovicaDoprinosa() {\n $osnovica = $this->izracunajMinOsnDop();\n $ukBruto = $this->brutoUkupno();\n if($ukBruto > $osnovica) {\n if($ukBruto > $this->payment->maxOsnovicaDoprinosa()) {\n $osnovica = $this->payment->maxOsnovicaDoprinosa();\n } else {\n $osnovica = $ukBruto;\n }\n }\n return round($osnovica, 2);\n }", "title": "" }, { "docid": "efd05c0e4bd83cc8afe92256df04366c", "score": "0.49858937", "text": "function retorna_data($datahora){\n return converte_data(substr($datahora, 0, 10));\n}", "title": "" }, { "docid": "7ff387f47a59bb43320b829e52d64ddf", "score": "0.49772978", "text": "function bredde_billeder()\r\n { $id=\"Bredde af billeder i px.\";\r\n $bredde=get_parametre($id);\r\n //$bredde= 90/$antal_vandret;\r\n return $bredde[0][0];\r\n \r\n }", "title": "" }, { "docid": "61f1fb44d60ee4604a491c0d78fce62f", "score": "0.49764442", "text": "function rupiah($bilangan){\n\t$pecahan=number_format($bilangan,0,',','.');\n\treturn $pecahan;\n}", "title": "" }, { "docid": "376623995879233a3d3d147152ba8a24", "score": "0.49751493", "text": "function converte_data($data)\n {\n $dia = intval(substr($data, 8));\n $mes = intval(substr($data, 5, 6));\n $ano = intval(substr($data, 0, 4));\n\n if (strlen($dia) == 1)\n $dia = \"0\" . $dia;\n if (strlen($mes) == 1)\n $mes = \"0\" . $mes;\n\n return $dia . \"/\" . $mes . \"/\" . $ano;\n }", "title": "" }, { "docid": "5e87a10e26ce4e2b53740ffb500383b7", "score": "0.49683487", "text": "public function tipohtml_35($vectordata, $totalcolumnas,$idjunta)\n {\n if ($this->tipo_archivo == 'excel') {\n $this->htmlvista .= '</table>';\n\n $_anchoinicial = 8;\n $_anchocolumnas = $totalcolumnas / 3;\n\n if (!is_int($_anchocolumnas)) {\n $_ancho_1 = floor($_anchocolumnas);\n $_ancho_2 = ceil($_anchocolumnas);\n } else {\n $_ancho_1 = $_anchocolumnas;\n $_ancho_2 = $_anchocolumnas;\n }\n } else {\n $_anchoinicial = 8;\n $_ancho_1 = 1;\n $_ancho_2 = 1;\n\n //$this->htmlvista.=\"<td colspan='\".$totalcolumnas.\"'>&nbsp;</td></tr><tr>\";\n //$this->htmlvista.=\"<td colspan='\".$totalcolumnas.\"'>\";\n $this->htmlvista .= '</table>';\n }\n\n $this->htmlvista .= \"<table width='100%' ><tr><td colspan='\".$_anchoinicial.\"' class='labelpregunta'>\".$vectordata['nom_pregunta'].'</td></tr>';\n $this->htmlvista .= \"<tr>\n <td width='20%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>Ubicación del tanque</td>\"\n .\"<td width='10%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>Capacidad del tanque (metros cúbicos)</td>\" \n .\"<td width='10%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>¿Realiza la medición a la entrada del tanque?</td>\" \n .\"<td width='10%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>Material</td>\" \n .\"<td width='20%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>Especifique material</td>\" \n .\"<td width='10%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>Frecuencia mantenimiento</td>\"\n .\"<td width='10%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>Estado de la estructura del tanque</td>\"\n .\"<td width='10%' class='labelpregunta3' colspan='\".$_ancho_2.\"'>Problemas identificados</td></tr>\";\n \n $_ct = 0;\n if (!empty($vectordata['id_respuesta'])) {\n $_searchinv = \\common\\models\\poc\\FdTanquesAlmacenaApscom::find()\n ->where(['id_respuesta' => $vectordata['id_respuesta'], 'id_pregunta' => $vectordata['id_pregunta'], 'id_conjunto_respuesta' => $this->id_conj_rpta,'id_junta'=>$idjunta])\n ->asArray()->all();\n\n foreach ($_searchinv as $_tipo35cl) {\n \n $_medicion_entrada = FdOpcionSelect::find()->where(['id_opcion_select'=>$_tipo35cl['medicion_entrada']])->one();\n $medicion_tanque=\"\";\n if(!empty($_medicion_entrada)) $medicion_tanque=$_medicion_entrada->nom_opcion_select;\n \n $_material = FdOpcionSelect::find()->where(['id_opcion_select'=>$_tipo35cl['material']])->one();\n $material_tanque=\"\";\n if(!empty($_material)) $material_tanque=$_material->nom_opcion_select;\n \n $_frecuencia_mantenimiento = FdOpcionSelect::find()->where(['id_opcion_select'=>$_tipo35cl['frecuencia_mantenimiento']])->one();\n $mantenimiento_tanque=\"\";\n if(!empty($_frecuencia_mantenimiento)) $mantenimiento_tanque=$_frecuencia_mantenimiento->nom_opcion_select;\n \n $_estado_tanque = FdOpcionSelect::find()->where(['id_opcion_select'=>$_tipo35cl['estado_tanque']])->one();\n $est_tanque=\"\";\n if(!empty($_estado_tanque)) $est_tanque=$_estado_tanque->nom_opcion_select;\n \n $_problemas = FdOpcionSelect::find()->where(['id_opcion_select'=>$_tipo35cl['problemas']])->one();\n $problema_tanque=\"\";\n if(!empty($_problemas)) $problema_tanque=$_problemas->nom_opcion_select; \n \n $this->htmlvista .= \"<tr><td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$_tipo35cl['ubicacion_tanque'].'</td>'; \n $this->htmlvista .= \"<td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$_tipo35cl['capacidad_tanque'].'</td>'; \n $this->htmlvista .= \"<td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$medicion_tanque.'</td>'; \n $this->htmlvista .= \"<td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$material_tanque.'</td>'; \n $this->htmlvista .= \"<td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$_tipo35cl['especifique'].'</td>'; \n $this->htmlvista .= \"<td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$mantenimiento_tanque.'</td>';\n $this->htmlvista .= \"<td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$est_tanque.'</td>';\n $this->htmlvista .= \"<td class='inputpregunta' colspan='\".$_ancho_2.\"'>\".$problema_tanque.'</td></tr>';\n ++$_ct;\n }\n }\n\n if ($_ct == 0) {\n $this->htmlvista .= \"<tr><td colspan='\".$_anchoinicial.\"' class='inputpregunta'>No hay Respuesta.</td></tr>\";\n }\n\n $this->htmlvista .= \"</table><table width='100%' class='tbespeciales'>\";\n }", "title": "" }, { "docid": "d1ea858a8748a5a7b26207848d7a3ef8", "score": "0.49648058", "text": "function zaradaBolDo30D() {\n return round($this->karnet->getValue('satiBolDo30D') *\n $this->payment->getValue('koefBolDo30D') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "f54c3e6cc02f2dca61faa048de666a20", "score": "0.49608958", "text": "function ausgabe_walze ($walze)\n{\n for ($i=0;$i<=25;$i++)\n {\n $out.= $walze[$i];\n }\n return $out;\n}", "title": "" }, { "docid": "340e0f0c8a5df8d8a5545bff2ef10eea", "score": "0.49591368", "text": "function zaradaVojnaVezba() {\n return round($this->karnet->getValue('satiVojnaVezba') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "7e5bcbf99d996dbc793b410447a42892", "score": "0.4958916", "text": "function getVientoPredominante($fecha) {\n $query = \" \n select\n @c := Greatest(n, nne, ne, ene, e, ese, se, sse, s, ssw, sw, wsw, w, wnw, nw, nnw) as count,\n case\n when n = @c then 'N'\n when nne = @c then 'NNE'\n when ne = @c then 'NE'\n when ene = @c then 'ENE'\n when e = @c then 'E'\n when ese = @c then 'ESE'\n when se = @c then 'SE'\n when sse = @c then 'SSE'\n when s = @c then 'S'\n when ssw = @c then 'SSW'\n when sw = @c then 'SW'\n when wsw = @c then 'WSW'\n when w = @c then 'W'\n when wnw = @c then 'WNW'\n when nw = @c then 'NW'\n when nnw = @c then 'NNW'\n else 'S/D'\n end as data\n from\n (select count(*) as n from datos\n where tipo = 2\n and fecha = '$fecha'\n and ((data between 1 and 11.2) or data >= 348.8)) n,\n\n (select count(*) as nne from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 11.3 and 33.7) nne,\n\n (select count(*) as ne from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 33.8 and 56.2) ne,\n\n (select count(*) as ene from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 56.3 and 78.7) ene,\n\n (select count(*) as e from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 78.8 and 101.2) e,\n\n (select count(*) as ese from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 101.3 and 113.7) ese,\n\n (select count(*) as se from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 113.8 and 136.2) se,\n\n (select count(*) as sse from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 136.3 and 168.7) sse,\n\n (select count(*) as s from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 168.8 and 191.2) s,\n\n (select count(*) as ssw from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 191.3 and 213.7) ssw,\n\n (select count(*) as sw from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 213.8 and 236.2) sw,\n\n (select count(*) as wsw from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 236.3 and 258.7) wsw,\n\n (select count(*) as w from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 258.8 and 281.2) w,\n\n (select count(*) as wnw from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 281.3 and 303.7) wnw,\n\n (select count(*) as nw from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 303.8 and 326.2) nw,\n\n (select count(*) as nnw from datos\n where tipo = 2\n and fecha = '$fecha'\n and data between 326.3 and 348.7) nnw\n \";\n $resultado = mysql_query($query);\n $row = mysql_fetch_row($resultado);\n $a = array('count' => $row[0], 'direccion' => $row[1]);\n return $a;\n }", "title": "" }, { "docid": "5c333794341c0daa158ae29d902189c8", "score": "0.49499848", "text": "function temperatura_diaria ($serie, $intervalo, $mes, $dia, $conectar)\r\n {\r\n // $serie = \"\"; // N° de serie del dispositivo que quiero consultar\r\n // $mes = \"\"; // Fecha del dia que quiero consultar la temperatura\r\n // $dia = \"\";\r\n // $intervalo = 0; // Se usa esta variable para no graficar tooooodos los datos (se saltea el nro de 'intervalos' de datos para graficar menos ptos)\r\n\r\n $ano = date(\"Y\"); // Consulto siempre sobre el año actual\r\n\r\n // Esto funciona en tanto y cuanto tenga los datos cargados de esta forma en la BD, si no hay que hacer un query distinto\r\n // $resultado = mysqli_query($conectar, \"SELECT UNIX_TIMESTAMP(`fecha`), temperatura FROM datos WHERE year(`fecha`) = '$ano' \r\n // AND month(`fecha`) = '$mes' AND day(`fecha`) = '$dia' AND `serie`='$serie'\" );\r\n\r\n // Para pruebas:\r\n $resultado = mysqli_query($conectar, \"SELECT UNIX_TIMESTAMP(`fecha`), temperatura FROM datos WHERE year(`fecha`) = '$ano' \r\n AND month(`fecha`) = '$mes' AND day(`fecha`) = '$dia'\" );\r\n\r\n \r\n while ($row = mysqli_fetch_array($resultado))\r\n {\r\n // Se realiza el formato que requiere highcharts (los corchetes y eso)\r\n \r\n echo\"[\".($row[0]*1000).\",\".($row[1]).\"],\";\r\n\r\n for ($x=0; $x<$intervalo; $x++)\r\n {\r\n $row = mysqli_fetch_array($resultado);\r\n }\r\n }\r\n \r\n mysqli_close($conectar);\r\n }", "title": "" }, { "docid": "a358ba1926b35f1a9fabef70fb07594c", "score": "0.49489108", "text": "function Cantidades_cd($valor){\t\n\n return number_format($valor,3,',','.');\n\n}", "title": "" }, { "docid": "866d2953a521fade4a2501bd3274e263", "score": "0.49435642", "text": "function buatKode($tabel, $inisial){\n\t$struktur\t= mysql_query(\"SELECT * FROM $tabel\");\n\t$field\t\t= mysql_field_name($struktur,0);\n\t$panjang\t= mysql_field_len($struktur,0);\n\n \t$qry\t= mysql_query(\"SELECT MAX(\".$field.\") FROM \".$tabel);\n \t$row\t= mysql_fetch_array($qry);\n \tif ($row[0]==\"\") {\n \t\t$angka=0;\n\t}\n \telse {\n \t\t$angka\t\t= substr($row[0], strlen($inisial));\n \t}\n\n \t$angka++;\n \t$angka\t=strval($angka);\n \t$tmp\t=\"\";\n \tfor($i=1; $i<=($panjang-strlen($inisial)-strlen($angka)); $i++) {\n\t\t$tmp=$tmp.\"0\";\n\t}\n \treturn $inisial.$tmp.$angka;\n}", "title": "" }, { "docid": "4f0bdc8a0284be3a1147b74ad016c2ec", "score": "0.49431312", "text": "public function inLichTiepDan(){\n\n $accountId = Session::get('accountid');\n $accountInfo = DangNhapPage::GetDiaBanTheoAccountId($accountId);\n $diaBanId = $accountInfo[0]->diaban;\n $diaBanIdAll = [];\n $diaBanIdAllArray = ChuyenVienController::getDeQuyDiaBan($diaBanId,$diaBanIdAll);\n $objWriter = NghiepVuPage::inLichTiepDan($diaBanIdAllArray);\n $objWriter->save('php://output');\n }", "title": "" }, { "docid": "3fe28a3087fd155c4156b0f88552c3ca", "score": "0.49429014", "text": "function adeudoHip($clave, $noControl){\n\t$iConn = odbc_connect(\"pensiones\",\"\",\"\",\"\");\n\t\n\t$iQuinPendH=0;\n\t$iPrestamoH=0;\n\t###### Funcion para obtener el numero de registros que devuelve un Select, ya que no funciona la funcion de odbc\n\tfunction numRows ($result,$odbcDbId,$sCriterio)\n\t{\n\t\t$numRecords = odbc_num_rows ($result);\n\t\tif ($numRecords < 0)\n\t\t{\n\t\t\t$countQueryString = \"SELECT count(*) as results FROM \".$sCriterio;\n\t\t\t$count = odbc_exec ($odbcDbId, $countQueryString);\n\t\t\t$numRecords = odbc_result ($count, \"results\");\n\t\t}\n\t\t\n\t\treturn $numRecords;\n\t} \n\t####### Fin Funcion\n\tif ($iConn) {\n\t\t$sQry = \"SELECT p.pripal_mph, p.int_mph, ab_pr_mph, ab_int_mph, qnas_mph, qna_ab_mph, feud_mph FROM \";\t\t\t\t\t\t\t\t\t\n\t\t$sCriterio = \"ampl_ph AS p \n\t\t\t\t\t WHERE p.ficha_df=\".$noControl.\" AND p.cve_ea=\".$clave.\" ORDER BY feud_mph\";\t\t\n\t\t$sQry.= $sCriterio;\n\t\t\n\t\t$iRs = odbc_exec($iConn, $sQry);\n\t\t\n\t\t$iNumRegs = numRows($iRs, $iConn, $sCriterio);\n\t\t\n\t\t$iPrestamoH=0;\n\t\t$iQuinPendH=0;\n\t\t$iPrin=0;\n\t\t$iIntH=0;\n\t\t$iAbonoHp=0;\n\t\t$iAbonoHi=0;\n\t\t$iQna=0;\n\t\t$iQnaAb=0;\n\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\twhile ($rows = odbc_fetch_object($iRs)) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t$iPrin+=trim($rows->pripal_mph);\n\t\t\t\t$iIntH+=trim($rows->int_mph);\n\t\t\t\t$iAbonoHp+=trim($rows->ab_pr_mph);\n\t\t\t\t$iAbonoHi+=trim($rows->ab_int_mph);\n\t\t\t\t$iQna=$rows->qnas_mph;\n\t\t\t\t$iQnaAb=$rows->qna_ab_mph;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$iQuinPendH=$iQna-$iQnaAb;\t#Quincenas por pagar\n\t\t$iPrestamoH=($iPrin+$iIntH)-($iAbonoHp+$iAbonoHi);\t#Obtenemos el Saldo Hip. pendiente\n\t}\n\todbc_close($iConn);\n\t\n\treturn array(\"adeudo\" => $iPrestamoH,\n\t\t\t\t \"quincenas\" => $iQuinPendH\t\t\t \n\t\t\t);\n}", "title": "" }, { "docid": "2a0cd7b07999eb5cd96aaa12c17b9f9a", "score": "0.49407792", "text": "function getDiasHabiles($fechainicio, $fechafin, $diasferiados = array()) {\n global $array_fines_semana;\n global $activarFestivos;\n \n // Convirtiendo en timestamp las fechas\n $fechainicio = strtotime($fechainicio);\n $fechafin = strtotime($fechafin);\n\n // Incremento en 1 dia\n $diainc = 24*60*60;\n\n // Arreglo de dias habiles, inicianlizacion\n $diashabiles = array();\n\n // Se recorre desde la fecha de inicio a la fecha fin, incrementando en 1 dia\n for ($midia = $fechainicio; $midia <= $fechafin; $midia += $diainc) {\n // Si el dia indicado, no es sabado o domingo es habil\n //array(6,7) -> array(sabado, domingo) //lo que quiero es solamente domingo -> array(7)\n if (!in_array(date('N', $midia), $array_fines_semana)) { // DOC: http://www.php.net/manual/es/function.date.php\n // Si no es un dia feriado entonces es habil\n if($activarFestivos == \"off\"){\n if (!in_array(date('Y-m-d', $midia), $diasferiados)) {\n array_push($diashabiles, date('Y-m-d', $midia));\n }\n }else{\n array_push($diashabiles, date('Y-m-d', $midia));\n }\n }\n }\n\n return $diashabiles;\n}", "title": "" }, { "docid": "65667e5389f7b7e9929b538613ffba02", "score": "0.49372348", "text": "private function izvuciDan() {\r\n $this->DD = self::$JMBG[0] . self::$JMBG[1];\r\n }", "title": "" }, { "docid": "4d6005d9fd5559bcde20ad52b6d7a6b4", "score": "0.49367258", "text": "function getPriceFormatoPorClaveMoneda($dsClaveMoneda,$result,$dataProducto)\n {\n //ADULTO\n $regular = \"adultoPrecioRegular\".$dsClaveMoneda;\n $unitario = \"adultoPrecioUnitario\".$dsClaveMoneda;\n $ahorro = \"adultoAhorro\".$dsClaveMoneda;\n $tipoCambio = \"tipoCambio\".$dsClaveMoneda;\n\n // $dsSimbolo = utf8_decode($dataProducto['Adulto']['dsSimbolo_MS'.$dsClaveMoneda]);\n $dsSimbolo = trim($dataProducto['Adulto']['dsSimbolo_MS'.$dsClaveMoneda]);\n if(trim($dsSimbolo)==''){$dsSimbolo = trim($dataProducto['Menor']['dsSimbolo_MS'.$dsClaveMoneda]);}\n if(trim($dsSimbolo)==''){$dsSimbolo = trim($dataProducto['Individuales']['dsSimbolo_MS'.$dsClaveMoneda]);}\n\n $result->$regular = (float)$dataProducto['Adulto']['mnPrecio'.$dsClaveMoneda];\n $result->$unitario = (float)$dataProducto['Adulto']['mnPrecioDescuento'.$dsClaveMoneda];\n $result->$ahorro = (float)$dataProducto['Adulto']['mnAhorro'.$dsClaveMoneda];\n\n $price = number_format($result->$regular, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$regular = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n $price = number_format($result->$unitario, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$unitario = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n $price = number_format($result->$ahorro, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$ahorro = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n //INDIVIDUAL\n $regular = \"individualPrecioRegular\".$dsClaveMoneda;\n $unitario = \"individualPrecioUnitario\".$dsClaveMoneda;\n $ahorro = \"individualAhorro\".$dsClaveMoneda;\n\n $result->$regular = (float)$dataProducto['Individuales']['mnPrecio'.$dsClaveMoneda];\n $result->$unitario = (float)$dataProducto['Individuales']['mnPrecioDescuento'.$dsClaveMoneda];\n $result->$ahorro = (float)$dataProducto['Individuales']['mnAhorro'.$dsClaveMoneda];\n\n $price = number_format($result->$regular, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$regular = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n $price = number_format($result->$unitario, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$unitario = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n $price = number_format($result->$ahorro, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$ahorro = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n //MENOR\n $regular = \"menoresPrecioRegular\".$dsClaveMoneda;\n $unitario = \"menoresPrecioUnitario\".$dsClaveMoneda;\n $ahorro = \"menoresAhorro\".$dsClaveMoneda;\n\n $result->$regular = (float)$dataProducto['Menor']['mnPrecio'.$dsClaveMoneda];\n $result->$unitario = (float)$dataProducto['Menor']['mnPrecioDescuento'.$dsClaveMoneda];\n $result->$ahorro = (float)$dataProducto['Menor']['mnAhorro'.$dsClaveMoneda];\n\n $price = number_format($result->$regular, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$regular = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n $price = number_format($result->$unitario, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$unitario = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n $price = number_format($result->$ahorro, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$ahorro = $dsSimbolo.\" \".$parts[0] . \"<sup><u>\" . $parts[1] . \"</u></sup> <small> \".$dsClaveMoneda.\"</small>\";\n\n\n $result->$tipoCambio = (float)$dataProducto['Adulto']['mnTipoCambio'.$dsClaveMoneda];\n\n return $result;\n }", "title": "" }, { "docid": "72d0e19bda811f85c2a7c1e1e6394d82", "score": "0.493476", "text": "function buatKode($tabel, $inisial){\r\n\t$struktur\t= mysql_query(\"SELECT * FROM $tabel\");\r\n\t$field\t\t= mysql_field_name($struktur,0);\r\n\t$panjang\t= mysql_field_len($struktur,0);\r\n\r\n \t$qry\t= mysql_query(\"SELECT MAX(\".$field.\") FROM \".$tabel);\r\n \t$row\t= mysql_fetch_array($qry); \r\n \tif ($row[0]==\"\") {\r\n \t\t$angka=0;\r\n\t}\r\n \telse {\r\n \t\t$angka\t\t= substr($row[0], strlen($inisial));\r\n \t}\r\n\t\r\n \t$angka++;\r\n \t$angka\t=strval($angka); \r\n \t$tmp\t=\"\";\r\n \tfor($i=1; $i<=($panjang-strlen($inisial)-strlen($angka)); $i++) {\r\n\t\t$tmp=$tmp.\"0\";\t\r\n\t}\r\n \treturn $inisial.$tmp.$angka;\r\n}", "title": "" }, { "docid": "1453c3afaadc4d960ad92cd140e16a74", "score": "0.49311647", "text": "function devolverXpelicula($pelicula) {\r\n\t$distancia = 18 - strlen($pelicula);\r\n\tif ($distancia < 0) {\r\n\t\treturn 302;\t\r\n\t} else {\r\n\t\treturn (($distancia/2)*12) + 275;\t\r\n\t}\r\n}", "title": "" }, { "docid": "9bb27ea04d0f78c017f19d12f23b8e66", "score": "0.4929608", "text": "function ferie($mois , $an) \n{\n// passez un tableau de mois (ferie(range(1,12), $an);\n// pour les avoir sur plusieurs annees\n// ferie(range(1,24), $an); ferie(range(36,12), $an);\n\tif (is_array($mois))\n\t{\n\t\t$retour = array();\n\t\tforeach ($mois as $m)\n\t\t{\n\t\t\t$r = ferie($m, $an);\n\t\t\t$retour[$m] = ferie($m, $an);\n\t\t}\n\t\treturn $retour;\n\t}\n\n\t// calcul des jours feries pour un seul mois.\n\tif (mktime(0,0,0,$mois, 1,$an) == -1)\n\t{ \n\t\treturn FALSE;\n\t}\n\tlist($mois, $an) = explode(\"-\", date(\"m-Y\", mktime(0,0,0,$mois, 1, $an)));\n\t$an = intval($an);\n\t$mois = intval($mois);\n\n\t// une constante\n\t$jour = 3600*24;\n\n\t// quelques fetes mobiles\n\t$lundi_de_paques['mois'] = date( \"n\", easter_date($an)+1*$jour);\n\t$lundi_de_paques['jour'] = date( \"j\", easter_date($an)+1*$jour);\n\t$lundi_de_paques['nom'] = \"Lundi de P&acirc;ques\";\n\n\t$ascencion['mois'] = date( \"n\", easter_date($an)+39*$jour);\n\t$ascencion['jour'] = date( \"j\", easter_date($an)+39*$jour);\n\t$ascencion['nom'] = \"Jeudi de l'ascenscion\";\n\n\t$vendredi_saint['mois'] = date( \"n\", easter_date($an)-2*$jour);\n\t$vendredi_saint['jour'] = date( \"j\", easter_date($an)-2*$jour);\n\t$vendredi_saint['nom'] = \"Vendredi Saint\";\n\n\t$lundi_de_pentecote['mois'] = date( \"n\", easter_date($an)+50*$jour);\n\t$lundi_de_pentecote['jour'] = date( \"j\", easter_date($an)+50*$jour);\n\t$lundi_de_pentecote['nom'] = \"Lundi de Pentec&ocirc;te\";\n\n\t// France\n\t$ferie[\"Jour de l'an\"][1] = 1;\n\t$ferie[\"Armistice 39-45 \"][5] = 8;\n\t$ferie[\"Toussaint\"][11] = 1;\n\t$ferie[\"Armistice 14-18\"][11] = 11;\n\t$ferie[\"Assomption\"][8] =15;\n\t$ferie[\"F&ecirc;te du travail \"][5] =1;\n\t$ferie[\"F&ecirc;te nationale\"][7] =14;\n\t$ferie[\"No&euml;l\"][12] = 25;\n\t$ferie[\"Lendemain de No&euml;l (Alsace seulement)\"][12] = 25;\n\t$ferie[$lundi_de_paques['nom']][$lundi_de_paques['mois']] = $lundi_de_paques['jour'];\n\t$ferie[$lundi_de_pentecote['nom']][$lundi_de_pentecote['mois']] = $lundi_de_pentecote['jour'];\n\t$ferie[$ascencion['nom']][$ascencion['mois']] = $ascencion['jour'];\n\t$ferie[$vendredi_saint['nom'].\" (Alsace)\"][$vendredi_saint['mois']]= $vendredi_saint['jour'];\n\n\t// reponse\n\t$reponse = array();\n\twhile(list($nom, $date)= each($ferie))\n\t{\n\t\tif (isset($date[$mois]))\n\t\t{\n\t\t\t// une fete a date calculable\n\t\t\t$reponse[$date[$mois]]=$nom;\n\t\t}\n\t}\n\tksort($reponse);\n\treturn $reponse;\n}", "title": "" }, { "docid": "6fa97a0d9f775794750aabf9d20497ec", "score": "0.49258226", "text": "function calcularDias ($fecha)\r\n {\r\n $aux = explode (\"-\",$fecha);\r\n $dia = $aux[0];\r\n $mes = $aux[1];\r\n $annio = $aux[2];\r\n $dias[hoy] = $fecha;\r\n $dias[cal] = $aux[2].\"/\".$aux[1].\"/\".$aux[0];\r\n $diam = (int)$dia + 1;\r\n $diaa = (int)$dia -1;\r\n $mesm = $mesa = $mes;\r\n $anniom = $annioa = $annio;\r\n \r\n if($diam == 31) \r\n {\r\n switch($mes)\r\n {\r\n case 4:\r\n case 6:\r\n case 9:\r\n case 11:\r\n $diam = 1;\r\n $mesm ++;\r\n break; \r\n }\r\n } \r\n if($diam == 32)\r\n {\r\n $diam = 1;\r\n if($mes == 12)\r\n {\r\n $mesm = 1;\r\n $anniom ++;\r\n }else\r\n $mesm ++; \r\n }\r\n if(($diam == 29)&&($mes == 2))\r\n {\r\n $diam = 1;\r\n $mesm ++; \r\n } \r\n if($diaa == 0)\r\n {\r\n $mesa --;\r\n switch ($mesa)\r\n {\r\n case 1:\r\n case 3:\r\n case 5:\r\n case 7:\r\n case 8:\r\n case 10:\r\n $diaa = 31;\r\n break;\r\n case 2:\r\n $diaa = 28;\r\n break;\r\n case 0:\r\n $diaa = 31;\r\n $mesa = 12;\r\n $annioa --;\r\n break;\r\n default:\r\n $diaa = 30;\r\n break;\r\n }\r\n }\r\n $dias[mannana] = $diam.\"-\".$mesm.\"-\".$anniom;\r\n $dias[ayer] = $diaa.\"-\".$mesa.\"-\".$annioa;\r\n return $dias; \r\n }", "title": "" }, { "docid": "a2b0625b6de40b900349121a306368ca", "score": "0.4922023", "text": "function kekata($x)\n{\n\t$x = abs($x);\n\t$angka = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\",\n\t\"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n\t$temp = \"\";\n\tif ($x <12) {\n\t\t$temp = \" \". $angka[$x];\n\t} else if ($x <20) {\n\t\t$temp = self::kekata($x - 10). \" belas\";\n\t} else if ($x <100) {\n\t\t$temp = self::kekata($x/10).\" puluh\". self::kekata($x % 10);\n\t} else if ($x <200) {\n\t\t$temp = \" seratus\" . self::kekata($x - 100);\n\t} else if ($x <1000) {\n\t\t$temp = self::kekata($x/100) . \" ratus\" . self::kekata($x % 100);\n\t} else if ($x <2000) {\n\t\t$temp = \" seribu\" . self::kekata($x - 1000);\n\t} else if ($x <1000000) {\n\t\t$temp = self::kekata($x/1000) . \" ribu\" . self::kekata($x % 1000);\n\t} else if ($x <1000000000) {\n\t\t$temp = self::kekata($x/1000000) . \" juta\" . self::kekata($x % 1000000);\n\t} else if ($x <1000000000000) {\n\t\t$temp = self::kekata($x/1000000000) . \" milyar\" . self::kekata(fmod($x,1000000000));\n\t} else if ($x <1000000000000000) {\n\t\t$temp = self::kekata($x/1000000000000) . \" trilyun\" . self::kekata(fmod($x,1000000000000));\n\t}\n\t\treturn $temp;\n}", "title": "" }, { "docid": "1b9246b818a3a96c4e846d3d54b411a6", "score": "0.49154145", "text": "function data_ita($data)\n{\n\t$gg = substr($data, 8, 2);\n\t$mm = substr($data, 5, 2);\n\t$aa = substr($data, 0, 4);\n\t\n\treturn $gg . \"/\" . $mm . \"/\" . $aa;\n}", "title": "" }, { "docid": "75fa197021b89c5b79507d5848eb3bfa", "score": "0.4912362", "text": "function layds(){\n $this->getsql('select * from nhacungcap where trangthai!=3');\n return $this->loadrows();\n }", "title": "" }, { "docid": "55af5f6b6d4e4f84078411ddc5624f4e", "score": "0.4909552", "text": "function getPricePorClaveMoneda($dsClaveMoneda,$result,$dataProducto)\n {\n //ADULTO\n $regular = \"adultoPrecioRegular\".$dsClaveMoneda;\n $regularpesos = \"adultoPrecioRegularPesos\".$dsClaveMoneda;\n $regularcentavos = \"adultoPrecioRegularCentavos\".$dsClaveMoneda;\n $unitario = \"adultoPrecioUnitario\".$dsClaveMoneda;\n $unitariopesos='adultoPrecioUnitarioPesos'.$dsClaveMoneda;\n $unitariocentavos = 'adultoPrecioUnitarioCentavos'.$dsClaveMoneda;\n $ahorro = \"adultoAhorro\".$dsClaveMoneda;\n $ahorropesos='adultoAhorroPesos'.$dsClaveMoneda;\n $ahorrocentavos='adultoAhorroCentavos'.$dsClaveMoneda;\n // $dsSimbolo = utf8_decode($dataProducto['Adulto']['dsSimbolo_MS'.$dsClaveMoneda]);\n $dsSimbolo = trim($dataProducto['Adulto']['dsSimbolo_MS'.$dsClaveMoneda]);\n if(trim($dsSimbolo)==''){$dsSimbolo = trim($dataProducto['Menor']['dsSimbolo_MS'.$dsClaveMoneda]);}\n if(trim($dsSimbolo)==''){$dsSimbolo = trim($dataProducto['Individuales']['dsSimbolo_MS'.$dsClaveMoneda]);}\n\n $result->$regular = (float)$dataProducto['Adulto']['mnPrecio'.$dsClaveMoneda];\n $result->$unitario = (float)$dataProducto['Adulto']['mnPrecioDescuento'.$dsClaveMoneda];\n $result->$ahorro = (float)$dataProducto['Adulto']['mnAhorro'.$dsClaveMoneda];\n\n $price = number_format($result->$regular, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$regularpesos = $parts[0];\n $result->$regularcentavos = $parts[1];\n\n $price = number_format($result->$unitario, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$unitariopesos = $parts[0];\n $result->$unitariocentavos = $parts[1];\n\n $price = number_format($result->$ahorro, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$ahorropesos = $parts[0];\n $result->$ahorrocentavos = $parts[1];\n\n if ((int)$result->$regularpesos === 0) { $result->$regularpesos = \"00\"; }\n if ((int)$result->$regularcentavos === 0) { $result->$regularcentavos = \"00\"; }\n if ((int)$result->$unitariopesos === 0) { $result->$unitariopesos = \"00\"; }\n if ((int)$result->$unitariocentavos === 0) { $result->$unitariocentavos = \"00\"; }\n if ((int)$result->$ahorropesos === 0) { $result->$ahorropesos = \"00\"; }\n if ((int)$result->$ahorrocentavos === 0) { $result->$ahorrocentavos = \"00\"; }\n\n //asignacion de simbolo e iso de la moneda\n $result->$regular = $dsSimbolo.\" \".truncateFloat($dataProducto['Adulto']['mnPrecio'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n $result->$unitario = $dsSimbolo.\" \".truncateFloat($dataProducto['Adulto']['mnPrecioDescuento'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n $result->$ahorro = $dsSimbolo.\" \".truncateFloat($dataProducto['Adulto']['mnAhorro'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n\n //MENOR\n $regular = \"menoresPrecioRegular\".$dsClaveMoneda;\n $regularpesos = \"menoresPrecioRegularPesos\".$dsClaveMoneda;\n $regularcentavos = \"menoresPrecioRegularCentavos\".$dsClaveMoneda;\n $unitario = \"menoresPrecioUnitario\".$dsClaveMoneda;\n $unitariopesos='menoresPrecioUnitarioPesos'.$dsClaveMoneda;\n $unitariocentavos = 'menoresPrecioUnitarioCentavos'.$dsClaveMoneda;\n $ahorro = \"menoresAhorro\".$dsClaveMoneda;\n $ahorropesos='menoresAhorroPesos'.$dsClaveMoneda;\n $ahorrocentavos='menoresAhorroCentavos'.$dsClaveMoneda;\n\n $result->$regular = (float)$dataProducto['Menor']['mnPrecio'.$dsClaveMoneda];\n $result->$unitario = (float)$dataProducto['Menor']['mnPrecioDescuento'.$dsClaveMoneda];\n $result->$ahorro = (float)$dataProducto['Menor']['mnAhorro'.$dsClaveMoneda];\n\n $price = number_format($result->$regular, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$regularpesos = $parts[0];\n $result->$regularcentavos = $parts[1];\n\n $price = number_format($result->$unitario, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$unitariopesos = $parts[0];\n $result->$unitariocentavos = $parts[1];\n\n $price = number_format($result->$ahorro, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$ahorropesos = $parts[0];\n $result->$ahorrocentavos = $parts[1];\n\n if ((int)$result->$regularpesos === 0) { $result->$regularpesos = \"00\"; }\n if ((int)$result->$regularcentavos === 0) { $result->$regularcentavos = \"00\"; }\n if ((int)$result->$unitariopesos === 0) { $result->$unitariopesos = \"00\"; }\n if ((int)$result->$unitariocentavos === 0) { $result->$unitariocentavos = \"00\"; }\n if ((int)$result->$ahorropesos === 0) { $result->$ahorropesos = \"00\"; }\n if ((int)$result->$ahorrocentavos === 0) { $result->$ahorrocentavos = \"00\"; }\n\n //asignacion de simbolo e iso de la moneda\n $result->$regular = $dsSimbolo.\" \".truncateFloat($dataProducto['Menor']['mnPrecio'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n $result->$unitario = $dsSimbolo.\" \".truncateFloat($dataProducto['Menor']['mnPrecioDescuento'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n $result->$ahorro = $dsSimbolo.\" \".truncateFloat($dataProducto['Menor']['mnAhorro'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n\n //INDIVIDUAL\n $regular = \"individualPrecioRegular\".$dsClaveMoneda;\n $regularpesos = \"individualPrecioRegularPesos\".$dsClaveMoneda;\n $regularcentavos = \"individualPrecioRegularCentavos\".$dsClaveMoneda;\n $unitario = \"individualPrecioUnitario\".$dsClaveMoneda;\n $unitariopesos='individualPrecioUnitarioPesos'.$dsClaveMoneda;\n $unitariocentavos = 'individualPrecioUnitarioCentavos'.$dsClaveMoneda;\n $ahorro = \"individualAhorro\".$dsClaveMoneda;\n $ahorropesos='individualAhorroPesos'.$dsClaveMoneda;\n $ahorrocentavos='individualAhorroCentavos'.$dsClaveMoneda;\n $result->$regular = (float)$dataProducto['Individuales']['mnPrecio'.$dsClaveMoneda];\n $result->$unitario = (float)$dataProducto['Individuales']['mnPrecioDescuento'.$dsClaveMoneda];\n $result->$ahorro = (float)$dataProducto['Individuales']['mnAhorro'.$dsClaveMoneda];\n\n $price = number_format($result->$regular, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$regularpesos = $parts[0];\n $result->$regularcentavos = $parts[1];\n\n $price = number_format($result->$unitario, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$unitariopesos = $parts[0];\n $result->$unitariocentavos = $parts[1];\n\n $price = number_format($result->$ahorro, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n $result->$ahorropesos = $parts[0];\n $result->$ahorrocentavos = $parts[1];\n\n if ($result->$regularpesos === 0) { $result->$regularpesos = \"00\"; }\n if ($result->$regularcentavos === 0) { $result->$regularcentavos = \"00\"; }\n if ($result->$unitariopesos === 0) { $result->$unitariopesos = \"00\"; }\n if ($result->$unitariocentavos === 0) { $result->$unitariocentavos = \"00\"; }\n if ($result->$ahorropesos === 0) { $result->$ahorropesos = \"00\"; }\n if ($result->$ahorrocentavos === 0) { $result->$ahorrocentavos = \"00\"; }\n\n //asignacion de simbolo e iso de la moneda\n $result->$regular = $dsSimbolo.\" \".truncateFloat($dataProducto['Individuales']['mnPrecio'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n $result->$unitario = $dsSimbolo.\" \".truncateFloat($dataProducto['Individuales']['mnPrecioDescuento'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n $result->$ahorro = $dsSimbolo.\" \".truncateFloat($dataProducto['Individuales']['mnAhorro'.$dsClaveMoneda],2).\" \".$dsClaveMoneda;\n\n return $result;\n\n }", "title": "" }, { "docid": "c36c11adf0f2618a1c2f27c40f8dd370", "score": "0.49062064", "text": "function zaradaOdsustvoPraznik() {\n return round($this->karnet->getValue('satiOdsustvoPraznik') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "cbd4c9bc682423bb4118eb8f5fb3fad9", "score": "0.48989573", "text": "function getTampilAbsensi($conn,$idseminar,$periode,$nopeserta = '') {\n\t\t\t$sql = \"select s.namaseminar, \n\t\t\t\t\t s.tglawaldaftar, \n\t\t\t\t\t s.tglakhirdaftar, \n\t\t\t\t\t s.tglkegiatan,s.koderuang,\n\t\t\t\t\t s.periode, \n\t\t\t\t\t pd.nama, \n\t\t\t\t\t pd.sex, \n\t\t\t\t\t s.jammulai,\n\t\t\t\t\t s.jamselesai,\n\t\t\t\t\t p.*,ps.namapembicara,\n\t\t\t\t\t u.namaunit, up.namaunit as fakultas,\n\t\t\t\t\t\t p.kritik, p.saran,\n\t\t\t\t\t\t u.kodeunit, s.idseminar\n\t\t\t\t\tfrom seminar.ms_peserta p \n\t\t\t\t\t left join seminar.ms_seminar s \n\t\t\t\t\t on s.idseminar = p.idseminar\n\t\t\t\t\t left join (select idseminar,idpembicara as namapembicara from seminar.sm_pembicara\n\t\t\t\t\t ) ps on ps.idseminar = s.idseminar \n\t\t\t\t\t left join seminar.ms_pendaftar pd \n\t\t\t\t\t on pd.nopendaftar = p.nopendaftar\n\t\t\t\t\t left join akademik.ms_mahasiswa m\n\t\t\t\t\t on m.nim = pd.nim\n\t\t\t\t\t left join gate.ms_unit u\n\t\t\t\t\t on m.kodeunit = u.kodeunit\n\t\t\t\t\t left join gate.ms_unit up\n\t\t\t\t\t on up.kodeunit = u.kodeunitparent\n\t\t\t\t\twhere s.idseminar ='\".$idseminar.\"'\n\t\t\t\t\tand s.periode ='\".$periode.\"'\";\n\t\t\t\t\tif (!empty ($nopeserta))\n\t\t\t\t\t$sql.=\" and p.nopeserta = '$nopeserta'\";\n\t\t\t\t\n\t\t\t\t\t$sql.=\" order by up.namaunit, pd.nama ASC\";\n\n\t\t\treturn $conn->GetArray($sql);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3d60272b2ba4688979f13fa75a456808", "score": "0.4893084", "text": "public function datenZaehlen()\n {\n // oeffnen der Datenbankverbindung\n $this->oeffneVerbindung();\n // erstellen der DB Abfrage\n $Abfrage = \"SELECT * FROM bedemi_data\";\n // zwischenspeichern der Tupelanzahl\n $hilf = $this->connection->query($Abfrage)->num_rows;\n // schliessen der Datenbankverbindung\n $this->schliesseVerbindung();\n // Rueckgabe der Tupelanzahl\n return $hilf;\n }", "title": "" }, { "docid": "34e7b56f72cca6bd0e12ca5da06b2d4f", "score": "0.4893062", "text": "function nutritionSlices($key, $orgType, $time_period) {\n $denoms = array (\n \"-1\" => \"r.patientID IS NULL\n AND s.ageInMos BETWEEN 6 AND 59\n AND\n (s.nutritionalEdema = 1\n OR\n s.bmi > 0\n )\",\n \"-2\" => \"r.patientID IS NULL\n AND s.ageInMos BETWEEN 6 AND 59\n AND s.bmi > 0\",\n \"-3\" => \"r.patientID IS NULL\n AND s.ageInMos BETWEEN 60 AND 228 \n AND s.bmi > 0\",\n \"-4\" => \"r.patientID IS NULL\n AND s.ageInMos >= 229\n AND s.bmi > 0\",\n \"-5\" => \"s.visitDate BETWEEN r.startDate AND r.stopDate\n AND s.armCirc > 0\",\n \"-6\" => \"r.patientID IS NULL\n AND FLOOR(DATEDIFF(e.visitDate, p.dob) / \" . DAYS_IN_MONTH . \") BETWEEN 6 AND 59\"\n );\n\n // SQL, parameters and 'denoms' index for all indicators\n $indicators = array (\n 1 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE r.patientID IS NULL\n AND s.ageInMos BETWEEN 6 AND 59\n AND s.wtInKgs > 0\", array () , \"-6\"),\n 2 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE r.patientID IS NULL\n AND s.ageInMos BETWEEN 6 AND 59\n AND s.htInMeters > 0\", array () , \"-6\"),\n 3 => array (\n \" dw_weightForHeightLookup l,\n patient p,\n dw_nutrition_snapshot s\n LEFT JOIN dw_nutrition_snapshot s2 ON s.patientID = s2.patientID\n AND #period_value# = #period#(s2.visitDate#period_param#)\n AND s2.nutritionalEdema = 1\n LEFT JOIN dw_pregnancy_ranges r ON s.patientID = r.patientID\n WHERE r.patientID IS NULL\n AND p.patientID = s.patientID\n AND s.ageInMos BETWEEN 6 AND 59\n AND s2.patientID IS NULL\n AND s.nutritionalEdema = 0\n AND\n CASE WHEN p.sex = 1 THEN ?\n WHEN p.sex = 2 THEN ? END = l.gender\n AND\n CASE WHEN s.ageInMos <= 24 THEN ?\n WHEN s.ageInMos BETWEEN 25 AND 59 THEN ? END = l.maxAgeInYrs\n AND ROUND(s.htInMeters * 200) / 2 = l.heightInCm\n AND s.htInMeters > 0\n AND s.wtInKgs > 0\n AND s.wtInKgs <= l.minus2Sd\n AND s.wtInKgs > l.minus3Sd\", array ('f', 'm', '2', '5'), \"-2\"),\n 4 => array (\n \" patient p,\n dw_weightForHeightLookup l,\n dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r ON s.patientID = r.patientID\n WHERE r.patientID IS NULL\n AND p.patientID = s.patientID\n AND s.ageInMos BETWEEN 6 AND 59\n AND\n (s.nutritionalEdema = 1\n OR\n (CASE WHEN p.sex = 1 THEN ?\n WHEN p.sex = 2 THEN ? END = l.gender\n AND CASE WHEN s.ageInMos <= 24 THEN ?\n WHEN s.ageInMos BETWEEN 25 AND 59 THEN ? END = l.maxAgeInYrs\n AND ROUND(s.htInMeters * 200) / 2 = l.heightInCm\n AND s.htInMeters > 0\n AND s.wtInKgs > 0\n AND s.wtInKgs <= l.minus3Sd\n )\n )\", array ('f', 'm', '2', '5'), \"-1\"),\n 5 => array (\n \" patient p,\n dw_measureForAgeLookup l,\n dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r ON s.patientID = r.patientID\n WHERE r.patientID IS NULL\n AND p.patientID = s.patientID\n AND s.ageInMos BETWEEN 60 AND 228\n AND\n CASE WHEN p.sex = 1 THEN ?\n WHEN p.sex = 2 THEN ? END = l.gender\n AND s.ageInMos = l.ageInMos\n AND l.measure = ?\n AND s.bmi > l.plus1Sd\n AND s.bmi <= l.plus2Sd\", array ('f', 'm', 'bmi'), \"-3\"),\n 6 => array (\n \" patient p,\n dw_measureForAgeLookup l,\n dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r ON s.patientID = r.patientID\n WHERE r.patientID IS NULL\n AND p.patientID = s.patientID\n AND s.ageInMos BETWEEN 60 AND 228\n AND\n CASE WHEN p.sex = 1 THEN ?\n WHEN p.sex = 2 THEN ? END = l.gender\n AND s.ageInMos = l.ageInMos\n AND l.measure = ?\n AND s.bmi > l.plus2Sd\", array ('f', 'm', 'bmi'), \"-3\"),\n 7 => array (\n \" patient p,\n dw_measureForAgeLookup l,\n dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r ON s.patientID = r.patientID\n WHERE r.patientID IS NULL\n AND p.patientID = s.patientID\n AND s.ageInMos BETWEEN 60 AND 228\n AND\n CASE WHEN p.sex = 1 THEN ?\n WHEN p.sex = 2 THEN ? END = l.gender\n AND s.ageInMos = l.ageInMos\n AND l.measure = ?\n AND s.bmi < l.minus2Sd\n AND s.bmi >= l.minus3Sd\", array ('f', 'm', 'bmi'), \"-3\"),\n 8 => array (\n \" patient p,\n dw_measureForAgeLookup l,\n dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r ON s.patientID = r.patientID\n WHERE r.patientID IS NULL\n AND p.patientID = s.patientID\n AND s.ageInMos BETWEEN 60 AND 228\n AND\n CASE WHEN p.sex = 1 THEN ?\n WHEN p.sex = 2 THEN ? END = l.gender\n AND s.ageInMos = l.ageInMos\n AND l.measure = ?\n AND s.bmi > 0\n AND s.bmi < l.minus3Sd\", array ('f', 'm', 'bmi'), \"-3\"),\n 9 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE r.patientID IS NULL\n AND s.ageInMos >= 229\n AND s.bmi BETWEEN 18.51 AND 24.99\", array (), \"-4\"),\n 10 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE r.patientID IS NULL\n AND s.ageInMos >= 229\n AND s.bmi >= 25\n AND s.bmi < 30\", array (), \"-4\"),\n 11 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE r.patientID IS NULL\n AND s.ageInMos >= 229\n AND s.bmi >= 30\", array (), \"-4\"),\n 12 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE r.patientID IS NULL\n AND s.ageInMos >= 229\n AND s.bmi > 0\n AND s.bmi <= 18.5\", array (), \"-4\"),\n 13 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE s.visitDate BETWEEN r.startDate AND r.stopDate\n AND s.armCirc BETWEEN 0.01 AND 21\", array (), \"-5\"),\n 14 => array (\n \" dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE s.visitDate BETWEEN r.startDate AND r.stopDate\n AND s.armCirc >= 23\", array (), \"-5\"),\n );\n \n $slicesTempTables = createTempTables (\"tempNutritionSlices\", 2, array (\"org_unit varchar(64), org_value varchar(255), indicator tinyint unsigned, time_period varchar(16), `year` smallint unsigned, period smallint unsigned, gender tinyint unsigned, `value` decimal(9,1), primary key (org_unit, org_value, indicator, time_period, `year`, period, gender)\", \"org_unit varchar(64), org_value varchar(255), indicator tinyint unsigned, time_period varchar(16), `year` smallint unsigned, period smallint unsigned, gender tinyint unsigned, `value` decimal(9,1), primary key (org_unit, org_value, indicator, time_period, `year`, period, gender)\"));\n\n $baseInd = 1;\n foreach ($indicators as $ind => $arr) {\n // Run certain queries only if this indicator is the last of a group\n // that share the same denominator\n $denomInd = ($ind == 2 || $ind == 3 || $ind == 4 || $ind == 8 || $ind == 12 || $ind == 14) ? 1 : 0;\n\n // Store patientIDs per indicator for drill-down purposes\n foreach ($time_period as $period) {\n $period_value = $period . \"(s.visitDate\" . ($period == \"Week\" ? \", 2) \" : \") \");\n $froms = array (\"#period#\", \"#period_value#\", \"#period_param#\");\n $tos = array ($period, $period_value, ($period == \"Week\" ? \", 2\" : \"\"));\n $sql = \"INSERT INTO dw_nutrition_patients \n SELECT DISTINCT $ind, ?, YEAR(s.visitDate),\n $period_value, s.patientID\n FROM \" .\n str_replace ($froms, $tos, $arr[0]);\n $rc = database()->query ($sql, array_merge (array ($period), str_replace ($froms, $tos, $arr[1])))->rowCount();\n\n if ($denomInd) {\n // Insert denominator patients into dw_nutrition_patients, but with\n // the denominator index as the indicator value\n if ($arr[2] > -6) {\n $sql = \"INSERT INTO dw_nutrition_patients\n SELECT DISTINCT \" . $arr[2] . \", ?, YEAR(s.visitDate),\n $period_value, s.patientID\n FROM dw_nutrition_snapshot s\n LEFT JOIN dw_pregnancy_ranges r USING (patientID)\n WHERE \" . $denoms[$arr[2]];\n } else {\n // Denominator -6 is a special case, since it may include patients\n // not in the snapshot table, basically just all patients with a\n // visit in the period within the age group of the numerator.\n $period_value = $period . \"(e.visitDate\" . ($period == \"Week\" ? \", 2) \" : \") \");\n $sql = \"INSERT INTO dw_nutrition_patients\n SELECT DISTINCT \" . $arr[2] . \", ?, YEAR(e.visitDate),\n $period_value, e.patientID\n FROM \" . $GLOBALS['tempTableNames'][1] . \" p, encValidAll e\n LEFT JOIN dw_pregnancy_ranges r ON e.patientID = r.patientID\n WHERE e.patientID = p.patientID\n AND \" . $denoms[$arr[2]] . \"\n AND e.encounterType IN (1, 2, 16, 17, 24, 25, 27, 28, 29, 31)\";\n }\n $rc = database()->query ($sql, array ($period))->rowCount();\n }\n }\n\n // Store numerator data per indicator and org unit\n foreach ($orgType as $org_unit => $org_value) {\n $sql = \"INSERT INTO \" . $slicesTempTables[1] . \"\n SELECT ?, $org_value, $ind, p.time_period, p.year, p.period,\n t.sex, COUNT(DISTINCT p.patientID)\n FROM dw_nutrition_patients p,\n patient t\" .\n ($org_unit != \"Haiti\" ? \", clinicLookup l\" : \"\") . \" \n WHERE p.patientID = t.patientID\n AND p.indicator = ?\n AND t.sex IN (1, 2) \" .\n ($org_unit != \"Haiti\" ? \"AND l.siteCode = LEFT(p.patientID, 5)\" : \"\") . \" \n GROUP BY 1, 2, 3, 4, 5, 6, 7\";\n $params = $org_unit == \"Commune\" ? array ($org_unit, \"-\", $ind) : array ($org_unit, $ind);\n $rc = database()->query ($sql, $params)->rowCount();\n\n if ($denomInd) {\n for ($i = $baseInd; $i <= $ind; $i++) {\n // Store denominator data per indicator and org unit\n $sql = \"INSERT INTO \" . $slicesTempTables[2] . \"\n SELECT ?, $org_value, $i, p.time_period, p.year, p.period,\n t.sex, COUNT(DISTINCT p.patientID)\n FROM dw_nutrition_patients p,\n patient t\" .\n ($org_unit != \"Haiti\" ? \", clinicLookup l\" : \"\") . \" \n WHERE p.patientID = t.patientID\n AND p.indicator = ?\n AND t.sex IN (1, 2) \" .\n ($org_unit != \"Haiti\" ? \"AND l.siteCode = LEFT(p.patientID, 5)\" : \"\") . \" \n GROUP BY 1, 2, 3, 4, 5, 6, 7\";\n $params = $org_unit == \"Commune\" ? array ($org_unit, \"-\", $arr[2]) : array ($org_unit, $arr[2]);\n $rc = database()->query ($sql, $params)->rowCount();\n }\n }\n }\n\n // Merge num. and den. temp table rows into slices table\n if ($denomInd) {\n for ($i = $baseInd; $i <= $ind; $i++) {\n $sql = \"INSERT INTO dw_nutrition_slices\n SELECT d.org_unit, d.org_value, $i, d.time_period, d.year,\n d.period, d.gender, 0, d.value\n FROM \" . $slicesTempTables[2] . \" d\n ON DUPLICATE KEY UPDATE value = VALUES(value), denominator = VALUES(denominator)\";\n $rc = database()->query ($sql)->rowCount();\n \n $sql = \"INSERT INTO dw_nutrition_slices\n SELECT d.org_unit, d.org_value, $i, d.time_period, d.year,\n d.period, d.gender, IFNULL(p.value, 0), d.value\n FROM \" . $slicesTempTables[2] . \" d LEFT JOIN\n \" . $slicesTempTables[1] . \" p USING (org_unit, org_value, indicator, time_period, year, period, gender)\n WHERE d.indicator = $i\n ON DUPLICATE KEY UPDATE value = VALUES(value)\";\n $rc = database()->query ($sql)->rowCount();\n }\n // Clean-up\n truncateTable ($slicesTempTables[1]);\n truncateTable ($slicesTempTables[2]);\n $baseInd = $ind + 1;\n }\n }\n\n // Remove any rows where numerator and denominator are both zero\n $rc = database()->query ('DELETE FROM dw_nutrition_slices\n WHERE value = 0\n AND denominator = 0');\n dropTempTables ($slicesTempTables);\n}", "title": "" }, { "docid": "57193705495b44e3e938774e57c4f021", "score": "0.48756862", "text": "function converte_data($data){\n if($data != null){\n $dia = intval(substr($data, 8));\n $mes = intval(substr($data, 5, 6));\n $ano = intval(substr($data, 0, 4));\n\n if(strlen($dia) == 1)\n $dia = \"0\" . $dia;\n if(strlen($mes) == 1)\n $mes = \"0\" . $mes;\n\n return $dia . \"/\" . $mes . \"/\" . $ano;\n }\n return \"\";\n}", "title": "" }, { "docid": "8880deb681eddf6d561063e477597392", "score": "0.48634166", "text": "function fPresentaGrid($ilTipo, $ilNumProces){\n $qStr= \"SELECT concat(left(per_Apellidos, 15), ' ' ,left(per_Nombres,12)),\n tad_numtarja as TARJA,\n tad_secuencia as SEC,\n caj_Descripcion as CAJA,\n (tad_CantRecibida - tad_CantRechazada ) as EMBARCADO,\n (tad_CantRecibida - tad_CantRechazada ) * tad_valunitario AS 'PREC. OFICIAL' ,\n (tad_CantRecibida - tad_CantRechazada ) * tad_difunitario as ' ADELANTO'\n FROM ((liqtarjadetal join liqtarjacabec on tar_NUmTarja = tad_Numtarja)\n JOIN conpersonas on per_CodAuxiliar = tac_embarcador )\n JOIN liqcajas on caj_CodCaja = tad_CodCaja\n WHERE tad_LiqProceso = \" . $ilNumProces .\n \" ORDER BY 1, 2, 3 \";\n \n}", "title": "" }, { "docid": "052afbbab5f2822f5b92a985a84e632c", "score": "0.48569754", "text": "function juegaMaquina($tablero, $jugadaPersona, &$coordenadaMaquina){\n \n if(tableroLleno($tablero)){\n $tablero = tiradaAleatoria($tablero, $coordenadaMaquina);\n }else{\n $columna = array_count_values(array_column($tablero, $jugadaPersona['y'])); \n $fila = array_count_values($tablero[$jugadaPersona['x']]);\n $tirada = false;\n\n if($columna['x'] == 2){\n for($x=0;$x<3;$x++){\n if($tablero[$x][$jugadaPersona['y']] == \"\"){\n $tablero[$x][$jugadaPersona['y']] = \"o\";\n $coordenadaMaquina['x'] = $x;\n $coordenadaMaquina['y'] = $jugadaPersona['y'];\n $tirada = true;\n }\n }\n if(!$tirada){ \n $tablero = tiradaAleatoria($tablero, $coordenadaMaquina); \n } \n }elseif($fila['x'] == 2){\n for($x=0;$x<3;$x++){\n if($tablero[$jugadaPersona['x']][$x] == \"\"){\n $tablero[$jugadaPersona['x']][$x] = \"o\";\n $coordenadaMaquina['x'] = $jugadaPersona['x'];\n $coordenadaMaquina['y'] = $x;\n $tirada = true;\n }\n }\n if(!$tirada){\n $tablero = tiradaAleatoria($tablero, $coordenadaMaquina);\n } \n }else{\n $y = 2;\n $transversalIzq = \"\";\n $transversalDcha = \"\";\n for($x=0;$x<3;$x++){\n $transversalIzq = $transversalIzq . $tablero[$x][$x];\n $transversalDcha = $transversalDcha . $tablero[$x][$y];\n $y--;\n }\n if($transversalIzq == \"xx\"){\n for($x=0;$x<3;$x++){\n if($tablero[$x][$x] == \"\"){\n $tablero[$x][$x] = \"o\";\n $coordenadaMaquina['x'] = $x;\n $coordenadaMaquina['y'] = $x;\n } \n }\n } elseif ($transversalDcha == \"xx\") {\n $y = 2;\n for($x=0;$x<3;$x++){\n if($tablero[$x][$y] == \"\"){\n $tablero[$x][$y] = \"o\";\n $coordenadaMaquina['x'] = $x;\n $coordenadaMaquina['y'] = $y;\n } \n $y--;\n }\n }else{\n $tablero = tiradaAleatoria($tablero, $coordenadaMaquina);\n } \n }\n }\n return $tablero;\n}", "title": "" }, { "docid": "2ae52235e5c43d4cb83aa0279082c4b7", "score": "0.48565477", "text": "function data_br2sql($data){\n $dia = $data[0].$data[1];\n $mes = $data[3].$data[4];\n $ano = $data[6].$data[7].$data[8].$data[9];\n $data_sql = $ano.\"-\".$mes.\"-\".$dia;\n return $data_sql;\n }", "title": "" }, { "docid": "1c04eb201d6ede42e708714d0f67d7e7", "score": "0.48528242", "text": "public function provider_formatRUT() {\n $mapValues[] = array('30.686.957-4', true, '306869574');\n $mapValues[] = array('30.686.957-4', false, '30686957');\r\n $mapValues[] = array('306869574', true, '306869574');\r\n $mapValues[] = array('306869574', false, '30686957');\r\n $mapValues[] = array('30686957-4', true, '306869574');\r\n $mapValues[] = array('30686957-4', false, '30686957');\r\n $mapValues[] = array('30.686.9574', true, '306869574');\r\n $mapValues[] = array('30.686.9574', false, '30686957');\r\n $mapValues[] = array('30686.957-4', true, '306869574');\r\n $mapValues[] = array('30686.957-4', false, '30686957');\r\n $mapValues[] = array('30.686957-4', true, '306869574');\r\n $mapValues[] = array('30.686957-4', false, '30686957');\r\n $mapValues[] = array('3.686.957-4', true, '036869574');\r\n $mapValues[] = array('3.686.957-4', false, '03686957');\r\n $mapValues[] = array('36869574', true, '036869574');\r\n $mapValues[] = array('36869574', false, '03686957');\r\n $mapValues[] = array('3686957-4', true, '036869574');\r\n $mapValues[] = array('3686957-4', false, '03686957');\r\n $mapValues[] = array('3.686.9574', true, '036869574');\r\n $mapValues[] = array('3.686.9574', false, '03686957');\r\n $mapValues[] = array('3686.957-4', true, '036869574');\r\n $mapValues[] = array('3686.957-4', false, '03686957');\r\n $mapValues[] = array('3.686957-4', true, '036869574');\r\n $mapValues[] = array('3.686957-4', false, '03686957');\n $mapValues[] = array('', true, false);\r\n $mapValues[] = array('', false, false);\r\n $mapValues[] = array(true, true, false);\r\n $mapValues[] = array(true, false, false);\n $mapValues[] = array(false, true, false);\n $mapValues[] = array(false, false, false);\r\n $mapValues[] = array(null, true, false);\n $mapValues[] = array(null, false, false);\n $mapValues[] = array(array(), true, false);\r\n $mapValues[] = array(123456, false, false);\n $mapValues[] = array(123.456, true, false);\r\n $mapValues[] = array(123.456, false, false);\r\n $mapValues[] = array(1, true, false);\r\n $mapValues[] = array(1, false, false);\n $mapValues[] = array(0, true, false);\r\n $mapValues[] = array(0, false, false);\r\n\n return $mapValues;\n }", "title": "" }, { "docid": "26af94f284681bdc3d5360064fcba958", "score": "0.48518002", "text": "function zaradaDoprinosPoslovnomUspehu() {\n if($this->karnet->getValue('tipNagrada') === 1) {\n return round($this->karnet->getValue('iznosNagrada'), 2);\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "2f10ec1ca45fa575b8cd87188bfa787b", "score": "0.4836705", "text": "public static function getSnellen(){\n return [\n ''=>'Seleccione',\n '20/5'=>'20/5',\n '20/8'=>'20/8',\n '20/10'=>'20/10',\n '20/13'=>'20/13',\n '20/16'=>'20/16',\n '20/20'=>'20/20',\n '20/25'=>'20/25',\n '20/32'=>'20/32',\n '20/40'=>'20/40',\n '20/50'=>'20/50',\n '20/63'=>'20/63',\n '20/80'=>'20/80',\n '20/100'=>'20/100',\n '20/126'=>'20/126',\n '20/159'=>'20/159',\n '20/200'=>'20/200',\n '20/250'=>'20/250',\n '20/320'=>'20/320',\n '20/400'=>'20/400',\n '20/500'=>'20/500',\n '20/630'=>'20/630',\n '20/800'=>'20/800',\n '20/1000'=>'20/1000',\n '20/1250'=>'20/1250',\n '20/1600'=>'20/1600',\n '20/2000'=>'20/2000',\n 'bultos'=>'bultos',\n 'ppl'=>'ppl',\n 'no ppl'=>'no ppl'\n ];\n }", "title": "" }, { "docid": "e10cc66f8645b1962e07f5655924b74d", "score": "0.48343584", "text": "function reportePrecios($precioApa = array(), $precioVazlo = array(), $descuentoApa, $descuentoVazlo, $importancia = array(), $idApa = array(), $idVazlo = array()){\r\n $variacion = 0;\r\n $variacionPesos = 0;\r\n $caros = 0;\r\n $iguales = 0;\r\n $baratos = 0;\r\n $porcentajeCaro = 0;\r\n $porcentajeIgual = 0;\r\n $porcentajeBarato = 0;\r\n $contador = count($precioApa);\r\n $importanciaCaros = [0,0,0];\r\n $importanciaIguales = [0,0,0];\r\n $importanciaBaratos = [0,0,0];\r\n $indicador = array();\r\n $variacionCaro = 0;\r\n $variacionBarato = 0;\r\n $variacionPesosCaro = 0;\r\n $variacionPesosBarato = 0;\r\n\r\n for ($i=0; $i < $contador; $i++){\r\n //Tomamos los precios y le sacamos el descuento que le corresponde\r\n $precioApa[$i] = round((sub($descuentoApa, $precioApa[$i]))*100)/100;\r\n $precioVazlo[$i] = round((sub($descuentoVazlo, $precioVazlo[$i]))*100)/100;\r\n //Sacamos la variación por porcentaje\r\n $variacion = $variacion+(($precioVazlo[$i]/$precioApa[$i]-1)*100);\r\n //Sacamos la variación por dinero\r\n $variacionPesos = $variacionPesos+($precioVazlo[$i]-$precioApa[$i]);\r\n if($precioApa[$i]>$precioVazlo[$i]||$precioApa[$i]==$precioVazlo[$i]){\r\n\r\n if($importancia[$i]==\"A\"){\r\n $importanciaCaros[0] += 1;\r\n }\r\n else if($importancia[$i]==\"B\"){\r\n $importanciaCaros[1] += 1;\r\n }\r\n else if($importancia[$i]==\"C\"){\r\n $importanciaCaros[2] += 1;\r\n }\r\n $indicador[$i] = \"Caro\";\r\n //Variacion por porcentaje de los productos Caros\r\n $variacionCaro = $variacionCaro+(($precioVazlo[$i]/$precioApa[$i]-1)*100);\r\n //Variacion por pesos de los productos Caros\r\n $variacionPesosCaro = $variacionPesosCaro+($precioVazlo[$i]-$precioApa[$i]);\r\n $caros++;\r\n }\r\n elseif ($precioApa[$i]<$precioVazlo[$i]){\r\n\r\n if($importancia[$i]==\"A\"){\r\n $importanciaBaratos[0] += 1;\r\n }\r\n else if($importancia[$i]==\"B\"){\r\n $importanciaBaratos[1] += 1;\r\n }\r\n else if($importancia[$i]==\"C\"){\r\n $importanciaBaratos[2] += 1;\r\n }\r\n $indicador[$i] = \"Barato\";\r\n //Variacion por porcentaje de los productos Baratos\r\n $variacionBarato = $variacionBarato+(($precioVazlo[$i]/$precioApa[$i]-1)*100);\r\n //Variacion por pesos de los productos Caros\r\n $variacionPesosBarato = $variacionPesosBarato+($precioVazlo[$i]-$precioApa[$i]);\r\n $baratos++;\r\n }\r\n // else{\r\n // $iguales++;\r\n // if($importancia[$i]==\"A\"){\r\n // $importanciaIguales[0] += 1;\r\n // }\r\n // else if($importancia[$i]==\"B\"){\r\n // $importanciaIguales[1] += 1;\r\n // }\r\n // else if($importancia[$i]==\"C\"){\r\n // $importanciaIguales[2] += 1;\r\n // }\r\n // $indicador[$i] = \"Igual\";\r\n // }\r\n\r\n }\r\n //Si se encontraron al menos 1 producto en la consulta\r\n if($contador>0){\r\n //Sacando el promedio de la variacion y redondeando\r\n $variacion = $variacion/$contador;\r\n $variacion = round($variacion * 100)/100;\r\n //Sacando el promedio de la variacion de Caros y redondeando\r\n $variacionCaro = $variacionCaro/$contador;\r\n $variacionCaro = round($variacionCaro * 100)/100;\r\n //Sacando el promedio de la variacion de Baratos y redondeando\r\n $variacionBarato = $variacionBarato/$contador;\r\n $variacionBarato = round($variacionBarato * 100)/100;\r\n //Dandole formato a la variacion por dinero\r\n $variacionPesos = $variacionPesos/$contador;\r\n $variacionPesos = round($variacionPesos * 100)/100;\r\n $variacionPesos = number_format($variacionPesos, 2, '.', ',');\r\n //Dandole formato a la variacion por dinero de productos Caros\r\n $variacionPesosCaro = $variacionPesosCaro/$contador;\r\n $variacionPesosCaro = round($variacionPesosCaro * 100)/100;\r\n $variacionPesosCaro = number_format($variacionPesosCaro, 2, '.', ',');\r\n //Dandole formato a la variacion por dinero de productos Baratos\r\n $variacionPesosBarato = $variacionPesosBarato/$contador;\r\n $variacionPesosBarato = round($variacionPesosBarato * 100)/100;\r\n $variacionPesosBarato = number_format($variacionPesosBarato, 2, '.', ',');\r\n //Sacando el porcentaje de Caros\r\n $porcentajeCaro = ($caros*100)/$contador;\r\n $porcentajeCaro = round($porcentajeCaro * 100)/100;\r\n //Sacando el porcentaje de Baratos\r\n $porcentajeBarato = ($baratos*100)/$contador;\r\n $porcentajeBarato = round($porcentajeBarato * 100)/100;\r\n //Sacando el porcentaje de Iguales\r\n $porcentajeIgual = ($iguales*100)/$contador;\r\n $porcentajeIgual = round($porcentajeIgual * 100)/100;\r\n }\r\n\r\n $arregloPrueba = [\"Hola\", \"APA\"];\r\n $resultados = array($contador, $variacion, $variacionPesos, $porcentajeCaro, $caros, $porcentajeIgual, $iguales,\r\n $porcentajeBarato, $baratos, $importancia, $idApa, $precioApa, $idVazlo, $precioVazlo, $importanciaCaros,\r\n $importanciaIguales, $importanciaBaratos, $indicador, $variacionCaro, $variacionBarato,\r\n $variacionPesosCaro, $variacionPesosBarato);\r\n // $resultados[9][0] = \"Hola\";\r\n // $resultados[9][1] = \"Amigos\";\r\n\r\n return $resultados;\r\n}", "title": "" }, { "docid": "7653ec6f1ab3acb96c7f42c5c7c7c68e", "score": "0.4832421", "text": "static function get_dv($rut)\n {\n $i = 2;\n $sum = 0;\n foreach(array_reverse(str_split($rut)) as $v) {\n if ($i == 8) {\n $i = 2;\n }\n $sum += $v * $i;\n ++$i;\n }\n $dvr = 11 - ($sum % 11);\n if($dvr == 11)\n return 0;\n if($dvr == 10)\n return 'K';\n return $dvr;\n }", "title": "" }, { "docid": "5cacf3280258a46e9b7c8bc5d37a65d4", "score": "0.48266113", "text": "function papar_jadual($row, $myTable, $pilih, $classTable = null)\n\t{\n\t\tif ($pilih == 1) \n\t\t{\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t?><!-- Jadual <?php echo $myTable ?> -->\n\t\t\t<table border=\"1\" class=\"excel\" id=\"example\">\n\t\t\t<?php $printed_headers = false; # mula bina jadual\n\t\t\t#-----------------------------------------------------------------\n\t\t\tfor ($kira=0; $kira < count($row); $kira++)\n\t\t\t{\t# print the headers once: \n\t\t\t\tif ( !$printed_headers ) : ?><thead><tr>\n\t\t\t<th>#</th><?php foreach ( array_keys($row[$kira]) as $tajuk ) :\n\t\t\t?><th><?php echo $tajuk ?></th>\n\t\t\t<?php endforeach; ?></tr></thead>\n\t\t\t<?php\t$printed_headers = true; \n\t\t\t\tendif;\n\t\t\t#- print the data row --------------------------------------------\n\t\t\t?><tbody><tr>\n\t\t\t<td><?php echo $kira+1 ?></td>\t\n\t\t\t<?php foreach ( $row[$kira] as $key=>$data ) : \n\t\t\t?><td><?php echo $data ?></td>\n\t\t\t<?php endforeach; ?></tr></tbody>\n\t\t\t<?php\n\t\t\t}#-----------------------------------------------------------------\n\t\t\t?></table><?php echo \"\\r\" ?><!-- Jadual <?php echo $myTable ?> --><?php\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t} elseif ($pilih == 2) {\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t?><!-- Jadual <?php echo $myTable ?> -->\n\t\t\t<table border=\"1\" class=\"excel\" id=\"example\"><?php\n\t\t\t$printed_headers = false; # mula bina jadual\n\t\t\t#-----------------------------------------------------------------\n\t\t\tfor ($kira=0; $kira < count($row); $kira++)\n\t\t\t{\t# cetak tajuk hanya sekali sahaja :\n\t\t\t\tif ( !$printed_headers ) : ?>\n\t\t\t<thead><tr>\n\t\t\t<th>#</th><?php\n\t\t\t\t\tforeach ( array_keys($row[$kira]) AS $tajuk ) \n\t\t\t\t\t{ \tif ( !is_int($tajuk) ) :\n\t\t\t\t\t\t\t$paparTajuk = ($tajuk=='nama') ?\n\t\t\t\t\t\t\t$tajuk . '(jadual:' . $myTable . ')'\n\t\t\t\t\t\t\t: $tajuk; ?>\n\t\t\t<th><?php echo $paparTajuk ?></th>\n\t\t\t<?php\t\tendif;\n\t\t\t\t\t}\n\t\t\t?></tr></thead><?php\n\t\t\t\t\t$printed_headers = true; \n\t\t\t\tendif; \n\t\t\t#- cetak hasil $data ---------------------------------------------?>\n\t\t\t<tbody><tr>\n\t\t\t<td><?php echo $kira+1 ?></td>\t\n\t\t\t<?php\n\t\t\t\tforeach ( $row[$kira] AS $key=>$data ) \n\t\t\t\t{\n\t\t\t\t\t?><td><?php echo $data ?></td><?php\n\t\t\t\t} \n\t\t\t\t?></tr></tbody>\n\t\t\t<?php\n\t\t\t}\n\t\t\t#-----------------------------------------------------------------\n\t\t\t?></table><!-- Jadual <?php echo $myTable ?> --><?php\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t} elseif ($pilih == 3) {\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t?><!-- Jadual <?php echo $myTable ?> --><?php\n\t\t\tfor ($kira=0; $kira < count($row); $kira++)\n\t\t\t{// ulang untuk $kira++ ?>\n\t\t\t<table border=\"1\" class=\"<?php echo $classTable ?>\" id=\"example\">\n\t\t\t<tbody><?php foreach ( $row[$kira] as $key=>$data ):?>\n\t\t\t<tr>\n\t\t\t<td><?php echo $key ?></td>\n\t\t\t<td><?php echo $data ?></td>\n\t\t\t</tr>\n\t\t\t<?php endforeach; ?></tbody>\n\t\t\t</table>\n\t\t\t<?php\n\t\t\t}# ulang untuk $kira++ ?>\n\t\t\t<!-- Jadual <?php echo $myTable ?> --><?php\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t} elseif ($pilih == 4) { \n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t?><!-- Jadual <?php echo $myTable ?> -->\n\t\t\t<table class=\"<?php echo $classTable ?>\">\n\t\t\t<?php $printed_headers = false; # mula bina jadual\n\t\t\t#-----------------------------------------------------------------\n\t\t\tfor ($kira=0; $kira < count($row); $kira++)\n\t\t\t{\t# cetak tajuk hanya sekali sahaja :\n\t\t\t\tif ( !$printed_headers ) : ?><thead><tr>\n\t\t\t<th>#</th><?php foreach ( array_keys($row[$kira]) as $tajuk ) :\n\t\t\t?><th><?php echo $tajuk ?></th><?php endforeach; \n\t\t\t?></tr></thead>\n\t\t\t<?php\t$printed_headers = true; \n\t\t\t\tendif;\n\t\t\t# cetak hasil $data --------------------------------------------\n\t\t\t?><tbody><tr>\n\t\t\t<td><?php echo $kira+1 ?></td><?php \n\t\t\t\tforeach ( $row[$kira] as $key=>$data ) : \n\t\t\t?><td><?php echo $data ?></td><?php \n\t\t\t\tendforeach; ?> \n\t\t\t</tr></tbody>\n\t\t\t<?php\n\t\t\t}\n\t\t\t#-----------------------------------------------------------------\n\t\t\t?></table><?php echo \"\\r\\t\\t\\t\"; ?><!-- Jadual <?php echo $myTable ?> --><?php echo \"\\r\\t\\t\\t\";\n\t//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t} elseif ($jadual == 5) { \n\t\t# nilai akan dipulangkan balik\n\t\t\t$bil_tajuk = $row['bil_tajuk'];// => 8\n\t\t\t$bil_baris = $row['bil_baris']; \n\n\t\t\t$output = null; \n\t\t\t//$output .= '<br>$bil_tajuk=' . $bil_tajuk;\n\t\t\t//$output .= '<br>$bil_baris=' . $bil_baris;\n\t\t\t$output .= '<table border=\"1\" class=\"excel\" id=\"example\">\n\t\t\t<thead><tr>\n\t\t\t<th colspan=\"' . $bil_tajuk . '\">\n\t\t\t<strong>Jadual ' . $myTable . ' : ' . $bil_tajuk . '\n\t\t\t</strong></th>\n\t\t\t</tr></thead>';\n\n\t\t\t$printed_headers = false; # mula bina jadual\n\t\t\t#-----------------------------------------------------------------\n\t\t\tfor ($kira=0; $kira < $bil_baris; $kira++)\n\t\t\t{\t# print the headers once:\n\t\t\t\tif ( !$printed_headers ) \n\t\t\t\t{##=================================================\n\t\t\t\t$output .= \"\\r\\t<thead><tr>\\r\\t<th>#</th>\";\n\t\t\t\tforeach ( array_keys($row[$kira]) as $tajuk ) :\n\t\t\t\t\t$output .= \"\\r\\t\" . '<th>' . $tajuk . '</th>';\n\t\t\t\tendforeach;\n\t\t\t\t$output .= \"\\r\\t\" . '</tr></thead>';\n\t\t\t\t##==================================================\n\t\t\t\t\t$printed_headers = true; \n\t\t\t\t} \n\t\t\t#--- print the data row ------------------------------------------\n\t\t\t\t$output .= \"\\r\\t<tbody><tr>\\r\\t<td>\" . ($kira+1) . '</td>';\n\t\t\t\tforeach ( $row[$kira] as $key=>$data ) :\n\t\t\t\t\t$output .= \"\\r\\t\" . '<td>' . $data . '</td>';\n\t\t\t\tendforeach; \n\t\t\t\t$output .= \"\\r\\t\" . '</tr></tbody>';\n\t\t\t}\n\t\t\t#-----------------------------------------------------------------\n\t\t\t$output .= \"\\r\\t\" . '</table>';\n\n\t\t\treturn $output;\n\n\t\t} # tamat if ($jadual == 5\n\t}", "title": "" } ]
74572b55c4ab2c3e16899436df055bc9
Bootstrap the application events.
[ { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.0", "text": "public function boot()\n {\n //\n }", "title": "" } ]
[ { "docid": "aed57f4bebd4c75bd95859dee0768b9e", "score": "0.7527242", "text": "public function boot()\n {\n //\n Entry::observe(EntryObserver::class);\n }", "title": "" }, { "docid": "8d543cca20e8c6cfa5d5f80684e54940", "score": "0.7469123", "text": "public function boot()\n {\n //\n $this->initDbListen();\n $this->initAppTerminating();\n $this->initLogListen();\n $this->initBugsnag();\n }", "title": "" }, { "docid": "ad79d12d4810c4da8e3484ca351f2be7", "score": "0.7429589", "text": "public function boot()\n {\n $this->handleViewComponents();\n $this->handleCommands();\n }", "title": "" }, { "docid": "9f6116c9d7e1f46fdf1e9ee459f6c949", "score": "0.73986983", "text": "public function boot()\n {\n parent::boot();\n\n Event::listen(\n CreateClassGroupChat::class,\n [ListenCreateClassGroupChat::class, 'handle']\n );\n\n Event::listen(\n ClassTeacherGetAllStudent::class,\n [ListenClassTeacherGetAllStudent::class, 'handle']\n );\n Event::listen(\n StudentPromotion::class,\n [ListenStudentPromotion::class, 'handle']\n );\n Event::listen(\n StudentPromotionGroupDisable::class,\n [ListenStudentPromotionGroupDisable::class, 'handle']\n );\n }", "title": "" }, { "docid": "30da756cc512f56e46656c0a36ebb2f4", "score": "0.7383691", "text": "public function boot()\n {\n $this->topMenu();\n }", "title": "" }, { "docid": "f7572b48fbb7460c0e3e61bff871bd59", "score": "0.7379842", "text": "public function boot()\n {\n $events = $this->app->make('config')->get('event');\n $this->app->make('event')->registerEvents($events);\n }", "title": "" }, { "docid": "29f9b6cb59bed7c53e13860884f97e1e", "score": "0.7366662", "text": "public function boot()\n\t{\n\t\tConversation::observe( new \\Okie\\Observers\\ConversationObserver );\n\t\t// Option::observe( new \\Okie\\Observers\\OptionObserver );\n\t}", "title": "" }, { "docid": "9014bab47ce785fd26674b2b2fbaa945", "score": "0.7364755", "text": "public function boot()\n {\n Index::observe(IndexObserver::class);\n Queue::observe(QueueObserver::class);\n }", "title": "" }, { "docid": "8f940c9dbdcc448de9d2841cda5828bd", "score": "0.73499674", "text": "public function boot()\n {\n //\n Dancer::observe(DancerObserver::class);\n \n Routine::observe(RoutineObserver::class);\n }", "title": "" }, { "docid": "e5ee154605b2750ca88a505544b72687", "score": "0.7341356", "text": "public function boot() {\n\t\tModel::setConnectionResolver ( $this->app ['db'] );\n\t\t\n\t\tModel::setEventDispatcher ( $this->app ['events'] );\n\t}", "title": "" }, { "docid": "937b334be7865c5b5012efad235ce26b", "score": "0.7335921", "text": "public function boot()\n {\n $this->configureHprose();\n $this->configureCommands();\n }", "title": "" }, { "docid": "c5c0860b9eb6378dcb768b4920f33108", "score": "0.7334614", "text": "public function boot()\n {\n Song::saved(function(){\n event(new EventSongChange());\n });\n Song::deleted(function(){\n event(new EventSongChange());\n });\n Playlist::saved(function(){\n event(new EventPlaylistChange());\n event(new EventUserPlaylistChange());\n });\n Playlist::deleted(function(){\n event(new EventPlaylistChange());\n event(new EventUserPlaylistChange());\n });\n Cate::saved(function(){\n event(new EventCateChange());\n });\n Cate::deleted(function(){\n event(new EventCateChange());\n });\n }", "title": "" }, { "docid": "c3ebb0b28a76aff16fd3399bc0465d4a", "score": "0.7331195", "text": "public function boot()\n {\n // nothing to boot - package does not have any view, config etc\n }", "title": "" }, { "docid": "86d52d1bb74cf1fca1ff335c3f55f624", "score": "0.73240626", "text": "public function boot()\n {\n // TODO: Implement boot() method.\n }", "title": "" }, { "docid": "2eb1bb5f8dab49fece3ada8dded994ec", "score": "0.73214066", "text": "protected static function boot()\r\n {\r\n self::observe(app(substr(__CLASS__, 0, -5) . 'Observer'));\r\n\r\n parent::boot();\r\n }", "title": "" }, { "docid": "bb864a1b2d99e48699cefd85e02cdbd8", "score": "0.73016", "text": "public function boot()\n {\n parent::boot();\n\n Event::listen(ArticleCreated::class, ArticlesEventListener::class);\n\n }", "title": "" }, { "docid": "92ff15e8e599704dc3d3b37f4989722e", "score": "0.7298192", "text": "public function boot()\n {\n $this->defineCommands();\n\n $this->publishConfig();\n\n $this->views();\n }", "title": "" }, { "docid": "cad3901a532d9a5fcf099123ed3aad54", "score": "0.7289866", "text": "public function boot()\n {\n $this->bindMainClass();\n }", "title": "" }, { "docid": "90e0d237fb28ffab0ffb1940e3c4b11b", "score": "0.72889787", "text": "public function boot()\n {\n $this->collectionEvents();\n $this->productEvents();\n }", "title": "" }, { "docid": "48ed57b0a3c6428459134cb6d019cede", "score": "0.728312", "text": "public function boot()\n\t{\t\n\t\t$this->ComposedNavigation();\n\t\t$this->ComposedCatNavigation();\n\t}", "title": "" }, { "docid": "8e3e5cb97b25debe8f90b9d8eb7aefd1", "score": "0.726527", "text": "public function boot()\n\t\t{\n\t\t\t$this->registerConfig();\n\t\t\t$this->registerViews();\n\t\t\t$this->registerFactories();\n\t\t\t$this->hooks();\n\t\t}", "title": "" }, { "docid": "ca80eff42f6e0a2b8b156451d8f453ce", "score": "0.7264655", "text": "public function boot() {\n Company::observe(CompanyObserver::class);\n Event::observe(EventObserver::class);\n EventSetting::observe(EventSettingObserver::class);\n }", "title": "" }, { "docid": "cd4d5c23c49d2a6b7366ede7ca2d7a02", "score": "0.72533363", "text": "public function boot()\n {\n // Bootstrap handles\n $this->bootConfig();\n $this->bootCommands();\n }", "title": "" }, { "docid": "3fc23f6480fd7596cef892848de1b623", "score": "0.72463006", "text": "public function boot()\n {\n\t\t// Register the Message Board events handler\n\n Event::subscribe('MicheleAngioni\\MessageBoard\\Listeners\\MessageBoardEventHandler');\n }", "title": "" }, { "docid": "048b62c0527cccee5bd09a9083a130b0", "score": "0.72418356", "text": "public function boot()\n {\n $this->setupConfig();\n\n $this->setupListener();\n }", "title": "" }, { "docid": "83f04653b1da256861113292fbc4d9d8", "score": "0.72399545", "text": "public function boot()\n\t{\n\t\t$this->registerConfig();\n\t\t$this->registerTranslations();\n\t\t$this->registerViews();\n\t\t$this->registerWidget();\n\t\t$this->registerMenu();\n\t}", "title": "" }, { "docid": "127203f87144367e52e2ef274e8154d4", "score": "0.7231443", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "2030b212f5d0fab4a2ac88ffcfb7e9a2", "score": "0.72213227", "text": "public function boot()\n {\n parent::boot();\n\n // manual definition of event listener (override other listeners)\n Event::listen('App\\Events\\NewTicket', function (\\App\\Events\\NewTicket $newTicket) {\n Log::info(\"Event new ticket\");\n });\n\n //catch multiple events with wildcard \n // - wilcard match all fired events '*'\n Event::listen('App\\Events\\*', function ($eventName, array $data) {\n Log::info(\"App Event: \".$eventName);\n });\n }", "title": "" }, { "docid": "b19f29d6ee2558ed7152c6cae4851dc9", "score": "0.72188354", "text": "public function boot()\n {\n $this->composer();\n $this->_topBreakingNews();\n }", "title": "" }, { "docid": "1a7e41ef9e194119f421a6b3052b2b6f", "score": "0.72029406", "text": "public function boot()\n\t{\n\n// navbar menu\n\t\tMenu::make('navbar', function($menu) {\n\t\t\t//\n\t\t});\n\n// right side drop down\n\t\tMenu::make('admin', function($menu) {\n\t\t\t//\n\t\t});\n\n\t}", "title": "" }, { "docid": "ebf2c20c86cceada7af381ff60732d1c", "score": "0.7195297", "text": "public function boot()\n {\n $this->bootstrapStapler();\n }", "title": "" }, { "docid": "7a51852ba338540361dfe2d2fcc65149", "score": "0.7195135", "text": "public static function boot() {\n parent::boot();\n static::setEventDispatcher(new \\Illuminate\\Events\\Dispatcher());\n }", "title": "" }, { "docid": "88f643282b583d55dc6688db6bde5b95", "score": "0.7193053", "text": "public function boot()\n {\n $this->routes();\n\n Jetpack::running(function (Running $event) {\n // auth\n $this->authorization();\n\n // models\n Jetpack::models($this->models());\n Jetpack::bootModels();\n });\n\n // todo: move?\n Running::dispatch();\n }", "title": "" }, { "docid": "43bab2181873503fd1d7ea461741a358", "score": "0.71917874", "text": "public function boot()\n\t{\n $this->setupPackage($this->app->asset);\n //$this->setupRoutes($this->app->router);\n\t}", "title": "" }, { "docid": "f2d0f48224f14d58b8b278ca722bfa37", "score": "0.7184809", "text": "public function boot()\n\t{\n\t\t$this->registerConfig();\n\t}", "title": "" }, { "docid": "18fc248e29156de147c4f8ec2668c33a", "score": "0.7180386", "text": "public function boot()\n\t{\n\t\t$this->registerObservers();\n\t}", "title": "" }, { "docid": "41638b955613ea7069f25c13eda464fd", "score": "0.7174113", "text": "public function boot()\n {\n Blade::component('form-errors', FormErrors::class);\n Blade::component('breadcrumbs', Breadcrumbs::class);\n\n Employee::observe(EmployeeObserver::class);\n Company::observe(CompanyObserver::class);\n }", "title": "" }, { "docid": "ad16bd6a7378192ac3edb0ca83bb1401", "score": "0.7174105", "text": "protected static function boot()\n {\n }", "title": "" }, { "docid": "dbf8621493a5b8070e3b256b92dee31a", "score": "0.7169616", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "0e06d24a29b5c3be283ff1b94988915d", "score": "0.7168068", "text": "public function boot()\n {\n $this->middlewares();\n\n $this->publish();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162653", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162653", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162653", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162653", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7162653", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.71610874", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.71610874", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.71610874", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "1168276315141808ff9495e1b8e08115", "score": "0.7159109", "text": "public function boot() {\n\n\t\t\t// construct a main navigation\n\t\t\t$navItems = array(\n\t\t\t\tarray(\n\n\t\t\t\t\t'title' => 'home',\n\t\t\t\t\t'url' => '/',\n\t\t\t\t),\n\t\t\t\tarray(\n\n\t\t\t\t\t'title' => 'flyers',\n\t\t\t\t\t'url' => 'flyers',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tview()->composer(['app','debug.app','release.app'], function ($view) use ($navItems) {\n\t\t\t\t$view->with('navItems', $navItems);\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "47bb710f80eea80bd4bdf2b218bd2d57", "score": "0.71539664", "text": "public function boot()\n {\n //\n\n $this->mainHeaderComposer();\n\n $this->sidebarComposer();\n\n }", "title": "" }, { "docid": "0ad52e1a496a02298e9cd8db4e400b69", "score": "0.7153932", "text": "public function boot()\n {\n parent::boot();\n (new ControllerListeners())->boot();\n (new ModelListeners())->boot();\n }", "title": "" }, { "docid": "abe5ff99f14d7061d47f85453d099676", "score": "0.7153772", "text": "public function boot()\n {\n Paginator::useBootstrap();\n Schema::defaultStringLength(191);\n View::share('menuItems', Menu::with('children')->whereNull('parent_id')->get());\n Storage::extend('dropbox', function (Application $app, array $config) {\n $adapter = new DropboxAdapter(new DropboxClient(\n $config['authorization_token']\n ));\n\n return new FilesystemAdapter(\n new Filesystem($adapter, $config),\n $adapter,\n $config\n );\n });\n }", "title": "" }, { "docid": "c151bacec2ecc9175a5dc601a2fa4587", "score": "0.7153453", "text": "public function boot()\n {\n $this->registerTranslations();\n $this->registerConfig();\n $this->registerViews();\n $this->registerViewComposers();\n $this->registerMenus();\n\n $this->customBoot();\n\n\n }", "title": "" }, { "docid": "f385218c4e24f5bfd4e18db48fb051bc", "score": "0.7146818", "text": "public function boot()\n {\n $this->app->bind(\n BootstrapData::class,\n AppBootstrapData::class\n );\n }", "title": "" }, { "docid": "2dc2397099434adfa682d62c48e04673", "score": "0.7143316", "text": "public function boot()\n {\n // Implement boot() method.\n }", "title": "" }, { "docid": "9a82b04c9ece72ed533befb1b2ba2de4", "score": "0.714219", "text": "public function appBootstrap() {\n\t\t$this->frontController->registerPlugin ( new Initializer() );\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.71405035", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.71405035", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.71405035", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.71405035", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.71405035", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.71405035", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.71405035", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8bb0549433500263e1d22897b135e3a5", "score": "0.713928", "text": "public function boot()\n {\n $this->setupViews($this->app);\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "407d995bef52d751de10d1d598f466ab", "score": "0.71386063", "text": "public function boot(Dispatcher $events)\n {\n $events->listen(BuildingMenu::class, function (BuildingMenu $event) {\n $event->menu->add('CATEGORIES');\n\n $event->menu->add([\n 'text' => 'Categories',\n 'url' => 'admin/categories',\n 'label' => \\App\\Category::count()\n ]);\n\n $event->menu->add([\n 'text' => 'Add category',\n 'url' => 'admin/categories/create',\n ]);\n $event->menu->add('PRODUCTS');\n\n $event->menu->add([\n 'text' => 'Products',\n 'url' => 'admin/products',\n 'label' => \\App\\Product::count()\n ]);\n\n $event->menu->add([\n 'text' => 'Add product',\n 'url' => 'admin/products/create',\n ]);\n \n });\n }", "title": "" }, { "docid": "6185c8641db082efaba0c542b9bc7235", "score": "0.7135824", "text": "public function boot() {\n \n }", "title": "" }, { "docid": "f2133971fe1eeaa1464f4683d2856adb", "score": "0.71326625", "text": "public function boot()\n\t{\n \n\t}", "title": "" }, { "docid": "db163e381109046d3316fd816d4e3c32", "score": "0.71229535", "text": "public function boot()\n {\n Event::listen(UpdateBuildStatus::class, BuildStatusChanged::class);\n }", "title": "" }, { "docid": "8afa452f3a901f32ca05f03275922f5a", "score": "0.7121769", "text": "public function boot()\n {\n Model::setConnectionResolver($this->app['db']);\n Model::setEventDispatcher($this->app['events']);\n }", "title": "" }, { "docid": "a58e3971831a59cce5fe69c1746c9591", "score": "0.7108452", "text": "public function boot()\n {\n BahanBaku::observe(BahanBakuObserver::class);\n \n Pesanan::observe(PesananObserver::class);\n\n }", "title": "" }, { "docid": "42d12e74288afd481594ce7bfd415955", "score": "0.7097915", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n $data['basic'] = GeneralSettings::first();\n $_ENV['admin'] = $data['basic']->prefix;\n $data['tournaments'] = Event::with(['matches'])->where('status',1)->get();\n // $data['sliders'] = Slider::get();\n\n view::share($data);\n // DB::listen(function ($query) {\n // Log::info(\n // $query->sql,\n // $query->bindings,\n // $query->time\n // );\n // });\n\n }", "title": "" }, { "docid": "b866234a1d1a1d7941a46b14f88f3bcc", "score": "0.7097121", "text": "public function booted()\n {\n $this->configureSpark();\n $this->registerPlans();\n }", "title": "" }, { "docid": "fa6ebc3e971935b7f07c18cbf0662908", "score": "0.7094654", "text": "public function boot()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "fa6ebc3e971935b7f07c18cbf0662908", "score": "0.7094654", "text": "public function boot()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "8a43384f207a77a762d384a47d04bccc", "score": "0.70935833", "text": "public function boot()\r\n {\r\n \t$this->registerResources();\r\n\r\n if ($this->app->runningInConsole()) {\r\n $this->registerPublishing();\r\n\r\n if ($commands = $this->commands)\r\n $this->commands($commands);\r\n }\r\n }", "title": "" }, { "docid": "b75e22d21ae6dbee0224bed96c0b5b92", "score": "0.7091723", "text": "public function boot() {\n\t \n $this->publishable();\n\n\t\t$this->registerCommands();\n \n }", "title": "" }, { "docid": "803ca18fc7f072b0120333c150e94015", "score": "0.7084781", "text": "public function boot()\n {\n /*\n * Observers\n */\n Delegation::observe(DelegationObserver::class);\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.70812273", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.70812273", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.70812273", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.70812273", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "b4dde92cd2078118fb70d1e7eeafbf6c", "score": "0.70801747", "text": "public function boot()\n {\n $this->composeSidebarBackend();\n $this->composeFooter();\n $this->composeSidebarFrontend();\n }", "title": "" }, { "docid": "871db33151186b9ce9bb62f86fe0d9d0", "score": "0.7080093", "text": "public function boot(Dispatcher $events)\n {\n $events->listen(BuildingMenu::class, function (BuildingMenu $event) {\n $adminPath = config('adminlte.dashboard_url');\n $menu = new Navbar();\n\n $event->menu->add('PROFIL');\n $event->menu->add(\n [\n 'text' => Auth::user()->name,\n //'text' => 'Profile',\n 'url' => $adminPath.'/profile',\n 'icon' => 'fas fa-fw fa-user',\n ],\n [\n 'text' => 'change_password',\n 'url' => $adminPath.'/change-password',\n 'icon' => 'fas fa-fw fa-lock',\n ]\n );\n\n $event->menu->add('MAIN MENU');\n foreach($menu->getSidemenu() as $sidebar) {\n $event->menu->add($sidebar);\n }\n });\n }", "title": "" }, { "docid": "d108e1305c95b2078b4c9fc15064fd34", "score": "0.7079542", "text": "protected static function boot()\n {\n parent::boot();\n // register model observer\n static::observe(UserObserver::class);\n }", "title": "" }, { "docid": "556b46d9bdee7c07b3853c20c1e49709", "score": "0.7077807", "text": "public function boot()\n {\n $app = $this->app;\n\n $this->bootConfig();\n }", "title": "" }, { "docid": "126ea6645021861a20bc4b51e7e82a1f", "score": "0.70710295", "text": "public function boot()\n {\n $this->app['events']->listen('eloquent.booting: *', function($event, $data) {\n $model = array_first($data);\n $this->addExpiredObservables($model);\n $this->addArchivedObservables($model);\n });\n }", "title": "" }, { "docid": "517315b31a48b9f8a03dfacc28667c65", "score": "0.70626783", "text": "public function boot()\n {\n Logger::timing(__METHOD__);\n Logger::debug('Firing ' . __METHOD__);\n config(['logging.channels.single.path' => KickflipHelper::basePath() . '/kickflip.log']);\n $this->enableBladeMarkdownEngine();\n $bootstrapFile = KickflipHelper::namedPath(CliStateDirPaths::BootstrapFile);\n if (File::exists($bootstrapFile)) {\n include $bootstrapFile;\n }\n }", "title": "" }, { "docid": "fc6d6e0c14ce9f7e5d2b28f01d91bf6c", "score": "0.7062483", "text": "public function boot()\n {\n $this->publishConfig();\n $this->registerCommands();\n }", "title": "" }, { "docid": "771770d70f5d7046adf3b0261573485b", "score": "0.7060348", "text": "public function boot()\n {\n //\n\t\t\t\t\n }", "title": "" }, { "docid": "fb4ef3bb4f77d728960176005c8189f3", "score": "0.70590705", "text": "protected static function boot()\n {\n parent::boot();\n\t\n\t\tMessage::observe(MessageObserver::class);\n }", "title": "" }, { "docid": "b7ef23b2347d4ced6f3de201c5cf5714", "score": "0.7053919", "text": "public function boot()\n {\n $this->registerSessionEvents();\n }", "title": "" }, { "docid": "09ae2a26a2d2d0b8131285053974cab8", "score": "0.70489854", "text": "public function boot()\n {\n $this->add_routes();\n $this->add_views();\n }", "title": "" }, { "docid": "e8821c610fcaab8b9537b277651fc070", "score": "0.70470536", "text": "protected function bootstrap()\n {\n }", "title": "" }, { "docid": "49d4e5411f358fc2b6c05b2e9b16a19f", "score": "0.70455325", "text": "public function boot()\n {\n Nova::script('NovaAwsCloudwatch', __DIR__.'/../dist/js/tool.js');\n\n $this->app->booted(function () {\n $this->routes();\n });\n\n $this->mergeConfigFrom(__DIR__.'../../config/nova_aws_cloudwatch.php', 'nova_aws_cloudwatch');\n\n }", "title": "" }, { "docid": "d3ee238a9844c634dc1e5682d9e75094", "score": "0.70453835", "text": "public function boot()\n\t{\n $this->addPublishCommand();\n\t}", "title": "" }, { "docid": "15e56cd28b4112c7be24c116a7952eda", "score": "0.7043758", "text": "public function boot()\n {\n $this->app->booted(function () {\n $this->routes();\n });\n\n Nova::serving(function (ServingNova $event) {\n Nova::script('nova-external-login', __DIR__ . '/../dist/js/tool.js');\n Nova::style('nova-external-login', __DIR__ . '/../dist/css/tool.css');\n });\n }", "title": "" }, { "docid": "69837f3a924ad1cad40dc3be9f07b4fa", "score": "0.70427287", "text": "public function boot()\n {\n parent::boot();\n\n Event::listen('cart.added', CartAdd::class);\n Event::listen('cart.updated', CartUpdate::class);\n Event::listen('cart.removed', CartDelete::class);\n Event::listen('cart.destroyed', CartDestroy::class);\n }", "title": "" }, { "docid": "eb619754fd0a4557166f16023227cac2", "score": "0.70421606", "text": "public function boot()\n {\n $this->enhanceTeamCreation();\n $this->setUpBCMath();\n }", "title": "" }, { "docid": "46092c454f024b089d5981c89956377a", "score": "0.70396304", "text": "public function boot()\n {\n $this->registerGates();\n $this->registerWidgets();\n $this->registerCss();\n $this->registerJs();\n }", "title": "" }, { "docid": "6417f2ec80bc831c77c045b8795250b9", "score": "0.70382243", "text": "public function boot()\n\t{\n\t}", "title": "" }, { "docid": "6417f2ec80bc831c77c045b8795250b9", "score": "0.70382243", "text": "public function boot()\n\t{\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "926ecd7026c8af66bf7c5ba222833b46", "score": "0.0", "text": "public function index()\n {\n //$user = auth('api')->user();\n\n //$contacts = Vault::latest()->paginate(10);\n \n \n //return response()->json($contacts);\n\n\n \n // $contacts = array(\n // 'id' => '65445',\n // 'user_name' => 'jsdjfj',\n // 'user_id' => auth('api')->user()->id\n // );\n \n // return ($contacts);\n \n //return Vault::latest()->paginate(10);\n \n \n return Vault::where('user_id', '=', auth('api')->user()->id)->latest()->paginate(10);\n\n }", "title": "" } ]
[ { "docid": "a1420ad0fb284c611971591393b45aef", "score": "0.7509679", "text": "public function index()\n\t{\n\t\t$resources = Resources::all();\n\t\t$collection = array();\n\t\t\n\t\tforeach ($resources as $name => $options)\n\t\t{\n\t\t\tif (false === value($options->visible)) continue;\n\t\t\t\n\t\t\t$collection[$name] = $options;\n\t\t}\n\n\t\t$table = $this->presenter->table($collection);\n\n\t\tSite::set('title', trans('orchestra/foundation::title.resources.list'));\n\t\tSite::set('description', trans('orchestra/foundation::title.resources.list-detail'));\n\n\t\treturn View::make('orchestra/foundation::resources.index', array(\n\t\t\t'eloquent' => $collection,\n\t\t\t'table' => $table,\n\t\t));\n\t}", "title": "" }, { "docid": "03c28056ac36b9758780b52bcb56ea11", "score": "0.7453479", "text": "public function actionList() {\n $this->getList();\n }", "title": "" }, { "docid": "79ad7ebbde0cad2af3c2becbd440dc9d", "score": "0.736227", "text": "public function listing();", "title": "" }, { "docid": "0aa4853e6e1c011310051c464837c9be", "score": "0.7341522", "text": "public function index()\n {\n $resources = $this->resource->paginate(10);\n\n return view('manager.resources.index', compact('resources'));\n }", "title": "" }, { "docid": "f6249e52b27cd61546f9ac9938889b8c", "score": "0.72989535", "text": "public function index()\n {\n $resources = Resource::all();\n return view('admin.resource.list')->with('resources',$resources);\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eacf64f52d5b73d527cae880dfe65bc1", "score": "0.72152483", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::paginate(10));\n }", "title": "" }, { "docid": "5e485f5256447384c89b0040914b850e", "score": "0.7209843", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(10);\n\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "2e3564beb136b7de619ee51f1088fb53", "score": "0.719667", "text": "public function index()\n {\n\n return \\View::make('resources.index')\n ->with(['displayName' => 'resources']\n );\n }", "title": "" }, { "docid": "6ba01bde2894545b26719d51e92cebf6", "score": "0.71551645", "text": "public function indexAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAllDesc();\n\n return $this->render('admin/resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "42bee349ff83930cb164b3a793f6d5b2", "score": "0.71432024", "text": "public function listAction()\n {\n //Setup search properties form\n $searchForm = $this->service->getForm('Search');\n $action = $this->view->url(['action'=>'search'], 'controllers');\n $searchForm->setAction($action);\n $this->view->searchForm = $searchForm;\n //Setup properties list\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $collection = $this->service->retrievePropertyCollection($page);\n $this->view->collection = $collection;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.713195", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "1ac60064d05eb6556018c88c4294567a", "score": "0.7113176", "text": "public function index()\n\t{\n\t\t$this->lists();\n\t}", "title": "" }, { "docid": "21284f1b8a31a69a0252300fcccbc357", "score": "0.71072334", "text": "public function listingAction()\r\n {\r\n\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oZendDbSelect->from('View_Rclient_Types_Listing')->order('cl_type_id asc');\r\n\r\n // Query search engine\r\n $oMySearchEngine = new My_Search_Engine($oZendDbSelect);\r\n $oMySearchEngine->findWordOn(array('cl_type_libelle' => array('operator' => 'like')));\r\n\r\n $oMySearchEngine->findByFields(\r\n array(\r\n 'cl_type_id' => array('operator' => 'eql'),\r\n 'cl_type_libelle' => array('operator' => 'like')\r\n )\r\n );\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oExport = new My_Data_Export_CSV(new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect()));\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Initialize paginator adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n\r\n // Pagination management\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "68a189cc0bf8bc79e0e116676dbdb66b", "score": "0.70221174", "text": "public function actionList()\n {\n $this->assign(\"name\", \"leiyi\");\n\n $this->display('home/page/list.tpl');\n }", "title": "" }, { "docid": "eeebaafb341e5dcfe7cd3e2d7c48f741", "score": "0.7020841", "text": "public function listAction()\n {\n \t$currentPage = 1;\n \t//Check if the user is not on page 1\n \t$i = $this->_request->getQuery('i');\n \tif(!empty($i))\n \t{\n \t\t$currentPage = $this->_request->getQuery('i');\n \t}\n \t\n \t//Create a db object\n \trequire_once \"../application/models/Db/Db_Db.php\";\n \t$db = Db_Db::conn();\n \t\n \t//Create a Zend_db_select object\n \t$sql = new Zend_Db_Select($db);\n \t\n \t//Define the columns to retrieve as well as table.\n \t$columns = array(\"id\",\"artist_name\");\n \t$table = array(\"artists\");\n \t\n \t//SELECT `artists`.`id`, `artists`.`artist_name` FROM `artists`\n\t\t$statement = $sql->from($table, $columns);\n \t\n \t//Initialize the Zend_Paginator\n \t$paginator = Zend_Paginator::factory($statement);\n \t\n \t//Set the properties for the pagination\n \t$paginator->setItemCountPerPage(10);\n \t$paginator->setPageRange(10);\n \t$paginator->setCurrentPageNumber($currentPage);\n \t\n \t$this->view->paginator = $paginator;\n \t\n }", "title": "" }, { "docid": "7c87396141031b5bdb4d7fce1a123f8f", "score": "0.7008967", "text": "public function index()\n {\n $this->listing('0', '', '0');\n }", "title": "" }, { "docid": "20d766db80674b0e4072b2719471b257", "score": "0.69712967", "text": "public function index()\n {\n\n $ourresource = OurResource::all();\n return view('Admin.ourresource.all', compact('ourresource'));\n }", "title": "" }, { "docid": "217e339de79424bf236318e41ddb0695", "score": "0.6958182", "text": "public function index()\n {\n $resources = Resource::getResourceDetails();\n return view('admin.resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "84dde6f109c23a0b3b845c0d6e864169", "score": "0.69026124", "text": "public function index()\n\t{\n $config['list'] = VrResources::get()->toArray();\n $config['title'] = trans('app.adminMenuResources');\n $config['no_data'] = trans('app.adminNoData');\n $config['new'] = route('app.resources.create');\n $config['edit'] = 'app.resources.edit';\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList', $config);\n\t}", "title": "" }, { "docid": "6e166e624d00d2c763463d2f398dd1ef", "score": "0.68946916", "text": "public function indexAction() {\n $this->pageTitle = $this->_(\"AclResource management\");\n $grid = new AclResourceGrid(\"AclResource\");\n $grid->run();\n $this->view->setVars(array(\n 'grid' => $grid\n ));\n }", "title": "" }, { "docid": "bebf123d6dd48762f8190b1776616d05", "score": "0.68929", "text": "public function index()\n {\n if (is_null($this->resource)) {\n return response()->json($this->service->paginate());\n } else {\n return $this->resource::collection($this->service->paginate());\n }\n }", "title": "" }, { "docid": "97968d8873a94786d3e40145696ee2bd", "score": "0.68919075", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "5dc08bdec3bdf1e8261a81891fdb5f4e", "score": "0.6873949", "text": "public function index()\n {\n $arrObjResource = Resource::latest()->paginate(5);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "0e8ad7256c7bbd8504ebf3d782bb3209", "score": "0.68704486", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findBy(array('channel' => $this->getUser()->getActiveChannel()));\n\n return $this->render('AppBundle:Resource:index.html.twig', array(\n 'resources' => $resources,\n 'channel' => $this->getUser()->getActiveChannel(),\n ));\n }", "title": "" }, { "docid": "e76df9bb5e40cc75acb3fb5e4b084b82", "score": "0.6848992", "text": "public function listing() {\n $title = \"Admin - Listing\";\n $this->set(compact('title'));\n\n $conditions = array('delete_status' => NotDeleted);\n if ($this->request->is('post') && !empty($this->request->data['search'])) {\n $conditions['OR']['first_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['last_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['email LIKE'] = '%' . $this->request->data['search'] . '%';\n }\n\n $this->paginate = [\n 'limit' => PAGING_SIZE,\n 'conditions' => $conditions,\n ];\n $Results = $this->paginate('Admins');\n $this->set(compact('Results'));\n\n if ($this->request->is('ajax')) {\n $this->viewBuilder()->layout('ajax');\n $this->viewBuilder()->templatePath('Element' . DS . 'admin' . DS . 'admin');\n $this->render('index');\n }\n }", "title": "" }, { "docid": "6b9f4551cb0d7103440e15f4ff2bc102", "score": "0.6844889", "text": "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_actividadModel->getActividad();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "95b579529f8b40d1b2b6ae580a9b3250", "score": "0.6835474", "text": "public function index()\n {\n $this->params['page'] = empty($this->params['page']) ? 1 : $this->params['page'];\n $collection = $this->model->paginate($this->params);\n $this->set('objects', $collection['objects']);\n $this->set_pagination($collection);\n }", "title": "" }, { "docid": "358b82626374a39ca1c5cb87e1d94243", "score": "0.68288803", "text": "public function crane_list() {\n\t\t\t$this->setAction('index');\t\n\t\t\t$this->render('crane_list');\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "3824dabd41509647ac9d2bc02a329701", "score": "0.68272334", "text": "public function indexAction()\n {\n $config = $this->getConfiguration();\n\n $listRenderer = $this->getListRenderer();\n $sort = $this->getSort();\n $listRenderer->setSort($sort);\n $criteria = $this->getFilterCriteria();\n\n $pager = $this->getPager();\n $pager->setMaxRows($config->getListOption('max_page_rows'));\n $pager->setPage($this->getCurrentPage());\n $pager->setQueryBuilder(\n $this->getModelManager()->buildQuery(\n $criteria,\n $sort\n )\n );\n\n $criteria = $this->getModelManager()->mergeFilterCriteriaObjects($criteria);\n $filterForm = $this->getFilterRenderer()->getForm($criteria);\n\n return $this->container->get('templating')\n ->renderResponse($listRenderer->getTemplate(), array(\n 'renderer' => $listRenderer,\n 'filter' => $this->getFilterRenderer(),\n 'pager' => $pager,\n 'csrf' => $this->container->get('form.csrf_provider')->generateCsrfToken('list'),\n 'filtered' => count($criteria),\n 'form' => $filterForm->createView()\n ));\n }", "title": "" }, { "docid": "cf4f6462e1cc3025d88860aa2c4ba62f", "score": "0.6825393", "text": "function index()\n\t{\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array($this, 'listing'), $args);\n\t}", "title": "" }, { "docid": "01d58c7ca6fc90f9a714a9eb1332496e", "score": "0.6821498", "text": "public function index()\n\t{\n\t\t$resourceLikes = $this->resourceLikeRepository->paginate(10);\n\n\t\treturn view('resourceLikes.index')\n\t\t\t->with('resourceLikes', $resourceLikes);\n\t}", "title": "" }, { "docid": "550d19f420a94197568709e17d512612", "score": "0.68181574", "text": "public function listTask()\n\t{\n\t\t// Incoming directory (this should be a path built from a resource ID and its creation year/month)\n\t\t$listdir = Request::getString('listdir', '');\n\t\tif (!$listdir)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('COM_RESOURCES_ERROR_NO_LISTDIR') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\t// Incoming sub-directory\n\t\t$subdir = Request::getString('subdir', '');\n\n\t\t// Build the path\n\t\t$path = Utilities::buildUploadPath($listdir, $subdir);\n\n\t\t$folders = array();\n\t\t$docs = array();\n\n\t\tif (is_dir($path))\n\t\t{\n\t\t\t// Loop through all files and separate them into arrays of images, folders, and other\n\t\t\t$dirIterator = new \\DirectoryIterator($path);\n\n\t\t\tforeach ($dirIterator as $file)\n\t\t\t{\n\t\t\t\tif ($file->isDot())\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$name = $file->getFilename();\n\n\t\t\t\tif ($file->isDir())\n\t\t\t\t{\n\t\t\t\t\t$folders[$path . DS . $name] = $name;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($file->isFile())\n\t\t\t\t{\n\t\t\t\t\tif (in_array(strtolower($name), array('cvs', '.svn', '.git', '.ds_store')))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$docs[$path . DS . $name] = $name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tksort($folders);\n\t\t\tksort($docs);\n\t\t}\n\n\t\t$this->view\n\t\t\t->set('listdir', $listdir)\n\t\t\t->set('subdir', $subdir)\n\t\t\t->set('docs', $docs)\n\t\t\t->set('folders', $folders)\n\t\t\t->set('config', $this->config)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('list')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "78f3ca79946467b9bfd80223ec5ba614", "score": "0.6808544", "text": "public function index()\n {\n return PlayResource::collection(Play::paginate());\n }", "title": "" }, { "docid": "f1c7ec0399bbc0a26f289a612459ed88", "score": "0.67977417", "text": "function index()\r\n\t{\r\n $this->showlist();\r\n\t}", "title": "" }, { "docid": "31a61aadfd15cf04075c88c5088f8860", "score": "0.67884994", "text": "public function listing(Request $request)\n {\n //validations and access control\n $this->validationAndAccess(__FUNCTION__, $request);\n\n //Start query builder. You can start limiting your results here, for example:\n $scope = $this->nested_parameters;\n if(empty($scope)){\n $query = '';\n }else{\n $query = $this->model->select($this->model->availableTableFields());\n foreach($scope as $field => $value){\n $query = (!empty($value)) ? $query->where($field,'=',$value) : $query;\n }\n }\n\n //Get resources list using our query builder function, just to pass the tablable model, the json request from the table view and optionally, a initial query object.\n $query_results = VibrantTools::getListFromModel($this->model, $request, $this->force_id_request, $query);\n\n return response()->json($query_results);\n }", "title": "" }, { "docid": "118caca12a46f44cf44d066cf46e4baf", "score": "0.6768095", "text": "public function index()\n {\n return ItemResource::collection(Items::orderBy('id', 'desc')->paginate(30));\n }", "title": "" }, { "docid": "50b94f1d44a80883647d7fc440645f79", "score": "0.67589504", "text": "public function listAction()\n {\n $contents = $this->entityManager->getRepository('Studit\\H5PBundle\\Entity\\Content')->findAll();\n return $this->render('@StuditH5P/list.html.twig', ['contents' => $contents]);\n }", "title": "" }, { "docid": "6cb967692b4f77fb138723c118707e5a", "score": "0.6756384", "text": "public function listAction()\n\t{\n\t\t$pages = Model_Query_Page::getTree(Model_Query_Page::TREE_TYPE_FLAT);\n\t\t\n\t\t$this->view->pages = $pages;\n\t}", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "17f3cd4988f20f8325c593af544287ff", "score": "0.67272323", "text": "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "title": "" }, { "docid": "24af10ce4b6b3777185b0f14f381d2ed", "score": "0.6723023", "text": "public function index() {\n $resources = $this->resourceMapper->findAll();\n\n // put the array containing Resource object to the view\n $this->view->setVariable(\"resources\", $resources);\n if (isset($this->currentUser) && $this->currentUser->getUser_type() == usertype::Administrator){\n $this->view->render(\"resources\", \"index\");\n }\n }", "title": "" }, { "docid": "1d448703f5190066628ad9862a2d03f8", "score": "0.67209285", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$viewer_id = $viewer->getIdentity();\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n \n\t\t//GET LEVEL SETTING\n $this->view->allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($list, $viewer, 'photo');\n \n //GET PAGINATOR\n $this->view->album = $album = $list->getSingletonAlbum();\n $this->view->paginator = $paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $paginator->getTotalItemCount();\n $paginator->setCurrentPageNumber($this->_getParam('page'));\n $paginator->setItemCountPerPage(20);\n\n if (empty($this->view->allowed_upload_photo) && empty($this->view->total_images)) {\n return $this->setNoRender();\n }\n \n //ADD COUNT TO TITLE\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n }", "title": "" }, { "docid": "871969a5830c5824710f35f92b284e14", "score": "0.6717003", "text": "public function list_action()\n {\n $productRp = new ProductRepository;\n\n $pageTitle = 'crud';\n $crudLinkStyle = 'current_page';\n\n $cssStyleRule = $this->buildStyleRule();\n $backgroundColor = $this->getBackgroundColor();\n\n $isLoggedInAsAdmin = $this->isAdminUser();\n\n // 2. get all products\n $products = $productRp->get_all_products();\n\n $isLoggedIn = $this->is_logged_in_from_session();\n $user_name = $this->username_from_session();\n\n\n require_once __DIR__ . '/../template/admin_crud.php';\n }", "title": "" }, { "docid": "114a63c0832877abfdcd8697254fa24d", "score": "0.67128056", "text": "public function list()\n {\n // On va vérifier les authorisations : Admin only\n $this->checkAuthorisation(['admin']);\n\n // On appelle la méthode show() de l'objet courant\n // En argument, on fournit le fichier de Vue\n // Par convention, chaque fichier de vue sera dans un sous-dossier du nom du Controller\n\n $products = Product::findAll();\n\n $dataToDisplay = [\n 'products' => $products\n ];\n\n // On va appeler (require) le fichier views/category/list.tpl.php\n $this->show('product/list', $dataToDisplay);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "86eb524e99a31621e46aa2e8718e61f6", "score": "0.67027086", "text": "public function index()\n {\n $items = Item::orderBy('id', 'DESC')->paginate(10);\n\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "d79dbba2d57614ef830362a19c63a970", "score": "0.66864055", "text": "public function index()\n {\n return $this->view('list', [\n 'elements' => $this->service->index()\n ]);\n }", "title": "" }, { "docid": "db8a0696586c7515873c89a6a0d1cb86", "score": "0.6681138", "text": "public function actionIndex()\n {\n $array = MyList::getAll();\n\n return $this->render('index', ['model' => $array]);\n }", "title": "" }, { "docid": "f87e4c930a716211a968b3d9cc7f28cb", "score": "0.6679537", "text": "public function listAction()\n {\n $data = array(\n 'red',\n 'green',\n 'blue',\n 'yellow'\n );\n\n $request = $this->getRequest();\n $acceptHeader = $request->getHeader('Accept');\n\n $this->view->assign(\n array(\n 'data' => $data\n )\n );\n }", "title": "" }, { "docid": "0fd2e15257bfa9204ec9573726987c66", "score": "0.66752803", "text": "public function index()\n {\n $menu = Menu::paginate(10);\n\n return MenuResource::collection($menu);\n }", "title": "" }, { "docid": "daba699beaeef91359ed7b10313414c0", "score": "0.6675206", "text": "public function index()\n {\n $this->checkPermission(\"admin_permission_management\");\n $items = $this->service->getAll();\n\n $items = ApiResource::collection($items);\n\n return $this->respondWithSuccess($items);\n }", "title": "" }, { "docid": "93802b97c6f44ae5e366b70deec744b9", "score": "0.66626006", "text": "public function show()\n {\n $results = $this->run('show');\n }", "title": "" }, { "docid": "5278e85997fa12c693ce5b7a9a5f2e24", "score": "0.6659221", "text": "public function index() {\n\t\treturn ClientResource::collection(Client::paginate(15));\n\t}", "title": "" }, { "docid": "601280f6c7a8fe1284080c1c22a3e447", "score": "0.6654493", "text": "public function index()\n {\n // Get Accounts\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of Accounts as a resource\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "5d3102f6a725b79d77b0e3bc731ae984", "score": "0.66521215", "text": "public function index()\n {\n $polls = Poll::latest()->paginate(16);\n return PollResource::collection($polls);\n }", "title": "" }, { "docid": "4c33127363526600cc1da25d18f917b1", "score": "0.66481763", "text": "public function index()\n {\n $entries = Entry::all();\n return view('list', compact('entries'));\n }", "title": "" }, { "docid": "e2eacd814cad9b8205ce83c08f3b5e18", "score": "0.6644318", "text": "public function showAllAction()\n {\n $title = \"Product overview\";\n $page = $this->app->page;\n $db = $this->app->db;\n\n $this->connection();\n $sql = \"SELECT * FROM product;\";\n $res = $db->executeFetchAll($sql);\n\n $data = [\n \"res\" => $res,\n \"check\" => \"check\"\n ];\n\n // $page->add(\"flash\", [], \"hej\");\n $page->add(\"products/header\");\n $page->add(\"products/show-all\", $data);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "7ba8d3b39da88e11faeb12313b1810c2", "score": "0.6642726", "text": "public function index()\n {\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\n }", "title": "" }, { "docid": "2e266895b57f5ca532a4517799527c81", "score": "0.6637523", "text": "public function index()\n {\n $this->authorize('viewAny', Article::class);\n return ArticleResource::collection(Article::paginate(10));\n }", "title": "" }, { "docid": "e3549202853588a65782bc96028199ed", "score": "0.6635664", "text": "public function indexAction()\n {\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $perpage = 9;\n $count = R::count('product');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $products = R::getAll(\"SELECT product.*, category.title AS cat FROM product JOIN category ON category.id = product.category_id ORDER BY product.title LIMIT $start, $perpage\");\n $this->setMeta('Product Liste');\n $this->set(compact('products', 'pagination', 'count'));\n }", "title": "" }, { "docid": "c7312e7e8966df50b49658cf582ce6ec", "score": "0.66348624", "text": "public function index()\n {\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\n }", "title": "" }, { "docid": "a7737316f2150c9517aa85bb9cd5c182", "score": "0.6620835", "text": "public function actionList()\n {\n $this->render(\n 'list',\n array(\n 'modules' => ($modules = $this->getInstalledModules()) ? $modules : array(),\n )\n );\n }", "title": "" }, { "docid": "fe5cbdcbc1d4a099ac316f47b6bde600", "score": "0.66093606", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n }", "title": "" }, { "docid": "48b9c834ddf22a0e1e54ba121573b35d", "score": "0.65925086", "text": "public function index()\n {\n $items= Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "ca2a7c14d5251722cbb44ad0cf858243", "score": "0.65886205", "text": "public function overviewAction()\n {\n return $this->getProxy(self::PROXY_CLASS)->findAll();\n }", "title": "" }, { "docid": "904c604bfcee5f1df6ea56185ca68d5b", "score": "0.6587205", "text": "public function index()\n {\n //GET all the ARTICLES\n $articles = Article::paginate(15);//display 15 records per page\n\n //return colletion of articles\n return ArticleResource::collection($articles);\n\n }", "title": "" }, { "docid": "1cb3c7ae8b44dd6649599a0c6b21c3c7", "score": "0.65857047", "text": "public function index()\n\t{\n\t\t$data = [\n\t\t\t'pageTitle' => $this->getResourcePluralName(),\n\t\t\t'allItems' => $this->repo->search($this->getIndexFilter()),\n\t\t\t'isDestroyingEntityAllowed' => $this->isDestroyAllowed(),\n\t\t\t'canCreateEntities' => $this->canCreateEntities(),\n\t\t\t'canEditEntities' => $this->canEditEntities(),\n\t\t];\n\n\t\t$viewName = $this->getIndexViewName();\n\n\t\treturn view($viewName, $data);\n\t}", "title": "" }, { "docid": "918a60c91683ae2630d02bdb5af36fd8", "score": "0.6585502", "text": "public function index()\n\t{\n\t\t// if view_table_permission is false, abort\n\t\tif (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n\t\t\tabort(403, 'Not allowed.');\n\t\t}\n\n\t\t// get all results for that entity\n\t\t$model = $this->crud['model'];\n\t\t$this->data['entries'] = $model::all();\n\n\t\t$this->_prepare_columns(); // checks that the columns are defined and makes sure the response is proper\n\n\t\t$this->data['crud'] = $this->crud;\n\n\t\t// load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\t\tif (view()->exists('vendor.dick.crud.list'))\n\t\t{\n\t\t\treturn view('vendor.dick.crud.list', $this->data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn view('crud::list', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "4e0e77be39529387e26200c96e69287c", "score": "0.65843135", "text": "public function index()\n {\n return $this->respondResource($this->courseTransformer->transformCollection($this->model->all()));\n }", "title": "" }, { "docid": "679aeb0a886968964597db4d52db9f05", "score": "0.65769154", "text": "public function action_list() {\n\t\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\n\n\t\t// Build request\n\t\t$query = DB::select();\n\n\t\tif(isset($_POST['terms']))\n\t\t{\n\t\t\t$query->where('title','like',\"%\".$_POST['terms'].\"%\");\n\t\t\t$query->or_where('subtitle','like',\"%\".$_POST['terms'].\"%\");\n\t\t}\n\n\t\t$photos = Sprig::factory('photo')->load($query, FALSE);\n\n\n\t\tif(Request::$is_ajax)\n\t\t{\n\t\t\t// return a json encoded HTML table\n $this->request->response = json_encode(\n\t\t\t\tView::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n ->render()\n );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return the full page\n\t\t\t$this->template->content = View::factory('admin/photo/list')\n\t\t\t\t->set('tbody', View::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n\t\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "2a58e9f56c195880d92e6beb689abbba", "score": "0.6570577", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t\n\t\t$perpage = $this->perpage;\n\t\t$search = array();\n\t\t\n\t\tlist($total, $data) = Cut_Service_Type::getList($page, $perpage, $search);\n\t\t$count = Cut_Service_Store::getCountByType();\n\t\t$this->assign('data', $data);\n\t\t$this->assign('count', $count);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('search', $search);\n\t\t$this->cookieParams();\n\t}", "title": "" }, { "docid": "ec4c68627da9cf6d0e66bd08ee79a1dc", "score": "0.65669394", "text": "public function index()\n {\n // Get articles\n $phonebook = Phonebook::all();\n // $phonebook = Phonebook::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of articles as a resource\n return PhonebookResource::collection($phonebook);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "91bd64ec31d39c68673ba29f7d9f8854", "score": "0.6563426", "text": "public function index()\n {\n $books = Book::all();\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "fbe5edfb0d98ba0fd6a7b19c41578f77", "score": "0.6557768", "text": "public function index()\n {\n try{\n $records = $this->recordRepository->all();\n return RecordResource::collection($records);\n }catch(Exception $ex){\n return (new RecordResource(null))->additional([\"success\" => false, 'message' => $ex->getMessage()]);\n }\n }", "title": "" }, { "docid": "d6b8267e53f8fa9ab6b806d4fbc412ee", "score": "0.655762", "text": "public function indexAction()\n {\n $total = 0;\n $records = $this->selectRecords($total);\n\n $this->apiOutRecords($records, array('_total' => $total));\n }", "title": "" }, { "docid": "3880843e6dad72ba6c5735793fc1ed0b", "score": "0.6556616", "text": "public function index()\n {\n $query = Person::getList(request('filter', ''))\n ->orderBy(request('order_by','s_FullLegalName'),request('order','ASC'));\n \n return PersonResource::collection($query->paginate(request('per_page', 100)));\n }", "title": "" }, { "docid": "04cfd6b456f88347b94d80eedaf2f138", "score": "0.65456504", "text": "public function index()\n {\n return new FormatResourceCollection(Format::paginate(12));\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "ab27904c6696fc1d0abf6bfaac7bde7e", "score": "0.65404403", "text": "public function listAction()\n {\t\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepEmp = $em->getRepository('BoAdminBundle:SupEmployee');\n\t\t$nb_tc = $oRepEmp->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$supemployees = $em->getRepository('BoAdminBundle:SupEmployee')->findBy(array(),array('firstname' => 'asc'),$nb_cpp,$offset);\n return $this->render('supemployee/index.html.twig', array(\n 'supemployees' => $supemployees,\n\t\t\t'types'=>$em->getRepository('BoAdminBundle:Contracts')->getContractType(),\n\t\t\t'languages'=>$em->getRepository('BoAdminBundle:Language')->getAll(),\n\t\t\t'statuss'=>$em->getRepository('BoAdminBundle:Employee')->getStatusEmployee(),\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'message'=> $this->getSessionMessage(),\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"archives\",\n\t\t\t'sm'=>\"supemployee\",\n ));\n }", "title": "" }, { "docid": "4b7799b0d4a4b471dbc995e613462306", "score": "0.6540187", "text": "public function listAction()\n {\n return new Response(\n json_encode([\n [\n 'id' => 1,\n 'title' => 'First Post on Vox',\n 'author' => 'Mario Rossi',\n 'author_id' => 1,\n 'excerpt' => \"Here we are! Finally this is my first post on Vox and I am so happy that...\",\n 'content' => \"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\",\n 'date' => \"08/01/2015\"\n ],\n [\n 'id' => 2,\n 'title' => 'And yes, this is my second post!',\n 'author' => 'Lukas Schneider',\n 'author_id' => 2,\n 'excerpt' => \"Well this is already my second post and so you already know that...\",\n 'content' => \"Well this is already my second post and so you already know that, in terms of being my second post,\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\",\n 'date' => \"09/02/2015\"\n ]\n ]),\n 200,\n 'application/json'\n );\n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65379655", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "f02310ea34b1d707bc2f4d714e4c27f4", "score": "0.65372354", "text": "public function index()\n {\n return view($this->template.'.list.index');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "151cb6ff960217da12cef7baa33178ed", "score": "0.652593", "text": "public function listAction()\n {\n if ((!$this->auth->hasIdentity()) || ($this->session->type != '1'))\n $this->_helper->redirector('index', 'index');\n\n $this->view->headTitle(\"Noticias\");\n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/list.css');\n\n $tbNews = new TbNews();\n $this->view->news = $tbNews->select()->query()->fetchAll();\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "b1dec5f0dac45e2b14cc0f57d1289acb", "score": "0.65199256", "text": "public function index()\n {\n //\n\t\t\t\t// $resources = Resource::all();\n\t\t\t\t// $resources = $resources->sortByDesc('creation_date');\n\t\t\t\t// return response()->json($resources->values()->all());\n\n\t\t\t\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\n }", "title": "" }, { "docid": "e88169ebd124db7bccec6b3cfb0167be", "score": "0.65179664", "text": "public function index()\n {\n $albums = Album::orderBy('date', 'desc')->paginate(20);\n\n\n return AlbumResource::collection($albums);\n }", "title": "" }, { "docid": "fbf72fd4f1e2e3a08a1398a646fce575", "score": "0.651124", "text": "public function index()\n\t{\n\t\t$shows = $this->shows->all();\n\t\n\t\treturn $this->apiResponse('success', $shows->toArray());\n\t}", "title": "" }, { "docid": "1860cb7aec35aa79a7186d6bd7c6a7d4", "score": "0.65010643", "text": "public function index()\n {\n //\n return view('backend.admin.catalogs.index')\n ->with(['catalogs' => Catalog::paginate(10)]);\n }", "title": "" }, { "docid": "66db74bb7d42b9897dbcbf88ebabf0ca", "score": "0.64994514", "text": "public function index()\n {\n $request = request();\n if($request->query->has('page_size')){\n $this->setPageSize(request()->query->getInt('page_size', $this->page_size));\n }\n\n $items = $this->indexService->getItems($this->pageSize());\n\n return view($this->templateIndex, [\n 'items' => $items,\n 'title' => $this->getTitle(),\n 'controller' => $this->getController(),\n 'fields' => $this->listFields(),\n 'sortable' => $this->isSortable\n ]);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "bc53be210c897827bfafe166eceeb35a", "score": "0.6491012", "text": "public function index()\n {\n $employees = $this->paginate($this->Employees);\n\n $this->set(compact('employees'));\n $this->set('_serialize', ['employees']);\n }", "title": "" }, { "docid": "43a505c360befd38cd453143a05a36e2", "score": "0.6481906", "text": "public function index()\n {\n $statuses = $this->statuses->paginate(10);\n\n return view('backend.statuses.index',compact('statuses'));\n }", "title": "" }, { "docid": "65d1d46b6cab2b6d3d5320b59de21946", "score": "0.64814454", "text": "public function index()\n {\n //get some articles\n $posts = Post::paginate(15);\n //return the collection as resource\n return PostResource :: collection($posts);\n }", "title": "" } ]
f2f94a3b5bc28cd7e1c2c25532cdf711
Sets allowExtra flag to true, which allows headers other than the one specified to be present within the response.
[ { "docid": "d214bbf7cc84275c74ccc88936f7a1cb", "score": "0.70717674", "text": "public function allowExtraHeaders(): self\n {\n $this->headersMatcher->allowExtra();\n return $this;\n }", "title": "" } ]
[ { "docid": "fbb969f3b6d765875611d32f7a093314", "score": "0.6643725", "text": "public function setOmitHeader($flag) {}", "title": "" }, { "docid": "2f2c6b03421e7178091d8de965e8bc1a", "score": "0.6224472", "text": "public static function allowHeader()\n {\n if (count(cfg::ALLOW_HEADERS)) {\n header(\"Access-Control-Allow-Headers:\" . implode(', ', cfg::ALLOW_HEADERS));\n }\n }", "title": "" }, { "docid": "6858062e1fdb34e326fc6a5dc738067b", "score": "0.5742795", "text": "public static function setHeaders($extraHeader = array())\n {\n $headers = array(\n \"apiKey\" => self::$apiKey,\n \"accessKey\" => self::$token\n );\n if(!empty($extraHeader))\n {\n foreach($extraHeader as $key=>$value)\n {\n $headers[$key] = $value;\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "4cd5a55c4d3ebeda761b0b330cc34fa2", "score": "0.56824535", "text": "protected function addAllowHeader()\n {\n $methods = $this->getAllowedMethods();\n if ($methods) {\n $this->response->setHeader('Allow', join($methods, ', '));\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "fb1f8ca202fc8415d9eb30d5795e030c", "score": "0.55988425", "text": "public function addSecurityHeaders(FilterResponseEvent $event)\n {\n $response = new Response(\n $event->getResponse()->getContent(),\n $event->getResponse()->getStatusCode(),\n [\n 'X-Content-Type-Options' => 'nosniff',\n 'X-Frame-Options' => 'DENY',\n 'X-XSS-Protection' => '1; mode=block'\n ]\n );\n\n $event->setResponse($response);\n\n\n }", "title": "" }, { "docid": "988374badc4660973aa48a4e1f46d356", "score": "0.55391324", "text": "public function testAdditionalHeaders()\n {\n $this->client->setHeader('X-CUSTOM-HEADER', 'foo');\n\n $this->mockApiResponses([\n new Response(200, [], '')\n ]);\n\n $this->dummyResource->findAll();\n\n $transaction = $this->mockedTransactionsContainer[0];\n $request = $transaction['request'];\n\n $this->assertEquals('foo', $request->getHeaderLine('X-CUSTOM-HEADER'));\n }", "title": "" }, { "docid": "c17d3287bd3f14793e5531cd27996261", "score": "0.55252653", "text": "public function includeHeader ($bool) {\n $this->_includeHeader = $bool;\n }", "title": "" }, { "docid": "f9ebfcd18763b88f7ce2ddc30aa34fad", "score": "0.5440615", "text": "public function include_response_headers($value)\n\t{\n\t\tcurl_setopt($this->ch, CURLOPT_HEADER, $value);\n\t}", "title": "" }, { "docid": "6b6e1346b91dbcc80db74fbd205cc05c", "score": "0.53898406", "text": "private function addHeaders()\n {\n $this->curl->addHeader('Content-Type', 'application/json');\n $this->curl->addHeader('Accept', 'application/json');\n }", "title": "" }, { "docid": "9b599684c6734a58fcf5aaf20d1e28fa", "score": "0.53887045", "text": "function useHeader($bool)\r\n {\r\n $this->header = (bool)$bool;\r\n }", "title": "" }, { "docid": "b5c246289855e8f5ec53751d3ee1764d", "score": "0.5327517", "text": "protected function getDefaultHeaders()\n {\n return ['Accept' => 'application/json'];\n }", "title": "" }, { "docid": "dda3b2dc088b437f55c87929c903c00d", "score": "0.5315438", "text": "public function add_headers( $extra_headers ) {\n\t\t$extra_headers = array( 'GitHub Plugin URI', 'GitHub Access Token', 'GitHub Branch' );\n\t\treturn $extra_headers;\n\t}", "title": "" }, { "docid": "04345ae2d9bcdbb0f1794900efe30eb8", "score": "0.53040034", "text": "protected function options()\n {\n if ($this->addAllowHeader()) {\n $this->response->setStatusCode(200);\n } else {\n $this->response->setStatusCode(405);\n }\n }", "title": "" }, { "docid": "fb448edb2182a573896f6f1e886c780b", "score": "0.52579594", "text": "public function setHeaders()\n {\n http_response_code($this->getCode());\n header('Content-type: application/json');\n header_remove('X-Powered-By');\n header('X-Powered-By : beabys');\n }", "title": "" }, { "docid": "c3992be7671e1df52d4268a93cccb452", "score": "0.5251085", "text": "public function testAllowHeaderNotAllowed()\n {\n $crawler = $this->call(\n 'POST',\n 'api/ping',\n [],\n [],\n [],\n [\n 'HTTP_ORIGIN' => 'localhost',\n 'HTTP_ACCESS_CONTROL_REQUEST_HEADERS' => 'x-custom-3',\n ]\n );\n $this->assertEquals(\n null,\n $crawler->headers->get('Access-Control-Allow-Headers')\n );\n $this->assertEquals(200, $crawler->getStatusCode());\n }", "title": "" }, { "docid": "4919d8a696970bd910b0049798bc6f72", "score": "0.52290183", "text": "private function _sendHeaders(): void {\n Header::noCache();\n Header::accessControl();\n }", "title": "" }, { "docid": "683edd365364e81a8bc000d0d276f0c0", "score": "0.5206063", "text": "public function testAllowHeaderAllowed()\n {\n $crawler = $this->call(\n 'POST',\n 'api/ping',\n [],\n [],\n [],\n [\n 'HTTP_ORIGIN' => 'localhost',\n 'HTTP_ACCESS_CONTROL_REQUEST_HEADERS' => 'x-custom-1, x-custom-2',\n ]\n );\n $this->assertEquals(\n null,\n $crawler->headers->get('Access-Control-Allow-Headers')\n );\n $this->assertEquals(200, $crawler->getStatusCode());\n\n $this->assertEquals('PONG', $crawler->getContent());\n }", "title": "" }, { "docid": "383cdfbdab81094c395602ed51da628d", "score": "0.5201729", "text": "public function getAllowHeaders()\n {\n if (null === $this->allowHeaders) {\n return [];\n }\n return $this->allowHeaders;\n }", "title": "" }, { "docid": "d6e9a658b36657d9ab580eb7aa53749b", "score": "0.5192607", "text": "private function _setDefaultHeaders()\r\n\t{\r\n\t\t$this->_http->addHeader(\"PayPal-Partner-Attribution-Id: PP-DemoPortal-EC-Psdk-ORDv2-php\");\r\n\t}", "title": "" }, { "docid": "b412c7ce1e1efe7a9894ce1d82bfaa1f", "score": "0.51753247", "text": "private function setDefaultHeader(){\n $this->curl->setHeader('Authorization', 'Basic ' . $this->getMerchantConfig()->getAuthorizationHeader());\n $this->curl->setHeader('Content-Type', 'application/json');\n }", "title": "" }, { "docid": "8f61de83869368c5869221806e8a4257", "score": "0.51646686", "text": "public function restoreHeaders() {\n \n if (is_array($this->headers)) {\n \n foreach ($this->headers as $header) {\n header($header);\n }\n }\n \n header(\"X-Onxshop-From-Cache: 1\");\n \n }", "title": "" }, { "docid": "2d9c93b69fb27ea34afab9b4792ef48b", "score": "0.51564735", "text": "function addHeader($mixed = false) {\n\t\tif (is_array($mixed)) $this->headers = array_merge($this->headers, $mixed);\n\t\telseif($mixed) $this->headers[] = $mixed;\n\t}", "title": "" }, { "docid": "876ccb1ed2ce34a3e510bd57cbe52957", "score": "0.5154709", "text": "public function headers()\n\t{\n\t\tif ($this->setHeaderJson === true) {\n\t\t\theader('Content-Type: application/json; charset=utf-8');\n\t\t\theader('Access-Control-Allow-Origin: *');\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "212b1c4d79e5d513b35289c6dd84c344", "score": "0.5123786", "text": "function setup_json_header(Response $response) {\n\treturn $response->withHeader('Content-Type', 'application/json');\n}", "title": "" }, { "docid": "c4da8934914e14bd12cd6affb5b6bf67", "score": "0.5121761", "text": "protected function setHeaderAllowOrigin()\n {\n if (!headers_sent()) {\n $ConfigDb = new \\Rdb\\Modules\\RdbAdmin\\Models\\ConfigDb($this->Container);\n $allowOrigins = $ConfigDb->get('rdbadmin_SiteAllowOrigins');\n unset($ConfigDb);\n\n if (is_scalar($allowOrigins) && !empty($allowOrigins)) {\n $allowOriginsArray = array_map('trim', explode(',', $allowOrigins));\n $headers = array_change_key_case(apache_request_headers());\n if (isset($headers['origin']) && is_array($allowOriginsArray)) {\n foreach ($allowOriginsArray as $allowOrigin) {\n $allowOrigin = strtolower(trim($allowOrigin));\n if (strtolower(trim($headers['origin'])) === $allowOrigin) {\n // if found allowed origin matched the request origin.\n break;\n }\n }// endforeach;\n } elseif (is_array($allowOriginsArray)) {\n $allowOriginsArray = array_values($allowOriginsArray);\n $allowOrigin = array_shift($allowOriginsArray);\n $allowOrigin = strtolower(trim($allowOrigin));\n }\n unset($allowOriginsArray, $headers);\n }\n unset($allowOrigins);\n\n if (isset($allowOrigin)) {\n header('Access-Control-Allow-Origin: ' . $allowOrigin);\n unset($allowOrigin);\n }\n }\n }", "title": "" }, { "docid": "2a766bc339833858dc5eb3ee8fc6f73b", "score": "0.5111285", "text": "public function setHeaders() : bool\r\n {\r\n if (! $this->isAuthenticated())\r\n {\r\n $this->headers = [\r\n \"Authorization: Basic \".$this->getEncodedToken(),\r\n \"Content-Type: application/x-www-form-urlencoded\"\r\n ];\r\n\r\n $this->authenticate();\r\n }\r\n else\r\n {\r\n $this->headers = [\r\n \"Authorization: Bearer \".$this->getAccessToken(),\r\n \"Content-Type: application/json\"\r\n ];\r\n }\r\n\r\n return true;\r\n\r\n }", "title": "" }, { "docid": "06cf5d6271537e594a4313165916a936", "score": "0.5060203", "text": "private function _addJSONHeader()\n {\n if ($this->_request->isAjaxRequest() && \n method_exists($this->_discoveredHandler, $this->_method)) {\n \n header('Content-type: application/json');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');\n header('Cache-Control: no-store, no-cache, must-revalidate');\n header('Cache-Control: post-check=0, pre-check=0', false);\n header('Pragma: no-cache');\n }\n }", "title": "" }, { "docid": "d8b0212219e256a9789502cf05908e22", "score": "0.5036878", "text": "public function allowCustomResponseCode(): void\n {\n $this->allowCustomResponseCode = true;\n }", "title": "" }, { "docid": "fab28ccac3fd8abaac37064915787b47", "score": "0.50320846", "text": "function useHeader($bool)\n {\n $this->_options['buildHeader'] = (bool)$bool;\n }", "title": "" }, { "docid": "2b84c423ecafd365dc10a73e0bce7a3d", "score": "0.50171787", "text": "public function setCORSheaders($auth = true, $allow = [])\n {\n if (empty($allow))\n {\n isys_core::send_header('Access-Control-Allow-Origin', '*');\n }\n else\n {\n isys_core::send_header('Access-Control-Allow-Origin', join(', ', $allow));\n }\n\n if ($auth)\n {\n isys_core::send_header(\n 'Access-Control-Allow-Headers',\n join(\n ', ',\n [\n isys_core::HTTP_Origin,\n isys_core::HTTP_RequestedWith,\n isys_core::HTTP_Content,\n isys_core::HTTP_Accept,\n isys_core::HTTP_RPCAuthUser,\n isys_core::HTTP_RPCAuthPass,\n isys_core::HTTP_RPCAuthSession\n ]\n )\n );\n isys_core::send_header('Access-Control-Expose-Headers', isys_core::HTTP_RPCAuthSession);\n }\n else\n {\n isys_core::send_header(\n 'Access-Control-Allow-Headers',\n join(\n ', ',\n isys_core::HTTP_Origin,\n isys_core::HTTP_RequestedWith,\n isys_core::HTTP_Content,\n isys_core::HTTP_Accept\n )\n );\n }\n }", "title": "" }, { "docid": "00c5dd69c1f29ca44fe7697305813f26", "score": "0.49691534", "text": "public function set_headers($overwrite) {\n $this->headers = $overwrite;\n return $this;\n }", "title": "" }, { "docid": "74b2bfd75858fa4e347db60f1237b67f", "score": "0.49552023", "text": "public function getCustomHeaders(): array\n {\n return array_key_exists('headers', $this->_options) ? $this->_options['headers'] : [];\n }", "title": "" }, { "docid": "f3941dc53ae0d53cbda31090f0dbd0d6", "score": "0.4949356", "text": "protected function setHeaders()\n {\n if (empty($this->content) and $this->statusCode === self::STATUS_OK[\"code\"]) {\n $this->setStatus(self::STATUS_NO_CONTENT);\n }\n\n $this->setStatusHeader();\n $this->setContentTypeHeader();\n }", "title": "" }, { "docid": "6111ecbd6b492f1311dd9488d0f97b85", "score": "0.4944377", "text": "public function setExposedHeaders(EventInterface $event)\n {\n // If this request was disallowed, don't expose any headers\n if (!$this->requestAllowed) {\n return;\n }\n\n $headers = [\n // The ResponseSender-listener will add this header and send the response,\n // so we have no way to pick it up - instead we'll always whitelist it\n 'X-Imbo-ImageIdentifier',\n ];\n\n foreach ($event->getResponse()->headers as $header => $value) {\n if (strpos($header, 'x-imbo') === 0) {\n $headers[] = implode('-', array_map('ucfirst', explode('-', $header)));\n ;\n }\n }\n\n $event->getResponse()->headers->add([\n 'Access-Control-Expose-Headers' => implode(', ', $headers),\n ]);\n }", "title": "" }, { "docid": "41d2699582ce5843ee091b95e386c7cf", "score": "0.49373934", "text": "public function setExtra($value);", "title": "" }, { "docid": "e42d2021af71ebf18cef719fd028b85e", "score": "0.49350393", "text": "public function setCaptureErrorHeaders($enable = null)\n {\n $this->CaptureErrorHeaders = $this->getBoolean($enable, 'CaptureErrorHeaders');\n }", "title": "" }, { "docid": "196cf063ce034219a120d6354e4b938e", "score": "0.49268892", "text": "protected function send_headers() {\n header('Content-Type: application/json; charset=utf-8');\n header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');\n header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');\n header('Pragma: no-cache');\n header('Accept-Ranges: none');\n }", "title": "" }, { "docid": "975577c6bc256ed0a18d0d9876972c53", "score": "0.49191865", "text": "public function disableHeaders()\n {\n $this->headersEnabled = false;\n\n return $this;\n }", "title": "" }, { "docid": "82de3ddc8b5857a511dd702f11944e8d", "score": "0.49108836", "text": "public function setFlagHeaders( $eventObject ) {\n $response = $eventObject->getResponse();\n if( Mage::helper( 'turpentine/esi' )->shouldResponseUseEsi() ) {\n $response->setHeader( 'X-Turpentine-Esi',\n Mage::registry( 'turpentine_esi_flag' ) ? '1' : '0' );\n Mage::helper( 'turpentine/debug' )->logDebug(\n 'Set ESI flag header to: %s',\n ( Mage::registry( 'turpentine_esi_flag' ) ? '1' : '0' ) );\n }\n }", "title": "" }, { "docid": "004ab1ed2b1121c13965052ddc5dac60", "score": "0.49046752", "text": "protected function setHeaders(): void\n {\n $origins = '*';\n\n if (count($this->option('origins')) !== 0) {\n $origins = implode(' ', $this->option('origins'));\n }\n\n $maxAge = $this->option('max-age');\n $meta = ['Access-Control-Allow-Origin' => $origins, 'Access-Control-Max-Age' => $maxAge];\n\n if (array_key_exists('Temp-Url-Key', $this->containerMeta)) {\n $meta += ['Temp-Url-Key' => $this->containerMeta['Temp-Url-Key']];\n }\n\n try {\n $this->container->resetMetadata($meta);\n\n $this->info('CORS meta keys successfully set on the container');\n } catch (Exception $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "24c891ef81a68c7f23a007deb1a47ffb", "score": "0.49024487", "text": "public function setHeaders() {\n }", "title": "" }, { "docid": "df660c2392838b47b6226e334fd47110", "score": "0.48969942", "text": "public function doHeaders() { }", "title": "" }, { "docid": "ab9a6e0a7e471d5872e3d97587c6ad73", "score": "0.48872846", "text": "private static function getResponseHeaders()\n {\n return ['Content-Type' => 'application/json'];\n }", "title": "" }, { "docid": "5e829a09161c59a530a78f0d8b7627dc", "score": "0.48789632", "text": "public function setExtra($extra)\n {\n $this['extra'] = $extra;\n\n return $this;\n }", "title": "" }, { "docid": "7557293da47c41645c1c8effe268b959", "score": "0.4875039", "text": "private function __headers() {\n \n // Always send main headers.\n foreach( $this->headers['always'] as $key => $value ) { header(\"$key: $value\"); }\n \n // Only send development headers when in development mode.\n if( $this->config->DEVELOPMENT and array_key_exists('development', $this->headers) ) {\n \n foreach( $this->headers['development'] as $key => $value ) { \n \n header(\"$key: $value\"); \n \n }\n \n }\n \n // Only send production headers when in production mode.\n if( !$this->config->DEVELOPMENT and array_key_exists('production', $this->headers) ) {\n \n foreach( $this->headers['production'] as $key => $value ) { \n \n header(\"$key: $value\"); \n \n }\n \n }\n \n }", "title": "" }, { "docid": "a62a1da876de12e606b9dbbdd0226deb", "score": "0.48729542", "text": "private function _setDefaultHeaders(): void\n {\n $this->_defaultHeaders = [\n 'Content-Type: application/json',\n 'Connection: Keep-Alive',\n ];\n }", "title": "" }, { "docid": "5e72c1f6f15baa7e6472ca2d1d5cb6c4", "score": "0.4867302", "text": "public static function setDefaultApiHeaders(){\n\n /**\n * Set default content type header\n */\n CoreHeaders::add('Content-Type', 'application/json');\n\n }", "title": "" }, { "docid": "eeedccf6c50096672e04ab6900a48fb6", "score": "0.48408604", "text": "function onOptions() {\n header(\"Access-Control-Allow-Headers: X-ACCESS_TOKEN, Access-Control-Allow-Origin, Authorization, Origin, X-Requested-With, Content-Type, Content-Range, Content-Disposition, Content-Description\");\n header(\"Access-Control-Allow-Methods: GET\");\n header(\"Access-Control-Max-Age: 3600\");\n }", "title": "" }, { "docid": "88fe63b856f3f766571727572956fa05", "score": "0.48343134", "text": "private function addCorsHeader()\n {\n $response = Zend_Controller_Front::getInstance()->getResponse();\n\n /*\n * TODO: allow more CORS header fields here\n */\n if (isset ($this->_privateConfig->accessControlAllowOrigin) ) {\n $value = '\"'.$this->_privateConfig->accessControlAllowOrigin.'\"';\n $response->setHeader('Access-Control-Allow-Origin', $value, true);\n }\n }", "title": "" }, { "docid": "8b2dc9b9495cb14d45014600c25df13c", "score": "0.48108703", "text": "protected function setHeader()\n {\n Controller::curr()->getResponse()\n ->addHeader(\"Content-Type\", $this->supportedMimeTypes()[0]);\n }", "title": "" }, { "docid": "1f37207262ecd02b7528177f24788024", "score": "0.48102129", "text": "public function testDoesNotDispruptOtherMimeTypes()\n {\n $request = new Zend_Controller_Request_HttpTestCase();\n $request->setHeader('Accept', 'application/json', true);\n $response = new Zend_Controller_Response_HttpTestCase();\n $plugin = new Mend_Controller_Plugin_XhtmlNegotiation();\n $plugin->setResponse($response);\n $plugin->preDispatch($request);\n\n $this->assertEmpty($response->getHeaders());\n }", "title": "" }, { "docid": "b8d7926b27fc961d76ee5088b9420575", "score": "0.4795052", "text": "public function setOptionsRequestHeaders(RequestInterface $request, ResponseInterface $response) {\n\t\t$authorization = $request->getHeader('Authorization');\n\t\tif ($authorization === null || $authorization === '') {\n\t\t\t// Set the proper response\n\t\t\t$response->setStatus(200);\n\t\t\t$response = \\OC_Response::setOptionsRequestHeaders($response, $this->getExtraHeaders($request));\n\n\t\t\t// Since All OPTIONS requests are unauthorized, we will have to return false from here\n\t\t\t// If we don't return false, due to no authorization, a 401-Unauthorized will be thrown\n\t\t\t// Which we don't want here\n\t\t\t// Hence this sendResponse\n\t\t\t$this->server->sapi->sendResponse($response);\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9232d869d751e27b75cc611a69271cb3", "score": "0.47911143", "text": "public function setAllowHeaders($allowHeaders)\n {\n $this->allowHeaders = array_map(function ($allowHeaders) {\n if (!$allowHeaders instanceof CrossDomainPolicy\\AllowHeaders) {\n $allowHeaders = new CrossDomainPolicy\\AllowHeaders($allowHeaders);\n }\n return $allowHeaders;\n }, $allowHeaders);\n return $this;\n }", "title": "" }, { "docid": "cedc353074303515dc3796a77a08e64c", "score": "0.47852242", "text": "public function setContentTypeAsJsonInHeader()\n {\n return $this->setHeader('Content-Type', 'application/json');\n }", "title": "" }, { "docid": "b5144d5f598e07e0fc80ffd335794c1d", "score": "0.4783453", "text": "public function testThatExtendedHeadersAreUsedForAuthenticationApiCalls()\n {\n $new_headers = self::setExtendedHeaders('test-extend-sdk-3', '3.4.5');\n\n $api = new MockAuthenticationApi( [\n new Response( 200, [ 'Content-Type' => 'application/json' ], '{}' )\n ] );\n\n $api->call()->oauth_token( [ 'grant_type' => uniqid() ] );\n $headers = $api->getHistoryHeaders();\n\n $this->assertEquals( $new_headers->build(), $headers['Auth0-Client'][0] );\n }", "title": "" }, { "docid": "297c16d623459f5146633d84f02b13b1", "score": "0.47703075", "text": "public function removeAcceptedContentTypes()\n {\n return $this->removeHeader('Accept');\n }", "title": "" }, { "docid": "ad21ee6ea44a8fdd2eaa1defcde0d6ab", "score": "0.4762386", "text": "private function add_headers() {\n\n foreach ( $this->configs[\"http_headers\"] as $header => $value ) {\n header($header . ': ' . $value);\n }\n\n return true;\n }", "title": "" }, { "docid": "1a4c4e2e48383164f7cf73805a2effb5", "score": "0.47550946", "text": "protected function loadExtra()\n {\n return true;\n }", "title": "" }, { "docid": "611e3136a493dfa898832b390abb8a6e", "score": "0.47497034", "text": "function authHeader(User $user, array $extras = []): array\n{\n $extras['Authorization'] = 'Bearer ' . Auth::login($user);\n\n return $extras;\n}", "title": "" }, { "docid": "8020f95de9b6b7ad0bc75478e5ff86b7", "score": "0.47447243", "text": "private function sendJsonHeaders() {\n header(\"Content-Type: application/json\");\n header(\"Cache-Control: no-store\");\n }", "title": "" }, { "docid": "c2bfabbdc364aaea2b72b654754f41d9", "score": "0.47444072", "text": "private function enhanceHttpSecurity()\n\t\t{\n\t\t\t// remove exposure of PHP version (at least where possible)\n\t\t\t\\header_remove('X-Powered-By');\n\n\t\t\t// if the user is signed in\n\t\t\tif ($this->isLoggedIn()) {\n\t\t\t\t// prevent clickjacking\n\t\t\t\t\\header('X-Frame-Options: sameorigin');\n\t\t\t\t// prevent content sniffing (MIME sniffing)\n\t\t\t\t\\header('X-Content-Type-Options: nosniff');\n\n\t\t\t\t// disable caching of potentially sensitive data\n\t\t\t\t\\header('Cache-Control: no-store, no-cache, must-revalidate', true);\n\t\t\t\t\\header('Expires: Thu, 19 Nov 1981 00:00:00 GMT', true);\n\t\t\t\t\\header('Pragma: no-cache', true);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e265df5abbb05f20d894f4de7adb6edd", "score": "0.47393027", "text": "private function json_headers() {\n header('Content-Type: application/json; charset=utf-8');\n }", "title": "" }, { "docid": "111d56c00dcd954bbe82461ba30e54ef", "score": "0.4738463", "text": "private function validate_headers($option){\n if (array_key_exists('headers', $option)){\n if (is_array($option['headers'])){\n if (!array_key_exists('apikey',$option['headers'])){\n \n throw new BadRequestError(\"No API-key provided. client_1 = Client('<YOUR_API_KEY>')\");\n }\n //Update self.headers\n foreach ($option['headers'] as $key=>$value)\n { \n \n array_push($this -> DEFAULTS['headers'],$key.\": \". $value);\n \n }\n // \n }\n else{\n throw new BadRequestError('Invalid headers provided. \n Correct format: array (\"content-Type\"=> \"application/json\")');\n }\n }\n return $this -> DEFAULTS['headers'];\n }", "title": "" }, { "docid": "62dcd4b1d09819a59661ab722355ee62", "score": "0.47334775", "text": "function wph_extra_plugin_headers( $headers ){\n\n\tif ( empty( $headers ) ){\n\t\t$headers = [];\n\t}\n\n\tif ( ! in_array( 'Last Update', $headers ) ){\n\t\t$headers[] = 'Last Update';\n\t}\n\n\tif ( ! in_array( 'Release Date', $headers ) ){\n\t\t$headers[] = 'Release Date';\n\t}\n\n\treturn $headers;\n\n}", "title": "" }, { "docid": "f5ce703a96c26453d709eda3915b17a0", "score": "0.4722987", "text": "public function test_course_extra_headers()\n {\n $course = factory('App\\Course')->create(['description' => 'old_description']);\n $data = [\n 'food' => 'vegetariano',\n 'transport' => 'treno',\n ];\n $partecipant = factory('App\\Partecipant')->create(['data' => json_encode($data)]);\n $course->partecipants()->save($partecipant);\n $headers = [\"food\", \"transport\"];\n $this->assertEquals(collect($headers)->sort()->values(), collect($course->extraHeaders())->sort()->values());\n\n // Create the other partecipant with a coupon\n $data['coupon'] = str_random(6);\n $partecipant = factory('App\\Partecipant')->create(['data' => json_encode($data)]);\n $course->partecipants()->save($partecipant);\n\n array_push($headers, 'coupon');\n $this->assertEquals(collect($headers)->sort()->values(), collect($course->extraHeaders())->sort()->values());\n }", "title": "" }, { "docid": "ee5f19e48780f6473e9fef857f70e187", "score": "0.47227165", "text": "public function withNotModified()\n {\n return $this->withStatus(304)\n ->withoutHeader('Allow')\n ->withoutHeader('Content-Encoding')\n ->withoutHeader('Content-Language')\n ->withoutHeader('Content-Length')\n ->withoutHeader('Content-MD5')\n ->withoutHeader('Content-Type')\n ->withoutHeader('Last-Modified')\n ->withBody(new Stream('php://temp'));\n }", "title": "" }, { "docid": "21067ac7b587b17eec3ff3bb31cbae35", "score": "0.47206512", "text": "function setHeaders($headers){\n $this->defaultHeader = false;\n $this->headers = $headers;\n }", "title": "" }, { "docid": "746ceded6bb2a64d909f98be0afa0aea", "score": "0.47185302", "text": "function &headers($xtra_headers = null, $overwrite = false)\n\t{\n\t\t// Content-Type header should already be present,\n\t\t// So just add mime version header\n\t\t$headers['MIME-Version'] = '1.0';\n\t\tif (isset($xtra_headers)) {\n\t\t\t$headers = array_merge($headers, $xtra_headers);\n\t\t}\n\t\tif ($overwrite) {\n\t\t\t$this->_headers = array_merge($this->_headers, $headers);\n\t\t} else {\n\t\t\t$this->_headers = array_merge($headers, $this->_headers);\n\t\t}\n\t\treturn $this->_headers;\n\t}", "title": "" }, { "docid": "47651f8dbf84af7df35d066cec8ea68a", "score": "0.47165823", "text": "public function addVaryHeader(ResponseEvent $event)\n {\n $request = $event->getRequest();\n $response = $event->getResponse();\n\n if ($this->targetGroupStore->hasInfluencedContent() && $request->getRequestUri() !== $this->targetGroupUrl) {\n $response->setVary($this->targetGroupHeader, false);\n }\n }", "title": "" }, { "docid": "ee7ff0c33a2081e062817e62cb0b9d34", "score": "0.47147015", "text": "protected function fixHeaders()\n {\n parent::fixHeaders();\n if (\\count($this->getChildren())) {\n $this->setHeaderParameter('Content-Type', 'charset', null);\n $this->setHeaderParameter('Content-Type', 'format', null);\n $this->setHeaderParameter('Content-Type', 'delsp', null);\n } else {\n $this->setCharset($this->userCharset);\n $this->setFormat($this->userFormat);\n $this->setDelSp($this->userDelSp);\n }\n }", "title": "" }, { "docid": "273c52fe7094d00eea7096ae5d557357", "score": "0.47089577", "text": "function prop_filter_headers($headers)\n{\n\n if (isset($headers['X-Pingback'])) {\n unset($headers['X-Pingback']);\n }\n return $headers;\n\n}", "title": "" }, { "docid": "14ec179d70799a3bce07e36450df4273", "score": "0.47078586", "text": "private function headerOnlyType(ResponseInterface $response): bool\n {\n $contentType = $response->getHeaderLine('content-type');\n\n if (!preg_match('!\\s*(([-\\w]+)/([-\\w\\+]+))!im', strtolower($contentType), $match)) {\n return false;\n }\n\n $match[1] = strtolower(trim($match[1]));\n $match[2] = strtolower(trim($match[2]));\n\n foreach ([$match[1], $match[2]] as $mime) {\n if (\\in_array($mime, $this->config->getHeaderOnlyTypes(), true)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "eaf7147587b9b41d923dafc44593965b", "score": "0.4707252", "text": "private function _processHeaders()\n {\n if ($this->options->HEADER) {\n if ($this->_response) {\n if ($this->info->HEADER_SIZE > 0) {\n $this->headers->process(substr($this->_response, 0, $this->info->HEADER_SIZE));\n\n if (!$this->options->NOBODY) {\n $this->_response = substr($this->_response, $this->info->HEADER_SIZE);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "7ba14e053d0cd16d71152f0052316f24", "score": "0.47063753", "text": "public function getHeaders($plain = false) {\n $this->addHeader('Content-Disposition', \n ($this->_inline ? 'inline' : 'attachment'),\n array('filename' => $this->_encodeHeader($this->_name))\n );\n if ($this->_id) {\n $this->addHeader('Content-ID', '<' . $this->_id . '>');\n }\n return parent::getHeaders($plain);\n }", "title": "" }, { "docid": "26754b961ef76960543a51fbb80d954c", "score": "0.4705942", "text": "protected function defaultHeaders()\n {\n return [\n 'X-Foo' => ['Bar', 'Baz'],\n ];\n }", "title": "" }, { "docid": "d67a3bd419a90779c82b8a722e65f4c5", "score": "0.47047058", "text": "public function setAdditionalHeaders(array $additionalHeaders): void\n {\n $this->additionalHeaders = $additionalHeaders;\n }", "title": "" }, { "docid": "30fbf7f3d18f2c7803890aba0eca9f5b", "score": "0.46988145", "text": "public function testAcceptHeaderDetector(): void\n {\n $request = new ServerRequest();\n $request = $request->withEnv('HTTP_ACCEPT', 'application/json, text/plain, */*');\n $this->assertTrue($request->is('json'));\n\n $request = new ServerRequest();\n $request = $request->withEnv('HTTP_ACCEPT', 'text/plain, */*');\n $this->assertFalse($request->is('json'));\n\n $request = new ServerRequest();\n $request = $request->withEnv('HTTP_ACCEPT', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8');\n $this->assertFalse($request->is('json'));\n $this->assertFalse($request->is('xml'));\n $this->assertFalse($request->is('xml'));\n }", "title": "" }, { "docid": "34c75ee741ad4cf994b69f731e105846", "score": "0.46900827", "text": "protected function defineDefaultHeaders()\n\t{\n\t\ttry {\n\t\t\tdocument(function () {\n\t\t\t\treturn (new APICall)->setDefine('default_headers')\n\t\t\t\t\t\t\t\t\t->setHeaders([\n\t\t\t\t\t\t\t\t\t\t(new Param('Accept', 'String', 'Set to `application/json`'))->setDefaultValue('application/json'),\n\t\t\t\t\t\t\t\t\t\t(new Param('x-api-key', 'String', 'API Key')),\n\t\t\t\t\t\t\t\t\t\t(new Param('x-access-token', 'String', 'Unique user authentication token')),\n\t\t\t\t\t\t\t\t\t]);\n\t\t\t});\n\t\t} catch (DocumentationModeEnabledException $ex) {\n\t\t\t// Do Nothing\n\t\t\t// This exception will always be thrown while in documentation mode\n\t\t}\n\t}", "title": "" }, { "docid": "5d591abaea273c3291bcbbe69415142c", "score": "0.4686593", "text": "private function setHeaders()\n\t{\n\t\theader(\"Content-type: text/xml\");\n\t\theader('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');\n\t\theader('Pragma: no-cache');\n\t}", "title": "" }, { "docid": "e579589f4b830df6398062617cf69e6e", "score": "0.46818084", "text": "abstract protected function setJsonHeader();", "title": "" }, { "docid": "1168d539b4de7a3436781943e16729ee", "score": "0.46783778", "text": "public function testThatExtendedHeadersAreUsedForManagementApiCalls()\n {\n $new_headers = self::setExtendedHeaders('test-extend-sdk-2', '2.3.4');\n\n $api = new MockManagementApi( [ new Response( 200 ) ] );\n $api->call()->connections()->getAll();\n $headers = $api->getHistoryHeaders();\n\n $this->assertEquals( $new_headers->build(), $headers['Auth0-Client'][0] );\n }", "title": "" }, { "docid": "e54dbff3d2950f0928dfd5550b236ea0", "score": "0.46723175", "text": "public function testGenerateHeaders()\n {\n $expectedResult = \"X-Extra: Test\" . ezcMailTools::lineBreak() .\n \"Content-Type: text/plain; charset=us-ascii\" . ezcMailTools::lineBreak() .\n \"Content-Transfer-Encoding: 8bit\" . ezcMailTools::lineBreak();\n\n $this->part->setHeader( \"X-Extra\", \"Test\" );\n $this->assertEquals( $expectedResult, $this->part->generateHeaders() );\n }", "title": "" }, { "docid": "6e7312f4f78c774ca151aa48617e8698", "score": "0.46678093", "text": "public function testCustomHeadersAreUsed()\n {\n $this->client->get(\n 'some/path',\n ['TestHeader' => 'TestValue']\n );\n\n // Assert that our custom header was built into the request.\n $this->assertEquals(\n 'TestValue',\n $this->client->getLastHttpRequest()->getHeaderLine('TestHeader')\n );\n }", "title": "" }, { "docid": "7ba755b632819fcd593b8ebccbbe6f28", "score": "0.4663043", "text": "public function setHeader($bool)\n {\n $this->header = $bool;\n\n return $this;\n }", "title": "" }, { "docid": "88f31ecb507f2fb4b1a5cbf81ebe75d2", "score": "0.46509364", "text": "protected function send_headers($iserror=false) {\n \tif ($iserror && $this->response_code == '200')\n $this->response_code = '400';\n \theader(\"HTTP/1.0 \".$this->response_code,true,$this->response_code);\n header('Access-Control-Allow-Origin: *'); // TODO: Decide how or whether or not to limit Xdomains.\n \theader('Content-type: application/json');\n header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');\n header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');\n header('Pragma: no-cache');\n header('Accept-Ranges: none');\n }", "title": "" }, { "docid": "d7cd42190cb70bc5ad41cd0a0ba0b828", "score": "0.46477216", "text": "function bfg_security_headers() {\n\n\tif( is_admin() )\n\t\treturn;\n\n\theader( 'X-Frame-Options: DENY' );\n\theader( 'X-Content-Type-Options: nosniff' );\n\theader( 'X-XSS-Protection: 1; mode=block' );\n\n\t// Strict-Transport-Security: https://www.owasp.org/index.php/HTTP_Strict_Transport_Security_Cheat_Sheet\n\t// header( 'Strict-Transport-Security: max-age=31536000; includeSubDomains; preload' );\n\n}", "title": "" }, { "docid": "e4751b75773579aa59428bda501e904f", "score": "0.4624557", "text": "function styles_extra_plugin_headers( $headers ) {\n\t\t$headers['Styles Class'] = 'styles class';\n\t\t$headers['Styles Item'] = 'styles item';\n\t\t$headers['Styles Updates'] = 'styles updates';\n\n\t\treturn $headers;\n\t}", "title": "" }, { "docid": "20934a720be59a638ae8c843600a1891", "score": "0.4622803", "text": "protected function _withCustomHeaders(ResponseInterface $response)\n {\n foreach ((array)$this->getConfig('headers') as $key => $value) {\n $response = $response->withHeader($key, $value);\n }\n\n return $response;\n }", "title": "" }, { "docid": "74f0334fb5ff2a228fb89ded298ac4c8", "score": "0.46059722", "text": "public function addSurrogateControl(Response $response)\n {\n if (false !== strpos($response->getContent(), '<esi:include')) {\n $response->headers->set('Surrogate-Control', 'content=\"ESI/1.0\"');\n }\n }", "title": "" }, { "docid": "3422b16a1c908411078855ff2e883471", "score": "0.45959428", "text": "public function require(...$args) {\n\n $dev = Config::get('project.development_mode');\n\n foreach($args as $v) {\n if (!$this->has($v)) {\n if ($dev) {\n ApiResponse::badRequest(\"Header '$v' is missing.\");\n } else {\n response_die('bad');\n }\n }\n }\n }", "title": "" }, { "docid": "1bbc58662561856e1e1a51dfc58126d3", "score": "0.45954967", "text": "function setHeaders($value) {\n return $this->setFieldValue('headers', $value);\n }", "title": "" }, { "docid": "52e8e2aacf286b36c4c208955ed08535", "score": "0.45938197", "text": "public function optionsOne()\n {\n $response = $this->di->get('response');\n $response->setHeader(\n 'Access-Control-Allow-Methods',\n 'GET, PUT, PATCH, DELETE, OPTIONS, HEAD'\n );\n $response->setHeader(\n 'Access-Control-Allow-Origin',\n $this->di->get('request')->header('Origin')\n );\n $response->setHeader('Access-Control-Allow-Credentials', 'true');\n $response->setHeader(\n 'Access-Control-Allow-Headers',\n \"origin, x-requested-with, content-type\"\n );\n $response->setHeader('Access-Control-Max-Age', '86400');\n\n return true;\n }", "title": "" }, { "docid": "4f99af0697e8d333b2c5b96ac27474c5", "score": "0.45898604", "text": "public function setHeader()\n {\n return $this->setOpt(CURLOPT_HEADER, 0);\n }", "title": "" }, { "docid": "db47a37ea5dec88e01dd80576220b77f", "score": "0.45889392", "text": "function filter_headers($headers=false, $form=false) {\r\n\t\t// Only run for specific form\r\n\t\tif ($this->form_name !== $form->form_name)\treturn $headers;\r\n\t\t// Over-ride this function to send from customer details.\r\n\t\t$headers = array(\r\n\t\t\t'From: '.get_bloginfo('name').' <'.get_bloginfo('admin_email').'>',\t\t\t// From should be an email address at this domain.\r\n\t\t\t'Reply-To: '.get_bloginfo('name').' <'.get_bloginfo('admin_email').'>',\t\t// Reply-to and -path should be visitor email.\r\n\t\t\t'Return-Path: '.get_bloginfo('name').' <'.get_bloginfo('admin_email').'>',\r\n\t\t);\r\n\t\treturn $headers;\r\n\t}", "title": "" }, { "docid": "7976cf940df9c91da4e971415cc7b056", "score": "0.45865378", "text": "public static function verifyHeaderIncludes($header_extra = null, $footer_extra = null) {\r\n\t\t\t$header = $footer = '';\r\n\r\n\t\t\tif (!PDebug::$HAS_OUTPUT_HEADER && PProtocolHandler::isOutputtingHtml()) {\r\n\t\t\t\tPDebug::$HAS_OUTPUT_HEADER = true;\r\n\t\t\t\t$header = PDebug::$COMMON_HEADER . $header;\r\n\t\t\t}\r\n\r\n\t\t\t$header .= $header_extra;\t\t// no checks: these should never contain HTML in plaintext mode anyway...\r\n\t\t\t$footer .= $footer_extra;\r\n\r\n\t\t\treturn array($header, $footer);\r\n\t\t}", "title": "" }, { "docid": "578f17579f37d2ca92a2bef8c91abf9b", "score": "0.45822626", "text": "private function getDefaultHeaders()\n {\n $token = base64_encode(sprintf(\n '%s:%s',\n $this->credentials->getClientId(),\n $this->credentials->getClientSecret()\n ));\n\n return [\n RequestOptions::HEADERS => [\n 'Authorization' => sprintf('Basic %s', $token),\n ]\n ];\n }", "title": "" }, { "docid": "0226c5a808589b22aad6f7b36ffef90e", "score": "0.4580746", "text": "public function withResponse($request, $response)\n {\n\n //$response->header(['X-Requested-With' => 'XMLHttpRequest']);\n //$response->header(['Content-Type' => 'application/json']);\n $response->header('X-Value', 'True');\n }", "title": "" }, { "docid": "5dca4f759f962312d529e7bb5b779d75", "score": "0.45748818", "text": "public function getCustomResponseHeaders()\n {\n return $this->custom_response_headers;\n }", "title": "" }, { "docid": "ac33eefe9d5804c695e48be385d06d33", "score": "0.45661715", "text": "public function optionsAction()\n {\n $this->_response->setBody(null);\n $this->_response->setHeader('Allow', $this->_response->getHeaderValue('Access-Control-Allow-Methods'));\n $this->_response->ok();\n }", "title": "" }, { "docid": "92ce070f404f4d62761391a42ce8dc36", "score": "0.45661104", "text": "public function get_other_settings_headers() {\n\t\t$headers = array();\n\n\t\treturn apply_filters( 'tm_epo_settings_headers', $headers );\n\t}", "title": "" } ]
fd82b5b28da1fa0bfd5b6b4905847ee3
Displays a single Antrian model.
[ { "docid": "866765f66dc1b9e239a68500e6a52d86", "score": "0.0", "text": "public function actionView($id)\n {\n $this->layout = 'dashboard';\n\n $jumlah_antrian_selesai = Nomorantrian::find()->where(['status_antrian' => 3])->count();\n $jumlah_antrian_belum_selesai = Nomorantrian::find()->where(['status_antrian' => 1])->count();\n\n return $this->render('view', [\n 'model' => $this->findModel($id),\n 'jumlah_antrian_selesai' => $jumlah_antrian_selesai,\n 'jumlah_antrian_belum_selesai' => $jumlah_antrian_belum_selesai\n ]);\n }", "title": "" } ]
[ { "docid": "f033957453ad1d6cc1ab31c3835c0ceb", "score": "0.67808026", "text": "public function show()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'show',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/show', $data);\n }", "title": "" }, { "docid": "8d97731f4e9d44d90e41c706ef8c3448", "score": "0.6594508", "text": "public function show($id)\n {\n $antrian = Antrian::find($id);\n return view('nomorAntrian', compact('antrian'));\n\n }", "title": "" }, { "docid": "ac825dc8ad329dbfa7493730fd6f777a", "score": "0.6534689", "text": "public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.6526507", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.6526507", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.6526507", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.6526507", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.6526507", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "d2fd3ef8be9ec5f22451a5af4f603e91", "score": "0.64708304", "text": "public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "title": "" }, { "docid": "4eaae56d7755c73209000d5bb809bcda", "score": "0.64657587", "text": "public function actionView()\n\t{\n\t\tif (!($model = $this->loadModel()))\n\t\t\treturn;\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "a8ff397a619732ced17260d92f76a604", "score": "0.6455834", "text": "public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "title": "" }, { "docid": "c3571c32f29c3090444336ec85ee0c85", "score": "0.6441373", "text": "public function show()\n {\n new $this->controller();\n }", "title": "" }, { "docid": "e1ed8b49bef68d84ff9ece6c1e5ed5af", "score": "0.6422735", "text": "public function actionView()\n {\n $id=(int)Yii::$app->request->get('id');\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }", "title": "" }, { "docid": "4c82dd9c9b06fbe01f7def242c0ebff3", "score": "0.6403079", "text": "public function show() {\n \n \n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.63529474", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "0984b89298d9e6fd47ef40b8af9def05", "score": "0.6352301", "text": "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "title": "" }, { "docid": "48a49ec8afd121b2cb264973cdf5ba26", "score": "0.6351558", "text": "public function showAction()\n {\n $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));\n\n $model = $this->getModel();\n // NEAR FUTURE:\n // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');\n $repeater = $model->loadRepeatable();\n $table = $this->getShowTable();\n $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));\n $table->setRepeater($repeater);\n $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));\n\n if ($menuItem = $this->findAllowedMenuItem('edit')) {\n $table->tbody()->onclick = array('location.href=\\'', $menuItem->toHRefAttribute($this->getRequest()), '\\';');\n }\n\n $tableContainer = \\MUtil_Html::create('div', array('class' => 'table-container'), $table);\n $this->html[] = $tableContainer;\n }", "title": "" }, { "docid": "e8d3390965c2aa91de9176f987699760", "score": "0.6348658", "text": "public function show()\n { \n \n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.63333565", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.6331735", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.6331735", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.6331735", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.63309014", "text": "public function display(){}", "title": "" }, { "docid": "74cdc476aed3d44f98fe9c2503d108ec", "score": "0.63203835", "text": "public function show() {\n\t}", "title": "" }, { "docid": "897769cd310390a65706071774424023", "score": "0.63079387", "text": "public function show()\r\n\t{\r\n\t\t\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6d09adef92594b8ca9625da1e06dde5c", "score": "0.63070804", "text": "public function show($id)\n {\n $type_id = $id;\n $models = TypeModel::where('marka_type_id',$id)->where('deleted','0')->get();\n return view('admin.brands.types.models.index',compact('models','type_id'));\n }", "title": "" }, { "docid": "3706e37e8dbc0fcd3de84dfe48abe16d", "score": "0.6301313", "text": "public function show()\n {\n return view('halaman');\n }", "title": "" }, { "docid": "5dbe07ace0144761ab97d7925f102a4a", "score": "0.62968355", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "aaf691eca5dc60f1c5d6ada1c18dd323", "score": "0.6292062", "text": "public function detail()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_detail');\n $view->heading = \"\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->title = $view->verein->name;\n $view->display();\n }", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.6280739", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.6280739", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "67242d8936943a1b7cc6c42f476ab1a5", "score": "0.6272422", "text": "public function actionView()\n {\n \t$id = isset($_REQUEST['id'])?$_REQUEST['id']:null;\n \t$model = $this->findModel($id);\n \t \n \treturn CommonUtils::json_success($model);\n }", "title": "" }, { "docid": "65454a4c24991511838ee5f572e6b4c9", "score": "0.6270056", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "238775791767848d31fa31ccb3b22ce2", "score": "0.62606615", "text": "public function actionViewByAtasan($id){\n $atasanSearchModel = new AtasanIzinSearch();\n $pegawai = Pegawai::find()->where(['user_id' => Yii::$app->user->identity->user_id])->one();\n $atasanSearchModel->pegawai_id = $pegawai['pegawai_id'];\n\n $model = $atasanSearchModel->search(Yii::$app->request->queryParams)->query->where(['cist_atasan_izin.permohonan_izin_id' => $id])->one();\n\n return $this->render('viewByAtasan',[\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.62586766", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.62576216", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "5280b00b4490ac6dc122bc771ade10c1", "score": "0.62568635", "text": "public function show(TrangThais $trangThais)\n {\n //\n }", "title": "" }, { "docid": "32812ba59f494946a867d17bf8ab579d", "score": "0.62530434", "text": "public function actionShow()\r\n\t{\r\n\t\t$this->render('show',array('model'=>$this->loadcontent()));\r\n\t}", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.6252493", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.6252493", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "c6c6dbc39c47242d66b3211214374b80", "score": "0.6241331", "text": "public function display(){\n $bien = \\App\\Annonce_bien::orderBy('created_at')->get();\n return view('annonces.index', compact('bien'));\n }", "title": "" }, { "docid": "5958e76ddd0d209bfb96ee6cbea636e0", "score": "0.62382007", "text": "public function show(){\n\n }", "title": "" }, { "docid": "5958e76ddd0d209bfb96ee6cbea636e0", "score": "0.62382007", "text": "public function show(){\n\n }", "title": "" }, { "docid": "2ac6688dd0e86d561b63bc96c65a5a0f", "score": "0.6238081", "text": "public function show(Train $train)\n {\n //\n }", "title": "" }, { "docid": "4d8d319f3797708660e7560ae3430e6b", "score": "0.6236193", "text": "public function show(Acara $acara)\n {\n //\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62330294", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62330294", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62330294", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62330294", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62330294", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62330294", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62330294", "text": "public function show()\n {\n }", "title": "" }, { "docid": "fe559bd815cfe1bb1dce1f0d470aa255", "score": "0.6230017", "text": "public function show() {\n \n }", "title": "" }, { "docid": "d871b3e825fdde736bfec2a2f12cdf17", "score": "0.62208563", "text": "public function Index() {\n $this->Display();\n }", "title": "" }, { "docid": "2aaa90a070ccd9573258e729f11cef65", "score": "0.62158626", "text": "public function index(){\r\n $this->display();\r\n }", "title": "" }, { "docid": "d9375bdc2073c167827a440b7d06f998", "score": "0.621472", "text": "public function show()\n { \n }", "title": "" }, { "docid": "d94eb46c8f0f5d30ebf49093d0f02d4c", "score": "0.6205185", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "073a8c1c3821c3ca500d9b93153d8f50", "score": "0.62043315", "text": "public function show(Trabalho $trabalho)\n {\n //\n }", "title": "" }, { "docid": "fc08ddb002a9e0869dfb6bd89c44f56e", "score": "0.6196699", "text": "public function show()\n {\n return $this->model;\n }", "title": "" }, { "docid": "804a396254a41ca0dab6e717361afa0b", "score": "0.61938006", "text": "public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }", "title": "" }, { "docid": "38b732fc2daaaba0c7975740a82233fb", "score": "0.6191322", "text": "public function show(PermohonanLab $permohonanLab)\n {\n //\n }", "title": "" }, { "docid": "8312bd0fd956759fcaa3f9ec557a1c61", "score": "0.61849374", "text": "public function show(Anggota $anggota)\n {\n //\n }", "title": "" }, { "docid": "9b46cd87065fe2f010f089440ab0cc0e", "score": "0.61596566", "text": "public function show(Asignatura $asignatura)\n {\n //\n }", "title": "" }, { "docid": "0c426ed61fde990ee9e0384b0f6f84cb", "score": "0.61566734", "text": "public function show(Loan $loan)\n {\n\n }", "title": "" }, { "docid": "64a0504f4bc0e7175a7156d414a8c289", "score": "0.61522484", "text": "public function actionIndex()\n {\n\t\t$id = 1;\n return $this->render('/backend/siteinfo/view', [\n 'model' => $this->findModel($id),\n ]);\n }", "title": "" }, { "docid": "19813f602cf92db51a3e0b029f7f6e37", "score": "0.6150397", "text": "public function show(Jurusan $jurusan)\n {\n //\n }", "title": "" }, { "docid": "9fd15a3b7dcf1652a1139351526350e9", "score": "0.6145964", "text": "public function display() {}", "title": "" }, { "docid": "9fd15a3b7dcf1652a1139351526350e9", "score": "0.6145964", "text": "public function display() {}", "title": "" }, { "docid": "c5c0bb476c4cc45768db15ded987afbc", "score": "0.6137633", "text": "public function display ()\n {\n echo $this->as_text ();\n }", "title": "" }, { "docid": "75559ae77140a4c8b510c90f5026d3d6", "score": "0.61330533", "text": "public function display() {\n echo $this->render();\n }", "title": "" }, { "docid": "efa06f573f4dcffff3f80ab9e263c0a0", "score": "0.6131856", "text": "public function show(Labarugi $labarugi)\n {\n //\n }", "title": "" }, { "docid": "1062a68a77322518cf674e4c03d47734", "score": "0.6129738", "text": "public function showSingle($id);", "title": "" }, { "docid": "ce923b75acfac9a36e8410abd5c69c23", "score": "0.6113513", "text": "public function index() {\n $data = array();\n $this->load->model('Publication');\n $publication = new Publication();\n $publication->load(1);\n $data['publication'] = $publication;\n \n $this->load->model('Issue');\n $issue = new Issue();\n $issue->load(1);\n $data['issue'] = $issue;\n \n $this->load->view('magazines', $data);\n $this->load->view('magazine', $data);\n }", "title": "" }, { "docid": "d0d96614571c35428466ad4954655833", "score": "0.61118764", "text": "public function show(Modelo $modelo)\n {\n //\n }", "title": "" }, { "docid": "d0d96614571c35428466ad4954655833", "score": "0.61118764", "text": "public function show(Modelo $modelo)\n {\n //\n }", "title": "" }, { "docid": "ee10cff8be378c0632d049a35340b2d9", "score": "0.61099666", "text": "public function show(Akun $akun)\n {\n //\n }", "title": "" }, { "docid": "595c4ff8932d9a8ba60073c883aa9c26", "score": "0.61087054", "text": "public function show(Representante $representante)\n {\n //\n }", "title": "" }, { "docid": "837e179072dae8e8f2facf606cd8d79d", "score": "0.6107134", "text": "public function show(MitraKerja $mitraKerja)\n {\n //\n }", "title": "" }, { "docid": "00e09b84f45fb294c62e0b4f0b454947", "score": "0.6106588", "text": "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "0756f8b2432377fb2de4c8ad16520520", "score": "0.61059237", "text": "public function actionView($id)\r\n\t{\r\n\t\t// sets global studyId for authoring\r\n \t\t$this->studyId = $id;\r\n\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "0f23d241ca9ac885eca7b1989109b4d5", "score": "0.6098166", "text": "public function actionView($id)\n{\n$this->render('view',array(\n'model'=>$this->loadModel($id),\n));\n}", "title": "" }, { "docid": "396395a05859dff738a31fb622f1cd95", "score": "0.6092945", "text": "public function show($nim)\n {\n // Prak ORM\n //$mahasiswa=Mahasiswa::find($nim);\n //return view('mahasiswas.detail',compact('mahasiswa'));\n\n //prak orm lanjutan\n $mahasiswa = Mahasiswa::with('kelas')->where('nim', $nim)->first();\n return view('mahasiswas.detail',['mahasiswa' => $mahasiswa]);\n\n }", "title": "" } ]
f4accb73185681fa803cde4826209d84
Sets the default admin area settings screen.
[ { "docid": "3d5ffdb9d18532c0b07ab040303407e3", "score": "0.0", "text": "function nkd_default_admin_color($user_id) {\n $args = array(\n 'ID' => $user_id,\n 'admin_color' => 'midnight'\n );\n wp_update_user( $args );\n}", "title": "" } ]
[ { "docid": "b57f188b86e3decf209a9080ea544f62", "score": "0.71262586", "text": "public function settings()\n\t{\n\t\t$this->admin_model->admin_logged_in();\n\n\t\t$data = array(\n\t\t\t'title' => 'Settings',\n\t\t\t'content' => 'settings',\n\t\t\t'common' => $this->admin_model->load_common_data(),\n\t\t\t'active' => ''\n\t\t);\n\n\t\t$this->load->view('common/admin_template', $data);\n\t}", "title": "" }, { "docid": "6694a4f4ccb5dc5989a2890a6f510122", "score": "0.70926315", "text": "public function settings() {\n\t\trequire_once FUSION_BUILDER_PLUGIN_DIR . 'inc/admin-screens/settings.php';\n\t}", "title": "" }, { "docid": "6694a4f4ccb5dc5989a2890a6f510122", "score": "0.70926315", "text": "public function settings() {\n\t\trequire_once FUSION_BUILDER_PLUGIN_DIR . 'inc/admin-screens/settings.php';\n\t}", "title": "" }, { "docid": "d13cdd327c373949fa20051df7d80e6a", "score": "0.70018446", "text": "function init_admin()\n {\n add_settings_section('toxid-settings', 'TOXID', '__return_false', 'general');\n register_setting('general', 'toxid_preview_password');\n add_settings_field('toxid_preview_password', ' Password for previews', [__CLASS__, 'admin_toxid_preview_password_field'], 'general', 'toxid-settings');\n }", "title": "" }, { "docid": "d030fe24c9218ee1e0643c9bacacaa3f", "score": "0.7001807", "text": "public function settings_menu() {\n\t\tadd_menu_page(\n\t\t__( 'MANGOPAY', 'mangopay' ),\n\t\t__( 'MANGOPAY', 'mangopay' ),\n\t\t'manage_options',\t// Requires Administrator privilege by default,\n\t\t// @see: https://codex.wordpress.org/Roles_and_Capabilities\n\t\tmangopayWCConfig::OPTION_KEY,\n\t\tarray( $this, 'settings_screen' ),\n\t\tplugins_url( '/img/mp-icon.png', dirname( __FILE__ ) )\n\t\t);\n\t}", "title": "" }, { "docid": "e97216085fe71ac91f04e40dd684fc52", "score": "0.69811827", "text": "function min_admin_plugin_menu() {\n\t\tadd_options_page(\n\t\t\t'Minimal Admin Settings',\n\t\t\t'Minimal Admin',\n\t\t\t'update_core',\n\t\t\t'minimal-admin',\n\t\t\tarray(&$this, 'min_admin_settings')\n\t\t);\n\t}", "title": "" }, { "docid": "617c47dd4a4c7af8a05636965ac42445", "score": "0.6970928", "text": "public function settings_page() {\n\t\tYA_Admin_Settings::output();\n\t}", "title": "" }, { "docid": "df579366848a5b572e446e8369b748e3", "score": "0.6902356", "text": "public function admin_dashboard() {\n\t\t\n \t$this->set(array(\n 'title_for_layout' => 'Painel de Controle'\n ));\n\t}", "title": "" }, { "docid": "fdd92521667df2ab3207b1882abfc80f", "score": "0.6899822", "text": "public function settings() {\r\n\t\tadd_submenu_page(\r\n\t\t\t'wpmudev-videos',\r\n\t\t\t__( 'Settings', 'wpmudev_vids' ),\r\n\t\t\t__( 'Settings', 'wpmudev_vids' ),\r\n\t\t\t'wpmudev_videos_manage_settings',\r\n\t\t\t'wpmudev-videos-settings',\r\n\t\t\tarray( Views\\Admin::get(), 'settings' )\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "0a28f2b7685921827922d2a931d352fc", "score": "0.68462956", "text": "function webinarjam_admin_page() {\n\tadd_options_page( 'WebinarJam Settings', 'WebinarJam Settings', 'manage_options', 'webinarjam-admin-settings', 'webinarjam_admin_settings' );\n}", "title": "" }, { "docid": "3a4c3c1fe9e52795e60c18a807b9afc5", "score": "0.68083763", "text": "function displayAdminSettings() {\n\n $settings = $this->getSettings();\n\n if (!isset($settings['maxcontentsize']) || !is_numeric($settings['maxcontentsize']) || $settings['maxcontentsize'] < 1) {\n $settings['maxcontentsize'] = $this->maxcontentsize;\n }\n $locates = file_get_contents(plugin_dir_path(__FILE__). 'locates.json');\n $locates = json_decode($locates, true);\n $version = $this->version;\n include plugin_dir_path(__FILE__) . 'goldseo-settings.php';\n }", "title": "" }, { "docid": "017854c88c46e0352f35203e01f4dfca", "score": "0.67801714", "text": "public function admin_menu() {\n\t\tif ( 'lp-setup' !== LP_Request::get_string( 'page' ) || ! current_user_can( 'install_plugins' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tadd_dashboard_page( '', '', 'manage_options', 'lp-setup', '' );\n\t}", "title": "" }, { "docid": "52a7060c4d1cdca0bc599a652bf79e35", "score": "0.67466", "text": "function renderAdminSettings()\n\t{\n\t\t/* can be overwritten by action plugin */\n\t\t$pluginParams =& $this->getPluginParams();\n\t\t?>\n<div id=\"page-<?php echo $this->_name;?>\" class=\"pluginSettings\"\n\tstyle=\"display: none\"><?php\n\t$c = count($pluginParams->get('timeline_table'));\n\t$pluginParams->_duplicate = true;\n\techo $pluginParams->render('params', 'connection');\n\tfor ($x=0; $x<$c; $x++) {\n\t\techo $pluginParams->render('params', '_default', true, $x);\n\t}\n\t?></div>\n\t<?php\n\t}", "title": "" }, { "docid": "896b0efa081e16b7871530cd208c3b1d", "score": "0.672679", "text": "static function admin_default_setup() {\n\n add_options_page(__('Mail', 'mido-admin'), __('Mail', 'mido-admin'), 'manage_options', 'mido_mail_settings', array('\\Mido\\MailAdmin','admin_settings'));\n }", "title": "" }, { "docid": "dccf2289f81645eade72ab6df9c03d84", "score": "0.6720531", "text": "public function displayAdminSettings()\n {\n ?>\n <div class=\"wrap\">\n <h2><?php print self::PLUGIN_NAME; ?></h2>\n <?php settings_errors(); ?>\n <form action=\"options.php\" method=\"post\">\n <?php settings_fields( self::OPTION_GROUP ); ?>\n <?php do_settings_sections( self::MENU_SLUG ); ?>\n <?php submit_button( __( 'Send', 'making-wp-ez' ) ) ?>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "37bf982fa41c8bb2a2b720e2060901e1", "score": "0.67100185", "text": "public function setAtAdminPanel()\n {\n $this->atAdminPanel = true;\n }", "title": "" }, { "docid": "e8add6cff00da46c0200699824227ffc", "score": "0.6646162", "text": "function adminSettings(){\n\t\theader(\"Location: ./settings/\");\n\t}", "title": "" }, { "docid": "a35b089b34a6a17b6fdc036f4aba0ec5", "score": "0.6641136", "text": "public function plugin_settings_page()\n {\n \tif(!current_user_can('manage_options'))\n \t{\n \t\twp_die(__('You do not have sufficient permissions to access this page.'));\n \t}\n\t\n \t// Render the settings template\n \tinclude(sprintf(\"%s/admin/views/settings.php\", dirname(__FILE__)));\n }", "title": "" }, { "docid": "375acbe16bacc61e798c9a359926700e", "score": "0.66369563", "text": "public function admin_menu() {\r\n\t\t// Define this in wp-config to hide the setting menu.\r\n\t\tif ( defined( 'WPMUDEV_VIDS_HIDE_SETTINGS' ) && WPMUDEV_VIDS_HIDE_SETTINGS ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Setup sub menus.\r\n\t\t$this->dashboard();\r\n\t\t$this->videos();\r\n\t\t$this->playlists();\r\n\t\t$this->settings();\r\n\r\n\t\t// Rename menu.\r\n\t\t$this->rename_dashboard();\r\n\t}", "title": "" }, { "docid": "fe3c4c8451f1287d6efbaf2606a43dd1", "score": "0.66205275", "text": "function set_default_admin_options() {\n\t\t\n\t\t$defaultOptions = array(\n\t\t\t\t\"load_moo\" => \"on\",\n\t\t\t\t\"css_load\" => \"default\",\t\t\n\t\t\t\t\"css_theme\" => \"default\",\n\t\t\t\t\"ss_global_over_ride\" => \"on\");\n\t\t\t\n\t\t$defaultModOptions = array(\n\t\t\t\t\"reflect\"\t=>\t\"on\",\n\t\t\t\t\"reflect_height\" => \"0.33\",\n\t\t\t\t\"reflect_opacity\" => \"0.5\",\n\t\t\t\t\"auto_reflect\" => \"off\",\n\t\t\t\t\"accordion\" => \"on\",\n\t\t\t\t\"acc_mode\" => \"off\",\n\t\t\t\t\"acc_css\" => \"on\",\t\n\t\t\t\t\"auto_accordion\" => \"on\",\n\t\t\t\t\"acc_container\" => \"accordion\",\n\t\t\t\t\"acc_toggler\" => \"toggler\",\n\t\t\t\t\"acc_elements\" => \"togcontent\",\n\t\t\t\t\"acc_togtag\" => \"h3\",\n \"acc_elemtag\" => \"div\",\n\t\t\t\t\"acc_openall\" => \"false\",\n\t\t\t\t\"acc_fixedheight\" => \"false\",\n\t\t\t\t\"acc_fixedwidth\" => \"false\",\n\t\t\t\t\"acc_height\" => \"true\",\n\t\t\t\t\"acc_width\" => \"false\",\n\t\t\t\t\"acc_opacity\" => \"true\",\n\t\t\t\t\"acc_firstopen\" => \"0\",\n\t\t\t\t\"zoom\" => \"on\",\n\t\t\t\t\"zoom_auto\" => \"off\",\n\t\t\t\t\"zoom_time\" => \"1250\",\n\t\t\t\t\"zoom_trans_type\" => \"sine\",\n\t\t\t\t\"zoom_trans_typeinout\" => \"out\",\n\t\t\t\t\"zoom_border\" => \"10px solid silver\",\n\t\t\t\t\"zoom_pad\" => \"10\",\n\t\t\t\t\"zoom_back\" => \"#000\",\n\t\t\t\t\"scroll\" => \"on\",\n\t\t\t\t\"scroll_auto\" => \"on\",\n\t\t\t\t\"scroll_css\" => \"on\",\t\t\t\t\n\t\t\t\t\"scroll_time\" => \"1200\",\n\t\t\t\t\"scroll_trans\" => \"sine\",\n\t\t\t\t\"scroll_transout\" => \"out\",\n\t\t\t\t\n\t\t\t\t\"tooltips\" => \"on\",\n\t\t\t\t\"tt_showDelay\" => \"950\",\n\t\t\t\t\"tt_hideDelay\" => \"1250\",\n\t\t\t\t\"tt_offsetx\" => \"-280\",\n\t\t\t\t\"tt_offsety\" => \"0\",\n\t\t\t\t\"tt_fixed\" => \"true\",\n\t\t\t\t\"tt_tip_opacity\" => \"0.9\",\n\t\t\t\t\"tipTitle\" => 'title',\n\t\t \"tipText\" => 'rel',\n\t\t \n\t\t\t\t\"totop_text\" => \"goin up\",\t\t\t\t\n\t\t\t\t\"com\" => \"on\",\n\t\t\t\t\"com_css\" => \"on\",\n\t\t\t\t\"com_time\" => \"1200\",\n\t\t\t\t\"com_trans\" => \"sine\",\n\t\t\t\t\"com_transout\" => \"out\",\n\t\t\t\t\"com_direction\" => \"vertical\",\n\t\t\t\t\"com_open\" => \"Open comments\",\n\t\t\t\t\"com_close\" => \"Close comments\",\n\t\t\t\t\"nudger\" => \"on\",\n\t\t\t\t\"nudge_amount\" => \"10\",\n \"nudge_duration\" => \"500\",\n \"nudge_family\" => \"#footer a, #sidebar a\",\n \"fader\" => \"on\",\n \"fader_family\" => \".fader\",\n \"fader_opacity\" => \"0.5\",\n \"linker\" => \"on\",\n \"linker_tag\" => \"a\",\n \"linker_color\" => \"#7c7c7c\",\n \"clicker\" => \"on\",\n \"clicker_tag\" => \".clickable li\",\n \"clicker_span\" => \"false\",\n \"clicker_color\" => \"#c9e0f4\",\n \"wrap\" => \"off\",\n\t\t\t\t'delete_options' => ''\n\t\t\t\t);\n\t\t\n\t\t\n\t\t$getOptions = get_option($this->AdminOptionsName);\n $getModOptions = get_option('ssMod_options');\n\n\t\tif (!empty($getOptions)) {\n\t\t\tforeach ($getOptions as $key => $option) {\n\t\t\t\t$defaultOptions[$key] = $option;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (!empty($getModOptions)) {\n\t\t foreach ($getModOptions as $key => $option) {\n\t\t\t\t$defaultModOptions[$key] = $option;\n\t\t\t}\n\t\t}\n\t\tupdate_option($this->AdminOptionsName, $defaultOptions);\n\t\tupdate_option('ssMod_options', $defaultModOptions);\n\t\t\n\t}", "title": "" }, { "docid": "ba1ae7f385c3be1e79408a84fda44bce", "score": "0.66092116", "text": "function min_admin_settings()\n\t{\n\t\tif (!current_user_can('update_core'))\n\t\t\twp_die(__('You do not have sufficient permissions to access this page.', 'minimal-admin'));\n\n\t\t$message = '';\n\t\tif (!empty($_REQUEST['submit'])) {\n\t\t\tcheck_admin_referer('minimal-admin-settings');\n\n\t\t\t$this->min_admin_save_settings();\n\t\t\t$message = __('Changes saved.', 'minimal-admin');\n\t\t}\n\t\t$options = get_option('minimal-admin');\n\t\t$messages = array(\n\t\t\t'hide_posts' => __(' Hide Posts from the wp-admin menu', 'minimal-admin'),\n\t\t\t'hide_screen_options' => __(' Hide screen options tab and help tab', 'minimal-admin')\n\t\t);\n\t\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon('options-general'); ?>\n\t\t<h2><?php _e('Minimal Admin', 'minimal-admin'); ?></h2>\n\t\t<?php\n\t\tif (!empty($message)) {\n\t\t\t?>\n\t\t\t<div class=\"updated\">\n\t\t\t\t<p><?php echo $message; ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t\t?>\n\t\t<form method=\"post\">\n\t\t\t<?php wp_nonce_field('minimal-admin-settings'); ?>\n\t\t\t<?php\n\t\t\tforeach ($options as $type => $enabled) {\n\t\t\t\t$checked = '';\n\t\t\t\tif ($enabled)\n\t\t\t\t\t$checked = ' checked=\"checked\"';\n\n\t\t\t\techo \"<p><input type='checkbox' id='$type' name='$type' value='1'$checked>\";\n\t\t\t\techo \"<label for='$type'>{$messages[$type]}</label></p>\";\n\t\t\t}\n\t\t\t?>\n\n\t\t\t<p><input class=\"button button-primary\" type=\"submit\" name=\"submit\" id=\"submit\"\n\t\t\t\t\t value=\"<?php esc_attr_e('Save all changes', 'minimal-admin'); ?>\"/></p>\n\t\t</form>\n\t</div>\n\t<?php\n\t}", "title": "" }, { "docid": "d3c86bd9e7fac1277499df51a532084c", "score": "0.65945643", "text": "function settingsMenu() {\n add_menu_page('CVI Settings', 'CVI Settings', 'manage_options', 'cvi-settings', array($this, 'settingsPage'));\n }", "title": "" }, { "docid": "94e729e60271d85426fb799e9c117f51", "score": "0.65932685", "text": "static function admin_menu() {\r\n add_management_page('Security Ninja', 'Security Ninja', 'manage_options', 'wf-sn', array(__CLASS__, 'options_page'));\r\n }", "title": "" }, { "docid": "83d7643966496fb7e666ae20287e1948", "score": "0.65902483", "text": "function sostheme_add_admin() {\n\n\tglobal $menu;\n\n\t$menu[30] = array('', 'administrator', 'separator', '', 'wp-menu-separator');\n\n\t$tname = get_option('sosq_theme_name');\n\n\t\tadd_theme_page(get_option('current_theme').' Settings', $tname ? $tname : 'Quickess' , 'administrator', 'sostheme_settings', 'sostheme_settings_page', get_template_directory_uri() . '/images/set.png' , 39);\n\t}", "title": "" }, { "docid": "bed7abf983ba566ddf06763aa8f8f7b0", "score": "0.65862894", "text": "public function settingsManager()\n {\n\n $this->renderPageFile('page.settingsmanager');\n }", "title": "" }, { "docid": "5177e52210877e37afa8e985652925f1", "score": "0.6581051", "text": "function admin_menu() {\n\t\t\t$this->page = add_options_page( __( 'EDD Promo settings', 'edd-promo' ), __( 'EDD Promo', 'edd-promo' ), 'administrator', 'edd_promo_options', array( $this, 'admin_page' ) );\n\t\t\t\n\t\t\tadd_action( 'admin_print_styles-' . $this->page, array( $this, 'admin_print_style' ) );\n\t\t}", "title": "" }, { "docid": "6f018609bfa9fccecae6758cb33cf9ab", "score": "0.6557311", "text": "function bbp_admin_settings()\n{\n}", "title": "" }, { "docid": "250209141ee5dd1462efa2b37fd7768b", "score": "0.65567905", "text": "private function addDefaultSettings()\n {\n $settings = array(\n 'mobileview' => 320,\n 'tabletview' => 600,\n 'desktopview' => 920,\n 'imagesmall' => 30,\n 'imagemedium' => 50,\n 'imagelarge' => 100,\n 'showswitches' => true,\n 'placeholder' => $this->translator->trans(\"aes.settings.label.defaultplaceholder\"),\n );\n\n $globalSettings = array(\n 'apiendpoint' => \"/api\",\n 'default_image_size' => 'medium',\n 'css_custom_style' => $this->editorService->getDefaultCss(),\n );\n\n $this->setUpSettings($settings);\n $this->setUpSettings($globalSettings, true);\n }", "title": "" }, { "docid": "3240a35a3cf011a3ef25f6f478755183", "score": "0.65534186", "text": "public function settings()\n {\n ee()->functions->redirect($this->mcp_url('settings'));\n }", "title": "" }, { "docid": "aab28d83afd63a8cd38a08151852b647", "score": "0.6552506", "text": "public function admin_menus() {\n\t\t// About\n\t\tadd_dashboard_page(\n\t\t\t__( 'Theme Details', 'wpex' ),\n\t\t\t__( 'Theme Details', 'wpex' ),\n\t\t\t$this->minimum_capability,\n\t\t\t'wpex-about',\n\t\t\tarray( $this, 'about_screen' )\n\t\t);\n\n\t\t// Recommended\n\t\tadd_dashboard_page(\n\t\t\t__( 'Recommendations | Elegant Theme', 'wpex' ),\n\t\t\t__( 'Recommendations', 'wpex' ),\n\t\t\t$this->minimum_capability,\n\t\t\t'wpex-recommended',\n\t\t\tarray( $this, 'recommended_screen' )\n\t\t);\n\n\t}", "title": "" }, { "docid": "aaa391baf909bffcf709bd20571fad6b", "score": "0.6545846", "text": "public function wordpress_hook_admin_menu() {\n\t\t\tadd_menu_page( 'Omise', 'Omise', 'manage_options', 'omise', array( $this, 'page_settings') );\n\n\t\t\tadd_submenu_page( 'omise', __( 'Omise Settings', 'omise' ), __( 'Settings', 'omise' ), 'manage_options', 'omise-settings', array( $this, 'page_settings') );\n\t\t}", "title": "" }, { "docid": "d571f1bd884951d311b742da86e19b9a", "score": "0.65339696", "text": "function wedevs_admin_menu()\n {\n add_options_page('Settings API', 'Settings API', 'manage_options', 'settings_api_test', 'wedevs_plugin_page');\n }", "title": "" }, { "docid": "5aadb1be3cf594f0d5aa2e70029fa64f", "score": "0.65305495", "text": "public static function video_plugin_settings_slug_admin_page(){\r\n require_once __DIR__.'/view/admin/settings.php';\r\n }", "title": "" }, { "docid": "458c88a34d00f0cc3540ff9078b40b27", "score": "0.6493841", "text": "public function intial_settings()\n\t{\n\n\t\t/* Remove bar except for admins */\n\t\tadd_action('init', array(&$this, 'prbreakfast_remove_admin_bar'), 9);\n\n\t\t// Styles und Scripts\n\t\tadd_action('wp_enqueue_scripts', array(&$this, 'add_front_end_styles'), 9);\n\n\t}", "title": "" }, { "docid": "1986b559e9e3581a2946535fd980f3d7", "score": "0.6490938", "text": "function instant_ide_manager_admin_menu() {\r\n\t\r\n\tadd_menu_page( __( 'Instant IDE', 'instant-ide-manager' ), __( 'Instant IDE', 'instant-ide-manager' ), 'manage_options', 'instant-ide-manager-dashboard', 'instant_ide_manager_settings', '', 59 );\r\n\t\r\n\t$_instant_ide_manager_settings = add_submenu_page( 'instant-ide-manager-dashboard', __( 'Settings', 'instant-ide-manager' ), __( 'Settings', 'instant-ide-manager' ), 'manage_options', 'instant-ide-manager-dashboard', 'instant_ide_manager_settings' );\r\n\t\r\n\tadd_action( 'admin_print_styles-' . $_instant_ide_manager_settings, 'instant_ide_manager_admin_styles' );\r\n\r\n}", "title": "" }, { "docid": "830d1b82e4684c5a1b95b0d214b1c21a", "score": "0.6480483", "text": "public function admin_menu() {\n\n\t\t$id = add_submenu_page(\n\t\t\t'options-general.php',\n\t\t\t'MicahTek Auth',\n\t\t\t'MicahTek Auth',\n\t\t\t'manage_options',\n\t\t\t'mta-settings',\n\t\t\tarray(self::$instance, 'render_admin_menu')\n\t\t);\n\n\t}", "title": "" }, { "docid": "a3de20671da3d83eec964f38d090c3b0", "score": "0.6476017", "text": "public function index () {\n\t\t$this->commonData['activeMenues']['menuParent'] = 'setting';\n\t\t$this->commonData['activeMenues']['menuChild'] = 'setting';\n\t\t\n\t\t$this->commonData['title'] = \"Setting\";\n\n\t\t$settings_tem = (object)array('site_name' => '', 'site_email' => '', 'site_logo' => '', 'site_favicon' => '');\n\t\t$settings = $this->Users_model->getData('setting');\n\t\t$this->commonData['setting'] = (!empty($settings)) ? $settings[0] : $settings_tem;\n\n\t\t$this->loadScreen('setting') ;\n\t}", "title": "" }, { "docid": "e680cdec101308ed71d300607b912b2c", "score": "0.6474575", "text": "static function admin_menu() {\n //create new top-level menu\n add_plugins_page('GK Contact Steakhouse', 'GK Contact Steakhouse', 'administrator', __FILE__, array('GK_Contact_Steakhouse', 'settings_page'));\n //call register settings function\n add_action('admin_init', array('GK_Contact_Steakhouse', 'register_settings'));\n }", "title": "" }, { "docid": "cc9a37b649a8a17724f96773d17a99f7", "score": "0.64602447", "text": "public function plugin_settings_page() {\n\n\t\t$this->maybe_update_auth_tokens();\n\t\t$this->maybe_clear_fields_cache();\n\n\t\tparent::plugin_settings_page();\n\n\t}", "title": "" }, { "docid": "458a458abab37cd6a5cd035b6d40412c", "score": "0.6459052", "text": "public function adminDefault() {\n\t\t$this->adminList();\n\t}", "title": "" }, { "docid": "28afaacadc698235680fade81ae4649d", "score": "0.6454409", "text": "public function settings(){\n\t\t$this->verify();\n\t\t$data['title']=$this->cafeteria_model->fetch_cafeteria()->NAME.\" :: Settings\";\n\t\t$data['cafeteria']=$this->cafeteria_model->fetch_cafeteria();\n\t\t$this->load->view('administrator/parts/head',$data);\n\t\t$this->load->view('administrator/settings',$data);\n\t\t$this->load->view('administrator/parts/bottom',$data);\n\t}", "title": "" }, { "docid": "33d94144070cdb333f310a160033ece6", "score": "0.6451766", "text": "function adminMenus()\r\n{\r\n add_options_page('Mailin Setup', 'Mailin setup', 'administrator', 'mailin_options', 'mailinSettingsAdminPage');\r\n}", "title": "" }, { "docid": "3c0c09750150f0d65dcf1a9d922e9459", "score": "0.64405847", "text": "public function admin_menu() {\n\t\tadd_submenu_page(\n\t\t\t'socialflow',\n\t\t\tesc_attr__( 'Account Settings', 'socialflow' ),\n\t\t\tesc_attr__( 'Account Settings', 'socialflow' ),\n\t\t\t'manage_options',\n\t\t\t$this->slug,\n\t\t\tarray( $this, 'page' )\n\t\t);\n\t}", "title": "" }, { "docid": "cd71a90e7a24f7119f1eadf7f5464b0b", "score": "0.64371306", "text": "function recstory_admin_page() {\r\n\r\n\tadd_options_page (\r\n\r\n\t\t__('Rec Stories Settings Page','recstory'),\r\n\t\t\r\n\t\t__('Rec Stories','recstory'),\r\n\t\t\r\n\t\t'manage_options',\r\n\t\t\r\n\t\t__FILE__,\r\n\t\t\r\n\t\t'recstory_admin_settings_page'\r\n\t);\r\n}", "title": "" }, { "docid": "f30301e35ecd83062b154a59ad3f0399", "score": "0.64341724", "text": "function cfgk_admin_menu() {\n\tif ( current_user_can( 'manage_options' ) ) {\n\t\tadd_options_page(\n\t\t\t'CF Gatekeeper',\n\t\t\t'CF Gatekeeper',\n\t\t\t'activate_plugins',\n\t\t\t'cf-gatekeeper',\n\t\t\t'cfgk_settings_form'\n\t\t);\n\t}\n}", "title": "" }, { "docid": "b979685c1b796c7212f7108f0c98c95b", "score": "0.64316374", "text": "public function display_plugin_admin_page() {\n include_once( 'views/settings.php' );\n }", "title": "" }, { "docid": "5b028cfc828d9d8d1eecb99ef73fa877", "score": "0.6429293", "text": "public function _action_index()\n {\n $this->setViewScript( 'admin/settings.php', 'layout.php' );\n $this->view->title = \"Messages Settings\";\n }", "title": "" }, { "docid": "fea51a6ebcae90917002bc9baea332a7", "score": "0.6417645", "text": "public function admin_menu() {\n\t\tadd_options_page( 'Salesforce API Connector','Salesforce API Connector','manage_options','options_salesforce-api-connector', array( $this, 'settings_page' ) );\n\t}", "title": "" }, { "docid": "00df3210859c7e06c52d7ef9c4233a16", "score": "0.64034736", "text": "function sting_setup_admin_options() {\n\tglobal $sting_admin_page_name;\n\tregister_setting('sting_admin_options_group', 'sting_admin_options', 'sting_admin_process_input');\n\tadd_settings_section('admin_site_settings', 'Site Settings', 'setup_admin_content_section', $sting_admin_page_name);\n\tadd_settings_field('break_schedule_end', 'When does the break end?<br> If it is before today, we are not on a break.', 'break_schedule_end_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('music_blog_cat_input', 'Which Category is the Music Blog:', 'music_blog_cat_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('homepage_cat_input', 'Category of Posts to show on the Homepage:', 'homepage_cat_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('num_shows', 'Number of shows to request at a time (make this large):', 'num_shows_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('homepage_slider_id', 'Slider to show on the homepage:', 'homepage_slider_id_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('homepage_mobile_slider_id', 'Slider to show on the mobile homepage:', 'homepage_mobile_slider_id_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('sting_header_image', 'Default Header Image:', 'sting_header_image_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('sting_music_blog_header_image', 'Music Blog Header Image:', 'sting_music_blog_header_image_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('sting_admin_message', 'Admin Message (to Public):', 'sting_admin_message_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('sting_admin_message_start', 'Admin Message Event Start:', 'sting_admin_message_start_input_box', $sting_admin_page_name, 'admin_site_settings');\n\tadd_settings_field('sting_admin_message_end', 'Admin Message End:', 'sting_admin_message_end_input_box', $sting_admin_page_name, 'admin_site_settings');\n}", "title": "" }, { "docid": "f6a2e1ead7d3a9c7b6209d3062007efe", "score": "0.6402277", "text": "public static function register_settings_menu() {\n\n\t\t\tadd_options_page( 'Intagrate Lite', 'Intagrate Lite', 'manage_options', ITW_PLUGIN_SETTINGS, get_class() . '::settings_page' );\n\n\t\t}", "title": "" }, { "docid": "885dea49c024f8b08c67cc946f1ff74d", "score": "0.6399775", "text": "public function showSettingsDash(){\n\t\t$this->setState('SHOW_SETTINGS_DASH');\n\t\t$this->notifyObservers();\n\t\n\t\t//Redirect to General Settings\n\t\t$this->setRedirect(\"index.php?system=GeneralSettings&page=edit\");\n\t}", "title": "" }, { "docid": "f0c7c0b430cf89be133cb422a2f63d6a", "score": "0.63983566", "text": "function admin_menu() {\r\n\t\tadd_menu_page( __('Home management dashboard', 'wp_home_mngt'), __('Home', 'wp_home_mngt'), 'manage_options', 'wp-home-dashboard', array( &$this, 'dashboard' ) );\r\n\t}", "title": "" }, { "docid": "6d9563f324831b85b80b5a728761af33", "score": "0.63921124", "text": "function admin_menus() {\n\t\tadd_options_page ( __( 'Alfred', 'alfred' ), __( 'Alfred', 'alfred' ), 'manage_options', 'alfred', 'alfred_admin_settings' );\n\t}", "title": "" }, { "docid": "292f733a930fbe4cb190d0115d4b22e0", "score": "0.6390818", "text": "function admin_settings_page() {\n\t\tadd_menu_page( \n\t\t\t'Quick Links SC - Links Page',\n\t\t\t'Quick Links SC',\n\t\t\t'manage_options',\n\t\t\t'quick_links_sc_index',\n\t\t\tarray($this, 'quick_links_sc_index') \n\t\t);\n\t\tadd_submenu_page( \n\t\t\t'quick_links_sc_index',\n\t\t\t'Quick Links SC',\n\t\t\t'Add New',\n\t\t\t'manage_options',\n\t\t\t'quick_links_sc_edit_page',\n\t\t\tarray($this, 'quick_links_sc_edit_page') \n\t\t);\n\n\t\tadd_action( \n\t\t\t'admin_enqueue_scripts',\n\t\t\tarray($this, 'enqueue_admin_js')\n\t\t);\n\t}", "title": "" }, { "docid": "4b63d0a7023e90cba221e0e64ec45300", "score": "0.6384756", "text": "public function action_setting() {\n if (Session::get('isAdmin')) {\n $data['content'] = 'admin/setting';\n $view = View::forge('admin/index', $data);\n $view->set_global('categories', Model_Categorie::find(\"all\"), false);\n $view->set_global('secteurs', Model_Secteur::getAll(), false);\n return $view;\n } else\n Response::redirect('admin/admin/connection');\n }", "title": "" }, { "docid": "a58905156af9bbeda7c6dde5b92f1626", "score": "0.6376855", "text": "function init_theme_settings_admin() {\n Customize_Theme::init();\n }", "title": "" }, { "docid": "bee33686d711c2503978066e491ff8da", "score": "0.6360802", "text": "function cfs_admin_tab() {\n\t\n\tadd_menu_page('Customize Share API', 'Customize Share API', 'manage_options', __FILE__, 'cfs_admin_page');\n}", "title": "" }, { "docid": "b36ee6d0e57e1f9ec6cefe16870a93ef", "score": "0.6356137", "text": "function webinarjam_admin_settings() {\n\n\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\twp_die( esc_attr__( 'You do not have sufficient permissions to access this page.' ) );\n\t}\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/settings.php';\n}", "title": "" }, { "docid": "5bd03faa73ee7226b41cc828c2b20a19", "score": "0.63531584", "text": "public function adminMenu()\n {\n \\add_menu_page('PTP Media', 'PTP Media', 'manage_options', 'ptp_media', $this->adminController, 'dashicons-format-gallery', 110);\n }", "title": "" }, { "docid": "e3404d07c96bfe89fb6d5ee1180f8b29", "score": "0.6341592", "text": "public function admin_page() {\n\t\t\t\n\t\tsettings_errors(); ?>\n\n\t\t<div id=\"tab_container\">\n\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\n\t\t\t\t<?php echo wp_nonce_field( 'toggl_alert_settings', 'toggl_alert_settings_nonce' ); ?>\n\n\t\t\t\t<?php settings_fields( 'toggl_alert' ); ?>\n\n\t\t\t\t<?php do_settings_sections( 'toggl-alert' ); ?>\n\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n\t\t</div>\n\n\t\t<?php\n\t\t\n\t}", "title": "" }, { "docid": "536f92b5e2b5a508f4ce152bfc286340", "score": "0.63411534", "text": "public function page_settings() {\n\t\t\tOmise_Page_Settings::render();\n\t\t}", "title": "" }, { "docid": "f461cc04009fc16e971edde0db491180", "score": "0.63373244", "text": "function mawt_custom_theme_options_menu()\n {\n add_menu_page('Ajustes del tema MAWT', 'Ajustes del tema', 'administrator', 'mawt_settings', 'mawt_custom_theme_options_form', 'dashicons-admin-generic', 20);\n }", "title": "" }, { "docid": "0dbf6f26bb5158de0f029acbff7680f3", "score": "0.6325594", "text": "function wordpress_admin_menu () {\n\n\t\tadd_options_page ( 'FS-Schema', 'FS-Schema', 'administrator', 'fs-schema', array ( &$this, 'admin_page') );\n\t\t\n\t}", "title": "" }, { "docid": "a69623a1208eac3e90b34c16af3ffd3b", "score": "0.63180035", "text": "public static function admin_menu() {\n\t\t$settings_page = add_options_page(\n\t\t\t'ActivityPub',\n\t\t\t'ActivityPub',\n\t\t\t'manage_options',\n\t\t\t'activitypub',\n\t\t\tarray( 'Activitypub_Admin', 'settings_page' )\n\t\t);\n\n\t\tadd_action( 'load-' . $settings_page, array( 'Activitypub_Admin', 'add_help_tab' ) );\n\t}", "title": "" }, { "docid": "a7372063116dfb5b8a2a4431d16d95ff", "score": "0.63123673", "text": "public function admin_init() {\n\t\t\t\t\t\t\n\t\t\t$name = $this->options['slug'];\n\t\t\t$this->slug = strtolower(THEME_NAME.'_'.$name);\n\t\t\t\n\t\t\tadd_option($this->slug.'_fields', '', '', 'yes');\n\t\t\tupdate_option($this->slug.'_fields', $this->options['options']);\n\t\t}", "title": "" }, { "docid": "7f191dd5be5307674045fd7c11feff1f", "score": "0.6312055", "text": "function custom_settings_add_menu() {\r\n add_menu_page( 'Custom Settings', 'Custom Settings', 'manage_options', 'custom-settings', 'custom_settings_page', null, 99);\r\n}", "title": "" }, { "docid": "0fea9190fd1dd9f696f8e02c807aff4f", "score": "0.6301662", "text": "function mediadb_add_admin_menu() {\n\tadd_options_page('Media Database', 'Media Database', 'administrator', 'mediadb', 'mediadb_admin_settings_page');\n}", "title": "" }, { "docid": "01c777ecf5e8a88681d4ea31a0114f88", "score": "0.62994474", "text": "function settings_page() {\n\tadd_submenu_page(\n\t\t'options-general.php',\n\t\t'Fedora Embed',\n\t\t'Fedora Embed',\n\t\t'manage_options',\n\t\tFEM_PREFIX . 'settings_page',\n\t\t__NAMESPACE__ . '\\settings_page_html'\n\t);\n}", "title": "" }, { "docid": "98610f8ec2bd3835e0c714d70d4bcabb", "score": "0.6296123", "text": "public function gfThemeSettingsCreateMenu()\n {\n add_menu_page('GreenFriends Theme Settings', 'GreenFriends Theme Settings', 'administrator', 'gf_theme_settings', array($this, 'gfThemeSettingsOptionsPage'), null, 200);\n add_submenu_page('gf_theme_settings', 'GreenFriends Theme Settings', 'General', 'administrator', 'gf_theme_settings', array($this, 'gfThemeSettingsOptionsPage'));\n }", "title": "" }, { "docid": "c7c9898db2c62cd6084777884ca1c7df", "score": "0.629537", "text": "function jr_mt_admin_init() {\n\t$settings = get_option( 'jr_mt_settings' );\n\tforeach ( array( 'query', 'url', 'url_prefix', 'url_asterisk' ) as $key ) {\n\t\tif ( !empty( $settings[ $key ] ) ) {\n\t\t\tDEFINE( 'JR_MT_LIST_SETTINGS', TRUE );\n\t\t\tbreak;\n\t\t}\n\t}\n\tif ( defined( 'JR_MT_LIST_SETTINGS' ) ) {\n\t\tadd_settings_section(\n\t\t\t\t'jr_mt_delete_settings_section', \n\t\t\t\t'Current Theme Selection Entries', \n\t\t\t\t'jr_mt_delete_settings_expl', \n\t\t\t\t'jr_mt_settings_page' \n\t\t\t);\n\t\tadd_settings_field(\n\t\t\t'del_entry', \n\t\t\t'Theme Selection Entries:', \n\t\t\t'jr_mt_echo_delete_entry', \n\t\t\t'jr_mt_settings_page', \n\t\t\t'jr_mt_delete_settings_section'\n\t\t);\n\t}\n\tadd_settings_section( \n\t\t'jr_mt_site_home_section',\n\t\t'<input name=\"jr_mt_settings[tab1]\" type=\"submit\" value=\"Save All Changes\" class=\"button-primary\" /></h3><h3>Site Home',\n\t\t'jr_mt_site_home_expl',\n\t\t'jr_mt_settings_page' \n\t);\n\tadd_settings_field( \n\t\t'site_home', \n\t\t'Select Theme for Site Home<br /><code>' . JR_MT_HOME_URL . '</code>', \n\t\t'jr_mt_echo_site_home', \n\t\t'jr_mt_settings_page', \n\t\t'jr_mt_site_home_section' \n\t);\n\tadd_settings_section(\n\t\t'jr_mt_single_settings_section', \n\t\t'For An Individual Page, Post or other non-Admin page;<br />or a group of pages, specified by URL Prefix, optionally with Asterisk(s)', \n\t\t'jr_mt_single_settings_expl', \n\t\t'jr_mt_settings_page'\n\t);\n\tadd_settings_field( 'add_is_prefix', 'Select here if URL is a Prefix', 'jr_mt_echo_add_is_prefix', 'jr_mt_settings_page', 'jr_mt_single_settings_section' );\n\tadd_settings_field( 'add_theme', 'Theme', 'jr_mt_echo_add_theme', 'jr_mt_settings_page', 'jr_mt_single_settings_section' );\n\tadd_settings_field( 'add_path_id', 'URL of Page, Post, Prefix or other', 'jr_mt_echo_add_path_id', 'jr_mt_settings_page', 'jr_mt_single_settings_section' );\n\tadd_settings_section( 'jr_mt_querykw_section', \n\t\t'For A Query Keyword on any Page, Post or other non-Admin page', \n\t\t'jr_mt_querykw_expl', \n\t\t'jr_mt_settings_page' \n\t);\n\tadd_settings_field( 'add_querykw_theme', 'Theme', 'jr_mt_echo_add_querykw_theme', 'jr_mt_settings_page', 'jr_mt_querykw_section' );\n\tadd_settings_field( 'add_querykw_keyword', 'Query Keyword', 'jr_mt_echo_add_querykw_keyword', 'jr_mt_settings_page', 'jr_mt_querykw_section' );\n\tadd_settings_section( 'jr_mt_query_section', \n\t\t'For A Query Keyword=Value on any Page, Post or other non-Admin page', \n\t\t'jr_mt_query_expl', \n\t\t'jr_mt_settings_page'\n\t);\n\tadd_settings_field( 'add_query_theme', 'Theme', 'jr_mt_echo_add_query_theme', 'jr_mt_settings_page', 'jr_mt_query_section' );\n\tadd_settings_field( 'add_query_keyword', 'Query Keyword', 'jr_mt_echo_add_query_keyword', 'jr_mt_settings_page', 'jr_mt_query_section' );\n\tadd_settings_field( 'add_query_value', 'Query Value', 'jr_mt_echo_add_query_value', 'jr_mt_settings_page', 'jr_mt_query_section' );\n\tadd_settings_section( 'jr_mt_aliases_section', \n\t\t'<input name=\"jr_mt_settings[tab1]\" type=\"submit\" value=\"Save All Changes\" class=\"button-primary\" /></h3></div><div id=\"jr-mt-settings2\" style=\"display: none;\"><h3>Site Aliases used in URLs to Access This WordPress Site', \n\t\t'jr_mt_aliases_expl', \n\t\t'jr_mt_settings_page' \n\t);\n\t/*\tThere is always an entry for the Site URL (\"Home\").\n\t*/\n\tif ( count( $settings['aliases'] ) > 1 ) {\n\t\tadd_settings_section(\n\t\t\t'jr_mt_delete_aliases_section', \n\t\t\t'Current Site Alias Entries', \n\t\t\t'jr_mt_delete_aliases_expl', \n\t\t\t'jr_mt_settings_page' \n\t\t);\n\t\tadd_settings_field(\n\t\t\t'del_alias_entry', \n\t\t\t'Site Alias Entries:', \n\t\t\t'jr_mt_echo_delete_alias_entry', \n\t\t\t'jr_mt_settings_page', \n\t\t\t'jr_mt_delete_aliases_section'\n\t\t);\n\t}\n\tadd_settings_section(\n\t\t'jr_mt_create_alias_section', \n\t\t'Create New Site Alias Entry', \n\t\t'jr_mt_create_alias_expl', \n\t\t'jr_mt_settings_page' \n\t);\n\tadd_settings_field( \n\t\t'add_alias', \n\t\t'Site Alias', \n\t\t'jr_mt_echo_add_alias', \n\t\t'jr_mt_settings_page', \n\t\t'jr_mt_create_alias_section' \n\t);\n\tadd_settings_section( 'jr_mt_sticky_section', \n\t\t'<input name=\"jr_mt_settings[tab2]\" type=\"submit\" value=\"Save All Changes\" class=\"button-primary\" /></h3></div><div id=\"jr-mt-settings3\" style=\"display: none;\"><h3>Advanced Settings</h3><p><b>Warning:</b> As the name of this section implies, Advanced Settings should be fully understood or they may surprise you with unintended consequences, so please be careful.</p><h3>Sticky and Override', \n\t\t'jr_mt_sticky_expl', \n\t\t'jr_mt_settings_page' \n\t);\n\tadd_settings_field( 'query_present', 'When to add Sticky Query to a URL', 'jr_mt_echo_query_present', 'jr_mt_settings_page', 'jr_mt_sticky_section' );\n\tadd_settings_field( 'sticky_query', 'Keyword=Value Entries:', 'jr_mt_echo_sticky_query_entry', 'jr_mt_settings_page', 'jr_mt_sticky_section' );\n\tadd_settings_section( 'jr_mt_everything_section',\n\t\t'Theme for Everything',\n\t\t'jr_mt_everything_expl', \n\t\t'jr_mt_settings_page'\n\t);\n\tadd_settings_field( 'current', \n\t\t'Select Theme for Everything, to Override WordPress Current Theme (<b>' . wp_get_theme()->Name . '</b>)', \n\t\t'jr_mt_echo_current', \n\t\t'jr_mt_settings_page', \n\t\t'jr_mt_everything_section' \n\t);\n\tadd_settings_section( 'jr_mt_all_settings_section', \n\t\t'For All Pages and/or All Posts', \n\t\t'jr_mt_all_settings_expl', \n\t\t'jr_mt_settings_page' \n\t);\n\t$suffix = array(\n\t\t'Pages' => '<br />(Pages created with Add Page)',\n\t\t'Posts' => ''\n\t);\n\tforeach ( array( 'Pages', 'Posts' ) as $thing ) {\n\t\tadd_settings_field( 'all_' . jr_mt_strtolower( $thing ), \"Select Theme for All $thing\" . $suffix[$thing], 'jr_mt_echo_all_things', 'jr_mt_settings_page', 'jr_mt_all_settings_section', \n\t\t\tarray( 'thing' => $thing ) );\n\t}\n\tadd_settings_section( 'jr_mt_ajax_section', \n\t\t'AJAX', \n\t\t'jr_mt_ajax_expl', \n\t\t'jr_mt_settings_page' \n\t);\n\tadd_settings_field( 'ajax_all', \n\t\t'Theme for <code>admin-ajax.php</code>', \n\t\t'jr_mt_echo_ajax_all', \n\t\t'jr_mt_settings_page', \n\t\t'jr_mt_ajax_section' \n\t);\n}", "title": "" }, { "docid": "b626dc17ca760e87af2d41f66a5c1dbe", "score": "0.62859887", "text": "public function admin_init() {\n\n\t\t\t$name = $this->options['slug'];\n\t\t\t$this->slug = strtolower(THEME_NAME.'_'.$name);\n\t\t\n\t\t\tadd_option($this->slug, '', '', 'yes');\n\t\t\tadd_option($this->slug.'_fields', '', '', 'yes');\n\t\t\tupdate_option($this->slug.'_fields', $this->options['options']);\n\t\t}", "title": "" }, { "docid": "2d0a79d7698a1249728f674a118f7275", "score": "0.6282135", "text": "public function admin_menu() {\n\n add_options_page(\n 'Scoop.It Importer',\n 'Scoop.It Importer',\n 'manage_options',\n self::SLUG ,\n array(&$this, 'admin_page')\n );\n\n }", "title": "" }, { "docid": "4b3d0d998621b106417c2f67b7cc632e", "score": "0.6279239", "text": "public function options_page(){\n\t\t\t// NEEDS: setting_content()\n\n\t\t\tif( ! current_user_can( 'manage_options' ) ) return;\n\t\t\t\n\t\t\techo '<div class=\"wrap\"><h2>' . __('Dropbox Sideload Settings', 'dropbox-sideload') . '</h2>';\n\n\t\t\t// Do the content\n\t\t\t$this -> setting_content();\n\t\t\t\t\n\t\t\techo '</div>';\n\t\t}", "title": "" }, { "docid": "9a077bbd774eabef5a9ef8986749008b", "score": "0.62791246", "text": "public function index() {\n\t\t$this->tpl->display('settings.phtml');\n\t}", "title": "" }, { "docid": "1670b8a0615e700c9f0e0187a3865b73", "score": "0.62769276", "text": "public function adminMenuItem()\n {\n add_submenu_page(\n 'options-general.php',\n self::PLUGIN_NAME, // placed in <title> tag\n self::PLUGIN_NAME, // visible in left menu\n 'manage_options',\n self::MENU_SLUG,\n array( $this, 'displayAdminSettings')\n );\n }", "title": "" }, { "docid": "bdaa30752c2e62409d2dbb10a119c4a1", "score": "0.6274354", "text": "public function index()\n {\n $this->permission->check_label('software_settings')->update()->redirect();\n\n $content = $this->lsoft_setting->setting_add_form();\n $this->template_lib->full_admin_html_view($content);\n }", "title": "" }, { "docid": "c572091b26b5bdeb326d59f723f3933b", "score": "0.62729204", "text": "public function actionAccountSettings()\r\n\t{\r\n\t\t//$this->layout='//layouts/one-column';\r\n\t\t$this->layout = '//layouts/dashboard' ;\r\n\t\t$this->render('accountSettings', array('profile'=>Yii::app()->user->Profile));\r\n\t}", "title": "" }, { "docid": "2051b72d318ed26df76a0885403a8541", "score": "0.62635744", "text": "public function display_plugin_admin_page() {\n\t\n\t\tinclude_once( 'views/setting_options.php' );\n\t\t\n\t}", "title": "" }, { "docid": "50504cbd9104aab7a4e63fb0e118fdff", "score": "0.62628186", "text": "public function init() \r\n\t{\r\n\t\t$setting = OmmuSettings::model()->findByPk(1, array(\r\n\t\t\t'select' => 'site_type',\r\n\t\t));\r\n\t\t\r\n\t\tif(!Yii::app()->user->isGuest) {\r\n\t\t\tif(in_array(Yii::app()->user->level, array(1,2))) {\r\n\t\t\t\t$arrThemes = $this->currentTemplate('admin');\r\n\t\t\t\tYii::app()->theme = $arrThemes['folder'];\r\n\t\t\t\t$this->layout = $arrThemes['layout'];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif($setting->site_type == 1)\r\n\t\t\t\t$this->redirect(Yii::app()->createUrl('site/login'));\r\n\t\t\telse\r\n\t\t\t\t$this->redirect(Yii::app()->createUrl('users/admin'));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bf4b2f283be4ed09a8605593b3c8df97", "score": "0.6259057", "text": "function bbp_admin_setting_callback_show_on_root()\n{\n}", "title": "" }, { "docid": "b86b8fb255f25d4fc1aa45d2e0d77a59", "score": "0.62550503", "text": "function settingsPage() {\n\t\t$slug = $this->slug;\n\t\t$callback = [ $this, 'settingsPageContent' ];\n\t\tadd_submenu_page( $this->file_name, 'REST Routes', 'REST Routes', 'manage_options', $slug, $callback );\n\t}", "title": "" }, { "docid": "fa01690c72045df5745a781b902588b1", "score": "0.62404174", "text": "public function SettingsView(){\n\t\t//Meta is usually not setup yet, so we manually do this before loading css file\n\t\t$this->meta = new Meta();\n\t\t\n\t\t//This class requires an extra css file\n\t\t$this->getMeta()->addExtra('<link href=\"core/fragments/css/admin.css\" rel=\"stylesheet\" type=\"text/css\" />');\t\n\t}", "title": "" }, { "docid": "b4f83b65395266d3e7900459129e8bc0", "score": "0.623657", "text": "function rehub_plugin_page_setup( $default_settings ) {\n $default_settings['parent_slug'] = 'admin.php';\n $default_settings['page_title'] = esc_html__( 'Demo Import' , 'rehub-theme' );\n $default_settings['menu_title'] = esc_html__( 'Import Demo' , 'rehub-theme' );\n $default_settings['capability'] = 'administrator';\n $default_settings['menu_slug'] = 'import_demo';\n return $default_settings;\n}", "title": "" }, { "docid": "a87b1bd8b094d1aa972f43036081d2ce", "score": "0.6229936", "text": "public function action_layoutSettings_display()\n\t{\n\t\tglobal $txt, $context, $modSettings;\n\n\t\t// Initialize the form\n\t\t$settingsForm = new SettingsForm(SettingsForm::DB_ADAPTER);\n\n\t\t// Initialize it with our settings\n\t\t$settingsForm->setConfigVars($this->_layoutSettings());\n\n\t\t// Saving?\n\t\tif (isset($this->_req->query->save))\n\t\t{\n\t\t\t// Setting a custom frontpage, set the hook to the FrontpageInterface of the controller\n\t\t\tif (!empty($this->_req->post->front_page))\n\t\t\t{\n\t\t\t\t// Addons may have left this blank\n\t\t\t\t$modSettings['front_page'] = empty($modSettings['front_page']) ? 'MessageIndex_Controller' : $modSettings['front_page'];\n\n\t\t\t\t$front_page = (string) $this->_req->post->front_page;\n\t\t\t\tif (\n\t\t\t\t\tclass_exists($modSettings['front_page'])\n\t\t\t\t\t&& in_array('validateFrontPageOptions', get_class_methods($modSettings['front_page']))\n\t\t\t\t\t&& !$front_page::validateFrontPageOptions($this->_req->post)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$this->_req->post->front_page = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcheckSession();\n\n\t\t\tcall_integration_hook('integrate_save_layout_settings');\n\n\t\t\t$settingsForm->setConfigValues((array) $this->_req->post);\n\t\t\t$settingsForm->save();\n\t\t\twriteLog();\n\n\t\t\tredirectexit('action=admin;area=featuresettings;sa=layout');\n\t\t}\n\n\t\t$context['post_url'] = getUrl('admin', ['action' => 'admin', 'area' => 'featuresettings', 'sa' => 'layout', 'save']);\n\t\t$context['settings_title'] = $txt['mods_cat_layout'];\n\n\t\t$settingsForm->prepare();\n\t}", "title": "" }, { "docid": "e444081cd9cfc556e8ad425155e9be0d", "score": "0.6222446", "text": "public function add_admin_menu() {\n\t\tadd_options_page(\n\t\t\t'as-settings-broken-v2',\n\t\t\t'as-settings-broken-v2',\n\t\t\t'manage_options',\n\t\t\t'as-settings-broken-v2',\n\t\t\t[ $this, 'options_page' ] );\n\t}", "title": "" }, { "docid": "4fe535b26cb95bc075dc393b8b1715d2", "score": "0.62189215", "text": "function custom_settings_add_menu() {\n add_menu_page( 'TechGorilla Settings', 'TechGorilla Settings', 'manage_options', 'custom-settings', 'custom_settings_page', null, 99 );\n}", "title": "" }, { "docid": "03f46734021001e98073d9af10c7b912", "score": "0.62178993", "text": "public function action_admin_menu() {\n\t\tif ( !defined('REDE_ADMIN_MENU') ) {\n\t\t\tadd_menu_page( \n\t\t\t\t\"Red ( E ) Tools\", \n\t\t\t\t\"Red ( E ) Tools\", \n\t\t\t\t'manage_options', \n\t\t\t\t'rede-admin-menu', \n\t\t\t\tarray($this,'rede_splash_page'),\n\t\t\t\t'',\n\t\t\t\t50\n\t\t\t);\n\t\t\tdefine('REDE_ADMIN_MENU',true);\n\t\t}\n\t\t\n\t\tadd_submenu_page(\n\t\t\t'rede-admin-menu',\n\t\t\t$this->menu_title,\n\t\t\t$this->menu_name,\n\t\t\t'manage_options',\n\t\t\t$this->prefix.'settings',\n\t\t\tarray( $this, 'render_admin_options_page')\n\t\t);\n\n\t}", "title": "" }, { "docid": "eeaba381ccf604d7323dfa1a89bfafbf", "score": "0.6212872", "text": "public function system_settings() {\n\t\tshow(array(\n\t\t\t'page' => 'system_settings',\n\t\t\t'sub_title' => 'System Settings',\n\t\t\t'script' => 'user/login',\n\t\t\t'view' => 'user/system_settings'\n\t\t));\n\t}", "title": "" }, { "docid": "247b16874d98a517ddb9d1f046666730", "score": "0.6209564", "text": "public function index() {\r\n //$this->set(\"browser_layout\", \"Browser Layout\");\r\n //$this->layout = \"administration\";\r\n }", "title": "" }, { "docid": "b1a2bbc90cddce414a4369255c52f96a", "score": "0.6208577", "text": "function fah_add_admin_menu() {\n\t \n\t add_menu_page( 'Flora@home Woo Commerce plugin settings', 'Flora@home', 'manage_options', 'flora@home_woo_commerce_plugin_settings', 'fah_options_page' );\n\t \n\t}", "title": "" }, { "docid": "350f7c2c2e4742aad935766c6fb741cf", "score": "0.62047267", "text": "public function adminMenu()\n {\n if (is_admin()) {\n \n add_menu_page(\n 'Hreflang Settings',\n \\EburyLabs\\Hreflang::$plugin_name,\n 'manage_options',\n 'wp-hreflang',\n array($this, 'loadOptions'),\n WPHREFLANG_URL.'assets/eburylabs.png'\n );\n\n }\n }", "title": "" }, { "docid": "32469e361ac26a1508e9fd6b2f15af82", "score": "0.62046844", "text": "function bbp_register_admin_settings()\n{\n}", "title": "" }, { "docid": "3ce8b6273c5b612ea1cafbe5917aacdf", "score": "0.62037694", "text": "public function add_settings_page() \n {\n add_options_page(\n 'ERP Sync Tool Settings',\n 'ERP Sync Tool Settings',\n 'manage_options',\n 'erp-sync-tool',\n array( $this, 'render_settings_page' )\n );\n }", "title": "" }, { "docid": "23b4c512297a7e984d56ac70f3e49856", "score": "0.62036645", "text": "function themer_add_settings() {\n\t\tadd_submenu_page( 'tools.php', 'Themer', 'Themer', 'manage_options', 'themer_settings', 'themer_settings_page' );\n\t}", "title": "" }, { "docid": "1b9f5a5db777bb17586fc069db5fbbe4", "score": "0.6202564", "text": "public function add_menu()\n {\n \t// Add a page to manage this plugin's settings\n \tadd_options_page(\n \t \t'Dentix Settings', \n \t \t'Dentix', \n \t \t'manage_options', \n \t \t'dentix_settings', \n \t \tarray(&$this, 'plugin_settings_page')\n \t);\n }", "title": "" }, { "docid": "b09fae8136d7f3a0edaae9f8c9c549d7", "score": "0.6198667", "text": "public function magento_create_menu() {\n add_menu_page('Magento Settings', 'Magento Settings', 'administrator', __FILE__, array(&$this, 'magento_settings_page') , plugins_url('/xyzproject-magento/Magentoicon.png', __FILE__) );\n }", "title": "" }, { "docid": "be883c035ac150581edae3d90696bc97", "score": "0.6192789", "text": "public function render_charitable_settings_page() {\r\n charitable_admin_view( 'settings/settings' );\r\n }", "title": "" }, { "docid": "bb7eb21d5e0cd85e7304ffa548a1d1f1", "score": "0.61902636", "text": "public function setAdmin()\n {\n $this->type = self::ADMIN_TYPE;\n $this->save();\n }", "title": "" }, { "docid": "4589769af7b393368e94422dcdce5d39", "score": "0.6189706", "text": "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e( $this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form. Built in WC function\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "title": "" }, { "docid": "e7577a3dd681006f6ec357547a537681", "score": "0.618388", "text": "public function setLayout()\n\t{\n \t$this->_helper->layout->setLayout('admin');\t\n\t}", "title": "" }, { "docid": "dee281e963ca7db62d1d1d933d9dccb3", "score": "0.617911", "text": "public function admin_page() {\n\n\t\tdo_action( 'wpforms_admin_page' );\n\t}", "title": "" } ]
d8c8894e4002b05e31fa4435a9d72d11
Should ship in one box
[ { "docid": "bf149949a0f314df86a96b0c764f2127", "score": "0.0", "text": "public function test4MaxWeight20lb() {\n\n Mage::helper('webshopapps_wsatestframework/log')->debug('test4MaxWeight20lb - test selects right box weight 20lb * 4' );\n\n $packages = $this->getPackages('4*SML_20LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],4*20);\n $this->ensurePackagePrice($packages[0],4*24);\n $this->ensurePackageDimensions($packages[0],array(20,25,29));\n $this->ensurePackageTotalPrice($packages,4*24);\n $this->ensurePackageTotalWeight($packages,4*20);\n }", "title": "" } ]
[ { "docid": "b6e07f87e2989ed37b34f5a8d1a9f3a8", "score": "0.62035114", "text": "function takeMemberShip() {\n\t}", "title": "" }, { "docid": "b7f8322533ec20e25458af55cb3b2b82", "score": "0.5871563", "text": "protected function isHit(){\n \t$grid = $this->saveData->get()['unhiddenField'];\n \t\n \tif(isset($grid[$this->convertedCoordinateArray['x']][$this->convertedCoordinateArray['y']])){\n \t\tif($grid[$this->convertedCoordinateArray['x']][$this->convertedCoordinateArray['y']] == IBattleField::SHIP){\n \t\t\treturn true;\n \t\t}\n \t}\n \t \n \treturn false;\n }", "title": "" }, { "docid": "d24d51646b5d9568c4066368f511d0ec", "score": "0.5601333", "text": "public function testSingle1TwoDimBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSingle1TwoDimBox - Test 1 dim items in 2 poss boxes ');\n\n $packages = $this->getPackages('1*SING_2_VOL_5LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],1*5);\n $this->ensurePackagePrice($packages[0],1*17);\n }", "title": "" }, { "docid": "4c4f2233bae7cb8b1e6b39fbd68ad080", "score": "0.5519454", "text": "function shiprush_button() {\n\t\t\t\tadd_meta_box( 'woocommerce-shiprush', __('ShipRush', 'WC_ShipRush'), array( &$this, 'shiprush_meta_box' ), 'shop_order', 'side', 'high');\n\t\t\t}", "title": "" }, { "docid": "1853268180b9bcbfa942c2362ef21dc6", "score": "0.54711103", "text": "abstract public function box($id);", "title": "" }, { "docid": "451787ec61f4fbef2b181bbaa687f345", "score": "0.5440658", "text": "function shiprush_meta_box() {\n\t\t\t\n\t\t\t\tglobal $woocommerce, $post;\n\t\t\t\t\n\t\t\t\t//set this variable to true if you want the plugin to hit sandbox\n \t\t$ifsbox = USE_SANDBOX;\n\t\t\t\t\n\t\t\t\t$order_id = $post->ID;\n\t\t\t\t$order = new WC_Order( $order_id );\n\t\t\t\t\n\t\t\t\tif ( isset( $_POST['tnum'] ) ) {\n\n\t\t\t\t\t$tracking_number = sanitize_text_field( $_POST['tnum'] );\n\t\t\t\t\t$shipped_on = date(\"m/d/Y\");\n\t\t\t\t\t$ship_comments = \"Shipped on $shipped_on and tracking number is $tracking_number\";\n\t\t\t\t\t$tracking_info = array(\n\t\t\t\t\t\t'order_id' => $order_id,\n\t\t\t\t\t\t'tracking_number' => $tracking_number,\n\t\t\t\t\t\t'provider' => 'Ship Rush',\n\t\t\t\t\t\t'date_shipped' => $shipped_on,\n\t\t\t\t\t);\n\n\t\t\t\t\t// If not part shipped and a mixed products.\n\t\t\t\t\tif ( 'part-shipped' != $order->get_status() && $this->is_mixed_products( $order ) ) {\n\n\t\t\t\t\t\t$change_order_status = 'part-shipped';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If mixed products and already partially shipped.\n\t\t\t\t\telseif ( $this->is_mixed_products( $order ) && 'part-shipped' == $order->get_status() ) {\n\n\t\t\t\t\t\t$change_order_status = 'completed';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Not a mixed products.\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t$change_order_status = 'completed';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Original update for tracking number.\n\t\t\t\t\tupdate_post_meta( $order_id, '_tracking_number', $tracking_number );\n\t\t\t\t\tupdate_post_meta( $order_id, '_date_shipped', time() );\n\t\t\t\t\t$this->set_tracking_info( $tracking_info );\n\t\t\t\t\t$order->update_status( $change_order_status, $ship_comments );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Get order details\n\t\t\t\t$order_number = $order->get_order_number();\n\t\t\t\t$order_date=$order->order_date;\n\t\t\t\t$total_paid_real=$order->order_total;\n\t\t\t\t$weight_unit=get_option(\"woocommerce_weight_unit\");\n\t\t\t\t$currency_type=get_woocommerce_currency();\n\t\t\t\t$comments=$order->customer_note;\n\t\t\t\t$comments=prepare_json_compatible_data($comments);\n\t\t\t\t//Get order items\n\t\t\t\t$items = $order->get_items();\n\t\t\t\t$counter=0;\n\t\t\t\t$product_array=array();\n\t\t\t\t\n\t\t\t\t//shipping details\n\t\t\t\tforeach ( $order->get_shipping_methods() as $shipping_item_id => $shipping_item ) \n\t\t\t\t{\n\t\t\t\t\t$carrier=$shipping_item['name'];\n\t\t\t\t\t$shipping_charges=wc_format_decimal( $shipping_item['cost'], $dp );\n\t\t\t\t}\n\t\t\t\t$dim_unit=\"\";\n\t\t\t\t$PkgLength=\"\";\n\t\t\t\t$PkgWidth=\"\";\n\t\t\t\t$PkgHeight=\"\";\n\t\t\t\t$excluded_products = $this->get_excluded_product_ids();\n\t\t\t\tforeach ( $items as $item ) \n\t\t\t\t{\n\t\t\t\t\t$attributes=\"\";\n\n\t\t\t\t\tif ( $item['product_id'] > 0 && in_array( (int) $item['product_id'], $excluded_products ) ) {\n\n\t\t\t\t\t\t$product_additional_details = get_product( $item['product_id'] );\n\t\t\t\t\t\t$item_meta = new WC_Order_Item_Meta( $item['item_meta'] );\n\t\t\t\t\t\t$attributes = $item_meta->display( true, true );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t if(strlen($attributes)>0) \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t$product_array[$counter]['name']=$item['name'] . ' - ' .$item_meta->display( true, true );\t\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 {\n\t\t\t\t\t\t\t$product_array[$counter]['name']=$item['name'];\n\t\t\t\t\t\t }\n\t\t\t\t\t\t\t$product_array[$counter]['name']=prepare_json_compatible_data($product_array[$counter]['name']);\t\t\t\t\t\t\n\t\t\t\t\t\t\t$product_array[$counter]['quantity']=$item['qty'];\n\t\t\t\t\t\t\t$product_array[$counter]['price']=number_format($item['line_total']/$item['qty'],2);\n\t\t\t\t\t\t\t$product_array[$counter]['sku']=$product_additional_details->get_sku();\n\t\t\t\t\t\t\t$product_array[$counter]['weight']=$product_additional_details->get_weight();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$weight_with_unit=ConvertToAcceptedUnitPlugin($product_array[$counter]['weight'],strtolower($weight_unit));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$weight_with_unit=explode(\"~\",$weight_with_unit);\n\t\t\t\t\t\t\t$weight_counter_temp=$weight_with_unit[0];\n\t\t\t\t\t\t\t$weight_unit=$weight_with_unit[1];\n\t\t\t\t\t\t\t$product_array[$counter]['weight']=$weight_counter_temp;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$product_array[$counter]['tot_price']=number_format(($item['line_total']),2);\n\t\t\t\t\t\t\t$weight_counter += $product_array[$counter]['weight'] * $product_array[$counter]['quantity']; \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($dim_unit==\"\") \n\t\t\t\t\t\t\t$dimensions=$product_additional_details->get_dimensions();\n\t\t\t\t\t\t\tif($dimensions!=\"\" && $PkgLength==\"\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$dimensions=str_replace(\"&times;\",\"x\",$dimensions);\n\t\t\t\t\t\t\t\t$dim_temp=explode(\" x \",$dimensions);\n\t\t\t\t\t\t\t\t$length=trim($dim_temp[0]);\n\t\t\t\t\t\t\t\t$width=trim($dim_temp[1]);\n\t\t\t\t\t\t\t\t$last_part=trim($dim_temp[2]);\n\t\t\t\t\t\t\t\t$last_part_temp=explode(\" \",$last_part);\n\t\t\t\t\t\t\t\t$height=$last_part_temp[0];\n\t\t\t\t\t\t\t\t$unit=$last_part_temp[1];\n\t\t\t\t\t\t\t\t$dim_unit=convert_dim_unit_plugin($unit);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$PkgLength=$length;\n\t\t\t\t\t\t\t\t$PkgWidth=$width;\n\t\t\t\t\t\t\t\t$PkgHeight=$height; \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} \n\t\t\t\t\t\t\t$counter++;\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t$carrier_length=$counter;\n\t\t\t\t$commodities=array();\n\t\t\t\tfor($i=0; $i<$carrier_length;$i++)\n\t\t\t\t{\n\t\t\t\t\t$commodity=array('Description'=>$product_array[$i]['name'],\n\t\t\t\t\t\t\t'Quantity'=>$product_array[$i]['quantity'],\n\t\t\t\t\t\t\t'Weight'=>$product_array[$i]['weight'],\n\t\t\t\t\t\t\t'Price'=>$product_array[$i]['price'],\n\t\t\t\t\t\t\t'Currency'=>$currency_type\t\t\t\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t array_push($commodities, $commodity);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$cart_items=array();\n\t\t\t\tfor($i=0; $i<$carrier_length;$i++)\n\t\t\t\t{\n\t\t\t\t\t$cart_item=array('ItemDescription'=>$product_array[$i]['name'],\n\t\t\t\t\t\t\t'Price'=>$product_array[$i]['price'],\n\t\t\t\t\t\t\t'Quantity'=>$product_array[$i]['quantity'],\n\t\t\t\t\t\t\t'Total'=>$product_array[$i]['tot_price'],\n\t\t\t\t\t\t\t'ItemID'=>$product_array[$i]['sku']\t\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t array_push($cart_items, $cart_item);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$packages=array();\n\t\t\t\t$package=array('Weight'=>$weight_counter,\n\t\t\t\t\t\t\t'length'=>$PkgLength,\n\t\t\t\t\t\t\t'width'=>$PkgWidth,\n\t\t\t\t\t\t\t'height'=>$PkgHeight\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t array_push($packages, $package);\n\t\t\t\t\n\t\t\t\t//Get Billing Details\n\t\t\t\t$firstname = prepare_json_compatible_data(get_post_meta( $order_id, '_billing_first_name', true ));\n\t\t\t\t$lastname = prepare_json_compatible_data(get_post_meta( $order_id, '_billing_last_name', true ));\n\t\t\t\t$bill_name = $firstname.\" \".$lastname;\n\t\t\t\t$bill_address1 = prepare_json_compatible_data(get_post_meta( $order_id, '_billing_address_1', true ));\n\t\t\t\t$bill_address2 = prepare_json_compatible_data(get_post_meta( $order_id, '_billing_address_2', true ));\n\t\t\t\t$bill_city = prepare_json_compatible_data(get_post_meta( $order_id, '_billing_city', true ));\n\t\t\t\t$bill_state = get_post_meta( $order_id, '_billing_state', true );\n\t\t\t\t$bill_zip = get_post_meta( $order_id, '_billing_postcode', true );\n\t\t\t\t$bill_country = get_post_meta( $order_id, '_billing_country', true );\n\t\t\t\t$bill_phone = get_post_meta( $order_id, '_billing_phone', true );\n\t\t\t\t$bill_company = prepare_json_compatible_data(get_post_meta( $order_id, '_billing_company', true ));\n\t\t\t\t$bill_email= get_post_meta( $order_id, '_billing_email', true );\n\t\t\t\t\n\t\t\t\t//Get Shipping Details\n\t\t\t\t$ship_firstname = prepare_json_compatible_data(get_post_meta( $order_id, '_shipping_first_name', true ));\n\t\t\t\t$ship_lastname = prepare_json_compatible_data(get_post_meta( $order_id, '_shipping_last_name', true ));\n\t\t\t\t$ship_name = $ship_firstname.\" \".$ship_lastname;\n\t\t\t\t$ship_address1 = prepare_json_compatible_data(get_post_meta( $order_id, '_shipping_address_1', true ));\n\t\t\t\t$ship_address2 = prepare_json_compatible_data(get_post_meta( $order_id, '_shipping_address_2', true ));\n\t\t\t\t$ship_city = prepare_json_compatible_data(get_post_meta( $order_id, '_shipping_city', true ));\n\t\t\t\t$ship_state = get_post_meta( $order_id, '_shipping_state', true );\n\t\t\t\t$ship_zip = get_post_meta( $order_id, '_shipping_postcode', true );\n\t\t\t\t$ship_country = get_post_meta( $order_id, '_shipping_country', true );\n\t\t\t\t$ship_company =prepare_json_compatible_data( get_post_meta( $order_id, '_shipping_company', true ));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Prepare Shipment \n\t\t\t\t$shipment = array(\n\t\t\t\t\t'ShipmentId'=>\"\",\n\t\t\t\t\t'Currency'=>$currency_type,\n\t\t\t\t\t'EmailNotification'=>\"true\",\n\t\t\t\t\t'EmailNotificationAddress'=>$bill_email,\n\t\t\t\t\t'ShipTo' => array(\n\t\t\t\t\t\t\t'Name' => $ship_name, \n\t\t\t\t\t\t\t'Company' => $ship_company, \n\t\t\t\t\t\t\t'Address1' => $ship_address1, \n\t\t\t\t\t\t\t'Address2' => $ship_address2, \n\t\t\t\t\t\t\t'City' => $ship_city, \n\t\t\t\t\t\t\t'State' => $ship_state, \n\t\t\t\t\t\t\t'PostalCode' => $ship_zip, \n\t\t\t\t\t\t\t'Country' => $ship_country, \n\t\t\t\t\t\t\t'Phone' => $bill_phone\n\t\t\t\t\t),\n\t\t\t\t\t'CarrierTypeName'=>$carrier,\n\t\t\t\t\t'Packages' => $packages,\t\t\t\t\n\t\t\t\t\t'Commodities'=>$commodities,\n\t\t\t\t\t'Order'=>array(\n\t\t\t\t\t\t'OrderNum' => $order_number, \n\t\t\t\t\t\t'Total' => $total_paid_real, \n\t\t\t\t\t\t'ShippingPaidAmount' => $shipping_charges, \n\t\t\t\t\t\t'OrderDate' => $order_date,\n\t\t\t\t\t\t'ShippingServiceRequested' => $carrier,\n\t\t\t\t\t\t'Items'=>$cart_items,\n\t\t\t\t\t\t'ShipTo'=>array(\n\t\t\t\t\t\t\t\t 'Name' => $ship_name, \n\t\t\t\t\t\t\t\t'Company' => $ship_company, \n\t\t\t\t\t\t\t\t'Address1' => $ship_address1, \n\t\t\t\t\t\t\t\t'Address2' => $ship_address2, \n\t\t\t\t\t\t\t\t'City' => $ship_city, \n\t\t\t\t\t\t\t\t'State' => $ship_state, \n\t\t\t\t\t\t\t\t'PostalCode' => $ship_zip, \n\t\t\t\t\t\t\t\t'Country' => $ship_country, \n\t\t\t\t\t\t\t\t'Phone' => $bill_phone\n\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t'BillTo'=>array(\n\t\t\t\t\t\t\t\t 'Name' => $bill_name, \n\t\t\t\t\t\t\t\t'Company' => $bill_company, \n\t\t\t\t\t\t\t\t'Address1' => $bill_address1, \n\t\t\t\t\t\t\t\t'Address2' => $bill_address2, \n\t\t\t\t\t\t\t\t'City' => $bill_city, \n\t\t\t\t\t\t\t\t'State' => $bill_state, \n\t\t\t\t\t\t\t\t'PostalCode' => $bill_zip, \n\t\t\t\t\t\t\t\t'Country' => $bill_country, \n\t\t\t\t\t\t\t\t'Phone' => $bill_phone\n\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t'Currency' => $currency_type,\n\t\t\t\t\t\t\t'Comments'=>$comments\n\t\t\t\t\t ),\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t\tif($dim_unit!=\"Unknown\")\n\t\t\t\t$shipment['UnitsOfMeasureLinear']=$dim_unit;\n\t\t\t\tif($weight_unit!=\"Unknown\")\n\t\t\t\t{\n\t\t\t\t\t$shipment['UnitsOfMeasureWeight']=$weight_unit;\n\t\t\t\t\t$shipment['UnitsOfMeasureWeightName']=$weight_unit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$shipment=json_encode($shipment);\n\t\t\t\t\n\t\t\t\techo '<link href=\"//my.shiprush.com/static.shiprush.com/ship.app/api/webshipping.integration.client.css\" rel=\"stylesheet\" type=\"text/css\" />\n\t\t\t\t<script src=\"//my.shiprush.com/static.shiprush.com/ship.app/api/webshipping.integration.client.js\"></script>\n\t\t\t\t<!-- button to activate my shiprush -->';\n\t\t\t\techo $js;\n\n\t\t\t\t$js_part2 = \"<script language=\\\"javascript\\\">\n\t\t\t\t function displayError(msg)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(msg);\n\t\t\t\t\t\tconsole.log(msg);\n\t\t\t\t\t}\n\t\t\t\t\tfunction trackJSErrors(fn) {\n\t\t\t\t\t if (!fn.tracked) {\n\t\t\t\t\t\tfn.tracked = function () \n\t\t\t\t\t\t{\n\t\t\t\t\t\t try \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\treturn fn();\n\t\t\t\t\t\t } \n\t\t\t\t\t\t catch (e) \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tdisplayError(e); \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\t\n\t\t\t\t\t return fn.tracked;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar invoke_connect = trackJSErrors(function connect() {\n \n\t\t\t\tshipRushClient.Open(\n\t\t\t\t{\n\t\t\t\t\tIsSandbox: \".$ifsbox.\",\n\t\t\t\t\tReferredBy: \\\"WOOCOMMERCEPlugin-SRWeb-Build-XXXXXXX\\\",\n\t\t\t\t\tShipment: JSON.parse('\".$shipment.\"'),\n\t\t\t\t\tOnShipmentCompleted: function (data) {\n\t\t\t\t\t\t// Debugging the response.\n\t\t\t\t\t\tconsole.log(data);\n\n\t\t\t\t\t\tvar tNumber = data.Shipment.TrackingNumber; // post for tracking number and order number\n\t\t\t\t\t\tjQuery.post(window.location.href, {tnum: tNumber}); \n\t\t\t\t\t\twindow.setTimeout(function(){window.location.reload()}, 3000);\n\t\t\t\t\t\treturn true; // Return 'true' to close shipping form\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t});\n\n</script>\";\n\t\techo $js_part2;\n\t\t\t\t\n\t\t\techo '<div class=\"button\" onclick=\"invoke_connect()\"><img src=\"'.plugins_url().'/shiprush/logo.png\" height=\"24\" width=\"24\" align=left style=\"padding:1px;\">&nbsp;Ship</div>';\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "aac7f10bdb4d33a9e4c10f4aab8691a8", "score": "0.53911114", "text": "protected function isShipSunk(){\n \t$isSunk = false;\n \t$ships = $this->persistObject['ships'];\n \t\n \tfor ($i=0; $i < count($ships); $i++){\n \t\tif($ships[$i]->isHit($this->shipPosition)){\n \t\t\t$ships[$i]->removeHitCoordinate($this->shipPosition);\n \t\t\tif($ships[$i]->isSunk()){\n \t\t\t\tunset($ships[$i]);\n \t\t\t\t$isSunk = true;\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n \t}\n \t$ships = array_values($ships);\n \t$this->persistObject['ships'] = $ships;\n \t$this->saveData->save($this->persistObject);\n \t\n \treturn $isSunk;\n }", "title": "" }, { "docid": "69fc42699fa32920c2ab8a729dac89da", "score": "0.53723675", "text": "public function testSingle1TwoBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSingle1TwoBox - Test 1 item in single box with 2 possible boxes');\n\n $packages = $this->getPackages('1*SINGLE_2_MAXQTY_NODIMS_7LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],1*7);\n $this->ensurePackagePrice($packages[0],1*16);\n }", "title": "" }, { "docid": "6475ce6c0e5941412b91a0c25b901f21", "score": "0.536556", "text": "public function ship($parcel) {\n\t\t// send\n\t\treturn true;\n\t}", "title": "" }, { "docid": "85cc7aa5ec8ff1a989616297068a2ba0", "score": "0.5354258", "text": "public function IsShipSunk () : bool\n {\n if($this->health <= 0) {\n return false;\n }\n\t\treturn true;\n }", "title": "" }, { "docid": "45386633d1b5e0fae3431690844fe4ac", "score": "0.53466153", "text": "public function testSingle6TwoDimBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSingle6TwoDimBox - Test 6 dim items in 2 poss boxes ');\n\n $packages = $this->getPackages('6*SING_2_VOL_5LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],6*5);\n $this->ensurePackagePrice($packages[0],6*17);\n }", "title": "" }, { "docid": "0c32847c6e5ea25e153451e3b9c29794", "score": "0.52299917", "text": "public function hasBoundingBox(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "bc39198eabd58612c39d2f47da3afc71", "score": "0.5207216", "text": "function all_ships_placed($myinfo)\n\t{\n\t\tfor ($i = 1; $i <= 5; $i++)\n\t\t{\n\t\t\t$placed = $i . 'placed';\n\t\t\tif (!$myinfo[$placed])\n\t\t\t\tbreak;\n\t\t\telse if ($i == 5)\n\t\t\t{\n\t\t\t\t$success = 'all_placed';\n\t\t\t\t$sql = sprintf(\"UPDATE users SET ingame=2, turn=1 WHERE uid='%s'\",$_SESSION[\"uid\"]);\n\t\t\t\tmysql_query($sql);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3d64274b4142eb98037775d16d2563a7", "score": "0.5202717", "text": "public function testSingle15TwoBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSingle15TwoBox - Test 5 item in single box with 2 possible boxes');\n\n $packages = $this->getPackages('15*SINGLE_2_MAXQTY_NODIMS_7LB');\n\n $this->ensurePackageSize($packages,3);\n $this->ensurePackageWeight($packages[0],6*7);\n $this->ensurePackagePrice($packages[0],6*16);\n $this->ensurePackageWeight($packages[1],6*7);\n $this->ensurePackagePrice($packages[1],6*16);\n $this->ensurePackageWeight($packages[2],3*7);\n $this->ensurePackagePrice($packages[2],3*16);\n }", "title": "" }, { "docid": "9dab2d7acc620357ba8f99da6e3d1233", "score": "0.5177633", "text": "public function testSendAsStandardBox() {\n\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSendAsStandardBox - Cant box it as to large, so send as standard' );\n $packages = $this->getPackages('1*SML_80LB_1PKG_1BOX');\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageTotalWeight($packages,1*80);\n $this->ensurePackageTotalPrice($packages,1*12);\n $this->ensurePackageWeight($packages[0],80);\n $this->ensurePackagePrice($packages[0],12);\n $this->ensurePackageDimensions($packages[0],array(0,0,0));\n }", "title": "" }, { "docid": "9be4bdba7829e4ad73ac34b1e0014f9e", "score": "0.5108325", "text": "public function testMultiItemShippingBoxes1Item() {\n\n Mage::helper('webshopapps_wsatestframework/log')->\n debug('testMultiItemShippingBoxes1Item - Test if 1 item set to same box with same quantity, pack in small box');\n\n $packages = $this->getPackages('1*MULTI_ITEM_A');\n $this->ensurePackageSize($packages,1);\n\n $this->ensurePackageWeight($packages[0],1);\n $this->ensurePackageTotalWeight($packages,1);\n $this->ensurePackageDimensions($packages[0],array(9,9,9));\n }", "title": "" }, { "docid": "258f3cccdf8994011fed0b5887cd85a6", "score": "0.507259", "text": "function isScalene($side1, $side2, $side3)\r\n {\r\n if ($side1 != $side2 && $side2 != $side3 && $side1 != $side3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "66e387647cb5ed9f9c396ed0bb4d8237", "score": "0.50510126", "text": "public function isPlaced() : bool\n {\n return isset($this->leftNum) && isset($this->rightNum);\n }", "title": "" }, { "docid": "102284a8cfcbc216e7e78b9bbc46704c", "score": "0.503559", "text": "public function testMultiItemShippingBoxes2items() {\n\n Mage::helper('webshopapps_wsatestframework/log')->\n debug('testMultiItemShippingBoxes2items - Test if 2 items set to same box with same quantity, pack in qty 2 box');\n\n $packages = $this->getPackages('1*MULTI_ITEM_A,1*MULTI_ITEM_B');\n $this->ensurePackageSize($packages,1);\n\n $this->ensurePackageWeight($packages[0],2);\n $this->ensurePackageTotalWeight($packages,2);\n $this->ensurePackageDimensions($packages[0],array(10,10,10));\n }", "title": "" }, { "docid": "3155011790b4f8c5ce04fbb77d3dddaf", "score": "0.50346524", "text": "function check_ships(){\n\t$arr_field_1 = $_SESSION['field_1'];\n\t$ships = array();\t\n\n\tforeach ($arr_field_1 as $key => $value) {\n\t\t$go = 0;\n\n\t\t/* check for replay */\n\t\tforeach ($ships as $value_2) {\n\t\t\tforeach ($value_2 as $value_3) {\n\t\t\t\tif ($key === $value_3) {\n\t\t\t\t\t$go = 1; // replay\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* get ships */\n\t\tif ($go !== 1) {\n\t\t\t$k_0 = str_replace('s', '', $key);\n\t\t\t$k = $k_0;\n\n\t\t\t/* vertical */\n\t\t\t$ship = array();\n\t\t\t$k_2 = $k - 10;\n\n\t\t\tif ($value === 'on' && $arr_field_1['s' . $k_2] !== 'on') {\n\t\t\t\t$ship[] = 's' . $k;\n\t\t\t\t\n\t\t\t\t$k = $k + 10;\n\t\t\t\tif ($k < 45 && $arr_field_1['s' . $k] === 'on') {\n\t\t\t\t\t$ship[] = 's' . $k;\n\n\t\t\t\t\t$k = $k + 10;\n\t\t\t\t\tif ($k < 45 && $arr_field_1['s' . $k] === 'on') {\n\t\t\t\t\t\t$ship[] = 's' . $k;\n\t\t\t\t\t\t$ships[3] = $ship;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ships[2] = $ship;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t/* horisontal */\n\t\t\t\t\t$k = $k_0;\n\t\t\t\t\t$k_2 = $k - 1;\n\n\t\t\t\t\tif ($arr_field_1['s' . $k_2] !== 'on') {\n\t\t\t\t\t\t$go = 10 < $k && $k < 15 || 20 < $k && $k < 25 || 30 < $k && $k < 35 || 40 < $k && $k < 45;\n\t\t\t\t\t\t$k = $k + 1;\n\n\t\t\t\t\t\tif ($go && $arr_field_1['s' . $k] === 'on') {\n\t\t\t\t\t\t\t$ship[] = 's' . $k;\n\n\t\t\t\t\t\t\t$k = $k + 1;\n\t\t\t\t\t\t\tif ($go && $arr_field_1['s' . $k] === 'on') {\n\t\t\t\t\t\t\t\t$ship[] = 's' . $k;\n\t\t\t\t\t\t\t\t$ships[3] = $ship;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$ships[2] = $ship;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$ships[1] = $ship;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tksort($ships);\n\n\treturn $ships;\n}", "title": "" }, { "docid": "e63affd6fd8f7e0822f24ae66eb1adb8", "score": "0.50081664", "text": "public function hasOverlap(){\n return $this->_has(8);\n }", "title": "" }, { "docid": "8eba42323214dbf17407864a4edc4834", "score": "0.500353", "text": "public function testMulti1Box1LocalBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testMultiCombBox1 - Multi items, same box, merged together');\n\n $packages = $this->getPackages('1*SING_2_VOL_5LB,1*DEFAULTBOX_6LB_MAXQTY_5');\n\n $this->ensurePackageTotalPrice($packages,1*17+1*25);\n $this->ensurePackageTotalWeight($packages,1*5+1*6);\n $this->ensurePackageSize($packages,2);\n\n $this->ensurePackageWeight($packages[1],1*6);\n $this->ensurePackagePrice($packages[1],1*25);\n $this->ensurePackageWeight($packages[0],1*5);\n $this->ensurePackagePrice($packages[0],1*17);\n }", "title": "" }, { "docid": "e117ba65501f5bf7cfbfaba2b48d755e", "score": "0.49944118", "text": "private function generateShips() {\n\t\t// Iterate through the types of ships.\n\t\tforeach( self::SHIPS as $ship => $props ) {\n\t\t\t$shipSize = $props['cells'];\n\t\t\t$shipMarker = $ship;\n\t\t\t$i = 0;\n\n\t\t\t// Try to place each ship a certain number of times.\n\t\t\twhile ( $i < $props['count'] ) {\n\t\t\t\t$shipPlacement = $this->findPlaceOnBoard($shipSize);\n\n\t\t\t\t// Set the maximum number of tries for placing a ship.\n\t\t\t\t$count = 0;\n\t\t\t\t$maxCount = 100;\n\n\t\t\t\t// If the generated position is not suitable - try again until succeed.\n\t\t\t\twhile ( !$this->checkForSafePlacement($shipMarker, $shipSize, $shipPlacement[\"start_x\"], $shipPlacement[\"start_y\"], $shipPlacement[\"orientation\"])) {\n\t\t\t\t\tif ( $count > $maxCount ) {\n\t\t\t\t\t\t// If we exceed the allowed number of tries - let's regenerate all ships from the start once again.\n\t\t\t\t\t\t$this->resetBoard();\n\t\t\t\t\t\t$this->generateShips();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If the allowed number of tries isn't exceeded - try to find a place on the board.\n\t\t\t\t\t\t$shipPlacement = $this->findPlaceOnBoard($shipSize);\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Once successfully generated, put the ship on the board.\n\t\t\t\t$this->occupySpaceOnBoard($shipSize, $shipMarker, $shipPlacement[\"start_x\"], $shipPlacement[\"start_y\"], $shipPlacement[\"orientation\"], $i);\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "acaeb7a35520a6467793f77994240956", "score": "0.49913025", "text": "public function testSingle27DimBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSingle27DimBox - 27 items, a dimensional box');\n\n $packages = $this->getPackages('27*SINGLE_2_MAXQTY_NODIMS_7LB');\n\n $this->ensurePackageTotalPrice($packages,27*16);\n $this->ensurePackageTotalWeight($packages,27*7);\n\n\n $this->ensurePackageSize($packages,3);\n $this->ensurePackageWeight($packages[0],9*7);\n $this->ensurePackagePrice($packages[0],9*16);\n $this->ensurePackageDimensions($packages[0],array(5,5,3));\n\n $this->ensurePackageWeight($packages[1],9*7);\n $this->ensurePackagePrice($packages[1],9*16);\n $this->ensurePackageDimensions($packages[1],array(5,5,3));\n\n $this->ensurePackageWeight($packages[2],9*7);\n $this->ensurePackagePrice($packages[2],9*16);\n $this->ensurePackageDimensions($packages[2],array(5,5,3));\n\n }", "title": "" }, { "docid": "261da83bd6e8fa28ed67594cf9145a26", "score": "0.4943543", "text": "public function placeTower($x, $y, $z, $direction1 = self::DIRECTION_PLUSX, $direction2 = self::DIRECTION_PLUSZ)\n {\n BuildingUtils::walls($this->level, new Vector3($x + 2, $y, $z + 2), new Vector3($x - 2, $y + 8, $z - 2), Block::get(Block::SANDSTONE));\n //Clear insides\n BuildingUtils::fill($this->level, new Vector3($x + 1, $y + 1, $z + 1), new Vector3($x - 1, $y + 7, $z - 1), Block::get(Block::AIR));\n switch ($direction1) {\n case self::DIRECTION_PLUSX : // x+ (0)\n // Stairs\n switch ($direction2) {\n case self::DIRECTION_PLUSZ :\n for ($zz = $z + 1; $zz >= $z; $zz--) {\n $this->placeBlock($x - 1, $y + 1, $zz);\n $this->placeBlock($x - 1, $y + 2, $zz);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 2);\n $this->placeBlock($x, $y + 1, $z + 1);\n $this->placeSlab($x, $y + 2, $z + 1);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x - 1, $y + $h, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + $h, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x - 1, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + $h, $z + 2, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 1, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + 7, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + 7, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + 7, $z + 2, Block::SANDSTONE, 2);\n\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x - 9, $y + 5, $z - 4), new Vector3($x - 7, $y + 7, $z - 5), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x - 8, $y + 5, $z - 4), new Vector3($x - 8, $y + 6, $z - 5), Block::get(Block::AIR));\n break;\n case self::DIRECTION_MINZ :\n for ($zz = $z - 1; $zz <= $z; $zz++) {\n $this->placeBlock($x - 1, $y + 1, $zz);\n $this->placeBlock($x - 1, $y + 2, $zz);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 3);\n $this->placeBlock($x, $y + 1, $z - 1);\n $this->placeSlab($x, $y + 2, $z - 1);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x - 1, $y + $h, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + $h, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x - 1, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + $h, $z - 2, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 1, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + 7, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + 7, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + 7, $z - 2, Block::SANDSTONE, 2);\n break;\n }\n\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x - 9, $y + 5, $z + 4), new Vector3($x - 7, $y + 7, $z + 5), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x - 8, $y + 5, $z + 4), new Vector3($x - 8, $y + 6, $z + 5), Block::get(Block::AIR));\n\n // Finishing stairs system\n $this->placeBlock($x - 2, $y + 3, $z, Block::SANDSTONE_STAIRS, 1);\n $this->placeBlock($x - 3, $y + 4, $z, Block::SANDSTONE_STAIRS, 1);\n $this->placeBlock($x - 2, $y + 4, $z, Block::AIR);\n $this->placeBlock($x - 2, $y + 5, $z, Block::AIR);\n $this->placeBlock($x - 2, $y + 6, $z, Block::AIR);\n // Making path from stairs to first floor.\n BuildingUtils::fill($this->level, new Vector3($x - 3, $y, $z + 1 + ($direction2 === self::DIRECTION_PLUSZ ? 2 : 0)), new Vector3($x - 8, $y + 4, $z - 1 + ($direction2 === self::DIRECTION_MINZ ? -2 : 0)), Block::get(Block::SANDSTONE));\n\n // Other side pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x + 2, $y + $h, $z + 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + $h, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + $h, $z, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x + 2, $y + $h, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + $h, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + $h, $z, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x + 2, $y + 6, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 6, $z, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 6, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 7, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + 7, $z, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + 7, $z + 1, Block::SANDSTONE, 2);\n break;\n\n case self::DIRECTION_MINX : // x- (1)\n // Stairs\n switch ($direction2) {\n case self::DIRECTION_PLUSZ :\n for ($zz = $z + 1; $zz >= $z; $zz--) {\n $this->placeBlock($x + 1, $y + 1, $zz);\n $this->placeBlock($x + 1, $y + 2, $zz);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 2);\n $this->placeBlock($x, $y + 1, $z + 1);\n $this->placeSlab($x, $y + 2, $z + 1);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x - 1, $y + $h, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + $h, $z + 2, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 1, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + 7, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + 7, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + 7, $z + 2, Block::SANDSTONE, 2);\n\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x + 9, $y + 5, $z - 4), new Vector3($x + 7, $y + 7, $z - 5), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x + 8, $y + 5, $z - 4), new Vector3($x + 8, $y + 6, $z - 5), Block::get(Block::AIR));\n break;\n case self::DIRECTION_MINZ :\n for ($zz = $z - 1; $zz <= $z; $zz++) {\n $this->placeBlock($x + 1, $y + 1, $zz);\n $this->placeBlock($x + 1, $y + 2, $zz);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 3);\n $this->placeBlock($x, $y + 1, $z - 1);\n $this->placeSlab($x, $y + 2, $z - 1);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x - 1, $y + $h, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + $h, $z - 2, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 1, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + 6, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + 6, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + 6, $z - 2, Block::SANDSTONE, 2);\n\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x + 9, $y + 5, $z + 4), new Vector3($x + 7, $y + 7, $z + 5), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x + 8, $y + 5, $z + 4), new Vector3($x + 8, $y + 6, $z + 5), Block::get(Block::AIR));\n break;\n }\n\n // Finishing stairs system\n $this->placeBlock($x + 2, $y + 3, $z, Block::SANDSTONE_STAIRS, 0);\n $this->placeBlock($x + 3, $y + 4, $z, Block::SANDSTONE_STAIRS, 0);\n $this->placeBlock($x + 2, $y + 4, $z, Block::AIR);\n $this->placeBlock($x + 2, $y + 5, $z, Block::AIR);\n $this->placeBlock($x + 2, $y + 6, $z, Block::AIR);\n // Making path from stairs to first floor.\n BuildingUtils::fill($this->level, new Vector3($x + 3, $y, $z + 1 + ($direction2 === self::DIRECTION_PLUSZ ? 2 : 0)), new Vector3($x + 8, $y + 4, $z - 1 + ($direction2 === self::DIRECTION_MINZ ? -2 : 0)), Block::get(Block::SANDSTONE));\n\n // Other side pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x - 2, $y + $h, $z + 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + $h, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + $h, $z, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x - 2, $y + $h, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + $h, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + $h, $z, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 2, $y + 6, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 6, $z, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 6, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 7, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + 7, $z, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + 7, $z + 1, Block::SANDSTONE, 2);\n break;\n\n case self::DIRECTION_PLUSZ : // z+ (2)\n // Stairs\n switch ($direction2) {\n case self::DIRECTION_PLUSX :\n for ($xx = $x + 1; $xx >= $x; $xx--) {\n $this->placeBlock($xx, $y + 1, $z - 1);\n $this->placeBlock($xx, $y + 2, $z - 1);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 0);\n $this->placeBlock($x + 1, $y + 1, $z);\n $this->placeSlab($x + 1, $y + 2, $z);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x + 2, $y + $h, $z + 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + $h, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + $h, $z, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x + 2, $y + $h, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + $h, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + $h, $z, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x + 2, $y + 6, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 6, $z, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 6, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 7, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + 7, $z, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + 7, $z + 1, Block::SANDSTONE, 2);\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x - 4, $y + 5, $z - 9), new Vector3($x - 5, $y + 7, $z - 7), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x - 4, $y + 5, $z - 8), new Vector3($x - 5, $y + 6, $z - 8), Block::get(Block::AIR));\n break;\n case self::DIRECTION_MINX :\n for ($xx = $x - 1; $xx <= $x; $xx++) {\n $this->placeBlock($xx, $y + 1, $z - 1);\n $this->placeBlock($xx, $y + 2, $z - 1);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 1);\n $this->placeBlock($x - 1, $y + 1, $z);\n $this->placeSlab($x - 1, $y + 2, $z);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x - 2, $y + $h, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + $h, $z + 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + $h, $z, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x - 2, $y + $h, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + $h, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + $h, $z, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 2, $y + 6, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 6, $z, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 6, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 7, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + 7, $z, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + 7, $z + 1, Block::SANDSTONE, 2);\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x + 4, $y + 5, $z - 9), new Vector3($x + 5, $y + 7, $z - 7), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x + 4, $y + 5, $z - 8), new Vector3($x + 5, $y + 6, $z - 8), Block::get(Block::AIR));\n break;\n }\n\n // Finishing stairs system\n $this->placeBlock($x, $y + 3, $z - 2, Block::SANDSTONE_STAIRS, 3);\n $this->placeBlock($x, $y + 4, $z - 3, Block::SANDSTONE_STAIRS, 3);\n $this->placeBlock($x, $y + 4, $z - 2, Block::AIR);\n $this->placeBlock($x, $y + 5, $z - 2, Block::AIR);\n $this->placeBlock($x, $y + 6, $z - 2, Block::AIR);\n // Making path from stairs to first floor.\n BuildingUtils::fill($this->level, new Vector3($x + 1 + ($direction2 === self::DIRECTION_PLUSX ? 2 : 0), $y, $z - 3), new Vector3($x - 1 + ($direction2 === self::DIRECTION_MINX ? -2 : 0), $y + 4, $z - 8), Block::get(Block::SANDSTONE));\n\n // Other side pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x - 1, $y + $h, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + $h, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + $h, $z + 2, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 1, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + 6, $z + 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + 7, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + 7, $z + 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + 7, $z + 2, Block::SANDSTONE, 2);\n break;\n\n case self::DIRECTION_MINZ : // z- (3)\n // Stairs\n switch ($direction2) {\n case self::DIRECTION_PLUSX :\n for ($xx = $x + 1; $xx >= $x; $xx--) {\n $this->placeBlock($xx, $y + 1, $z + 1);\n $this->placeBlock($xx, $y + 2, $z + 1);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 0);\n $this->placeBlock($x + 1, $y + 1, $z);\n $this->placeSlab($x + 1, $y + 2, $z);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x + 2, $y + $h, $z + 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + $h, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + $h, $z, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x + 2, $y + $h, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + $h, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + $h, $z, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x + 2, $y + 6, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 6, $z, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 6, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 2, $y + 7, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + 7, $z, Block::SANDSTONE, 2);\n $this->placeBlock($x + 2, $y + 7, $z + 1, Block::SANDSTONE, 2);\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x - 4, $y + 5, $z + 9), new Vector3($x - 5, $y + 7, $z + 7), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x - 4, $y + 5, $z + 8), new Vector3($x - 5, $y + 6, $z + 8), Block::get(Block::AIR));\n break;\n case self::DIRECTION_MINX :\n for ($xx = $x - 1; $xx <= $x; $xx++) {\n $this->placeBlock($xx, $y + 1, $z + 1);\n $this->placeBlock($xx, $y + 2, $z + 1);\n }\n $this->placeBlock($x, $y + 1, $z, Block::SANDSTONE_STAIRS, 1);\n $this->placeBlock($x - 1, $y + 1, $z);\n $this->placeSlab($x - 1, $y + 2, $z);\n // Pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x - 2, $y + $h, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + $h, $z + 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + $h, $z, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x - 2, $y + $h, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + $h, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + $h, $z, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 2, $y + 6, $z - 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 6, $z, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 6, $z + 1, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 2, $y + 7, $z - 1, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + 7, $z, Block::SANDSTONE, 2);\n $this->placeBlock($x - 2, $y + 7, $z + 1, Block::SANDSTONE, 2);\n // Building entrance to second floor. //TODO\n BuildingUtils::fill($this->level, new Vector3($x + 4, $y + 5, $z + 9), new Vector3($x + 5, $y + 7, $z + 7), Block::get(Block::SANDSTONE, 2));\n BuildingUtils::fill($this->level, new Vector3($x + 4, $y + 5, $z + 8), new Vector3($x + 5, $y + 6, $z + 8), Block::get(Block::AIR));\n break;\n }\n\n // Finishing stairs system\n $this->placeBlock($x, $y + 3, $z + 2, Block::SANDSTONE_STAIRS, 2);\n $this->placeBlock($x, $y + 4, $z + 3, Block::SANDSTONE_STAIRS, 2);\n $this->placeBlock($x, $y + 4, $z + 2, Block::AIR);\n $this->placeBlock($x, $y + 5, $z + 2, Block::AIR);\n $this->placeBlock($x, $y + 6, $z + 2, Block::AIR);\n // Making path from stairs to first floor.\n BuildingUtils::fill($this->level, new Vector3($x + 1 + ($direction2 === self::DIRECTION_PLUSX ? 2 : 0), $y, $z + 3), new Vector3($x - 1 + ($direction2 === self::DIRECTION_MINX ? -2 : 0), $y + 4, $z + 8), Block::get(Block::SANDSTONE));\n\n // Other side pattern\n foreach ([\n 1,\n 2,\n 4\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x - 1, $y + $h, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n }\n foreach ([\n 3,\n 5\n ] as $h) {\n $this->placeBlock($x + 1, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + $h, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + $h, $z - 2, Block::SANDSTONE, 1);\n }\n $this->placeBlock($x - 1, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x + 1, $y + 6, $z - 2, Block::STAINED_HARDENED_CLAY, 1);\n $this->placeBlock($x - 1, $y + 7, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x, $y + 7, $z - 2, Block::SANDSTONE, 2);\n $this->placeBlock($x + 1, $y + 7, $z - 2, Block::SANDSTONE, 2);\n break;\n }\n\n // Making top\n BuildingUtils::top($this->level, new Vector3($x - 1, $y + 9, $z - 1), new Vector3($x + 1, $y, $z + 1), Block::get(Block::SANDSTONE));\n $this->placeBlock($x - 2, $y + 9, $z, Block::SANDSTONE_STAIRS, 0);\n $this->placeBlock($x + 2, $y + 9, $z, Block::SANDSTONE_STAIRS, 1);\n $this->placeBlock($x, $y + 9, $z - 2, Block::SANDSTONE_STAIRS, 2);\n $this->placeBlock($x, $y + 9, $z + 2, Block::SANDSTONE_STAIRS, 3);\n }", "title": "" }, { "docid": "1805235a40fb0443eed517dd7b3bd19e", "score": "0.48918316", "text": "private function checkCollision(): void\n {\n if ($this->getBestLift(999) == -1) {\n $this->OneMore('+30 seconds');\n }\n }", "title": "" }, { "docid": "6ee10abc4daa6e1da64bb310b66d5af6", "score": "0.48889986", "text": "public function is_partially_shipped() {\n\t\tif ($this->shipped === true) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$partially_shipped = false;\n\t\tforeach ($this->get_delivery_items() as $item) {\n\t\t\tif ($item->shipment_item_id > 0) {\n\t\t\t\t$partially_shipped = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $partially_shipped;\n\t}", "title": "" }, { "docid": "301c367569257f91803250fd514bfd7f", "score": "0.48823416", "text": "public function testMultiCombBox1Opp() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testMultiCombBox1 - Multi items, same box, merged together');\n\n $packages = $this->getPackages('4*DEFAULTBOX_5LB_MAXQTY_2,2*DEFAULTBOX_6LB_MAXQTY_5');\n\n $this->ensurePackageTotalPrice($packages,4*4+2*25);\n $this->ensurePackageTotalWeight($packages,4*5+2*6);\n $this->ensurePackageSize($packages,3);\n $this->ensurePackageWeight($packages[0],2*5);\n $this->ensurePackagePrice($packages[0],2*4);\n $this->ensurePackageWeight($packages[1],2*5);\n $this->ensurePackagePrice($packages[1],2*4);\n $this->ensurePackageWeight($packages[2],2*6);\n $this->ensurePackagePrice($packages[2],2*25);\n }", "title": "" }, { "docid": "e8669688b62bc157eaa02bbaedfe962d", "score": "0.48750213", "text": "public function isHit();", "title": "" }, { "docid": "e8669688b62bc157eaa02bbaedfe962d", "score": "0.48750213", "text": "public function isHit();", "title": "" }, { "docid": "e8669688b62bc157eaa02bbaedfe962d", "score": "0.48750213", "text": "public function isHit();", "title": "" }, { "docid": "ac37d1c44fa52794f1fe7fcc84ecfbaf", "score": "0.48688984", "text": "function Box($start_point, $end_point) {\n #echo \"Box Constructor<br/>\";\n #echo \"P1={\" . $start_point->lat . \",\" . $start_point->lng . \"}<br/>\"; \n #echo \"P2={\" . $end_point->lat . \",\" . $end_point->lng . \"}<br/>\";\n $midpoint = $this->findMidpoint($start_point, $end_point);\n #echo \"P3={\" . $midpoint->lat . \",\" . $midpoint->lng . \"}<br/>\";\n $slope = $this->findSlope($start_point, $end_point);\n $distance = $midpoint->getDistanceMiles($start_point);\n #echo \"new distance is $distance<br/>\";\n //$p1 = $this->findP1($slope, $midpoint, $distance/4);\n $p1 = $this->gP1($slope, $start_point, $end_point);\n #echo \"P4={\" . $p1->lat . \",\" . $p1->lng . \"}<br/>\";\n $p2 = $this->gP2($slope, $start_point, $end_point);\n //$p2 = $this->findP2($slope, $midpoint, $distance/4);\n #echo \"P5={\" . $p2->lat . \",\" . $p2->lng . \"}<br/>\";\n $y = array($start_point->lat, $end_point->lat, $p1->lat, $p2->lat);\n $x = array($start_point->lng, $end_point->lng, $p1->lng, $p2->lng);\n $this->top = max($y);\n $this->bottom = min($y);\n $this->left = min($x);\n $this->right = max($x);\n }", "title": "" }, { "docid": "de55ccbd48d0c8240d5ff90ad5ca8bfe", "score": "0.48595002", "text": "private function withinBoard($x, $y) {\n\t\tif ( $x < 0 || $x >= self::SIZE || $y < 0 || $y >= self::SIZE ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fb86da2f11c4cca807d8b472d1ef67c7", "score": "0.48588148", "text": "public function testCanChangeBorderType()\n {\n $gameLogic = new GameLogic(new ConwayRule());\n $board = new Board(10, 10, 50, true);\n\n // solid border\n $board->setField(9, 4, true);\n $board->setField(9, 5, true);\n $board->setField(9, 6, true);\n $this->assertEquals(3, $board->getAmountCellsAlive());\n $gameLogic->calculateNextBoard($board);\n\n $this->assertEquals(2, $board->getAmountCellsAlive());\n $this->assertTrue($board->getFieldStatus(9, 5));\n $this->assertTrue($board->getFieldStatus(8, 5));\n\n $gameLogic->calculateNextBoard($board);\n $this->assertEquals(0, $board->getAmountCellsAlive());\n\n\n // passthrough border\n $board->resetBoard();\n $board->setHasBorder(false);\n\n $board->setField(9, 4, true);\n $board->setField(9, 5, true);\n $board->setField(9, 6, true);\n $this->assertEquals(3, $board->getAmountCellsAlive());\n $gameLogic->calculateNextBoard($board);\n\n $this->assertEquals(3, $board->getAmountCellsAlive());\n $this->assertTrue($board->getFieldStatus(0, 5));\n $this->assertTrue($board->getFieldStatus(9, 5));\n $this->assertTrue($board->getFieldStatus(8, 5));\n\n $gameLogic->calculateNextBoard($board);\n $this->assertEquals(3, $board->getAmountCellsAlive());\n $this->assertTrue($board->getFieldStatus(9, 4));\n $this->assertTrue($board->getFieldStatus(9, 5));\n $this->assertTrue($board->getFieldStatus(9, 6));\n }", "title": "" }, { "docid": "03cb6b21984cc3f0c111dac41cf58f5b", "score": "0.4857071", "text": "public function testSingle30TwoBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSingle30TwoBox - Test 30 items in 2 poss boxes - exceeds rules of 25 max');\n\n $packages = $this->getPackages('30*SINGLE_2_MAXQTY_NODIMS_7LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],30*7);\n $this->ensurePackagePrice($packages[0],30*16);\n }", "title": "" }, { "docid": "df2bab94f9bec18520ce366640a46ea5", "score": "0.48498455", "text": "public function box() : array;", "title": "" }, { "docid": "036ebd38eeaf16d8cfaaafa9aa86613d", "score": "0.4838778", "text": "public function testMultiple1Qty2Items1Box() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testMultiple1Qty2Items1Box - 1 of each 2 Items in same box');\n\n $packages = $this->getPackages('1*BOXA_5LB,1*BOXA_6LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],5+6);\n $this->ensurePackagePrice($packages[0],4+25);\n }", "title": "" }, { "docid": "06bc9a0bdb28cc910ec6ca364d4c0be3", "score": "0.48203593", "text": "public function getShip()\n {\n return $this->Ship;\n }", "title": "" }, { "docid": "141ea7d94c9ee43d6d03dc1bd71b76b5", "score": "0.48154986", "text": "public function hasBoxId()\n {\n return $this->BoxId !== null;\n }", "title": "" }, { "docid": "7da0ec03d7237782e4a82e93f5950362", "score": "0.4814515", "text": "public function testSingle15OneBox() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testSingle15OneBox - Test 15 items in 1 boxes - exceeds rules of 12 max');\n\n $packages = $this->getPackages('15*SINGLE_MAXQTY_4_NODIMS_5LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],15*5);\n $this->ensurePackagePrice($packages[0],15*12);\n }", "title": "" }, { "docid": "24791b3b9ad5e2d198af40bb184c240d", "score": "0.48068056", "text": "public function testMultiCombBox1() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testMultiCombBox1 - Multi items, same box, merged together');\n\n $packages = $this->getPackages('2*DEFAULTBOX_6LB_MAXQTY_5,4*DEFAULTBOX_5LB_MAXQTY_2');\n\n $this->ensurePackageTotalPrice($packages,4*4+2*25);\n $this->ensurePackageTotalWeight($packages,4*5+2*6);\n $this->ensurePackageSize($packages,3);\n $this->ensurePackageWeight($packages[0],2*6+1*5);\n $this->ensurePackagePrice($packages[0],2*25+1*4);\n $this->ensurePackageWeight($packages[1],2*5);\n $this->ensurePackagePrice($packages[1],2*4);\n $this->ensurePackageWeight($packages[2],1*5);\n $this->ensurePackagePrice($packages[2],1*4);\n }", "title": "" }, { "docid": "c1f2748230197f0e296f77a21e9d76b5", "score": "0.4785911", "text": "public function isOccupying($x, $y) {\n\t\treturn ( $x >= $this->position_x\n\t\t\t\t&& $x < $this->position_x + $this->width\n\t\t\t\t&& $y >= $this->position_y\n\t\t\t\t&& $y < $this->position_y + $this->height);\n\t}", "title": "" }, { "docid": "e2d1564d98cd7c7e5545b1b52f32bd58", "score": "0.47840092", "text": "abstract protected function _closeBox();", "title": "" }, { "docid": "7b224ed61e3709edeec0a18955158fee", "score": "0.47828346", "text": "protected function isGameOver(){\n \treturn empty($this->getData()['ships']);\n }", "title": "" }, { "docid": "65e3b40794fafdd0eeda068047deda7c", "score": "0.47703028", "text": "public function testMultiple2Qty2Items1Box() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testMultiple2Qty2Items1Box - 2 of each 2 Items in same box, max 4 qty');\n\n $packages = $this->getPackages('2*BOXA_5LB,2*BOXA_6LB');\n\n $this->ensurePackageSize($packages,1);\n $this->ensurePackageWeight($packages[0],2*5+2*6);\n $this->ensurePackagePrice($packages[0],2*4+2*25);\n }", "title": "" }, { "docid": "1d1dbeb6054438de920f08b09e5e6e5d", "score": "0.47699547", "text": "public function add_box() {\n\n if ( is_array( $this->post_type ) ) {\n foreach( $this->post_type as $post_type ) {\n $this->set_box( $post_type );\n }\n } else {\n $post_type = $this->post_type;\n $this->set_box($post_type);\n }\n }", "title": "" }, { "docid": "e66f1f6f30e9ab43ab4bde0ff75db507", "score": "0.4763712", "text": "public function isSquare() {\n return $this->getHeight() === $this->getWidth();\n }", "title": "" }, { "docid": "49c76f01634b99252328f1f8dd4702dd", "score": "0.4760213", "text": "public function markShip($y, $x, AbstractShip $ship)\n {\n $this->shipGrid[$y][$x] = $ship;\n }", "title": "" }, { "docid": "e8c0f2124cb42e33de3f2d9a3984baa0", "score": "0.47595233", "text": "protected function _processShipping()\n {\n $this->_traitProcessShipping();\n }", "title": "" }, { "docid": "56eedf2dccded2915c86e00c4afde520", "score": "0.4756364", "text": "public function boxed()\n {\n return $this->updateLastMessage(['boxed' => true]);\n }", "title": "" }, { "docid": "b942187ce0696cb46ff9686c4b00011c", "score": "0.47503376", "text": "function main()\n{\n $mainBox = new Box(22);\n $smallBox1 = new Box(0);\n $smallBox2 = new Box(0);\n\n // Creating packable products\n $doll = new Product(12.99);\n $sheet = new Product(9.99);\n $pencils = new Product(1.19);\n\n // Adds products into containers\n $smallBox1->add($doll);\n $smallBox2->add($sheet)->add($pencils);\n\n $mainBox->add($smallBox1)->add($smallBox2);\n\n // Calculating final price of a package\n echo $mainBox->getPrice() . \"\\r\\n\";\n}", "title": "" }, { "docid": "02f4f87634fabd0a22410f4004e45817", "score": "0.4746301", "text": "public function letterBox() {\n $this->_generate2(false);\n }", "title": "" }, { "docid": "dd151099d4becb3d0083da59f9e60944", "score": "0.4745728", "text": "function gcpta_grid_check() {\n\tglobal $post;\n\tif ( 'grid' != genesis_get_option( 'gcpta_loop_' . $post->post_type, 'gcpta-settings-' . $post->post_type ) || \n\t 2 == genesis_get_option( 'gcpta_grid_content_limit_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) ||\n\t\t 1 == genesis_get_option( 'gcpta_grid_content_limit_' . $post->post_type , 'gcpta-settings-' . $post->post_type ))\n\t\tremove_action( 'genesis_post_content', 'genesis_grid_loop_content' );\n}", "title": "" }, { "docid": "a3e4172f8215af5a3fe4663c5ff249b0", "score": "0.47456452", "text": "public function isMate()\n {\n $escape = 0;\n \n $pieces = $this->getPiecesByColor($this->turn);\n \n foreach ($pieces as $piece) {\n \n $legalMoves = $piece->getLegalMoves();\n \n foreach ($legalMoves as $square) {\n \n switch($piece->getIdentity()) {\n \n case Symbol::KING:\n if (in_array($square, $this->getSquares()->used->{$piece->getOppositeColor()})) {\n $escape += (int)!$this->leavesInCheck(\n $piece->setMove(\n Convert::toObject($this->getTurn(), Symbol::KING . \"x$square\")\n ));\n }\n elseif (!in_array($square, $this->getControl()->space->{$piece->getOppositeColor()})) {\n $escape += (int) !$this->leavesInCheck(\n $piece->setMove(\n Convert::toObject($this->getTurn(), Symbol::KING . $square)\n )); \n }\n break;\n\n case Symbol::PAWN:\n if (in_array($square, $this->getSquares()->used->{$piece->getOppositeColor()})) {\n $escape += (int) !$this->leavesInCheck(\n $piece->setMove(\n Convert::toObject($this->getTurn(), $piece->getFile() . \"x$square\")\n ));\n } else {\n $escape += (int) !$this->leavesInCheck(\n $piece->setMove(Convert::toObject($this->getTurn(), $square)\n ));\n }\n break;\n\n default:\n if (in_array($square, $this->getSquares()->used->{$piece->getOppositeColor()})) {\n $escape += (int) !$this->leavesInCheck(\n $piece->setMove(\n Convert::toObject($this->getTurn(), $piece->getIdentity() . \"x$square\")\n ));\n } else {\n $escape += (int) !$this->leavesInCheck(\n $piece->setMove(\n Convert::toObject($this->getTurn(), $piece->getIdentity() . $square)\n )); \n }\n break;\n }\n \n }\n \n }\n \n return $escape === 0; \n }", "title": "" }, { "docid": "9daa94e169ae1a330dcb215c9ade155b", "score": "0.47358933", "text": "public function testMultiCombBox11Local() {\n Mage::helper('webshopapps_wsatestframework/log')->debug('testMultiCombBox1 - Multi items, 2 in same box type, 1 on its own');\n\n $packages = $this->getPackages('4*DEFAULTBOX_5LB_MAXQTY_2,1*SING_2_VOL_5LB,2*DEFAULTBOX_6LB_MAXQTY_5');\n\n $this->ensurePackageTotalPrice($packages,4*4+2*25+1*17);\n $this->ensurePackageTotalWeight($packages,4*5+2*6+1*5);\n $this->ensurePackageSize($packages,4);\n\n $this->ensurePackageWeight($packages[0],2*5);\n $this->ensurePackagePrice($packages[0],2*4);\n\n $this->ensurePackageWeight($packages[1],2*5);\n $this->ensurePackagePrice($packages[1],2*4);\n\n $this->ensurePackageWeight($packages[2],2*6);\n $this->ensurePackagePrice($packages[2],2*25);\n\n $this->ensurePackageWeight($packages[3],1*5);\n $this->ensurePackagePrice($packages[3],1*17);\n }", "title": "" }, { "docid": "4f7708f08b844bb61cc4695ed3d9b67e", "score": "0.47214508", "text": "public function isSingleBlock();", "title": "" }, { "docid": "8a62a56548053f76ede36e69ba864a37", "score": "0.47064698", "text": "public function testCreateShipment()\n {\n }", "title": "" }, { "docid": "5120d90e285044a845f77ede5d906e42", "score": "0.47041616", "text": "abstract public function checkCollisionAt( $x, $y );", "title": "" }, { "docid": "0ab80848edb19c609f22675bb33633dd", "score": "0.46976018", "text": "function check(){\n for ($x = 0; isset($this->carte[$x]); $x++){\n for ($y = 0; isset($this->carte[$x][$y]); $y++){\n if ($this->carte[$x][$y] == PLAYER){\n $this->ia['x'] = $x;\n $this->ia['y'] = $y;\n }\n if ($this->carte[$x][$y] == SORTIE){\n $this->sortie['x'] = $x;\n $this->sortie['y'] = $y;\n }\n }\n }\n }", "title": "" }, { "docid": "3f2494dfc9eb724972f91907421ed59c", "score": "0.46924245", "text": "public function createPartialShipments()\n {\n $order = OrderBuilder::anOrder()->withProducts(\n ProductBuilder::aSimpleProduct()->withSku('foo'),\n ProductBuilder::aSimpleProduct()->withSku('bar')\n )->withCart(\n CartBuilder::forCurrentSession()\n ->withSimpleProduct('foo', 2)\n ->withSimpleProduct('bar', 3)\n )->build();\n $this->orderFixture = new OrderFixture($order);\n\n $orderItemIds = [];\n /** @var OrderItemInterface $orderItem */\n foreach ($order->getAllVisibleItems() as $orderItem) {\n $orderItemIds[$orderItem->getSku()] = $orderItem->getItemId();\n }\n\n $shipmentFixture = new ShipmentFixture(\n ShipmentBuilder::forOrder($order)\n ->withItem($orderItemIds['foo'], 2)\n ->withItem($orderItemIds['bar'], 2)\n ->build()\n );\n\n self::assertInstanceOf(ShipmentInterface::class, $this->shipmentRepository->get($shipmentFixture->getId()));\n self::assertTrue($order->canShip());\n\n $shipmentFixture = new ShipmentFixture(\n ShipmentBuilder::forOrder($order)\n ->withItem($orderItemIds['bar'], 1)\n ->build()\n );\n\n self::assertInstanceOf(ShipmentInterface::class, $this->shipmentRepository->get($shipmentFixture->getId()));\n self::assertFalse($order->canShip());\n }", "title": "" }, { "docid": "fb6586f85d7d412990f42773d730cc4c", "score": "0.4690806", "text": "public function moveMinionsAndAttack(){\n foreach ($minions as $minion){\n // loop over enemy minions and see if they clash\n\n\n }\n }", "title": "" }, { "docid": "0fd0a277c900572cb9fff9a64465976a", "score": "0.46897802", "text": "public function ship()\n {\n\n // Ship order...\n\n Mail::to('[email protected]')->send(new RegistrationApproved());\n }", "title": "" }, { "docid": "1c5e2894befc70e2abf96843617d1dbd", "score": "0.46877348", "text": "public function grid()\n {\n return true;\n }", "title": "" }, { "docid": "c29fc03813c29a0b87dbe2ad59adb3e0", "score": "0.46845978", "text": "public function setBoxCount($n)\n {\n $op = $this->determineDetailOption();\n if (! $op) {\n $this->log('Cannot set box count because of the shipment type and partnered parameters.', 'Warning');\n\n return false;\n }\n if (is_numeric($n) && $n >= 1) {\n $this->options[$op.'.BoxCount'] = $n;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c12d1da3e54ae0b2333a70e720eb669d", "score": "0.46840918", "text": "public function exec_move_items()\n {\n global $System;\n\n //READ OUT PARAMETERS\n $ITEMS = $this->params['ITEMS'];\n $CONFIG = (int) $this->params['CONFIG'];\n $DISPLAY = (string) $this->params['DISPLAY'];\n $TO = $this->params['TO'];\n\n if ($TO == 'equip') {\n $INVENTORY = $System->User->Inventory->getInventory();\n\n switch ($DISPLAY) {\n case 'ship':\n $IDENTIFIER = 'ON_CONFIG_' . $CONFIG;\n\n $SLOT_TYPES = [\n \"LASER\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n ],\n \"HEAVY\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n ],\n \"GENERATOR\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n ],\n \"EXTRA\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n \"ITEMS\" => [],\n \"TYPES\" => [],\n ],\n ];\n\n foreach ($INVENTORY['SHIP']['SLOTS']['CONFIG_' . $CONFIG] as $SLOT_TYPE => $MAX_SLOTS) {\n $SLOT_TYPES[$SLOT_TYPE]['MAX'] = (int) $MAX_SLOTS;\n }\n\n foreach ($INVENTORY['CONFIG_' . $CONFIG][$IDENTIFIER] as $ITEM) {\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['IN_USE']++;\n if ($ITEM->CATEGORY == 'extra') {\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['ITEMS'][$ITEM->LOOT_ID] = $ITEM->LOOT_ID;\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['TYPES'][$ITEM->TYPE] = $ITEM->TYPE;\n }\n }\n\n foreach ($ITEMS as $ITEM) {\n $ITEM = $System->User->Inventory->getItem($ITEM['ID']);\n\n if (\n isset($SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['ITEMS'][$ITEM->LOOT_ID]) ||\n isset($SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['TYPES'][$ITEM->TYPE])\n ) {\n continue;\n }\n\n if (\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['MAX'] >\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['IN_USE']\n ) {\n if (\n $ITEM->moveToEquipment(\n $System->User->Hangars->CURRENT_HANGAR->ID,\n $CONFIG,\n ['target' => $DISPLAY]\n )\n ) {\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['IN_USE']++;\n } else {\n //http_response_code(400);\n die(json_encode([\"message\" => \"Something went wrong while moveing the Item!\"]));\n }\n } else {\n break;\n }\n }\n break;\n case 'drone':\n $IDENTIFIER = 'ON_DRONE_ID_' . $CONFIG;\n $DRONES = $INVENTORY['DRONES'];\n $DRONE_ITEMS = $INVENTORY['CONFIG_' . $CONFIG][$IDENTIFIER];\n\n $DRONES_USAGE = [];\n $DRONES_DESIGN = [];\n foreach ($DRONES as $DRONE) {\n $DRONES_USAGE[$DRONE['ID']] = 0;\n $DRONES_DESIGN[$DRONE['ID']] = 0;\n }\n\n foreach ($DRONE_ITEMS as $DRONE_ITEM) {\n $DRONE_ID = $DRONE_ITEM->DRONE_ID;\n if ($DRONE_ITEM->CATEGORY == 'drone_design')\n {\n $DRONES_DESIGN[$DRONE_ID]++;\n }\n else $DRONES_USAGE[$DRONE_ID]++;\n }\n\n if (empty($DRONES)) {\n http_response_code(400);\n die(json_encode([\"message\" => \"Something went wrong while moveing the Item!\"]));\n }\n\n foreach ($ITEMS as $ITEM) {\n $ITEM_OBJ = $System->User->Inventory->getItem($ITEM['ID']);\n if (\n $ITEM_OBJ->CATEGORY == 'extras' ||\n $ITEM_OBJ->CATEGORY == 'heavy' ||\n $ITEM_OBJ->ATTRIBUTES['SPEED'] != null\n ) {\n continue;\n }\n\n if (isset($ITEM['DRONE_ID'])) {\n if (isset($DRONES[$ITEM['DRONE_ID']])) {\n if (\n ( $DRONES_USAGE[$ITEM['DRONE_ID']] < $DRONES[$ITEM['DRONE_ID']]['SLOTS'] && $ITEM['CATEGORY'] != 'drone_design') ||\n ( $ITEM['CATEGORY'] == 'drone_design' && $DRONES_DESIGN[$ITEM['DRONE_ID']] < 1 )\n ) {\n if (\n $ITEM_OBJ->moveToEquipment(\n $System->User->Hangars->CURRENT_HANGAR->ID,\n $CONFIG,\n [\n 'target' => $DISPLAY,\n 'droneID' => $ITEM['DRONE_ID'],\n ]\n )\n ) {\n if ($ITEM['CATEGORY'] == 'drone_design') {\n $DRONES_DESIGN[$ITEM['DRONE_ID']]++;\n } else {\n $DRONES_USAGE[$ITEM['DRONE_ID']]++;\n }\n } else {\n http_response_code(400);\n die(json_encode([\"message\" => \"Something went wrong while moveing the Item!\"]));\n }\n }\n } else {\n http_response_code(400);\n die(json_encode([\"message\" => \"Drone doesnt exists! You really want a ban for that?\"]));\n }\n } else {\n foreach ($DRONES as $DRONE) {\n if (($DRONES_USAGE[$DRONE['ID']] < $DRONE['SLOTS'] && $ITEM['CATEGORY'] != 'drone_design') ||\n ($ITEM['CATEGORY'] == 'drone_design' && $DRONES_DESIGN[$DRONE['ID']] < 1 )) {\n if (\n $ITEM_OBJ->moveToEquipment(\n $System->User->Hangars->CURRENT_HANGAR->ID,\n $CONFIG,\n [\n 'target' => $DISPLAY,\n 'droneID' => $DRONE['ID'],\n ]\n )\n ) {\n if ($ITEM['CATEGORY'] == 'drone_design') {\n $DRONES_DESIGN[$DRONE['ID']]++;\n } else {\n $DRONES_USAGE[$DRONE['ID']]++;\n }\n } else {\n http_response_code(400);\n die(json_encode([\"message\" => \"Something went wrong while moveing the Item!\"]));\n }\n }\n }\n }\n }\n break;\n case 'pet':\n $IDENTIFIER = 'ON_PET_' . $CONFIG;\n\n $SLOT_TYPES = [\n \"LASER\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n ],\n \"GEAR\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n \"ITEMS\" => [],\n \"TYPES\" => [],\n ],\n \"GENERATOR\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n ],\n \"PROTOCOLS\" => [\n \"MAX\" => 0,\n \"IN_USE\" => 0,\n ],\n ];\n\n foreach ($INVENTORY['PET']['SLOTS']['CONFIG_' . $CONFIG] as $SLOT_TYPE => $MAX_SLOTS) {\n $SLOT_TYPES[$SLOT_TYPE]['MAX'] = (int) $MAX_SLOTS;\n }\n\n foreach ($INVENTORY['CONFIG_' . $CONFIG][$IDENTIFIER] as $ITEM) {\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['IN_USE']++;\n if ($ITEM->CATEGORY == 'gear') {\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['ITEMS'][$ITEM->LOOT_ID] = $ITEM->LOOT_ID;\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['TYPES'][$ITEM->TYPE] = $ITEM->TYPE;\n }\n }\n\n foreach ($ITEMS as $ITEM) {\n $ITEM = $System->User->Inventory->getItem($ITEM['ID']);\n\n if (\n isset($SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['ITEMS'][$ITEM->LOOT_ID]) ||\n isset($SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['TYPES'][$ITEM->TYPE])\n ) {\n continue;\n }\n\n if (\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['MAX'] >\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['IN_USE']\n ) {\n if (\n $ITEM->moveToEquipment(\n $System->User->Hangars->CURRENT_HANGAR->ID,\n $CONFIG,\n ['target' => $DISPLAY]\n )\n ) {\n $SLOT_TYPES[strtoupper($ITEM->CATEGORY)]['IN_USE']++;\n } else {\n //http_response_code(400);\n die(json_encode([\"message\" => \"Something went wrong while moveing the Item!\"]));\n }\n } else {\n break;\n }\n }\n break;\n default:\n die(json_encode([\"message\" => \"No idea what just happened.\"]));\n }\n\n //NO ERROR OCCURED\n die(json_encode([\"message\" => \"Success!\"]));\n } else {\n if ($TO == 'inv') {\n foreach ($ITEMS as $ITEM) {\n $ITEM = $System->User->Inventory->getItem($ITEM['ID']);\n\n if ($ITEM) {\n if ($ITEM->moveToInventory($System->User->Hangars->CURRENT_HANGAR->ID, $CONFIG)) {\n continue;\n } else {\n //http_response_code(400);\n die(json_encode([\"message\" => \"Something went wrong while moveing an item!\"]));\n }\n } else {\n http_response_code(400);\n die(\n json_encode(\n [\"message\" => \"The requested ITEM to move doesnt exists in your Inventory... try that again and get banned!\"]\n )\n );\n }\n }\n\n //NO ERROR OCCURED\n die(json_encode([\"message\" => \"Success!\"]));\n } else {\n http_response_code(400);\n die(json_encode([\"message\" => \"No idea what just happened.\"]));\n }\n }\n }", "title": "" }, { "docid": "985510a0551f4c2d4a7c5d9eaf5c40d3", "score": "0.46768293", "text": "function _drawBlock($ar) {\n if (!$ar['bggc']) {\n print_r($ar);\n echo 'NO BGGC';\n return;\n }\n while(gtk::events_pending()) gtk::main_iteration();\n gdk::draw_rectangle($this->pixmap,\n $this->_gcs[$ar['bggc']],true,\n $ar['left'], $ar['top'],\n $ar['right'], $ar['bottom'] -$ar['top']\n );\n /*\n $this->drawing_area->draw(\n new GdkRectangle(\n $ar['left'], $ar['top'],\n $ar['right'], $ar['bottom'] - $ar['top']));\n */\n }", "title": "" }, { "docid": "39466d2a4ca5d52a6bb1bccf018d863a", "score": "0.46731016", "text": "protected function _isCovered($x1, $y1, $x2, $y2, $w)\n {\n $return = true;\n // ---.----------.----------.\n // / | \\ . |\n // | | | . |\n // | o----|----------------o\n // | | | |\n // \\ | / |\n // ---'---------------------'\n // \n // draw a circle around x1 y1\n for($x = 0 - $w; $x <= $w; $x++) {\n for($y = 0 - $w; $y <= $w; $y++) {\n // check for circle intersection\n $l = sqrt(pow($x, 2) + pow($y, 2));\n if (floor($l) < $w) {\n // If part of the shape doesn't exist in buffer\n if (! $this->_existsInBuffer($x1 + $x, $y1 + $y)) {\n // return that it can't be removed\n $return = false;\n }\n }\n }\n }\n // draw a rectangle between 1 and 2\n if ($x1 == $x2 && $y1 == $y2) {\n return $return;\n }\n\n $max_x = max($x1, $x2) + $w;\n $min_x = min($x1, $x2) - $w;\n $max_y = max($y1, $y2) + $w;\n $min_y = min($y1, $y2) - $w;\n for ($x = $min_x; $x <= $max_x; $x++) {\n for ($y = $min_y; $y <= $max_y; $y++) {\n list($d, $inside) = $this->_p($x1, $y1, $x2, $y2, $x, $y);\n if (floor($d) <= $w && $inside) {\n if (! $this->_existsInBuffer($x, $y)) {\n $return = false;\n }\n }\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "9adf3f67c8a734e8fe49f53a5bee8056", "score": "0.4670551", "text": "function create_system($id_type, $id_value, $is_mother) {\n global $db, $game;\n\n $sector_id = $system_x = $system_y = 0;\n \n $sector_allowed = array(\n 1 => '21, 23, 25, 27, 31, 33, 35, 39, 41, 43, 45, 49, 51, 53, 57, 59, 61, 63, 67, 69, 71, 75, 77, 79, 81',\n 2 => '100, 102, 104, 106, 110, 112, 114, 118, 120, 122, 124, 128, 130, 132, 136, 138, 140, 142, 146, 148, 150, 154, 156, 158, 160',\n 3 => '165, 167, 169, 171, 175, 177, 179, 183, 185, 187, 189, 193, 195, 197, 201, 203, 205, 207, 211, 213, 215, 219, 221, 223, 225',\n 4 => '244, 246, 248, 250, 254, 256, 258, 262, 264, 266, 268, 272, 274, 276, 280, 282, 284, 286, 290, 292, 294, 298, 300, 302, 304'\n );\n\n switch($id_type) {\n case 'quadrant':\n $quadrant_id = $id_value;\n \n /*\n if($is_mother == 0){\n $sql = 'SELECT *\n FROM starsystems_slots\n WHERE quadrant_id = '.$quadrant_id.'\n LIMIT 1'; \n }\n else {\n $sql = 'SELECT *\n FROM starsystems_slots\n WHERE quadrant_id = '.$quadrant_id.' AND\n sector_id IN ('.$sector_allowed[$quadrant_id].') \n LIMIT 1'; \n }\n */\n\n $sql = 'SELECT * FROM starsystems_slots WHERE quadrant_id = '.$quadrant_id.' LIMIT 1';\n\n if(($free_slot = $db->queryrow($sql)) === false) {\n message(DATABASE_ERROR, 'world::create_system(): Could not query starsystem slots');\n }\n\n if(!empty($free_slot['sector_id'])) extract($free_slot);\n break;\n\n case 'sector':\n $sql = 'SELECT *\n FROM starsystems_slots\n WHERE sector_id = '.$id_value.'\n LIMIT 1';\n\n if(($free_slot = $db->queryrow($sql)) === false) {\n message(DATABASE_ERROR, 'world::create_system(): Could not query starsystem slots');\n }\n\n if(!empty($free_slot['sector_id'])) extract($free_slot);\n break;\n\n case 'slot':\n $params = explode(':', $id_value);\n\n $sql = 'SELECT *\n FROM starsystems_slots\n WHERE sector_id = '.(int)$params[0].' AND\n system_x = '.(int)$params[1].' AND\n system_y = '.(int)$params[2].'\n LIMIT 1';\n\n if(($free_slot = $db->queryrow($sql)) === false) {\n message(DATABASE_ERROR, 'world::create_system(): Could not query starsystem slots');\n }\n\n if(!empty($free_slot['sector_id'])) extract($free_slot);\n break;\n }\n\n if(empty($sector_id)) {\n message(GENERAL, 'System could not be created', 'world::create_system(): $sector_id = empty');\n }\n\n $star_base_color = mt_rand(0, 11);\n\n switch($star_base_color) {\n // Blue star\n case 0:\n $low_range = (int)($game->starsize_range[1]-3);\n $high_range = (int)($game->starsize_range[1]);\n $star_color = array(mt_rand(0, 25), mt_rand(0, 25), mt_rand(150, 255));\n $star_type = 'b';\n break;\n\n // White Star\n case 1:\n case 2:\n $low_range = (int)($game->starsize_range[1]-8);\n $high_range = (int)($game->starsize_range[1]-4); \n $star_color = array(mt_rand(220, 255), mt_rand(235, 255), mt_rand(245, 255));\n $star_type = 'a'; \n break;\n\n // Yellow Star\n case 3:\n case 4:\n case 5:\n $low_range = (int)($game->starsize_range[0]+4);\n $high_range = (int)($game->starsize_range[1]-8); \n $star_color = array(mt_rand(200, 255), mt_rand(50, 150), mt_rand(0, 25)); \n $star_type = 'g'; \n break;\n\n // Red Star\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n $low_range = (int)($game->starsize_range[0]);\n $high_range = (int)($game->starsize_range[0]+4); \n $star_color = array(mt_rand(150, 255), mt_rand(0, 25), mt_rand(0, 25)); \n $star_type = 'm';\n break;\n\n // Brown (old) Star\n case 11:\n $low_range = (int)($game->starsize_range[0]);\n $high_range = (int)($game->starsize_range[0]+4); \n $star_color = array(mt_rand(100, 150), mt_rand(40, 80), mt_rand(0, 15)); \n $star_type = 'l'; \n break;\n } \n\n $star_size = mt_rand($low_range, $high_range); \n\n $required_borders = ($game->sector_map_split - 1);\n $px_per_field = ( ($game->sector_map_size - $required_borders) / $game->sector_map_split);\n\n $root_x = ($px_per_field * ($system_x - 1) ) + ($system_x - 1);\n $root_y = ($px_per_field * ($system_y - 1) ) + ($system_y - 1);\n\n $border_distance = $px_per_field / 4;\n $border_distance = max($border_distance, ( ($star_size * 0.45) + 3 ) );\n\n $system_map_x = mt_rand( ($root_x + $border_distance), $root_x + ($px_per_field - $border_distance) );\n $system_map_y = mt_rand( ($root_y + $border_distance), $root_y + ($px_per_field - $border_distance) );\n\n $system_coords = $game->get_system_gcoords($system_x, $system_y, $sector_id);\n \n $orion_chance = rand(1,100); \n if($orion_chance >= 96) {\n // AAA\n $orion_alert = 4;\n }elseif($orion_chance >= 91){\n // AA\n $orion_alert = 3;\n }elseif($orion_chance >= 76){\n // A\n $orion_alert = 2;\n }elseif($orion_chance >= 51) {\n // B\n $orion_alert = 1;\n }else {\n // C\n $orion_alert = 0;\n } \n \n if((int)$is_mother == 1) {\n $max_planets = $game->system_max_planets;\n $orion_alert = 0;\n }\n else {\n $max_planets = 4 + (mt_rand(0,4)); (int)($game->system_max_planets / 2) + (mt_rand(0,(int)($game->system_max_planets / 2)));\n }\n\n $sql = 'INSERT INTO starsystems (system_name, sector_id, system_x, system_y, system_map_x, system_map_y, system_global_x, system_global_y, system_starcolor_red, system_starcolor_green, system_starcolor_blue, system_starsize, system_startype, system_max_planets, system_orion_alert)\n VALUES (\"System '.$game->get_sector_name($sector_id).':'.$game->get_system_cname($system_x, $system_y).'\", '.$sector_id.', '.$system_x.', '.$system_y.', '.$system_map_x.', '.$system_map_y.', '.$system_coords[0].', '.$system_coords[1].', '.$star_color[0].', '.$star_color[1].', '.$star_color[2].', '.$star_size.', \"'.$star_type.'\", '.$max_planets.', '.$orion_alert.')';\n\n if(!$db->query($sql)) {\n message(DATABASE_ERROR, 'world::create_system(): Could not insert new system data');\n }\n\n $new_system_id = $db->insert_id();\n $sql = 'DELETE FROM starsystems_slots\n WHERE sector_id = '.$sector_id.' AND\n system_x = '.$system_x.' AND\n system_y = '.$system_y;\n\n if(!$db->query($sql)) {\n message(DATABASE_ERROR, 'world::create_system(): Could not delete starsystems slot data');\n }\n\n return array($new_system_id, $sector_id);\n}", "title": "" }, { "docid": "58fe6f755d58a4563b0ad916f416d9e2", "score": "0.46694294", "text": "protected function updateShipped()\r\n {\r\n $updateQuery = \"UPDATE \".$this->getOrderGridTable().\" grid\r\n SET shipped = IF(\r\n shipped = 1 OR shipped = 2,\r\n IF(total_qty_ordered_aggregated = total_qty_shipped OR\r\n total_qty_ordered_aggregated - total_qty_canceled = total_qty_shipped OR\r\n total_qty_ordered_aggregated - total_qty_canceled - total_qty_refunded = total_qty_shipped, 1, 2),\r\n 0\r\n )\r\n WHERE 1\".$this->condition;\r\n $this->_getWriteAdapter()->query($updateQuery);\r\n }", "title": "" }, { "docid": "46173b3418015795cd56db3a04957e22", "score": "0.46623063", "text": "public function setShipper($val){\n $this->shipper = $val;\n }", "title": "" }, { "docid": "0f968395a3d36328aec7d4102fefde6f", "score": "0.46619222", "text": "function sp_add_custom_box() {\n\t\tglobal $sp_boxes;\n\t\tif ( function_exists( 'add_meta_box' ) ) {\n\t\t\tforeach ( array_keys( $sp_boxes ) as $box_name ) {\n\t\t\t\tadd_meta_box( $box_name, __( $box_name, 'sp' ), 'sp_post_custom_box', OPENMENU_POSTYPE, 'normal', 'high' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "71f797c6d5f595cdba2cec0e80735cf1", "score": "0.46581706", "text": "public function createShip($data);", "title": "" }, { "docid": "236c4f6ef2581ffecd5f17c6a43c3dc0", "score": "0.4656936", "text": "function isPlaced()\n {\n return $this->placed;\n }", "title": "" }, { "docid": "1df82bd03ef1e6d2b0b05c56504f1068", "score": "0.46484447", "text": "function spaceship($a, $b)\n{\n if ( $a == $b) {\n return 0;\n }\n\n return ($a < $b) ? -1: 1;\n}", "title": "" }, { "docid": "2ace23d2a886a8517f6a288138da0bfe", "score": "0.46451098", "text": "function hasGiftOnly(){\n\t\t//one product designated by unique items. can have multiple quantity\n\t\treturn ($this->hasGiftSubs()&&count($this->contents)===1)?1:0;\n\t}", "title": "" }, { "docid": "a41b66a15edc904eb43c4b8b9a1addc2", "score": "0.46428788", "text": "public function inLimbo(): bool;", "title": "" }, { "docid": "49d08a2b8aef276d2e6e4b2812444ac5", "score": "0.46392614", "text": "function isBoat(){\n\n\t\tif(array_key_exists(1, $this->trips)){\n\t\t\t$this->boat[] = $this->trips[0];\n\t\t\t$this->boat[] = $this->trips[1];\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(array_key_exists(0, $this->pairs)){\n\t\t\t$this->boat[] = $this->trips[0];\n\t\t\t$this->boat[] = $this->pairs[0];\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "793e5a07ce0c886753ed6a73aa2b37c2", "score": "0.4628168", "text": "private function occupySpaceOnBoard($shipSize, $shipMarker, $startX, $startY, $orientation, $count) {\n\t\tif ( $orientation == 0 || $orientation == 2 ) {\n\t\t\tfor ($i = 0; $i < $shipSize; $i++) {\n\t\t\t\t$this->grid[$startY][$startX + $i] = $shipMarker . $count;\n\t\t\t}\n\t\t} else {\n\t\t\tfor ($i = 0; $i < $shipSize; $i++) {\n\t\t\t\t$this->grid[$startY + $i][$startX] = $shipMarker . $count;\n\t\t\t}\n\t\t}\n\n\t\tif ( $shipMarker === 'L' ) {\n\t\t\t$l = $this->additionalCellForL($startX, $startY, $orientation);\n\t\t\t$this->grid[$l['y']][$l['x']] = $shipMarker . $count;\n\t\t}\n\n\t\t$this->ships[] = array('x' => $startX, 'y' => $startY, 'orient' => $orientation, 'type' => $shipMarker);\n\t}", "title": "" }, { "docid": "0162b5a2be36f830732c6cafe664e604", "score": "0.4622746", "text": "public final function getBoxAction()\n {\n }", "title": "" }, { "docid": "7dc9b5cc59ae357dd3d2b72108595b7e", "score": "0.46219137", "text": "public function testUpdatePlacement()\n {\n }", "title": "" }, { "docid": "ad528b7e6a9370b55af1e2428d7e66e7", "score": "0.4612581", "text": "public function canFly();", "title": "" }, { "docid": "3266150f3a8beee205696d3625b1339b", "score": "0.45980692", "text": "function cq_dart_slot($size, $zone1 = 'other', $zone2 = null, $pos = null)\n{\n if (sfContext::getInstance()->getRequest()->isMobileLayout())\n {\n return;\n }\n\n list($width, $height) = explode('x', $size);\n\n $test = isset($_GET['test']) && $_GET['test'] === 'on' ? 'on' : null;\n $src = sprintf(\n 'http://ad.doubleclick.net/adj/aetn.hist.cq/cq%s;s1=cq%s;s2=%s;kw=;test=%s;aetn=ad;pos=%s;dcopt=%s;sz=%s',\n $zone1, $zone1, $zone2, $test, $pos, ($pos === 'top') ? 'ist' : null, $size\n );\n\n $href = sprintf(\n 'http://ad.doubleclick.net/jump/aetn.hist.cq/%s;s1=%s;s2=%s;kw=;test=%s;aetn=ad;pos=%s;sz=%s',\n $zone1, $zone1, $zone2, $test, $pos, $size\n );\n\n // fix for add banners to be center aligned when responsive design\n echo '<div class=\"mobile-optimized-300 center\">';\n include_partial(\n 'global/js/dart_slot',\n array(\n 'src' => $src, 'href' => $href,\n 'width' => (int) $width, 'height' => (int) $height\n )\n );\n echo '</div>';\n}", "title": "" }, { "docid": "a29c1acf4ab5d20576ab67449dac4182", "score": "0.4597791", "text": "function showSlots($slots){\n\tif($slots == 1){\n\t\treturn '<div class=\"hero-drop col-md-12\" id=\"hero-1-drop\"></div>';\n\t}\n\tif($slots == 2){\n\t\treturn '<div class=\"hero-drop col-md-6\" id=\"hero-1-drop\"></div>\n\t\t<div class=\"hero-drop col-md-6\" id=\"hero-2-drop\"></div>';\n\t}\n\tif($slots == 3){\n\t\treturn '<div class=\"hero-drop col-md-4\" id=\"hero-1-drop\"></div>\n\t\t<div class=\"hero-drop col-md-4\" id=\"hero-2-drop\"></div>\n\t\t<div class=\"hero-drop col-md-4\" id=\"hero-3-drop\"></div>';\n\t}\n}", "title": "" }, { "docid": "c760e15ee12cfeb4e3b79476c1c61698", "score": "0.45947385", "text": "public function isCapped()\n {\n }", "title": "" }, { "docid": "a287b50a77060449d891c57ae1b9b857", "score": "0.45946315", "text": "public function ships_to_different_address() {\n\t\t// always prefer parent address for refunds\n\t\tif ( $this->is_refund( $this->order ) ) {\n\t\t\t$order = $this->get_refund_parent( $this->order );\n\t\t} else {\n\t\t\t$order = $this->order;\n\t\t}\n\n\t\t$address_comparison_fields = apply_filters( 'wpo_wcpdf_address_comparison_fields', array(\n\t\t\t'first_name',\n\t\t\t'last_name',\n\t\t\t'company',\n\t\t\t'address_1',\n\t\t\t'address_2',\n\t\t\t'city',\n\t\t\t'state',\n\t\t\t'postcode',\n\t\t\t'country'\n\t\t), $this );\n\t\t\n\t\tforeach ($address_comparison_fields as $address_field) {\n\t\t\t$billing_field = WCX_Order::get_prop( $order, \"billing_{$address_field}\", 'view');\n\t\t\t$shipping_field = WCX_Order::get_prop( $order, \"shipping_{$address_field}\", 'view');\n\t\t\tif ( $shipping_field != $billing_field ) {\n\t\t\t\t// this address field is different -> ships to different address!\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t//if we got here, it means the addresses are equal -> doesn't ship to different address!\n\t\treturn apply_filters( 'wpo_wcpdf_ships_to_different_address', false, $order, $this );\n\t}", "title": "" }, { "docid": "4b8ef5b228c1eb812dc144792db8f21a", "score": "0.4592691", "text": "function sp_add_custom_box() {\n\tglobal $sp_boxes;\n\tif ( function_exists( 'add_meta_box' ) ) {\n\t\tforeach ( array_keys( $sp_boxes ) as $box_name ) {\n\t\t\tadd_meta_box( $box_name, __( $box_name, 'sp' ), 'sp_post_custom_box', 'properties', 'normal', 'high' );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9b72275dde6e523d8195b44c292dc4d0", "score": "0.45926058", "text": "function wcfm_wcmarketplace_order_mark_shipped() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\t$user_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() );\r\n\t\t$vendor = get_wcmp_vendor($user_id);\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderid'] ) ) {\r\n\t\t\t$order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = $_POST['productid'];\r\n\t\t\t$tracking_url = $_POST['tracking_url'];\r\n\t\t\t$tracking_code = $_POST['tracking_code'];\r\n $order_item_id = $_POST['orderitemid'];\r\n $user_id = apply_filters('wcmp_mark_as_shipped_vendor', $user_id);\r\n\t\t\t$shippers = (array) get_post_meta($order_id, 'dc_pv_shipped', true);\r\n\t\t\t\r\n\t\t\tif (!in_array($user_id, $shippers)) {\r\n\t\t\t\t$shippers[] = $user_id;\r\n\t\t\t\t$mails = WC()->mailer()->emails['WC_Email_Notify_Shipped'];\r\n\t\t\t\tif (!empty($mails)) {\r\n\t\t\t\t\t$customer_email = get_post_meta($order_id, '_billing_email', true);\r\n\t\t\t\t\t$mails->trigger($order_id, $customer_email, $vendor->term_id, array( 'tracking_code' => $tracking_code, 'tracking_url' => $tracking_url ) );\r\n\t\t\t\t}\r\n\t\t\t\tdo_action('wcmp_vendors_vendor_ship', $order_id, $vendor->term_id);\r\n\t\t\t\tarray_push($shippers, $user_id);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcmp_vendor_orders SET shipping_status = '1' WHERE order_id = $order_id and vendor_id = $user_id and order_item_id = $order_item_id\");\r\n\t\t\t$shop_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( absint($user_id) );\r\n\t\t\t$comment_id = $order->add_order_note( sprintf( __( 'Vendor <b>%s</b> has shipped <b>%s</b> to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), $shop_name, get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url ), '1');\r\n\t\t\tadd_comment_meta( $comment_id, '_vendor_id', $user_id );\r\n\t\t\t\r\n\t\t\t// Update Shipping Tracking Info\r\n\t\t\t$this->updateShippingTrackingInfo( $order_item_id, $tracking_code, $tracking_url );\r\n\t\t\t\r\n\t\t\tupdate_post_meta($order_id, 'dc_pv_shipped', $shippers);\r\n\t\t}\r\n\t\tdie;\r\n\t}", "title": "" }, { "docid": "c08b48518e553c9eb2642375530964b2", "score": "0.45896968", "text": "function placePawn( $x,$y, $player, $color ) {\n self::checkAction( 'placePawn' ); \n\n $sql = \"SELECT board_player player FROM board WHERE board_x = '$x' AND board_y ='$y' \";\n if (self::getUniqueValueFromDB( $sql ) != null ) {\n throw new BgaUserException( self::_(\"This tile is not free, hit F5 to update current situation\") );\n }\n\n if ( $this->gamestate->state()['name'] == 'playerTurn2' && self::getGameStateValue('played_color') == $color ) {\n throw new BgaUserException( self::_(\"You cannot play same color twice, hit F5 to update current situation\") );\n }\n\n if ($color == 0 ) {\n $type = 0;\n self::setGameStateValue( 'played_color', 0 );\n }\n\n if ($color == 1) {\n $type = 1;\n self::setGameStateValue( 'played_color', 1 );\n }\n\n $sql = \"UPDATE board SET board_player = '$player', board_type = '$type' WHERE board_x = '$x' AND board_y ='$y' \";\n self::DbQuery( $sql );\n\n $meeple_log = 'meeple_'.$player.'_'.$color;\n\n self::notifyAllPlayers('pawnPlaced', clienttranslate('${player_name} places ${stone} to ${location}'), array ( \n 'player_name' => self::getActivePlayerName(), 'x' => $x, 'y' => $y, 'player_id' => $player, 'color' => $color, 'stone' => $meeple_log,\n 'location' => $this->getNotation($x,$y)\n )); \n \n \n $state=$this->gamestate->state(); \n if( $state['name'] == 'playerTurn' ) { // reset last moves\n // $sql = \"UPDATE board SET board_lastmove = '0' WHERE board_lastmove = '1' AND board_player ='$player' \";\n $sql = \"UPDATE board SET board_lastmove = '0' WHERE board_lastmove = '1' \";\n self::DbQuery( $sql );\n }\n\n $sql = \"UPDATE board SET board_lastmove = '1' WHERE board_x = '$x' AND board_y ='$y' \";\n self::DbQuery( $sql );\n\n if (self::getGameStateValue( 'first_turn' ) == 1 ) {\n self::setGameStateValue( 'first_turn',0 );\n $this->gamestate->nextState(\"placeFirstPawn\");\n } else {\n $this->gamestate->nextState(\"placePawn\");\n }\n }", "title": "" }, { "docid": "15113fc239eb3b0cea5a54ccf7f8abb0", "score": "0.4586159", "text": "static function wp_ajax_p2p_box() {\n\t\tcheck_ajax_referer( P2P_BOX_NONCE, 'nonce' );\n\n\t\t$ctype = p2p_type( $_REQUEST['p2p_type'] );\n\t\tif ( !$ctype || !isset( self::$box_args[$ctype->name] ) )\n\t\t\tdie(0);\n\n\t\t$post_type = get_post_type( $_REQUEST['from'] );\n\t\tif ( !$post_type )\n\t\t\tdie(0);\n\n\t\t$directed = $ctype->set_direction( $_REQUEST['direction'] );\n\t\tif ( !$directed )\n\t\t\tdie(0);\n\n\t\t$box = new P2P_Box( self::$box_args[$ctype->name], $directed, $post_type );\n\n\t\tif ( !$box->check_capability() )\n\t\t\tdie(-1);\n\n\t\t$method = 'ajax_' . $_REQUEST['subaction'];\n\n\t\t$box->$method();\n\t}", "title": "" }, { "docid": "56d0bb6f1a56ebdf5f970f1ecc6ca8dd", "score": "0.4574011", "text": "public function checkExistShipType($shipTypeId);", "title": "" }, { "docid": "e0e7902ea00cae8b3600e2875e22b9db", "score": "0.4573501", "text": "public function testIdenticalGridsAreBoring()\n {\n $board = new \\Life\\Board();\n \n $board->setGrid(\n array(\n array(1, 0, 0),\n array(0, 1, 0),\n array(0, 0, 0)\n )\n );\n \n $board->setGrid(\n array(\n array(1, 0, 0),\n array(0, 1, 0),\n array(0, 0, 0)\n )\n );\n \n $this->assertTrue($board->isBoring());\n }", "title": "" }, { "docid": "36053a903391243d2754fd592ff3c8a4", "score": "0.45586044", "text": "public function box()\n {\n if(is_home() || is_attachment() || is_category() || is_feed() || is_front_page())\n {\n return;\n }\n\n global $wp_query;\n\n /**\n * Get current post id\n */\n $thePostID = $wp_query->post->ID;\n\n /**\n * Get plugin configuration from admin\n */\n $width = $this->options['width'];\n// $height= $this->options['height'];\n $color= $this->options['acolor'];\n $thre = $this->options['threshold'];\n $text = $this->options['text'];\n $category = $this->options['category'];\n $tag = $this->options['tag'];\n $pWidth = floatval($width) - 165;\n\n\n /**\n * Check if there is any advertisers set\n */\n $advText = $this->options['adv_text'];\n $advImg = $this->options['adv_image'];\n $advLink = $this->options['adv_link'];\n\n\n /**\n * Output the threshold in JS before the plugin should be show\n */\n $output = '<script type=\"text/javascript\">\n //<![CDATA[\n var threshold = \"'. $thre . '\"\n //]]>\n </script>';\n\n $output .= '<div id=\"flybox-wrapper\" style=\"width:'. $width . ';\">\n <div id=\"flybox-container\">';\n\n $output .= \"<p class=\\\"flybox-title\\\">{$text}</p>\";\n\n /**\n * Prepary to fetch the data from the database\n */\n $args = array(\n 'category_name' => $category,\n 'tag' => $tag,\n 'post_type' => 'post',\n 'post_status' => 'publish',\n 'posts_per_page' => 2,\n 'post__not_in' => array($thePostID),\n 'orderby' => 'rand'\n );\n\n $latestPost = new WP_Query($args);\n\n while ( $latestPost->have_posts() )\n {\n $latestPost->the_post();\n\n $output .= '<div class=\"flybox-item\">';\n $output .= '<a class=\"flybox-img\" href=\"' . get_permalink($latestPost->ID) . '\">';\n\n $image = get_the_post_thumbnail($latestPost->ID);\n\n if(empty($image))\n {\n $image = '<img src=\"'.PLULZ_READNEXT_PLUGIN_ASSETS.'/camera.jpg\" alt=\"' . get_the_title() . '\" />';\n }\n\n /**\n * Lets get the size of p based on the size of the box\n */\n\n $output .= $image;\n $output .= '</a>';\n $output .= '<p style=\"width:' . $pWidth . 'px\"><a style=\"color:' . $color . ';\" href=\"' . get_permalink($latestPost->ID) . '\">' . get_the_title() . '</a></p>';\n $output .= '</div>';\n\n /**\n * If there is any advertising set, add it and end the loop\n */\n if(!empty($advText) && !empty($advImg) && !empty($advLink))\n {\n $output .= '<div class=\"flybox-item\">';\n $output .= '<a class=\"flybox-img\" href=\"' . $advLink . '\">';\n $output .= '<img src=\"' . $advImg . '\" alt=\"' . $advText . '\" />';\n $output .= '</a>';\n $output .= '<p style=\"width:' . $pWidth . 'px\"><a style=\"color:' . $color . ';\" href=\"' . $advLink . '\">' . $advText . '</a></p>';\n $output .= '</div>';\n\n break;\n }\n\n\n }\n\n $output .= '</div></div>';\n\n echo $output;\n }", "title": "" }, { "docid": "2b32feca0e0e96d833b978102d044c44", "score": "0.45582658", "text": "function gymedge_wc_show_or_hide_cross_sells(){\n\tif ( !empty( GymEdge::$options['wc_cross_sell'] ) ) {\n\t\tadd_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display', 10 );\n\t}\n}", "title": "" }, { "docid": "1888a2d9f45878d0a3f152f46a7cbd87", "score": "0.45510596", "text": "function isIsosceles($side1, $side2, $side3)\r\n {\r\n if (($side1 == $side2 || $side2 == $side3 || $side1 == $side3)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "ac148b6087b2782f9a64bc429ca2d609", "score": "0.4550692", "text": "public function testOrderPackingSlip()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "4a8bada65213f5d4ecc59a0aa854f365", "score": "0.4543867", "text": "public function init() : void\n {\n for($y = 0; $y < $this->height; $y++)\n {\n for ($x = 0; $x < $this->width; $x++)\n {\n $this->shipGrid[$y][$x] = -1;\n $this->hitGrid[$y][$x] = -1;\n }\n }\n }", "title": "" }, { "docid": "4a3b177a5bbbd3af90bd7301716020ca", "score": "0.45354953", "text": "public function validatePieces() {\n\t}", "title": "" }, { "docid": "aacf4639fecf71238b0616975af8627b", "score": "0.45309138", "text": "public function place(Entity $entity){\n if($this->occupied()){\n return false;\n }else{\n $this->occupant = $entity;\n return true;\n }\n }", "title": "" }, { "docid": "1ba40ea84bc161c3172759df1b15650b", "score": "0.45280296", "text": "protected function isRangingNeeded()\n {\n return false;\n }", "title": "" }, { "docid": "9337a95ee2314fae6c4a8f20a065c670", "score": "0.4523735", "text": "protected function checkCoords ($x, $y) \n\t{\n\t\treturn $x > 0 && $x <= $this->params['size'] && $y > 0 && $y <= $this->params['size'];\n\t}", "title": "" }, { "docid": "5e0066ab56bb7fee29247a32eb8d6bae", "score": "0.45222986", "text": "function isWin() : bool\n {\n $bLine1 = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[0][1]) && ($this->board[0][1] == $this->board[0][2]);\n if ($bLine1) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bLine2 = !empty(trim($this->board[1][0])) && ($this->board[1][0] == $this->board[1][1]) && ($this->board[1][1] == $this->board[1][2]);\n if ($bLine2) {\n echo 'Victoire de '. $this->board[1][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bLine3 = !empty(trim($this->board[2][0])) && ($this->board[2][0] == $this->board[2][1]) && ($this->board[2][1] == $this->board[2][2]);\n if ($bLine3) {\n echo 'Victoire de '. $this->board[2][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bCol1 = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[1][0]) && ($this->board[1][0] == $this->board[2][0]);\n if ($bCol1) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bCol2 = !empty(trim($this->board[0][1])) && ($this->board[0][1] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][1]);\n if ($bCol2) {\n echo 'Victoire de '. $this->board[0][1]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bCol3 = !empty(trim($this->board[0][2])) && ($this->board[0][2] == $this->board[1][2]) && ($this->board[1][2] == $this->board[2][2]);\n if ($bCol3) {\n echo 'Victoire de '. $this->board[0][2]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bDiaLR = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][2]);\n if ($bDiaLR) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n };\n $bDiaRL = !empty(trim($this->board[0][2])) && ($this->board[0][2] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][0]);\n if ($bDiaRL) {\n echo 'Victoire de '. $this->board[0][2]->getPlayer() . PHP_EOL;\n return true;\n };\n \n $bTie = !empty(trim($this->board[0][0])) && !empty(trim($this->board[0][1])) && !empty(trim($this->board[0][2]))\n && !empty(trim($this->board[1][0])) && !empty(trim($this->board[1][1])) && !empty(trim($this->board[1][2]))\n && !empty(trim($this->board[2][0])) && !empty(trim($this->board[2][1])) && !empty(trim($this->board[2][2]));\n if ($bTie) {\n echo 'Match nul ! :\\'('. PHP_EOL;\n return true;\n };\n\n return false;\n }", "title": "" } ]
bda21f22bd11061ba447dcd0a3f5f258
Update Single Dolibarr Entity Field Data
[ { "docid": "658013603801f5ab4515fa19c8119707", "score": "0.0", "text": "public function setDatabaseField($name, $value, $table = null, $rowId = null)\n {\n global $db;\n\n //====================================================================//\n // Parameters Overide\n $realTable = is_null($table) ? $this->object->table_element : $table;\n $realRowId = is_null($rowId) ? $this->object->id : $rowId;\n //====================================================================//\n // Safety Check\n if (empty($realTable) || empty($realRowId)) {\n return Splash::log()->err(\"ErrLocalTpl\", __CLASS__, __FUNCTION__, \"Wrong Input Parameters.\");\n }\n //====================================================================//\n // Prepare SQL Request\n //====================================================================//\n $sql = \"UPDATE \".MAIN_DB_PREFIX.$realTable;\n $sql .= \" SET \".$name.\"='\".$db->escape($value).\"'\";\n $sql .= \" WHERE rowid=\".$db->escape($realRowId);\n //====================================================================//\n // Execute SQL Query\n //====================================================================//\n $result = $db->query($sql);\n if (empty($result)) {\n return Splash::log()->err(\"ErrLocalTpl\", __CLASS__, __FUNCTION__, $db->lasterror());\n }\n\n return true;\n }", "title": "" } ]
[ { "docid": "c89806fda95a35c599d032130207037c", "score": "0.68384844", "text": "public function testUpdateEntity()\n {\n }", "title": "" }, { "docid": "fb11866a6a28a176de895e06a4b06028", "score": "0.66521806", "text": "function update( $entity );", "title": "" }, { "docid": "21037baa13197d10f88fc416a75ff334", "score": "0.6624175", "text": "public function update_record(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "c739d6ee6b601d16bd74e0f46f1ad00d", "score": "0.65862024", "text": "public function update()\n\t{\n\t\tif ($this->changed())\n\t\t{\n\t\t\tforeach ($this->_fields as $name => $field)\n\t\t\t{\n\t\t\t\tif ($field instanceof Sprig_Field_Timestamp AND $field->auto_now_update)\n\t\t\t\t{\n\t\t\t\t\t// Set the value to the current timestamp\n\t\t\t\t\t$this->$name = time();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check the updated data\n\t\t\t$data = $this->check($this->changed());\n\n\t\t\t$values = $relations = array();\n\t\t\tforeach ($data as $name => $value)\n\t\t\t{\n\t\t\t\t$field = $this->_fields[$name];\n\n\t\t\t\tif ( ! $field->in_db)\n\t\t\t\t{\n\t\t\t\t\tif ($field instanceof Sprig_Field_ManyToMany)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Relationships have been changed\n\t\t\t\t\t\t$relations[$name] = $value;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip all fields that are not in the database\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Change the field name to the column name\n\t\t\t\t$values[$field->column] = $field->_database_wrap($value);\n\t\t\t}\n\n\t\t\tif ($values)\n\t\t\t{\n\t\t\t\t$query = DB::update($this->_table)\n\t\t\t\t\t->set($values);\n\n\t\t\t\tif (is_array($this->_primary_key))\n\t\t\t\t{\n\t\t\t\t\tforeach($this->_primary_key as $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$query->where(\n\t\t\t\t\t\t\t$this->_fields[$field]->column,\n\t\t\t\t\t\t\t'=',\n\t\t\t\t\t\t\t$this->_fields[$field]->_database_wrap($this->_original[$field]));\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$query->where(\n\t\t\t\t\t\t$this->_fields[$this->_primary_key]->column,\n\t\t\t\t\t\t'=',\n\t\t\t\t\t\t$this->_fields[$this->_primary_key]->_database_wrap($this->_original[$this->_primary_key]));\n\t\t\t\t}\n\n\t\t\t\t$query->execute($this->_db);\n\t\t\t}\n\n\t\t\tif ($relations)\n\t\t\t{\n\t\t\t\tforeach ($relations as $name => $value)\n\t\t\t\t{\n\t\t\t\t\t$field = $this->_fields[$name];\n\n\t\t\t\t\t$model = Sprig::factory($field->model);\n\n\t\t\t\t\tif ( isset($field->left_foreign_key) AND $field->left_foreign_key)\n\t\t\t\t\t{\n\t\t\t\t\t\t$left_fk = $field->left_foreign_key;\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$left_fk = $this->fk();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isset($field->right_foreign_key) AND $field->right_foreign_key)\n\t\t\t\t\t{\n\t\t\t\t\t\t$right_fk = $field->right_foreign_key;\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$right_fk = $model->fk();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find old relationships that must be deleted\n\t\t\t\t\tif ($old = array_diff($this->_original[$name], $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO this needs testing\n\t\t\t\t\t\t$old = array_map(array($this->_fields[$this->_primary_key],'_database_wrap'), $old);\n\n\t\t\t\t\t\tDB::delete($field->through)\n\t\t\t\t\t\t\t->where(\n\t\t\t\t\t\t\t\t$left_fk,\n\t\t\t\t\t\t\t\t'=',\n\t\t\t\t\t\t\t\t$this->_fields[$this->_primary_key]->_database_wrap($this->{$this->_primary_key}))\n\t\t\t\t\t\t\t->where($right_fk, 'IN', $old)\n\t\t\t\t\t\t\t->execute($this->_db);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find new relationships that must be inserted\n\t\t\t\t\tif ($new = array_diff($value, $this->_original[$name]))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($new as $id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDB::insert($field->through, array($left_fk, $right_fk))\n\t\t\t\t\t\t\t\t->values(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t$this->_fields[$this->_primary_key]->_database_wrap($this->{$this->_primary_key}),\n\t\t\t\t\t\t\t\t\t\t$model->field($model->pk())->_database_wrap($id)\n\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t->execute($this->_db);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Reset the original data for this record\n\t\t\t$this->_original = $this->as_array();\n\n\t\t\t// Everything has been updated\n\t\t\t$this->_changed = array();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3c4daf24bff347789c844f9d3da0697a", "score": "0.65627205", "text": "public function update()\n {\n $this->_cleanFields();\n \n parent::update();\n }", "title": "" }, { "docid": "98496a72072b3f90a2d5394d49d04c62", "score": "0.6490223", "text": "public function updateItem()\n { \n $list = DB::table('dx_lists')->where('id', '=', $this->list_id)->first();\n\n $obj_row = DB::table('dx_objects')->where('id','=', $list->object_id)->first();\n \n $this->field_row = DB::table('dx_lists_fields')\n ->where('list_id', '=', $this->list_id)\n ->where('type_id','=', DBHelper::FIELD_TYPE_FILE)\n ->where('is_word_generation','=', 1)\n ->first();\n \n if (!$this->field_row)\n {\n throw new Exceptions\\DXCustomException(\"Reģistram nav definēts datnes lauks ar Word ģenerēšanas iespēju!\");\n }\n\n $file_guid_name = str_replace(\"_name\", \"_guid\", $this->field_row->db_name);\n \n $arr_update = [\n $this->field_row->db_name => $this->file_name, \n $file_guid_name => $this->file_guid\n ];\n \n $dx_db = (new DB_DX())\n ->list($this->list_id)\n ->where('id', '=', $this->item_id)\n ->update($arr_update); \n \n DB::transaction(function () use ($dx_db){\n $dx_db->commitUpdate();\n });\n\n return $this;\n }", "title": "" }, { "docid": "e3c82a3081ef958d694288845f099267", "score": "0.6484047", "text": "public static function updateSingle($dbObj, $field, $value, $id){ }", "title": "" }, { "docid": "16eb1a871c3e4d3e886dd6c80902c9b8", "score": "0.64612263", "text": "function update_field() {\n $id = $this->input->post('edit_id');\n $field = $this->input->post('field_name');\n $value = $this->input->post($field) ? $this->input->post($field) : $this->input->post('value');\n\n $team = new Page_model();\n $team = $team->get_from_id($id);\n $team->$field = $value;\n $team->save(null);\n \n echo $value;\n }", "title": "" }, { "docid": "0718705b34dfed78a164426b1aa222b7", "score": "0.6383885", "text": "function update() {\n\t global $db, $repository;\n\n\t reset($this->data);\n\t while(list($key,$val)=each($this->data)){\n\t\tif($key != $this->idKey) {\n\t\t if($val === NULL) {\n\t\t\t $my_sql[] = $key . \" = NULL\";\n\t\t } else {\n\t\t\t //dump($val, 'val');\n\t\t\t if(in_array($key, $this->binaryFields)) {\n\t\t\t\t//if(strpos($val, \"'\"))\n\t\t\t\t//\t raiseError(\"invalid character in binary field data\");\n\t\t\t\t$my_sql[] = $key . \" = '\". addslashes($val) . \"'\";\n\t\t\t } else {\n\t\t\t\t$my_sql[] = $key . \" = '\" . sotf_Utils::magicQuotes($val) . \"'\";\n\t\t\t }\n\t\t }\n\t\t}\n\t }\n\t $my_sql = implode(\", \", $my_sql);\n\n\t //execute the query\n\t $res = $db->query(\"UPDATE \" . $this->tablename . \" SET \" . $my_sql . \" WHERE \" . $this->idKey . \"='\" . $this->id . \"' \");\n\t \n\t //if the query is dead, stop executio, output error\n\t if(DB::isError($res)){\n\t\traiseError($res);\n\t }\n\n\t //$count = $db->affectedRows();\n\t $count = $res;\n\n\t if($count > 1)\n\t\t logError(\"This updated more objects\", $count);\n\t if($count < 1)\n\t\t logError(\"Update failed\", $count);\n\t if($count==1) {\n\t\t $this->changed = false;\n\t\t // mark if this change requires a refresh in the metadata.xml file\n\t\t $this->markParentToUpdate();\n\t }\n\t return ($count==1);\n }", "title": "" }, { "docid": "c985528e49432ccb01f7ae17de4ff355", "score": "0.6352945", "text": "protected final function update(): void\n {\n if (empty($this->fields)) {\n return;\n }\n\n static::$driver->transaction(function (Driver $driver) {\n $driver->sql($this->generateUpdateStatement());\n\n foreach ($this->fields as $name => $bind) {\n $driver->bindValue($bind, $this->dbModel->{$name});\n }\n\n $driver->bindValue($this->primaryKey, $this->dbModel->{$this->primaryKey});\n $driver->execute(NULL, true);\n });\n }", "title": "" }, { "docid": "d74719fde69f4ce187aaf0815f8684e0", "score": "0.63489735", "text": "function edit_data(){\r\n\t\t$value_e=explode(\"+#+\",$this->Value);\r\n\t\tfor($i=1;$i<count($value_e);$i++){\r\n\t\t\tmysqli_query($this->conn,\"update \".$this->table.\" set \".$this->field[$i-1].\"='\".$value_e[$i].\"' where \".$this->identifier.\"='\".$value_e[0].\"'\");\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "c0268fd89d504e7e3334bdc92717f035", "score": "0.6348853", "text": "public function update() {\n\t\t\n\t\t$mods = $this->_data_modified[$this->_data_position];\n\t\tif (count($mods) < 1) return true; // no changes.\n\t\t\t\n\t\t// Build data\n\t\t$changes = [];\n\t\tforeach ($mods as $mod) $changes[$mod] = $this->__get($mod);\n\t\t\n\t\t// Build URL\n\t\t$url = \"table/\".$this->_table_name.\"/\".$this->__get(\"sys_id\");\n\t\t\n\t\t// Use GlideAccess to run the PUT command \n\t\t// Throw a GlideAccessException or a GlideAuthenticationException on error \n\t\t$result = $this->_access->put($url, json_encode($changes));\n\t\t\t\n\t\t// Clear out the pending updates for this record\n\t\t$this->_data_modified[$this->_data_position] = [];\n\t}", "title": "" }, { "docid": "246f0b2e710c9a537a35c00134fcf846", "score": "0.6347706", "text": "public function update($entitie);", "title": "" }, { "docid": "e8f2a79f2bd8c3eb405e389cd50395bf", "score": "0.6340895", "text": "public abstract function update($data);", "title": "" }, { "docid": "91039ce0cfc444382b037c86ba4ab01d", "score": "0.63233703", "text": "public function update( $data );", "title": "" }, { "docid": "dbac649412e8591fc3a2a2615f2f7767", "score": "0.6317065", "text": "abstract protected function update($entity);", "title": "" }, { "docid": "b4fe688533e552556a3166cf9999fed1", "score": "0.6295938", "text": "abstract public function update( $fields );", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.6286418", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.6286418", "text": "public function update($data);", "title": "" }, { "docid": "2ff7fd3eab671b99901b6f6734766160", "score": "0.6279677", "text": "abstract public function update($entity);", "title": "" }, { "docid": "f8e9f6199b07e8b0ea8459dea3f3dcbe", "score": "0.62706643", "text": "public function Update($entity) {\r\n }", "title": "" }, { "docid": "194348e8143807f54599362cf6318737", "score": "0.6230614", "text": "public function update (object $entity);", "title": "" }, { "docid": "c3d7410a41ba92e172d87fbc4b9b4cd5", "score": "0.6229955", "text": "public function update(){\r\n\t\t$sql = \"update \".self::$tablename.\" set barcode=\\\"$this->barcode\\\",name=\\\"$this->name\\\",partida_lote=\\\"$this->partida_lote\\\",price_in=\\\"$this->price_in\\\",price_out=\\\"$this->price_out\\\",unit=\\\"$this->unit\\\",presentation=\\\"$this->presentation\\\",category_id=$this->category_id,rd_id=$this->rd_id,inventary_min=\\\"$this->inventary_min\\\",description=\\\"$this->description\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\r\n\t\tExecutor::doit($sql);\r\n\t}", "title": "" }, { "docid": "a76029aa849de62fbcd1906d2e7b86be", "score": "0.61932373", "text": "function update_entry($data)\n{\n $this->db->update('barang', $data, array('id_barang' => $data['id_barang']));\n }", "title": "" }, { "docid": "1b622fe4ad26673e5677b61cb1147c69", "score": "0.6184428", "text": "function update_field($id, $nama = null, $value = null)\n{\n return get_row_data('config_model', 'update_field', array($id, $nama, $value));\n}", "title": "" }, { "docid": "5e25fde2b05dc8aa69161eca66edd608", "score": "0.6176603", "text": "public function update()\n\t\t{\n\t\t\t// with an insert instead.\n\t\t\t$this->save();\n\t\t}", "title": "" }, { "docid": "9530daefca670d9cf50dcf796f8ff86f", "score": "0.61749274", "text": "function update ()\n {\n $brand = Doctrine_Core::getTable ( 'Brand' )->find ( $this->input->post ( 'brand_id' ) );\n $brand[ 'brand_name' ] = $this->input->post ( 'brand_name' );\n $brand->save ();\n echo '{\"success\": true}';\n }", "title": "" }, { "docid": "f578eba393b8b894becbd8e974ee65ae", "score": "0.61607623", "text": "public function updateAction(){\r\n $this->_helper->layout->disableLayout();\r\n $this->_helper->viewRenderer->setNoRender();\r\n $class = \"Model_\".$this->getRequest()->getParam('table');\r\n $id = new $class((int)$this->getRequest()->getParam('id'));\r\n $column = $this->getRequest()->getParam('column');\r\n $data = $this->getRequest()->getPost();\r\n $id->{$column} = $data['value'];\r\n $id->save();\r\n echo $data['value'];\r\n }", "title": "" }, { "docid": "64497913c8fb0a412374b812cb40b611", "score": "0.61607206", "text": "public function updatemodel(){\n$this->autoRender=false;\n$x=$this->Fruits->get(2);\n$x->name=\"saketh\";\n$this->Fruits->save($x);\n//using \"Query builder\"\n$data=$this->Fruits->query();\n$data->set([\"name\"=>\"Raja\"])->where([\"id\"=>2])->execute();\n}", "title": "" }, { "docid": "9597f2dbc4718b9f333e4446e6945f31", "score": "0.61606336", "text": "public function update($data) {\n }", "title": "" }, { "docid": "3d0891c7902a1eccc0a32cdcf9bd37a6", "score": "0.6157526", "text": "public function updateData()\n {\n if (empty($this->fieldsById)) {\n $this->fieldsById = $this->collectAllFields();\n }\n\n $model = $this->getModel()->export();\n /** @var \\Kontentblocks\\Fields\\Field $field */\n foreach ($this->fieldsById as $field) {\n $data = (array_key_exists($field->getKey(), $model)) ? $model[$field->getKey()] : '';\n $field->setData($data);\n }\n return $this;\n }", "title": "" }, { "docid": "fa698eae4ab23d3d86e07f6fd2cda311", "score": "0.6148377", "text": "public function update( Entity $form ) {\n\t}", "title": "" }, { "docid": "19f80159ac764e26f39423973f40b86f", "score": "0.6141237", "text": "public function update() {\n $update = array();\n\n foreach ($this->fields as $key => $field) {\n $finalColumn = $field->getRealName() . '%' . $field->getType();\n\n if ($field->isPrimaryKey()) {\n $primaryKey = $field->getRealName();\n $primaryKeyValue = $field->getDbValue(false);\n $primaryKeyType = $field->getType();\n }\n elseif (!is_null($dbValue = $field->getDbValue(false)) && $field->isModified()) {\n $update[$finalColumn] = $dbValue;\n }\n # if field has nullCallback defined, include it in update no matter if modified or not\n elseif ($field->getNullCallback()) {\n $update[$finalColumn] = $dbValue;\n }\n }\n\n if (count($update) > 0) {\n #Debug::barDump($update, 'update array');\n PerfORMController::queryAndLog('update %n set', $this->getTableName(), $update, \"where %n = %$primaryKeyType\", $primaryKey, $primaryKeyValue);\n $this->setUnmodified();\n return $primaryKeyValue;\n }\n else {\n trigger_error(\"The model '\" . get_class($this) . \"' has no unmodified data to update\", E_USER_NOTICE);\n }\n }", "title": "" }, { "docid": "094de30280a7983195d61059c7ea4f97", "score": "0.6136287", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set nrodoc=\\\"$this->nrodoc\\\",nombre=\\\"$this->nombre\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "9bec00d72b7c020ea8c13af743bbf87b", "score": "0.6127479", "text": "public function testUpdateObjectItem()\n {\n }", "title": "" }, { "docid": "42eb7be8d7d756777998f042fa82f9d7", "score": "0.61269367", "text": "public function updateFieldAction()\n\t{\n\t\t// get ajax data\n\t\t$field = $this->_getParam('field');\n\t\t$id = intval($this->_getParam('id'));\n\t\t$value = $this->_getParam('value');\n\t\t\n\t\t// condition : if bool, translate\n\t\tif ($value == \"true\" || $value == \"false\") {\n\t\t\t$value = ('true' == $value) ? 1 : 0;\n\t\t}\n\n\t\t$model = new $this->_primaryModel;\n\t\t$row = $model->find($id)->current();\n\t\t$row->$field = $value;\n\t\t$row->save();\n\t\t\n\t\t$this->logInteraction($this->_primaryModel, $id, $field, $value);\n\t\t\n\t\t// condition : if we've just shown an idea, send a confirmation email\n\t\tif ($this->_primaryModel == 'Default_Model_Ideas' && $field == 'is_hidden' && $value == 0) {\n\t\t\t$model->sendVisibleIdeaEmail($id);\n\t\t}\n\t\t\n\n\t\t// use json helper to display view render\n\t\t$this->_helper->json(Zend_Json::encode(array(\n\t\t\t'value' => $value,\n\t\t\t'id' => $id,\n\t\t\t'field' => $field,\n\t\t\t'success' => true\n\t\t)));\n\t}", "title": "" }, { "docid": "dc7d206e40406c69cec76483189af4d6", "score": "0.6125184", "text": "public function Update($entity) {\n }", "title": "" }, { "docid": "aabfff3c910eac267a44f4e2efbd6189", "score": "0.6118513", "text": "public function updateSingleRecord($formData)\n {\n }", "title": "" }, { "docid": "44b2a146d07735a49eec32f23fe41df0", "score": "0.61133677", "text": "public function updateById();", "title": "" }, { "docid": "53949ff0b0f8cfe47cb736848948fbf6", "score": "0.6108677", "text": "public function updateField($fieldName, $value, $id);", "title": "" }, { "docid": "11501963cb882610ab7cf40fa86a6c0f", "score": "0.60975355", "text": "public function update()\n {\n // TODO find diff (actual/new_in_model) and make sql\n }", "title": "" }, { "docid": "8b425d52cb97f6dac49fedfd24afdeca", "score": "0.6091768", "text": "public function updateRecord()\n {\n #$response = $request->execute();\n }", "title": "" }, { "docid": "6125e22f0eabb24076a449e878125426", "score": "0.60776377", "text": "protected function update(){\n\t}", "title": "" }, { "docid": "11451838ef40878361c79589c559f9b8", "score": "0.6069737", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\", lastname=\\\"$this->lastname\\\", cellphone=\\\"$this->cellphone\\\", client_id=$this->client_id, city_id=$this->city_id where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "34349fe709b78748ae17b4ef9c2a2e28", "score": "0.605931", "text": "function _update() {\n\t\t$database = database::db();\n\t\t$update = 'UPDATE `'.$this->table.'` SET '.$this->_fields();\n\t\t$update .= sprintf(' WHERE '.$this->_esc($this->id_field).'=%s', $this->_esc($this->set[$this->id_field]));\n\t\t$database->query($update);\n\t\t$this->query = $update;\n\t\t//return $ret;\n\t}", "title": "" }, { "docid": "113f1f3af7acf54f4d0a08ddf1eb6196", "score": "0.6050196", "text": "public function update(){\n\t\t$this->ocs_content->update(\"id=\".$this->id);\n\t}", "title": "" }, { "docid": "1a0c860fa7a0260beaf715937875e9f0", "score": "0.6036482", "text": "public function testUpdateRecord()\n {\n\n $record = $this->_record();\n\n $record->setArray(array(\n 'field4' => 1,\n 'field5' => 2,\n 'field6' => 3\n ));\n\n $record->save();\n\n $this->_setPut(array(\n 'field4' => '4',\n 'field5' => '5',\n 'field6' => '6'\n ));\n\n $this->dispatch('neatline/records/'.$record->id);\n $record = $this->_reload($record);\n\n $this->assertEquals(4, $record->field4);\n $this->assertEquals(5, $record->field5);\n $this->assertEquals(6, $record->field6);\n\n }", "title": "" }, { "docid": "872b78a8a64a85307bd63bff6803edc3", "score": "0.6033684", "text": "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"rewidth_field_mrs\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $rewidth_field_mr = RewidthFieldMrs::findFirstByid($id);\n\n if (!$rewidth_field_mr) {\n $this->flash->error(\"項目幅制御が見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"rewidth_field_mrs\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($rewidth_field_mr->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスから項目幅制御が変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $rewidth_field_mr->kousin_user_id . \" tb=\" . $rewidth_field_mr->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"rewidth_field_mrs\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"controller_cd\",\n \"gamen_cd\",\n \"riyou_user_id\",\n \"field_cd\",\n \"haba\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $rewidth_field_mr->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"rewidth_field_mrs\",\n \"action\" => \"edit\",\n \"params\" => array($rewidth_field_mr->id)\n ));\n\n return;\n }\n\n $this->_bakOut($rewidth_field_mr);\n\n foreach ($post_flds as $post_fld) {\n $rewidth_field_mr->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$rewidth_field_mr->save()) {\n\n foreach ($rewidth_field_mr->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"rewidth_field_mrs\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"項目幅制御の情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"rewidth_field_mrs\",\n 'action' => 'edit',\n 'params' => array($rewidth_field_mr->id)\n ));\n }", "title": "" }, { "docid": "943480b4137df9640e1862945d418abe", "score": "0.60257494", "text": "public function updateEntityData()\n\t{\n\t\t$this->form_validation->set_rules('uCategoryName', 'Category Name', 'required');\n\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\techo json_encode(['status'=>false, 'message'=>validation_errors()]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$updateData=[\n\t\t\t\t'CategoryName'=>$this->input->get_post('uCategoryName'),\n\t\t\t];\n\t\t\t//die($this->upload->display_errors());\n\t\t\t$table = $this->__TABLE;\n\t\t\t$where = [\n\t\t\t\t$this->__ID => $this->input->post(\"u\".$this->__ID)\n\t\t\t];\n\t\t\t$this->model->update_entity($table, $updateData, $where);\n\t\t\techo json_encode(['status'=>true, 'message'=>'Record Successfully Updated']);\n\t\t}\n\t}", "title": "" }, { "docid": "75470b1b92203abdc06485f8b17d6acf", "score": "0.6016939", "text": "private function update(){\n\n\t$list = array(\"tb_usuario_id\"=>$this->tbUsuarioId, \"tb_usuario_login\"=>$this->tbUsuarioLogin, \"tb_usuario_nome\"=>$this->tbUsuarioNome, \"tb_usuario_sobrenome\"=>$this->tbUsuarioSobrenome, \"tb_usuario_dtnasc\"=>$this->tbUsuarioDtnasc, \"tb_usuario_dtregistro\"=>$this->tbUsuarioDtregistro, \"tb_usuario_pais\"=>$this->tbUsuarioPais, \"tb_usuario_estado\"=>$this->tbUsuarioEstado, \"tb_usuario_cidade\"=>$this->tbUsuarioCidade);\n\t$where = \"`tb_usuario_id`='$tbUsuarioId'\";\n\treturn $this->dao->updateRecord($list,$where);\t\n\t\n}", "title": "" }, { "docid": "f7556cfffb37d71204fe12334b366c36", "score": "0.6010014", "text": "public function update(FieldSaveRequest $request, $id)\n {\n $request->validated();\n $name = $request['name'];\n $locale_key = $request['locale_key'];\n $field_group_id = (int)$request->get('field_group');\n $field_type = (int)$request->get('field_type');\n $default_value = $request['default_value'];\n $items = $request['items'];\n $max_length = $request['max_length'];\n $sequence = (int)$request->get('sequence');\n $mandatory = $request['mandatory'] == 'on' ? true : false;\n $show_in_report = $request['show_in_report'] == 'on' ? true : false;\n $show_in_portal = $request['show_in_portal'] == 'on' ? true : false;\n $setting = [];\n switch ($field_type) {\n case config('constants.FIELD_TYPE')['string']:\n $setting = [\n 'default_value' => $default_value,\n 'max_length' => $max_length\n ];\n break;\n case config('constants.FIELD_TYPE')['number']:\n case config('constants.FIELD_TYPE')['boolean']:\n case config('constants.FIELD_TYPE')['date']:\n $setting = [\n 'default_value' => $default_value,\n ];\n break;\n case config('constants.FIELD_TYPE')['single_choice']:\n case config('constants.FIELD_TYPE')['multi_choice']:\n\n if (!isset($items->a)) {\n $arrayItems = explode(\",\", $items);\n $setting = [\n 'default_value' => $default_value,\n 'items' => json_encode($arrayItems),\n ];\n } else {\n $setting = [\n 'default_value' => $default_value,\n ];\n }\n break;\n case config('constants.FIELD_TYPE')['data_source']:\n $setting = [\n 'data_source' => $default_value,\n ];\n break;\n }\n\n $field = Field::findOrFail($id);\n $old_locale_key = $field->locale_key;\n\n DB::beginTransaction();\n\n $field->update([\n 'name' => $name,\n 'locale_key' => $locale_key,\n 'field_group_id' => $field_group_id,\n 'field_type' => $field_type,\n 'sequence' => $sequence,\n 'mandatory' => $mandatory,\n 'show_in_report' => $show_in_report,\n 'show_in_portal' => $show_in_portal,\n 'setting' => json_encode($setting)\n ]);\n\n $language_line = LanguageLine::where('group', 'fields')\n ->where('key', $old_locale_key)\n ->first();\n\n if (empty($language_line)) {\n LanguageLine::create([\n 'group' => 'fields',\n 'key' => 'locale_key.' . $locale_key,\n 'text' => [\n 'en' => $name,\n ],\n ]);\n } else {\n $language_line->update([\n 'key' => 'locale_key.' . $locale_key,\n 'text' => [\n 'en' => $name,\n ],\n ]);\n }\n Cache::flush();\n\n DB::commit();\n\n Session::flash('flash_message', __('fields.flash_messages.updated'));\n return redirect(route('fields.index'));\n }", "title": "" }, { "docid": "3638a6b1838ed0bb62d57ed2635c327f", "score": "0.59977967", "text": "public function update($field = ['*'])\n {\n }", "title": "" }, { "docid": "9f5182734b63aa01216223ca22307e66", "score": "0.5995395", "text": "public function changeField(){\n if(!empty($_POST['table_name']) && !empty($_POST['field_name']) && !empty($_POST['id_name']) && !empty($_POST['id_value'])){\n $table_name = ltrim($_POST['table_name']);\n $field_name = ltrim($_POST['field_name']);\n $field_value = ltrim($_POST['field_value']);\n $id_name = ltrim($_POST['id_name']);\n $id_value = ltrim($_POST['id_value']);\n\n $this->db->query(\"UPDATE `$table_name` SET `$field_name`='$field_value' WHERE `$id_name`='$id_value'\");\n }\n }", "title": "" }, { "docid": "4aaff1e3ffbbb33d3f5dd29011e1814d", "score": "0.5991775", "text": "protected function _update()\n\t{\n\t}", "title": "" }, { "docid": "162af5e83a89321125016f1bce078b52", "score": "0.5980174", "text": "function update(){\n\t\t$this->mdl_fees->update();\n\t}", "title": "" }, { "docid": "b189f635867cad163f8fb8f9b1c7c4f3", "score": "0.5975373", "text": "public static final function updateEntity(OrmEntity $entityParam) {\n\n\t\t$listeField = $entityParam->getFields();\n\t\t$values = $entityParam->getValues();\n\t\t$indexes = $entityParam->getIndexes();\n\t\t$entityname = $entityParam->getName();\n\n\t\t$str_params1 = array();\n\t\t$where = '';\n\t\t$params = array();\n\t\t$hasKey = false;\n\t\t \n\t\t//All the required values must be present\n\t\tforeach($listeField as $field) {\n\t\t\t\n\t\t\tif($field->isAssociateKEY()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//We don't insert the transient Fields \n\t\t\tif($field->getType() == OrmCAST::$NONE) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$fieldname = $field->getName();\n\n\t\t\t//Fix bug 86 PHP Catchable fatal error: Object of class converted to string - foreign key assigned object on update\n\t\t\tif(isset($values[$field->getName()]) && \n\t\t\t\tis_object($values[$field->getName()])){\n\t\t\t\t$fobject = $values[$field->getName()];\n\t\t\t\tlist($fentityname, $ffieldname) = explode('.', $field->getKeyName());\n\t\t\t\tif($fobject instanceOf $fentityname) {\n\t\t\t\t\t$values[$field->getName()] = $fobject->get($ffieldname);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($field->isPrimaryKEY()) {\n\t\t\t\tif(!empty($values[$fieldname])) {\n\t\t\t\t\t// Normal case in an update mode\n\t\t\t\t\t$where = ' WHERE '.$fieldname.' = ?';\n\t\t\t\t\t$hasKey = true;\n\t\t\t\t\t$keyValue = $values[$fieldname];\n\n\t\t\t\t} else if(!$entityParam->isAutoincrement()){\n\t\t\t\t\t$newId = OrmDb::genID($entityParam->getSeqname());\n\t\t\t\t\t$values[$fieldname] = $newId;\n\t\t\t\t\t$entityParam->set($fieldname, $newId);\n\n\t\t\t\t\t//TODO : error or \"insert\"-like process ?\n\t\t\t\t\t//throw new OrmIllegalArgumentException('the primaryKey '.$fieldname.' is missing for the entity : '.$entityname);\n\n\t\t\t\t} else{\n\t\t\t\t\t$values[$fieldname] = 0;\n\t\t\t\t\t$entityParam->set($fieldname, 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$isEmpty = OrmUtils::isAnEmptyField($field, $values[$fieldname]);\n\n\t\t\t//Empty Field that shouldn't be !\n\t\t\tif(!$field->isPrimaryKEY() && !$field->isNullable() && $isEmpty) {\n\t\t\t\t//Exception : if the field have a default value we set it manually\n\t\t\t\tif(!is_null($field->getDefaultValue())){\n\t\t\t\t\t$values[$fieldname] = $field->getDefaultValue();\n\t\t\t\t} else {\n\t\t\t\t\tthrow new OrmIllegalArgumentException('the field '.$fieldname.' of OrmEntity '.$entityname.' can\\'t be null');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Control the Format if not empty\n\t\t\tif(!$isEmpty && !OrmUtils::isAValidFormat($field, $values[$fieldname])){\n\t\t\t\tthrow new OrmCastFormatException('the field '.$fieldname.' of OrmEntity '.$entityname.' doesn\\'t respect the format required');\n\t\t\t}\n\n\t\t\t$str_params1[] = ' '.$fieldname.' = ? ';\n\n\t\t\t$params[] = OrmCore::_fieldToDBValue($values[$fieldname], $field->getType());\n\n\t\t}\n\t\t\n\t\t//control uniqueness on unique Field\n\t\tforeach($indexes as $index){\n\t\t\tif(!$index['unique']){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$query = 'SELECT COUNT(*) FROM '.$entityParam->getDbname().' WHERE 1 ';\n\t\t\t$arrayFind = array();\n\t\t\t$msgError = '{';\n\t\t\t$isFirst = true;\n\t\t\tforeach($index['fields'] as $elt){\n\t\t\t\tif(!$isFirst){\n\t\t\t\t\t$msgError .=',';\n\t\t\t\t}\n\t\t\t\tif(empty($values[$elt])){\n\t\t\t\t\t$query .= ' AND ' . $elt . ' IS NULL ';\n\t\t\t\t} else {\n\t\t\t\t\t$query .= ' AND ' . $elt . ' = ? ';\n\t\t\t\t\t$arrayFind[] = $values[$elt];\n\t\t\t\t}\n\t\t\t\t$msgError .= \" {$elt} = {$values[$elt]} \";\n\t\t\t}\n\t\t\tforeach($entityParam->getPk() as $pkname => $pk){\n\t\t\t\t$query .= ' AND ' . $pkname . ' != ? ';\n\t\t\t\t$arrayFind[] = $values[$pkname];\t\t\t\n\t\t\t}\n\n\t\t\t$msgError .= '}';\n\t\t\t\n\t\t\t//Execution\n\t\t\t$result = OrmDb::getOne($query,\n\t\t\t\t\t\t\t\t\t$arrayFind,\n\t\t\t\t\t\t\t\t\t\"Database error during unicity control in OrmCore::updateEntity(OrmEntity &{$entityname})\");\n\t\t\n\t\t\tif($result != 0){\n\t\t\t\tthrow new OrmIllegalArgumentException(\"an Entity {$entityname} with the same fields ({$msgError}) already exists in database\");\n\t\t\t}\n\t\t}\n\n\t\tif($hasKey) {\n\t\t\t$params[] = $keyValue;\n\t\t}\n\n\t\t$queryUpdate = 'UPDATE '.$entityParam->getDbname().' SET '.implode(',', $str_params1).$where;\n\t\n\t\t//Execution\n\t\t$result = OrmDb::execute($queryUpdate,\n\t\t\t\t\t\t\t\t\t$params,\n\t\t\t\t\t\t\t\t\t\"Database error during OrmCore::updateEntity(OrmEntity &{$entityname})\");\n\t\t\n\t\t/*if($entityParam->isIndexable()) { \n\t\t\tOrmIndexing::UpdateWords($entityParam->getModuleName(), $entityParam);\n\t\t}*/\n\t\t\n\t\t//empty cache\n\t\tOrmCache::getInstance()->clearCache();\n\t\t\n\t\treturn $entityParam;\n\t}", "title": "" }, { "docid": "26e0fa1b10893e44db0afc08c176e157", "score": "0.59690326", "text": "function updateRecord() {\n\t\t\n\t\t$content = '';\n\t\t$formFields = $this->cleanPiVars;\n\t\t$orgId = intval($formFields['tx_kecontacts_organization']);\n\t\t$addressId = intval($this->cleanPiVars['id']);\n\t\t$formFields['tstamp'] = time();\n\t\t$fieldConf = t3lib_div::removeDotsFromTs($this->conf['formFields.']);\n\t\t\n\t\t//filter user input\n\t\tforeach($formFields as $fieldName => $fieldValue) {\n\t\t\t//consider db-mapping for self included fields in db\n\t\t\tif(strlen($fieldConf[$fieldName]['dbFieldName'])) {\n\t\t\t\t$formFields[$fieldConf[$fieldName]['dbFieldName']] = htmlspecialchars($fieldValue,ENT_QUOTES);\n\t\t\t\tunset($formFields[$fieldName]);\n\t\t\t} else {\n\t\t\t\t$formFields[$fieldName] = htmlspecialchars($fieldValue,ENT_QUOTES);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check uid of old organization to update relations later on\n\t\t$resOldOrgId = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_local','tt_address_tx_kecontacts_members_mm','uid_foreign='.$GLOBALS['TYPO3_DB']->quoteStr($addressId,'tt_address_tx_kecontacts_members_mm'));\n\t\tif($GLOBALS['TYPO3_DB']->sql_num_rows($resOldOrgId)) {\n\t\t\t$oldOrgId = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resOldOrgId);\n\t\t\t$oldOrgId = ($orgId == $oldOrgId['uid_local'])?-2:$oldOrgId['uid_local'];\n\t\t} else {\n\t\t\t$oldOrgId = -1;\n\t\t}\n\t\t\n\t\t//unset fields which are not needed for update query\n\t\t$unsetFields = array('id','submit','mode','pointer','tx_kecontacts_organization','function','sword','headerDropDown');\n\t\tforeach($unsetFields as $unsetField)\n\t\t\tunset($formFields[$unsetField]);\n\t\t\n\t\t//transform birthday to timestamp\n\t\t$bday = explode('.',$this->cleanPiVars['birthday']);\n\t\t$formFields['birthday'] = (strlen($formFields['birthday']))?mktime(0,0,0,$bday[1],$bday[0],$bday[2]):0;\n\t\t\n\t\t//update and reset timestamp\n\t\t//$GLOBALS['TYPO3_DB']->debugOutput = true;\n\t\t$resUpdateData = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_address','uid='.$addressId,$formFields);\n\t\t\n\t\tif(!$GLOBALS['TYPO3_DB']->sql_affected_rows()) {\n\t\t\t$markerArray = array(\n\t\t\t\t'ERRORTEXT' => $this->pi_getLL('error_update'),\n\t\t\t\t'STATUS' => 'fail',\n\t\t\t\t'BACKLINK' => '<a href =\"javascript: window.history.back(1);\">'.$this->pi_getLL('back_link').'</a>',\n\t\t\t);\n\t\t\t$content = $this->substituteMarkers('###GENERAL_ERROR###',$markerArray);\n\t\t\t\n\t\t\treturn $content;\n\t\t}\n\t\t\n\t\t//update relation to organization - if changed\n\t\tif($oldOrgId != -2 && $oldOrgId != -1) {\n\t\t\tif($orgId == 0) {\n\t\t\t\t//special case: organization of contact changes to \"no organization\" - delete relation\n\t\t\t\t$resDeleteData = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tt_address_tx_kecontacts_members_mm','uid_foreign='.$addressId.' AND uid_local ='.$oldOrgId);\n\t\t\t} else {\n\t\t\t\t//set new organization for contact - if changed\n\t\t\t\t$updateOrg = array('uid_local' => $orgId);\n\t\t\t\t//$GLOBALS['TYPO3_DB']->debugOutput = true;\n\t\t\t\t$resUpdateData = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_address_tx_kecontacts_members_mm','uid_foreign='.$addressId.' AND uid_local ='.$oldOrgId,$updateOrg);\n\t\t\t}\n\t\t\t\n\t\t\t//mysql error occurred\n\t\t\tif(!$GLOBALS['TYPO3_DB']->sql_affected_rows()) {\n\t\t\t\t$markerArray = array(\n\t\t\t\t\t'ERRORTEXT' => $this->pi_getLL('error_update'),\n\t\t\t\t\t'STATUS' => 'fail',\n\t\t\t\t\t'BACKLINK' => '<a href =\"javascript: window.history.back(1);\">'.$this->pi_getLL('back_link').'</a>',\n\t\t\t\t);\n\t\t\t\t$content = $this->substituteMarkers('###GENERAL_ERROR###',$markerArray);\n\t\t\t\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t} elseif($oldOrgId == -1) {\n\t\t\t//person was not connected to any organization until now, so create a new relation\n\t\t\t$insertOrgRel = array('uid_foreign' => $addressId, 'uid_local' => $orgId);\n\t\t\t$resInsertData = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tt_address_tx_kecontacts_members_mm',$insertOrgRel);\n\t\t\tif(!$GLOBALS['TYPO3_DB']->sql_affected_rows()) {\n\t\t\t\t$markerArray = array(\n\t\t\t\t\t'ERRORTEXT' => $this->pi_getLL('error_update'),\n\t\t\t\t\t'STATUS' => 'fail',\n\t\t\t\t\t'BACKLINK' => '<a href =\"javascript: window.history.back(1);\">'.$this->pi_getLL('back_link').'</a>',\n\t\t\t\t);\n\t\t\t\t$content = $this->substituteMarkers('###GENERAL_ERROR###',$markerArray);\n\t\t\t\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//return\n\t\t$successLinkConf = array(\n\t\t\t'parameter' => $GLOBALS['TSFE']->id,\n\t\t\t'additionalParams' => '&'.$this->prefixId.'[mode]=single&tx_kecontacts_pi1[id]='.$addressId,\n\t\t);\n\t\t\n\t\t$markerArray = array(\n\t\t\t'ERRORTEXT' => $this->pi_getLL('success_update'),\n\t\t\t'STATUS' => 'ok',\n\t\t\t'BACKLINK' => '',\n\t\t);\n\t\t$content = $this->substituteMarkers('###GENERAL_ERROR###',$markerArray);\n\t\t\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "562609bf216ad862560fad3d31ab9f37", "score": "0.59622353", "text": "private function Update() {\n $Update = new Update;\n $Update->ExeUpdate(self::Entity, $this->Data, \"WHERE produto_id = :id\", \"id={$this->Produto}\");\n if ($Update->getRowCount() >= 1):\n $this->Error = [\"O produto <b>{$this->Data['nome']}</b> foi atualizado com sucesso!\", WS_ACCEPT];\n $this->Result = true;\n endif;\n }", "title": "" }, { "docid": "e4e7868610ac3b121f3d75c46b3734d5", "score": "0.595777", "text": "public function update() {\r\n\t\tif (empty($this->changedData)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$update = array();\r\n\t\tforeach ($this->changedData as $index => $isNumeric) {\r\n\t\t\t$update[] = \"`{$index}` = {$this->quote($this->data[$index])}\";\r\n\t\t}\r\n\r\n\t\t$sql = \"\r\n\t\t\tUPDATE `{$this->table}`\r\n\t\t\tSET\r\n\t\t\t\t\".implode(',', $update).\"\r\n\t\t\tWHERE\r\n\t\t\t\t`{$this->primary}` = {$this->id}\r\n\t\t\tLIMIT 1;\";\r\n\t\t$database = $this->database();\r\n\t\t$database->query($sql);\r\n\t\t$database->freeResult();\r\n\r\n\t\t// Lisbeth_Entity must be in cache, since self::load() does a set if not available.\r\n\t\t$memcache = $this->memcache();\r\n\t\tif ($this->noCache) {\r\n\t\t\t$memcache->delete($this->cacheKey);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$memcache->replace($this->cacheKey, $this->data);\r\n\t\t}\r\n\r\n\t\t$this->changedData = array();\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "9d69474944a19fd29de6643caf69efd5", "score": "0.595286", "text": "abstract public function _update($obj);", "title": "" }, { "docid": "ee29fea8ac20cebdf7097d3bb1528ed3", "score": "0.59324414", "text": "public function update($data,$id);", "title": "" }, { "docid": "399204ce8bf12bc4d7870cfd24e1348b", "score": "0.59285426", "text": "public function updateRecord($formData)\n {\n }", "title": "" }, { "docid": "3963f4c7b1e6f0789b3733c1ffbc5293", "score": "0.59014654", "text": "function tmr_conf_manage_fields_form_submit($form, &$form_state){\n foreach ($form_state['values']['tmr_fields'] as $id => $field) {\n db_update('tmr_fields_table')\n ->fields(array(\n 'f_title' => check_plain($field['title']),\n 'f_weight'=> $field['weight'],\n 'date_change'=> REQUEST_TIME,\n ))\n ->condition('f_id', (int)$id)\n ->execute();\n }\n}", "title": "" }, { "docid": "8759752add8b6db67fed4d69cb0208e8", "score": "0.589282", "text": "public function update()\n\t{\n\t\tparent::update();\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "34d77cf156dd361a7f056043597aeb83", "score": "0.5884147", "text": "public function update(model $_obj){\n\n if(!$_obj->get_pk()){\n throw new db_update_exception('El id del objeto no está definido');\n }\n\n $arr_fields=[];\n $arr_values=[];\n\n\t\t$map=model::get_database_map(get_class($_obj));\n\n\t\tforeach($map->fields as $field){\n\n\t\t\t$method='get_'.$field->name;\n\t\t\t//Check method exists...\n\t\t\t$data=$_obj->$method();\n\t\t\tif(substr_count($field->type,'::')){\n\t\t\t\tif(!($data instanceof \\orm\\model)){\n\t\t\t\t\tthrow new entity_manager_exception('El objeto del campo \"'.get_class($data).'\" no es un objeto \"model\" valido');\n\t\t\t\t}\n\t\t\t\t$method_value='get_'.$field->reference;\n\t\t\t\t$value=$data->$method_value();\n\t\t\t}else{\n\t\t\t\t$value=$data;\n\t\t\t}\n\t\t\t$arr_values[$field->field]=$value;\n\n\n\t\t\tif($field->field!=$map->primary){\n\t\t\t\t$arr_fields[]=$field->field.'=:'.$field->field;\n\t\t\t}\n\t\t}\n\n\t\t$values=implode(',',$arr_fields);\n\t\t//IDEA: Store this particular statement in a static map.\n\t\t//Each time I call update upon an entity type the database has to run a\n\t\t//\"prepare\" first. We could store a map of entity:prepared_statement and\n\t\t//reuse it.\n\t\t$query=\"UPDATE `\".$map->tablename.\"` SET $values WHERE `\".$map->primary.\"`=:\".$map->primary.\" LIMIT 1\";\n\t\t$stmt=$this->dbconn->conn->prepare($query);\n\n\t\tforeach($map->fields as $field){\n\t\t\tif(is_bool($arr_values[$field->field])){\n\t\t\t\t$stmt->bindParam(\":\".$field->field,$arr_values[$field->field],\\PDO::PARAM_BOOL);\n\t\t\t}else{\n\t\t\t\t$stmt->bindParam(\":\".$field->field,$arr_values[$field->field]);\n\t\t\t}\n\t\t}\n\n\t\t$stmt->execute();\n\n return $this;\n }", "title": "" }, { "docid": "efc9cfb77186eaeb229935f393743b8a", "score": "0.58833164", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablenombre.\" set nombre_prueba=\\\"$this->nombre\\\",curso_prueba=$this->curso,tema_prueba=$this->tema,num_preguntas_prueba=$this->numpreguntas,fecha_cierra_prueba=\\\"$this->fecha_cierra\\\",ver_resultado_prueba=$this->verresultados,asignatura_prueba=$this->asignatura,fecha_abre_prueba=\\\"$this->fecha_abre\\\",grado=$this->grado where id_prueba=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "e191d94751156e8b8e11a18c6ea83389", "score": "0.587716", "text": "public function postUpdate()\n {\n }", "title": "" }, { "docid": "21911e751164889b679a36b87b0d5f3d", "score": "0.587494", "text": "public function update_fields() {\n $migration_mapping = $this->get_migration_mappings();\n $database = \\Drupal::service('database');\n $replaced_items = [];\n\n // Database table names to process and the column names that will be edited.\n // table_name => column_name.\n $fields = [\n 'resource__field_department' => 'field_department_target_id',\n 'location__field_department' => 'field_department_target_id',\n 'user__field_departments' => 'field_departments_target_id',\n 'node__field_parent_department' => 'field_parent_department_target_id',\n 'node_revision__field_parent_department' => 'field_parent_department_target_id',\n 'node__field_departments' => 'field_departments_target_id',\n 'node_revision__field_departments' => 'field_departments_target_id',\n 'node__field_city_department' => 'field_city_department_target_id',\n 'node_revision__field_city_department' => 'field_city_department_target_id',\n 'node__field_dept' => 'field_dept_target_id',\n 'node_revision__field_dept' => 'field_dept_target_id',\n 'node__field_public_body' => 'field_public_body_target_id',\n 'node_revision__field_public_body' => 'field_public_body_target_id',\n 'paragraph__field_node' => 'field_node_target_id',\n 'paragraph_revision__field_node' => 'field_node_target_id',\n 'paragraph__field_department' => 'field_department_target_id',\n 'paragraph_revision__field_department' => 'field_department_target_id',\n 'paragraph__field_agency_reference' => 'field_agency_reference_target_id',\n 'paragraph_revision__field_agency_reference' => 'field_agency_reference_target_id',\n ];\n\n // This make a direct database update and changes the value on the field.\n // Not sure yet if this should be changed to more of a node::load() and save\n // process.\n foreach ($fields as $field_name => $column_name) {\n foreach ($migration_mapping as $map) {\n $updated = $database->update($field_name)\n ->fields([$column_name => $map['new_agency_nid']])\n ->condition($column_name, $map['old_public_body_nid'], '=')\n ->execute();\n if ($updated) {\n $replaced_items[] = $map['old_public_body_nid'] . ' was replaced with ' . $map['new_agency_nid'] . ' for ' . $field_name;\n }\n }\n }\n\n if (count($replaced_items) > 0) {\n $this->output()->writeln(count($replaced_items) . ' reference values had their public body replaced with a new agency node.');\n\n // Clear caches if changes were applied.\n drupal_flush_all_caches();\n $this->output->writeln('Caches cleared.');\n }\n else {\n $this->output->writeln('No reference values were updated');\n }\n }", "title": "" }, { "docid": "d9795b7440f547de0c9ae8cab3451ecb", "score": "0.5870866", "text": "function updateInDatabase(){\n }", "title": "" }, { "docid": "5ef7ee681f8eea4e2d144139ac211e12", "score": "0.58672994", "text": "public function update() {}", "title": "" }, { "docid": "ab0521d3f75918d1a84f4712854fa1b9", "score": "0.5866865", "text": "public function update(array $data) {\n $this->checkUniqueEntry();\n foreach ($this->fieldObjects as $key => $fieldObj) {\n $fieldObj->setValue($this->fieldObjectsStack[0][$fieldObj->getName()]);\n }\n foreach ($data as $key => $value) {\n $this->fieldObjects[$key]->setValue($value);\n }\n return $this->save(false);\n }", "title": "" }, { "docid": "b4835022ae1d02ba61dceee146a2b5af", "score": "0.5862527", "text": "function hook_entity_update($entity, $type) {\n // Update the entity's entry in a fictional table of all entities.\n $info = entity_get_info($type);\n list($id) = entity_extract_ids($type, $entity);\n db_update('example_entity')\n ->fields(array(\n 'updated' => REQUEST_TIME,\n ))\n ->condition('type', $type)\n ->condition('id', $id)\n ->execute();\n}", "title": "" }, { "docid": "0c8e04a5129f91462265a22cbc8069ea", "score": "0.5854833", "text": "function c_update() {\n $this->Crud_model->m_update();\n $this->c_select();\n }", "title": "" }, { "docid": "8f12c7f1a699fa63a05af2e5f1f5be73", "score": "0.5843494", "text": "private function update() {\r\n\t\t$this->verifyAction('modify');\r\n\t\t$this->saveHistory('update');\r\n\t\t$id=$this->getId();\r\n\t\tglobal $db;\r\n\t\t$this->uploadFiles();\r\n//\t\tdebug($_POST);\r\n\t\tforeach($this->updateFields as $field) {\r\n\t\t\tif (!in_array($field,$this->readonlyFields)) {\r\n\t\t\t\tif (isset($_POST[$field])) {\r\n\t\t\t\t\t$allData[$field] = $_POST[$field];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($this->multiChoiceFields as $fieldName=>$choices) {\r\n\t\t\tif (isset($_POST[$fieldName])) {\r\n\t\t\t\t$allData[$fieldName]=','.implode(',',$_POST[$fieldName]).',';\r\n\t\t\t} else {\r\n\t\t\t\t$allData[$fieldName]='';\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($this->readonlyFields as $fieldName) {\r\n\t\t\tunset($allData[$fieldName]);\r\n\t\t}\r\n\t\tforeach($this->pwdFields as $fieldName=>$pwdFunc) {\r\n\t\t\tif (array_key_exists($fieldName,$allData)) {\r\n\t\t\t\tunset($allData[$fieldName.'_repeat']);\r\n\t\t\t\t$allData[$fieldName]=$pwdFunc($allData[$fieldName]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\t\tforeach($this->sessionFields as $sessionField=>$sessionId) {\r\n//\t\t\t$allData=array_merge($allData, array($sessionField=>$_SESSION[$sessionId]));\r\n//\t\t}\r\n//\t\tdebug($allData);\r\n//\t\tdie;\r\n\t\t\r\n\t\terror($db->autoExecute($this->tableName, $allData,DB_AUTOQUERY_UPDATE, $this->idField.'='.$id));\r\n\t\techo '更新记录成功。<br>';\r\n\t\techo '<a href=\"?do=view&'.$this->idField.'='.$id.'\">显示</a> ';\r\n\t\techo '<a href=\"?do=show\">返回</a>';\r\n\t}", "title": "" }, { "docid": "0b684026008a44871f247487577bc71b", "score": "0.5827072", "text": "public function doUpdate() {\r\n\t\t// need to set the where clause\r\n\t\t$v = $this->valueObject->getvariable();\r\n\t\t$where[] = array('variable'=>$v);\r\n\t\t$this->valueObject->getQueryObject()->setWhere($where);\r\n\r\n\t\t//$sql = $this->getSQLFactory()->prepUpdateStatement($this->valueObject);\r\n\t\t$result = $this->getDBFactory()->doUpdate($this->valueObject);\r\n\r\n\t}", "title": "" }, { "docid": "7f0dfeb5432ed28a17e1aa67ee504a8d", "score": "0.5816322", "text": "function updateEntity()\n {\n $this->manager->flush();\n }", "title": "" }, { "docid": "5f7733aa34e00ec31e9a958653eca22b", "score": "0.5814499", "text": "public function testUpdateMetaform()\n {\n }", "title": "" }, { "docid": "d16d32440e89b8f31c0ca259c26f0400", "score": "0.58113873", "text": "public function update() {\r\n\t\t$this->_update();\r\n\t}", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5807491", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5807491", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5807491", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5807491", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5807491", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "4b2160a3c1cf551f77b0b7e63ad6ecd7", "score": "0.58025086", "text": "function saveInto(DataObject $record) {\n\t\t// CMS sometimes tries to set the value to one.\n\t\tif(is_array($this->value)){\n\t\t\t$newFields = array();\n\t\t\t\n\t\t\t// Sort into proper array\n\t\t\t$value = ArrayLib::invert($this->value);\n\t\t\t$dataObjects = $this->sortData($value, $record->ID);\n\t\t\t\n\t\t\t// New fields are nested in their own sub-array, and need to be sorted separately\n \t\t\tif(isset($dataObjects['new']) && $dataObjects['new']) {\n \t\t\t\t$newFields = $this->sortData($dataObjects['new'], $record->ID);\n \t\t\t}\n\n\t\t\t// Update existing fields\n\t\t\t// @todo Should this be in an else{} statement?\n\t\t\t$savedObjIds = $this->saveData($dataObjects, $this->editExisting);\n\t\t\t\n\t\t\t// Save newly added record\n\t\t\tif($savedObjIds || $newFields) {\n\t\t\t\t$savedObjIds = $this->saveData($newFields,false);\n \t\t\t}\n\n\t\t\t// Optionally save the newly created records into a relationship\n\t\t\t// on $record. This assumes the name of this formfield instance\n\t\t\t// is set to a relationship name on $record.\n\t\t\tif($this->relationAutoSetting) {\n\t\t\t\t$relationName = $this->Name();\n\t\t\t\tif($record->has_many($relationName) || $record->many_many($relationName)) {\n\t\t\t\t\tif($savedObjIds) foreach($savedObjIds as $id => $status) {\n\t\t\t\t\t\t$record->$relationName()->add($id);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update the internal source items cache\n\t\t\t$this->value = null;\n\t\t\t$items = $this->sourceItems();\n\t\t\t\n\t\t\tFormResponse::update_dom_id($this->id(), $this->FieldHolder());\n\t\t}\n\t}", "title": "" }, { "docid": "f5e94f1767f0ae8d2d7c8e9d0b2ed895", "score": "0.57968354", "text": "public function updateFromForm(array $data);", "title": "" }, { "docid": "5e03ba65b29defdeba587ef0c7bfcd57", "score": "0.5796074", "text": "public function update(){\n $this->create_meta();\n $this->clean_tags();\n $this->convert_tags();\n $this->create_relation_tag();\n $sql = \"UPDATE posts SET title = '$this->title', category = $this->category, content = '$this->content', picture = '$this->picture', meta = '$this->meta' WHERE id = $this->id LIMIT 1\";\n $status = $this->Connect->set($sql);\n return $status;\n }", "title": "" }, { "docid": "09d175b074b0d50194ce45bdf99c365f", "score": "0.5792043", "text": "public function update() {\n\t\t$db = new DB();\t\t\n $data = $this->loadData();\n $db->update($data, $this->tableName, 'id = '. $this->id);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f3154d98defe26c4c7bfb18bed8226f8", "score": "0.5791624", "text": "function procEditField($ar) {\n global $XLANG;\n $XLANG->getCodes();\n $p=new XParam($ar,array('batch'=>'0','options'=>NULL));\n $field=$p->get('field');\n $def=$this->desc[$field];\n // Pour chaque parametre, on verifie si une nouvelle valeur est spécifiée, sinon on garde l'ancienne\n $ftype=$p->get('ftype');\n if(!$ftype) $ftype=$def->get_ftype();\n $fcount=$p->get('fcount');\n if(!$fcount) $fcount=$def->get_fcount();\n $forder=$p->get('forder');\n if(!empty($forder)) {\n $forder = $this->_guessFieldOrder($forder);\n } else {\n $forder = $def->get_forder();\n }\n $compulsory=$p->get('compulsory');\n $compulsory_hid=$p->get('compulsory_HID');\n if(!$compulsory && $compulsory!==false && $compulsory_hid!=2) $compulsory=$def->get_compulsory();\n else $compulsory=($compulsory=='on'?1:0);\n $queryable=$p->get('queryable');\n $queryable_hid=$p->get('queryable_HID');\n if(!$queryable && $queryable!==false && $queryable_hid!=2) $queryable=$def->get_queryable();\n else $queryable=($queryable=='on'?1:0);\n $browsable=$p->get('browsable');\n $browsable_hid=$p->get('browsable_HID');\n if(!$browsable && $browsable!==false && $browsable_hid!=2) $browsable=$def->get_browsable();\n else $browsable=($browsable=='on'?1:0);\n $translatable=$p->get('translatable');\n $translatable_hid=$p->get('translatable_HID');\n if(!$translatable && $translatable!==false && $translatable_hid!=2) $translatable=$def->get_translatable();\n else $translatable=($translatable=='on'?1:0);\n $multivalued=$p->get('multivalued');\n $multivalued_hid=$p->get('multivalued_HID');\n if(!$multivalued && $multivalued!==false && $multivalued_hid!=2) $multivalued=$def->get_multivalued();\n else $multivalued=($multivalued=='on'?1:0);\n $published=$p->get('published');\n $published_hid=$p->get('published_HID');\n if(!$published && $published!==false && $published_hid!=2) $published=$def->get_published();\n else $published=($published=='on'?1:0);\n $label=$p->get('label');\n $target=$p->get('target');\n if(empty($target)) $target=$def->get_target();\n $batch=$p->get('batch');\n $options=$p->get('options');\n $error=false;\n\n // Remplissage des options non definit\n $def->_options->procDialog($def,$options);\n if(!$this->fieldDescIsCorrect($field,$ftype,$fcount,$forder,$compulsory,$queryable,$browsable,$translatable,$multivalued,$published,\n\t\t\t\t $target,$label)) {\n $message='Incorrect description ! Try again.<br/>';\n $error=true;\n }else{\n $this->sql_changeFieldDesc($field,$ftype,$fcount,$forder,$compulsory,$queryable,$browsable,$translatable,$multivalued,$published,\n\t\t\t\t $target,$label,$XLANG->codes,$options);\n $this->majOtherFieldOrder($field,$def->get_forder(),$forder);\n $this->sql_changeField($field,$ftype,$fcount);\n $this->changeDesc($field,$ftype,$fcount,$forder,$compulsory,$queryable,$browsable,$translatable,$multivalued,$published,$target,\n\t\t\t$label);\n $message.='Field '.$field.' modified.<br/>';\n }\n // Convertit les données présentes en base si necessaire\n $this->desc[$field]->convertValues($def->get_ftype());\n\n // Efface le cache\n XDbIni::clear('modules'.$this->base);\n // efface le cache des chronos\n XDbIni::clear('Chrono%'.$this->base.'%');\n return array('message'=>$message,'error'=>$error);\n }", "title": "" }, { "docid": "4b8d4362ce3cb4d0c8bd0293daeeebc0", "score": "0.5790929", "text": "public function processUpdate() {\r\n\t\t$columnValues = $this->getPostedColumnValues();\r\n\t\t$this->model->update($this->table, $columnValues, $this->id);\r\n\t}", "title": "" }, { "docid": "24a9ffe17c1c89ca5d2260b8a4d25656", "score": "0.5787564", "text": "public function update(){\n $sql = \"UPDATE \".self::$tablename.\" SET fecha='$this->fecha' ,descripcion='$this->descripcion' WHERE id_estado_garantiza=$this->id_estado_garantiza and nr_orden_garantiza=$this->nr_orden_garantiza\";\n\n return Executor::doit($sql);\n\n }", "title": "" }, { "docid": "95a77235e221f6d58949972bf9ba43b6", "score": "0.5786976", "text": "public function upsertData(){\n\n\t\t$doc = new Document();\n\n\n\n\t\t$indexName = \"doo\";\n\t\t$indexTypeName = \"dooType\";\n\t\t$client\t\t\t= $this->createClient();\t\t\t\n\t\t$index\t\t\t= $client->getIndex($indexName);\n\t\t$type\t\t\t\t= $index->getType($indexTypeName);\n\n\t\t$val['title'] = \"illanare2\";\t\n\t\t$val['name']['firstname'] = \"도끼토끼\";\t\n\t\t$val['level'] = 2;\t\n\n\n\t\t$doc->setData($val);\n\t\t$doc->setId(2);\n\t\t$type->updateDocument($doc); \n\n\n\n\n\t}", "title": "" }, { "docid": "458b1a29a90b10d21bd045fcd9834de1", "score": "0.5783396", "text": "function brainstorm_update_instance($brainstorm) {\r\n\r\n $brainstorm->id = $brainstorm->instance;\r\n $brainstorm->timemodified = time();\r\n\r\n $context = get_context_instance(CONTEXT_MODULE, $brainstorm->coursemodule);\r\n \r\n $oldrecord = get_record('brainstorm', 'id', $brainstorm->id);\r\n \r\n // check for some changes that imply some cleaning\r\n if ($oldrecord->singlegrade != $brainstorm->singlegrade){\r\n $participants = get_users_by_capability($context, 'mod/brainstorm:gradable', 'id,firstname,lastname', 'lastname');\r\n if ($brainstorm->singlegrade){ // we are setting up single grades. compile the single grade with dissociated\r\n foreach($participants as $participant){\r\n brainstorm_convert_to_single($brainstorm, $participant->id);\r\n }\r\n }\r\n else{ // we are setting dissociated grading for which we MUST delete grades\r\n delete_records('brainstorm_grades', 'brainstormid', $brainstorm->id);\r\n }\r\n }\r\n\r\n return update_record('brainstorm', $brainstorm);\r\n}", "title": "" }, { "docid": "f158aab770291f3f07e04f222ef1b878", "score": "0.5779289", "text": "public function updateStuff($data) {\n\n\t}", "title": "" }, { "docid": "c37580590cfb1b1fabab8a3db5c6b913", "score": "0.5774935", "text": "protected function update()\n {\n }", "title": "" }, { "docid": "1be29b3d00b41ba5a1da5e88ef1d1464", "score": "0.5774658", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n CRUD::addField([\n // 1-n relationship\n 'type' => 'select2',\n 'name' => 'status_id', // the column that contains the ID of that connected entity;\n 'entity' => 'statuss', // the method that defines the relationship in your Model\n 'attribute' => 'title', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\Status\", // foreign key model\n 'tab' => 'общая информация',\n 'allows_null' => false\n ]);\n }", "title": "" }, { "docid": "82d1f78ba6fa14605a47c014beba680d", "score": "0.57573146", "text": "function update($entity, array $values);", "title": "" }, { "docid": "20159f049fec57a1fc217379cb02f0ef", "score": "0.5756434", "text": "public abstract function update($class, $fields, $idArray);", "title": "" }, { "docid": "8bdf20cc3ba290c2b15205965672a445", "score": "0.5755096", "text": "public function updateRecord() {\n $model = self::model()->findByPk(array('id_product' => $this->id_product, 'id_feature' => $this->id_feature));\n\n //model is new, so create a copy with the keys set\n if (null === $model) {\n //we don't use clone $this as it can leave off behaviors and events\n $model = new self;\n $model->id_product = $this->id_product;\n $model->id_feature = $this->id_feature;\n }\n $model->id_feature_value = $this->id_feature_value;\n $model->save(false);\n return $model;\n }", "title": "" }, { "docid": "30ec0d064bbcecba082fab43e9c61125", "score": "0.5750482", "text": "public function saveInYf(): void\n\t{\n\t\tforeach ($this->dataYf as $key => $value) {\n\t\t\t$this->recordModel->set($key, $value);\n\t\t}\n\t\tif ($this->recordModel->isEmpty('assigned_user_id')) {\n\t\t\t$this->recordModel->set('assigned_user_id', $this->synchronizer->config->get('assigned_user_id'));\n\t\t}\n\t\tif (\n\t\t\t$this->recordModel->isEmpty('woocommerce_id')\n\t\t\t&& $this->recordModel->getModule()->getFieldByName('woocommerce_id')\n\t\t\t&& !empty($this->dataApi['id'])\n\t\t) {\n\t\t\t$this->recordModel->set('woocommerce_id', $this->dataApi['id']);\n\t\t}\n\t\t$this->recordModel->set('woocommerce_server_id', $this->synchronizer->config->get('id'));\n\t\t$isNew = empty($this->recordModel->getId());\n\t\t$this->recordModel->save();\n\t\t$this->recordModel->ext['isNew'] = $isNew;\n\t\tif ($isNew && $this->recordModel->get('woocommerce_id')) {\n\t\t\t$this->synchronizer->updateMapIdCache(\n\t\t\t\t$this->recordModel->getModuleName(),\n\t\t\t\t$this->recordModel->get('woocommerce_id'),\n\t\t\t\t$this->recordModel->getId()\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "de6de016efa70f12195f77cc98eaf9ce", "score": "0.57503253", "text": "public function Updated()\n {\n $this->Entity->MessageId->Value = $this->sujetId;\n $this->Entity->UserId->Value = $this->Core->User->IdEntite;\n $this->Entity->DateCreated->Value = Date::Now();\n\n parent::updated();\n }", "title": "" }, { "docid": "3dd65c95f818ba9ec2e7052a9f2b5f9e", "score": "0.5743202", "text": "protected function update () {\n\n }", "title": "" } ]
bc5ed32e6db1e86c8af4c3437b0a922d
Function to get the count of message
[ { "docid": "8610c7fd5d8ed0924eb09812bb51835b", "score": "0.0", "text": "function get_count_list() { \n\t\n\t\t$this->db->select('count(*) as total');\n\t\t$this->db->from(DB_PREFIX.'broadcast');\t\n\t\t$query = $this->db->get();\n\t\n\t\t$result = $query->result();\n\t\t\n\t\treturn $result;\n\t}", "title": "" } ]
[ { "docid": "431f78f319409870247890f9bdf7a4d4", "score": "0.83822", "text": "public function getCount()\n {\n return $this->get('msg_count');\n }", "title": "" }, { "docid": "3875a6055e7a1702da1502384187f751", "score": "0.83359265", "text": "public function count() {\n return count($this->messages);\n }", "title": "" }, { "docid": "96e67ccb0121c935a2b16c40c82ccbfd", "score": "0.8300112", "text": "function get_messages_count()\n\t{\n\t\t$query = \"SELECT COUNT(*) AS count FROM yacrs_message_tag_link WHERE tag_id = {$this->id};\";\n\t\t$result = dataConnection::runQuery($query);\n\t\tif($result == false)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn $result['0']['count'];\n\t}", "title": "" }, { "docid": "2b88db96091c2808e8230d0bc02a84ef", "score": "0.82827", "text": "public function get_message_count()\n\t{\n\t\t$json_count = array();\n\n\t\t$this->query = 'SELECT COUNT(*) as count FROM '.$this->table_prefix.'message';\n\n\t\t$items = $this->db->query($this->query);\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$count = $item->count;\n\t\t\tbreak;\n\t\t}\n\n\t\tif ($this->response_type == 'json' OR $this->response_type == 'jsonp')\n\t\t{\n\t\t\t$json_count[] = array(\"count\" => $count);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$json_count['count'] = array(\"count\" => $count);\n\t\t\t$this->replar[] = 'count';\n\t\t}\n\n\t\t// Create the JSON array\n\t\t$data = array(\n\t\t\t\t\"payload\" => array(\n\t\t\t\t\"domain\" => $this->domain,\n\t\t\t\t\"count\" => $json_count\n\t\t\t),\n\t\t\t\"error\" => $this->api_service->get_error_msg(0)\n\t\t);\n\n\t\t$this->response_data = ($this->response_type == 'json' OR $this->response_type == 'jsonp')\n\t\t\t? $this->array_as_json($data)\n\t\t\t: $this->array_as_xml($data, $this->replar);\n\t}", "title": "" }, { "docid": "9a3fe684da81f95a22dae88fa33187ba", "score": "0.8262916", "text": "public function count() {\n\t\treturn count($this->messages);\n\t}", "title": "" }, { "docid": "097b9c33ddaae8a209260f01e36084dd", "score": "0.82034254", "text": "public function count()\n {\n return count($this->messages);\n }", "title": "" }, { "docid": "7fd93303f4cf6ae2d92ca6d568c785c5", "score": "0.8172224", "text": "public function count()\n {\n return count($this->_messages);\n }", "title": "" }, { "docid": "b53bcf333a49442617b7d44f070ef8f0", "score": "0.8097025", "text": "public function getMessageCount() {\n $sql = 'SELECT COUNT(cmid) FROM {custom_chat_message} WHERE cid = :cid';\n return db_query($sql, array(':cid' => $this->get('cid')))->fetchField();\n }", "title": "" }, { "docid": "a7eebf7a5e99d7a12011201ca590543e", "score": "0.8067766", "text": "public function countMessages(){\n\t\t\t\t\t return count($this->listeMessages());\n\t\t\t\t\t }", "title": "" }, { "docid": "d82e248743b5a4f213401813ffd8b7ec", "score": "0.80254596", "text": "public function count()\n {\n return $this->messages->count();\n }", "title": "" }, { "docid": "b1554ec4a666f57b03a475cda2095ca6", "score": "0.7966895", "text": "public function count()\n {\n $userObj = new user();\n $userId = $_SESSION['user_id'];\n $userType = $userObj->getUserType($userId);\n $message = [\"sent\" => 0, \"received\" => 0, \"not read\" => 0];\n try {\n $notRead = R::getAll(\"SELECT id,sender,message,created_on FROM message WHERE receiver='$userType' AND status='0'\");\n $this->count = count($notRead);\n if ($this->count > 0) {\n $this->head = \"You have \" . $this->count . \" messages\";\n }\n } catch (Exception $e) {\n error_log(\"MESSAGE(count):\" . $e);\n }\n return $message;\n }", "title": "" }, { "docid": "e3f06415ac0ff2f5cc9170d461d19188", "score": "0.7823704", "text": "public function count() {\r\n if ($this->hasMessages()) {\r\n $count = 0;\r\n foreach (parent::getMessages() as $messages) {\r\n $count += count($messages);\r\n }\r\n return $count;\r\n }\r\n return 0;\r\n }", "title": "" }, { "docid": "ffae0ecccc80f92f3c849ac663089ba1", "score": "0.77650946", "text": "public function getCountMessageAttribute() {\n return Message::where('receiver_id', $this->attributes['id'])->count();\n }", "title": "" }, { "docid": "e1ff61a74eb8fc7d2437ae4c7a17b5e8", "score": "0.7757569", "text": "public function count()\n {\n return (int)$this->getAttribute('ApproximateNumberOfMessages');\n }", "title": "" }, { "docid": "3d54d9dc2be9dab71a8c4fce9c6c7a22", "score": "0.76633763", "text": "function imap_num_msg ($imap_stream) {}", "title": "" }, { "docid": "334ec959d91000916eaafd0bbd4aabe8", "score": "0.7580873", "text": "public function canCountMessages();", "title": "" }, { "docid": "ac85509cf666bc4cc04206e1957f556c", "score": "0.74718857", "text": "public function getMessageCounts()\n {\n return $this->container->MessageCounts->getMessageCounts( $this->getId() );\n }", "title": "" }, { "docid": "f16b8cfc41ee4bd6ef706cc9f45b33d7", "score": "0.7439288", "text": "#[\\ReturnTypeWillChange]\n public function count()\n {\n return count($this->messages, COUNT_RECURSIVE) - count($this->messages);\n }", "title": "" }, { "docid": "e6e1f86da0e4901fbad5488533767639", "score": "0.739884", "text": "public function getMessageCountAttribute ()\n {\n $this->loadMissing('messages');\n\n return $this->messages->count();\n }", "title": "" }, { "docid": "c2fcfd9251261e13d575fc04a5caa759", "score": "0.7391422", "text": "public function countSMS()\n {\n \treturn count(str_split($this->message, self::LIMIT));\n }", "title": "" }, { "docid": "b23452ca45094cf9e90dac6838402b18", "score": "0.73242897", "text": "public static function count_read_messages_returns() {\n return new external_value(PARAM_INT, 'return a count of messages');\n }", "title": "" }, { "docid": "3d3ba0a77d07aaadce289ec083e6489c", "score": "0.7308399", "text": "public function count()\n {\n return $this->replySize;\n }", "title": "" }, { "docid": "b9af4c49edad16ab19f948c22e8dc9aa", "score": "0.7259312", "text": "public function get_forsale_messages_count()\n\t{\n $this->db->where('status', 0);\n $query = $this->db->get('conversation_messages');\n return $query->num_rows();\n\t}", "title": "" }, { "docid": "5b0bfe68b902fea90ca8d4daf73b4efe", "score": "0.72158307", "text": "public function count(): int\n\t{\n\t\treturn count($this->notices);\n\t}", "title": "" }, { "docid": "c72be8c4936b8139a71171af05f8a46c", "score": "0.7172178", "text": "public function actionCount()\n {\n return Message::find()->byRecipient()->unread()->count();\n }", "title": "" }, { "docid": "0b6b81fe0e8a3517afad1befbcb18dde", "score": "0.7159214", "text": "function mailCount()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $query = \"SELECT Count( Mail.ID ) as Count FROM eZMail_Mail AS Mail, eZMail_MailFolderLink AS Link\r\n WHERE Mail.ID=Link.MailID AND Link.FolderID='$this->ID'\";\r\n $db->query_single( $result, $query );\r\n return $result[$db->fieldName(\"Count\")];\r\n }", "title": "" }, { "docid": "1d1287b0a3daa15e42bd678cd9dc006a", "score": "0.70794237", "text": "public function count () {}", "title": "" }, { "docid": "1d1287b0a3daa15e42bd678cd9dc006a", "score": "0.70794237", "text": "public function count () {}", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.703921", "text": "public function count();", "title": "" }, { "docid": "b29b040a76fa01334251a586eed4c5c5", "score": "0.7029056", "text": "public function numMessages() {\n if (!isset($this->_numMessages))\n $this->_numMessages = imap_num_msg($this->stream);\n return $this->_numMessages;\n }", "title": "" }, { "docid": "4f762b1f358cd54026b3f2686ac1b6d4", "score": "0.7022876", "text": "public function unreadMessagesCount()\n {\n return Message::unreadForUser($this->getKey())->count();\n }", "title": "" }, { "docid": "4f762b1f358cd54026b3f2686ac1b6d4", "score": "0.7022876", "text": "public function unreadMessagesCount()\n {\n return Message::unreadForUser($this->getKey())->count();\n }", "title": "" }, { "docid": "038ee3f9788d56cedb67fc84ba716346", "score": "0.7002602", "text": "public static function count_unread_messages_returns() {\n return new external_value(PARAM_INT, 'return a count of messages');\n }", "title": "" }, { "docid": "156406cc1274bfa6ffc8492a519b0f57", "score": "0.6972472", "text": "function getReceiverCount() {\r\n $subscriber_handler = xoops_getmodulehandler('subscriber', 'smartmail');\r\n $criteria = new CriteriaCompo(new Criteria('newsletterid', $this->newsletter->getVar('newsletter_id')));\r\n $subscribercount = $subscriber_handler->getCount($criteria);\r\n return $subscribercount;\r\n }", "title": "" }, { "docid": "f6949d5c520f79b51c1da911ea58561d", "score": "0.6962857", "text": "public function getTotalMessages() {\n\t\t// Count the messages in the participants table\n\t\treturn PersonalMessageParticipant::model()->count('user_id=:id', array(':id' => Yii::app()->user->id));\n\t}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "2096b726781aa21807a3620a9df0dee9", "score": "0.6954245", "text": "public function count() {}", "title": "" }, { "docid": "f245675ab95217bb175993a3be1b0c12", "score": "0.69450384", "text": "function getNumMsgs($userID) {\r\n\t$totalUnread = good_query_table(\"SELECT * FROM msgs_rec WHERE recipient_id = '$userID' AND status = '2'\");\r\n\treturn count($totalUnread);\r\n}", "title": "" }, { "docid": "188afae8f03e082de1568c613cfa0ae7", "score": "0.6928777", "text": "protected function countEachUnreadMessage (){\n $id = Sentinel::getUser()->id;\n\n // $count = Message::where('is_read', '0')\n // ->where('receiver_id_fk', $id)\n // ->where('deleted_at_receiver', null)\n // ->where('box_type','1')\n // ->count();\n\n $count = DB::table('messages') //count(case when box_type = '0' then 1 else null end) AS '0',\n ->select( DB::raw (\"count(case when box_type = '1' then 1 else null end) as '1',\n count(case when box_type = '2' then 1 else null end) as '2',\n count(case when box_type = '3' then 1 else null end) as '3'\"))\n // count(case when box_type = '4' then 1 else null end) as '4',\n // count(case when box_type = '5' then 1 else null end) as '5',\n // count(case when box_type = '6' then 1 else null end) as '6',\n // count(case when box_type = '7' then 1 else null end) as '7',\n // count(case when box_type = '8' then 1 else null end) as '8',\n // count(case when box_type = '9' then 1 else null end) as '9'\"))\n ->where('is_read', '0')\n ->where('receiver_id_fk', $id)\n ->where('deleted_at_receiver', null)\n ->first();\n\n return Response::json($count);\n }", "title": "" }, { "docid": "1d1c09ea60f28b1782a940f8874523b3", "score": "0.6919555", "text": "function get_count($parsed_data) {\r\n switch ($this->type) {\r\n case 'topics':\r\n $count = count($parsed_data->data);\r\n break;\r\n case 'entries':\r\n $count = count($parsed_data->data);\r\n break;\r\n default:\r\n $count = 0;\r\n break;\r\n }\r\n return $count;\r\n }", "title": "" }, { "docid": "fdddf05c57cbcbb2cfab051e56f88a86", "score": "0.6917243", "text": "function _howmany ()\n\t{\n\t\t$this->_write(\"STAT\");\n\t\t$results = $this->_read();\n\t\tlist ( $results, $messages, $bytes ) = split(\" \", $results);\n\t\treturn $messages;\n\t}", "title": "" }, { "docid": "9bbf1dc00d7811eddaa149208ab0358b", "score": "0.69131935", "text": "public function no_of_rows_services_message_list()\n\t{\n\t\t\n\t\t$sql=\"select * from services_message\t order by services_message_id DESC\";\n\t\t$query=$this->db->query($sql);\n\t\treturn $query->num_rows;\n\t}", "title": "" }, { "docid": "c575bc49af3d5f8913bedf66f7a5bc86", "score": "0.6912871", "text": "function fetch_individual_msg_count($conn, $user, $to_user){\r\n $query = \"SELECT * FROM chat WHERE user_one='$to_user' AND user_two='$user' AND is_read='unread'\";\r\n $result = mysqli_query($conn, $query);\r\n $count = mysqli_num_rows($result);\r\n\r\n if($count == 0){\r\n $count = \"\";\r\n }\r\n else{\r\n $count = \"<span>\". $count .\"</span>\";\r\n }\r\n return $count;\r\n }", "title": "" }, { "docid": "e1f8113eac46f4ad6bba740a4409da19", "score": "0.68912256", "text": "public function count() : int;", "title": "" }, { "docid": "3aaf36857b941ea3bbb0e618d3de4449", "score": "0.68654984", "text": "public function newMessagesCount()\n {\n return count($this->threadsWithNewMessages());\n }", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "4b22d22d893fbdf8adc4f65c6bb9101c", "score": "0.6863225", "text": "public function count(): int;", "title": "" }, { "docid": "643accde3ca682b6094eca2e029c06dc", "score": "0.6846641", "text": "public function getUnreadMessageCount(){\n $newMessage = $contacthostMessage = $replyMessage = array();\n $hostId = $this->customerSession->getId();\n $contactHost = $this->_contactHost->create()->addFieldToFilter('read_flag', 0)->addFieldToFilter('receiver_id', $hostId);\n foreach ($contactHost->getData() as $key => $_contactHost){\n $contacthostMessage[] = $_contactHost;\n $contacthostMessage[$key]['flag'] = 1;\n }\n $custmerReply = $this->_customerreply->create()->addFieldToFilter('is_read', 0)->addFieldToFilter('receiver_id', $hostId);\n foreach ($custmerReply->getData() as $key =>$_custmerReply){\n $replyMessage [] = $_custmerReply;\n $replyMessage[$key]['flag'] = 0;\n } \n $newMessage = array_merge($contacthostMessage,$replyMessage);\n return array (\n 'messagecount' => $contactHost->getSize() + $custmerReply->getSize(), \n 'message' => $newMessage );\n }", "title": "" }, { "docid": "315af0079f30c3d0c3f191b0b9f242b3", "score": "0.683678", "text": "public function count()\n {\n $adapter = $this->getAdapter();\n if (!$adapter instanceof CountMessagesCapableInterface) {\n throw new Exception\\UnsupportedMethodCallException(__FUNCTION__ . '() is not supported by ' . get_class($this->getAdapter()));\n }\n\n return $adapter->countMessages($this);\n }", "title": "" }, { "docid": "6925da70eb2f224ca71a45ea516ebfda", "score": "0.6829126", "text": "public function getUnreadMessageCount();", "title": "" }, { "docid": "362ee346a208d1488c8dd9eb33f2e906", "score": "0.6826908", "text": "public function count()\n {\n \treturn 0;\n }", "title": "" }, { "docid": "7acca31fdd8c4f28239c6753bad05e35", "score": "0.68215305", "text": "public function unreadMessagesCount()\n {\n return count($this->unreadMessages());\n }", "title": "" }, { "docid": "13680f59d670e37d033112d4a594cc18", "score": "0.6809989", "text": "public function numMsg($stream)\n {\n return imap_num_msg($stream);\n }", "title": "" }, { "docid": "7f1dc25da87f60b82200b931e993c2cc", "score": "0.6809067", "text": "public function getNewCount() {\n if ($response = $this->podio->get('/notification/inbox/new/count')) {\n return json_decode($response->getBody(), TRUE);\n }\n }", "title": "" }, { "docid": "e793e253d1cce464752745e3b7490629", "score": "0.6797837", "text": "function get_tags_count()\n\t{\n\t\t$query = \"SELECT COUNT(*) AS count FROM yacrs_message_tag_link WHERE message_id = {$this->id};\";\n\t\t$result = dataConnection::runQuery($query);\n\t\tif($result == false)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn $result['0']['count'];\n\t}", "title": "" }, { "docid": "c83e2990e62ee0a938d087e154f8d6d0", "score": "0.6796566", "text": "public function findCount();", "title": "" }, { "docid": "8915c626b6f99bab5f665029c3d29fe6", "score": "0.6794624", "text": "public function unreadMessageCount ()\n {\n return count(Message::where('recipient_id', $this->id)->where('read', 0)->get());\n }", "title": "" }, { "docid": "70051c00feb011f7aca2cf4dbe715dc3", "score": "0.6791366", "text": "public static function imap_count_unread()\n\t{\n\t\t$total_messages = 0;\n\t\t\n\t\tforeach (static::$_imap_connections AS $connection)\n\t\t{\n\t\t\t$imap_object = imap_check($connection);\n\t\t\t$total_messages = $total_messages + (int)$imap_object->Nmsgs;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $total_messages;\n\t\t\n\t}", "title": "" }, { "docid": "2bb0b3383de39b5ceb87049382222b79", "score": "0.6785958", "text": "public function unreadCount()\n {\n $messages = Message::where(['displayed' => 0, 'recipient_id' => $this->id])->cursor();\n\n $user_ids = [];\n $users = [];\n\n foreach($messages as $message)\n {\n if(!in_array($message->sender_id, $user_ids))\n $user_ids[] = $message->sender_id;\n }\n foreach($user_ids as $id)\n {\n $users[] = User::find($id);\n }\n $users = array_filter($users, function($id) {\n return ($this->hasContact($id));\n });\n\n return count($users);\n }", "title": "" }, { "docid": "1b68be8ae3d36baeec2c92cf6c69890d", "score": "0.6780859", "text": "public function unreadCounter()\n {\n return Conversation::whereHas('messages.status', function ($query) {\n $query->where('status', 0)->where('user_id', $this->id);\n })->count();\n }", "title": "" }, { "docid": "6c127431b7c7080e69676bf329a0097c", "score": "0.67716986", "text": "public function countMessages($admin = FALSE){\n\t\tif($admin == TRUE){\n\t\t\t$sql = \"SELECT COUNT(id) FROM messages\";\n\t\t}\n\t\telse{\n\t\t\t$sql = \"SELECT COUNT(id) FROM messages WHERE active='1'\";\n\t\t}\n\t\t$query = $this->db->query($sql);\n\n\t\t$result = $query->result_array();\n\n\t\treturn $result[0]['COUNT(id)'];\n\t}", "title": "" }, { "docid": "966ede56d2a58df4e8766a2dadfc56a2", "score": "0.67575467", "text": "function fetch_total_msg_count($conn, $user){\r\n $query = \"SELECT * FROM chat WHERE user_two='$user' AND is_read='unread'\";\r\n $result = mysqli_query($conn, $query);\r\n $count = mysqli_num_rows($result);\r\n\r\n if($count == 0){\r\n $count = \"\";\r\n }\r\n else{\r\n $count = \"<span>\". $count .\"</span>\";\r\n }\r\n return $count;\r\n }", "title": "" }, { "docid": "b1ab15d5f80989908deaf00bd3374618", "score": "0.67442083", "text": "public function getCount(array $options = array()) {\n\t\t$options['count'] = true;\n\t\treturn $this->getMessages($options);\n\t}", "title": "" }, { "docid": "19df4e798c15de49eef51068a57df6df", "score": "0.67436284", "text": "function countMessages( $ID )\n {\n $db =& eZDB::globalDatabase();\n \n $query_id = mysql_query(\"SELECT COUNT(ID) AS Messages\n FROM eZForum_Message\n WHERE ForumID='$ID'\n AND Parent IS NULL AND IsTemporary='0'\")\n or die(\"eZForumMessage::countMessages($ID) failed, dying...\");\n \n return mysql_result($query_id,0,\"Messages\");\n }", "title": "" }, { "docid": "d24d363e37d70d6f413647c4f4d1d40f", "score": "0.67331296", "text": "public function getCountsAction()\n {\n \t// action body\n \t$cnt = \\Extended\\message::getMailCounts(Auth_UserAdapter::getIdentity()->getId());\n \t$cnt_arr = array(); // creating a new array to make msg_type as the key of each sub array\n \tforeach($cnt as $count){\n \t\t$cnt_arr[$count['message_type']] = $count;\n \t}\n \techo Zend_Json::encode($cnt_arr);\n \tdie;\n }", "title": "" }, { "docid": "9a3db29c6f2e64aed218373753e5ec08", "score": "0.67198867", "text": "public function getunreadmessagecount()\n {\n // Fetch the request data in JSON format and convert it into object\n $request_data = $this->request->input('json_decode');\n $chatCountArray = array();\n switch (true) {\n // When request is not made using POST method\n case!$this->request->isPost() :\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Request cannot be empty.';\n break;\n // Request is valid and phone no, user_token and relationship_id are present\n case!empty($request_data) && !empty($request_data->phone_no) && !empty($request_data->user_token): // && !empty($request_data->relationship_id):\n // Check if phone no exists\n $data = $this->User->findUser($request_data->phone_no);\n\n // Check if record exists\n if (count($data) != 0) {\n // Check user is verified\n if ($data[0]['User']['verified'] !== true) {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User not verified';\n } else { // Credentials are valid\n \n $relationship_id = isset($request_data->relationship_id) ? $request_data->relationship_id :'';\n // Fetch the chat records, starting from the last chat id, if present\n $chatCountArray = $this->Chat->fetchUnreadMessageCount($data, $relationship_id );\n\n if (count($chatCountArray) > 0) {\n $success = true;\n $status = SUCCESS;\n $message = 'Chat message(s) found.';\n } else {\n $success = false;\n $status = SUCCESS;\n $message = 'chat message(s) not found.';\n }\n \n }\n }\n // Return false if record not found\n else {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User not registered.';\n }\n break;\n // Phone no. blank in request\n case!empty($request_data) && empty($request_data->phone_no):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Phone no. cannot be blank.';\n break;\n // User Token blank in request\n case!empty($request_data) && empty($request_data->user_token):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'User token cannot be blank.';\n break;\n /*// Relationship Id blank in request\n case!empty($request_data) && empty($request_data->relationship_id):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Relationship Id cannot be blank.';\n break;*/\n // Parameters not found in request\n case empty($request_data):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Request cannot be empty.';\n break;\n }\n\n $out = array(\n \"success\" => $success,\n \"message\" => $message,\n \"chatCountArray\" => $chatCountArray\n );\n \n \n return new CakeResponse(array('status' => $status, 'body' => json_encode($out), 'type' => 'json'));\n }", "title": "" }, { "docid": "37e71b317f4c78c220d4a153ca2789c2", "score": "0.6709935", "text": "public function getMessagesCount($userId)\n {\n $count = $this->entityManager->getRepository(get_class($this->messageEntity))->createQueryBuilder('b')\n ->select('count(b.id)')\n ->where('b.user_id = :user_id')\n ->setParameter('user_id', $userId)\n ->getQuery()->getSingleScalarResult();\n return $count;\n }", "title": "" }, { "docid": "c5a4b18d3abc7c9af31167ae07531a2f", "score": "0.67045087", "text": "public function count(): mixed;", "title": "" }, { "docid": "b19e33b447143079b4d98b3bd5a718f9", "score": "0.67019707", "text": "public function getNotificationCount(){\n\t\t$user = Auth::user();\n\t\t$count = $user->unreadNotifications()->count();\n\t\treturn ['count' => $count];\n\t}", "title": "" }, { "docid": "ca47349be8dd1411588515c0ca21548d", "score": "0.66871774", "text": "public function count_new_inbox($username) {\n\t\t\n\t\t$result = $this->link->query(\"SELECT * FROM `\" . $this->prefix . \"inbox_messages` WHERE recipient = '$username'\n\t\t\t\t\t\t\t\t\tAND status = 'unread'\n\t\t\t\t\t\t\t\t\");\n\t\t$total = $this->numRows( $result );\n\t\treturn $total;\n\t\t\t\n\t}", "title": "" } ]
1cfc7f317ddd6d50d022ecaf1e848645
OneToMany (owning side) Get fkPessoalContratoServidorContaSalarioHistoricos
[ { "docid": "66042a819cfe785843017e0b3dbf23b3", "score": "0.75493896", "text": "public function getFkPessoalContratoServidorContaSalarioHistoricos()\n {\n return $this->fkPessoalContratoServidorContaSalarioHistoricos;\n }", "title": "" } ]
[ { "docid": "dcf59ccca1bc6a03f4f152773fda4927", "score": "0.6477444", "text": "public function getFkPessoalTcepeConfiguracaoRelacionaHistoricos()\n {\n return $this->fkPessoalTcepeConfiguracaoRelacionaHistoricos;\n }", "title": "" }, { "docid": "adb4b22944f0eac5e25b3348e29ba749", "score": "0.635035", "text": "public function getFkFolhapagamentoContratoServidorPeriodos()\n {\n return $this->fkFolhapagamentoContratoServidorPeriodos;\n }", "title": "" }, { "docid": "eba54c4937507294e51044e43a51e49a", "score": "0.6274411", "text": "public function historiaclinica() {\n\t\treturn $this->hasOne('App\\Models\\HCD\\Sistemas', 'id_sistema', 'id_sistema_hcd');\n\t}", "title": "" }, { "docid": "7396576173fb21c1e1fd99cdf567cd7c", "score": "0.616254", "text": "public function subsidiofallecimientosepelio(){\n\n return $this->hasMany('App\\SubsidioFallecimientoSepelio','id_fuente','id_fuente');\n\n }", "title": "" }, { "docid": "f6762db921cb560b65cea86547f052e6", "score": "0.61272436", "text": "public function getSindicos()\n {\n return $this->hasMany(Sindicos::className(), ['condominio_id' => 'id_condom']);\n }", "title": "" }, { "docid": "d55daf9eaca109507d729d115a226296", "score": "0.60851115", "text": "public function getFkPessoalContratoServidor()\n {\n return $this->fkPessoalContratoServidor;\n }", "title": "" }, { "docid": "d55daf9eaca109507d729d115a226296", "score": "0.60851115", "text": "public function getFkPessoalContratoServidor()\n {\n return $this->fkPessoalContratoServidor;\n }", "title": "" }, { "docid": "d55daf9eaca109507d729d115a226296", "score": "0.60851115", "text": "public function getFkPessoalContratoServidor()\n {\n return $this->fkPessoalContratoServidor;\n }", "title": "" }, { "docid": "79e464a167597cefacd99be978061859", "score": "0.6076279", "text": "public function getServicio0()\n {\n return $this->hasOne(Servicio::className(), ['id' => 'servicio']);\n }", "title": "" }, { "docid": "b694fb36dd624a2007560d2bee017692", "score": "0.6015126", "text": "public function getFkEconomicoResponsavel()\n {\n return $this->fkEconomicoResponsavel;\n }", "title": "" }, { "docid": "abfb5ec93db887d6013b6994e2609d89", "score": "0.5991867", "text": "public function historico()\n {\n return $this->hasMany(HistoricoTransacao::class, 'usuario_id');\n }", "title": "" }, { "docid": "3a82d270e252eeb4fe188c1d82004477", "score": "0.59552234", "text": "public function getFkPessoalContrato()\n {\n return $this->fkPessoalContrato;\n }", "title": "" }, { "docid": "056fee80aeb6c01d10445ade0e690573", "score": "0.5938002", "text": "public function getFkEconomicoResponsavelTecnicos()\n {\n return $this->fkEconomicoResponsavelTecnicos;\n }", "title": "" }, { "docid": "6543569bfb7a3623bf238f7132bc0a7b", "score": "0.5898194", "text": "public function getFkArrecadacaoFaturamentoServicos()\n {\n return $this->fkArrecadacaoFaturamentoServicos;\n }", "title": "" }, { "docid": "48acbfbe6e0aa6239bd0299f39c17739", "score": "0.5890873", "text": "public function historias(){\n return $this->belongsTo('EstudiantesDeLP\\Historia', 'id_historia');\n }", "title": "" }, { "docid": "2a31f9cad90bb0e619ceb761cff6b9d9", "score": "0.58874446", "text": "public function factura()\n {\n return $this->hasMany(Factura::class,'cliente_id');\n }", "title": "" }, { "docid": "180aee9cc0310aa1c6f2891ccf080d14", "score": "0.58847", "text": "public function getFkPessoalContratoServidorSalarios()\n {\n return $this->fkPessoalContratoServidorSalarios;\n }", "title": "" }, { "docid": "235e9aedd817fda8c40b11bb92a7386f", "score": "0.5873921", "text": "public function horarioProyecto()\n {\n return $this->hasMany('App\\Models\\Horario', 'proyecto_id','id');\n }", "title": "" }, { "docid": "de450df000e47d73f1e067e7ba89d354", "score": "0.58699775", "text": "public function servicio_producto() {\n return $this->hasMany(Servicio_Producto::class, 'Servicio', 'id');\n }", "title": "" }, { "docid": "aeaaab295a9d80d13933ea80c7f6fb18", "score": "0.58548903", "text": "public function dependencia() {\n\t\treturn $this->hasOne('App\\Models\\Efectores\\DependenciaAdministrativa', 'id_dependencia_administrativa', 'id_dependencia_administrativa');\n\t}", "title": "" }, { "docid": "a2bc6a64473f724a0b6d38d9e4111bf9", "score": "0.58393097", "text": "public function comentarios() {\n return $this->hasMany('\\Models\\Comentario')->orderBy('id', 'desc');\n }", "title": "" }, { "docid": "759fb335eba63f67ede829c2d576c8d6", "score": "0.58307195", "text": "public function getFkMonetarioConvenio()\n {\n return $this->fkMonetarioConvenio;\n }", "title": "" }, { "docid": "34952f95ca60fcc5800f8f6b6cfdfd81", "score": "0.5804148", "text": "public function getFkPessoalContratoServidorContaFgts()\n {\n return $this->fkPessoalContratoServidorContaFgts;\n }", "title": "" }, { "docid": "c3dab006d00a46f16048ed36a5ebc6d5", "score": "0.57967913", "text": "public function servicio()\n\t{\n\t\treturn $this->belongsTo(Servicio::class, 'condominios_servicios_id','id');\n\t}", "title": "" }, { "docid": "3f08ed5777c164d561ff57377b61861b", "score": "0.57834935", "text": "public function directores(){\n // belongsToMany('NombreModelo', 'tabla_relacion')\n return $this->belongsToMany('Cinema\\Director', 'pelicula_director')->withTimestamps();\n }", "title": "" }, { "docid": "c926578d2498a2abe51ac72d92d3720b", "score": "0.5769049", "text": "public function getFkPessoalContratoServidorSituacoes()\n {\n return $this->fkPessoalContratoServidorSituacoes;\n }", "title": "" }, { "docid": "130bdfc7fa1fef75b909102b4dad784e", "score": "0.57607484", "text": "public function seguimiento()\n {\n return $this->hasMany('TitIntegral\\Seguimiento','status_id');\n }", "title": "" }, { "docid": "04096d30ea560cc63b0e4614e70e9744", "score": "0.5756618", "text": "public function comentarios() {\n return $this->morphMany(Comentario::class, 'coment');//passar a model que tem os comentarios em si, que faz o relacionamento\n //coment e o metodo la na model comentarios onde vai pegas a cidade e fazer o polimorfismo relacionando-a\n }", "title": "" }, { "docid": "7c8cfca284b0284242a09b24fe5e3673", "score": "0.5752345", "text": "public function getCompubFkcomentario()\n {\n return $this->hasOne(Comentario::className(), ['com_id' => 'compub_fkcomentario']);\n }", "title": "" }, { "docid": "26d9e084a3c9ad0ce84629c973ce9bd5", "score": "0.57517934", "text": "public function getFkPessoalContratoServidorContaSalarios()\n {\n return $this->fkPessoalContratoServidorContaSalarios;\n }", "title": "" }, { "docid": "b8aea535b00d80e42aa7d1b641269d80", "score": "0.57449186", "text": "public function dias_de_asueto()\n\t{\n\t\t// hasMany(RelatedModel, foreignKeyOnRelatedModel = ciclo_escolar_id, localKey = id)\n\t\treturn $this->hasMany(Dias_de_asueto::class,'fk_cicloesc');\n\t}", "title": "" }, { "docid": "e787b964b95676e63eb201212d929f69", "score": "0.5724492", "text": "public function clientes()\n {\n return $this->belongsToMany('App\\Cliente', 'clientes_tipos_empresas', 'id_tipo_empresa', 'id_cliente');\n }", "title": "" }, { "docid": "c7cd88544e6359b958a35bef968cc56f", "score": "0.57231003", "text": "public function getFkPessoalContratoPensionista()\n {\n return $this->fkPessoalContratoPensionista;\n }", "title": "" }, { "docid": "3fe9052d8a1885ac88c715de6b9b04b1", "score": "0.5714457", "text": "public function comentarios(){\n\n \treturn $this->hasMany('App\\WP_Comentario'); \n }", "title": "" }, { "docid": "955fe78a5a2f8c8512187ab62346fafa", "score": "0.57085884", "text": "public function ristorante(){\n return $this->hasMany(\"App\\Models\\ristorante\");\n }", "title": "" }, { "docid": "1ebf3044678e0d4225664aa06e511497", "score": "0.5706698", "text": "public function hCuentasEfectivos() {\n\t\treturn $this->hasMany('App\\HCuentasEfectivo');\n\t}", "title": "" }, { "docid": "7ef8cf115f03c3436ed5011d1aa4926b", "score": "0.57041955", "text": "public function servicios(){\n return $this->hasMany(Servicio::class);\n }", "title": "" }, { "docid": "11f94c5da7a527c3cb6aaa601b919bf7", "score": "0.57002103", "text": "public function contratos()\n {\n return $this->hasMany(\\App\\Models\\AcContrato::class,'codigo_plan','codigo_plan');\n }", "title": "" }, { "docid": "4d6c11a2dea51e3c3637a093e82f5b56", "score": "0.56931186", "text": "public function sistemaAnterior()\n {\n return $this->belongsTo('crmcomercial\\Entities\\Sistema', 'cpc_sistemant');\n }", "title": "" }, { "docid": "0cef6553d1ea02e785838ec983f644eb", "score": "0.56918657", "text": "public function contratos()\n {\n return $this->belongsTo('App\\Contratos', 'contrato_id');\n }", "title": "" }, { "docid": "afa7afe3778a677bc93e7e5bac6c1690", "score": "0.5689975", "text": "public function cliente()\n {\n return $this->belongsTo('App\\Cliente', 'CLI_SUB_RUBRO');\n }", "title": "" }, { "docid": "db934ea68b9a6a91b91d9768a6a9e014", "score": "0.56874305", "text": "public function colaborador()\n\n {\n return $this->hasMany(Colaborador::class,'codigo','id_colaborador');\n }", "title": "" }, { "docid": "6109e3c0655023b6fad8734c3f702474", "score": "0.5686851", "text": "public function parcial()\n\t{\n\t\t// hasMany(RelatedModel, foreignKeyOnRelatedModel = ciclo_escolar_id, localKey = id)\n\t\treturn $this->hasMany(Parcial::class,'fk_cicloesc');\n\t}", "title": "" }, { "docid": "2ba71a7f788ab680b55d270e95c915df", "score": "0.5676978", "text": "public function gerarRelatorioAutorizacoes()\n {\n \t$_dql = \"SELECT se.nrPatrimonio, comp.nmComputador, se.teObservacao\n \t\t\tFROM CacicCommonBundle:SoftwareEstacao se\n \t\t\tINNER JOIN se.idComputador comp\n \t\t\tWHERE se.dtDesinstalacao IS NULL\n \t\t\tORDER BY se.nrPatrimonio\";\n \t\n \treturn $this->getEntityManager()->createQuery( $_dql )->getArrayResult();\n }", "title": "" }, { "docid": "9c3ea82934bb0b7986524c1f27439541", "score": "0.566957", "text": "public function clientes()\n {\n return $this->hasMany(Cliente::class,'formapago_id');\n }", "title": "" }, { "docid": "7f59236f9a444a3875012d2da84c81d1", "score": "0.56653273", "text": "public function ahorro(){\n //Primero va la clase a relacionar (PerfilCliente)\n //Segundo el nombre de la tabla pivot )perfil_cliente_tipo_producto)\n //La clave foranea de la Clase Principal (TipoProducto)\n // la clave foranea de la clase a relacionar (PerfilCliente= ..(perfil_cliente_id)\n return $this->belongsToMany('App\\Http\\Models\\Ahorro','solicitud_ahorro','solicitud_id','ahorro_id')\n ->withPivot('monto');\n }", "title": "" }, { "docid": "973b0d2dc47976c69a940e9e0405017e", "score": "0.56647485", "text": "public function contratos() {\n return $this->hasMany(\\App\\Models\\AcContrato::class, 'codigo_colectivo', 'codigo_colectivo');\n }", "title": "" }, { "docid": "840f2e090e02aa62265c3e24b23f4543", "score": "0.56556773", "text": "public function clientedirecs()\n {\n return $this->hasMany(ClienteDirec::class,'formapago_id');\n }", "title": "" }, { "docid": "6db73c8bb5b67953ce7feb85e77532fd", "score": "0.5655489", "text": "public function getComentarios()\n {\n return $this->hasMany(Comentario::className(), ['id_usuario' => 'id']);\n }", "title": "" }, { "docid": "5165e270a55cf9b7ec139eb9a5c1dff5", "score": "0.56548446", "text": "public function contatos(){\n return $this->belongsToMany('App\\usuario','usuario_contatos','usuario_id','contato_id');\n }", "title": "" }, { "docid": "28ab3718d586396b7334b3a336bfc8ca", "score": "0.5648433", "text": "public function movimientos()\n\t{\n\t\treturn $this->hasMany('App\\Models\\Movimiento','solicitud_id');\n\t}", "title": "" }, { "docid": "3dc1d8fada9510c2016c406f525cec4d", "score": "0.56308424", "text": "public static function proveedores()\n\t\t{\n\t\t\t return (new Empresa())->hasMany(new VinculoEmpresa(),\"IDEMPRESA\",\"IDEMPRESA\")->where('TIPO_VINCULO', CONSTANTE::TIPO_VINCULO_EMPRESA_PROVEEDOR);\n\t\t //return Sistema::hasMany(Sistema::class);\n\t}", "title": "" }, { "docid": "7cedc5a53f41bf21db552ee4a5ee48fe", "score": "0.56200194", "text": "public function getConveniosForPropietario() {\n \n \t$currentDate = new \\DateTime();\n \t$currentDate = $currentDate->format('Ymd H:i:s');\n \t \n \t$query = \"SELECT TOP 50 CON.id_convenio, CON.estado, CON.fecha_convenio, CON.fecha_inicio,\n \t\t\t CON.fecha_final, CON.fecha_retiro, U.email,\n\t\t\t \t CON.FECHA_LOG FROM clientes_convenios AS CV\n\t\t\t \t INNER JOIN clientes AS C ON CV.id_cliente = C.id_cliente\n\t\t\t\t INNER JOIN convenios AS CON ON CV.id_convenio = CON.id_convenio\n \t\t\t LEFT JOIN usuarios AS U ON CON.id_eje_cuenta = U.id_user\n\t\t\t\t ORDER BY id_convenio DESC\";\n \n \t$r = $this->_conn->_query($query);\n \n \t$result = $this->_conn->_getData($r);\n \n \treturn $result;\n }", "title": "" }, { "docid": "1919b11f3bfde2f3670b9dbd2ea02605", "score": "0.5612737", "text": "public function getHitoSeguimientos()\n {\n return $this->hasMany(HitoSeguimiento::className(), ['hito_id' => 'hito_id']);\n }", "title": "" }, { "docid": "b97d29bcc0f32e82e0d9a8ab699f5016", "score": "0.5610695", "text": "public function restomenu() {\n return $this->hasMany('App\\Restomenu', 'resto_id');\n }", "title": "" }, { "docid": "7a88643fbe9c98e5a7f7337f67a29f62", "score": "0.5598188", "text": "public function comentarios(){\n\n return $this->hasMany('moviemega\\Comentario');\n }", "title": "" }, { "docid": "4476fdc0336d5012513f614121bb4b28", "score": "0.55936205", "text": "public function horarios(){\n return $this->hasMany('App\\Horario');\n }", "title": "" }, { "docid": "76f700f80b4e1dec44cdea85ca1586f1", "score": "0.55736285", "text": "public function indicadores_documentales()\n {\n return $this->hasMany(IndicadorDocumental::class, 'FK_IDO_Caracteristica', 'PK_CRT_Id');\n }", "title": "" }, { "docid": "3012eff3f02e1449b390c6e6899cb50e", "score": "0.5572324", "text": "public function os()\n {\n \t//Retorna la relacion entre los modelos, mediante el campo \"co_cliente\"\n \treturn $this->belongsTo(CaoOs::class, 'co_os', 'co_os');\n }", "title": "" }, { "docid": "58236f5f16e38bbfc7c06829fd362d2d", "score": "0.55706096", "text": "public function sindicato()\n {\n return $this->belongsTo(\\App\\Models\\Sindicato::class);\n }", "title": "" }, { "docid": "b184ed8eb5ebcfe8bb2e5620afd5a98a", "score": "0.5568347", "text": "public function tipo()\r\n {\r\n return $this->belongsTo('App\\TipoRecurso', 'tipo_recurso_id');\r\n }", "title": "" }, { "docid": "8f0d3c28160faab2fcf6acc308de1182", "score": "0.55677456", "text": "public function inventario() {\n return $this->hasOne(Inventario::class,'producto_id');\n }", "title": "" }, { "docid": "0d2eec8e36b7cf7e6ea0a1677d37589b", "score": "0.55677366", "text": "public function sucursales()\n {\n return $this->belongsToMany(Sucursal::class, 'sucursal_usuario')->withTimestamps();\n }", "title": "" }, { "docid": "d9fe7d94efee0b167a02bd2d4a0f3879", "score": "0.55666125", "text": "public function planos(){\n return $this->belongsTo('App\\Planos', 'id_plano', 'id'); //('model', 'chave_estrangeira', 'valor')\n //hasMany indica q a cardinalidade é de 1:n (um plano tem varios usuarios)\n }", "title": "" }, { "docid": "471cedb3ab1b717903d7a6e775a4b69f", "score": "0.5560628", "text": "public function clientebloqueados()\n {\n return $this->hasMany(ClienteBloqueado::class);\n }", "title": "" }, { "docid": "55e6de022648c2bef9fb9b240cb74f8b", "score": "0.55582404", "text": "public function comercioTipo()\n {\n return $this->hasOne(ComercioTipo::class,'id_comercio_tipo','id');\n }", "title": "" }, { "docid": "91b101614aa9e6968fb41d3aa85c4d03", "score": "0.5552208", "text": "public function getCopia()\n {\n return $this->hasOne(Copias::className(), ['id' => 'copia_id'])->inverseOf('ventas');\n }", "title": "" }, { "docid": "a7b14f54ebdac23b3838b1211f1a23c2", "score": "0.5548372", "text": "public function getFkMonetarioBanco()\n {\n return $this->fkMonetarioBanco;\n }", "title": "" }, { "docid": "26587c4ce2e9b3e6bea321cbf4cfc354", "score": "0.55428797", "text": "public function colores()\n {\n return $this->belongsToMany(static::$coloresModel, 'inv_producto_codigo_stock', 'id_producto', 'id_color','id_talle','stock','codigo')->withTimestamps()\n\t\t->select(array('inv_producto_codigo_stock.id', 'nombre as nombreColor','id_color','id_talle','stock','codigo','estado_meli'));\n }", "title": "" }, { "docid": "a7395c02ac7be2a0462f0124371db264", "score": "0.55417895", "text": "public function vehiculos(){\n return $this->hasMany(Vehiculo::class, 'id_compania');\n }", "title": "" }, { "docid": "95535900a796e65fb14f807d4b80d4f9", "score": "0.5541336", "text": "public function client()\n {\n \t//Retorna la relacion entre los modelos, mediante el campo \"co_cliente\"\n \treturn $this->belongsTo(CaoCliente::class, 'co_cliente', 'co_cliente');\n }", "title": "" }, { "docid": "6d6ec06f154541044e26eaae12678065", "score": "0.55385065", "text": "public function Compras()\n {\n return $this->hasMany(\\App\\Models\\VentaAccion::class,'comprador_id','id');\n }", "title": "" }, { "docid": "42a7f848c6e7e7e8d8a9cf0f2bb3deb6", "score": "0.55381703", "text": "public function getConveniosForPropietarioMonteria() {\n \n \t$currentDate = new \\DateTime();\n \t$currentDate = $currentDate->format('Ymd H:i:s');\n \n \t$query = \"SELECT top 50 CON.id_convenio, CON.estado, CON.fecha_convenio, CON.fecha_inicio,\n \t\t\t CON.fecha_final, CON.fecha_retiro, U.email,\n\t\t\t \t CON.FECHA_LOG FROM clientes_convenios AS CV\n\t\t\t \t INNER JOIN clientes AS C ON CV.id_cliente = C.id_cliente\n\t\t\t\t INNER JOIN convenios AS CON ON CV.id_convenio = CON.id_convenio\n \t\t\t LEFT JOIN usuarios AS U ON CON.id_eje_cuenta = U.id_user\n\t\t\t\t ORDER BY id_convenio DESC\";\n \n \t$r = $this->_conn->_query($query);\n \n \t$result = $this->_conn->_getData($r);\n \n \treturn $result;\n }", "title": "" }, { "docid": "396af1ef8647eb53a6467522d60d8fa4", "score": "0.5531536", "text": "public function businessPartner()\n {\n return $this->belongsTo(SocioNegocio::class, \"socio_negocio_id\");\n }", "title": "" }, { "docid": "3da5d5dca9b84e9e5cb9febb7b1ead39", "score": "0.55294126", "text": "public function cariche()\n {\n return $this->hasMany(Carica::class, 'b1_confl_interessi_id', 'id');\n }", "title": "" }, { "docid": "8bd4b62dacabe760ff754e172eae61b5", "score": "0.552402", "text": "public function horas(){\n return $this->hasManyThrought('App\\Hora','App\\Horario');\n }", "title": "" }, { "docid": "7f75e5f957b4ae75ab838907b2108287", "score": "0.5523793", "text": "public static function getLineaContratoPaquete($idContrato, $idLinea, $idServicio)\n {\n\n $util = new util();\n\n return $util->selectWhere3(\"contratos_lineas,contratos_lineas_detalles\",\n array(\"ID_TIPO\", \"ID_ASOCIADO\", \"ID_CONTRATO\", \"PRECIO_PROVEEDOR\", \"BENEFICIO\", \"IMPUESTO\", \"PVP\", \"PERMANENCIA\"),\n \"contratos_lineas.id=contratos_lineas_detalles.id_linea AND contratos_lineas_detalles.id_servicio=\" . $idServicio . \" \n AND contratos_lineas.id_contrato=\" . $idContrato . \" AND contratos_lineas.id=\" . $idLinea);\n }", "title": "" }, { "docid": "b29f9643bf7960ae9eb07e945b256626", "score": "0.55221504", "text": "public function getFkLicitacaoContrato()\n {\n return $this->fkLicitacaoContrato;\n }", "title": "" }, { "docid": "06651f601193fb159f0925ec0416503a", "score": "0.5519688", "text": "public function colegio2(){\n return $this->hasOne('sisconotas\\Porcentajes');\n }", "title": "" }, { "docid": "a9dd549582aff28b391808abf99567b8", "score": "0.5518447", "text": "public function getClientes()\n {\n return $this->hasMany(Clientes::className(), ['id_servicio' => 'id_servicio']);\n }", "title": "" }, { "docid": "9b1580fff4978ef3da181546403ebe0f", "score": "0.551134", "text": "public function sucursal()\n {\n // 1 empleado de un titular cliente_convenio pertene a una sucursal\n return $this->belongsTo('App\\Sucursal', 'sucursal_id');\n }", "title": "" }, { "docid": "130708c59de9b04244df980f10fcb6d9", "score": "0.5510743", "text": "public function comentarios()\n {\n return $this->hasMany('App\\Comentarios');\n }", "title": "" }, { "docid": "a99ef5121f5202aa8026e620621a7cdd", "score": "0.55092835", "text": "public function getFacturas()\n {\n return $this->hasMany(Factura::className(), ['id_cliente' => 'id_cliente']);\n }", "title": "" }, { "docid": "c20ce4eef52291515d7055ae60d85dd9", "score": "0.5506115", "text": "public function getPuntajeComentarios()\n {\n return $this->hasMany(PuntajeComentario::className(), ['id_usuario' => 'id']);\n }", "title": "" }, { "docid": "78053e03370b2b17d84e7f8bc92fc72b", "score": "0.55032057", "text": "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "title": "" }, { "docid": "78053e03370b2b17d84e7f8bc92fc72b", "score": "0.55032057", "text": "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "title": "" }, { "docid": "c08e84089ee66256b0fba2aa4f0cc531", "score": "0.55013704", "text": "public function getSolicitudVehiculoDetalle()\n {\n return $this->hasOne(SlCambioPlaca::className(), ['id_impuesto' => 'id_vehiculo']);\n }", "title": "" }, { "docid": "a84c637c610126772d8b68073109d642", "score": "0.5500858", "text": "public function cliente(){\n return $this->hasMany (\"Cliente\");\n }", "title": "" }, { "docid": "2e9b7e3bf72d2bae3f10ab073ff9db06", "score": "0.549674", "text": "public function comercioEstado()\n {\n return $this->hasOne(ComercioEstado::class,'id_comercio_estado','id');\n }", "title": "" }, { "docid": "625ce43e30d53035c771b5794fa00baf", "score": "0.5495084", "text": "public function modelo() {\n\n return $this->hasManyThrough(\n \n Modelo::class, // Modelo destino\n Variacion::class, // Modelo intermedio\n \n //Variacion::class, // Modelo intermedio\n \n 'id', // Clave foránea en la tabla intermedia\n 'id' // Clave foránea en la tabla de destino\n\n /*\n 'id' // Clave primaria en la tabla de origen\n 'variacion_id' // Clave primaria en la tabla intermedia \n */\n\n );\n }", "title": "" }, { "docid": "1018b998ab5b7fc6cb754ff23efc3dde", "score": "0.54946935", "text": "public function toma_relevamiento_movimiento(){\n return $this->belongsTo('App\\TomaRelevamientoMovimiento','id_toma_relev_mov','id_toma_relev_mov');\n }", "title": "" }, { "docid": "c059f480e0f4f2381d739a60aac226ea", "score": "0.54937947", "text": "public function compras(){\n return $this->belongsToMany('App\\Compra','detalle_compra','fkidinsumo','fkidcompra');\n }", "title": "" }, { "docid": "3a9fa4043edfe608836f0c6e1e9e52e3", "score": "0.5492252", "text": "public function getTarifaVehiculo()\r\n {\r\n return $this->hasMany(TarifaVehiculo::className(), ['clase_vehiculo' => 'clase_vehiculo']);\r\n }", "title": "" }, { "docid": "8ecaedb2abb64ed41f7b8c144590228d", "score": "0.54890144", "text": "public function oneToMany()//testando realacionamentos\n {\n $keySearch = 'a';\n $clientes = Cliente::where('nome', 'LIKE', \"%{$keySearch}%\")->with('pedidos')->get();//lista todos clientes que contem letra 'a'\n\n //dd($clientes);\n\n foreach ($clientes as $cliente) {\n echo \"<b>NOME= {$cliente->nome}</b>\";\n\n //$pedidos = $cliente->pedidos;\n $pedidos = $cliente->pedidos()->get();\n\n foreach ($pedidos as $pedido) {\n echo \"<br>ID= {$pedido->id} // Total do Pedido= {$pedido->total_pedido} -- {$pedido->comentario}\";\n }\n echo '<hr>';\n }\n }", "title": "" }, { "docid": "788e21ca49b4155fe1b65769797b937d", "score": "0.54856944", "text": "public function cliente()\n {\n return $this->belongsTo('App\\Models\\ClienteModel', 'id_cliente');\n }", "title": "" }, { "docid": "e111ce3207bdf09dc6955ec51615e503", "score": "0.54842436", "text": "public function getIdActividad(){\n return $this->hasOne(PsActividad::className(), ['id_actividad' => 'ult_id_actividad'])->viaTable('ps_cproceso', ['id_cproceso' => 'id_cproceso']);\n }", "title": "" }, { "docid": "0fdfbd58cc366b1e6ead8f85c2f606bd", "score": "0.54840064", "text": "public function horarioprofesor(){\n return $this->hasMany('App\\Models\\horarioprofesor');\n}", "title": "" }, { "docid": "d75150bac3cdd79dde428fae44afa793", "score": "0.54789907", "text": "public function getFkMonetarioCredito()\n {\n return $this->fkMonetarioCredito;\n }", "title": "" }, { "docid": "d75150bac3cdd79dde428fae44afa793", "score": "0.54789907", "text": "public function getFkMonetarioCredito()\n {\n return $this->fkMonetarioCredito;\n }", "title": "" }, { "docid": "c25252833b91b00a2c12cfd44c5226a8", "score": "0.54740214", "text": "public function obstetrico() {\n\t\treturn $this->hasOne('App\\Models\\Efectores\\Obstetrico', 'siisa', 'siisa');\n\t}", "title": "" } ]
e59e952762f1af6fe98b430149898e7c
Adds a new after event handler closure to the collection
[ { "docid": "9f7fa9a76093d1b2bedfff514af16147", "score": "0.7471183", "text": "public function after(Closure $callback): void\n {\n $this->afterCollection->append($callback);\n }", "title": "" } ]
[ { "docid": "bd7d9898b84414d9d5eba5161ae1825b", "score": "0.6469292", "text": "public function after($callback)\n {\n $this->addGlobalFilter('after', $callback);\n }", "title": "" }, { "docid": "099e1ae16bfd95a2f93b1914a6ca4918", "score": "0.6451303", "text": "public function getAfterEventHandlers(): EventCollection\n {\n return $this->afterCollection;\n }", "title": "" }, { "docid": "3ca1446dc964e8d8b716ae0377eb5ebe", "score": "0.63883466", "text": "public function after(Closure ...$eventHandlers): void\n {\n foreach ($eventHandlers as $blueprint) {\n $this->blueprint->getAfterEventHandlers()->append($blueprint);\n }\n }", "title": "" }, { "docid": "265341757d41021a05800974d3137231", "score": "0.6300467", "text": "public function after($callback)\n {\n }", "title": "" }, { "docid": "0d287d05a904f6aeaaece26ec68527b2", "score": "0.62810534", "text": "public function after(Closure $callback = null): void;", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.6208587", "text": "protected function after(){}", "title": "" }, { "docid": "298f7f413487ee4a80d8fc705e834a38", "score": "0.61573476", "text": "protected function after($action)\n {\n if (is_callable($action)) {\n $this->after[$this->currentMethodName][] = $action;\n }\n }", "title": "" }, { "docid": "6d8bbfe94bcbc9ceb70d36b4ec16f568", "score": "0.614143", "text": "private function executeAfterEvents(): void\n {\n $afterEvent = new AfterEvent($this, $this->validationData);\n\n /** @var Closure $after */\n foreach ($this->blueprintParser->getAfterEventCollection() as $after) {\n $after($afterEvent);\n }\n }", "title": "" }, { "docid": "1f14864ca241f805717451b4f56a472c", "score": "0.60925066", "text": "public function after();", "title": "" }, { "docid": "549aa373b1e2c477f1c84ea0ebd51903", "score": "0.6045026", "text": "public static function _after() : void {\n\t}", "title": "" }, { "docid": "141eeb95baade64c7a68ae56bad27970", "score": "0.6001906", "text": "public function _afterAction() {}", "title": "" }, { "docid": "a5abd39c6d005c3a9760aacb9d3f8882", "score": "0.5978837", "text": "public function after(): void;", "title": "" }, { "docid": "1c09cd9348c7449ba9a72d6514e9d602", "score": "0.59510386", "text": "public function after()\n {\n $this->_after();\n }", "title": "" }, { "docid": "08b5e116b6fed50a65c8d2d97eb1eb9b", "score": "0.5937726", "text": "public final function onAfter()\r\n\t{\r\n\t\t$this->state = self::STATE__RECORDING_ON_POST_EXECUTE;\r\n\t\t$this->recordingActionsArray = &$this->postExecuteActions;\r\n\t\treturn $this;\r\n\r\n\t}", "title": "" }, { "docid": "9f3fb99eccf9673cd5c37d07318b2303", "score": "0.58816695", "text": "public function after(Closure $callback)\n {\n return $this->then($callback);\n }", "title": "" }, { "docid": "9f3fb99eccf9673cd5c37d07318b2303", "score": "0.58816695", "text": "public function after(Closure $callback)\n {\n return $this->then($callback);\n }", "title": "" }, { "docid": "d00c15369e6377574d34fa300d5b469d", "score": "0.58801013", "text": "protected function _after()\n {\n }", "title": "" }, { "docid": "d00c15369e6377574d34fa300d5b469d", "score": "0.58801013", "text": "protected function _after()\n {\n }", "title": "" }, { "docid": "be82ed3e706ddfbe46edaaf360093c6d", "score": "0.587364", "text": "abstract protected function after(): void;", "title": "" }, { "docid": "02e7062ef7ab7d3167f60c10e55eacc3", "score": "0.58288103", "text": "public function after() {}", "title": "" }, { "docid": "5e41638dd4754b8488719711d4bbee50", "score": "0.58043617", "text": "public function onAfter()\n {\n }", "title": "" }, { "docid": "50102f233d74c09f764cccc346699bf9", "score": "0.5794243", "text": "public function after ()\n\t{\n\t}", "title": "" }, { "docid": "793a4a0f4c21a1ea7cade3360faba9ae", "score": "0.57605076", "text": "protected function _afterAction() {}", "title": "" }, { "docid": "f50d38d563e7438cbff8420be2a326e9", "score": "0.5745655", "text": "public function after() {\n\t\treturn $this->getset('after', func_get_args());\n\t}", "title": "" }, { "docid": "426de04c9b5a51aa2ab03e7e71df03cc", "score": "0.57167363", "text": "public function after() {\n\t\treturn $this->after;\n\t}", "title": "" }, { "docid": "34e9af9bbd720122a9036b770ce0ce27", "score": "0.57161874", "text": "public function after()\n\t{\n\n\t}", "title": "" }, { "docid": "0180604a16181b0c90fe62fe7cd15e88", "score": "0.5686187", "text": "public function addCallback(\\Closure $callback)\n {\n $key = sprintf(\n \"handler%d\",\n !count($this->callbacks) ? 0 : count($this->callbacks)\n );\n\n $this->callbacks[$key] = $callback;\n }", "title": "" }, { "docid": "4280f2812710963bd49cff7be447131d", "score": "0.5680213", "text": "public function after()\n\t{\n\t\t// Nothing by default\n\t}", "title": "" }, { "docid": "59fd2d44cb7e4f1327797ee9139d0677", "score": "0.56610334", "text": "public static function after($callback)\n {\n /** @var \\Illuminate\\Queue\\QueueManager $instance */\n $instance->after($callback);\n }", "title": "" }, { "docid": "e91fcdceba70f5038c5be84dbcbb1dc7", "score": "0.56484115", "text": "public function getAfterCallbacks(): array\n {\n return $this->aAfterCallbacks;\n }", "title": "" }, { "docid": "e4a8f7fc775cb55276f43118276e931c", "score": "0.5646375", "text": "public function getAfterCreate()\n {\n if (!isset($this->_afterCreate)) {\n $this->_afterCreate = new \\Yana\\Core\\CallableCollection();\n }\n return $this->_afterCreate;\n }", "title": "" }, { "docid": "81f24c4510676999a418a94fb9a6346e", "score": "0.5642921", "text": "public function getAfterDelete()\n {\n if (!isset($this->_afterDelete)) {\n $this->_afterDelete = new \\Yana\\Core\\CallableCollection();\n }\n return $this->_afterDelete;\n }", "title": "" }, { "docid": "1588f1ac6ce9b7b0fb615d2846e7f7ac", "score": "0.5626547", "text": "public static function after($times, $func) {\n\t\treturn function() use($times, $func) {\n\t\t\tstatic $afterTimes = null;\n\t\t\tif (is_null($afterTimes)) {\n\t\t\t\t$afterTimes = $times;\n\t\t\t}\n\t\t\tif (--$afterTimes < 1) {\n\t\t\t\t$args = func_get_args();\n\t\t\t\treturn call_user_func_array($func, $args);\n\t\t\t}\n\t\t};\n\t}", "title": "" }, { "docid": "18b041cb89c57d761aff2bcef3651d41", "score": "0.5611895", "text": "public function callAfterCallbacks(Container $container)\n {\n foreach ($this->afterCallbacks as $callback) {\n $container->call($callback);\n }\n }", "title": "" }, { "docid": "a910d7b5d890822e91dc4e89d352bafb", "score": "0.55782163", "text": "public function after(callable $xCallable): CallbackManager\n {\n $this->aAfterCallbacks[] = $xCallable;\n return $this;\n }", "title": "" }, { "docid": "2545e7d6dc7e2cdc910f3e836d977768", "score": "0.554055", "text": "public function addHandler(callable $handler);", "title": "" }, { "docid": "88a27df2a88e844f2b2084664aee8355", "score": "0.552002", "text": "public function loadAfterEvent(AfterEventInterface $eventHandler): void\n {\n $this->after(function (AfterEvent $afterEvent) use ($eventHandler) {\n $eventHandler->handle($afterEvent);\n });\n }", "title": "" }, { "docid": "ba48ea0a65d0c49738e164c2b7afb6f8", "score": "0.55075073", "text": "public function _after($I)\n {\n }", "title": "" }, { "docid": "21ec26f2c27c551fc5f3b13a9a26b684", "score": "0.5498265", "text": "private function addHook(string $beforeOrAfter, string $getOrSet, Closure $callback, array $whenKeys = []): self\n {\n $this->hooks[$beforeOrAfter][$getOrSet][] = $callback;\n\n if (count($whenKeys) !== 0) {\n $this->hooks[$beforeOrAfter][$getOrSet]['__trigger_keys'] = $whenKeys;\n }\n\n return $this;\n }", "title": "" }, { "docid": "5e78f36f456e9d413dfb823d39818c3b", "score": "0.54959023", "text": "public function callAfter($action = 'all', $callback)\r\n {\r\n \t$this->callbacks['after'][$action] = $callback;\r\n }", "title": "" }, { "docid": "79ed0bf1588e36667ca272ff24594128", "score": "0.54851186", "text": "public function callAfterCallbacks(Application $container)\n {\n foreach ($this->afterCallbacks as $callback) {\n $container->call($callback);\n }\n }", "title": "" }, { "docid": "61d59259d05fee1c38374e1323ce0306", "score": "0.5471512", "text": "public function afterAction(/*callable*/ $callback)\n {\n $this->on(self::AFTER_ACTION, $callback);\n }", "title": "" }, { "docid": "4188259b63a32ad94f928b6c7bbc445d", "score": "0.5468548", "text": "public function after()\n { \n }", "title": "" }, { "docid": "7adb54192c1a06dbec383b9e9d428852", "score": "0.54185575", "text": "function after($returnValue);", "title": "" }, { "docid": "d90b29bf7e90e2427e92d80b6b6381ed", "score": "0.5416197", "text": "protected function after($data)\n {\n }", "title": "" }, { "docid": "902194b06c973584429c8dec8221b71d", "score": "0.54084635", "text": "public function afterAction()\n {/*{{{*/\n }", "title": "" }, { "docid": "1424ada74cd062bd30bb627465e0f415", "score": "0.53981507", "text": "public function afterMaking(Closure $callback): self\n {\n return $this->newInstance(['afterMaking' => $this->afterMaking->concat([$callback])]);\n }", "title": "" }, { "docid": "8b849f767de38beffcd7b49daf1b8cc3", "score": "0.53750193", "text": "protected function addPostCondition(\\Closure $postCondition)\n {\n $this->postConditions[] = $postCondition;\n }", "title": "" }, { "docid": "3137c405e7f095cc6701afa8116f75e9", "score": "0.53732705", "text": "public function afterInsert()\n {\n }", "title": "" }, { "docid": "a6ae2a005991876587d828556b69026a", "score": "0.53654057", "text": "protected function after() {\n\n\t}", "title": "" }, { "docid": "7a10f1322cebc3716133fe76594a8539", "score": "0.53606087", "text": "public function afterDelete(callable $callback): void\n {\n $this->afterDeleteCallbacks[] = $callback;\n }", "title": "" }, { "docid": "964820a19ec08487d4e23f0b8cd7ffef", "score": "0.5340052", "text": "public function after(){\n parent::after();\n }", "title": "" }, { "docid": "db4a2a2e77bfc138b479297122e67420", "score": "0.5331171", "text": "public function after()\n {\n parent::after();\n }", "title": "" }, { "docid": "6d74a60b93a442fa5ae3d5450c261080", "score": "0.53307855", "text": "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "title": "" }, { "docid": "ca88d3be815e6bb5c77ea1cd96bf1a16", "score": "0.5329606", "text": "public function append_callbacks() {\n\n add_filter( 'posts_join', array( $this, 'posts_join' ), 10, 2 );\n add_filter( 'posts_where', array( $this, 'posts_where' ), 10, 2 );\n add_filter( 'posts_groupby', array( $this, 'posts_groupby' ), 10, 2 );\n\n }", "title": "" }, { "docid": "ccdfd7908044a1b9d157471c3d29e9f6", "score": "0.5328911", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "ccdfd7908044a1b9d157471c3d29e9f6", "score": "0.5328911", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "0db9aabe9e0cf9c918aef38078331977", "score": "0.5321434", "text": "public function getAfterUpdate()\n {\n if (!isset($this->_afterUpdate)) {\n $this->_afterUpdate = new \\Yana\\Core\\CallableCollection();\n }\n return $this->_afterUpdate;\n }", "title": "" }, { "docid": "8590ee553ee27658347108150ce15bdb", "score": "0.53186613", "text": "public function hook_after_add($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "7077b7e0b4d4ce69ca4f85b97fa25502", "score": "0.5318606", "text": "public function after($response)\n {\n // ..\n }", "title": "" }, { "docid": "cd09287349f7ed4a2c795c56e5e09394", "score": "0.53100526", "text": "public function set_after($after)\r\n\t{\r\n\t\t$this->after = $after;\r\n\t}", "title": "" }, { "docid": "824495009c6a4833034df14aa0d47112", "score": "0.53045017", "text": "public function testAddClosureListener()\n\t{\n\t\t$listener = function (EventInterface $event)\n\t\t{\n\t\t};\n\n\t\t$this->instance->addListener('onSomething', $listener, Priority::HIGH)\n\t\t ->addListener('onAfterSomething', $listener, Priority::NORMAL);\n\n\t\t$this->assertTrue($this->instance->hasListener($listener, 'onSomething'));\n\t\t$this->assertTrue($this->instance->hasListener($listener, 'onAfterSomething'));\n\n\t\t$this->assertEquals(Priority::HIGH, $this->instance->getListenerPriority('onSomething', $listener));\n\t\t$this->assertEquals(Priority::NORMAL, $this->instance->getListenerPriority('onAfterSomething', $listener));\n\t}", "title": "" }, { "docid": "e9719ddf3cbe7a5f4f29948779ae86c5", "score": "0.52876276", "text": "function afterAction()\n {\n }", "title": "" }, { "docid": "e9719ddf3cbe7a5f4f29948779ae86c5", "score": "0.52876276", "text": "function afterAction()\n {\n }", "title": "" }, { "docid": "e9719ddf3cbe7a5f4f29948779ae86c5", "score": "0.52876276", "text": "function afterAction()\n {\n }", "title": "" }, { "docid": "c1cedbbf73c526be3055f3d629a2b303", "score": "0.52615696", "text": "public function addCallback(Closure $callback)\n {\n $this->callbacks[] = $callback;\n }", "title": "" }, { "docid": "711d007a88b9264b2054bf64120e4ccc", "score": "0.52483666", "text": "protected function _afterLoadCollection()\r\n {\r\n $this->getCollection()->walk('afterLoad');\r\n parent::_afterLoadCollection();\r\n }", "title": "" }, { "docid": "a2436e0b6ad5fe4fa0f2667361786afb", "score": "0.52420044", "text": "public function hook_after_add($id)\n {\n //Your code here\n }", "title": "" }, { "docid": "17edc728d8ad7867161b7b04fd72daea", "score": "0.52367574", "text": "protected function after($response)\n {\n //\n }", "title": "" }, { "docid": "9aeede78e1ce841490892f06e13c3896", "score": "0.5235115", "text": "protected function after()\n {\n\n }", "title": "" }, { "docid": "9aeede78e1ce841490892f06e13c3896", "score": "0.5235115", "text": "protected function after()\n {\n\n }", "title": "" }, { "docid": "9aeede78e1ce841490892f06e13c3896", "score": "0.5235115", "text": "protected function after()\n {\n\n }", "title": "" }, { "docid": "9aeede78e1ce841490892f06e13c3896", "score": "0.5235115", "text": "protected function after()\n {\n\n }", "title": "" }, { "docid": "9aeede78e1ce841490892f06e13c3896", "score": "0.5235115", "text": "protected function after()\n {\n\n }", "title": "" }, { "docid": "410510090973f0ca57cf083f83be0462", "score": "0.5224063", "text": "protected function setCallbacks() {\n foreach ($this->elements as $element) {\n if (array_key_exists('closure', $element->toArray()) && !is_null($element['closure'])) {\n CAP::register($element['closure'], $element['name']);\n }\n }\n }", "title": "" }, { "docid": "0d56c8e78412782894154bafd3a51150", "score": "0.5215354", "text": "public function hook_after_add($id) { \n\t }", "title": "" }, { "docid": "56f1e2a152599148f727b03c5d8844e6", "score": "0.520986", "text": "public function after(){\n }", "title": "" }, { "docid": "6f0f68f5873a078affd80eeeb623183a", "score": "0.51952916", "text": "public function afterAdding(){\n \n return NULL;\n \n }", "title": "" }, { "docid": "c495fe0158f577518e88a9b96c8d4826", "score": "0.51908267", "text": "public function hook_after($postdata,&$result) {\n\n\t\t }", "title": "" }, { "docid": "c495fe0158f577518e88a9b96c8d4826", "score": "0.51908267", "text": "public function hook_after($postdata,&$result) {\n\n\t\t }", "title": "" }, { "docid": "c495fe0158f577518e88a9b96c8d4826", "score": "0.51908267", "text": "public function hook_after($postdata,&$result) {\n\n\t\t }", "title": "" }, { "docid": "09dcaed1dae43612ca887718c291f8d1", "score": "0.5178499", "text": "public function AfterAction()\n\t\t{\n\t\t}", "title": "" }, { "docid": "a883f3dde78d95f777ef9d3371e2d862", "score": "0.51763916", "text": "public function after(){\r\n $this->response('Execute '.__METHOD__.' in after timer');\r\n }", "title": "" }, { "docid": "e8b27968e90caf4d5bc67314689bbebb", "score": "0.517269", "text": "public function hook_after_add($id) { \n //Your code here\n\n }", "title": "" }, { "docid": "7051c34c57c6090edf921795a851aaf5", "score": "0.51706", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "a4c37e177f88d3774f4cad42db194d81", "score": "0.51653767", "text": "public function afterSave(callable $callback): void\n {\n $this->afterSaveCallbacks[] = $callback;\n }", "title": "" }, { "docid": "fca61bd9771b2202bc2453d21bf4db8e", "score": "0.5161861", "text": "protected function afterInsert()\n {\n }", "title": "" }, { "docid": "bce13ce36d38bb4bc87b7c89881a384b", "score": "0.51390356", "text": "public function after(Response $response);", "title": "" }, { "docid": "bee720d8643d1b3bbef69f77116712d9", "score": "0.5122233", "text": "protected function afterDelete()\n {\n $this->trigger(self::EVENT_AFTER_DELETE);\n }", "title": "" }, { "docid": "7fa4c1e091830d8acb503bc479a1bd41", "score": "0.5120739", "text": "protected function addCallback()\n {\n $this->server->on('Open', array($this, 'onOpen'));\n $this->server->on('Message', array($this, 'onMessage'));\n $this->server->on('Close', array($this, 'onClose'));\n }", "title": "" }, { "docid": "2725680304a36e6d3884fe159a01e20a", "score": "0.5115086", "text": "public function addAfter($value, $queue);", "title": "" }, { "docid": "75720c41569971ec65f83fdabcc1b02c", "score": "0.51107544", "text": "public function hook_after($postdata,&$result) {\n\n }", "title": "" }, { "docid": "75720c41569971ec65f83fdabcc1b02c", "score": "0.51107544", "text": "public function hook_after($postdata,&$result) {\n\n }", "title": "" }, { "docid": "810dff3017151944c4d99500acd93538", "score": "0.51021814", "text": "public function afterHook()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4fba1fa59156545e0984ea80b4e0dd1d", "score": "0.50944924", "text": "public function after_delete() {\n }", "title": "" }, { "docid": "46c930cf725c94ff1e43c2bbb7adcfad", "score": "0.5091062", "text": "public function afterCreate($callback)\n {\n $this->options['afterCreate'] = $callback;\n return $this;\n }", "title": "" }, { "docid": "acdd09ca64e2d071dce9283a8ac4edbd", "score": "0.5074425", "text": "public function after(Application $app, $response)\n {\n foreach ($app->router->getRoutes() as $route) {\n\n $newRoute['methods'] = $route->getMethods();\n $newRoute['path'] = $route->getPath();\n $newRoute['name'] = $route->getName();\n\n $action = $route->getAction();\n\n if ($controller = array_get($action, 'controller')) {\n $newRoute['action'] = $controller;\n } else {\n $newRoute['action'] = '{Closure}';\n }\n\n $this->data['routes'][] = $newRoute;\n }\n\n $current = $app->router->current();\n\n $this->data['current'] = [\n 'methods' => $current->getMethods(),\n 'path' => $current->getPath(),\n 'name' => $current->getName(),\n 'action' => $current->getAction()\n ];\n }", "title": "" }, { "docid": "621159e287ee7075a4950e1e6f40aa2e", "score": "0.5049378", "text": "function after($content);", "title": "" }, { "docid": "ff8aa855be2e0503d3c9269d979768f2", "score": "0.5042861", "text": "private function afterRemove(): void\n {\n $this->trigger(self::EVENT_AFTER_REMOVING);\n }", "title": "" }, { "docid": "d51ab3b1236e1e921178168bdf70dee6", "score": "0.5034253", "text": "public static function after($callback)\n {\n /** @var \\Illuminate\\Auth\\Access\\Gate $instance */\n return $instance->after($callback);\n }", "title": "" } ]
526bbbe9d04040fe6412f8b3958c519b
Generic method for sending PLAINTEXT response
[ { "docid": "3006c8ab0bb18f649dfba26f0979a34c", "score": "0.55348915", "text": "protected function sendTextResponse($text) {\n $httpResponse=$this->getHttpResponse();\n $httpResponse->setContentType('text/plain','UTF-8');\n $this->sendResponse(new TextResponse($text));\n }", "title": "" } ]
[ { "docid": "5e3f4100341750506faba9589b6d8c1f", "score": "0.6048338", "text": "public function sendResponse(){\n //ENVIA LOS HEADERS\n $this->sendHeaders();\n\n //IMPRIME EL CONTENIDO\n switch ($this->contentType) {\n case 'text/html':\n echo $this->content; \n exit;\n case 'application/json':\n echo json_encode($this->content, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); \n exit;\n }\n }", "title": "" }, { "docid": "1e5da542495e7acea92a8b8b1832d9ca", "score": "0.58222044", "text": "public function getTxt() : void\n {\n\n // Create response.\n $response = 'OK';\n\n $this->sendTxt($response);\n }", "title": "" }, { "docid": "3a479e0330d752a0016b888d46199441", "score": "0.5807875", "text": "public function render_plain_content() {}", "title": "" }, { "docid": "4a7996d1b615e4f6f85a506cdc09fe8d", "score": "0.5699891", "text": "protected function sendTextResponse($text='',$code=IResponse::S200_OK){\n $response=new Response();\n $response->code=$code;\n $httpResponse=$this->getHttpResponse();\n $httpResponse->setContentType('text/plain','UTF-8');\n $this->sendResponse(new TextResponse($text));\n }", "title": "" }, { "docid": "5175b3060d1dc90d98437ffdbbe91e18", "score": "0.5633032", "text": "public function response_str($type = '') {\n if ($type == 'json') return json_encode($this->response_json, JSON_PRETTY_PRINT); \n if ($type == 'xml') return $this->response_xml;\n if ($type == 'html') {\n $str = str_replace(array('<','>'), array('&lt;','&gt;'), $this->response_xml);\n $str = '<pre>'.$str.'</pre>';\n return $str;\n }\n return $this->__toString();\n }", "title": "" }, { "docid": "0ebc454b3e6f14ceef221b26657bffea", "score": "0.5564111", "text": "public function write_response(){\n\t\tif($this->write_response_func != NULL){\n\t\t\t//$resp = $resp. $this->write_return_params_with_json();\n\t\t\t$resp = call_user_func($this->write_response_func,$this,$this->callback_context);\t\t//用回调函数来修改回应的功能,注意,此时需要返回回应的字符串就可以了\n\t\t}else{\n\t\t\t$resp = $this->write_return_params();\t\t\t//write old format response\n\t\t\t$resp = $resp. $this->write_return_xml();\t\t\t\t\t//write xml format response\n\t\t}\n\t\techo $resp;\n\t\t$this->resp_data = $resp;\n\t}", "title": "" }, { "docid": "daf7baa76e1c6912dd70a4ff8d252727", "score": "0.5537145", "text": "public function responseMsg()\r\n {\r\n $postStr = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : file_get_contents(\"php://input\");\r\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\r\n if($postObj) {\r\n switch ($postObj->MsgType) {\r\n case 'text' : $this->responseText($postObj) ; break; //处理文字消息\r\n case 'image' : $this->doutu($postObj) ; break; //处理图片消息,斗图\r\n case 'event' : $this->doEvent($postObj) ; break; //关注/取消关注事件\r\n\t\t\t\tcase 'link' : $this->responseLink($postObj) ; break ;\r\n default : echo \"\" ; break;\r\n }\r\n }\r\n exit();\r\n }", "title": "" }, { "docid": "45cfe45cd3dd1eb756c59d2ee917d7d1", "score": "0.5517649", "text": "protected function sendResponse() {\n // First prepare the header\n $this->loadResponseHeader();\n // Format and send the respose\n echo $this->{$this->getFormatter()}($this->response);\n }", "title": "" }, { "docid": "3eaf86dae050d1c0d7cf98f07b5a4c27", "score": "0.5486344", "text": "abstract public static function getResponseFormat();", "title": "" }, { "docid": "95bb4813bf2f3a79a306d07dffc3fdbd", "score": "0.5478214", "text": "abstract public function sendResponse();", "title": "" }, { "docid": "d4f9c51d4d1ad87b63422fea25693633", "score": "0.54449093", "text": "abstract function send_response();", "title": "" }, { "docid": "255f7a51809214e3eadd4defa9b9058f", "score": "0.5444666", "text": "public function createResponse($data): string;", "title": "" }, { "docid": "5664516471432e37e5993a9da77a2bf3", "score": "0.5346113", "text": "public function example()\n {\n $this->response->setContentType( 'text/html' );\n }", "title": "" }, { "docid": "27ddf9805265f92ca87f30138f37b0d8", "score": "0.53423923", "text": "function send_output($data, $format) {\n if($format == \"html\") {\n print_r($data);\n } else {\n header(\"Content-Type: application/json\");\n echo json_encode($data);\n }\n}", "title": "" }, { "docid": "5aa429aa455d46f3b541bfe7fa5acf3a", "score": "0.5336895", "text": "function response($content, array $params = array()) {\n if (is_assoc($content)) {\n $params = array_merge($content, $params);\n } elseif ( ! isset($params['output'])) {\n $params['output'] = $content;\n }\n\n if ( ! empty($params['text'])) {\n $params['output'] = $params['text'];\n }\n\n\n if (empty($params['output'])) {\n raise(ln('function_param_missing', array('name' => __FUNCTION__, 'input' => 'output')));\n }\n\n $params = array_merge(array(\n 'type' => ini_get('default_mimetype'),\n 'charset' => 'UTF-8',\n 'headers' => array(),\n 'status' => 200,\n 'output' => '',\n 'nocache' => FALSE,\n ), $params);\n\n if (empty($params['headers']['content-type']) && is_mime($params['type'])) {\n $params['headers']['content-type'] = $params['type'] . ($params['charset'] ? \"; charset=$params[charset]\" : '');\n $params['headers']['content-length'] = strlen((string) $params['output']);\n }\n\n if (is_true($params['nocache'])) {\n $params['headers']['pragma'] = 'no-cache';\n $params['headers']['expires'] =\n $params['headers']['last-modified'] = date('D, m Y H:i:s \\G\\M\\T', time());\n $params['headers']['cache-control'] = array(\n 'no-store, no-cache, must-revalidate',\n 'post-check=0, pre-check=0',\n );\n }\n\n status($params['status'], $params['headers']);\n echo $params['output'];\n exit;\n}", "title": "" }, { "docid": "d0f76bc43c3e88cb98a1f27c0df08ebd", "score": "0.5336143", "text": "public function makeResponse()\n {\n $this->response .= '<div class=\"item\">DEV ITEM</div>';\n $this->response .= \"\";\n $this->response .= 'Asked about,\"' . $this->subject . '\"' . '. ';\n $post_title = $this->getTitle();\n $this->response .= 'The title of this post is \"' . $post_title . '\". ';\n }", "title": "" }, { "docid": "43c6fc3017212ba668bf5ae39825d1e7", "score": "0.5328711", "text": "protected function getMockedResponse() : string\n {\n return <<<HTML\n<html><head>\n <title>Mocked response</title>\n <meta name=\"twitter:player\" content=\"https://example.com/container.html\">\n <meta name=\"twitter:player:width\" content=\"800\">\n <meta name=\"twitter:player:height\" content=\"600\">\n <meta name=\"twitter:player:stream\" content=\"https://example.com/stream.mp4\">\n <meta name=\"twitter:player:stream:content_type\" content=\"video/mp4\">\n</head><body></body></html>\nHTML;\n }", "title": "" }, { "docid": "ef4ee695d7da115855ab63d0ef2ee8ad", "score": "0.5326215", "text": "protected function sendHtmlResponse($text) {\n $httpResponse=$this->getHttpResponse();\n $httpResponse->setContentType('text/html','UTF-8');\n $this->sendResponse(new TextResponse($text));\n }", "title": "" }, { "docid": "ffc60508c2fb3d844afceaeee9057c49", "score": "0.53214747", "text": "public function getResponseContent();", "title": "" }, { "docid": "b7e5f40cda8f1f2ebfeab128e9595a12", "score": "0.52864665", "text": "public function getResponseText() {\n if (stripos($this->contentType, \"application/json\") !== FALSE) {\n return $this->getJSONResponse();\n } else {\n return $this->getXMLResponse();\n }\n }", "title": "" }, { "docid": "c6a343744346297367ccf2b83f985ad2", "score": "0.52861243", "text": "function sendSuccess($successText){\n echo json_encode(array(\n 'status' => '201',\n 'infotext' => $successText\n ));\n}", "title": "" }, { "docid": "b14d3fc8e6e7c56bdf608fbdc4f5e15b", "score": "0.52564716", "text": "abstract protected function _sendContent();", "title": "" }, { "docid": "b4fd548b0fb5f4a861976d4c64d69696", "score": "0.5229795", "text": "protected function renderAsPlain()\n {\n /** @var Response $response */\n $response = GeneralUtility::makeInstance(Response::class);\n $response = $response\n ->withHeader('Content-Type', 'text/html; charset=utf-8')\n ->withHeader('X-JSON', 'true');\n\n $response->getBody()->write(implode('', $this->content));\n return $response;\n }", "title": "" }, { "docid": "c6a431fe72e1947b9366393c3ab24481", "score": "0.52295953", "text": "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n \n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $RX_TYPE = trim($postObj->MsgType);\n\n switch($RX_TYPE)\n {\n case \"text\":\n $resultStr = $this->handleText($postObj);\n break;\n case \"event\":\n $resultStr = $this->handleEvent($postObj);\n break;\n default:\n $resultStr = \"Unknow msg type: \".$RX_TYPE;\n break;\n }\n echo $resultStr;\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" }, { "docid": "190584b07bc4e87cb966f7a5e2a2243c", "score": "0.52007943", "text": "public function getPlainText();", "title": "" }, { "docid": "019ac54d408c1267173b4d92606833fc", "score": "0.51869667", "text": "public function printResponse() {\n\t\tswitch ($this->returnFormat) {\n\t\t\tcase 'JSON':\n\t\t\tdefault:\n\t\t\t\techo json_encode($this->response);\n\t\t}\n\t}", "title": "" }, { "docid": "6800180ebec3d7861116349f4a33f2cd", "score": "0.51852936", "text": "function outputResponse() {\n }", "title": "" }, { "docid": "9d05e723590cf2e559949b63c1b2b0e7", "score": "0.5183662", "text": "public function getRawResponse () {}", "title": "" }, { "docid": "9d05e723590cf2e559949b63c1b2b0e7", "score": "0.5183662", "text": "public function getRawResponse () {}", "title": "" }, { "docid": "9d05e723590cf2e559949b63c1b2b0e7", "score": "0.5183662", "text": "public function getRawResponse () {}", "title": "" }, { "docid": "9d05e723590cf2e559949b63c1b2b0e7", "score": "0.5183662", "text": "public function getRawResponse () {}", "title": "" }, { "docid": "9d05e723590cf2e559949b63c1b2b0e7", "score": "0.5183662", "text": "public function getRawResponse () {}", "title": "" }, { "docid": "7e28a3a58be00a8de46b29407fb66616", "score": "0.51803714", "text": "abstract protected function newResponse($raw);", "title": "" }, { "docid": "37eb2239d0af8de8c4ea43e9fdc0b40c", "score": "0.51720697", "text": "public function format($response)\r\n {\r\n $content = false;\r\n\r\n // If successful response, trying to auto render view\r\n if ($response->getIsSuccessful()) {\r\n\r\n // Rendering view\r\n if ($content = $this->render(Yii::$app->requestedAction->id, $response->data)) {\r\n $response->content = $content;\r\n }\r\n }\r\n\r\n // No content means, no view file, thus, simple json encoding\r\n if (!$content) {\r\n $response->content = Json::encode($response->data);\r\n }\r\n\r\n // Jsonp request\r\n if (!empty($this->callbackParam)\r\n && ($callback = Yii::$app->getRequest()->get($this->callbackParam)) !== null\r\n ) {\r\n $response->getHeaders()->set('Content-Type', 'application/javascript; charset=UTF-8');\r\n $response->content = sprintf('%s(%s);', $callback, $response->content);\r\n } else { // Normal json request\r\n $response->getHeaders()->set('Content-Type', 'application/json; charset=UTF-8');\r\n }\r\n }", "title": "" }, { "docid": "2e433ae17bac880433cecad66f82f248", "score": "0.512097", "text": "function example_init($response) {\n\n // set original content type\n header('Content-Type: '. $response['content_type']);\n\n /**\n * Do here whatever you want to manipulate the response\n * before you send it to the end user\n */\n\n return $response['body'];\n\n}", "title": "" }, { "docid": "928f58649da1d4771e351cf08ace14ef", "score": "0.5120094", "text": "public function format($response);", "title": "" }, { "docid": "928f58649da1d4771e351cf08ace14ef", "score": "0.5120094", "text": "public function format($response);", "title": "" }, { "docid": "e113d8e5a0b1ff0c20ef2c7e2e14adc2", "score": "0.51171565", "text": "function respond($text) {\n $res = array();\n $res['msg'] = $text;\n echo json_encode($res);\n exit;\n}", "title": "" }, { "docid": "d7ea0766eb0a1469aecff06418dc73da", "score": "0.5111665", "text": "function html_output($p){\n\t\tforeach ((array)$this->message->attachments as $attachment){\n\t\t\t$mimetype = $attachment->mimetype;\n\t\t\tif(preg_match('/^application\\/octet-stream/', $mimetype)){\n\t\t\t\t/* If we have no useful MIME type, then try to detect it. */\n\t\t\t\t$contents = $this->message->get_part_content($attachment->mime_id, null, true);\n\t\t\t\t$mimetype = rcube_mime::file_content_type($contents, $attachment->filename, $mimetype, true, true);\n\t\t\t}\n\t\t\tif(!preg_match('/^audio\\//', $mimetype))\n\t\t\t\tcontinue;\n\n\t\t\t$url = $this->message->get_part_url($attachment->mime_id);\n\n\t\t\t$html = \"\\n\".'<hr><div style=\"text-align:center\">';\n\t\t\t$html .= '<h4>'.$attachment->filename.'</h4>';\n\t\t\t$html .= '<audio controls=\"controls\"><source src=\"';\n\t\t\t$html .= $url;\n\t\t\t$html .= '\" type=\"';\n\t\t\t$html .= $mimetype;\n\t\t\t$html .= '\" />';\n\t\t\t$html .= '<embed height=\"50px\" width=\"100px\" src=\"';\n\t\t\t$html .= $url;\n\t\t\t$html .= '\" />';\n\t\t\t$html .= '</audio></div>';\n\n\t\t\t$p['content'] .= $html;\n\t\t}\n\t\treturn $p;\n\t}", "title": "" }, { "docid": "0af0ccbd862b2093cefc8a4d191cb928", "score": "0.5111447", "text": "public function responseAction()\n {\n\n return new Response('\n <html>\n <body> \n <h1 style=\"text-align: center\"> Mon titre </h1> \n <p style=\"text-align: center\">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad adipisci alias assumenda cupiditate, dolores exercitationem\n facilis iusto minima modi nemo, nesciunt nostrum perferendis porro, quisquam sed sunt velit? Ab, blanditiis?</p>\n </body>\n </html>'\n );\n }", "title": "" }, { "docid": "bb8c5e193a37d665688b7f5ea4f30cd2", "score": "0.51102775", "text": "public function respond(){\n\n // Success ///////////////////////////////////////////////\n if($this->status==\"success\"){\n if($this->data){\n $json = '{\"status\":\"success\",\"data\":{'.$this->data.'}}';\n }else{\n $json = '{\"status\":\"success\",\"data\":null}';\n }\n\n // Upload JSON ///////////////////////////////////////////\n\n }elseif($this->upload_json!=''){\n $json = $this->upload_json;\n\n // Error /////////////////////////////////////////////////\n }else{\n $json = '{\"status\":\"error\",\"message\":\"'.$this->message.'\"}';\n }\n\n // Output ////////////////////////////////////////////////\n echo($json);\n\n }", "title": "" }, { "docid": "a92902ff9d40143f563732ffbca12fae", "score": "0.5110012", "text": "public function response()\n\t{\n\t\t$this->response_json['body'] = \\CCView::create( 'Admin::panel.view', array(\n\t\t\t'body' => $this->response_json['body'],\n\t\t\t'close' => $this->has_close,\n\t\t\t'topic' => $this->topic,\n\t\t\t'headers' => $this->headers,\n\t\t))->render();\n\t\t\n\t\treturn \\CCResponse::json( $this->response_json );\n\t}", "title": "" }, { "docid": "f14bd09df4014aae8ef3c7cc82a66eec", "score": "0.5107333", "text": "public function createContent()\n {\n return pack(\"c\", $this->getEncoding()).\n $this->getLanguage().\n $this->getDescription(true).\n $this->getLyrics();\n }", "title": "" }, { "docid": "546bb6050bd6f82b7bc85b2f82aec548", "score": "0.510626", "text": "public function getJSONResponse()\n {\n \n $resArray = Array();\n $resArray['height'] = $this->height;\n $resArray['width'] = $this->width;\n $resArray['provider_name'] = 'Galileo World';\n $resArray['provider_name'] = urlencode($this->base_url);\n //$resArray['title'] = $this->fedoraObjExt->label;\n \n $fedoraObjExt = $this->fedoraObjExt;\n $objModel = $fedoraObjExt->getFedoraObjectModel(); \n switch($objModel){\n case 'bookCModel':\n\t $id = $this->fedoraObjExt->id;\n $id = explode(\":\",$id);\n $id = $id[1];\n $encodedUrl = $this->base_url.\"/uuid/\".$id.\"?ui=embed\"; \n\n if($this->width > 0) {\n $encodedUrl .= \"&width=\".$this->width;\n }\n if($this->height > 0) {\n $encodedUrl .= \"&height=\".$this->height;\n }\n $resArray['type'] = \"rich\";\n $resArray['version'] = \"1\";\n $resArray['html'] = \"<iframe width='\".$this->iframeWidth.\"' height='\".$this->iframeHeight.\"' \" .\n \"src='\".$encodedUrl.\"' frameborder='0' \" .\n //\"style='-webkit-transform:scale(0.5); -moz-transform:scale(0.5); -o-transform:scale(0.5); transform:scale(0.5);' \" .\n \"></iframe>\"; \n break;\n default:\n echo \"The islandora object model does not exist!\";\n exit();\n break;\n }\n \n echo json_encode($resArray);\n }", "title": "" }, { "docid": "810757046419a08c05cde0e83737feb5", "score": "0.51026446", "text": "protected function _respond() {}", "title": "" }, { "docid": "a3492ff793149b161908cede54f66813", "score": "0.5100259", "text": "function SendResponse($value)\n {\n $this->DumpVar(\"BNEEN9999999999\");\n $this->DumpVar($this->error);\n\n if(count($this->error)>0)\n { \n return base64_encode(serialize(\"error: \".implode(',',$this->error)));\n } else {\n return base64_encode(serialize($value));\n }\n }", "title": "" }, { "docid": "082f0c1692efa2c2ab0555ad41a08084", "score": "0.5099083", "text": "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>\";\n if(!empty( $keyword ))\n {\n $msgType = \"text\";\n $contentStr = \"Welcome to wechat world!\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }else{\n echo \"Input something...\";\n }\n\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" }, { "docid": "164e14142d090e4126bd07a8f719129a", "score": "0.5088945", "text": "function set_response_text($text){\r\n\t\t$this->set_response_xml(\"<![CDATA[\".$text.\"]]>\");\r\n\t}", "title": "" }, { "docid": "a5a9652888c12e81e07e0603a4c97239", "score": "0.5085442", "text": "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t\t\t\t\t\t</xml>\";\n if(!empty( $keyword ))\n {\n $msgType = \"text\";\n $contentStr = \"Welcome to wechat world!\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }else{\n echo \"Input something...\";\n }\n\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" }, { "docid": "9f577c034411ff9a0adf30bb321c946a", "score": "0.5082373", "text": "public function render()\n\t{\n\t\t$response = new stdClass;\n\t\t$response->text = $this->text . parent::render();\n\t\t$response->debug = $this->debug;\n\t\t$response->status = $this->status;\n\n\t\techo json_encode($response);\n\t}", "title": "" }, { "docid": "5169c79e622a7b1c9dcf115e4403e97c", "score": "0.5073081", "text": "function respond($jarvisResponse, $endSession = false) {\n\n // Provide JSON response\n header('Content-Type: application/json;charset=UTF-8');\n\n // Determine whether or not to end this interaction with Alexa\n $shouldEndSession = $endSession ? 'true' : 'false';\n\n $text = '{\n\"version\" : \"1.0\",\n\"response\" : {\n\"outputSpeech\" : {\n\"type\" : \"PlainText\",\n\"text\" : \"'.$jarvisResponse.'\"\n},\n\"shouldEndSession\" : '.$shouldEndSession.'\n}\n}';\n\n // Response do Amazon Web Service (or GUI)\n header('Content-Length: ' . strlen($text));\n echo $text;\n exit;\n}", "title": "" }, { "docid": "cfd65ca305f3d9c10b2039038d006e93", "score": "0.5072892", "text": "static public function response($response, $status = 200, $content_type = \"text/html\") {\n\t\t status_header( $status );\n\t\t header(\"Content-type: \" . $content_type);\n\t\t echo $response;\n\t\t exit;\n\t}", "title": "" }, { "docid": "a73d2841203f31760aed71bb9b1808ae", "score": "0.5054944", "text": "public function getRawResponseContent();", "title": "" }, { "docid": "33451031377e5c78ab0b1f28b67bb2a1", "score": "0.5048841", "text": "public function toWEBP() : string;", "title": "" }, { "docid": "040bc26b5689bc3e16afe19361331b33", "score": "0.5043191", "text": "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n //$postStr = file_get_contents(\"php://input\");\n\n //extract post data\n if (!empty($postStr)) {\n\n libxml_disable_entity_loader(true);\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $RX_TYPE = trim($postObj->MsgType);\n\n switch($RX_TYPE) {\n case \"text\":\n $resultStr = $this->handleText($postObj);\n break;\n// case \"image\":\n// $resultStr = $this->transmitService($postObj);\n// break;\n case \"event\":\n $resultStr = $this->receiveEvent($postObj);\n break;\n default:\n\n// require 'customerService.php';\n\n// $cs = new customerService();\n\n// $cs->logMessage('yikab', $postObj->FromUserName, $postObj->ToUserName);\n\n// $resultStr = $this->transmitService($postObj);\n $resultStr = \"Unknow msg type: \".$RX_TYPE;\n break;\n }\n\n echo $resultStr;\n\n }else {\n echo \"\";\n exit;\n }\n\n }", "title": "" }, { "docid": "e06fef06f06b988d8c0bc6fae03bfb87", "score": "0.50345767", "text": "public function writeText() {\n\t}", "title": "" }, { "docid": "684955d283de81b6457a96f22456df5a", "score": "0.50290215", "text": "public function responseMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n\n \t//extract post data\n\t\tif (!empty($postStr)){\n \n \t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t\t\t\t\t\t</xml>\"; \n\t\t\t\tif(!empty( $keyword ))\n {\n \t\t$msgType = \"text\";\n \t$contentStr = \"Welcome to wechat world!\";\n \t$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n \techo $resultStr;\n }else{\n \techo \"Input something...\";\n }\n\n\n }else {\n \techo \"\";\n \texit;\n }\n }", "title": "" }, { "docid": "c3dff6d3ee86ed8f5f993668cfea1af6", "score": "0.50228876", "text": "public function sendContent();", "title": "" }, { "docid": "ee21d9081b3889f2a8721732b7a0e207", "score": "0.5019853", "text": "abstract protected function getResponse();", "title": "" }, { "docid": "30dc30bbc7e93fb6177aa4c15b19730b", "score": "0.5017662", "text": "function mb_http_output(?string $encoding): string|bool {}", "title": "" }, { "docid": "4d41135c2308e2438234106ba747685b", "score": "0.5011338", "text": "public function getResponseData();", "title": "" }, { "docid": "7925a0eb6f950e80a2a022090bd68be8", "score": "0.49926528", "text": "public function send(): PhResponse\n {\n $content = $this->getContent();\n $data = $content;\n $eTag = sha1($content);\n\n /**\n * At the moment we are only using this format for error msg.\n * @todo change in the future to implemente other formats\n */\n if ($this->getStatusCode() != 200) {\n $timestamp = date('c');\n $hash = sha1($timestamp . $content);\n\n /** @var array $content */\n $content = json_decode($this->getContent(), true);\n\n $jsonapi = [\n 'jsonapi' => [\n 'version' => '1.0',\n ],\n ];\n $meta = [\n 'meta' => [\n 'timestamp' => $timestamp,\n 'hash' => $hash,\n ]\n ];\n\n /**\n * Join the array again.\n */\n $data = $jsonapi + $content + $meta;\n $this->setJsonContent($data);\n }\n\n $this->setHeader('E-Tag', $eTag);\n\n return parent::send();\n }", "title": "" }, { "docid": "a6938f3450be6fbe6ccc22c8f22a5485", "score": "0.4989417", "text": "public function responseMsgimagetext($title=\"关注下方微信号\",$url = 'http://room.sitrue.cn/bj/wx/lastbd',$img = 'http://www.sc.cc/Public/xfwx.png',$content='您好!感谢您关注实创装饰!请点击查看完成最后绑定')\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n \t//extract post data\n\t\tif (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n \t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"\n \t\t<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t\t\t\t\t\t<ArticleCount>1</ArticleCount>\n\t\t\t\t\t\t\t<Articles>\n\t\t\t\t\t\t\t<item>\n\t\t\t\t\t\t\t<Title><![CDATA[\".$title.\"]]></Title> \n\t\t\t\t\t\t\t<Description><![CDATA[\".$content.\"]]></Description>\n\t\t\t\t\t\t\t<PicUrl><![CDATA[\".$img.\"]]></PicUrl>\n\t\t\t\t\t\t\t<Url><![CDATA[\".$url.\"]]></Url>\n\t\t\t\t\t\t\t</item>\n\t\t\t\t\t\t\t</Articles>\n\t\t\t\t\t\t</xml> \n \t\t\"; \n\t\t\t\t\n \t\t$msgType = \"news\";\n \t$contentStr = \"您好!\";\n \t$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n \techo $resultStr;\n \n\n }else {\n \techo \"\";\n \t//exit;\n }\n }", "title": "" }, { "docid": "35c36ec9dbfa4f6b690fbc7833e55e94", "score": "0.498933", "text": "function echoRespnse($status_code, $data)\n\t\t{\n\t\t\t\t$app = \\Slim\\Slim::getInstance();\n\t\t\t\t// Http response code\n\t\t\t\t$app->status($status_code);\n\t\t\t\t// setting response content type to json\n\t\t\t\t$app->contentType('application/json; charset=utf-8');\n\t\t\t\t//$app->header('Access-Control-Allow-Origin', '*');\n\t\t\t\t//$app->contentType('text/html; charset=utf-8');\n\t\t\t\t$response = $app->response();\n\t\t\t\t$response->header('Access-Control-Allow-Origin', '*');\n\t\t\t\t$response->write(json_encode($data));\n\t\t\t\t//echo json_encode($data);\n\t\t}", "title": "" }, { "docid": "48f14e0df78ca2621cf4da5a1ccc7292", "score": "0.49861434", "text": "function verify_typoscript($params){\n //print_r($params);\n $ts = base64_decode($params[1]);\n //echo \"typoscript=\".$ts.\" \\n\";\n $tsparser = t3lib_div::makeInstance(\"t3lib_TSparser\");\n $tsparser->lineNumberOffset=0;\n //echo __LINE__.\"\\n\";\n $tsparser->parse($ts );\n \n //$tsparser->lineNumberOffset=0;\n //$formattedContent = $tsparser->doSyntaxHighlight($ts);\n//echo \"formattedContent= $formattedContent \\n\";\n \n //echo __LINE__.\"\\n\";\n //echo \"errors=\\n\";\n //print_r($tsparser->errors);\n //echo __LINE__.\"\\n\";\n \n $ret = array();\n foreach($tsparser->errors as $error){\n $ret[] = array(\n 'text' => $error[0],\n 'level' => $error[1],\n 'line_nr' => $error[2],\n 'line_offset' => $error[3],\n );\n }\n XMLRPC_response(XMLRPC_prepare($ret));\n }", "title": "" }, { "docid": "cd3b68fe515a5c1e1cfe7b3ede615455", "score": "0.49838156", "text": "public function getResponseAsString(): string;", "title": "" }, { "docid": "1d3dc0adc12df68eaa7e74568f6bfcc8", "score": "0.49835065", "text": "public function responseMsg()\n {\n //$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n $postStr = file_get_contents(\"php://input\");\n error_log(print_r($postStr,true));\n if (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n //libxml_disable_entity_loader(true);\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>\"; \n $msgType = \"text\";\n //$contentStr = \"您发送的信息:\".$keyword;\n $contentStr = $this->getResponse($postObj);\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" }, { "docid": "9f7c63866a5a78aa607310d42b83722d", "score": "0.49794045", "text": "public function getResponse ();", "title": "" }, { "docid": "30f7952381f2c19da56e8e239bd0be4e", "score": "0.49785465", "text": "public function responseMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n \t//extract post data \n\t\tif (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n \t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);//回复\n //$keyword = $postObj->MediaId; //获取midiaid步1\n $time = time();\n $textTpl = \"<xml>\n\t\t\t <ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t <FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t <CreateTime>%s</CreateTime>\n\t\t\t <MsgType><![CDATA[%s]]></MsgType>\n\t\t\t <Content><![CDATA[%s]]></Content>\n\t\t\t <FuncFlag>0</FuncFlag>\n\t\t\t </xml>\";\n //图文回复模板 在素材管理区mediaID,但需要权限,需要发图片取id,\n $imgTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName> \n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Image>\n <MediaId><![CDATA[QZKQFsxryPrdg5F61nyQFOfEqbiX0_vnA9zO9rpmxShTbeQQkKwKkLdgnccN2K8h]]></MediaId> \n </Image>\n </xml>\";\n $vioceTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Voice>\n <MediaId><![CDATA[p6VXiuiMKwvnlBxH63bZGTSWeEAzb5If99EnDT6UuYau69czIAZHioqVdTwt3OCg]]></MediaId>\n </Voice>\n </xml>\";\n \t$videoTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Video>\n <MediaId><![CDATA[z3ahECWwYrwqEmIi02kLYskkF15fLpIpXwq7-NjmjmIMI-QzZfaq5NZU-sIxONbL]]></MediaId>\n <Title><![CDATA[abc]]></Title>\n <Description><![CDATA[ab]]></Description>\n </Video> \n </xml>\";\n\t\t\t\tif(!empty( $keyword ))\n {\n //$msgType = \"text\";\n // 放到keyword外面 //取midiaId 步2 \n //$contentStr = json_encode($postObj); \n //$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n //echo $resultStr;\n if( $keyword){\n //$contentStr = \"你在询问天气\";//输入的请求返回数据回来 \n //回复图片\n if($keyword=='图片'){\n \t $msgType = \"image\";\n //$contentStr = json_encode($postObj);\n \t\t\t$resultStr = sprintf($imgTpl, $fromUsername, $toUsername, $time, $msgType);\n \t\techo $resultStr; \n }else if($keyword == '语音'){\n \t $msgType = \"voice\";\n //$contentStr = json_encode($postObj);\n \t\t\t$resultStr = sprintf($vioceTpl, $fromUsername, $toUsername, $time, $msgType); \n \t\techo $resultStr;\n \n }else if($keyword == '视频'){\n \t$msgType = \"video\";\n //$contentStr = json_encode($postObj);\n \t\t\t$resultStr = sprintf($videoTpl, $fromUsername, $toUsername, $time, $msgType);\n \t\techo $resultStr; \n \n \t}else{ \n $msgType = \"text\";\n $apiKey = \"f2f81bc4690b136dca164e75bc371824\";\n $apiURL = \"http://www.tuling123.com/openapi/api?key=KEY&info=INFO\"; \n header(\"Content-type: text/html; charset=utf-8\"); \n $reqInfo = $keyword; \n $url = str_replace(\"INFO\", $reqInfo, str_replace(\"KEY\", $apiKey, $apiURL)); \n $res = file_get_contents($url);\n $contentStr = json_decode($res)->text;//转回obj输出 \n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr); \n echo $resultStr;\n }\n \n }else{\n \t$contentStr = json_encode($postObj);\n \t\t$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n \t\techo $resultStr;\n }\n \n }else{\n \techo \"Input something...\";\n }\n\n }else {\n \techo \"\";\n \texit;\n }\n }", "title": "" }, { "docid": "83479011e7be4ecdde31b4b227966925", "score": "0.49772647", "text": "function show($http) : string\n{\n return json_encode($http);\n}", "title": "" }, { "docid": "c7955d2eb27c9d26d2b61ce2691a4d49", "score": "0.4963579", "text": "protected function getResponseHandler() : string\n {\n return 'Altcoin\\\\Response';\n }", "title": "" }, { "docid": "d5fd3551c08ae0edd4b580512ed4bb0f", "score": "0.4962752", "text": "function _voiptwilio_send_response($response) {\n $output .= '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>';\n $output .= '<Response>'; \n $output .= $response;\n $output .= '</Response>';\n\n drupal_set_header('Content-Type: text/xml; charset=utf-8');\n\n print $output;\n\n return TRUE;\n}", "title": "" }, { "docid": "1b0d2fab3ba37089a63bc29a78c3a8d7", "score": "0.49496594", "text": "public function write() {\n\n header(\"Content-Type: application/json\");\n header(\"Access-Control-Allow-Origin: *\");\n # Rückmeldung senden\n if (isset($_GET[\"callback\"]) && !empty($_GET[\"callback\"])) {\n $callback = $_GET[\"callback\"];\n echo $callback . \"('\" . json_encode($this->retVal, JSON_NUMERIC_CHECK) . \"')\";\n } else {\n echo json_encode($this->retVal, JSON_NUMERIC_CHECK);\n }\n }", "title": "" }, { "docid": "619c898a544d5c46c3fd82f72ea977a6", "score": "0.4948498", "text": "public function getRawContent(): ?string;", "title": "" }, { "docid": "3223fe9eb0b8df83aeecfc25bbef9823", "score": "0.49483436", "text": "function deliver_response($format, $api_response){\n\n\t// Define HTTP responses\n\t$http_response_code = array(\n\t\t200 => 'OK',\n\t\t400 => 'Bad Request',\n\t\t401 => 'Unauthorized',\n\t\t403 => 'Forbidden',\n\t\t404 => 'Not Found'\n\t);\n\n\t// Set HTTP Response\n\theader('HTTP/1.1 '.$api_response['status'].' '.$http_response_code[ $api_response['status'] ]);\n\n\t// Process different content types\n\tif( strcasecmp($format,'json') == 0 ){\n\n\t\t// Set HTTP Response Content Type\n\t\theader('Content-Type: application/json; charset=utf-8');\n\t\t// TODO: Security - Should not allow all origins\n\t\theader('Access-Control-Allow-Origin: *');\n\n\t\t// Format data into a JSON response\n\t\t$json_response = json_encode($api_response);\n\n\t\t// Deliver formatted data\n\t\techo $json_response;\n\n\t}elseif( strcasecmp($format,'xml') == 0 ){\n\n\t\t// Set HTTP Response Content Type\n\t\theader('Content-Type: application/xml; charset=utf-8');\n\n\t\t// Format data into an XML response (This is only good at handling string data, not arrays)\n\t\t$xml_response = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\".\n\t\t\t'<response>'.\"\\n\".\n\t\t\t\"\\t\".'<code>'.$api_response['code'].'</code>'.\"\\n\".\n\t\t\t\"\\t\".'<data>'.$api_response['data'].'</data>'.\"\\n\".\n\t\t\t'</response>';\n\n\t\t// Deliver formatted data\n\t\techo $xml_response;\n\n\t}else{\n\n\t\t// Set HTTP Response Content Type (This is only good at handling string data, not arrays)\n\t\theader('Content-Type: text/html; charset=utf-8');\n\n\t\t// Deliver formatted data\n\t\techo $api_response['data'];\n\n\t}\n\n\t// End script process\n\texit;\n\n}", "title": "" }, { "docid": "fd84832b695110c1ca675a94133e6ed7", "score": "0.49396425", "text": "function sendResponse($status = 200, $body = '', $content_type = 'text/html')\n\t\t{\n\t\t $status_header = 'HTTP/1.1 ' . $status . ' ' . Database::getStatusCodeMessage($status);\n\t\t header($status_header);\n\t\t header('Content-type: ' . $content_type);\n\t\t echo $body;\n\t\t}", "title": "" }, { "docid": "bfdbdc2c194be3cf6b29d2fcae5abb25", "score": "0.49364856", "text": "function sendError($errorText){\n echo json_encode(array(\n 'status' => '50x',\n 'infotext' => $errorText\n ));\n}", "title": "" }, { "docid": "722add964a9e71ba873b36a834f3b4cf", "score": "0.49363405", "text": "function sendResponse($status = 200, $body = '', $content_type = 'text/html')\n{\n$status_header = 'HTTP/1.1 ' . $status . ' ' . getStatusCodeMessage($status);\nheader($status_header);\nheader('Content-type: ' . $content_type);\necho $body;\n}", "title": "" }, { "docid": "aa068ac078dce8151dd09db86cdba995", "score": "0.49318218", "text": "public function responseMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n \t//extract post data\n\t\tif (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);//防止XXE攻击\n //对XML数据进行解析生成simplexml对象\n \t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n \t//微信客户端的openid\n $fromUsername = $postObj->FromUserName;\n //微信公众平台\n $toUsername = $postObj->ToUserName;\n //微信客户端向公众平台发送的关键词\n $keyword = trim($postObj->Content);\n //时间戳\n $time = time();\n //定义文本消息模版\n global $tmp_arr;\n\n if($keyword == '多图文'){\n $msgType='news';\n// $pdo = new PDO(\"mysql:host=localhost;dbname=wechat\",'root','root');\n// $sql = 'select * from wc_article limit 4';\n// $res = $pdo->query($sql);\n// var_dump($res);\n $link = mysql_connect('localhost','root','root');\n mysql_query('use wechat');\n mysql_query('set names utf8');\n $sql = \"select * from wc_article limit 4\";\n $res = mysql_query($sql);\n $num = 4;\n $str = '';\n while ($row = mysql_fetch_assoc($res)){\n $str .= \"<item>\n <Title><![CDATA[{$row['title']}]]></Title>\n <Description><![CDATA[{$row['description']}]]></Description>\n <PicUrl><![CDATA[{$row['picurl']}]]></PicUrl>\n <Url><![{$row['url']}]></Url>\n </item>\";\n }\n $resultStr = sprintf($tmp_arr['news'],$fromUsername,$toUsername,$time,$msgType,$num,$str);\n echo $resultStr;\n die;\n }\n\n $newcont = $postObj->Content;\n switch($postObj->MsgType){\n// case 'text':\n// $msgType='text';\n// $contentStr = $postObj->Content;\n// $resultStr = sprintf($tmp_arr['text'],$fromUsername,$toUsername,$time,$msgType,$contentStr);\n// echo $resultStr;\n// break;\n case 'voice' || 'text':\n $redis = new Redis();\n $redis->connect('localhost', 6379);\n $redis->auth('root');\n $strus = $redis->get($fromUsername . 'key');\n if($keyword == '天气' || $strus) {\n if ($keyword == '天气') {\n $contentStr = '请输入城市查询天气情况';\n $redis->set($fromUsername . 'key', $fromUsername . '天气');\n $redis->expire($fromUsername . 'key', 60);\n } else {\n $strus = $redis->get($fromUsername . 'key');\n if ($strus == $fromUsername . '天气') {\n $keyword = urlencode($keyword);\n $key = '7aea683f76f3dcee6064a626d9ed6f7f';\n $url = \"http://v.juhe.cn/weather/index?format=2&cityname={$keyword}&key={$key}\";\n $str = $this->http_request($url);\n $json = json_decode($str);\n $row = $json->result->today;\n \n $res1 = '';\n foreach ($row as $k => $v) {\n if ($k != 'weather_id') {\n $res1 .= $v . '^.^';\n }\n }\n $contentStr = \"天气情况:{$res1}\";\n } else {\n $contentStr = '请输入关键词:天气';\n }\n }\n\n $msgType = 'text';\n $resultStr = sprintf($tmp_arr['text'], $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n\n }else {\n $res = $postObj->Recognition;\n $url = \"http://www.tuling123.com/openapi/api\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, 1);\n $data = array(\n 'key' => 'e33363e46d2145e8b92a049cb6eb1092',\n 'info' => $res,\n 'userid' => '123456'\n );\n $data = json_encode($data);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type:application/json',\n 'Content-Length:' . strlen($data)\n ));\n $str = curl_exec($ch);\n curl_close($ch);\n $json = json_decode($str);\n $msgType = 'text';\n $contentStr = $json->text;\n $resultStr = sprintf($tmp_arr['text'], $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }\n break;\n case 'image':\n $msgType='text';\n $contentStr = '您发送的是图片消息!';\n $resultStr = sprintf($tmp_arr['text'],$fromUsername,$toUsername,$time,$msgType,$contentStr);\n echo $resultStr;\n break;\n// case 'text':\n// $res = $postObj->Recognition;\n// $url = \"http://www.tuling123.com/openapi/api\";\n// $ch = curl_init();\n// curl_setopt($ch,CURLOPT_URL,$url);\n// curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n// curl_setopt($ch,CURLOPT_POST,1);\n// $data=array(\n// 'key'=>'e33363e46d2145e8b92a049cb6eb1092',\n// 'info'=>$res,\n// 'userid'=>'123456'\n// );\n// $data = json_encode($data);\n// curl_setopt($ch,CURLOPT_POSTFIELDS,$data);\n// curl_setopt($ch,CURLOPT_HTTPHEADER,array(\n// 'Content-Type:application/json',\n// 'Content-Length:'.strlen($data)\n// ));\n// $str = curl_exec($ch);\n// curl_close($ch);\n// $json=json_decode($str);\n// $msgType='text';\n// $contentStr =$json->text;\n// $resultStr = sprintf($tmp_arr['text'],$fromUsername,$toUsername,$time,$msgType,$contentStr);\n// echo $resultStr;\n// break;\n case 'event':\n if($postObj->Event == 'subscribe'){\n $msgType = 'text';\n $contentStr = '感谢关注php学院';\n $resultStr = sprintf($tmp_arr['text'],$fromUsername,$toUsername,$time,$msgType,$contentStr);\n echo $resultStr;\n }\n if($postObj->Event == 'CLICK' && $postObj->EventKey =='V1001_TODAY_MUSIC'){\n $msgType = \"music\";\n $title = '烹爱';\n $descripton = '花间提壶方大厨';\n $url = 'http://www.youhaerma.top/music.mp3';\n $hqurl = 'http://www.youhaerma.top/music.mp3';\n $resultStr = sprintf($tmp_arr['music'], $fromUsername, $toUsername, $time, $msgType, $title,$descripton,$url,$hqurl);\n echo $resultStr;\n }\n break;\n }\n \texit;\n }\n }", "title": "" }, { "docid": "fa18c195f4c818c233c696992e1bf27b", "score": "0.49232456", "text": "public function send_encoded_response( $data_to_encode = array(), $code = 200 ) {\n\t\t$content_type = explode( '/', $this->content_type );\n\t\tif ( count( $content_type ) > 1 ) {\n\t\t\t$content_type = $content_type[1];\n\t\t} else {\n\t\t\t$this->send_response_exit();\n\t\t}\n\t\tif ( $content_type == 'json' ) {\n\t\t\t// wrap in cl-info to mimic XML data. Completely useless otherwise.\n\t\t\t$data_to_encode = array( 'cl-info' => $data_to_encode );\n\t\t\t$content = json_encode( $data_to_encode ); \n\t\t} elseif ( $content_type == 'xml' ) {\n\t\t\t$content = $this->encode_xml( $data_to_encode );\n\t\t}\n\t\theader( \"Content-Type: $this->content_type\" );\n\t\theader( \"$this->http_accept\" );\n\t\theader( \"Content-length: \" . strlen( $content ) );\n\t\techo $content;\n\t\texit( http_response_code( $code ) );\n\t}", "title": "" }, { "docid": "f89feb946d3a75283fd67f3ebeb21efc", "score": "0.49222696", "text": "public function renderOutput($response = array(), $status=NULL, $message=NULL)\r\n {\r\n header(\"Access-Control-Allow-Origin: *\");\r\n header(\"Access-Control-Allow-Headers: x-auth-token, x-auth-email\");\r\n header('Access-Control-Allow-Methods: PUT, PATCH, DELETE, POST, GET, OPTIONS');\r\n \r\n $data = array(\r\n 'status' => $status != NULL ? $status : $this->status,\r\n 'message' => $message != NULL ? $message : ($this->message == NULL ? 'Your request was successfully fulfilled' : $this->message),\r\n 'response' => $response\r\n );\r\n\r\n $format = Yii::app()->request->getParam('format', 'json');\r\n if ($format == 'xml')\r\n echo $this->renderXML($data);\r\n else\r\n echo $this->renderJSON($data);\r\n Yii::app()->end();\r\n }", "title": "" }, { "docid": "e220403feaae7c250039b858120a68f3", "score": "0.49202445", "text": "public function get_plain_result();", "title": "" }, { "docid": "d50e165b3bb3bcf380de52e13e8c5c4f", "score": "0.49178624", "text": "private function respond() {\n $data = json_encode($this->data);\n die($data); // echo and quit\n }", "title": "" }, { "docid": "25b1dc0423863b4d16b5129e8c9ee192", "score": "0.4916667", "text": "function sendResponse($status = 200, $body = '', $content_type = 'text/html')\n{\n $status_header = 'HTTP/1.1 ' . $status . ' ' . getStatusCodeMessage($status);\n header($status_header);\n header('Content-type: ' . $content_type);\n echo $body;\n}", "title": "" }, { "docid": "25b1dc0423863b4d16b5129e8c9ee192", "score": "0.4916667", "text": "function sendResponse($status = 200, $body = '', $content_type = 'text/html')\n{\n $status_header = 'HTTP/1.1 ' . $status . ' ' . getStatusCodeMessage($status);\n header($status_header);\n header('Content-type: ' . $content_type);\n echo $body;\n}", "title": "" }, { "docid": "25b1dc0423863b4d16b5129e8c9ee192", "score": "0.4916667", "text": "function sendResponse($status = 200, $body = '', $content_type = 'text/html')\n{\n $status_header = 'HTTP/1.1 ' . $status . ' ' . getStatusCodeMessage($status);\n header($status_header);\n header('Content-type: ' . $content_type);\n echo $body;\n}", "title": "" }, { "docid": "e296f6aea4d69ef80bac313327154e3e", "score": "0.49136165", "text": "public function getEncodedResponse()\n {\n return json_encode($this->response_content);\n }", "title": "" }, { "docid": "1993364eca2d2f7a3b5d28c7affa9411", "score": "0.49119833", "text": "public function render(){\n\t\t//debug('Request.php - Render method - Before binaries execution.'); die();\n\t\t$result = exec($this->path_bin.' '.$this->param);\n\n\t\t//On separe les differents champs et on les met dans un tableau\n\t\t$tableau = explode (\"!\", $result);\n\n\t\t//Récupération des paramètres\n\t\t$code = $tableau[1];\n\t\t$error = $tableau[2];\n\t\t$message = $tableau[3];\n\n\t\t$html = '';\n\t\t// Check code if error exists\n\t\tif(($code == \"\") && ($error == \"\")){\n\t\t\t$html = \"<center><h1>Erreur appel request</h1></center>\";\n\t\t\t$html .= \"<p>&nbsp;</p>\";\n\t\t\t$html .= \"Executable request non trouve : \".$this->path_bin;\n\t\t}elseif($code != 0){\n\t\t\t$html = \"<center><h1>Erreur appel API de paiement.</h1></center>\";\n\t\t\t$html .= \"<p>&nbsp;</p>\";\n\t\t\t$html .= \"<p>Message erreur : $error </p>\";\n\t\t}else{\n\t\t\t$html .= \"$message\";\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "b268d387d19f07419d33ecea2196ac04", "score": "0.49032632", "text": "function ckeditor_extended_get_file_upload_response(array $params = []): string {\n\t\n\t$response = '';\n\t\n\tif (elgg_extract('response_type', $params) === 'json') {\n\t\t$response = json_encode([\n\t\t\t'uploaded' => (int) elgg_extract('uploaded', $params),\n\t\t\t'filename' => elgg_extract('filename', $params),\n\t\t\t'url' => elgg_extract('url', $params),\n\t\t\t'error' => [\n\t\t\t\t'message' => elgg_extract('error', $params),\n\t\t\t]\n\t\t]);\n\t} else {\n\t\t// non json formatted response\n\t\t$funcNum = elgg_extract('funcNum', $params);\n\t\t$url = elgg_extract('url', $params);\n\t\t$error = elgg_extract('error', $params);\n\t\t\n\t\t$response = elgg_format_element('script',\n\t\t\t['type' => 'text/javascript'],\n\t\t\t\"window.parent.CKEDITOR.tools.callFunction({$funcNum}, '{$url}', '{$error}');\"\n\t\t);\n\t}\n\t\n\treturn elgg_trigger_plugin_hook('upload_response', 'ckeditor_extended', $params, $response);\n}", "title": "" }, { "docid": "270c8f8151208bd5c1c1eb822828bbc6", "score": "0.4901726", "text": "public function renderHtml(): string {\n $viewPath = dirname(__FILE__) . '/AbstractEmbed.twig';\n return $this->renderTwig($viewPath, [\n 'url' => $this->getUrl(),\n 'data' => json_encode($this, JSON_UNESCAPED_UNICODE)\n ]);\n }", "title": "" }, { "docid": "073f2c8b0502e228ddf3657a364c962e", "score": "0.4898156", "text": "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n logger(\"R \".$postStr);\n //extract post data\n if (!empty($postStr)){\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $RX_TYPE = trim($postObj->MsgType);\n\n switch ($RX_TYPE)\n {\n case \"event\":\n $resultStr = $this->receiveEvent($postObj);\n break;\n case \"text\":\n $resultStr = $this->receiveText($postObj);\n\t\t\t\t\tpost_text($postStr);\n break;\n default:\n $resultStr = \"unknow msg type: \".$RX_TYPE;\n break;\n }\n logger(\"T \".$resultStr);\n echo $resultStr;\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" }, { "docid": "4dd8e5608ed53655855207ce34b80aaf", "score": "0.48949733", "text": "public function tl()\n {\n //http://turing-chat.oss.tuling123.com/9282213c5f3163c03e907ee6efcc8d51.jpg\n $str = '【收到不支持的消息类型,暂无法显示】';\n $type = 0;\n\n $data = Tuling::handle()->param($str, $type)->answer();\n pr($data, 1);\n /*$url = 'http://turing-chat.oss.tuling123.com/9cb44e1ed86054c8f247df2298eef464.png';\n $up = new Download();\n $name = $up->downloadImage($url);\n echo $name;*/\n /*$curl = new Curl();\n $img = $curl->get($url);\n $filename = pathinfo($img, PATHINFO_BASENAME);\n pr($filename);*/\n\n }", "title": "" }, { "docid": "138900b2dbeb3379acb80972dc4ad4ed", "score": "0.4893498", "text": "public function answer()\n {\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header('Content-type: application/json');\n\n $message = new \\stdClass();\n $message->success = $this->success;\n $message->message = $this->message;\n echo json_encode($message, JSON_UNESCAPED_SLASHES);\n }", "title": "" }, { "docid": "c3ff3592bb192e741f0222b52026e914", "score": "0.48921913", "text": "function wpf_text_attachment( $mime = '', $file = '' ) {\n\t$text = '<object class=\"text\" type=\"' . $mime . '\" data=\"' . $file . '\" width=\"400\">';\n\t$text .= '<param name=\"src\" value=\"' . $file . '\" />';\n\t$text .= '</object>';\n\n\treturn $text;\n}", "title": "" }, { "docid": "a720e4d8d6e9b79a3500cd66a496d355", "score": "0.48904687", "text": "public function send(){\t\n\t\tif( $this->m_response == NULL )\t\n\t\t\treturn TRUE;\n\t\t$response = ( is_object( $this->m_response ) ) ? $this->m_response->valueOf() : $this->m_response;\n\t\tif( is_array( $response ) ) \n\t\t\techo json_encode( $response ); \n\t\telse echo $response;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "891dfb41726d108fc1bd0f610c594448", "score": "0.48810288", "text": "public function getResponse();", "title": "" }, { "docid": "891dfb41726d108fc1bd0f610c594448", "score": "0.48810288", "text": "public function getResponse();", "title": "" }, { "docid": "891dfb41726d108fc1bd0f610c594448", "score": "0.48810288", "text": "public function getResponse();", "title": "" }, { "docid": "891dfb41726d108fc1bd0f610c594448", "score": "0.48810288", "text": "public function getResponse();", "title": "" }, { "docid": "891dfb41726d108fc1bd0f610c594448", "score": "0.48810288", "text": "public function getResponse();", "title": "" } ]
56d69949e6772b7398579740d122bff8
Retorna o nome do lote
[ { "docid": "5487dfc10384a38e44394b236668dc47", "score": "0.0", "text": "public function getNome() {\n return $this->sNome;\n }", "title": "" } ]
[ { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.7553206", "text": "public function get_name();", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.7553206", "text": "public function get_name();", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.7553206", "text": "public function get_name();", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.7553206", "text": "public function get_name();", "title": "" }, { "docid": "12eae905687fdbfcf3195567c85987d1", "score": "0.73618215", "text": "public function get_name() {}", "title": "" }, { "docid": "6e0681f1dc1122812c9d7efffede5d0c", "score": "0.73431456", "text": "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.71987945", "text": "abstract public function get_name();", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.71987945", "text": "abstract public function get_name();", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.7155716", "text": "function getName() ;", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.7155716", "text": "function getName() ;", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.7155716", "text": "function getName() ;", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.7155716", "text": "function getName() ;", "title": "" }, { "docid": "bbb0007bb0ec2ab78d48f5619f563368", "score": "0.71222925", "text": "abstract protected function get_name();", "title": "" }, { "docid": "d28ddd17dfb570622cb075cdc43a75e4", "score": "0.7032119", "text": "public static function getName(): string;", "title": "" }, { "docid": "d28ddd17dfb570622cb075cdc43a75e4", "score": "0.7032119", "text": "public static function getName(): string;", "title": "" }, { "docid": "d28ddd17dfb570622cb075cdc43a75e4", "score": "0.7032119", "text": "public static function getName(): string;", "title": "" }, { "docid": "188e4e8fc1bef630f1800aec07d0902c", "score": "0.7011143", "text": "public function getNodename();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.6953159", "text": "function getName();", "title": "" }, { "docid": "e2be3f8ea6123626bd31f7c9614736ee", "score": "0.69261813", "text": "function getName(): string;", "title": "" }, { "docid": "498757f7b2619eb9cca022a3e0178aec", "score": "0.69138235", "text": "public function getListeName()\n\t{\n\t\treturn substr($this->getLogicalId(), strpos($this->getLogicalId(),\"_\")+2, 1).\" - \".parent::getName();\n\t}", "title": "" }, { "docid": "75b5232df8ae0813da802e20157273b6", "score": "0.69035417", "text": "public function get_name()\n {\n }", "title": "" }, { "docid": "75b5232df8ae0813da802e20157273b6", "score": "0.69035417", "text": "public function get_name()\n {\n }", "title": "" }, { "docid": "75b5232df8ae0813da802e20157273b6", "score": "0.6903508", "text": "public function get_name()\n {\n }", "title": "" }, { "docid": "33ed69a35f47061430c7bf2c5cd41095", "score": "0.6897311", "text": "public function getNome() {\n return $this->oCgm->getNome();\n }", "title": "" }, { "docid": "7e9371202192deeeba38a37abeae01f0", "score": "0.6896969", "text": "function getNome() {\n\t\treturn $this -> nome;\n\t}", "title": "" }, { "docid": "5fb8323adcbea9966846c3ea2e913130", "score": "0.687995", "text": "public function getNome()\n\t{\n\t\treturn $this->nome;\n\t}", "title": "" }, { "docid": "5fb8323adcbea9966846c3ea2e913130", "score": "0.687995", "text": "public function getNome()\n\t{\n\t\treturn $this->nome;\n\t}", "title": "" }, { "docid": "5fb8323adcbea9966846c3ea2e913130", "score": "0.687995", "text": "public function getNome()\n\t{\n\t\treturn $this->nome;\n\t}", "title": "" }, { "docid": "5fb8323adcbea9966846c3ea2e913130", "score": "0.687995", "text": "public function getNome()\n\t{\n\t\treturn $this->nome;\n\t}", "title": "" }, { "docid": "534c1a497128305bfa8ebc4a140b3b57", "score": "0.68778026", "text": "function getName() { }", "title": "" }, { "docid": "43108fcc807b372c30e82ecc1da6a6f4", "score": "0.68568987", "text": "public function getNome() {\r\n \t return $this->$Nome;\r\n \t}", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "3866d05a98c1cea8d9659b5da2cd6694", "score": "0.68533826", "text": "public function getNome()\n {\n return $this->nome;\n }", "title": "" }, { "docid": "81974baae60a133097dab4f79cee2700", "score": "0.6829035", "text": "public function getNome()\r\n {\r\n return $this->nome;\r\n }", "title": "" }, { "docid": "81974baae60a133097dab4f79cee2700", "score": "0.6829035", "text": "public function getNome()\r\n {\r\n return $this->nome;\r\n }", "title": "" }, { "docid": "43352a68a1b82204ab7a938fd62f0c88", "score": "0.6827291", "text": "public function get_name(){\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "36a290064db2a3c56437aecf49b489a8", "score": "0.6823876", "text": "public static function name(): string;", "title": "" }, { "docid": "36a290064db2a3c56437aecf49b489a8", "score": "0.6823876", "text": "public static function name(): string;", "title": "" }, { "docid": "05890f4c825237b09a44368bd287de2f", "score": "0.6817191", "text": "protected function _getName()\n {\n return $this->name();\n\t}", "title": "" }, { "docid": "e7aea1acbc1389901f1caa0aa6da890b", "score": "0.6808426", "text": "function get_name()\n\t{\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "8847a37abdf6a6152ce4f284871b7385", "score": "0.6807059", "text": "public function getNome() {\r\n return $this->nome;\r\n }", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" }, { "docid": "d3c376b6324454da64e0684cdbd422b3", "score": "0.678716", "text": "public function getName(): string;", "title": "" } ]
cc623655eb48de97155341655e807691
/Purchase List from existing purchase entry
[ { "docid": "e9d50f8077ad640a0067ee5c2be5391d", "score": "0.662544", "text": "public function purchase_list($purchase_id){\n\t\techo $this->purchase->purchase_list($purchase_id);\n\t}", "title": "" } ]
[ { "docid": "3f4b49671f81776e45f5ae867505e9a5", "score": "0.604169", "text": "public static function purchaseList() {\n\t\t\t$user = self::checkAuth();\n\t\t\tself::checkRole($user, [\"Staf\", \"Manager\"]);\n\t\t\t$purchases = Purchase::all();\n\t\t\tView::render('pages/purchase/index',[\n\t\t\t\t'user' => $user,\n\t\t\t\t'purchases' => $purchases\n\t\t\t]);\n\t\t}", "title": "" }, { "docid": "af79d05db1cadeb8f967d80bb4cb6b18", "score": "0.60381824", "text": "function getAllPurchases()\n\t{\n\t\t//Get the DB connection\n\t\t$conn = get_Connection();\n\t\t//Create and run query to get purchases for the user\n\t\t$sql = \"SELECT * FROM Purchase WHERE userId = \" . $_SESSION['userId'] . \" ORDER BY purchaseDate DESC\";\n\t\t$stmt = $conn->query($sql);\n\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t//Find the item name of each purchase\n\t\tforeach ($result as &$row)\n\t\t{\n\t\t\t$itemStmt = $conn->query(\"SELECT name FROM Item WHERE itemId = \" . $row['itemId']);\n\t\t\t$itemResult = $itemStmt->fetch();\n\t\t\t$row['itemId'] = $itemResult['name'];\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "39f96b53d10ca71d4f8b45d278d574e8", "score": "0.589912", "text": "public function purchaseList() {\n $products = $this->ProductServices->getPurchaseList(); \n return view('purchase/list',[\"products\"=>$products]);\n }", "title": "" }, { "docid": "550cf7032e5f6e18ba7f52ab92d48de5", "score": "0.5879186", "text": "public function showPurchaseOrder(){\n\t\t$db= $this->getAdapter();\n\t\t$sql = \"SELECT p.order_id, p.order, p.date_order, p.status, v.v_name, p.all_total,p.paid,p.balance\n\t\tFROM tb_purchase_order AS p INNER JOIN tb_vendor AS v ON v.vendor_id=p.vendor_id\";\n\t\t$row=$db->fetchAll($sql);\n\t\treturn $row;\n\t\t\n\t}", "title": "" }, { "docid": "82452abc9c37dcf7247f63d4935eeba8", "score": "0.585226", "text": "function get_this_purchase_order_items($id){\n return $this->db->query(\"SELECT * FROM purchase_lines WHERE Order_no=$id \");\n }", "title": "" }, { "docid": "271ad6957e617ee2e23f774a1b00a318", "score": "0.5844651", "text": "public function getPurchaseData(){\t\t\r\n\t\treturn $this->db->get('purchases')->result();\r\n\t}", "title": "" }, { "docid": "19d50d4d2a489aafc08c7d12c8cfe30a", "score": "0.58406925", "text": "public function get_items_by_purchase($acc_id, $pur_id)\n {\n\n $query = $this->db->query(\"\n select\n product.pro_id,\n product.des_id,\n product.pur_id,\n product.col_id,\n product.pro_name,\n product.pro_price,\n product.pro_quantity,\n product.pro_gender,\n product.pro_size,\n color.col_name,\n design.des_id\n from product\n inner join color\n inner join design\n on color.col_id = product.col_id\n and product.des_id = design.des_id\n and pur_id = $pur_id;\n \");\n\n if ($query->num_rows() > 0){\n return $query->result();\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "a87d3ece5ee8159cf1b043e3f62c92a0", "score": "0.5798044", "text": "public function show(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "a87d3ece5ee8159cf1b043e3f62c92a0", "score": "0.5798044", "text": "public function show(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "a87d3ece5ee8159cf1b043e3f62c92a0", "score": "0.5798044", "text": "public function show(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "5dead3eab73c0450b4851471eaf8211b", "score": "0.55938905", "text": "public function purchase_item_by_search()\n\t{\n\t\t$CI =& get_instance();\n\t\t// $this->auth->check_admin_auth();\n\t\t$CI->load->library('lpurchase');\n\t\t$supplier_id = $this->input->post('supplier_id');\t\t\t\n $content = $CI->lpurchase->purchase_by_search($supplier_id);\n\t\t$this->template->full_admin_html_view($content);\n\t}", "title": "" }, { "docid": "7d8f9cbec9b011b3f2911b19de49082e", "score": "0.5593105", "text": "public function index() {\n\t\t$this->ItemsPurchaseOrder->recursive = 0;\n\t\t$this->set('itemsPurchaseOrders', $this->paginate()); \n\t}", "title": "" }, { "docid": "d783daffc05a4356ec3d395e45800495", "score": "0.5578278", "text": "function convert_to_INV($purEntry = -1){\n\t$data = [];\n\tif (Input::exists()){\n\t\t$db = DB::getInstance();\n\n\t\t$invNo = Input::get('invNo');\n\t\t$data['purEntry'] = $purEntry;\n\n\t\tif ($purEntry > -1){\n\t\t\t$getInv = DB::getInstance()->get('purchaseInvoice', array(\"id\", \"=\", $purEntry));\n\t\t\t$invNo = $getInv->first()['invoiceNumber'];\n\t\t\t$data['purEntry'] = $getInv->first()['id'];\n\t\t}else if ($purEntry == -1){\n\t\t\t//echo \"here!\";\n\t\t\t$getInv = DB::getInstance()->get('purchaseInvoice', array(\"invoiceNumber\", \"=\", Input::get('invNo')));\n\t\t\t$data['purEntry'] = $getInv->first()['id'];\n\t\t}\n\t\t\n\t\t$getDM = $db->get('purchaseBills', array('invoiceNumber', '=', $invNo));\n\t\t$i = 1;\n\t\t$data['count'] = $getDM->count();\n\t\t$data['billDate'] = $getDM->first()['date'];\n\t\t$data['supplier'] = $getDM->first()['supplier'];\n\t\t$data['invoiceNo'] = $invNo;\n\t\t$data['debit_note'] = DB::getInstance()->get('purchaseInvoice', array('invoiceNumber', '=', $invNo))->first()['debitNote'];\n\t\t$data['bill'] = '';\n\t\tforeach ($getDM->results() as $content => $dm){\n\t\t\t$data['bill'] .= \"<tr>\";\n\t\t\t$data['bill'] .= '<td>\n\t\t\t\t<input type=\"text\" name=\"productName_'.$i.'\" id=\"productName_'.$i.'\" class=\"form-control\" list=\"drugList_'.$i.'\" value=\"'.$dm['productName'].'\">\n\t\t\t\t\t<datalist id=\"drugList_'.$i.'\"></datalist>\n\t\t\t\t</input>\n\t\t\t</td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" name=\"productQuantity_'.$i.'\" id=\"productQuantity_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['productQuantity'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" name=\"productFree_'.$i.'\" id=\"productFree_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['productFree'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" name=\"productSize_'.$i.'\" id=\"productSize_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['purchaseSize'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" name=\"tabQuantity_'.$i.'\" id=\"tabQuantity_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['tabQuantity'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"text\" name=\"batchNo_'.$i.'\" id=\"batchNo_'.$i.'\" class=\"form-control\" value=\"'.$dm['batchNo'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"text\" name=\"exDate_'.$i.'\" id=\"exDate_'.$i.'\" class=\"form-control month\" value=\"'.$dm['expiryDate'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" step=\"any\" name=\"purchaseRate_'.$i.'\" id=\"purchaseRate_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['purchaseRate'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" step=\"any\" name=\"discount_'.$i.'\" id=\"discount_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['discount'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" step=\"any\" name=\"VAT_'.$i.'\" id=\"VAT_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['vatAmount'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" step=\"any\" name=\"vatPer_'.$i.'\" id=\"vatPer_'.$i.'\" oninput=\"calculate('.$i.');\" class=\"form-control\" value=\"'.$dm['VAT'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" step=\"any\" name=\"CST_'.$i.'\" id=\"CST_'.$i.'\" class=\"form-control\" value=\"'.$dm['CST'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" step=\"any\" name=\"MRP_'.$i.'\" id=\"MRP_'.$i.'\" class=\"form-control\" value=\"'.$dm['MRP'].'\"></td>';\n\t\t\t$data['bill'] .= '<td><input type=\"number\" step=\"any\" name=\"productAmount_'.$i.'\" id=\"productAmount_'.$i.'\" class=\"form-control\" value=\"'.$dm['purchaseAmount'].'\"></td>';\n\t\t\t$data['bill'] .= \"</tr>\";\n\t\t\t$i++;\n\t\t}\n\t\techo json_encode($data);\n\t}\n\t//TODO \n\t/* Update purchaseBills : change DM to Inv */\n}", "title": "" }, { "docid": "3d9380e18af6c41237c00cc87592ac28", "score": "0.5561805", "text": "public function get_purchase($pur_id)\n {\n\n\n $query = $this->db->query(\"\n select\n purchase.pur_id,\n purchase.pur_date,\n account.acc_id,\n account.acc_email,\n shipment.shi_tracking,\n carrier.car_name,\n carrier.car_id,\n shipment.shi_id,\n shipment.shi_address,\n shipment.shi_name,\n shipment.shi_surname,\n shipment.shi_number,\n shipment.shi_phone,\n shipment.shi_email,\n commune.com_name,\n region.reg_name,\n case shipment.shi_status\n when 0 then 'en preparación'\n when 1 then 'enviado'\n end as pur_status,\n case shipment.shi_status\n when 0 then 'label-warning'\n when 1 then 'label-success'\n end as pur_label_class,\n purchase.pur_shipping_price,\n sum(product.pro_price) as pur_subtotal,\n sum(product.pro_price) + purchase.pur_shipping_price as pur_total\n from product\n inner join purchase\n inner join account\n inner join shipment\n inner join carrier\n inner join commune\n inner join region\n where product.pur_id = purchase.pur_id\n and purchase.acc_id = account.acc_id\n and purchase.pur_id = shipment.pur_id\n and carrier.car_id = shipment.car_id\n and shipment.com_id = commune.com_id\n and commune.reg_id = region.reg_id\n and product.pur_id in (\n select pur_id\n from purchase\n )\n and purchase.pur_id = $pur_id\n group by purchase.pur_id;\n \");\n\n if ($query->num_rows() > 0){\n return $query->row();\n } else {\n return null;\n }\n\n }", "title": "" }, { "docid": "5af6cd8a1042bba72a62557be3b03391", "score": "0.55589354", "text": "public function purchase($id) {\n\n $sort = (isset($_POST['sort'])) ? $_POST['sort'] : array();\n $offset = (isset($_POST['current'])) ? $_POST['current'] : parent::OFFSET;\n $limit = (isset($_POST['rowCount'])) ? $_POST['rowCount'] : parent::LIMIT;\n $search = (isset($_POST['searchPhrase']) && !empty($_POST['searchPhrase'])) ? $_POST['searchPhrase'] : '';\n\n //get member list\n $row = $this->purchase->getInventoryPurchase($id, $sort, $search, $offset, $limit);\n\n $row['current'] = (int)$offset;\n $row['rowCount'] = (int)$limit;\n\n //return json\n return $this->_returnRaw($row);\n }", "title": "" }, { "docid": "92328d3e71020836198c03c4a9cca243", "score": "0.5558038", "text": "public function retrieve_purchase_editdata($purchase_id) {\n\n $this->db->select('*');\n\n $this->db->from('purchase_receipt_order');\n\n $this->db->where('purchase_id', $purchase_id);\n\t\t\n\t\t$this->db->group_by('label');\n\t\t \n $query = $this->db->get();\n\n if ($query->num_rows() > 0) {\n\n return $query->result_array();\n\n }\n\n return false;\n\n }", "title": "" }, { "docid": "3ce3834fbf8338ce96abf352d1558f05", "score": "0.55315906", "text": "function _GetTx_PURCHASE_RECEIPT($source_detail) // OK\n {\n $dt = $source_detail->getEventDetail(); // get into array\n $detail = $source_detail; // save a copy\n\nif ((($dt['VAL-OWNER_MATL'] == 'Y' || $dt['VAL-CONSIGNMENT'] == 'Y') || $dt['VAL-ITEM_CATEGORY'] == 1) && \n $dt['VAL-CARINIT'] == '' && \n $dt['VAL-PROGRAM'] == '' )\n { // execute this clause if receiving consignment or expensed items to a warehouse (not to a car or program)\n // Create the Item account\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $itemAccount = new ItemAccount($tmpDim);\n unset($tmpDim); \n\n // Create the warehouse item account\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $tmpDim->addDimension('WAREHOUSE', $dt['WAREHOUSE']);\n $whsItemAccount = new WarehouseItemAccount($tmpDim);\n unset($tmpDim);\n\n// ---------------------------------------- 4, 6, 8\n // Create the InventoryTransaction and add the item and warehouse item accounts\n\n $detail->setEventDetailVar('INV_TRANSACTION_TYPE', 7); // TX #1\n $invTrans = new InventoryTransaction($detail); \n\n if ($detail->getEventDetailVar('VAL-BOE_SEARCH') == \"Y\" || \n $detail->getEventDetailVar('VAL-WAREHOUSE_TYPE') == \"1\") \n {\n $invTrans->addAccount($itemAccount);\n if ($detail->getEventDetailVar('VAL-CONSIGNMENT') != 'Y' && \n $detail->getEventDetailVar('VAL-OWNER_MATL') != 'Y') $do_pur_price = true; \n else $do_pur_price = false;\n } \n else $no_update_costprice = true; // DO NOT update\n \n $invTrans->addAccount($whsItemAccount); \n $this->_transArray[] = $invTrans;\n unset($invTrans);\n \n// ----------------------------------------\nif($do_pur_price) // If not consigment, do purchase price TX\n {\n $detail = $source_detail; // reset details back\n // Create the PurchasePriceTransaction // TX #2 \n // and add the cost price account\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $CPAccount = new CostPriceAccount($tmpDim);\n unset($tmpDim); \n\n $detail->setEventDetailVar('CURRENT_ITEM_ACCOUNT_BALANCE', $itemAccount->getBalance());\n $purPriceTrans = new PurchasePriceTransaction($detail);\n $purPriceTrans->addAccount($CPAccount); \n \n $this->_transArray[] = $purPriceTrans; \n }\n }\n// -----------------------------------------\nelse { // 'NON-CONSIGMENT'\n // Create FIRST Inventory Transaction, THIS IS SHARED BELOW, DO NOT UNSET OR RESET\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $itemAccount = new ItemAccount($tmpDim);\n unset($tmpDim); \n \n // Create the warehouse item account **** NON-EXISTING WAREHOUSE\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $tmpDim->addDimension('WAREHOUSE', 'NX-WAREHOUSE');\n $whsItemAccount = new WarehouseItemAccount($tmpDim);\n unset($tmpDim);\n \n $detail->setEventDetailVar('INV_TRANSACTION_TYPE', 11); // INV TX #1\n $invTrans = new InventoryTransaction($detail);\n $invTrans->addAccount(&$itemAccount);\n $invTrans->addAccount(&$whsItemAccount);\n \n $this->_transArray[] = &$invTrans; \n unset($invTrans);\n \n $detail = $source_detail; // reset details back\n\n // Create SECOND Inventory Transaction\n $detail->setEventDetailVar('QUANTITY', 0 - $detail->getEventDetailVar('QUANTITY')); // REVERSE TX\n $detail->setEventDetailVar('SEQ_INVTRANS', $detail->getEventDetailVar('SEQ_INVTRANS') + 1); // Increment Sequence\n $detail->setEventDetailVar('INV_TRANSACTION_TYPE', 6); // INV TX #2\n\n $invTrans = new InventoryTransaction($detail);\n $invTrans->addAccount(&$itemAccount);\n $invTrans->addAccount(&$whsItemAccount);\n \n $this->_transArray[] = &$invTrans;\n unset($invTrans, $itemAccount);\n }\n return true;\n }", "title": "" }, { "docid": "396ee3b1640dcf4657adebd47829be7f", "score": "0.5517961", "text": "public function index()\n {\n return ResponseUtil::json(ApiUtils::getList(Purchase::query()));\n }", "title": "" }, { "docid": "0740178756762207165468bc38c56ffe", "score": "0.5515041", "text": "public function purchaseInfo($id){\n\t\t$db=$this->getAdapter();\n\t\t$sql = \"SELECT poh.history_id,poh.date,v.vendor_id,v.v_name,v.phone,v.add_name,v.contact_name,v.add_remark,ro.recieve_id,\n\t\tp.order_id,p.LocationId, p.order, p.date_order,p.date_in,p.status,p.payment_method,p.currency_id,\n\t\tp.remark,p.version,p.net_total,p.discount_type,p.discount_value,p.discount_real,p.paid,p.all_total,p.balance, SUM(poi.sub_total) as sub_total\n\t\tFROM \n\t\t\t\ttb_purchase_order_item as poi,\n\t\t\t\ttb_purchase_order AS p \n\t\tINNER JOIN \n\t\t\t\ttb_vendor AS v ON v.vendor_id= p.vendor_id\n\t\tINNER JOIN tb_purchase_order_history as poh ON poh.order = p.order_id\n\t\tINNER JOIN tb_recieve_order as ro ON ro.order_id = p.order_id\n\t\tWHERE poi.order_id = p.order_id and p.order_id=\".$id.\" LIMIT 1\";\n\t\t$rows=$db->fetchRow($sql);\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "c2e7aa4cf23ed55b6067636c95e2c706", "score": "0.5507278", "text": "function getSkuList()\n {\n }", "title": "" }, { "docid": "2be17418d1bf6108f6e532715f43d84b", "score": "0.5494289", "text": "function init(){\n\t\t$p=new purchase(\"\");\n\t\t$pUIDs=$p->backAllUID();\n\t\t$this->purchases=array();\n\t\t$i=1;\n\t\tforeach($pUIDs as $pUID){\n\t\t\t$this->purchases[]=new purchaseviewer($this->_fullname.$i++);\n\t\t\tend($this->purchases)->bookUID($pUID);\n\t\t}\n\t}", "title": "" }, { "docid": "4f4462316d945f25a0d32c2d25f09ad3", "score": "0.54688674", "text": "public function getPurchases()\n {\n return $this->purchases;\n }", "title": "" }, { "docid": "9c0379c513b8e9fe6a81db20b40e7adc", "score": "0.5453801", "text": "public function view_purchase_orders(){\n\n\t\t$purchase_id = $this->input->post('id');\n\n\t\t$parameters['where'] = array('purchase_orders.purchase_code' => $purchase_id);\n\t\t// $parameters['group'] = array('purchase_code');\n\t\t$parameters['join'] = array('company' => 'company.company_id = purchase_orders.company',\n\t\t\t\t\t\t\t\t'supplier' => 'supplier.supplier_name = purchase_orders.supplier',\n\t\t\t\t\t\t\t\t'products' => 'products.code = purchase_orders.product',\n\t\t\t\t\t\t\t\t'warehouse_management' => 'warehouse_management.id = purchase_orders.warehouse_id' );\n\t\t$parameters['select'] = 'purchase_orders.*, purchase_orders.id AS purchase_id, supplier.id AS supplier_id, supplier.*, company.*, products.id AS product_id, products.*, warehouse_management.wh_name';\n\t\t//\n\t\t$data = $this->MY_Model->getRows('purchase_orders', $parameters);\n\n\t\t$data_array['purchase'] = $data;\n\n\t\tjson($data_array);\n\t}", "title": "" }, { "docid": "f6da4baa45f4f65cd4de677d6c7e17f6", "score": "0.5441337", "text": "public function purchaseReceipts()\n {\n $loginUserId = $this->Encryption->decode($this->Session->read('Auth.Front.id'));\n $txData = $this->Transaction->find('all',array('conditions'=>array('Transaction.user_id'=>$loginUserId)));\n $this->set(compact('txData'));\n }", "title": "" }, { "docid": "3193323f9a11d93200ebb9a9f4396aa5", "score": "0.53727466", "text": "public function return_purchase_list($return_id){\n\t\techo $this->purchase->return_purchase_list($return_id);\n\t}", "title": "" }, { "docid": "a1c9989c93e02e59812e2b06e6e70dd3", "score": "0.53461856", "text": "public function index()\n {\n return new PurchaseCollection(Purchase::all());\n }", "title": "" }, { "docid": "69bc80a972d59d4f5bb3b87855904550", "score": "0.5334959", "text": "public function addPurchaseOrder($purchaseOrder)\n {\n $supplier = Supplier::find($purchaseOrder['supplierName']);\n if (isset($purchaseOrder['isFavourite'])) {\n $favourite = 1;\n } else {\n $favourite = 0;\n }\n $order = PurchaseOrderList::where('created_at', '>=', Carbon::now()->startOfMonth())->withTrashed()->get();\n $lpoNumber = sprintf(\"%03d\", $order->count() + 1);\n $date = Carbon::today()->format('ym');\n $lpo = 'PO' . $date . $lpoNumber;\n $purchaseList = array(\n \"polSupplierId\" => $purchaseOrder['supplierName'],\n \"polSupplierName\" => $supplier->supplierName,\n \"polDeliverBy\" => $purchaseOrder[\"deliverBy\"],\n \"polTermsOfPayment\" => $purchaseOrder[\"termsOfPayment\"],\n \"isFavourite\" => $favourite,\n \"remarks\" => $purchaseOrder[\"remarks\"],\n \"departmentId\" => $purchaseOrder[\"departmentId\"],\n 'lpoNumber' => $lpo,\n 'lpoStatus' => 'Awaiting Approval',\n 'lpoCurrencyType' => $purchaseOrder[\"lpoCurrencyType\"],\n 'lpoDate' => $purchaseOrder[\"lpoDate\"],\n 'prRequestNo' => $purchaseOrder[\"prRequestNo\"],\n 'vatTaxAmount' => $purchaseOrder['vatTaxAmount']\n );\n $purchaseList = PurchaseOrderList::create($purchaseList);\n $id = $purchaseList->id;\n $prRequestNo = $purchaseList->prRequestNo;\n $orders = json_decode($purchaseOrder['order']);\n $orderList = array();\n foreach ($orders as $order) {\n PurchaseOrder::create(array(\n 'plId' => $purchaseList->id,\n 'poItemCode' => $order->id,\n 'poDescription' => $order->productName,\n 'poQty' => $order->reorder,\n \"taxable\" => $order->taxable,\n 'poUnitPrice' => $order->unitCost\n ));\n }\n\n $status = array(\n 'lpoCreatedOn' => Carbon::now(),\n 'lpoCreated' => 1,\n );\n $this->updateRequestLpoCreated($prRequestNo, $status);\n call_user_func(array($this, env('LPOFORMAT', 'generatePdf')), $id);\n // $this->generateGenericPdf($id);\n\n if (array_key_exists('isEmail', $purchaseOrder)) {\n $this->sendEmail($purchaseOrder['supplierName'], $purchaseList->id);\n }\n }", "title": "" }, { "docid": "0e81910c38891b5af799673eca34c866", "score": "0.5323108", "text": "public function show(PurchaseOrder $purchaseOrder)\n {\n //\n }", "title": "" }, { "docid": "45057eccf5385a942caa0d80231be0bd", "score": "0.5319627", "text": "public function get_purchase_report($data)\n {\n $from_date = $data['start_date'];\n $to_date = $data['end_date'];\n return $this->db->select(\"p.*, s.name supplier_name\")\n ->where([\"purchase_date >=\" => $from_date, \"purchase_date <=\" => $to_date])\n ->join('supplier_information s', \"s.id = p.supplier_id\", 'left')\n ->get(\"purchases p\")\n ->result();\n }", "title": "" }, { "docid": "856dfc0647582b14ee1aff7bcdafe823", "score": "0.5272402", "text": "function purchase()\n {\n //loops pushes rows into purchased as many times as there are different products\n for ($i=0; $i<count($_SESSION['ids']); $i++)\n {\n if (isset($_SESSION['ids'][$i]))\n {\n $id_user=$this->Cart_model->getUserID();\n $id_products=$_SESSION['ids'][$i];\n $amount=$_SESSION['cart'][$id_products];\n $name=$this->Cart_model->getName($id_products);\n $priceForOne=$this->Cart_model->getPrice($id_products);\n $price=($priceForOne*$amount);\n \n $insert_data=array(\n 'time'=>date(\"d/m/Y\"),\n 'id_user'=>$id_user,\n 'id_products'=>$id_products,\n 'amount'=>$amount,\n 'price'=>$price,\n 'name'=>$name\n );\n $this->db->insert('purchased',$insert_data);\n }\n }\n //empties cart and ids when one has bought the items\n $_SESSION['cart']=array();\n $_SESSION['ids']=array();\n $data['page']='cart/purchase';\n $this->load->view('menu/content',$data); \n }", "title": "" }, { "docid": "b9f2597d6bebd8c9c2e128560e0bffcf", "score": "0.52506447", "text": "public function index()\n {\n $this->checkPermission('purchase.index');\n\n $purchases = Purchase::where(function ($query) {\n $search = request()->get('search');\n if ($search) {\n $query->where('invoice_no', 'like', \"%{$search}%\");\n }\n })->orderBy('id', $this->defaultOrderBy)->get();\n // $this->putSL($purchases);\n return view('dashboard.purchase.index', compact('purchases'));\n }", "title": "" }, { "docid": "2d3124af9f31c9a616d80925b431dc5a", "score": "0.52421826", "text": "public function testGetProductPurchaseByProductPurchasePurchaseId() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"productPurchase\");\n\n\t\t// create a new Product Purchase and insert to into mySQL\n\t\t$productPurchase = new ProductPurchase($this->item->getProductId(), $this->shop->getPurchaseId(), $this->coinsAndBills1);\n\t\t$productPurchase->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = ProductPurchase::getProductPurchaseByProductPurchasePurchaseId($this->getPDO(),$productPurchase->getProductPurchasePurchaseId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"productPurchase\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Rootstable\\\\ProductPurchase\", $results);\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoProductPurchase = $results[0];\n\t\t$this->assertEquals($pdoProductPurchase->getProductPurchaseProductId(), $this->item->getProductId());\n\t\t$this->assertEquals($pdoProductPurchase->getProductPurchasePurchaseId(), $this->shop->getPurchaseId());\n\t\t$this->assertEquals($pdoProductPurchase->getProductPurchaseAmount(), $this->coinsAndBills1);\n\t}", "title": "" }, { "docid": "b02c1f2187131461727f8f7d8a38ff25", "score": "0.5232244", "text": "private function getNewPurchase()\n {\n $purchaseBuilder = new PurchaseBuilder();\n $purchase = $purchaseBuilder\n ->addDeliveryTax(Purchase::DELIVERY_TAX)\n ->addStatus(Purchase::STATUS_WAITING)\n ->get()\n ;\n\n $this->purchaseRepository->add($purchase);\n\n return $purchase;\n }", "title": "" }, { "docid": "4f82ce0200df3ce7f8146f419017c8cb", "score": "0.5216761", "text": "function getPurchaseInfo() {\n\n\t\t$chargeTotal = 0;\n\t\t$itemsPurchased = ''; // a string which will list what the user bought\n\n\t\tif ( in_array( $this->corporateGroup, $this->usergroupArray ) )\n\t\t{\n\t\t\t$chargeTotal = $this->corporateMembershipCharge;\n\t\t\t$itemsPurchased = \"Corporate Membership \\$$chargeTotal \";\n\t\t}\n\n\t\telseif ( in_array( $this->professionalGroup, $this->usergroupArray )\n\t\t\t|| $this->usergroupProPhoneAdj\n\t\t)\n\t\t{\n\t\t\t$chargeTotal = $this->professionalMembershipCharge;\n\t\t\t$itemsPurchased .= \"Professional Membership \\$$chargeTotal \";\n\t\t}\n\n\t\tif ($this->debug) {\n\t\t\t//echo 'discount redemption code /' . $this->dataArr['redemptionCode'] . '/';\n\t\t}\n\n\t\t$redemptionCode = $this->dataArr['redemptionCode'];\n\n\t\t$productID = $this->getRedeemableProductID();\n\n\t\tif ($this->isRedemptionCodeValidForProduct($redemptionCode, $productID)) {\n\t\t\tif ($this->debug) {\n\t\t\t\t//echo 'discount redemption code';\n\t\t\t}\n\n\t\t\tif ( 0 != $this->redemptionAmount )\n\t\t\t{\n\t\t\t\t$redemptionCodeDiscount = 0 - $this->redemptionAmount;\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$redemptionCodeDiscount = $chargeTotal\n\t\t\t\t\t\t\t\t\t* $this->redemptionPercentage\n\t\t\t\t\t\t\t\t\t/ 100\n\t\t\t\t\t\t\t\t\t* -1;\n\t\t\t}\n\n\t\t\t$chargeTotal += $redemptionCodeDiscount;\n\n\t\t\t$itemsPurchased .= \"\\n\t\t\t\t\t\tRedemption Code $redemptionCode Applied \\$$redemptionCodeDiscount\";\n\t\t}\n\n\t\tif (($this->dataArr['static_info_country'] != 'USA')\n\t\t\t&& ( $this->dataArr['tt_products'] == '7' ) )\n\t\t{\n\t\t\t$magazineCharge = 80;\n\t\t\t$chargeTotal += $magazineCharge;\n\t\t\t$itemsPurchased .= \"\\n\t\t\t\t\t\tInternational Magazine Subscription \\$$magazineCharge\";\n\t\t}\n\n\t\tif ($this->debug) {\n\t\t\techo \"$ chargeTotal $chargeTotal (To be set to $ 1.05 for testing)\";\n\t\t\t//echo $itemsPurchased;\n\t\t\t$chargeTotal = '1.05';\n\t\t}\n\n\t\treturn array($chargeTotal, $itemsPurchased);\n\t}", "title": "" }, { "docid": "d2d0991f0270015f105986bda61c71be", "score": "0.51990646", "text": "function get_this_purchase_order_details($d){\n return $this->db->query(\"SELECT * FROM purchase_order WHERE Order_no='$d' \");\n }", "title": "" }, { "docid": "544d80bce3655e6454b7f1d0f6575863", "score": "0.5198525", "text": "public function add() {\n\t\ttry {\n\t\t\t$result = $this->ItemsPurchaseOrder->add($this->data);\n\t\t\tif ($result === true) {\n\t\t\t\t$this->Session->setFlash(__('The items purchase order has been saved', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t} catch (OutOfBoundsException $e) {\n\t\t\t$this->Session->setFlash($e->getMessage());\n\t\t} catch (Exception $e) {\n\t\t\t$this->Session->setFlash($e->getMessage());\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t$items = $this->ItemsPurchaseOrder->Item->find('list');\n\t\t$purchaseOrders = $this->ItemsPurchaseOrder->PurchaseOrder->find('list');\n\t\t$this->set(compact('items', 'purchaseOrders'));\n \n\t}", "title": "" }, { "docid": "87edc95f3ad0cfcab64bc2da65533242", "score": "0.5190319", "text": "public function index()\n {\n $purchase = purchase_invoice::all();\n return view('item_purchase_history',compact('purchase'));\n }", "title": "" }, { "docid": "7104b9b2004f07f5ba5c61ce2df4252b", "score": "0.5158243", "text": "function get_distributor_billing(){\r\n\r\n\t$sql = \"SELECT d.*, dist.user_full_name \r\n\r\n\t\t\tFROM distributor_billing d, distributor dist\r\n\r\n\t\t\tWHERE d.dist_bill_dist_id = dist.user_id ORDER BY d.dist_bill_pay_date desc\";\r\n\r\n\t$results = get_results($sql);\r\n\r\n\treturn $results;\r\n\r\n}", "title": "" }, { "docid": "b62dc5c8b36198c47566f88ac566bae2", "score": "0.5151044", "text": "function getPurchases() {\n\tglobal $userID, $conn;\n\t$sql = \"SELECT P.`PurchaseID`, P.`UserID`, P.`TicketID`, P.`Amount`, P.`OrderDate`,\n\t\tT.`Band`, T.`Date`, T.`Time`, T.`Price`, T.`Quantity`, T.`Stock`, T.`Location`\n\t\tFROM `Purchase` P, `Ticket` T \n\t\tWHERE P.`OrderDate` IS NOT NULL AND T.`TicketID`=P.`TicketID` \n\t\tAND P.`UserID`='$userID' \n\t\tORDER BY P.`OrderDate` DESC, P.`PurchaseID` ASC;\";\n\t\t\n\t$result = mysqli_query($conn, $sql);\n\t\n\t$date = 0;\n\t$orderTotal = 0;\n\tif (mysqli_num_rows($result) >= 1) {\n\t\twhile($row = mysqli_fetch_assoc($result)) {\n\t\t\t\n\t\t\t//checks if the order date is equal to what it was last\n\t\t\tif ($date != $row['OrderDate']) {\n\t\t\t\t//sets the order date right away (otherwise it would mess up and put 0 on the first one)\n\t\t\t\tif ($date == 0) {\t\n\t\t\t\t\t$date = $row['OrderDate'];\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"order\">\n\t\t\t\t\t\t<div class=\"order-details\">\n\t\t\t\t\t\t\t<div class=\"order-date\"><?php\techo $date;\t?></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"order-items\">\n\t\t\t\t\t\n\t\t\t\t<?php\t} else {\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$date = $row['OrderDate'];\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"order-total\">Order total: <span>$<?php\techo number_format($orderTotal, 2);\t?></span></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"order\">\n\t\t\t\t\t\t<div class=\"order-details\">\n\t\t\t\t\t\t\t<div class=\"order-date\"><?php\techo $date;\t?></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"order-items\">\n\t\t\t\t\t\n\t\t\t\t<?php\t\n\t\t\t\t\t$orderTotal = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//adds to the total\n\t\t\t$orderTotal += $row['Price'] * $row['Amount'];\n\t\t\tgetHistoryItem($row);\n\t\t}\n\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"order-total\">Order total: <span>$<?php\techo number_format($orderTotal, 2);\t?></span></div>\n\t\t</div>\n\t\t<?php\n\t} else {\n\t\t// no history found\n\t\t?>\n\t\t\t<div class=\"no-history\">\n\t\t\t\tNo past purchases found. Would you like to purchase what is in your <a href=\"cart.php\">Cart</a>?\n\t\t\t</div>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "5c25232fdb153a025c61deac84f92b47", "score": "0.51509863", "text": "public function allIndividualPurchases(): Generator;", "title": "" }, { "docid": "36a8bab62da642482e1b3f435c14508d", "score": "0.5147469", "text": "public function show(Request $request, $id)\n {\n\n $this->authorizeForUser($request->user('api'), 'view', Purchase::class);\n $role = Auth::user()->roles()->first();\n $view_records = Role::findOrFail($role->id)->inRole('record_view');\n $purchase = Purchase::with('details.product.unitPurchase')\n ->where('deleted_at', '=', null)\n ->findOrFail($id);\n\n $details = array();\n\n // Check If User Has Permission view All Records\n if (!$view_records) {\n // Check If User->id === purchase->id\n $this->authorizeForUser($request->user('api'), 'check_record', $purchase);\n }\n\n $purchase_data['Ref'] = $purchase->Ref;\n $purchase_data['date'] = $purchase->date;\n $purchase_data['statut'] = $purchase->statut;\n $purchase_data['discount'] = $purchase->discount;\n $purchase_data['shipping'] = $purchase->shipping;\n $purchase_data['tax_rate'] = $purchase->tax_rate;\n $purchase_data['TaxNet'] = $purchase->TaxNet;\n $purchase_data['supplier_name'] = $purchase['provider']->name;\n $purchase_data['supplier_email'] = $purchase['provider']->email;\n $purchase_data['supplier_phone'] = $purchase['provider']->phone;\n $purchase_data['supplier_adr'] = $purchase['provider']->adresse;\n $purchase_data['warehouse'] = $purchase['warehouse']->name;\n $purchase_data['GrandTotal'] = number_format($purchase->GrandTotal, 2, '.', '');\n $purchase_data['paid_amount'] = number_format($purchase->paid_amount, 2, '.', '');\n $purchase_data['due'] = number_format($purchase_data['GrandTotal'] - $purchase_data['paid_amount'], 2, '.', '');\n $purchase_data['payment_status'] = $purchase->payment_statut;\n\n foreach ($purchase['details'] as $detail) {\n\n //-------check if detail has purchase_unit_id Or Null\n if($detail->purchase_unit_id !== null){\n $unit = Unit::where('id', $detail->purchase_unit_id)->first();\n }else{\n $product_unit_purchase_id = Product::with('unitPurchase')\n ->where('id', $detail->product_id)\n ->first();\n $unit = Unit::where('id', $product_unit_purchase_id['unitPurchase']->id)->first();\n }\n\n if ($detail->product_variant_id) {\n\n $productsVariants = ProductVariant::where('product_id', $detail->product_id)\n ->where('id', $detail->product_variant_id)->first();\n\n $data['code'] = $productsVariants->name . '-' . $detail['product']['code'];\n \n } else {\n $data['code'] = $detail['product']['code'];\n }\n \n $data['quantity'] = $detail->quantity;\n $data['total'] = $detail->total;\n $data['name'] = $detail['product']['name'];\n $data['cost'] = $detail->cost;\n $data['unit_purchase'] = $unit->ShortName;\n\n if ($detail->discount_method == '2') {\n $data['DiscountNet'] = $detail->discount;\n } else {\n $data['DiscountNet'] = $detail->cost * $detail->discount / 100;\n }\n\n $tax_cost = $detail->TaxNet * (($detail->cost - $data['DiscountNet']) / 100);\n $data['Unit_cost'] = $detail->cost;\n $data['discount'] = $detail->discount;\n\n if ($detail->tax_method == '1') {\n\n $data['Net_cost'] = $detail->cost - $data['DiscountNet'];\n $data['taxe'] = $tax_cost;\n } else {\n $data['Net_cost'] = ($detail->cost - $data['DiscountNet']) / (($detail->TaxNet / 100) + 1);\n $data['taxe'] = $detail->cost - $data['Net_cost'] - $data['DiscountNet'];\n }\n\n $details[] = $data;\n }\n\n $company = Setting::where('deleted_at', '=', null)->first();\n\n return response()->json([\n 'details' => $details,\n 'purchase' => $purchase_data,\n 'company' => $company,\n ]);\n\n }", "title": "" }, { "docid": "9e3d091b52dcca0fd3b5bff906b78c7a", "score": "0.5142455", "text": "public function __construct(Purchase $purchase)\n {\n $this->purchase = $purchase;\n }", "title": "" }, { "docid": "9ad0c412545c32faa0c932020ad9e064", "score": "0.51362926", "text": "public function index(Request $request)\n {\n $purchase = Purchase::query();\n\n\n $purchase->with('supplier');\n\n return PurchaseListResource::collection(\n $purchase->paginate()\n );\n }", "title": "" }, { "docid": "8e254c43ef9f0de674248b42612e7442", "score": "0.51344997", "text": "public static function index($data) {\n\t\t$fields = ['vendorID|string'];\n\t\tself::sanitizeParametersShort($data, $fields);\n\t\t$validate = new Validators\\Map();\n\n\t\tif ($validate->vendorid($data->vendorID) === false) {\n\t\t\tself::pw('page')->js .= self::pw('config')->twig->render('purchase-orders/list.js.twig');\n\t\t\treturn self::vendorForm($data);\n\t\t}\n\t\treturn self::list($data);\n\t}", "title": "" }, { "docid": "a9071c0cf5abbb12699f54eb2605b45c", "score": "0.5125732", "text": "public function createLinkByPurchaseDetails(){\n\t\t\n\t\tglobal $Gascomb;\n\t\t// Verificamos la existencia dentro de la tabla compras\n\t\t$Compra = new InventoryControlPurchase();\n\t\t$Compra->id_purchase = '11';\n\t\t\n\t\t$existencia_proveedor \t= $Compra->getExistencia();\n\t\t$cantidad\t\t= $this->getCantidad();\n\t\techo $existencia_proveedor;\n\t\techo $cantidad;\n\t\t\n\t\t// Caso cuando la existencia es mayor a la cantidad solicitada\n\t\tif( $existencia_proveedor >= $cantidad ){\n\t\t\t\n\t\t\t//Si esta el articulo dentro del inventario y hay en existencia\n\t\t\t$data = array(\n\t\t\t\t\t\"folio_id\" => $this->obj_stock->folio,\n\t\t\t\t\t\"stock_id\" => $this->obj_stock->getStockIdByDetails( $this->stock_details_id ),\n\t\t\t\t\t\"stock_details_id\" => $this->stock_details_id,\n\t\t\t\t\t\"id_inventory_control\" => $this->id_inventory_control,\n\t\t\t\t\t\"id_inventory_purchase\" => $Compra->id_purchase, \n\t\t\t\t\t\"cantidad\" => $cantidad,\n\t\t\t\t\t\"user_id\" => $Gascomb->session_user_id(),\n\t\t\t\t\t\"fecha_ingreso\" => time(),\n\t\t\t\t\t\"fecha_modificacion\" => time()\n\t\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t$db = new manejaDB(BD_STOCK_USER,BD_STOCK_PASSWORD,BD_STOCK_DATABASE,BD_STOCK_SERVER);\n\t\t\t$db->makeQueryInsert(Table_Inventory_Link,$data);\n\t\t\t$db->desconectar();\n\t\t\t\n\t\t\t// Actualizamos el status de la tabla stock\n\t\t\t$this->obj_stock->updateStockStatusLink($this->stock_details_id);\n\t\t\t\n\t\t\techo $this->jsonMessage['link'];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// Notificamos que no tenemos producto en existencia\n\t\t\techo $this->jsonMessage['existencia']; \n\t\t}// Notificamos que no tenemos producto en existencia\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\tglobal $Gascomb;\n\n\t\t$existencia = $this->getExistenciaID($this->id_inventory_control);\n\t\t$cantidad\t= $this->obj_stock->getQuantityFromDetaisID($this->stock_details_id);\n\t\t$existencia = (isset( $existencia[0]['existencia'] )) ? $existencia[0]['existencia'] : 0;\n\t\t$cantidad\t= (isset( $cantidad[0]['quantity'] )) ? $cantidad[0]['quantity'] : 0;\n\t\t\n\t\tif( $existencia >= $cantidad ){\n\t\t\t\n\t\t\t//Si esta el articulo dentro del inventario y hay en existencia\n\t\t\t$data = array(\n\t\t\t\t\t\"folio_id\" => $this->obj_stock->folio,\n\t\t\t\t\t\"stock_id\" => $this->obj_stock->getStockIdByDetails( $this->stock_details_id ),\n\t\t\t\t\t\"stock_details_id\" => $this->stock_details_id,\n\t\t\t\t\t\"id_inventory_control\" => $this->id_inventory_control,\n\t\t\t\t\t\"cantidad\" => $cantidad,\n\t\t\t\t\t\"user_id\" => $Gascomb->session_user_id(),\n\t\t\t\t\t\"fecha_ingreso\" => time(),\n\t\t\t\t\t\"fecha_modificacion\" => time()\n\t\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t$db = new manejaDB(BD_STOCK_USER,BD_STOCK_PASSWORD,BD_STOCK_DATABASE,BD_STOCK_SERVER);\n\t\t\t$db->makeQueryInsert(Table_Inventory_Link,$data);\n\t\t\t$db->desconectar();\n\t\t\t\n\t\t\t// Actualizamos el status de la tabla stock\n\t\t\t$this->obj_stock->updateStockStatusLink($this->stock_details_id);\n\t\t\t\n\t\t\techo $this->jsonMessage['link'];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// Notificamos que no tenemos producto en existencia\n\t\t\techo $this->jsonMessage['existencia']; \n\t\t}\n\t\t\n\t\t*/\n\t\t\n\t}", "title": "" }, { "docid": "39611a32cbbb41da15e0c2358859b1be", "score": "0.5120929", "text": "public function purchases()\n {\n return $this->belongsToMany(Purchase::class, 'product_purchases', 'product_id', 'purchase_id');\n }", "title": "" }, { "docid": "39bd2619e757ad1439b5cf61a62cc786", "score": "0.5101347", "text": "public function actionLoad()\n {\n //unset(Yii::$app->session['model_items']);\n $model = new Purchase();\n $model->detail=\"Load old product\";\n $model->date=date('Y-m-d');\n $model->currency_id=1;\n $model->status=\"confirm\";\n if ($model->save()) {\n $product=Products::find()->all();\n foreach ($product as $item) {\n $model_item=new PurchaseItem;\n $model_item->date=$model->date;\n $model_item->pricebuy=$item->pricebuy;\n $model_item->qautity=$item->qautity;\n $model_item->products_id=$item->id;\n $model_item->purchase_id=$model->id;\n $model_item->save();\n }\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }", "title": "" }, { "docid": "4eed56b216bdf6c15bee54c20cc41435", "score": "0.509062", "text": "public function show(SalePurchaseReturn $salePurchaseReturn)\n {\n //\n }", "title": "" }, { "docid": "9433afe0de937519398adcefeb996bb7", "score": "0.5088807", "text": "public function getViewPurchaseProduct()\n\t{\n\t\t$manufacturer_id=$this->input->post('manufacturer_id');\n\t\t$purchase_id=$this->input->post('purchase_id');\n\t\t\n\t\t$json=$this->purchasecart->getPurchaseProductsData($manufacturer_id,$purchase_id);\n\t\t//return $json;\n\t\techo json_encode($json);\n\t}", "title": "" }, { "docid": "40a29bcf60b7ec0d0f992c93e8b863c9", "score": "0.5088648", "text": "public function purchases()\n {\n return $this->hasMany(Purchase::class);\n }", "title": "" }, { "docid": "40a29bcf60b7ec0d0f992c93e8b863c9", "score": "0.5088648", "text": "public function purchases()\n {\n return $this->hasMany(Purchase::class);\n }", "title": "" }, { "docid": "ecdcfe0818235bf4213e6220e1e12b92", "score": "0.50883394", "text": "public function edit(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "ecdcfe0818235bf4213e6220e1e12b92", "score": "0.50883394", "text": "public function edit(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "ecdcfe0818235bf4213e6220e1e12b92", "score": "0.50883394", "text": "public function edit(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "ecdcfe0818235bf4213e6220e1e12b92", "score": "0.50883394", "text": "public function edit(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "ecdcfe0818235bf4213e6220e1e12b92", "score": "0.50883394", "text": "public function edit(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "b9189e903a64f0b7250521616262aac0", "score": "0.5082004", "text": "public function retrieve_purchase_editdata($r_id,$purchase_id) {\n $this->db->select('a.*,\n\t\t\t\t\t\tb.per2 as per, b.inner-per as per2, b.inner-per2 as per3, b.purchase_detail_id,b.unit,\n\t\t\t\t\t\tc.product_id,\n\t\t\t\t\t\tc.product_name,\n\t\t\t\t\t\tc.product_model,\n\t\t\t\t\t\tc.cartoon_quantity,\n\t\t\t\t\t\td.supplier_id,\n\t\t\t\t\t\td.supplier_name,\n e.customer_name,\n\t\t\t\t\t\tc.unit_values,\n\t\t\t\t\t\tc.price,\n\t\t\t\t\t\tb.quantity,\n\t\t\t\t\t\tb.rate,\n\t\t\t\t\t\tb.total_amount,\n\t\t\t\t\t\tb.requested_quantity,\n\t\t\t\t\t\tb.description'\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n );\n $this->db->from('product_purchase a');\n $this->db->join('product_purchase_details b', 'b.purchase_id =a.purchase_id');\n $this->db->join('product_information c', 'c.product_id =b.product_id');\n $this->db->join('supplier_information d', 'd.supplier_id = a.supplier_id');\n $this->db->join('customer_information e', 'e.customer_id = a.customer_id');\n $this->db->join('purchase_receipt_order pro', 'pro.purchase_id = a.purchase_id');\n $this->db->where('a.r_id',$r_id);\n $this->db->where('b.r_id',$r_id);\n $this->db->where('c.r_id',$r_id);\n $this->db->where('d.r_id',$r_id);\n $this->db->where('e.r_id',$r_id);\n $this->db->where('pro.r_id',$r_id);\n $this->db->where('a.purchase_id', $purchase_id);\n\t\t$this->db->group_by('b.purchase_detail_id');\n $this->db->order_by('b.id', 'asc');\n /* $this->db->order_by('a.purchase_details', 'asc'); */ // comment on 09-05-2019 tapan\n $query = $this->db->get();\n \n\t\t\t// echo $this->db->last_query();die;\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return false;\n }", "title": "" }, { "docid": "e30ac0b9c6611ad36d7b3d9556407195", "score": "0.50804794", "text": "function orders_list();", "title": "" }, { "docid": "875dfac2a69d0b67be713f3ba7d46baa", "score": "0.50670767", "text": "public function get_purchase_orders(){\n return $this->db->query(\"SELECT * FROM purchase_order WHERE status='processed' \");\n }", "title": "" }, { "docid": "accf7fc1277b239e610fd0722cb584b0", "score": "0.5062981", "text": "public function run()\n {\n purchase::create([\n \t'brand' => 'HotStone', \n \t'egift_code' => '12345678', \n \t'program_name' => '1 1/2 Cup Black Ice Cream', \n \t'master_program' => 'XL Birthday Rewards', \n \t'item_name' => '1 1/2 Cup Black Ice Cream', \n \t'value' => '75000', \n \t'expired_date' => '15/11/2016 23:59:59', \n \t'url' => 'http://bit.ly/Wn2Xdz'\n ]);\n\n purchase::create([\n \t'brand' => 'HotStone', \n \t'egift_code' => '93847162', \n \t'program_name' => '1 1/2 Cup Black Ice Cream', \n \t'master_program' => 'XL Birthday Rewards', \n \t'item_name' => '1 1/2 Cup Black Ice Cream', \n \t'value' => '75000', \n \t'expired_date' => '15/11/2016 23:59:59', \n \t'url' => 'http://bit.ly/Gn1Yds'\n ]);\n\n purchase::create([\n \t'brand' => 'Sweet Sallie', \n \t'egift_code' => '88374617', \n \t'program_name' => '1 1/2 Cup Black Ice Cream', \n \t'master_program' => 'XL Member Rewards', \n \t'item_name' => '1 1/2 Cup Black Ice Cream', \n \t'value' => '75000', \n \t'expired_date' => '30/11/2016 23:59:59', \n \t'url' => 'http://bit.ly/Ax7Pwb'\n ]);\n\n }", "title": "" }, { "docid": "6db5875eb3c6d4aa2f2d7abcf83819c0", "score": "0.50605655", "text": "public function create($purchase_data)\n {\n return Purchase::create($purchase_data); \n }", "title": "" }, { "docid": "c9e9739512e33a2e0c38deac39e03e16", "score": "0.5058443", "text": "public function BillingHistory(){\n\t\t$billingHistory = new ArrayList();\n\t\t$orders = Order::get()->filter(array('MemberID' => Member::currentUserID(),'OrderStatus' => 'c'))->sort('Created');\n\t\tforeach($orders as $order){\n\t\t\t$productId = $order->ProductID;\n\t\t\tif(($productId == 1 || $productId == 2 || $productId == 3) && $order->IsTrial == 1 ){\n\t\t\t\t$productDesc = 'First Month Trial';\n\t\t\t}else{\n\t\t\t\t$product = Product::get()->byID($productId);\n\t\t\t\t$productDesc = $product->Name;\n\t\t\t}\n\t\t\t$creditCard = $order->CreditCard();\n\t\t\t$ccNumber = 'XXXX-XXXX-XXXX-'.substr($creditCard->CreditCardNumber, -4);\n\t\t\t$orderDetails = array(\n\t\t\t\t\t'Date'=>$order->Created,\n\t\t\t\t\t'Description'=>$productDesc,\n\t\t\t\t\t'CCType'=>strtoupper($creditCard->CreditCardType),\n\t\t\t\t\t'CCNumber'=>$ccNumber,\n\t\t\t\t\t'Amount'=>$order->Amount\n\t\t\t\t);\n\t\t\t$billingHistory->push(new ArrayData($orderDetails));\n\t\t}\n\t\t$memBillHistory = MemberBillingHistory::get()->filter('MemberID',Member::currentUserID())->sort('Created');\n\t\tforeach($memBillHistory as $history){\n\t\t\t$creditCard = $history->CreditCard();\n\t\t\t$ccNumber = 'XXXX-XXXX-XXXX-'.substr($creditCard->CreditCardNumber, -4);\n\t\t\t$details = array(\n\t\t\t\t\t'Date'=>$history->Created,\n\t\t\t\t\t'Description'=> $history->Product()->Name,\n\t\t\t\t\t'CCType'=>strtoupper($creditCard->CreditCardType),\n\t\t\t\t\t'CCNumber'=>$ccNumber,\n\t\t\t\t\t'Amount'=>$history->Product()->RecurringPrice\n\t\t\t);\n\t\t\t$billingHistory->push(new ArrayData($details));\n\t\t}\n\t\t$sortedBillingHistory = $billingHistory->sort('Date');\n\t\treturn $sortedBillingHistory;\n\t}", "title": "" }, { "docid": "b4d376c4bf851a420ae2219ae299df35", "score": "0.5053873", "text": "public function purchase_details_data($purchase_id)\n\t{\t\n\t\t$CI =& get_instance();\n\t\t// $CI->auth->check_admin_auth();\n\t\t$CI->load->library('lpurchase');\n\t\tif (!$this->session->userdata('username')){\n $this->output->set_header(\"Location: \" . base_url() . 'Admin_dashboard/login', TRUE, 302);\n // $this->auth->check_admin_auth();\n }\n\t\telse{\n\t\t$content = $CI->lpurchase->purchase_details_data($purchase_id);\t\n\t\t\n\t\t$this->template->full_admin_html_view($content);\n\t}}", "title": "" }, { "docid": "63f7a075e414287544986a15ae2ce563", "score": "0.505032", "text": "public function show($id)\n {\n return $this->purchase->byInvoice($id);\n }", "title": "" }, { "docid": "2a9f07e2b96a557549700bede27bb858", "score": "0.50457877", "text": "public function getPurchaseProduct()\n {\n $purchaseProduct = new PurchaseProduct();\n $purchaseProduct->setProduct($this->getObject());\n \n $itemTotal = $this->getPrice() * $this->getQuantity();\n $purchaseProduct->fromArray(array(\n 'product_id' => $this->getId(),\n 'quantity' => $this->getQuantity(),\n 'base_price' => $this->getPrice(),\n 'options_price' => 0,\n 'handling_subtotal' => 0,\n 'item_subtotal' => $itemTotal,\n 'item_total' => $itemTotal,\n 'trial_price' => $this->getTrialPrice(),\n 'trial_period' => $this->getTrialPeriod(),\n ));\n \n if ($term = $this->getParameter('term')) {\n $purchaseProduct->term = $term;\n }\n\n return $purchaseProduct;\n }", "title": "" }, { "docid": "3b47daaa1ab24f4dca78129f563aa0c8", "score": "0.50429356", "text": "public function manufacturer_return_data($purchase_id)\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->model('Returnse');\n\t\t$CI->load->model('Web_settings');\n\t\t$purchase_detail = $CI->Returnse->manufacturer_return($purchase_id);\n\n\t\t$i=0;\n\t\tif(!empty($purchase_detail)){\t\t\n\t\t\tforeach($purchase_detail as $k=>$v){\n\t\t\t\t$i++;\n\t\t\t \t$purchase_detail[$k]['sl']=$i;\n\t\t\t}\n\t\t}\n\n\t\t$currency_details = $CI->Web_settings->retrieve_setting_editdata();\n\t\t$data=array(\n\t\t\t'title'\t\t\t\t=>\tdisplay('manufacturer_return'),\n\t\t\t'purchase_id'\t\t=>\t$purchase_detail[0]['purchase_id'],\n\t\t\t'manufacturer_id'\t\t=>\t$purchase_detail[0]['manufacturer_id'],\n\t\t\t'manufacturer_name'\t\t=>\t$purchase_detail[0]['manufacturer_name'],\n\t\t\t'date'\t\t\t\t=>\t$purchase_detail[0]['purchase_date'],\n\t\t\t'total_amount'\t\t=>\t$purchase_detail[0]['total_amount'],\n\t\t\t'total_discount'\t=>\t$purchase_detail[0]['total_discount'], \n\t\t\t'purchase_all_data'\t=>\t$purchase_detail,\t\n\t\t\t'discount_type' \t=>\t$currency_details[0]['discount_type'],\n\t\t\t);\n\t\t$chapterList = $CI->parser->parse('return/manufacturer_return_form',$data,true);\n\t\treturn $chapterList;\n\t}", "title": "" }, { "docid": "390a2a83a9716106b60516bcf6bacfb1", "score": "0.5035944", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $purchases = $em->getRepository('App:Purchase')->findAll();\n\n return $this->render('purchase/index.html.twig', array(\n 'purchases' => $purchases,\n ));\n }", "title": "" }, { "docid": "21c23548528e1471687ca6634323264e", "score": "0.5028534", "text": "public function getPurchase(){\n return view('frontoffice/profiles/purchase');\n }", "title": "" }, { "docid": "5d8e0198c3cc1a86b95963418cfa19dd", "score": "0.5028194", "text": "public function get_purchases($acc_id)\n {\n\n $query = $this->db->query(\"\n select\n purchase.pur_id,\n purchase.pur_date,\n account.acc_id,\n account.acc_email,\n shipment.shi_tracking,\n carrier.car_name,\n case shipment.shi_status\n when 0 then 'en preparación'\n when 1 then 'enviado'\n end as pur_status,\n case shipment.shi_status\n when 0 then 'label-warning'\n when 1 then 'label-success'\n end as pur_label_class,\n sum(product.pro_price) + purchase.pur_shipping_price as pur_total\n from product\n inner join purchase\n inner join account\n inner join shipment\n inner join carrier\n where product.pur_id = purchase.pur_id\n and purchase.acc_id = account.acc_id\n and purchase.pur_id = shipment.pur_id\n and carrier.car_id = shipment.car_id\n and product.pur_id in (\n select pur_id\n from purchase\n )\n and purchase.pur_status = 1\n and account.acc_id = $acc_id\n group by purchase.pur_id\n order by purchase.pur_date desc;\n \");\n\n if ($query->num_rows() > 0){\n return $query->result();\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "6f581271638b60a14b086ad3ece8b9dd", "score": "0.5023026", "text": "public function index()\n {\n $purchases = $this->purchase_object->get_purchases();\n\n return view('admin.purchase.list', compact('purchases'));\n }", "title": "" }, { "docid": "0066a3b22b91339453ff15c985393346", "score": "0.5019794", "text": "public function viewReceiptList()\n {\n $sql = \"select * from payment where Cus_ID=:Cus_ID order by P_date DESC\";\n $args = [':Cus_ID' => $this->Cus_ID];\n return DB::run($sql, $args);\n }", "title": "" }, { "docid": "1b56fa761fced44b52e463c27d8e4dcc", "score": "0.5005663", "text": "public function newPurchase () \n {\n\n $all_buyers = DB::table('buyers')->get();\n\n $all_accounts = DB::table('accounts')->get();\n\n $new_purchase = view('admin.pages.new_purchase')\n ->with('all_buyers', $all_buyers)\n ->with('all_accounts', $all_accounts);\n\n return view('admin_master')->with('', $new_purchase);\n }", "title": "" }, { "docid": "4101993e83cb8de7fb0ad8a9ddc4c27f", "score": "0.5004842", "text": "public function copySale();", "title": "" }, { "docid": "d978dd3074bff50605beca3c791e557f", "score": "0.5004279", "text": "function list_pr_items($qcs_id)\n{\n\t\n\t$this->load->database(); \n $this->load->model('purchase/Informal_po_model'); \n\t\n\t\t $data['item']=$this->Informal_po_model->list_pr_items($qcs_id); \n\t\t \t\t\n\t\treturn $data['item'];\n\t\t \n}", "title": "" }, { "docid": "841b3ee4f146d2a9bee49dd18dd2bfc4", "score": "0.5003113", "text": "public function showPurchaseRecord()\n\t{\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "a1b522b53b19a290c6784cd9a10d7d90", "score": "0.49995512", "text": "function getCustomersPurchases()\n {\n $query = \"SELECT DISTINCT customers.id AS customer_id, customers.`name` AS customer_name, GROUP_CONCAT(CAST(products.id AS CHAR)) AS product_id, GROUP_CONCAT(products.`name`) AS product_name \";\n $query .= \"FROM `customers` \";\n $query .= \"INNER JOIN orders ON customers.id = orders.customer_id \";\n $query .= \"INNER JOIN products ON products.id = orders.product_id \";\n $query .= \"GROUP BY customers.id \";\n $query .= \"ORDER BY customers.id ASC \";\n \n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $data;\n }", "title": "" }, { "docid": "beb03c79a8dc2d08ee5476f975e27a5e", "score": "0.49982658", "text": "function getCartData(){\n\t\t$data=$this->_data;\n\t\t$conts=$data[contents];\n\t\tforeach($conts as $inv_id=>$row){\n\t\t\t$row=trim_arr($row,1);\n\t\t\tif(intval($row[min_purchase_count])>1){\n\t\t\t\t$row[title].=\"<br><i>(Min. purchase is ${row[min_purchase_count]} items)</i>\";\n\t\t\t}\n\t\t\tif(count($row[params])){\n\t\t\t\t$row[title].=\"<br>\";\n\t\t\t\tforeach($row[params] as $k=>$v){\n\t\t\t\t\t$row[title].=\" $k: <b>$v</b>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($row[params]);\n\t\t\t$conts[$inv_id]=$row;\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "540518947b9ee8ada64ec3257256fc01", "score": "0.4993554", "text": "public function index_purchase()\n {\n //\n \t$status = 0;\n \t$startDate = \"01\".\"-\".date('m-Y');\n $endDate = date('d-m-Y');\n $mode = \"all\";\n\t\tif (isset($_GET[\"startDate\"]) || isset($_GET[\"endDate\"]) || isset($_GET[\"status\"]) || isset($_GET[\"mode\"])){\n\t\t\tif ((isset($_GET['startDate'])) && ($_GET['startDate'] != \"\")){\n\t\t\t\t$startDate = $_GET[\"startDate\"];\n\t\t\t}\n\t\t\tif ((isset($_GET['endDate'])) && ($_GET['endDate'] != \"\")){\n\t\t\t\t$endDate = $_GET[\"endDate\"];\n\t\t\t}\n\t\t\tif ((isset($_GET['status'])) && ($_GET['status'] != \"\")){\n\t\t\t\t$status = $_GET[\"status\"];\n }\n\t\t\tif (!isset($_GET[\"mode\"])){\n\t\t\t\t$mode = \"limited\";\n\t\t\t}\n }\n\t\tif (isset($_GET['status']) && $_GET['status']!=\"\"){\n\t\t\t$status = $_GET['status'];\n\t\t}else{\n\t\t\t$status = 0;\n }\n \n\t\t$startDateQuery = date(\"Y-m-d\", strtotime($startDate));\n $endDateQuery = date(\"Y-m-d\", strtotime($endDate));\n if ($status == '0'){\n if ($mode == \"all\"){\n $data = PurchaseH::select('purchase_h.*','supplier.nama')->leftJoin('supplier', 'purchase_h.id_sup', '=', 'supplier.id')->where('purchase_h.active', '!=', 0);\n } else \n if ($mode == \"limited\"){\n $data = PurchaseH::select('purchase_h.*','supplier.nama')->leftJoin('supplier', 'purchase_h.id_sup', '=', 'supplier.id')->where('purchase_h.active', '!=', 0)->whereBetween('tanggal', [$startDateQuery, $endDateQuery]);\n }\n } else \n {\n if ($mode == \"all\"){\n $data = PurchaseH::select('purchase_h.*','supplier.nama')->leftJoin('supplier', 'purchase_h.id_sup', '=', 'supplier.id')->where('purchase_h.active', '!=', 0)->where('purchase_h.status', '=', $status);\n } else \n if ($mode == \"limited\"){\n $data = PurchaseH::select('purchase_h.*','supplier.nama')->leftJoin('supplier', 'purchase_h.id_sup', '=', 'supplier.id')->where('purchase_h.active', '!=', 0)->where('purchase_h.status', '=', $status)->whereBetween('tanggal', [$startDateQuery, $endDateQuery]);\n }\n }\n $data = $data->get();\n\n\t\tview()->share('startDate',$startDate);\n\t\tview()->share('endDate',$endDate);\n\t\tview()->share('status',$status);\n view()->share('mode',$mode);\n\t\treturn view ('backend.laporan.purchase',['data'=>$data]);\n }", "title": "" }, { "docid": "cf53a4aaba95552f44901b76c8bcae61", "score": "0.49840263", "text": "public function index()\n {\n $purchases = Purchase::where('user_id', auth()->user()->id)->get();\n return view('org.purchase.index', compact('purchases'));\n\n }", "title": "" }, { "docid": "3c6cea3c9620fbd3d14f513b34efe233", "score": "0.4978467", "text": "public function index()\n {\n /* purchase back receipt presentation */\n $backReceiptList = PurchaseBackReceipt::all();\n $backReceiptPurchaseList = [];\n $backReceiptCommodityList = [];\n foreach ($backReceiptList as $backReceipt) {\n /* add purchase receipt into list */\n $purchaseReceiptSet = PurchaseReceipt::where('id', $backReceipt['purchasereceipt_id'])\n ->get();\n $purchaseReceipt = $purchaseReceiptSet[0];\n array_push($backReceiptPurchaseList, $purchaseReceipt);\n /* add commodity into list */\n $commoditySet = Commodity::where('id', $backReceipt['commodity_id'])\n ->get();\n $commodity = $commoditySet[0];\n array_push($backReceiptCommodityList, $commodity);\n }\n\n /* purchase receipt presentation */\n $receiptListDB = PurchaseReceipt::all();\n $receiptList = [];\n foreach ($receiptListDB as $receipt) {\n $customerSet = Customer::where('id', $receipt['supplier_id'])\n ->get();\n $customerName = $customerSet[0]['name'];\n $receipt['customer_name'] = $customerName;\n array_push($receiptList, $receipt);\n }\n\n return view('inventory.purchase', compact('receiptList', 'backReceiptList',\n 'backReceiptPurchaseList', 'backReceiptCommodityList'));\n }", "title": "" }, { "docid": "7ca4b2beb3d1a91d9ff13d6d88853d4a", "score": "0.49760783", "text": "public function get_today_purchases()\n {\n $today_date = date('d');\n return $this->db->select(\"p.*, s.name supplier_name\")\n ->where('Day(purchase_date)', $today_date)\n ->join('supplier_information s', \"s.id = p.supplier_id\", 'left')\n ->get(\"purchases p\")\n ->result();\n }", "title": "" }, { "docid": "f17e370df864fddc0875c3531264e657", "score": "0.4970619", "text": "public function procurements(){\n return $this->hasOne( Purchase::class );\n }", "title": "" }, { "docid": "74edd2dc354f7c552a5fc08bbc1417bf", "score": "0.4966766", "text": "private function inventoryPurchases($item)\n {\n $query = InventoryPurchase::where('financial_account_code', $this->txn['credit_financial_account_code'])\n ->where('item_id', $item['type_id'])\n ->where('currency', $this->txn['base_currency'])\n ->where('date', '<=', $this->txn['date'])\n ->where('balance', '>', 0)\n ->orderBy('date', 'ASC')\n ->get();\n\n\n if ($query->isNotEmpty()) {\n\n $user = auth()->user();\n\n $purchases = $query->toArray();\n //print_r($purchases); exit;\n\n #Evaluate Cost based on Inventory Cost method\n if (strtoupper($user->tenant->inventory_valuation_method) == 'FIFO') {\n foreach($purchases as $key => $purchase) {\n $purchases[$key]['cost'] = $purchase['value_per_unit'];\n }\n }\n\n elseif (strtoupper($user->tenant->inventory_valuation_method) == 'LIFO') {\n //Reverse the array since purchases are read from db in FIFO order i.e. date ASC\n $purchases = array_reverse($purchases);\n\n foreach($purchases as $key => $purchase) {\n $purchases[$key]['cost'] = $purchase['value_per_unit'];\n }\n }\n\n elseif (strtoupper($user->tenant->inventory_valuation_method) == 'AVCO') {\n\n $total_purchased_units = 0;\n $total_purchased_value = 0;\n\n foreach($purchases as $Key => $purchase)\n {\n $total_purchased_units += $purchase['units'];\n $total_purchased_value += $purchase['units'] * $purchase['balance'];\n }\n\n $average_cost = $total_purchased_value / $total_purchased_units;\n\n foreach($purchases as $key => $purchase)\n {\n $purchases[$key]['cost'] = $average_cost;\n }\n }\n\n #Actual Unit Cost Method\n elseif (strtoupper($user->tenant->inventory_valuation_method) == 'AUCO') {\n\n foreach($purchases as $key => $purchase) {\n $purchases[$key]['cost'] = $item['cost'] / $item['units'];\n }\n }\n\n #End of inventory valuation calculation\n\n return $purchases;\n\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c2e0690ebe19f2bbe63aa4c8c264dbf8", "score": "0.49580124", "text": "public function getPurchaseID($id){\n\t\t$db = $this->getAdapter();\n\t\t$sql = \"SELECT CONCAT(p.item_name,'(',p.item_code,' )') AS item_name , p.qty_perunit,od.order_id, od.pro_id, od.qty_order,\n\t\t\t\t\n\t\tod.price, od.total_befor, od.disc_type,\tod.disc_value, od.sub_total, od.remark \n\t\t\t\t\n\t\tFROM tb_purchase_order_item AS od\n\t\t\t\t\n\t\tINNER JOIN tb_product AS p ON p.pro_id=od.pro_id WHERE od.order_id=\".$id;\n\t\t$row = $db->fetchAll($sql);\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "6b23b5bb9282d71da92b4df0e36bdf10", "score": "0.49420658", "text": "public function createFromPurchase(Purchase $purchase)\n {\n $current = new \\DateTime();\n $purchase->account()->setCreated($current)\n ->setModified($current)\n ->setAmount($purchase->totalCost())\n ->setLicence($purchase->article()->reduceRemaining(1));\n $this->save($purchase->account());\n }", "title": "" }, { "docid": "6cb8b1461507f684b71747262e0c5b85", "score": "0.4934628", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $purchaseItems = $em->getRepository('AppBundle:PurchaseItem')->findAll();\n\n return $this->render('purchaseitem/index.html.twig', array(\n 'purchaseItems' => $purchaseItems,\n ));\n }", "title": "" }, { "docid": "2dda9e78f8ba9cd14dd142e2ff88125c", "score": "0.49342185", "text": "public function getProductDataView(Purchase $purchase): array\n {\n $array = [];\n\n /** @var PurchaseProduct $purchaseProduct */\n foreach ($purchase->getProducts() as $purchaseProduct) {\n\n $row = [];\n $row['name'] = $purchaseProduct->getProduct()->getName();\n $row['price'] = $purchaseProduct->getPrice();\n $row['quantity'] = $purchaseProduct->getQuantity();\n\n if ($purchaseProduct->getProduct()->getManufacturer() instanceof Manufacturer) {\n $row['manufacturer'] = $purchaseProduct->getProduct()->getManufacturer()->getName();\n\n $total = $purchaseProduct->getPrice() * $purchaseProduct->getQuantity();\n $paymentOwner = $total * Purchase::OWNER_TAX;\n $paymentManufacturer = $total - $paymentOwner;\n\n $row['paymentOwner'] = $paymentOwner;\n $row['paymentManufacturer'] = $paymentManufacturer;\n } else {\n $row['manufacturer'] = '';\n $row['paymentOwner'] = $purchaseProduct->getPrice() * $purchaseProduct->getQuantity();\n $row['paymentManufacturer'] = '';\n }\n\n $array[] = $row;\n }\n\n return $array;\n }", "title": "" }, { "docid": "9a147e26c78aaaebdc0890b13134ea5f", "score": "0.49294972", "text": "public function index()\n {\n $user_id = auth('api')->id();\n $purchase = Purchase::with('user','user_address','billing_address','purchase_item')->where('user_id',$user_id)->get();\n\n return Response()->json($purchase);\n }", "title": "" }, { "docid": "ea39d030b6fb6ca0acccc6823bac19b2", "score": "0.4928261", "text": "public function supplier_return($purchase_id) {\n $this->db->select('c.*,a.*,b.*,a.product_id,d.product_name,d.product_model,e.supplier_id');\n $this->db->from('product_purchase c');\n $this->db->join('product_purchase_details a', 'a.purchase_id = c.purchase_id');\n $this->db->join('product_information d', 'd.product_id = a.product_id');\n $this->db->join('supplier_product e', 'e.product_id = d.product_id');\n $this->db->join('supplier_information b', 'b.supplier_id = e.supplier_id');\n\n $this->db->where('c.purchase_id', $purchase_id);\n $this->db->group_by('d.product_id', 'desc');\n $query = $this->db->get();\n\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return false;\n }", "title": "" }, { "docid": "6afb67ce0e0670f74f91f3a898e1bf2b", "score": "0.4919692", "text": "public function getPurchasedItems(Request $request, Response $response) :Response\n {\n $this->template = 'items_purchased.html.twig';\n $this->title = 'electronic items';\n return parent::getPurchasedItems($request, $response);\n }", "title": "" }, { "docid": "45df5523c0fdc8c2228189a992dfe381", "score": "0.49177894", "text": "public function receipt_by_search($supplier_id)\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->model('Receipts');\n\t\t$CI->load->library('occational');\n\t\t$receipts_list = $CI->Receipts->receipts_by_search($supplier_id);\n\t\t$j=0;\n\t\tif(!empty($receipts_list)){\n\t\t\tforeach($receipts_list as $k=>$v){\n\t\t\t\t$receipts_list[$k]['final_date'] = $CI->occational->dateConvert($receipts_list[$j]['receipt_date']);\n\t\t\t $j++;\n\t\t\t}\n\t\t\t$i=0;\n\t\t\tforeach($receipts_list as $k=>$v){$i++;\n\t\t\t $receipts_list[$k]['sl']=$i;\n\t\t\t}\n\t\t}\n\t\t$data = array(\n\t\t\t\t'receipts_list' => $receipts_list\n\t\t\t);\n\t\t$purchaseList = $CI->parser->parse('receipt/receipt',$data,true);\n\t\treturn $purchaseList;\n\t}", "title": "" }, { "docid": "60eb4455c0e13a5d367587b399e50f60", "score": "0.49165857", "text": "abstract public function getPurchaseObject(\\XF\\Entity\\PaymentProfile $paymentProfile, $purchasable, \\XF\\Entity\\User $purchaser);", "title": "" }, { "docid": "c854fc053486468aa75bbf25f1ea7ffa", "score": "0.49146068", "text": "public function testGetAllValidProductsPurchases() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"productPurchase\");\n\n\t\t// create a new Product Purchase and insert to into mySQL\n\t\t$productPurchase = new ProductPurchase($this->item->getProductId(), $this->shop->getPurchaseId(), $this->coinsAndBills1);\n\t\t$productPurchase->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = ProductPurchase::getAllProductPurchases($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"productPurchase\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Rootstable\\\\ProductPurchase\", $results);\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoProductPurchase = $results[0];\n\t\t$this->assertEquals($pdoProductPurchase->getProductPurchaseProductId(), $this->item->getProductId());\n\t\t$this->assertEquals($pdoProductPurchase->getProductPurchasePurchaseId(), $this->shop->getPurchaseId());\n\t\t$this->assertEquals($pdoProductPurchase->getProductPurchaseAmount(), $this->coinsAndBills1);\n\t}", "title": "" }, { "docid": "ee59a9f6f18360db315ddb5ccfd8f394", "score": "0.49068663", "text": "public function nouveau($data) {\n return $this->_insert('t_purchases', $data);\n }", "title": "" }, { "docid": "6fdaf2abd4d686e0e38f2680f19a95f4", "score": "0.48930478", "text": "public function index(request $request)\n {\n $this->authorizeForUser($request->user('api'), 'view', Purchase::class);\n $role = Auth::user()->roles()->first();\n $view_records = Role::findOrFail($role->id)->inRole('record_view');\n // How many items do you want to display.\n $perPage = $request->limit;\n $pageStart = \\Request::get('page', 1);\n // Start displaying items from this number;\n $offSet = ($pageStart * $perPage) - $perPage;\n $order = $request->SortField;\n $dir = $request->SortType;\n $helpers = new helpers();\n // Filter fields With Params to retrieve\n $param = array(\n 0 => 'like',\n 1 => 'like',\n 2 => '=',\n 3 => 'like',\n 4 => '=',\n 5 => '=',\n );\n $columns = array(\n 0 => 'Ref',\n 1 => 'statut',\n 2 => 'provider_id',\n 3 => 'payment_statut',\n 4 => 'warehouse_id',\n 5 => 'date',\n );\n $data = array();\n $total = 0;\n\n // Check If User Has Permission View All Records\n $Purchases = Purchase::with('facture', 'provider', 'warehouse')\n ->where('deleted_at', '=', null)\n ->where(function ($query) use ($view_records) {\n if (!$view_records) {\n return $query->where('user_id', '=', Auth::user()->id);\n }\n });\n\n //Multiple Filter\n $Filtred = $helpers->filter($Purchases, $columns, $param, $request)\n // Search With Multiple Param\n ->where(function ($query) use ($request) {\n return $query->when($request->filled('search'), function ($query) use ($request) {\n return $query->where('Ref', 'LIKE', \"%{$request->search}%\")\n ->orWhere('statut', 'LIKE', \"%{$request->search}%\")\n ->orWhere('GrandTotal', $request->search)\n ->orWhere('payment_statut', 'like', \"$request->search\")\n ->orWhere(function ($query) use ($request) {\n return $query->whereHas('provider', function ($q) use ($request) {\n $q->where('name', 'LIKE', \"%{$request->search}%\");\n });\n })\n ->orWhere(function ($query) use ($request) {\n return $query->whereHas('warehouse', function ($q) use ($request) {\n $q->where('name', 'LIKE', \"%{$request->search}%\");\n });\n });\n });\n });\n\n $totalRows = $Filtred->count();\n $Purchases = $Filtred->offset($offSet)\n ->limit($perPage)\n ->orderBy($order, $dir)\n ->get();\n\n foreach ($Purchases as $Purchase) {\n\n $item['id'] = $Purchase->id;\n $item['date'] = $Purchase->date;\n $item['Ref'] = $Purchase->Ref;\n $item['warehouse_name'] = $Purchase['warehouse']->name;\n $item['discount'] = $Purchase->discount;\n $item['shipping'] = $Purchase->shipping;\n $item['statut'] = $Purchase->statut;\n $item['provider_id'] = $Purchase['provider']->id;\n $item['provider_name'] = $Purchase['provider']->name;\n $item['provider_email'] = $Purchase['provider']->email;\n $item['provider_tele'] = $Purchase['provider']->phone;\n $item['provider_code'] = $Purchase['provider']->code;\n $item['provider_adr'] = $Purchase['provider']->adresse;\n $item['GrandTotal'] = number_format($Purchase->GrandTotal, 2, '.', '');\n $item['paid_amount'] = number_format($Purchase->paid_amount, 2, '.', '');\n $item['due'] = number_format($item['GrandTotal'] - $item['paid_amount'], 2, '.', '');\n $item['payment_status'] = $Purchase->payment_statut;\n\n $data[] = $item;\n }\n\n $suppliers = provider::where('deleted_at', '=', null)->get(['id', 'name']);\n $warehouses = Warehouse::where('deleted_at', '=', null)->get(['id', 'name']);\n\n return response()->json([\n 'totalRows' => $totalRows,\n 'purchases' => $data,\n 'suppliers' => $suppliers,\n 'warehouses' => $warehouses,\n ]);\n }", "title": "" }, { "docid": "c244d1d9b930d92058612ba7f32cb512", "score": "0.48797548", "text": "public function clientAreaPage( \\IPS\\nexus\\Purchase $purchase )\n\t{\t\n\t\t$parent = parent::clientAreaPage( $purchase );\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$advertisement = \\IPS\\core\\Advertisement::load( $purchase->extra['ad'] );\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'packageInfo'\t=> $parent['packageInfo'],\n\t\t\t\t'purchaseInfo'\t=> $parent['purchaseInfo'] . \\IPS\\Theme::i()->getTemplate('purchases')->advertisement( $purchase, $advertisement ),\n\t\t\t);\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\treturn $parent;\n\t\t}\n\t}", "title": "" }, { "docid": "8af4fcca5dbb0eda8ac595faa661e392", "score": "0.487899", "text": "protected function _retrieve() {\n $sku = $this->getRequest()->getParam('sku');\n $totalReservado = 0;\n $orderItemCollection = Mage::getModel('sales/order_item')->getCollection();\n $orderItemCollection->getSelect()->group('main_table.item_id')\n ->joinLeft(array('order' => $orderItemCollection->getTable('sales/order')),\n 'main_table.order_id = order.entity_id', \n array('prod_id' => 'main_table.product_id', 'order_date' => 'order.created_at', 'increment_id' => 'order.increment_id', 'status' => 'order.status'));\n $orderItemCollection->addFieldToFilter('order.status', array('in' => array('pending','processing')));\n $orderItemCollection->addFieldToFilter('order.ext_order_id', array('null' => true)); // Pedido ainda não foi transformado em venda no ERP.\n $orderItemCollection->addFieldToFilter('main_table.sku', array('eq' => $sku));\n foreach($orderItemCollection as $orderItem) {\n if($orderItem->getProductType() == 'simple') {\n $totalReservado += (int)$orderItem->getQtyOrdered();\n }\n }\n \n return $totalReservado;\n }", "title": "" }, { "docid": "4e3bd8ed91478c08c939f9d70ffd4910", "score": "0.48728794", "text": "public function getReturnedProductsPurchases() { \n $query = \"SELECT produit, SUM(quantite) as total from RetourAchatProduit \n GROUP BY produit ORDER BY SUM(quantite) DESC LIMIT 10 \";\t\n $req = $this->connexion->getConnexion()->query($query); \n $total = $req->fetchAll(PDO::FETCH_OBJ); \n return $total; \n }", "title": "" }, { "docid": "3d829e3c55b67c22b97fee716c59336a", "score": "0.48708713", "text": "public function getPurchaseOrderIntegrationTest()\n {\n // Given\n $jsonString = file_get_contents(\"./tests/Providers/TestData/get-purchase-order.json\", true);\n $this->_mockApi->expects($this->once())\n ->method('getResource')\n ->with($this->equalTo(\"purchase-orders/76s6df76sa978df78987s8f\"))\n ->will($this->returnValue(json_decode($jsonString, true)));\n\n // When\n $result = $this->getPurchaseOrderProvider()->getById(\"76s6df76sa978df78987s8f\");\n\n // Then\n $this->assertEquals($result->getId(), \"76s6df76sa978df78987s8f\");\n $this->assertEquals($result->type, \"po\");\n $this->assertEquals(count($result->getItems()), 1);\n $item = $result->getItems()[0];\n $this->assertEquals($result->getItems()[0]->getId(), \"1234\");\n }", "title": "" }, { "docid": "5ee645f21a3cd5e0f28d4d7f1ae78acf", "score": "0.48668462", "text": "public function purchaseBill()\n\t{\n\t}", "title": "" } ]
563174fcd64749a5f42a19afc48e851a
Sets last activity date.
[ { "docid": "e158415c78f8f0c3f6c337b1da8c7029", "score": "0.8049473", "text": "public function setLastActivityDate(\\DateTime $lastActivityDate);", "title": "" } ]
[ { "docid": "15fef2c4d21c9525c637a3e7dc040f35", "score": "0.675019", "text": "public function getLastActivityDate();", "title": "" }, { "docid": "482618cc6f19465f3772e6c21be97bff", "score": "0.65526646", "text": "public function setLast_Update()\n {\n $this->last_update = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "a579ec78c8f2b14544a98b335023fd3b", "score": "0.6540449", "text": "public function setLastActivityAt(\\Datetime $LastActivityAt = null)\n {\n $this->LastActivityAt = $LastActivityAt;\n return $this;\n }", "title": "" }, { "docid": "a579ec78c8f2b14544a98b335023fd3b", "score": "0.6540449", "text": "public function setLastActivityAt(\\Datetime $LastActivityAt = null)\n {\n $this->LastActivityAt = $LastActivityAt;\n return $this;\n }", "title": "" }, { "docid": "52dc68626bde60f09ed9b2ae8dbf0ff5", "score": "0.6370975", "text": "public function setDate()\n {\n if ($this->isNewRecord)\n $this->create_time = $this->update_time = time();\n else\n $this->update_time = time();\n }", "title": "" }, { "docid": "a078ecab9f989b33af9da906e03f0add", "score": "0.633907", "text": "public function setYt_last_visit($value){\n $this->yt_last_visit=$value;\n }", "title": "" }, { "docid": "29fecb9c9b1df03e8229ff479e564d50", "score": "0.6306945", "text": "public function setLastEditDate(\\DateTime $lastEditDate);", "title": "" }, { "docid": "23ab84e083356018f26d605cc69e2788", "score": "0.6196556", "text": "public function setLastActionDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastActionDateTime', $value);\n }", "title": "" }, { "docid": "d7b27f75eb175a10391b8d8367c7126e", "score": "0.61767495", "text": "public function setLastVisit($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_visit !== null || $dt !== null) {\n $currentDateAsString = ($this->last_visit !== null && $tmpDt = new DateTime($this->last_visit)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->last_visit = $newDateAsString;\n $this->modifiedColumns[] = UserPeer::LAST_VISIT;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "e8c5b5fde8c26269d90afe72f427cada", "score": "0.61283785", "text": "public function setLatestVisit($latestVisit)\r\n {\r\n $this->latestVisit = new \\DateTime($latestVisit);\r\n }", "title": "" }, { "docid": "329756149ae338cfd05595b35a03a07d", "score": "0.609085", "text": "function set_group_last_activity( $group_id = null ) {\n\t\tupdate_post_meta( $group_id, 'um_groups_last_active', current_time( 'mysql' ) );\n\t}", "title": "" }, { "docid": "6c5c6945bee86b62a783d8077313d043", "score": "0.6078677", "text": "public function setLastActionDateTime($val)\n {\n $this->_propDict[\"lastActionDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "e03fa179d6dd0aba67f64d0d3c148bbc", "score": "0.5991413", "text": "public function setDepositDate() {\n if ($this->dateDeposited === null) {\n $this->dateDeposited = new DateTime();\n }\n }", "title": "" }, { "docid": "e03fa179d6dd0aba67f64d0d3c148bbc", "score": "0.5991413", "text": "public function setDepositDate() {\n if ($this->dateDeposited === null) {\n $this->dateDeposited = new DateTime();\n }\n }", "title": "" }, { "docid": "d1516d50fb0954fac7117714dd4e92d7", "score": "0.59876573", "text": "public function setLastLogin(DateTimeImmutable $lastLogin = null) {\n $this->lastLogin = $lastLogin;\n }", "title": "" }, { "docid": "4bcd3dc45e996cd21d40037eb5cd9cec", "score": "0.5985037", "text": "function SetLastBuildDate(Date $lastBuildDate = null)\n {\n $this->lastBuildDate = $lastBuildDate;\n }", "title": "" }, { "docid": "363f016bdcbadb849d97be7943927473", "score": "0.59669656", "text": "public function setLastContact() {\r\n $this->last_contact = time();\r\n }", "title": "" }, { "docid": "0c2e26bfb24c405bd5d4a13da3c2c502", "score": "0.59359586", "text": "public function setLastRunDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastRunDateTime', $value);\n }", "title": "" }, { "docid": "6c9aef1affc88b846d611bc2c1a611d5", "score": "0.59255236", "text": "function set_end_date($end_date) {\n $this->end_date = $end_date;\n }", "title": "" }, { "docid": "d460922860249673e394aa557d563f8f", "score": "0.5909379", "text": "public function setLastPublished(\\DateTime $lastPublished);", "title": "" }, { "docid": "fa6a32f688ca9b243a66d89d94672546", "score": "0.5907335", "text": "public function getLastActivityAt()\n {\n return $this->LastActivityAt;\n }", "title": "" }, { "docid": "fa6a32f688ca9b243a66d89d94672546", "score": "0.5907335", "text": "public function getLastActivityAt()\n {\n return $this->LastActivityAt;\n }", "title": "" }, { "docid": "5008730687855008ca86a00e38130c2e", "score": "0.58995396", "text": "public function setLastAction()\n {\n if (!Yii::app()->user->isGuest && !$this->isNewRecord) {\n $this->lastaction = time();\n return $this->save(false, array('lastaction'));\n }\n }", "title": "" }, { "docid": "4fd885f4248364db0962bebec64d47a1", "score": "0.58008045", "text": "public function setLastReportedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastReportedDateTime', $value);\n }", "title": "" }, { "docid": "42884b917335b89c88945b58ad281b69", "score": "0.5763404", "text": "function updateLastActivityDate ($datetime = \"auto\") { // $datetime format = 'YYYY-MM-DD HH:MM:SS'\n\t\tif ($this->iExist()) :\n\t\t\tif ($datetime==\"auto\") $datetime = date('Y-m-d h:i:s');\n\t\t\treturn $mysqli->query(\"UPDATE students SET last_activity_date = '$datetime' WHERE student_id = \".$this->myID().\" LIMIT 1\") or die ( $mysqli->error );\n\t\telse:\n\t\t\treturn NULL;\n\t\tendif;\n\t}", "title": "" }, { "docid": "2b86ce8d8f9084842106766abb0670a2", "score": "0.5760041", "text": "public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }", "title": "" }, { "docid": "2b86ce8d8f9084842106766abb0670a2", "score": "0.5760041", "text": "public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }", "title": "" }, { "docid": "9c836c4ea2f2d00dcef6905351539850", "score": "0.5750423", "text": "protected function _updateLastAccessed() {\r\n\t\t\r\n\t\t$this->_checkModelsIsSet();\r\n\t\t\r\n\t\t$account_id = $this->Session->read(\"account_id\");\r\n\t\t$timestamp = date(\"Y-m-d H:i:s\");\r\n\t\t$this->Account->id = $account_id;\r\n\t\t$this->Account->saveField('last_accessed', $timestamp);\r\n\t}", "title": "" }, { "docid": "53e8afca7bce3a730d0c9fc8b43c1113", "score": "0.5732641", "text": "public function setDate( $date = null ){\n\t\tif( !$date ){\n\t\t\t$date = date(\"Y-m-d H:i:s\");\n\t\t}\n\t\t\n\t\t$this->date = $date;\n }", "title": "" }, { "docid": "f0dd9cbd89f10e4006ceef42ce34ed30", "score": "0.5725515", "text": "protected function maybe_set_date_completed() {\n\t\tif ( $this->has_status( 'completed' ) ) {\n\t\t\t$this->set_date_completed( current_time( 'timestamp', true ) );\n\t\t}\n\t}", "title": "" }, { "docid": "e86eeb992b05185a4062273ccaa108a0", "score": "0.57196844", "text": "public function setLastBuildDate($lastBuildDate);", "title": "" }, { "docid": "abdda13572f3f328fb82b12936a40a41", "score": "0.57175297", "text": "public function setYt_last_update($value){\n $this->yt_last_update=$value;\n }", "title": "" }, { "docid": "a91b663eddaa1ad9abe2883c3ebd61db", "score": "0.57117593", "text": "public function setLastEntry($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_entry !== null || $dt !== null) {\n $currentDateAsString = ($this->last_entry !== null && $tmpDt = new DateTime($this->last_entry)) ? $tmpDt->format('Y-m-d') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->last_entry = $newDateAsString;\n $this->modifiedColumns[] = UserPeer::LAST_ENTRY;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "82d4e3da02b71e2b8e44fbf823a88d59", "score": "0.5680874", "text": "public function update_last_login()\n {\n $this->last_login = date('Y-m-d H:i:s');\n $this->save();\n }", "title": "" }, { "docid": "14eddc376640a315fa109975bfc9fc72", "score": "0.5662458", "text": "public function setEndDate($date) : self;", "title": "" }, { "docid": "73ac6ab177a8fb7a785572b98243a343", "score": "0.5660835", "text": "public function setLastModifiedAt(\\DateTimeImmutable $date): void\n {\n $this->lastModifiedAt = $date;\n }", "title": "" }, { "docid": "f3d0562ad1e45bb6a5af8ee54e85ee1d", "score": "0.5650839", "text": "public function setDate($date)\r\n {\r\n $this->_date = $date;\r\n }", "title": "" }, { "docid": "37c99900e5430c8822da003152804843", "score": "0.56498057", "text": "public function setDateLastEdited($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->per_datelastedited !== null || $dt !== null) {\n if ($this->per_datelastedited === null || $dt === null || $dt->format(\"Y-m-d H:i:s.u\") !== $this->per_datelastedited->format(\"Y-m-d H:i:s.u\")) {\n $this->per_datelastedited = $dt === null ? null : clone $dt;\n $this->modifiedColumns[PersonTableMap::COL_PER_DATELASTEDITED] = true;\n }\n } // if either are not null\n\n return $this;\n }", "title": "" }, { "docid": "7264fc952bcb550e02546159bb8ba4c7", "score": "0.5641327", "text": "public function updateLastLogin(): void\n {\n $this->setAttribute('last_login', Carbon::now());\n\n $this->save();\n }", "title": "" }, { "docid": "6694dd0bab82f282029fe4277a20d7d6", "score": "0.5639904", "text": "public function updateLastSignIn()\n {\n $now = new \\DateTime();\n $this->attrs['last_sign_in'] = $now->format('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "8f626174c389de7d247a855f06cfcbab", "score": "0.5637118", "text": "private function setModificationDate() {\n $this->modificationDate = new \\DateTime();\n }", "title": "" }, { "docid": "a71b551e352a8d7c81c5b80a71e11771", "score": "0.563086", "text": "public function setDate($date) {\n\t\t$this->date = $date;\n\t}", "title": "" }, { "docid": "5b237e66f1a1c201baf66c0399bfa2e5", "score": "0.56255984", "text": "public function setDate($date){\n\t\t$this->date = $date;\n\t}", "title": "" }, { "docid": "26841e4a9a927be2f2cd0ac91117dbad", "score": "0.56221974", "text": "public function setDate($date)\n {\n $this->date = $date;\n }", "title": "" }, { "docid": "26841e4a9a927be2f2cd0ac91117dbad", "score": "0.56221974", "text": "public function setDate($date)\n {\n $this->date = $date;\n }", "title": "" }, { "docid": "0cafc9d1dde120ad676901d300eefc59", "score": "0.56190664", "text": "public function set_last_requested_date(DateTime $last_requested_date): static\n {\n $this->last_requested_date = $last_requested_date;\n\n return $this;\n }", "title": "" }, { "docid": "1234589a578625719465b903ab063fea", "score": "0.56150514", "text": "public function setLastPublished(\\DateTime $lastPublished)\n {\n $this->lastPublished = $lastPublished;\n }", "title": "" }, { "docid": "cce2a7439b0feb645592ab290fe1a15e", "score": "0.5605177", "text": "public function doUpdateLastLogin() {\n $this->ts_last_login = new \\DateTime();\n }", "title": "" }, { "docid": "132096903fa06e19d534ae8e89db8327", "score": "0.5604588", "text": "public function setUpdatedAt($date);", "title": "" }, { "docid": "f23f20a628c0c5a23d4e412a0b888d54", "score": "0.55905855", "text": "public function setEndAtAttribute($date)\n {\n if (!empty($date)) {\n $this->attributes['end_at'] = Carbon::parse($date);\n } else {\n $this->attributes['end_at'] = null;\n }\n }", "title": "" }, { "docid": "51ca3678d782649a60ec2d856807464b", "score": "0.5563627", "text": "public function getLastActivityTimestamp()\n {\n return $this->lastActivityTimestamp;\n }", "title": "" }, { "docid": "161ff5dd221a1550d6038772ed04a8dd", "score": "0.5561175", "text": "public function set_date ( $date ) {\n\t\t$this->_date = $date;\n\t}", "title": "" }, { "docid": "12b5a66410b407816cb4b5f19ad0df06", "score": "0.55605936", "text": "public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}", "title": "" }, { "docid": "12b5a66410b407816cb4b5f19ad0df06", "score": "0.55605936", "text": "public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}", "title": "" }, { "docid": "af947e4bbdab5bc5831d93753e7ebc5c", "score": "0.55461854", "text": "private function setDate($date)\n {\n $this->date = date('Y-m-d', $date);\n }", "title": "" }, { "docid": "efeb63c8505374d681961f1e17ee5477", "score": "0.5534375", "text": "private function updateUserLastLoginDate(){\r\n\r\n $queryBuilder = $this->entityManager->createQueryBuilder();\r\n $queryBuilder->update(\"YilinkerCoreBundle:User\", \"u\")\r\n ->set(\"u.lastLogoutDate\", \":lastLogoutDate\")\r\n ->where(\"u = :user\")\r\n ->setParameter(\":lastLogoutDate\", Carbon::now())\r\n ->setParameter(\":user\", $this->authenticatedUser)\r\n ->getQuery()\r\n ->execute();\r\n }", "title": "" }, { "docid": "788f9ae0b99e6f4bf3e93031b7a2eb10", "score": "0.5524148", "text": "private function updateLastVisit()\n {\n $db = Application::dbConnect();\n\n $id = intval($this->id);\n $lastVisit = date('Y-m-d H:i:s', time());\n\n $query = \"UPDATE `users`\n SET `lastvisit` = '\" . $lastVisit . \"'\n WHERE `id` = \" . $id;\n\n $db->query($query);\n if (mysqli_errno($db)) {\n throw new \\Exception(Messages::MYSQL_ERROR);\n }\n }", "title": "" }, { "docid": "9ca5c4708509c326e33eccbd86ca4ea2", "score": "0.5484874", "text": "public function setDateAddedToNow()\n {\n $this->dateAdded = new \\DateTime();\n }", "title": "" }, { "docid": "da41e354a0a11b64c16d189dedf8ad4a", "score": "0.54810506", "text": "public function setUpdatedDate()\n\t{\n\n\t}", "title": "" }, { "docid": "674b2f208b009c89d540b66c113e8b91", "score": "0.5448895", "text": "private function setPostDate()\n {\n if (($this->element instanceof EntryModel) && is_null($this->element->postDate)) {\n $this->element->postDate = new DateTime();\n }\n }", "title": "" }, { "docid": "c76190286e51fe9c868505e463e71dd1", "score": "0.54472166", "text": "public function setUpdatedAt()\n {\n $this->updatedAt = new \\DateTime();\n }", "title": "" }, { "docid": "5fcff7aa06606fd7a8b3f32d9bdfd0ba", "score": "0.5441603", "text": "public function setLogDate($value)\n {\n $this->validateDate('LogDate', $value);\n $this->validateNotNull('LogDate', $value);\n\n if ($this->data['log_date'] === $value) {\n return;\n }\n\n $this->data['log_date'] = $value;\n $this->setModified('log_date');\n }", "title": "" }, { "docid": "1880b603860652248545866ab0ce42c5", "score": "0.5441445", "text": "public function setDate(\\DateTime $date) {\n\n $this->date = $date->format('Y-m-d H:i:s');\n\n }", "title": "" }, { "docid": "ee157d70c2db0c3296a9cf988b5396e4", "score": "0.54358995", "text": "public function setLastLogin($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_login !== null || $dt !== null) {\n $currentDateAsString = ($this->last_login !== null && $tmpDt = new DateTime($this->last_login)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->last_login = $newDateAsString;\n $this->modifiedColumns[] = sfGuardUserPeer::LAST_LOGIN;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "71826c7b93d0994d92ffeb38146ada96", "score": "0.5431382", "text": "public function setLastRequest($lastRequest)\n {\n $this->lastRequest = $lastRequest;\n }", "title": "" }, { "docid": "f9cd9307dc399729a1d3174a240a12f0", "score": "0.54276407", "text": "public function setLastStateChangeDateTime($val)\n {\n $this->_propDict[\"lastStateChangeDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "f39c6edeb69480a61ac19eea81b6fac2", "score": "0.54241836", "text": "public function setYt_registration_date($value){\n $this->yt_registration_date=$value;\n }", "title": "" }, { "docid": "56c83cd892c2e779f22ffb250b159c1c", "score": "0.5411877", "text": "private function setLastLogin()\n\t{\n\t\t$this->OnlineMes=ProfileCommon::getLastLoginFormat($this->profile->getLAST_LOGIN_DT());\n\t\t\n\t}", "title": "" }, { "docid": "ba8f440f0fb265f3039e18aab1ec4b17", "score": "0.540155", "text": "public function setLastBookingDate($lastBookingDate = null)\n {\n // validation for constraint: string\n if (!is_null($lastBookingDate) && !is_string($lastBookingDate)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($lastBookingDate)), __LINE__);\n }\n if (is_null($lastBookingDate) || (is_array($lastBookingDate) && empty($lastBookingDate))) {\n unset($this->LastBookingDate);\n } else {\n $this->LastBookingDate = $lastBookingDate;\n }\n return $this;\n }", "title": "" }, { "docid": "89d787ea1259f18d0773eb4f77da333f", "score": "0.5399949", "text": "public function setLastUpdatedDateTime($val)\n {\n $this->_propDict[\"lastUpdatedDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "38f7274149b54f57a8995c84300bc8c0", "score": "0.5399042", "text": "public function setUpdateDateValue()\n {\n }", "title": "" }, { "docid": "38f7274149b54f57a8995c84300bc8c0", "score": "0.5399042", "text": "public function setUpdateDateValue()\n {\n }", "title": "" }, { "docid": "86f838af505c34912f11e5524cc8a861", "score": "0.5390273", "text": "public function setLastUpdate(\\DateTime $last_update)\n {\n $this->last_update = $last_update;\n\n return $this;\n }", "title": "" }, { "docid": "182ec5ee6880e4740ca5dded83b9d3e3", "score": "0.53863245", "text": "public function setDate( DateTime $date )\n {\n $this->_date = $date;\n }", "title": "" }, { "docid": "b25bb4205ec558eca2339680df67c4b9", "score": "0.537506", "text": "public function set_user_lastlog($p_user_lastlog){\n\t\t$this->v_user_lastlog = new MongoDate(strtotime($p_user_lastlog));\n\t}", "title": "" }, { "docid": "26ff07753cd8a84dec1209cf786ac676", "score": "0.53699076", "text": "public function setLastUpdate()\n {\n Mage::app()->saveCache(time(), self::CACHE_PREFIX.\"_\".$this->getModule().'_lastcheck');\n }", "title": "" }, { "docid": "62e69d0931ba6f2ee881c6f57c003276", "score": "0.5363341", "text": "public function setUpdatedAtValue()\n {\n $this->updated_at = time();\n }", "title": "" }, { "docid": "e5c74baf43a2d0f247fc3cb271d7dc60", "score": "0.5363331", "text": "public function setExpirationDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->expiration_date !== null || $dt !== null) {\n $currentDateAsString = ($this->expiration_date !== null && $tmpDt = new DateTime($this->expiration_date)) ? $tmpDt->format('Y-m-d') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->expiration_date = $newDateAsString;\n $this->modifiedColumns[] = UserPeer::EXPIRATION_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "3a66bcc561838fc0033474b2edd80f14", "score": "0.5359958", "text": "protected function setLastModified(?\\DateTimeInterface $date = null): self\r\n {\r\n if (is_null($date)) {\r\n $this->headers->remove('Last-Modified');\r\n return $this;\r\n }\r\n\r\n $date = new \\DateTime('now', new \\DateTimeZone('UTC'));\r\n $this->headers->set('Last-Modified', $date->format('D, M Y H:i:s') . ' GMT');\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "14b85919f9aa82a3241df9272c743d7c", "score": "0.53587186", "text": "public function setUpdateDateValue() {\n }", "title": "" }, { "docid": "14b85919f9aa82a3241df9272c743d7c", "score": "0.53587186", "text": "public function setUpdateDateValue() {\n }", "title": "" }, { "docid": "ae1dc7e653c7a87f5dc89c169d624397", "score": "0.5352601", "text": "function setDate($date)\n {\n if (ctype_digit($date)) {\n if (version_compare(phpversion(), '5') != -1) {\n $this->_date = date('r', $date);\n } else {\n $this->_date = date('Y-m-d\\TH:i:sO', $date);\n }\n } else {\n $this->_date = $date;\n }\n }", "title": "" }, { "docid": "efd7a323f376baa00a741d1cd0c70355", "score": "0.5342752", "text": "public function setLastTicketingDate($lastTicketingDate = null)\n {\n // validation for constraint: string\n if (!is_null($lastTicketingDate) && !is_string($lastTicketingDate)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($lastTicketingDate)), __LINE__);\n }\n if (is_null($lastTicketingDate) || (is_array($lastTicketingDate) && empty($lastTicketingDate))) {\n unset($this->LastTicketingDate);\n } else {\n $this->LastTicketingDate = $lastTicketingDate;\n }\n return $this;\n }", "title": "" }, { "docid": "d93002e0921480c7bfc86b8fad341aac", "score": "0.53333694", "text": "public function setDate(DateTime $date)\n {\n $this->date = $date;\n }", "title": "" }, { "docid": "a080188ca8bbe896be1b49ac4487d635", "score": "0.53307164", "text": "public function setDate()\r\n {\r\n $this->date = new \\DateTime(\"now\");\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "5f73b2ddf82aad49840329b930d5a8ab", "score": "0.5322918", "text": "public function setLatestTime(?string $latestTime): void\n {\n $this->latestTime = $latestTime;\n }", "title": "" }, { "docid": "8b4bef6da8f33e988d85577eba121fe4", "score": "0.53196216", "text": "public function setLastReportedDateTime($val)\n {\n $this->_propDict[\"lastReportedDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "8c45d503edf013ffde07c0d8fe9a3daa", "score": "0.531575", "text": "public function recordLastActivedAt()\n {\n $hash = $this->getHashFromDateString(Carbon::now()->toDateString());\n\n // Field name, eg. user_1\n $field = $this->getHashField();\n\n // current time\n $now = Carbon::now()->toDateTimeString();\n\n // write data into redis, any existing fields will be updated\n Redis::hSet($hash, $field, $now);\n }", "title": "" }, { "docid": "7d8224376dc4aaedfe157fd4aadd15c5", "score": "0.5314665", "text": "public function setSub_last_update($value){\n $this->sub_last_update=$value;\n }", "title": "" }, { "docid": "e6fd57ae9feff6878909e9d0027fb465", "score": "0.5313881", "text": "public function setendDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->enddate !== null || $dt !== null) {\n $currentDateAsString = ($this->enddate !== null && $tmpDt = new DateTime($this->enddate)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->enddate = $newDateAsString;\n $this->modifiedColumns[] = ActionPeer::ENDDATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "0d7d8069f77a7a6558477d84847f3ccb", "score": "0.53031874", "text": "public function setLastCheckinDateTime($val)\n {\n $this->_propDict[\"lastCheckinDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "3112e281597950f493907bef9adbe43c", "score": "0.53005064", "text": "public function setExpirationDate(?Date $value): void {\n $this->getBackingStore()->set('expirationDate', $value);\n }", "title": "" }, { "docid": "99b164081887d2a2e8929f9464f26378", "score": "0.52970266", "text": "public function setYt_last_video($value){\n $this->yt_last_video=$value;\n }", "title": "" }, { "docid": "2dd3be2475c02b27f58cd3d5a5ae8703", "score": "0.5288579", "text": "public function setEndUpdatedAt(?string $endUpdatedAt): void\n {\n $this->endUpdatedAt = $endUpdatedAt;\n }", "title": "" }, { "docid": "bfbb359a34c27f1e70cf2126b0c2d350", "score": "0.52877", "text": "public function updateLastLoginDate(UserEntity $user);", "title": "" }, { "docid": "5183d641eebc64750115b470e7645006", "score": "0.5282652", "text": "public function setsetDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->setdate !== null || $dt !== null) {\n $currentDateAsString = ($this->setdate !== null && $tmpDt = new DateTime($this->setdate)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->setdate = $newDateAsString;\n $this->modifiedColumns[] = EventPeer::SETDATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "087bd93107a1828cbea1cf4a8bff75d6", "score": "0.5279216", "text": "private function setLastUpdateTime() {\n\t\t$session = new Zend_Session_Namespace();\n\t\t$session->comments = time();\n\t}", "title": "" }, { "docid": "6ef686344e697b2f5de2859765f4631d", "score": "0.52730507", "text": "public function setRegistrationDate(){\n\n\t\t$this->displayDate = mktime(0,0,0);//using date() create mkttime stamp\n\t}", "title": "" }, { "docid": "6296e22f4db285c1e3090eeca1479873", "score": "0.5271731", "text": "function set_to_date($to_date)\r\n {\r\n $this->set_default_property(self :: PROPERTY_TO_DATE, $to_date);\r\n }", "title": "" }, { "docid": "69bab7896fbf91698ea5933bb0a29a87", "score": "0.5269075", "text": "public function setLastUpdate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_update !== null || $dt !== null) {\n $currentDateAsString = ($this->last_update !== null && $tmpDt = new DateTime($this->last_update)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ( ($currentDateAsString !== $newDateAsString) // normalized values don't match\n || ($dt->format('Y-m-d H:i:s') === '2020-04-16 09:40:03') // or the entered value matches the default\n ) {\n $this->last_update = $newDateAsString;\n $this->modifiedColumns[] = RombonganBelajarPeer::LAST_UPDATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" } ]
73319084aa6b8a0fbc351864b71fd266
Creates a new Proxy model. If creation is successful, the browser will be redirected to the 'view' page.
[ { "docid": "e3286da7ae1a46571c60a044418b08be", "score": "0.82265574", "text": "public function actionCreate()\n {\n $model = new Proxy();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" } ]
[ { "docid": "99679257768b5e3ce0f2350071f6a455", "score": "0.6781489", "text": "public function actionCreate()\n {\n $model = new Redirect();\n\n $hostInfo = $this->getHostInfo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $model->redirect = $model::PREFIX_REDIRECT;\n return $this->render('create', [\n 'model' => $model,\n 'hostInfo' => $hostInfo,\n ]);\n }\n }", "title": "" }, { "docid": "725f0a11a1ae0255e2d687ade1702381", "score": "0.6460443", "text": "public function actionCreate()\n {\n $model = Yii::createObject($this->getModelClass());\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \\Yii::$app->getSession()->setFlash('success', $this->getFlashMsg('success'));\n return $this->redirect(ArrayHelper::merge(['view'], $model->getPrimaryKey(true)));\n } else {\n if ($model->hasErrors()) {\n \\Yii::$app->getSession()->setFlash('error', $this->getFlashMsg('error'));\n }\n return $this->render($this->viewID, [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "ceb06a7aa9de21458a9d015f67e4a05c", "score": "0.64267683", "text": "public function actionCreate()\n {\n $model = new Triage();\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": "af3da442dc848d5bb919d20628e25bdc", "score": "0.64122945", "text": "public function actionCreate()\n {\n $model = new HuajuVip();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f03b50df4a661f96dbd66de2404476a8", "score": "0.6365879", "text": "public function actionCreate()\n {\n $model = new Web();\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": "f09980bd4f45fc631082ea096084c4bc", "score": "0.63538826", "text": "public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->orid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "86b09c76fe68ae4b97f033cc72fc77dd", "score": "0.6310815", "text": "public function actionCreate()\n\t{\n\t/*\t$model=new TrackTrTracking;\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['TrackTrTracking']))\n\t\t{\n\t\t\t$model->attributes=$_POST['TrackTrTracking'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t*/\n\t\t$this->render('load_url');\n\t}", "title": "" }, { "docid": "4dbce87f02eccd4c5dfcef968459c480", "score": "0.6307111", "text": "public function actionCreate()\n {\n $model = new Lead();\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": "521366b38e28d66215fa5f94115ac265", "score": "0.6292735", "text": "public function actionCreate()\n {\n $model = new Order();\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": "c41a56bae20dd17ceb4882e95f04fa63", "score": "0.6268913", "text": "public function actionCreate()\n {\n $model = new Baiduorder();\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": "29f802c2a6b58363bda8cd0fa2eeec85", "score": "0.6267069", "text": "public function actionCreate() {\n $model = new Clientes();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->dni]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f2641970d8fa53416f28829efe0f51c3", "score": "0.6264623", "text": "public function actionCreate() {\n $model = new Lead;\n\n if (isset($_POST['Lead'])) {\n $model->attributes = $_POST['Lead'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "8cd7bfd36888c5ed279be9d2ede3d5e8", "score": "0.6260759", "text": "public function actionCreate()\n {\n $model = new Clientes();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "bd847ce19bd6187783562916f5ec2b33", "score": "0.62412643", "text": "public function actionCreate()\n {\n $model = new Customerelationship();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->CaseID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7333aa4970cef1a9960023a26f64c71b", "score": "0.6227179", "text": "public function actionCreate()\n {\n $model = new Admin();\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": "caa105117540432c0a62e9b02d2b7249", "score": "0.62139946", "text": "public function actionCreate()\n\t{\n\t //$this->redirect('http://baratson.com', 302);\n\t if(Yii::app()->user->isGuest)\n if(isset(Yii::app()->session['payid'])){\n $this->redirect(array('update','id'=>Yii::app()->session['payid']));\n }\n\n\t\t$model=new Payonline;\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['Payonline']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Payonline'];\n\t\t\t$model->reference = 'Empty';\n\t\t\t$model->created_at = new DateTime('now', new DateTimeZone('Asia/Baku'));\n\t\t\tif($model->save()){\n\t\t\t Yii::app()->session['payid'] = $model->id;\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "a73489bac8f73161beef4997825a887b", "score": "0.62040424", "text": "public function actionCreate()\n {\n $model = new OutboundModel();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'terminalId' => $model->terminalId, 'storehouseId' => $model->storehouseId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "885c9f890b1b6612c174dd03267cab10", "score": "0.62019193", "text": "public function actionCreate()\n {\n $model = new OrderDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\t\n\t\t\tYii::$app->session->setFlash('order_details', 'Order Details has been added successfully');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "cbd84e4b8bd46a77527b930a6ff7fed6", "score": "0.6167266", "text": "public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "cbd84e4b8bd46a77527b930a6ff7fed6", "score": "0.6167266", "text": "public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "cbd84e4b8bd46a77527b930a6ff7fed6", "score": "0.6167266", "text": "public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "5561423b9425f391edd00b071e190e54", "score": "0.6130157", "text": "public function actionCreate()\n {\n $model = new TblModels();\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": "2efd7b2c205a1ec90e9aedc74ec78335", "score": "0.61258423", "text": "public function actionCreate()\r\n\t{\r\n\t\t$model=new Po;\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Po']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['Po'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->PoNo));\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "86a6e16b8eb6bfaecb87e196686883e3", "score": "0.61194813", "text": "public function actionCreate()\n {\n $model = new DriverOfVehicle();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'vehicle_plate_number' => $model->vehicle_plate_number, 'driver_id' => $model->driver_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "04293c87bea8a8827db77d55597c7e41", "score": "0.61104995", "text": "public function actionCreate()\n\t{\n\t\t$model=new TipoVisitas;\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['TipoVisitas']))\n\t\t{\n\t\t\t$model->attributes=$_POST['TipoVisitas'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('tipoVisitas/view','id'=>$model->ID_TIPO_VISITA));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "082c92fdcdb42fb08a24f3865a0896d4", "score": "0.60838044", "text": "public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->scenario = Orders::ORDER_CREATE_SCENARIO;\n $model->delivery_required = $model->address == '' ? false : true;\n if ($model->save()) \n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n \n }", "title": "" }, { "docid": "7ebc61d9e3a23809a514cb790b4437c7", "score": "0.6079594", "text": "public function actionCreate()\n {\n\n \t//$this->controller->redirect(Yii::app()->user->returnUrl);\n }", "title": "" }, { "docid": "a1a2dea03569a5afb3b7c3c119228046", "score": "0.6071956", "text": "public function actionCreate() {\n $model = new Penerbit();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "925fa0fc896e1f83acdbf0e59ff1e96e", "score": "0.60640025", "text": "public function actionCreate()\n {\n $model = new User();\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": "925fa0fc896e1f83acdbf0e59ff1e96e", "score": "0.60640025", "text": "public function actionCreate()\n {\n $model = new User();\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": "925fa0fc896e1f83acdbf0e59ff1e96e", "score": "0.60640025", "text": "public function actionCreate()\n {\n $model = new User();\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": "925fa0fc896e1f83acdbf0e59ff1e96e", "score": "0.60640025", "text": "public function actionCreate()\n {\n $model = new User();\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": "925fa0fc896e1f83acdbf0e59ff1e96e", "score": "0.60640025", "text": "public function actionCreate()\n {\n $model = new User();\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": "e7f8b94c9b0b0f6e1e42266003ac6e81", "score": "0.6062443", "text": "public function actionCreate() {\n $model = new Order;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Order'])) {\n $model->attributes = $_POST['Order'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->order_id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "0bbd9c63bf108da4e91f4e59fe855600", "score": "0.60602576", "text": "public function actionCreate()\n {\n $model = new Order();\n\n $data = Yii::$app->request->post();\n $op = new OrderPay();\n $op->status = 'unpay';\n $op->save();\n $data['Order']['payid'] = $op->id;\n if ($model->load($data) && $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": "e5d34baeec7f2f66b18cb83123a9c262", "score": "0.6053766", "text": "public function actionCreate()\n {\n $model = new Wallets();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "c24ea224caee70e01d16158fbd49494b", "score": "0.6043292", "text": "public function actionCreate()\n {\n $model = new Post();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "536847c81264a7414aef6fe19338c2ab", "score": "0.60411966", "text": "public function actionCreate() {\n $model = new Usuario();\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": "9cb3bd7337ec7ae101e2873a2c9d0ad9", "score": "0.60301304", "text": "public function actionCreate()\n {\n\t\t\n\t\treturn $this->redirect('update'); \n }", "title": "" }, { "docid": "015a209ae5529bc9891f21aa9dc3d185", "score": "0.60193115", "text": "public function actionCreate()\n {\n $model = new Drivers();\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": "bd888eb2de72f54b23a53711030ac7b0", "score": "0.60152054", "text": "public function actionCreate()\n {\n $model = new \\backend\\models\\CreateForm();\n\n if($model->load(Yii::$app->request->post()) && $model->create()){\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "8269faa6a0be0411f6eb4dbf648a89c6", "score": "0.60081685", "text": "public function actionCreate()\n {\n $model = new Pinjaman();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_pinjaman]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "2a66d006a1bbae631d160b37fb9dee44", "score": "0.5992929", "text": "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['service/index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "07413f13ccbece09892f525df995e87c", "score": "0.5992373", "text": "public function actionCreate()\n {\n $model = new Country();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->code]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "6c647d8fd54a6e5fe7d0e4e5f8b8e90c", "score": "0.59918046", "text": "public function actionCreate() {\n $model = new Saleorders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "c5e5bc9c96e3668cc10f4efa1250507f", "score": "0.59879386", "text": "public function actionCreate()\n {\n $model = new PenetapanNomor();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['#penetapan-nomor/view', 'id' => $model->id]);\n }\n\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "342e086ed8664a147e39139e57499e06", "score": "0.59763837", "text": "public function actionCreate()\n {\n $model = new Wallet();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "feb329e46ca9c77cf6ae8876943b758c", "score": "0.59743947", "text": "public function actionCreate()\n {\n $model = new AngkutLapak();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->no_surat = $this->generateNoSuratAngkutLapak();\n if($model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "a8b95f046f9af134425f86e7df9451f6", "score": "0.5971799", "text": "public function actionCreate()\n {\n $model = new Proyecto();\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": "6f94484552f6396c0ba13f9f9366d525", "score": "0.5964708", "text": "public function actionCreate()\n {\n $model = new Account();\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": "5fe4f4d54c10dde0ec5403d12dd2ad46", "score": "0.5963799", "text": "public function actionCreate()\n {\n $model = new Tramoafp();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->IdTramoAfp]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7ae1d437376e19fc44a9609e276129f2", "score": "0.5955945", "text": "public function actionCreate()\n\t{\n\t\t$model=new Venta;\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['Venta']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Venta'];\n $model->fecha_venta=date('Y-m-d');\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('AgregarDetalle','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "704a917d6ac7d36333a2ddb73f35194e", "score": "0.5954618", "text": "public function actionCreate()\n {\n $model = new Purchases();\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": "581b8df9719d7da1a796ab97c688f7aa", "score": "0.5948548", "text": "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "581b8df9719d7da1a796ab97c688f7aa", "score": "0.5948548", "text": "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "581b8df9719d7da1a796ab97c688f7aa", "score": "0.5948548", "text": "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "b0f4ee01cd637242c4e30eefb66fb8f7", "score": "0.5943596", "text": "public function actionCreate()\n {\n $model = new Administrador();\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": "5450bac5bb90a8fee6858e07804607fa", "score": "0.59426504", "text": "public function actionCreate()\n {\n $model = new ProductoVenta();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'Producto_idProducto' => $model->Producto_idProducto, 'Venta_idVenta' => $model->Venta_idVenta]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f9302d096373de520f26fdbd9eeff9cc", "score": "0.594216", "text": "public function actionCreate()\n {\n $model = new PaySlip();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->pay_slip_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "1e5ed2b717aee5851c63dfc5e56d55d3", "score": "0.5941253", "text": "public function actionCreate()\n {\n $model = new CoachInfo();\n\n\t\t $model->user_id = Yii::$app->user->id;\n\t\t\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": "04e59342c8a6e899c3da5e8474911f4f", "score": "0.59358203", "text": "public function actionCreate() {\n $model = new AppHospitals();\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": "24b4b0b45c0d40d510d06032bb7c2283", "score": "0.5928247", "text": "public function actionCreate()\n {\n $model = new Waterstation();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->sitenumber]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n \n\n echo \"create ok\";\n }", "title": "" }, { "docid": "5c647c6b0d32a20be97742cefe0cda32", "score": "0.59210426", "text": "public function actionCreate()\n {\n $model = new Tour();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "e0d01ac02474771b060d59a7fde05d54", "score": "0.59191304", "text": "public function create()\n {\n \t$model = new Person();\n \treturn view('person.create', ['model'=>$model]);\n \t\n }", "title": "" }, { "docid": "15ac0a64cba39a05dc7bd14875d6fbef", "score": "0.5915404", "text": "public function actionCreate()\n {\n $model = new SupplierCompany();\n $address = new \\app\\models\\SupplierAddress();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($address->load(Yii::$app->request->post())) {\n $address->company_id = $model->id;\n $address->is_default = 1;\n $address->save(FALSE);\n }\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'address'=> $address\n ]);\n }\n }", "title": "" }, { "docid": "27171bc95e2456bdf715f12afb54c6b3", "score": "0.5915335", "text": "public function actionCreate()\n {\n $model = new Log();\n\n if ($model->load(\\App::$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": "8a4def97705be2a3724584e5ca38e4a1", "score": "0.5915224", "text": "public function actionCreate() {\n $model = new OrdersTransportAffiliated();\n $config = new \\app\\models\\Config_system();\n $id = $config->autoId_order(\"orders_transport_affiliated\", \"order_id\", 5);\n $newId = substr(date(\"Y\"), -2) . \"T-\" . $id;\n\n if ($model->load(Yii::$app->request->post())) {\n // Yii::$app->response->format = Response::FORMAT_JSON;\n\n if (Yii::$app->request->post('orders-transport-affiliated', null)) {\n $model->scenario = 'orders-transport-affiliated';\n return ActiveForm::validate($model);\n }\n\n if ($model->load(Yii::$app->request->post())) {\n $model->create_date = date(\"Y-m-d H:i:s\");\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'order_id' => $newId,\n ]);\n }\n }", "title": "" }, { "docid": "d1e279c0ec7ea5edbb99a4f6d1be5c8e", "score": "0.59124434", "text": "public function actionCreate() {\n $model = new U2Warehouse();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'warehouse_id' => $model->warehouse_id, 'user_id' => $model->user_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "b5ce775532f1fc4b7b8b7cb3d4a76af9", "score": "0.59122646", "text": "public function actionCreate()\n {\n $model = new Parameters;\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id\n ]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "9f3a1d49e4171f82fa2164a5151c3460", "score": "0.5909365", "text": "public function actionCreate() {\n $model = new Reply();\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": "d23c9edba55ddbdaf945c39cba6a8b1e", "score": "0.5905373", "text": "public function actionCreate()\n {\n $model = new User;\n\n if (isset($_POST['User'])) {\n $model->attributes = $_POST['User'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "eeec9a41b171f681db62e06ca9691f0f", "score": "0.58976185", "text": "public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$_POST['User']['password'] = SHA1($_POST['User']['password']);\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\t\n\t\t\tif($model->save())\n\t\t\t $this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "d74f135093c8458ebf923a5550c7959f", "score": "0.58937293", "text": "public function create() {\n $this->car_rides_model->set_car_ride();\n redirect('/car_rides/own/');\n }", "title": "" }, { "docid": "0dd231940c27947255eca3b20ee7964e", "score": "0.5892438", "text": "public function actionCreate()\n {\n $this->checkAccess();\n\n $model = new Otchetlist();\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": "811699aefabfeb84a8125d9c005324ea", "score": "0.5884095", "text": "public function actionCreate()\n {\n $model = new Profile;\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": "0f5df4e8d83949a77603db7a198db743", "score": "0.58798915", "text": "public function actionCreate()\n\t{\n\t\t$model=new Direction();\n\n\t\tif(isset($_POST['Direction']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Direction'];\n\n\t\t\t$model->file = CUploadedFile::getInstance($model, 'file');\n\t\t\tif ($model->validate()) {\n\t\t\t\tif ($model->file instanceof CUploadedFile) {\n\t\t\t\t\t$file = $model->file->getTempName();\n\t\t\t\t\t$fileId = Yii::app()->image->putImage($file, $model->file->getName());\n\t\t\t\t\tif (empty($fileId)) {\n\t\t\t\t\t\tthrow new CHttpException(500);\n\t\t\t\t\t}\n\n\t\t\t\t\t$model->image_id = $fileId;\n\t\t\t\t}\n\t\t\t\t$model->save(false);\n\n\t\t\t\t$url = $this->createUrl('index', array('Direction[id]'=>$model->id));\n\t\t\t\t$this->redirect($url);\n\t\t\t}\n\t\t}\n\n\t\t$centers = Center::model()->findAllByAttributes(array('status'=>Center::STATUS_ACTIVE));\n\t\t$services = array();\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'centers'=>$centers,\n\t\t\t'services'=>$services,\n\t\t));\n\t}", "title": "" }, { "docid": "48cadac1c66fe5e63197b858397b25c5", "score": "0.58756715", "text": "public function create()\n {\n return redirect('/AddAgent');\n }", "title": "" }, { "docid": "e6f2f6ba4d5cb9aae6ccf41aa961e4c6", "score": "0.58710694", "text": "public function actionCreate()\r\n\t{\r\n\t\t$model=new User;\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['User']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['User'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "cca486cc8c1c1d40275744600c3cb294", "score": "0.58698463", "text": "public function actionCreate()\n {\n $model = new Voting();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['question/create', 'votingId' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "c6ece6c171534bee12a84dc016ba7ee2", "score": "0.58659613", "text": "public function actionCreate()\n {\n $model = new Source();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "c7d307969f15e209ecb97fac59dd6fcf", "score": "0.5857137", "text": "public function actionCreate()\n\t{\n\t\t$model=new Service;\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['Service']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Service'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "205a933fdd74d6aa206b53f11e8dd505", "score": "0.58452904", "text": "public function actionCreate()\n {\n $model = new Monetization();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "609bf51b40690b7e9d3d152d1548ed1f", "score": "0.5844773", "text": "public function actionCreate()\n {\n $model = new NpWarehouses();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "854c53e7d5d34316001d0ff4b871f8da", "score": "0.5843418", "text": "public function actionCreate()\n {\n $this->layout = \"admin\";\n $model = new User();\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": "49916672f5c2f19dfe1a6e2e651f5e08", "score": "0.5843074", "text": "public function actionCreate()\n {\n $model = new BonanzaPayment();\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": "f1bfd10993d8cc4cf4886ceaec5599cf", "score": "0.58411694", "text": "public function actionCreate()\n {\n $model = new Url();\n\n # Значения по умолчанию\n $model->expected_response = '200';\n $model->user_id = Yii::$app->user->id;\n\n # Выпадающий список для user agents\n $userAgentsList = UserAgent::getUserAgentList();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'userAgentsList' => $userAgentsList,\n ]);\n }", "title": "" }, { "docid": "02d004fd9e0c4314b678fe21b52b6ffe", "score": "0.5840841", "text": "public function actionCreate()\n {\n $model = new Bill();\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": "21becf2f030f87f46f68311e8017d80c", "score": "0.5840139", "text": "public function actionCreate()\n\t{\n\t\t$model=new Repuesto;\n\t\t$tipo = new Tiporepuesto;\n\t\t$repuestos=new CActiveDataProvider('Repuesto',array( 'sort'=>array(\n 'defaultOrder'=>'id DESC',\n ),'criteria' => array(\n\t\t\t\t'condition' =>\"1\",\n\t\t\t\t)));\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Repuesto']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Repuesto'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'tipo'=>$tipo,\n\t\t\t'repuestos'=>$repuestos\n\t\t));\n\t}", "title": "" }, { "docid": "6b30ae052a747b651a313f158f0fd929", "score": "0.5836119", "text": "public function actionCreate()\n\t{\n\t\t$model=new Dashboard;\n\n\t\tif(isset($_POST['Dashboard']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Dashboard'];\n\t\t\t\n\t\t\tif($model->save()){\n\t\t\t\t$model->position = $model->id;\n\t\t\t\tif($model->save())\n\t\t\t\t\techo CJSON::encode('New portlet added');\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "b57354e64296891588c837e8a38ad82c", "score": "0.58340555", "text": "public function actionCreate()\n {\n if(Permiso::requerirRol('administrador')){\n $this->layout='/main2';\n }elseif(Permiso::requerirRol('gestor')){\n $this->layout='/main3';\n }\n $model = new Controlpago();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idControlpago]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "098dd23d278ce5fa00e061ef77797222", "score": "0.5832464", "text": "public function actionCreate()\n {\n $model=new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n // 'users'=>$users,\n ));\n }", "title": "" }, { "docid": "7b4359b700a7c51680bdb338c94d60f4", "score": "0.58317477", "text": "public function actionCreate()\n {\n $model = new Post();\n $model->create_at = $model->update_at = $model->reply_at = time();\n $model->user_id = User::getCurrentId();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if($model->point_id > 0) {\n $point = Point::findOne($model->point_id);\n $point->post_num += 1;\n $point->save();\n }\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'point' => Point::findOne(isset($_GET['point'])?$_GET['point']:'')\n ]);\n }\n }", "title": "" }, { "docid": "729449d06bca843b3153c6655f958cac", "score": "0.5829102", "text": "public function actionCreate()\n\t{\n\t\t$model=new User;\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['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "0dfa77a52c21bf432a89dafec30847e4", "score": "0.5827466", "text": "public function actionCreateXX()\n {\n $model = new PasienVisitation();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'NO_REGISTRATION' => $model->NO_REGISTRATION,'VISIT_ID' => $model->VISIT_ID]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "89f17e2fea50b8b9e08132cf512cfc0a", "score": "0.5827071", "text": "public function actionCreate()\n {\n $model = new Invoicesale();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->recid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "81d33417898f9422e7f6aff1beedd014", "score": "0.5824137", "text": "public function actionCreate()\n {\n $model = new Connection();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', '<button type=\"button\" class=\"btn btn-default modalButton\" value=\"/connection/view?id='.$model->id.'\"><i class=\"glyphicon glyphicon-eye-open\"></i></button> Creado correctamente!');\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n ], false, true);\n }\n }", "title": "" }, { "docid": "ec03e58a44895d16ef4503b8f18c31de", "score": "0.58239216", "text": "public function actionCreate()\n {\n $model = new PollingUnit();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uniqueid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "45f221d5c55baa36ff202e24debe58e0", "score": "0.58214", "text": "public function actionCreate()\n {\n $model = new Penjualan();\n if ($model->load(Yii::$app->request->post())) {\n $model->user_id = Yii::$app->user->identity->id;\n $model->save();\n //return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect(['penjualan-detail/create', 'id-jual' => $model->id]);\n } else {\n return $this->render(\n 'create',\n [\n 'model' => $model,\n ]\n );\n }\n }", "title": "" }, { "docid": "da6da1cc8dd5e66c0073b509f6a0ea5b", "score": "0.58193856", "text": "public function actionCreate()\n {\n $model = new Payment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "5598e2f5ff58e79d52f2981a37cdba7d", "score": "0.581868", "text": "public function actionDefaultcreate()\n {\n $model = new BlogComment();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" } ]
93066ea6bc60a7b43093ba3a6df1d9d1
Handle inncoming request to the application
[ { "docid": "505639398580a64ee07c15527a9b7f1e", "score": "0.0", "text": "public function handle(RequestInterface $request): ResponseInterface\n\t{\n\t\tif (extension_loaded('zlib') && $request->hasHeader('Accept-Encoding')) {\n\t\t\tif (substr_count($request->getHeaderLine('Accept-Encoding'), 'gzip')) {\n\t\t\t\tob_start('ob_gzhandler');\n\t\t\t}\n\t\t} else {\n\t\t\tob_start();\n\t\t}\n\n\t\tif ($this->app->isDevMode()) {\n\t\t\t$this->app['route']->resolveRegisteredRoute();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$middlewares = $this->createMiddlewareStages($this->getMiddlewares());\n\n\t\t\t$response = (new Pipeline())\n\t\t\t\t->send($request)\n\t\t\t\t->through($middlewares, self::HANDLER_METHOD)\n\t\t\t\t->then(function ($request) {\n\t\t\t\t\treturn $this->app->handle();\n\t\t\t\t})\n\t\t\t\t->execute();\n\n\t\t\treturn $response ?? $this->app['response'];\n\t\t} catch (Exception $ex) {\n\t\t\t$this->exceptionHandler->handle($ex);\n\t\t} catch (Throwable $ex) {\n\t\t\t$this->exceptionHandler->handle($ex);\n\t\t}\n\n\t\treturn $this->app['response'];\n\t}", "title": "" } ]
[ { "docid": "98b870f79aefe06ba02f2c1dcaef4fcd", "score": "0.72030413", "text": "function request_handle() {\r\n\t\tif (isset($_GET['btev_recent_event_rss'])) {\r\n\t\t\tif (isset($_GET['btev_access_key'])) {\r\n\t\t\t\t$this->recent_events_rss($_GET['btev_access_key']);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->recent_events_rss();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "632fb858b92bc3a330ced8f457d2bf2b", "score": "0.7174685", "text": "public function handleRequests()\n\t{\n\t\t$request = new Request;\n\n\t\tif ($this->option === 'com_ajax' && $this->helix === 'ultimate' && $this->request === 'task')\n\t\t{\n\t\t\t$request->initialize();\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "e57e14dc5a0220f4eb9d95a9ca0920f0", "score": "0.70884943", "text": "abstract public function process_request();", "title": "" }, { "docid": "b2ea4a8e9412fe1af222e4e141c8ccf9", "score": "0.7085423", "text": "public function processRequest();", "title": "" }, { "docid": "011df03024493ae71e23c63df68d99f0", "score": "0.7060717", "text": "public static function handleCurrentRequest() {\n\t\ttry {\n\t\t\tCliRoute::initialize();\n\t\t\tstatic::$mainRequest = static::generateFromEnvironment();\n\t\t\t$response = static::$mainRequest->process();\n\t\t} catch( Exception $e ) {\n\t\t\t$response = static::getDefaultController()->processException($e);\n\t\t}\n\t\t$response->process();\n\t\texit($response->getCode());\n\t}", "title": "" }, { "docid": "7f0095323cca4fccc65b22e8a0a7fcce", "score": "0.7043207", "text": "public function handleRequest() {\n //if we continue running after the prefilter has run\n if ($this->runPrefilters()) {\n //process the response\n $response = $this->processRequest();\n //cache the response\n $this->cacheResponse($response);\n //output the response\n echo $response;\n }\n }", "title": "" }, { "docid": "7fcad17ab6989d23baaf5567fe1fca64", "score": "0.69887227", "text": "public function handleRequest() {\n\t\t\t// Create the request very early so the Resource Management has a chance to grab it:\n\t\t$this->request = Request::createFromEnvironment();\n\t\t$this->response = new Response();\n\n\t\t$this->boot();\n\t\t$this->resolveDependencies();\n\t\t$this->request->injectSettings($this->settings);\n\n\t\t$this->router->setRoutesConfiguration($this->routesConfiguration);\n\t\t$actionRequest = $this->router->route($this->request);\n\t\t$this->securityContext->setRequest($actionRequest);\n\n\t\t$this->dispatcher->dispatch($actionRequest, $this->response);\n\n\t\t$this->response->makeStandardsCompliant($this->request);\n\t\t$this->attachToolbar($actionRequest);\n\t\t$this->response->send();\n\n\t\t$this->bootstrap->shutdown('Runtime');\n\t\t$this->exit->__invoke();\n\n\t\tDataStorage::save();\n\t}", "title": "" }, { "docid": "6616cc6b4fbe28c02b486921eb69f371", "score": "0.6912471", "text": "public function handleRequest() {\n\n Benchmark::log('handle request start');\n\n try {\n\n // Get the applicable route\n $this->router->route();\n $route = $this->router->getCurrentRoute();\n\n // Get the controller name\n $controllerName = $route['controller'];\n\n // Create the controller instance\n $controller = new $controllerName();\n\n // Get the action name\n $actionName = $route['action'];\n\n // Execute the requested action\n if(method_exists($controller, 'wrapper')) {\n\n Benchmark::log($controllerName . '::' . $actionName . ' started (with wrapper)');\n $controller->wrapper($actionName);\n\n } else {\n\n Benchmark::log($controllerName . '::' . $actionName . ' started');\n $controller->$actionName();\n\n }\n\n } catch(\\Error $error) {\n\n if(\n (!rf_request()->isAjax() && rf_config('options.debug'))\n || (rf_request()->isAjax() && rf_config('options.debug-ajax'))\n ) {\n\n echo 'Execution time: ' . (microtime(true) - APPLICATION_START) . 's';\n rf_debug_display();\n\n echo ErrorHandler::formatError($error);\n\n } elseif(rf_request()->isApi()) {\n\n throw new ErrorMessageException($error->getMessage());\n\n } else {\n\n die($error->getMessage());\n\n }\n\n }\n\n }", "title": "" }, { "docid": "c25b5bae386d46db7585494aa4354bdf", "score": "0.68837756", "text": "abstract protected function handleEventNotification(Request $request);", "title": "" }, { "docid": "836acb8019feca6290e25b521edaa0b0", "score": "0.6845767", "text": "protected function handle_request()\n {\n $controller = Routing\\Routes::recognize($this->request);\n $params = $this->request->path_parameters();\n \n if (!method_exists($controller, $params[':action'])) {\n throw new \\Misago\\Exception(\"No such action: \".get_class($controller).\"::{$params[':action']}\", 404);\n }\n if ($params[':action'] == 'process' or !is_callable(array($controller, $params[':action']))) {\n throw new \\Misago\\Exception(\"Tried to call a private/protected method as a public action: {$params[':action']}\", 400); \n }\n \n $controller->process($this->request, $this->response);\n $this->response->send();\n }", "title": "" }, { "docid": "2dabe800d3510f5e07adf8420b72cafc", "score": "0.6834178", "text": "protected function handleRequest(): void\n {\n if ($this->userInfo === null) {\n try {\n $this->logger->notice('Try to get user via Auth0 API');\n $this->userInfo = $this->auth0->getUser();\n } catch (\\Exception $exception) {\n $this->logger->critical($exception->getMessage());\n $this->auth0->deleteAllPersistentData();\n }\n }\n\n if ($this->action === self::ACTION_LOGOUT) {\n // Logout user from Auth0\n $this->logger->notice('Logout user.');\n $this->logoutFromAuth0();\n } elseif ($this->userInfo === null && $this->action === self::ACTION_LOGIN) {\n // Login user to Auth0\n $this->logger->notice('Handle backend login.');\n $this->auth0->login();\n }\n }", "title": "" }, { "docid": "cc05be98ce0dafffe2bd9163c1ffdebb", "score": "0.68297225", "text": "public function dispatchRequest()\n {\n // send response after request was dispatched\n }", "title": "" }, { "docid": "2e988e1e19540e87f20acb5abdf86b2d", "score": "0.6828535", "text": "abstract public function processRequest();", "title": "" }, { "docid": "dd4e04bf4bdfe6a6cb893080d6c3db7f", "score": "0.68000335", "text": "static function handle_request() {\n self::verify_user();\n $response;\n try {\n switch ($_SERVER['REQUEST_METHOD']) {\n case 'GET':\n $response = static::do_get();\n break;\n case 'POST':\n $body = self::get_body();\n $response = static::do_post($body);\n break;\n case 'PUT':\n $body = self::get_body();\n $response = static::do_put($body);\n break;\n case 'DELETE':\n $response = static::do_delete();\n break;\n default:\n http_response_code(405);\n $response = 'Method not supported';\n break;\n }\n } catch (\\Exception $e) {\n http_response_code(500);\n $response = $e->getMessage();\n } finally {\n $content_type = http_response_code() == 200 ? 'application/json' : 'text/plain';\n header(\"Content-Type: $content_type\");\n Logger::log_access();\n if (http_response_code() == 200 || DEBUG) {\n echo $response; \n }\n }\n }", "title": "" }, { "docid": "8e88e687cee7691fe7ef10b35259e0d3", "score": "0.6784152", "text": "public function handle($request);", "title": "" }, { "docid": "b4ba9f8711970174e022663d79110dc2", "score": "0.6765102", "text": "public function handleRequest() {\n if ($this->getRequest()) {\n return $this->request->handleRequest();\n }\n }", "title": "" }, { "docid": "d3366e4e858631914564b1fbb1cd8b46", "score": "0.6758802", "text": "public /*String*/ function handleRequest() {\n\n\t\tparent::handleRequest();\n\t\t\n\t\tswitch ($_GET['method']){\n\t\t\tcase 'show_all_validations':\n\t\t\t\t$this->search_all_validations();\n\t\t\t\tbreak;\n\t\t\tcase 'accept':\n\t\t\t\t$this->accept();\n\t\t\t\tbreak;\n\t\t\tcase 'refuse':\n\t\t\t\t$this->refuse();\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "b44e50ef46f64a8ce97c05e8d69fe5d5", "score": "0.6741463", "text": "public function handleRequest() {\r\n\t\t$variables = array();\r\n\t\t\r\n\t\tforeach ($_REQUEST as $key => $value) {\r\n\t\t\tif (StringUtil::indexOf($key, $this->getName().'_') !== false) {\r\n\t\t\t\t$key = StringUtil::replace($this->getName().'_', '', $key);\r\n\t\t\t\t$variables[$key] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($variables)) {\r\n\t\t\tforeach ($this->containers as $container) {\r\n\t\t\t\t$container->handleRequest($variables);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "64aa41394838be823ae375f19f0e0216", "score": "0.668455", "text": "public function handler(Request $request);", "title": "" }, { "docid": "33ceb0ab85cb144e59035c2f653782a6", "score": "0.6680717", "text": "public function handle(Request $request);", "title": "" }, { "docid": "3db922945b6ecda476265ea709096590", "score": "0.6646785", "text": "public function process(Request $request)\n {\n }", "title": "" }, { "docid": "b59f710b37176198ac119d94a8c84951", "score": "0.6638657", "text": "public function onRequest($event){}", "title": "" }, { "docid": "a0e36e6f348797bb65f6439806d309e3", "score": "0.66065717", "text": "public function process()\n {\n $routeResolver = $this->balcon->getRouteResolver();\n /** @var Page $entity */\n $entity = $routeResolver->getEntity();\n if ($this->requestCanBeHandled($entity)) {\n\n /* Register current resolver as response resolver */\n $this->balcon->setResponseResolver($this);\n $this->processCmsPage($entity);\n }\n }", "title": "" }, { "docid": "cc1295229fce9579950d53e7b1d78c80", "score": "0.6605184", "text": "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'updateMessage':\n $this->updateMessageDB();\n\t\t\t\tbreak;\n\n\t\t\tcase 'sendMessage':\n $this->sendMessage();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on user resource'));\n }\n }", "title": "" }, { "docid": "53e00781b9bb557245fb9a4aa51eee47", "score": "0.6587318", "text": "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get',\n 'message' => 'You should not be here',\n ]));\n }", "title": "" }, { "docid": "05bfc3f9187cd069871c0e5e34f7a20a", "score": "0.6577282", "text": "static function handle_request() {\n if ($_SERVER['REQUEST_METHOD'] != 'POST') {\n http_response_code(405);\n Logger::log_access();\n die();\n }\n try {\n $body = json_decode(self::get_body());\n \n if ($body && Session::login($body->username, $body->password)) {\n http_response_code(204);\n } else {\n http_response_code(401);\n }\n } catch (Exception $e) {\n http_response_code(500);\n } finally {\n Logger::log_access();\n }\n }", "title": "" }, { "docid": "68488cc4c03c8107cf682cb94573831b", "score": "0.6564584", "text": "public function request()\n {\n //\n }", "title": "" }, { "docid": "faac3cf5477818ed39c6566956dd6bd5", "score": "0.6551126", "text": "function dispatch()\n {\n try {\n $this->setAppRoot($this->getUrl());\n $response = $this->like('T_Response');\n $this->handleRequest($response);\n $response->send();\n } catch (T_Response $alt) {\n // check that previous response has been aborted.\n if (isset($response) && !$response->isAborted()) {\n $msg = 'Original response was never aborted.';\n throw new RuntimeException($msg);\n }\n // send alternative response\n $alt->send();\n }\n }", "title": "" }, { "docid": "6fd948cc15c422beacb8db706592f55a", "score": "0.6512578", "text": "function handle(Request $request)\n {\n $handler = $this->router->match($request);\n $handler();\n }", "title": "" }, { "docid": "e009780e0a5d15e94640a86c8d4eb77e", "score": "0.6505032", "text": "function handleRequest() {\n\n $this->parse = (api() ? P_JSON : P_FULL);\n\n $action = $this->getAction() . 'Action';\n if(!api()) {\n $this->prepareSiteTemplate();\n }\n\n if(method_exists($this, $action)) {\n $content = $this->$action();\n } else {\n $this->error(T('wrong url'));\n }\n \n if(!api()) {\n $content = $this->render($content);\n } \n\n return $content;\n }", "title": "" }, { "docid": "a84c7543e564f1aac6608bb9087b6b1c", "score": "0.65018266", "text": "public function process($request);", "title": "" }, { "docid": "6cd8f198f25ff73135380f10bd568296", "score": "0.64963", "text": "function cafet_listen_app_request()\n {\n if (cafet_is_app_request()) {\n error_reporting(-1);\n set_error_handler([Logger::class, 'errorHandler']);\n set_exception_handler([Logger::class, 'exceptionHandler']);\n \n try {\n new CafetApp();\n } catch (Exception $e) {\n Logger::throwError('01-003', $e->getMessage());\n }\n exit();\n }\n }", "title": "" }, { "docid": "e4f497f82887a5c9eff911f8351d56cb", "score": "0.6494791", "text": "public function preHandle(Request $request);", "title": "" }, { "docid": "18ade7f9ae562826cbc4ce0dbdca3e30", "score": "0.6492336", "text": "public function process() {\r\n $this->handleRequest();\r\n $this->setStaticFields();\r\n echo $this->genResponse();\r\n }", "title": "" }, { "docid": "01dcca5ff2149da5661a75e6ba93c5d6", "score": "0.6479752", "text": "public function handleEvent() {\n\n\t\t$this->attach('micro', function ($event, $app) {\n\t\t\tif ($event->getType() == 'beforeExecuteRoute') {\n\n\t\t\t\t// Need to refactor this\n\t\t\t\t$iRequestTime = $this->_msg->getTime();\n\t\t\t\t$data = $iRequestTime . $this->_msg->getId() . implode($this->_msg->getData());\n\t\t\t\t$serverHash = hash_hmac('sha256', $data, $this->_privateKey);\n\t\t\t\t$clientHash = $this->_msg->getHash();\n\t\t\t\t$allowed = $clientHash === $serverHash ?: false;\n\n\t\t\t\t$validTime = time() - $iRequestTime <= $this->_maxRequestDelay;\n\n\t\t\t\t$method = strtolower($app->router->getMatchedRoute()->getHttpMethods());\n\t\t\t\t$unAuthenticated = $app->getUnauthenticated();\n\n\t\t\t\tif (isset($unAuthenticated[$method])) {\n\t\t\t\t\t$unAuthenticated = array_flip($unAuthenticated[$method]);\n\n\t\t\t\t\tif (isset($unAuthenticated[$app->router->getMatchedRoute()->getPattern()])) {\n\t\t\t\t\t\t$allowed = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$validTime) {\n\t\t\t\t\t$allowed = false;\n\t\t\t\t}\n\n\t\t\t\tif (!$allowed) {\n\t\t\t\t\t$app->response->setStatusCode(401, \"Unauthorized\");\n\t\t\t\t\t$app->response->setContent(\"Access denied\");\n\t\t\t\t\t$app->response->send();\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "da9577c9fa2a34e9814b4e7c71fcfec1", "score": "0.6457157", "text": "public function process() {\r\n $this->handleRequest();\r\n echo $this->genResponse();\r\n }", "title": "" }, { "docid": "560534f5e502c3ac8a28768aa2580627", "score": "0.64318085", "text": "public function onRequest(Request $request);", "title": "" }, { "docid": "1a45b8a83c304c1270d3539036d8bd4a", "score": "0.6402598", "text": "function onRequest(Request $request, Response $response)\n {\n }", "title": "" }, { "docid": "3bdc471fc185a1a7e03bfb3a9f3bc366", "score": "0.6380881", "text": "private function _process()\n {\n $request = $this->dispatcher->get_request();\n $request->add_component_to_chain($this->component->get('midgardmvc_core'));\n\n // TODO: We give it to context to emulate legacy functionality\n $this->context->create($request);\n\n // Load the head helper\n $this->head = new midgardmvc_core_helpers_head();\n\n // Check authentication\n $this->authentication->check_session();\n\n // Disable cache for now\n $request->set_data_item('cache_enabled', false);\n\n $this->log('Midgard MVC', 'Serving ' . $request->get_method() . ' ' . $request->get_path() . ' at ' . gmdate('r'), 'info');\n\n // Let injectors do their work\n $this->component->inject($request, 'process');\n\n try\n {\n $this->dispatcher->dispatch($request);\n }\n catch (midgardmvc_exception_unauthorized $exception)\n {\n // Pass the exception to authentication handler\n $this->authentication->handle_exception($exception);\n }\n\n $this->dispatcher->header('Content-Type: ' . $request->get_data_item('mimetype'));\n\n return $request;\n }", "title": "" }, { "docid": "fe41ec34b5abfd3fbee35b1c7989f61c", "score": "0.6354947", "text": "public function handleRequest() {\r\n // Make sure the action parameter exists\r\n $action = $this->getFromBody('action');\r\n\r\n // Call the correct handler based on the action\r\n switch ($action) {\r\n\r\n case 'showParseInput':\r\n $this->handleParseInput();\r\n\r\n case 'uploadKitEnrollments':\r\n $this->handleCreateEnrollments();\r\n\r\n case 'updateHandoutKitEnrollments':\r\n $this->handleHandoutKitEnrollment();\r\n\r\n case 'createSingleKitEnrollment':\r\n $this->handleCreateSingleEnrollment();\r\n\r\n case 'makeEquipmentShown':\r\n $this->handleShowEquipment();\r\n\r\n case 'makeEquipmentArchive':\r\n $this->handleArchiveEquipment();\r\n\r\n case 'makeEquipmentPublic':\r\n $this->handleMakePublicEquipment();\r\n\r\n case 'defaultImageSelected':\r\n $this->handleDefaultImageSelected();\r\n\r\n default:\r\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on equipment resource'));\r\n }\r\n }", "title": "" }, { "docid": "c9b7ff614f88562fa0a636861b03d319", "score": "0.6332041", "text": "private function handle()\n {\n switch ($this->method) {\n case \"POST\":\n $this->post();\n break;\n default:\n $this->get();\n break;\n }\n }", "title": "" }, { "docid": "9d72e2eb7101fda6dca5a21f4bed9e07", "score": "0.63216215", "text": "public function handleRequest()\n\t{\n\t\tif ( !isset($_SESSION['loggedIn']) )\n\t\t{\n\t\t\t$c = new HomeController();\n\t\t\t$c->handleRequest();\n\t\t\treturn;\n\t\t}\n\n\t\t$user = unserialize($_SESSION['user']);\n\t\t$eID = $_GET['entry'];\n\n\t\t$action = isset($_GET['action']) ? $_GET['action'] : '';\n\n\t\tif ( $action == 'add' )\n\t\t{\n\t\t\t$_GET['uID'] = $user->uID;\n\t\t\tEntry::insert( $_GET );\n\t\t}\n\t\telse if ( $action == 'edit' )\n\t\t{\n\t\t\t$_GET['uID'] = $user->uID;\n\t\t\t$_GET['eID'] = $_GET['entry'];\n\t\t\tEntry::update( $_GET );\n\t\t}\n\t\telse if ( $action == 'drop' )\n\t\t{\n\t\t\tEntry::delete( array( 'uID' => $user->uID, 'eID' => $eID ) );\n\t\t\trender('_empty', array( 'eID' => $eID, 'msg' => 'OK' ));\n\t\t}\n\t\telse if ( $action == 'important' )\n\t\t{\n\t\t\tEntry::toggleImportant( array( 'uID' => $user->uID, 'eID' => $eID ) );\n\t\t\trender('_empty', array( 'eID' => $eID, 'msg' => 'OK' ));\n\t\t}\n\t\telse if ( $action == 'done' )\n\t\t{\n\t\t\tEntry::toggleDone( array( 'uID' => $user->uID, 'eID' => $eID ) );\n\t\t\trender('_empty', array( 'eID' => $eID, 'msg' => 'OK' ));\n\t\t}\n\t\telse\n\t\t\tthrow new Exception('Wrong action specified!');\n\t}", "title": "" }, { "docid": "a40d5b417e22cb012fa1cc1b2bb4200b", "score": "0.6306035", "text": "public function sniff_requests(){\n\t\tglobal $wp;\n\t\tif(isset($wp->query_vars['__api'])){\n\t\t\t$this->handle_request();\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "5a831c6a860c0ca7ed98f5b2d8f7d532", "score": "0.63044155", "text": "public function handle_http_request() {\n\t\ttry {\n\t\t\n\t\t\t$request = $this->http_request();\n\t\t\t$response = $request->execute();\n\t\t\t$response->send_headers()->send_body();\n\t\t\t\n\t\t}catch (\\Exception $e) {\n\t\t\t$this->handle_exception($e);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "cb078a219498b58c2f8c5363542bfda7", "score": "0.62966913", "text": "function afterRequest() {\n\t// start2 emergency solution\n\tif ($this->uri===\"/kcsapi/api_start2\" && !file_exists(\"start2.json\")) {\n\t\tfile_put_contents(\"start2.json\", json_encode($this->response));\n\t}\n\t// TODO\n\tif ($this->errno ==1 ) {\n\t\trequire_once 'KCViewer.class.php';\n\t\t$user = new KCUser();\n\t\t$user->initWithToken($this->post['api_token']);\n\t\t$this->viewer->afterRequest($this);\n\n\t\tKCLogger::request($this);\n\t\t$this->furnhack->afterRequest($this);\n\t}\n\n}", "title": "" }, { "docid": "0ecfe81892043686e7a5a6d8715376a4", "score": "0.6290693", "text": "public function onRequest($request, $response)\n {\n }", "title": "" }, { "docid": "6f039e98829f05f0427b7f9c35018a7f", "score": "0.62713695", "text": "protected function postDispatch() {}", "title": "" }, { "docid": "e0aa5227f33bc348cdc10c2f20e214e9", "score": "0.62386817", "text": "public function handle(Request $request, $type = self::MASTER_REQUEST);", "title": "" }, { "docid": "d1474d29073d2e22ed1de133478c8c60", "score": "0.62367696", "text": "public function handle() {}", "title": "" }, { "docid": "d1b2a9c68eb3adf21eca41ab3ee251f0", "score": "0.6228629", "text": "abstract public function request();", "title": "" }, { "docid": "92e7da08a04f7167a192f608571ddc61", "score": "0.622132", "text": "public function handle( RequestInterface $request );", "title": "" }, { "docid": "85560ea1e7b8836a124d2c8819ee51a8", "score": "0.6214022", "text": "private function preHandle(): void\n {\n $this->logServerMetrics('before handling request');\n\n // Reset Kernel startTime, so Symfony can correctly calculate the execution time\n $this->kernel->resetStartTime();\n\n $container = $this->kernel->getContainer();\n\n if ($container->has('doctrine.orm.entity_manager')) {\n $connection = $container->get('doctrine.orm.entity_manager')->getConnection();\n if (!$connection->ping()) {\n $connection->close();\n $connection->connect();\n }\n }\n }", "title": "" }, { "docid": "5627dd03acc956841b9d8fb5011377c1", "score": "0.6199268", "text": "public function handle() {\n\t\t\n\t\tif(in_array( $this->http_method, self::$verbs)){\n\t\t\t$this->dispatch();\n\t\t}else {\n\t\t\terror_405();\n\t\t}\n\t}", "title": "" }, { "docid": "0b390464c8a95760d0919c27ff7ec606", "score": "0.61865085", "text": "protected function requestHandler($request)\n {\n \tif ($request->method == 'POST'){\n $email = json_decode($request->post_data, true);\n $email = $email[0]['email'];\n\n $foundUser = false;\n\n if(filter_var($email, FILTER_VALIDATE_EMAIL)) { //check if email is valid\n $records = $this->userDB->read();\n foreach($records as $key => $val)\n {\n\n if(trim($email) == $val['email']) //if user email is found render response as JSON \n {\n $this->render($val);\n $foundUser = true;\n break;\n }\n }\n if(!$foundUser)\n {\n graceful404('Invalid Email Address');\n }\n \n }\n else {\n graceful404('Invalid Email Address');\n }\n\n \t}else{\n graceful404('Method type is not supported');\n }\n }", "title": "" }, { "docid": "560c53126ac8dffde214813ff326e3e5", "score": "0.6183862", "text": "function handleRequest($response)\n {\n $next = $this->findNext($response);\n if ($next===false) {\n $this->execute($response);\n } else {\n $next->handleRequest($response);\n }\n }", "title": "" }, { "docid": "e42ec16cde30e8eb1545307101dcdbf0", "score": "0.61677736", "text": "abstract public function handler();", "title": "" }, { "docid": "0e6624893de518c4243c9c0e35795c13", "score": "0.61654955", "text": "public function processRequest()\n {\n $this->processIncomingFormData();\n }", "title": "" }, { "docid": "9cf8a1e98d8523ee51efd422480701e4", "score": "0.6159136", "text": "function process($app){\n $request = $_SERVER['REQUEST_METHOD'];\n switch($request){\n case \"GET\":\n //Ensures no matter what we have a default for offsets and limits\n $offset = isset($_GET['offset']) ? $_GET['offset']: 0;\n $limit = isset($_GET['limit']) ? $_GET['limit']: 100;\n $response = $app->get( intval($offset), intval($limit) );\n break;\n case \"POST\":\n //posts data already has validations\n $response = $app->store($_POST);\n break;\n default:\n $response = json_encode(['status'=>'false']);\n break;\n }\n return $response;\n}", "title": "" }, { "docid": "e96570e96ad8d22cad8e6dcc35583545", "score": "0.61507624", "text": "public function handleRequest()\n {\n /** @var ResponseInterface $response */\n $response = $this->getMock(ResponseInterface::class);\n $middleware = new UrlRewrite();\n $middleware->setNext(new MiddlewareMock());\n $_GET['url'] = '/blog/2/edit';\n $request = new Request();\n $request = $request->withUri(\n new Uri('http://example.com/?url=/blog/2/edit')\n );\n $middleware->handle($request, $response);\n }", "title": "" }, { "docid": "768f34140e9062114336fef11c98730d", "score": "0.6149791", "text": "function __invoke() {\n Signal::connect('php.fatal', array($this, '__onShutdown'));\n Signal::connect('php.exception', array($this, '__onUnhandledException'));\n\n $this->loadMiddleware();\n\n Signal::send('request.start', $this);\n try {\n $request = $this->getRequest();\n $response = $this->getResponse($request);\n $response = $this->processResponse($request, $response);\n }\n catch (UnicodeException $ex) {\n $response = new HttpResponseBadRequest();\n }\n catch (HttpException $ex) {\n $response = $ex->getResponse($request);\n }\n catch (\\Exception $ex) {\n // TODO: Handle unhandled exception here\n return $this->middleware->reverse()->processException($request, $ex);\n }\n\n if ($response) {\n $response->setHandler($this);\n return $response->output($request);\n }\n }", "title": "" }, { "docid": "6f3b09b73dda23f4296c5bbc903bb800", "score": "0.6149201", "text": "function handleGETRequest() {\r\n if (connectToDB()) {\r\n if (array_key_exists('countTuples', $_GET)) {\r\n handleCountRequest();\r\n } else if (array_key_exists('displayCustomer', $_GET)) {\r\n handleDisplayCustomerRequest();\r\n } else if (array_key_exists('selectQuery', $_GET)) {\r\n handleSelectRequest();\r\n } else if (array_key_exists('projectQuery', $_GET)) {\r\n handleProjectRequest();\r\n } else if (array_key_exists('joinQuery', $_GET)) {\r\n handleJoinRequest();\r\n } else if (array_key_exists('groupByQuery', $_GET)) {\r\n handleGroupByRequest();\r\n } else if (array_key_exists('displayMakeOrders', $_GET)) {\r\n handlePrintMakeOrdersRequest();\r\n } else if (array_key_exists('havingQuery', $_GET)) {\r\n handleHavingRequest();\r\n } else if (array_key_exists('nestedQuery', $_GET)) {\r\n handleNestedRequest();\r\n } else if (array_key_exists('divisionQuery', $_GET)) {\r\n handleDivisionRequest();\r\n } else if (array_key_exists('displayReserves', $_GET)) {\r\n handlePrintReservesRequest();\r\n } else if (array_key_exists('displayFoodOrder', $_GET)) {\r\n handlePrintFoodOrderRequest();\r\n }\r\n\r\n disconnectFromDB();\r\n }\r\n }", "title": "" }, { "docid": "0d29e018102e72c6bb8efd95c8f9abeb", "score": "0.61344945", "text": "protected function afterHandleRequest()\n {\n //Pop the current controller from the stack\n $this->popCurrent();\n }", "title": "" }, { "docid": "721d3bdc2e2de13190e14b73e1e2e8bf", "score": "0.61223626", "text": "abstract protected function handleRequest(RequestInterface $request);", "title": "" }, { "docid": "d4d5d62664dc0118bafecbbb4a08e75f", "score": "0.61088645", "text": "public function handle(\\Exception $e, Request $request);", "title": "" }, { "docid": "c02f696e334b815ce18dd5204e5797f4", "score": "0.6102305", "text": "public function onEnlightControllerFrontPostDispatch(Enlight_Event_EventArgs $args) {\n\t\tif (in_array($args->getSubject()->Response()->getHttpResponseCode(),array( 404, 500 ))){\n\t\t\t$this->handleError($args->getSubject()->Request());\n\t\t}\n\t}", "title": "" }, { "docid": "10912cbfc4c0351b3ac2ea306d4b7348", "score": "0.60974836", "text": "protected function handleDispatch()\n {\n self::callPluginAction('beforeDispatch', array($this->_request));\n\n // Load controller class\n $this->_autoloader->loadControllerClass($this->_request->getControllerName());\n\n // Make the actual dispatch\n $this->_router->dispatch($this->_request, $this->_response);\n }", "title": "" }, { "docid": "0bd902ef135a92ebd2e63bf3da781c49", "score": "0.6094527", "text": "static public function handleRequest()\n\t{\n\t\t// resolve URL in root\n\t\t$resolvedNode = false;\n\t\t$rootNode = static::getRootCollection('site-root');\n\n\t\t// handle root request - default page\n\t\tif(empty(static::$pathStack[0]) && static::$defaultPage)\n\t\t{\n\t\t\tstatic::$pathStack[0] = static::$defaultPage;\n\t\t}\n\t\t\n\t\t// route request\n\t\tif(static::$pathStack[0] == 'emergence')\n\t\t{\n\t\t\tarray_shift(static::$pathStack);\n\t\t\treturn Emergence::handleRequest();\n\t\t}\n\t\telseif(static::$pathStack[0] == 'parent-refresh' && $_REQUEST['key'] == static::$controlKey)\n\t\t{\n\t\t\tDB::nonQuery(\n\t\t\t\t'DELETE FROM `%s` WHERE CollectionID IN (SELECT ID FROM `%s` WHERE SiteID != %u)'\n\t\t\t\t,array(\n\t\t\t\t\tSiteFile::$tableName\n\t\t\t\t\t,SiteCollection::$tableName\n\t\t\t\t\t,Site::getSiteID()\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tdie('Cleared '.DB::affectedRows().' cached files');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resolvedNode = $rootNode;\n\t\t\t$resolvedPath = array();\n\n\t\t\twhile(($handle = array_shift(static::$pathStack)))\n\t\t\t{\n\t\t\t\t$scriptHandle = (substr($handle,-4)=='.php') ? $handle : $handle.'.php';\n\n\t\t\t\t//printf('%s: (%s)/(%s) - %s<br>', $resolvedNode->Handle, $handle, implode('/',static::$pathStack), $scriptHandle);\n\t\t\t\tif(\n\t\t\t\t\t(\n\t\t\t\t\t\t$resolvedNode\n\t\t\t\t\t\t&& method_exists($resolvedNode, 'getChild')\n\t\t\t\t\t\t&& (\n\t\t\t\t\t\t\t($childNode = $resolvedNode->getChild($handle))\n\t\t\t\t\t\t\t|| ($scriptHandle && $childNode = $resolvedNode->getChild($scriptHandle))\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t|| ($childNode = Emergence::resolveFileFromParent('site-root', array_merge($resolvedPath,array($handle))))\n\t\t\t\t\t|| ($scriptHandle && $childNode = Emergence::resolveFileFromParent('site-root', array_merge($resolvedPath,array($scriptHandle))))\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$resolvedNode = $childNode;\n\t\t\t\t\t\n\t\t\t\t\tif(is_a($resolvedNode, 'SiteFile'))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\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$resolvedNode = false;\n\t\t\t\t\t//break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$resolvedPath[] = $handle;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tif($resolvedNode)\n\t\t{\n\t\t\t// create session\n\t\t\tif(static::$autoCreateSession && $resolvedNode->MIMEType == 'application/php')\n\t\t\t{\n\t\t\t\t$GLOBALS['Session'] = UserSession::getFromRequest();\n\t\t\t}\n\n\t\t\tif(is_callable(static::$onRequestMapped))\n\t\t\t{\n\t\t\t\tcall_user_func(static::$onRequestMapped, $resolvedNode);\n\t\t\t}\n\n\t\t\tif($resolvedNode->MIMEType == 'application/php')\n\t\t\t{\n\t\t\t\trequire($resolvedNode->RealPath);\n\t\t\t\texit();\n\t\t\t}\n\t\t\telseif(!is_callable(array($resolvedNode, 'outputAsResponse')))\n\t\t\t{\n\t\t\t\t//throw new Exception('Node does not support rendering');\n\t\t\t\tstatic::respondNotFound();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$resolvedNode->outputAsResponse();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstatic::respondNotFound();\n\t\t}\n\t}", "title": "" }, { "docid": "32598281a42c1c8e305ff66ada3a3ae7", "score": "0.6093711", "text": "public abstract function dispatch(HttpRequest $request);", "title": "" }, { "docid": "bce1421ee931ceab21c0c0c84cc7ba9a", "score": "0.6085391", "text": "public function handleInputRequest() : void;", "title": "" }, { "docid": "3fb914dea5879a75de3e19a9fa404895", "score": "0.60812896", "text": "function request() {\n\tif ($this->req_type === \"REQUEST\") {\n\t\t$this->forwardRequest();\n\t} else if ($this->req_type === \"REWRITE\") {\n\t\t// TODO: Link with local server\n\t}\n}", "title": "" }, { "docid": "c4bd0da13a47554115c297c9de61b156", "score": "0.60742205", "text": "public function handleQuery(HTTPRequest $request);", "title": "" }, { "docid": "4115192d987530b3f367d77462d3f2f8", "score": "0.6064543", "text": "final public function markRequestAsHandled()\n {\n $this->isHandled = true;\n }", "title": "" }, { "docid": "712354d43d964cf2e08449a89e1921f8", "score": "0.60637724", "text": "abstract public function processRequest($request, $response);", "title": "" }, { "docid": "a6b6210a13d2414f5492487dd6753387", "score": "0.6060307", "text": "function routeRequest() {\n $this->setResponse(['error'=> 'resource not found'], 404);\n }", "title": "" }, { "docid": "d307678f53f4b91d9e7e76ea7178d122", "score": "0.6056858", "text": "public function beforeRequest() {}", "title": "" }, { "docid": "ac611feb636cd3251fc4a3fa663dd0da", "score": "0.6051588", "text": "public function handle()\n {\n $_category = Category::where('status', 1)->get();\n\n if ($_category && env('GUESS_REQUEST_ORIGIN'))\n {\n foreach ($_category as $_cates)\n {\n $_reptile = new Reptile($_cates->url, 'GET');\n $_events = $_reptile->request();\n $this->handelDatas($_events);\n }\n\n return;\n }\n\n $_filePath = storage_path('logs') . '\\json.json';\n $_dataJson = file_get_contents($_filePath);\n $this->handelDatas(json_decode($_dataJson, true));\n\n return;\n }", "title": "" }, { "docid": "b5d4426d8b9a7df6ee7ac91e10e2615f", "score": "0.6051166", "text": "public function handleRequest()\n {\n $str = preg_replace(\"'/'\", \"\", $_SERVER['REQUEST_URI'], 1);\n $dele = explode(\"/\", $str);\n\n // Check syntax for request\n if ((string)$dele[0] != 'job') {\n throw new RequestException('Syntax for JAKOB request not valid');\n }\n\n // Extract job id\n $tmp = (string)$dele[1];\n\n if (ctype_alnum($tmp) && (strlen($tmp) <= 100)) {\n $this->_jobid = $tmp;\n } else {\n throw new RequestException('Jobid \"' . $tmp . '\" do not have the correct form');\n }\n\n // Get request method\n $request_method = strtolower($_SERVER['REQUEST_METHOD']); \n\n $data = array(); \n\n switch ($request_method) { \n case 'get': \n $data = $_GET; \n break; \n case 'post': \n default:\n $data = $_POST; \n } \n\n // Validate signature on request\n if (!isset($data['consumerkey'])) {\n throw new RequestException('Consumer key not set on request');\n }\n \n if (!isset($data['signature'])) {\n throw new RequestException('Signature not set on request');\n }\n\n try {\n $consumer = new \\WAYF\\Consumer($this->_config);\n $consumer->consumerkey = $data['consumerkey'];\n $consumer->load();\n $this->_consumer = $data['consumerkey'];\n } catch(\\WAYF\\ConsumerException $e) {\n throw new RequestException($e->getMessage());\n }\n\n $signparams = $data;\n unset($signparams['consumerkey']);\n unset($signparams['signature']);\n\n $signer = new \\WAYF\\Security\\Signer\\GetRequestSigner();\n $signer->setUp($consumer->consumersecret, $signparams);\n\n if (!$signer->validate($data['signature'])) {\n throw new RequestException('Signature on request is not valid');\n }\n\n // Grab the attributes\n $this->_attributes = (isset($data['attributes']) && !empty($data['attributes'])) ? json_decode($data['attributes'], true) : array(); \n if ((json_last_error() != JSON_ERROR_NONE ) && is_null($this->_attributes)) {\n throw new RequestException('Attributes - ' . JsonHelper::errornoToString(json_last_error()));\n }\n // Transform attributes to internal format\n $this->_attributes = array_map(\n function ($val) {\n $return = array();\n foreach ($val AS $attr) {\n $return[] = array('value' => $attr);\n }\n return $return;\n }, \n $this->_attributes\n );\n \n // Grab return URL parameter\n if (!isset($data['returnURL']) || !($this->_returnURL = urldecode($data['returnURL']))) {\n throw new RequestException('No return URL found');\n }\n /*\n * FILTER_VALIDATE_URL has a bug. Fixed in PHP > 5.3.2\n if (!filter_var($this->_returnURL, FILTER_VALIDATE_URL)) {\n throw new RequestException('Supplied return URL is not valid');\n }\n */\n // Grab optional return parameters\n $this->_returnParams = (isset($data['returnParams']) && !empty($data['returnParams'])) ? json_decode($data['returnParams'], true) : array();\n if ((json_last_error() != JSON_ERROR_NONE ) && is_null($this->_returnParams)) {\n throw new RequestException('Return parameters - ' . JsonHelper::errornoToString(json_last_error()));\n }\n \n // Grab optional silence parameters\n $this->_silence = isset($data['silence']);\n\n // Get return method\n $this->_returnMethod = isset($data['returnMethod']) ? $data['returnMethod'] : 'post'; \n\n /* \n $this->_options = (isset($data['options']) && !empty($data['options'])) ? json_decode($data['options'], true) : array();\n if ((json_last_error() != JSON_ERROR_NONE ) && is_null($this->_options)) {\n throw new RequestException('Options - ' . JsonHelper::errornoToString(json_last_error()));\n }\n */\n\n return $this; \n }", "title": "" }, { "docid": "2a30946d50a485dd8dbb019903a3c224", "score": "0.60398185", "text": "function handleSearchRequest() {\n if (connectToDB()) {\n if (array_key_exists('searchRequest', $_POST)) {\n searchInRequest();\n } else if (array_key_exists('reserve', $_POST)) {\n insertReserveRequest();\n }\n disconnectFromDB();\n }\n}", "title": "" }, { "docid": "e76a8cd24fad51dec93bf99f3c28a37a", "score": "0.6031343", "text": "public function onRequest($request, $response) {\n\t\tMetrodi_Container::$container = NULL;\n\t\t$this->container = Metrodi_Container::getContainer();\n\t\t$this->container->didef('request', $request);\n\t\t$this->kernel->serviceList = array();\n\t\t$this->kernel->cycleStack = array();\n\t\t$this->kernel->container = $this->container;\n\t\t_didef('kernel', $this->kernel);\n\t\t_didef('container', $this->container);\n\n\t\tif(!include('etc/bootstrap.php')) {\n\t\t\techo \"no bootstrap\\n\";\n\t\t\t$this->container = NULL;\n\t\t\treturn;\n\t\t}\n\t\t_didef('request', $request);\n\t\t_clearHandlers('analyze');\n\t\t_connect('analyze', 'metrofw/router.php::autoRoute', 3);\n\n\t\ttry {\n\t\t\t$this->kernel->_runLifecycle('analyze');\n\t\t\t$this->kernel->_runLifecycle('resources');\n//\t\t\t$this->kernel->_runLifecycle('authenticate');\n//\t\t\t$this->kernel->_runLifecycle('authorize');\n\t\t\t$this->kernel->_runLifecycle('process');\n//\t\t\t$this->kernel->_runLifecycle('output');\n\t\t\t$x = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\techo $x;\n//\t\t\t$this->kernel->_runLifecycle('hangup');\n\t\t} catch (Exception $e) {\n//\t\t\tob_end_clean();\n\t\t}\n\n\t\t/*\n\t\t$rsp = _make('response');\n\t\t$response->writeHead($rsp->get('statusCode'), ['Content-type'=>'text/html']);\n\t\t$response->write($x);\n\t\t$response->end();\n\t\t */\n\n\t\t$this->container = NULL;\n\n\t\t_didef('container', $this->container);\n\t}", "title": "" }, { "docid": "18cf10db353a67c030608f9fd01235b7", "score": "0.6028975", "text": "public function handleRequest() {\n if($_SERVER[\"REQUEST_METHOD\"] == \"GET\"){\n $method = isset($_GET['method'])?$_GET['method']:NULL;\n \n if ( $method=='register' ) {\n $this->register();\n } \n elseif ( $method == 'login' ) {\n $this->login();\n } else {\n $this->showError(\"Page not found\", \"Page for operation \".$method.\" was not found!\");\n }\n }\n if($_SERVER[\"REQUEST_METHOD\"] == \"POST\"){\n $postmethod = isset($_POST['method'])?$_POST['method']:NULL;\n \n // echo \"raveen4\";\n if ($postmethod=='doregister')\n {\n // echo 'rave';\n $this->postregistraction();\n }\n elseif ($postmethod=='dologin') {\n \n $this->login1();\n }\n \n \n }\n }", "title": "" }, { "docid": "659ced5277962a2d3226f1f7b869025e", "score": "0.6017877", "text": "public function onRequest(HookContext $hc);", "title": "" }, { "docid": "3e2667b762ed9c3e1242a44a26e37d87", "score": "0.601128", "text": "public function run()\n {\n $this->signal->send($this, 'beginRequest', $this);\n register_shutdown_function([$this, 'end'], 0, false);\n $this->processRequest();\n $this->signal->send($this, 'endRequest', $this);\n }", "title": "" }, { "docid": "e974cfaf538f44303530aa044e14d949", "score": "0.6005619", "text": "public function handler()\n {\n }", "title": "" }, { "docid": "ba75f2e4669907abfb4e24aa76b860c8", "score": "0.6001713", "text": "public function handler();", "title": "" }, { "docid": "11fbf33def9c19c8fe4e59d76801345e", "score": "0.60013926", "text": "public function filter_request();", "title": "" }, { "docid": "0732d807714f2f3e2d96c80557197480", "score": "0.60010344", "text": "private function run()\n {\n $request = self::getComponent('request');\n $config = self::getComponent('config');\n $dispatcher = $this->getDispatcher($config->getSection('routes'));\n $routeInfo = $dispatcher->dispatch($request->get('method'), $request->get('path'));\n\n switch ($routeInfo[0]) {\n case \\FastRoute\\Dispatcher::NOT_FOUND:\n $this->errorNotFound();\n break;\n case \\FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n $this->error405();\n break;\n case \\FastRoute\\Dispatcher::FOUND:\n $this->handleAction($routeInfo);\n break;\n }\n }", "title": "" }, { "docid": "4878778fda0ec825171b28dcacc4cea3", "score": "0.59727657", "text": "public function handle(){\r\n\t\tif(substr($_SERVER['QUERY_STRING'], -4) == 'wsdl'){\r\n\t\t\t$this->showWSDL();\r\n\t\t}elseif(isset($GLOBALS['HTTP_RAW_POST_DATA']) && strlen($GLOBALS['HTTP_RAW_POST_DATA']) > 0){\r\n\t\t\t//debug($GLOBALS['HTTP_RAW_POST_DATA']);\r\n\t\t\t$this->handleRequest();\r\n\t\t}else{\r\n\t\t\t$this->createDocumentation();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c9c8c742329951f314737ef6330cac00", "score": "0.59648037", "text": "public function handle(): Response;", "title": "" }, { "docid": "8a3f51cedb83370dc8a266d4e4aee71d", "score": "0.59551793", "text": "public function handle($request)\n {\n $this->bootstrap();\n $this->setRouter(); //注册路由\n\n return $this->router->dispatch($request);\n }", "title": "" }, { "docid": "cee5b8044c6dee54d67717b01a89732e", "score": "0.59396034", "text": "public function execute()\n {\n switch ($_SERVER[\"REQUEST_METHOD\"]) {\n case \"POST\":\n $this->handlePostRequest();\n break;\n }\n }", "title": "" }, { "docid": "f9612396fd7073979f88d4b504b04ea1", "score": "0.59380025", "text": "public static function run() {\n $requestMethod = self::getRequestMethod();\n if (isset(self::$routes[$requestMethod])) {\n self::routeHandler(self::$routes[$requestMethod]);\n }\n }", "title": "" }, { "docid": "15c33f54eab4d11f9398e331270a995f", "score": "0.59373724", "text": "public function handleRequest($request)\n {\n// list ($route, $params) = $request->resolve();\n// $this->requestedRoute = $route;\n// $result = $this->runAction($route, $params);\n\n if (empty($this->catchAll)) {\n list ($route, $params) = $request->resolve();\n } else {\n $route = $this->catchAll[0];\n $params = $this->catchAll;\n unset($params[0]);\n }\n try {\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n if ($result instanceof Response) {\n return $result;\n } else {\n $response = $this->getResponse();\n if ($result !== null) {\n $response->data = $result;\n }\n\n return $response;\n }\n\n } catch ( InvalidCallException $e) {\n throw new NotFoundHttpException('Page not found', $e->getCode(), $e);\n }\n }", "title": "" }, { "docid": "67ba82f4f7923c379d94feda86e3eb8f", "score": "0.5936104", "text": "protected function handleRequest() {\n $route = Util::getRoute();\n \n if (empty($route)) {\n // no route at all, use default page\n $controller = new IndexController();\n \n } elseif ($route[0] === \"ajax\") {\n // ajax request route\n try {\n $controllerClasses = explode(',', $_POST['controller']);\n foreach ($controllerClasses as $controllerClass) {\n if ($controllerClass == 'TemplateEngine') {\n AjaxUtil::queueReply('tpl',\n self::$templateEngine->fetch($_POST['tpl'])\n );\n } elseif (class_exists($controllerClass)\n && is_subclass_of($controllerClass, 'AjaxController')) {\n $controller = new $controllerClass();\n $controller->handleAjaxRequest();\n } else {\n throw new RequestException(\"'\" . $controllerClass . \"' is not an AjaxController\");\n }\n }\n AjaxUtil::sendReply();\n return;\n } catch (RequestException $re) {\n // don't respond to bad ajax requests\n if (DEBUG_MODE) throw $re;\n exit;\n }\n \n } else {\n // regular request route\n $controllerClass = ucfirst($route[0] . 'Controller');\n if (class_exists($controllerClass)\n && is_subclass_of($controllerClass, 'RequestController')) {\n array_shift($route);\n $controller = new $controllerClass();\n \n } elseif (Game::hashPatternMatch($route[0])) {\n // special feature: shorter urls for Games\n $controller = new GameController();\n }\n \n }\n self::getTemplateEngine()->registerDefaultScripts();\n if (!isset($controller)) throw new NotFoundException('no controller specified');\n $controller->handleRequest($route);\n }", "title": "" }, { "docid": "d5cd4b10100063d48f300ca2863b8edc", "score": "0.5934972", "text": "public function doRequest();", "title": "" }, { "docid": "dcbbbea484c51f5644104fd09758b543", "score": "0.5933431", "text": "abstract protected function getRequestHandler();", "title": "" }, { "docid": "ae669afa59523f3290c04646c91ab05e", "score": "0.59296435", "text": "public function processApi(){\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\r\n\t\t\t//echo \"Important func call \".$func;\r\n //echo \"<br>\";\r\n if((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "e89721d4fbe01a7d7b896e31237370fc", "score": "0.5929008", "text": "public function boot(){\n parent::boot();\n\n $request = Request::createFromGlobals();\n $this->_router->route($request);\n\n //TODO: move Dispatch events to ControllerDispatcherEvent\n $this->_eventDispatcher->dispatch(KernelEvent::PRE_DISPATCH, new KernelEvent($request, null));\n $response = $this->_controllerDispatcher->dispatch($request);\n $this->_eventDispatcher->dispatch(KernelEvent::POST_DISPATCH, new KernelEvent($request, $response));\n $response->send();\n }", "title": "" }, { "docid": "9010f5719b50c737f426bda0a77affab", "score": "0.5924217", "text": "public function request();", "title": "" }, { "docid": "0076796697fcfffd1103fbea5d979c74", "score": "0.5924075", "text": "private function handleRequest() {\n\t\t\t$details = $this->getControllerAndMethod();\n\t\t\t$controller_class = $details['controller'] . 'Controller';\n\t\t\t$view_class = $details['controller'] . 'View';\n\t\t\t$controller_method = $details['method'];\n\n\t\t\t// Check if the page is available in the cache\n\t\t\t$found_cached_page = $this->checkCache();\n\t\t\tif($found_cached_page == true)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tif(class_exists($controller_class)) {\n\t\t\t\tif(method_exists($controller_class, $controller_method)) {\n\t\t\t\t\tif(class_exists($view_class)) {\n\t\t\t\t\t\tif(method_exists($view_class, $controller_method)) {\n\t\t\t\t\t\t\t// Everything is perfect, create the controller and view classes\n\t\t\t\t\t\t\t$controller = new $controller_class;\n\t\t\t\t\t\t\t$view = new $view_class;\n\n\t\t\t\t\t\t\t// Set the generatrix value in both controller and view so that they can use the other components\n\t\t\t\t\t\t\t$controller->setGeneratrix($this);\n\t\t\t\t\t\t\t$controller->setView($view);\n\t\t\t\t\t\t\t$view->setGeneratrix($this);\n\n\t\t\t\t\t\t\t// Execute the controller\n\t\t\t\t\t\t\t$controller->$controller_method();\n\n\t\t\t\t\t\t\t$final_page = '';\n\t\t\t\t\t\t\t// If the page is running via CLI (Comman Line Interface) don't show the DTD\n\t\t\t\t\t\t\tif(!$this->cli->isEnabled() && $controller->isHtml())\n\t\t\t\t\t\t\t\t$final_page = addDTD(DTD_TYPE);\n\t\t\t\t\t\t\t// Create the header etc\n\t\t\t\t\t\t\t$view->startPage();\n\t\t\t\t\t\t\t// Get the final page to be displayed\n\t\t\t\t\t\t\tif(version_compare(PHP_VERSION, '5.2.0') >= 0) {\n\t\t\t\t\t\t\t\t$final_page .= $view->$controller_method();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$html_object = $view->$controller_method();\n\t\t\t\t\t\t\t\tif ( is_object ( $html_object ) ) {\n\t\t\t\t\t\t\t\t\t$final_page .= $html_object->_toString();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo $final_page;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdisplay_404('The method <strong>\"'. $controller_method . '\"</strong> in class <strong>\"'. $view_class .'\"</strong> does not exist');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisplay_404('The class <strong>\"'. $view_class . '\"</strong> does not exist');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdisplay_404('The method <strong>\"'. $controller_method . '\"</strong> in class <strong>\"'. $controller_class .'\"</strong> does not exist');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//if(!$this->handleCatchAllRequest())\n\t\t\t\t\tdisplay_404('The class <strong>\"' . $controller_class .'\"</strong> does not exist');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c06bbd2eaa084099dfc4a327c59e5b20", "score": "0.591345", "text": "public function dispatch(Customweb_Core_Http_IRequest $request);", "title": "" }, { "docid": "e31b159bcf43f6aff1ab1f6bd448bd21", "score": "0.5905598", "text": "public function run()\n {\n return $this->router->handleRequest();\n }", "title": "" } ]
e3682081e0e11e009015ebe8cbb6b8de
Change entity before store in the database
[ { "docid": "7190fa498993e5125d83fcf4819a97f1", "score": "0.0", "text": "public function preFlush(PreFlushEventArgs $args)\n {\n $em = $args->getEntityManager();\n $uow = $em->getUnitOfWork();\n $requestStack = $this->container->get('request_stack');\n $currentRequest = $requestStack->getCurrentRequest();\n }", "title": "" } ]
[ { "docid": "3a154f821d65abae65d2a2997307d370", "score": "0.7509748", "text": "protected abstract function setEntity(): void;", "title": "" }, { "docid": "02e094b0b08d9e624acd4e3ce0bb5f4f", "score": "0.72796303", "text": "public function storeEntity();", "title": "" }, { "docid": "0f71b9549020e3b062a25dc3660a35e9", "score": "0.7183056", "text": "public function markAsPersisted();", "title": "" }, { "docid": "3f5bdc7f560818a743e511a9182816ab", "score": "0.70274407", "text": "public function setEntity($entity);", "title": "" }, { "docid": "6bae71b1b55cece7bf6fef2b05e2a999", "score": "0.70002395", "text": "public function save($entity);", "title": "" }, { "docid": "bc02d9f1cf4c8782d73672740405c2ec", "score": "0.6920085", "text": "public function save(){\n\t Zend_Registry::getInstance()->entitymanager->persist($this);\n\t Zend_Registry::getInstance()->entitymanager->flush();\n\t}", "title": "" }, { "docid": "664249b8c56e22c55c176c5837255f13", "score": "0.6908653", "text": "protected function _save(){\n\n\t\tif($this->id === null){\n\t\t\t$this->field_loaded = 0;\n\t\t}\n\t\tif($this->field_loaded == 0){\n\t\t\t// This is a new entity\n\t\t\t$new_dbf = array();\n\t\t\tforeach($this->database_fields as $field=>$val){\n\t\t\t\tif(!is_numeric($field)){\n\t\t\t\t\t$new_dbf[$field] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(sizeof($new_dbf) > 0){\n\t\t\t\t$this->id = ApineFactory::set_table_row($this->table_name, $new_dbf);\n\t\t\t}\n\t\t\t/*$this->field_loaded = 1;\n\t\t\t $this->loaded = 1;*/\n\t\t\t$this->_load();\n\t\t}else{\n\t\t\t// This is an already existing entity\n\t\t\t$arUpdate = array();\n\t\t\tforeach($this->database_fields as $key=>$value){\n\t\t\t\tif(!is_numeric($key)){\n\t\t\t\t\tif(isset($this->modified_fields[$key]) && $this->modified_fields[$key] == true){\n\t\t\t\t\t\tif($value == \"\"){\n\t\t\t\t\t\t\t$arUpdate[$key] = NULL;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$arUpdate[$key] = $value;\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\tApineFactory::update_table_row($this->table_name, $arUpdate, array(\n\t\t\t\t\t\t\t'ID' => $this->id\n\t\t\t));\n\t\t}\n\n\t}", "title": "" }, { "docid": "4c7a2b21cfb38ab883b2c4754c3bd86a", "score": "0.6875697", "text": "function save($entity)\n\t\t{\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t$db->begin();\n\t\t\t\n\t\t\t$oldentity = $this->get($entity);\n\t\t\t\n\t\t\t\n\t\t\t$fields = $this->_getfields($entity);\n\t\t\t\n\t\t\tforeach ($fields as $field=>$value)\n\t\t\t\t$oldentity->$field = $value;\n\t\t\t\t\t\n\t\t\t\n\t\t\t$ok = $db->update($this->_getfields($oldentity), $this->_wherer($oldentity, null, true), $oldentity->_name);\n\t\t\t\n\t\t\tif ($ok)\n\t\t\t\t$db->commit();\n\t\t\telse\n\t\t\t\t$db->rollback();\n\t\t\t\n\t\t\treturn $ok;\n\t\t}", "title": "" }, { "docid": "c52ac0fa9f6dbad236b4a02eddf9fcbe", "score": "0.6843273", "text": "protected function entitySaveAccess($entity) {}", "title": "" }, { "docid": "a12fa9ee68d2c428df9d75eac07a2ce8", "score": "0.678326", "text": "abstract public function persist();", "title": "" }, { "docid": "8c35d19acaf1d26e0588cd29192ee73d", "score": "0.6761589", "text": "final public function setEntity($entity){\r\n\t\t$this->entity = $entity;\r\n\t}", "title": "" }, { "docid": "fc4536b02d60790d07b281c376e5c1bb", "score": "0.67556006", "text": "public function persist($entity);", "title": "" }, { "docid": "e3a921f3204d0ab4e62af7ebeb35ddab", "score": "0.67408025", "text": "public function beforeSave(Entity $entity);", "title": "" }, { "docid": "57af0d9a9e1f880e81374a5863bf92f7", "score": "0.6732261", "text": "public function save()\r\n {\r\n $dataToSave = $this->getData(); \r\n unset($dataToSave['id']);\r\n unset($dataToSave['attributes']);\r\n if(isset($this->id))\r\n {\r\n $update = $this->sql->update();\r\n $update->table('entity')\r\n ->set($dataToSave)\r\n ->where(['id' => $this->id]);\r\n $statement = $this->sql->prepareStatementForSqlObject($update);\r\n $results = $statement->execute();\r\n \r\n // Save attributes.\r\n foreach ($this->attributes as $attribute)\r\n {\r\n $attribute->save();\r\n } \r\n }\r\n else \r\n { \r\n $insert = $this->sql->insert();\r\n $insert->into('entity')\r\n ->values($dataToSave);\r\n $statement = $this->sql->prepareStatementForSqlObject($insert);\r\n $statement->execute();\r\n $select = $this->sql->select();\r\n $select->from('entity')\r\n ->order('id DESC')\r\n ->limit(1);\r\n $statement = $this->sql->prepareStatementForSqlObject($select);\r\n $results = $statement->execute();\r\n $this->id = $results->current()['id'];\r\n \r\n if(isset($this->attributes))\r\n {\r\n foreach($this->attributes as $attribute)\r\n {\r\n $attribute->setReferenceId($this->id);\r\n $attribute->save();\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ae909fd93bba20fe0ed16e8f1aef69a6", "score": "0.67272633", "text": "abstract protected function persist();", "title": "" }, { "docid": "7a2fbc75ced1f9f02e7a0124fcfba796", "score": "0.66249967", "text": "public function prePersist();", "title": "" }, { "docid": "77a74fbddc66f51076389864f753ceb1", "score": "0.6551799", "text": "public function save($entity)\n {\n $this->unitOfWork->pushSave($entity)->process();\n }", "title": "" }, { "docid": "99ebfd58bafebbed129bb049a3cd8c00", "score": "0.65477824", "text": "public function save()\n {\n if ($this->changed) {\n $this->object['id'] = $this->id;\n $this->object['name'] = $this->name;\n $this->object['status'] = $this->status;\n }\n }", "title": "" }, { "docid": "1150314bce55de91c742971a15d5810f", "score": "0.65450597", "text": "public function afterSave(Entity $entity);", "title": "" }, { "docid": "5a67d291dbd3e5516fc6ba1a09f8232d", "score": "0.6531559", "text": "public function persist() {\n\n if ($this->getId() == NULL) {\n $this->setDataFechamento(new DateTime());\n }\n\n if ($this->getVencimento() == NULL) {\n $this->setVencimento(new DateTime());\n }\n\n $this->getEm()->persist($this->entity);\n $this->getEm()->flush();\n }", "title": "" }, { "docid": "35ea40baf62f42e40aaed808f3011b13", "score": "0.6502535", "text": "public function store()\n {\n if (!$this->id) {\n $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "eeeab0d731d28dd660f19b0944994dac", "score": "0.6486728", "text": "public function persist();", "title": "" }, { "docid": "eeeab0d731d28dd660f19b0944994dac", "score": "0.6486728", "text": "public function persist();", "title": "" }, { "docid": "a7fa9261fd19503a1ededc2ea7035810", "score": "0.6486625", "text": "public function persist() {\n\n $this->em->persist($this->getEntity());\n $this->em->flush();\n }", "title": "" }, { "docid": "e876ffcb912715460be73dba360ce215", "score": "0.6483004", "text": "protected function save($entity)\n {\n $this->entityManager->persist($entity);\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "eb91144107c1efb6cbe198dfb1d9d2f0", "score": "0.64540994", "text": "function update_entity() {\n }", "title": "" }, { "docid": "1ee307d93417f3d57c9891a9d381f4ac", "score": "0.6446336", "text": "function save($entity = NULL);", "title": "" }, { "docid": "d2b0e6547b9f0e59d30d5f30fcd1aafc", "score": "0.6384456", "text": "public function saveDeferred($entity);", "title": "" }, { "docid": "5004e6cb0c8ad25447d29b27eaee6efe", "score": "0.6365646", "text": "public function saveEntities() {\n foreach ($this->entities['entities'] as $entityMap) {\n $entity = $this->translateEntity($entityMap);\n $entity->title = $entityMap['title'];\n\n if (isset($entityMap['user']) && $account = user_load_by_name($entityMap['user'])) {\n $entity->uid = $account->uid;\n $entity->name = $account->name;\n }\n\n if (isset($entityMap['created']) && $time = strtotime($entityMap['created'])) {\n $entity->created = $time;\n $entity->updated = $time;\n }\n\n entity_save($entityMap['entity'], $entity);\n }\n }", "title": "" }, { "docid": "6056e3911e0cf6d4d89420b395521b34", "score": "0.63539666", "text": "public function edit($entity)\n {\n $entity->save();\n }", "title": "" }, { "docid": "1af404285cfeaf9969360bdfa0dccf0e", "score": "0.6346469", "text": "public function update($entity) \n {\n return $this->persist($entity);\n }", "title": "" }, { "docid": "ace3e94a8784d52db3fa5d5b59f9ffaa", "score": "0.6340088", "text": "public function save(){\n Lore::app()->getPersistence()->getRepository($this->metadata()->getRepositoryName())->save($this);\n }", "title": "" }, { "docid": "8d0ccb9e66143bee193e64949557a77b", "score": "0.63122636", "text": "public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }", "title": "" }, { "docid": "536d3da27f6a3ef0273aaeb9ec4aef1d", "score": "0.62973", "text": "protected function save($entity)\n\t{\n\t\t$entityManager = $this->getEntityManager();\n\t\t$entityManager->persist($entity);\n\t\t$entityManager->flush();\n\t}", "title": "" }, { "docid": "ce561d5d55da5150291bb8a1a2b9d5bc", "score": "0.6296321", "text": "public function beforPersist()\n {\n $this->nom = InbeautyAppInterface::capitalize($this->nom);\n $this->dateCreation = new DateTime();\n }", "title": "" }, { "docid": "9d456be6417167025f1931efffbcc154", "score": "0.62739503", "text": "final protected function _save () {\n\t\t\n\t\t$db = new Database();\n\n\t\tif ($this->id === null) {\n\t\t\t$this->field_loaded = 0;\n\t\t}\n\t\t\n\t\tif($this->field_loaded == 0) {\n\t\t\t// This is a new or unloaded entity\n\t\t\t$new_dbf = array();\n\t\t\t\n\t\t\tif (!empty($this->database_fields)) {\n\t\t\t\tforeach ($this->database_fields as $field => $val) {\n\t\t\t\t\tif (!is_numeric($field)) {\n\t\t\t\t\t\t$new_dbf[$field] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (sizeof($new_dbf) > 0) {\n\t\t\t\t$this->id = $db->insert($this->table_name, $new_dbf);\n\t\t\t}\n\t\t\t\n\t\t\t$this->_load();\n\t\t} else {\n\t\t\t// This is an already existing entity\n\t\t\t\t\n\t\t\t// Update procedure only executed if at least\n\t\t\t// one field was modified\n\t\t\tif (count($this->modified_fields) > 0) {\n\t\t\t\t$arUpdate = array();\n\t\t\t\n\t\t\t\tforeach ($this->database_fields as $key => $value) {\n\t\t\t\t\tif (!is_numeric($key)) {\n\t\t\t\t\t\tif (isset($this->modified_fields[$key]) && $this->modified_fields[$key] == true) {\n\t\t\t\t\t\t\tif ($value === \"\") {\n\t\t\t\t\t\t\t\t$arUpdate[$key] = NULL;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$arUpdate[$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\n\t\t\t\t$db->update($this->table_name, $arUpdate, array(\n\t\t\t\t\t\t\t\t$this->load_field => $this->id\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "5c54386be37c7ec6cfbd6f1d63a8116c", "score": "0.62635654", "text": "public function store(Entity $entity)\n\t{\n\t\treturn $this->mapper->store($entity);\t\n\t}", "title": "" }, { "docid": "d39a050d21ca7c9ab342c62adf662d57", "score": "0.625646", "text": "public function setEntityPersisted($id);", "title": "" }, { "docid": "bfe498be42efea97f2b25b96360652e1", "score": "0.6254304", "text": "function update($entity)\n {\n }", "title": "" }, { "docid": "c02310a4610c8959a8812da1a75937ba", "score": "0.62518317", "text": "public function prePersist()\n {\n $this->status = 1;\n }", "title": "" }, { "docid": "2b2babd49587e81ebe4140b140118861", "score": "0.6238424", "text": "public function save()\n {\n $this->id = $this->repository->save($this);\n }", "title": "" }, { "docid": "d5e8877d8a632f20c6c1d9792ed0b3b8", "score": "0.6192275", "text": "abstract protected function setEntityType();", "title": "" }, { "docid": "9492ea204d7114d6383fd6604c515f01", "score": "0.61890006", "text": "protected function postPersist($object)\n {\n\n }", "title": "" }, { "docid": "b4c08bc6443c7d93771b5a277f3d5423", "score": "0.61872524", "text": "public function alterEntity() {\n\n\t\t\t$out = $this->article->getContext()->getOutput();\n\t\t\t$titleObj = $this->article->getTitle();\n\n\t\t\t$pageID = $titleObj->getArticleID();\n\n\t\t\t$id = $this->getMementoOldID();\n\n\t\t\t// so that they get a warning if they try to edit the page\n\t\t\t$out->setRevisionId($id);\n\n\t\t\t$oldArticle = new Article( $title = $titleObj, $oldid = $id );\n\t\t\t$oldrev = $oldArticle->getRevisionFetched();\n\n\t\t\t// so we have the \"Revision as of\" text at the top of the page\n\t\t\t$this->article->setOldSubtitle($id);\n\n\t\t\t$oldArticleContent = $oldrev->getContent();\n\n\t\t\t$mementoArticleText =\n\t\t\t\t$oldArticleContent->getWikitextForTransclusion();\n\n\t\t\t$out->clearHTML();\n\t\t\t$out->addWikiText( $mementoArticleText );\n\n\t}", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.6174707", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.6174707", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.6174707", "text": "abstract public function save();", "title": "" }, { "docid": "f7ea31eb1fdda5e3bdd74c09f6de67b7", "score": "0.61639136", "text": "public function save() \n\t{\n\t\t$this->getMapper()->save($this);\n\t}", "title": "" }, { "docid": "dc7d206e40406c69cec76483189af4d6", "score": "0.61634266", "text": "public function Update($entity) {\n }", "title": "" }, { "docid": "dc7d206e40406c69cec76483189af4d6", "score": "0.61634266", "text": "public function Update($entity) {\n }", "title": "" }, { "docid": "f98d965816cc40512911bba197b578db", "score": "0.6160189", "text": "function apply() \n\t{\n\t\t$this-> save();\n\t}", "title": "" }, { "docid": "f904909b50eae637cf049f161e5db37f", "score": "0.6159785", "text": "protected function beforeSave(): void\n {\n }", "title": "" }, { "docid": "1f71f985ba58972790da3ef62c6373ae", "score": "0.6147493", "text": "protected function prePersist($object)\n {\n\n }", "title": "" }, { "docid": "a114b7c1ccd562e0b30fc080fdb39b12", "score": "0.61419207", "text": "public function save() {\n $this->_getMapper()->save($this);\n }", "title": "" }, { "docid": "3eb424a01629fec86faf70eba4cf9fea", "score": "0.6134241", "text": "public static function setEntity($entity)\n {\n\n static::$entity = $entity;\n }", "title": "" }, { "docid": "87304dfa4e399b082d4c985670d1c079", "score": "0.61172533", "text": "public function saveField($entity, FormStateInterface $form_state);", "title": "" }, { "docid": "901c213b656d749849ff2cf130a76913", "score": "0.61168426", "text": "public function persist(EntityInterface $entity): void;", "title": "" }, { "docid": "accd3ab3b1bcb6817b90079f20f2156c", "score": "0.61148584", "text": "public function insert($entity){\n $this->entityManager->persist($entity);\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "8dd39550aa99dc661476508bc62c9a01", "score": "0.6109624", "text": "protected function fillFromAPI($entity) {\n // set the entity\n $this->entity = $entity;\n\n // if there is no old-entity, clone the current entity and set is as the old entity\n if (!isset($this->old)) {\n $this->old = clone $this->entity;\n }\n }", "title": "" }, { "docid": "f800ec23289f7f021824bd18844618a2", "score": "0.6105225", "text": "function save() {\n\n\t\t// gets table's name\n\t\t$table =\tself::getTableName();\n\t\t$pkField =\tself::getPkFieldName();\n\n\t\t// fields to insert or update\n\t\t$binds = $this->alteredFields;\n\n\t\t// new object but no altered fields: error\n\t\tif($this->bIsNew && empty($binds))\n\t\t\tthrow new Exception(__METHOD__ . \": object ({$table}) is new but has no field set (it's mandatory to use setField methods, which should call parent::setOrm)\");\n\n\t\t// no alteration\n\t\tif(empty($binds))\n\t\t\treturn;;\n\n\t\t// prepare fields\n\t\t$attributes = array_keys($binds);\n\n\t\t// Database Connection\n\t\t$objDatabase = \\Database::getConnection();\n\n\t\t// insert\n\t\tif($this->bIsNew) {\n\n\t\t\t$sql = \"insert into {$table} (\" . implode(\", \", $attributes) . \") values (:\" . implode(', :', $attributes) . \");\";\n\n\t\t}\n\t\t// update\n\t\telse {\n\n\t\t\t$aUpdate = array();\n\n\t\t\tforeach($binds as $field => $value) {\n\n\t\t\t\t$aUpdate[] = \"`$field` = :{$field}\";\n\n\t\t\t}\n\n\t\t\t// query with binds\n\t\t\t$sql = \"update {$table} set \" . implode(', ', $aUpdate) . \" where `{$pkField}` = :pk;\";\n\n\t\t\t// where clause\n\t\t\t$pkValue = $this->getPkValue();\n\n\t\t\t$binds['pk'] = $pkValue;\n\n\t\t}\n\n\t\t$objDatabase->query($sql, $binds);\n\n\t\t// new object was saved: indicates the object doesn't have to be persisted in the database\n\t\tif($this->bIsNew) {\n\n\t\t\t$this->bIsNew = false;\n\n\t\t\t$this->$pkField = $objDatabase->dbh->lastInsertId();\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "e77131dd6535508f44a7d8b9ce25bf15", "score": "0.6078216", "text": "public function forcedSave() {\n $query = new OrmQuery(self::getDatatableName());\n\n $allProperties = $this->toArray();\n $query->insert($allProperties);\n }", "title": "" }, { "docid": "c805b6d2003d2f783f20a0fb740b217c", "score": "0.6075004", "text": "protected abstract function doSave();", "title": "" }, { "docid": "5b8b505acd51d2ece64921c5eebda6b0", "score": "0.60704124", "text": "public function save() {\n if(Zend_Registry::getInstance()->session->user->hasRole('god')){\n Zend_Registry::getInstance()->entitymanager->persist($this);\n Zend_Registry::getInstance()->entitymanager->flush();\n }\n }", "title": "" }, { "docid": "a22f8c4a59344e51d2a9918eeebc4008", "score": "0.6058676", "text": "public function beforeSave(Event $event, EntityInterface $entity, ArrayObject $options): void\n {\n // No need to update the fields if the entity already exist.\n if (!$entity->isNew()) {\n return;\n }\n\n if (empty($entity->get(\"language_id\"))) {\n $entity->set('language_id', $this->getLanguageId($entity->get(\"locale\")));\n }\n\n if (empty($entity->get(\"locale\"))) {\n $entity->set('locale', $this->getLanguageCode($entity->get(\"language_id\")));\n }\n }", "title": "" }, { "docid": "dec2cd90417c9a02c446e621eaf5880e", "score": "0.6058276", "text": "protected function persistEntity($entity)\n {\n $this->em->persist($entity);\n $this->em->flush();\n }", "title": "" }, { "docid": "3da47de6ce635d085599530579fc4913", "score": "0.6057352", "text": "public function set($field, $entity, $value) {\n if($entity->getArtwork() != null) {$subEntity = $entity->getArtwork();}\n elseif($entity->getBuilding() != null) {$subEntity = $entity->getBuilding();}\n \n $subEntity->set($field, $value);\n $this->em->persist($subEntity);\n $this->em->flush();\n }", "title": "" }, { "docid": "d06f5b0f7ac8d0155bcd86f43c118760", "score": "0.6056108", "text": "public function persist(BaseEntity $entity): void;", "title": "" }, { "docid": "d59a1e4a01f893ac5941f67d67d255ef", "score": "0.6053276", "text": "protected function savePreprocess(&$entity) {\n\n }", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.6043318", "text": "public abstract function save();", "title": "" }, { "docid": "6355289d07b32de6bfa4810c3aab4612", "score": "0.60430163", "text": "public function save()\n {\n $isInsert = $this->isNew();\n if ($isInsert) {\n $this->doInsert();\n } else {\n $this->doUpdate();\n }\n }", "title": "" }, { "docid": "2b3e3abee1253a054616191d250665dd", "score": "0.60402614", "text": "public function persist()\n {\n //\n }", "title": "" }, { "docid": "3c31d27634fe8d4ba1525dbe3173f568", "score": "0.6040191", "text": "public function add($entity)\n {\n $entity->save();\n }", "title": "" }, { "docid": "7b67f5045d3f8cbc50717a22b252a654", "score": "0.6031598", "text": "public function save() {\n isset($this->id) ? $this->update() : $this->create();\n }", "title": "" }, { "docid": "f357b615551f1b8b92a78c76fdbf9228", "score": "0.60297495", "text": "public function save($entity)\n\t{\n\t\treturn $this->persist($entity);\n\t}", "title": "" }, { "docid": "f8a085a0f73158ded54e630cf9b175ce", "score": "0.602711", "text": "public function persist()\n\t{\n\t}", "title": "" }, { "docid": "c4b4d2dbf4899987888eb9814d348874", "score": "0.6026638", "text": "public function save()\n\t\t{\n\t\t\tglobal $CONFIG;\n\t\t\t\n\t\t\t$guid = (int) $this->guid;\n\t\t\t$update = false;\n\t\t\tif ($guid)\n\t\t\t\t$update = true;\n\t\t\t\t\n\t\t\t// Test for type\n\t\t\tif (!$this->__type)\n\t\t\t\tthrow new ClassException(sprintf(_echo('class:exception:missingtype'), get_class($this)));\n\t\t\t\t\n\t\t\t// Trigger pre event, block creation/update if pre returns false \n\t\t\t// (doing this means we don't have to do any messy delete/reset \n\t\t\t// stuff if an event action blocks)\n\t\t\tif (!$this->__send_object_event($update ? 'updating' : 'saving'))\n\t\t\t\treturn false; \n\t\t\t\t\n\t\t\t// Update or save?\n\t\t\tif ($guid > 0) \n\t\t\t{\n\t\t\t\t\n\t\t\t\t// No need to update main entity atm since there are no fields to update\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Delete metadata if we need to update\n\t\t\t\tif ($this->__attributes_modified) {\n\t\t\t\t $result = db_delete_data(\n\t\t\t\t\t array (\n\t\t\t\t\t\t 'table_col' => \"{$CONFIG->dbprefix}bctobjects_metadata\",\n\t\t\t\t\t\t 'where' => 'guid='.(int)$guid\n\t\t\t\t\t )\n\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\t// If time not set then use the current time, this lets you \n\t\t\t\t// set times which are in the past or future on creation.\n\t\t\t\t$time = $this->created_ts;\n\t\t\t\tif (!$time)\n\t\t\t\t\t$time = time();\n\t\t\t\t\n\t\t\t\t// Create new entity\n\t\t\t\t$guid = db_insert_data(\n\t\t\t\t\tarray ( \n\t\t\t\t\t\t'table_col' => \"{$CONFIG->dbprefix}bctobjects\",\n\t\t\t\t\t\t'set_values' => array (\n\t\t\t\t\t\t\t'type=\"'.$this->getTypeHierarchy().'\"',\n\t\t\t\t\t\t\t'handling_class=\"'.get_class($this).'\"',\n\t\t\t\t\t\t\t'created_ts=\"'.$time.'\"'\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\t// Set guid \n\t\t\t\t$this->guid = $guid;\n\t\t\t\t\n\t\t\t\t// Timestamp\n\t\t\t\t$this->created_ts = $time;\n\t\t\t}\n\t\t\t\n\t\t\t// Save metadata if guid there\n\t\t\tif (($guid) && ($this->__attributes_modified))\n\t\t\t{\n\t\t\t\t// Set metadata\n\t\t\t\tforeach ($this->__attributes as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t// Sanitise string\n\t\t\t\t\t$key = sanitise_string($key);\n\t\t\t\t\t\n\t\t\t\t\t// Convert non-array to array \n\t\t\t\t\tif (!is_array($value))\n\t\t\t\t\t\t$value = array($value);\n\t\t\t\t\t\n\t\t\t\t\t// Save metadata\n\t\t\t\t\tforeach ($value as $meta)\n\t\t\t\t\t{\n\t\t\t\t\t\tdb_insert_data(\n\t\t\t\t\t\t\tarray ( \n\t\t\t\t\t\t\t\t'table_col' => \"{$CONFIG->dbprefix}bctobjects_metadata\",\n\t\t\t\t\t\t\t\t'set_values' => array (\n\t\t\t\t\t\t\t\t\t'guid='.(int)$guid,\n\t\t\t\t\t\t\t\t\t'name=\"'.$key.'\"',\n\t\t\t\t\t\t\t\t\t'value=\"'.sanitise_string($meta).'\"'\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\n\t\t\t\t$this->__attributes_modified = false;\n\t\t\t}\n\t\t\t\n\t\t\t// Saved, so trigger save event\n\t\t\tif ($guid)\n\t\t\t\t$this->__send_object_event($update ? 'updated' : 'saved');\n\t\t\t\n\t\t\treturn $guid;\n\t\t}", "title": "" }, { "docid": "d60d39b0d044acd85341d58bf00d446a", "score": "0.6020565", "text": "public function save()\n {\n empty($this->id) ? $this->create() : $this->update();\n }", "title": "" }, { "docid": "ea22ea751060105b09e3caa1e1c79c62", "score": "0.6019647", "text": "public function beforeSave(Event $event, EntityInterface $entity, ArrayObject $options)\n {\n if (!$entity->isNew() && $entity->nome != $entity->getOriginal('nome')) {\n $entity->dt_modificado = Time::now();\n }\n\n }", "title": "" }, { "docid": "5446ae74793e26d2289b741eec2e75c7", "score": "0.60137945", "text": "public function save() {\n $this->add($this->actual);\n }", "title": "" }, { "docid": "01d8b9c7c2e1f208fa81e3514db330f6", "score": "0.601044", "text": "public function save()\n {\n if (isset($this->id)) {\n $this->update();\n } else {\n $this->create();\n }\n }", "title": "" }, { "docid": "75c3b0c9b4d7976b8b9e5985ee4997b8", "score": "0.6004107", "text": "public function save(){\n $fieldList = ensureArray($this->changeFields);\n $valueList = [];\n foreach ($fieldList as $field) {\n array_push($valueList, property_exists($this, $field)\n ? $this->$field\n : NULL);\n }\n $values = implode(', ', $valueList);\n // assume if there is an ID, then update, otherwise it is a new record\n if (property_exists($this, 'id')) {\n return $this->update($values, $this->changeFields, 'id', '=', $this->id);\n } else {\n return $this->add($values);\n }\n }", "title": "" }, { "docid": "b99312489801d7dd21619bc3e86f31f7", "score": "0.6003739", "text": "public function save() : void {\n if ($this->uid) {\n $this->update();\n }\n else {\n $this->insert();\n }\n\t\t$this->_changed = array();\n }", "title": "" }, { "docid": "e42df3ab05265030fd1ec865466b873d", "score": "0.6002483", "text": "abstract protected function _save();", "title": "" }, { "docid": "a2a5388d0f1f783b1024b0bfbf739189", "score": "0.59990555", "text": "private function save($data){\n $entityManager = $this ->getDoctrine()->getManager();\n $entityManager->persist($data);\n $entityManager->flush();\n }", "title": "" }, { "docid": "e8e4864a4e220846e47c150df3e4ab1b", "score": "0.599612", "text": "public function save(): void\n {\n $data = $this->getValidData();\n $currentState = $this->state;\n\n (!$this->state['data']['id'])\n ? $this->store($data, $currentState)\n : $this->update($data, $currentState);\n\n $this->handleUIEffects();\n }", "title": "" }, { "docid": "8420a0bbabb5808b6c32a6c5f44da651", "score": "0.59772944", "text": "public function save(){}", "title": "" }, { "docid": "41834e1d8cdfdb4131ed54b70b6c57c2", "score": "0.5975086", "text": "public function persist($entity)\n {\n $this->entityManager->persist($entity);\n }", "title": "" }, { "docid": "7e78d10578099c1a4710de276dc5bee0", "score": "0.5973366", "text": "protected function storeSavePreprocess(&$entity) {\n $this->savePreprocess($entity);\n }", "title": "" }, { "docid": "fc86a0e99a67e6ccbd125d453c68346e", "score": "0.5967579", "text": "public function onBeforeSave()\n\t{\n\t}", "title": "" }, { "docid": "40b99327037ee763fb29f0e57a3b262b", "score": "0.5958447", "text": "public function save()\r\n {\r\n if(!isset($this->reservation_id) || !isset($this->guest_id))\r\n {\r\n Debug::dump('reservation '.$this->reservation_id.' guest '.$this->guest_id);\r\n return;\r\n }\r\n \r\n if(!isset($this->id))\r\n {\r\n $insert = $this->sql->insert();\r\n $data = $this->getData();\r\n \r\n // Unset unwanted entries.\r\n unset($data['internal_id']);\r\n unset($data['entity_definition_id']);\r\n unset($data['guid']);\r\n unset($data['ed_name']);\r\n unset($data['first_name']);\r\n unset($data['last_name']); \r\n \r\n $insert->into('reservation_entity')\r\n ->values($data);\r\n $statement = $this->sql->prepareStatementForSqlObject($insert);\r\n $results = $statement->execute();\r\n }\r\n else\r\n {\r\n $data = $this->getData();\r\n \r\n // Unset unwanted entries.\r\n unset($data['internal_id']);\r\n unset($data['entity_definition_id']);\r\n unset($data['guid']);\r\n unset($data['ed_name']);\r\n unset($data['first_name']);\r\n unset($data['last_name']); \r\n \r\n $update = $this->sql->update();\r\n $update->table('reservation_entity')\r\n ->set($data)\r\n ->where(['id' => $this->id]);\r\n $statement = $this->sql->prepareStatementForSqlObject($update);\r\n $results = $statement->execute();\r\n }\r\n }", "title": "" }, { "docid": "b57c7d5cd4a22dd89a084afcdae4a58a", "score": "0.5947231", "text": "public function prePersist()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updatedAt = clone $this->createdAt;\n }", "title": "" }, { "docid": "f8b3bc8fa50f985be45bed6a384ba431", "score": "0.5934209", "text": "public function beforeElementorSave()\n {\n }", "title": "" }, { "docid": "3e112142bd8aec02ab84864b55b66cfc", "score": "0.5928763", "text": "public function save() {\n $this->recalcula();\n parent::save();\n }", "title": "" }, { "docid": "fe576aa6519937265c20a63974a3f41b", "score": "0.5925248", "text": "private function storeUpdate()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->storage as $field_name => $field_val) {\n\t\t\tif($field_name == $this->_primary_key) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$values[$field_name] = $field_val;\n\t\t}\n\n\t\t$values = array_filter($values, array($this, 'filterValue'));\n\t\t\n\t\tDb::update($this->_table, \n\t\t\t\t$values, \n\t\t\t\t$this->_primary_key . ' = ?', \n\t\t\t\tarray($this->getId())\n\t\t\t);\n\t}", "title": "" }, { "docid": "8dc2196b7551919a89d7f1e4bc8ef89d", "score": "0.5921779", "text": "public function persist($object);", "title": "" }, { "docid": "9928caa697b58b423f53a3893df402b4", "score": "0.59179145", "text": "protected function beforeSave()\n {\n }", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.5912224", "text": "public function save() {}", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.5912224", "text": "public function save() {}", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.5912224", "text": "public function save() {}", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.5912224", "text": "public function save() {}", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.5912224", "text": "public function save() {}", "title": "" } ]
ba5583177b788062cb1c7629700757c1
Devuelve el valor correspondiente a idcategoria
[ { "docid": "d66d22cfe4eb453c40bda66fbba1fcd8", "score": "0.79931056", "text": "public function getIdcategoria(){\n return $this->idcategoria;\n }", "title": "" } ]
[ { "docid": "30e6aff4938b41ee19b2c2eec16d9a9e", "score": "0.77619123", "text": "public function getIdcategoria()\n {\n return $this->idcategoria;\n }", "title": "" }, { "docid": "1a2baa4209016d499a655c279bd355a8", "score": "0.77073354", "text": "public function getId_categoria()\n {\n return $this->id_categoria;\n }", "title": "" }, { "docid": "1a2baa4209016d499a655c279bd355a8", "score": "0.77073354", "text": "public function getId_categoria()\n {\n return $this->id_categoria;\n }", "title": "" }, { "docid": "36f1de0a58a686706a99fa28cad0bffd", "score": "0.7559909", "text": "public function getId()\n {\n return $this->id_categoria;\n }", "title": "" }, { "docid": "11e3aaccb29488ef9b127fab0df69777", "score": "0.75239784", "text": "public function getIdCategoria()\n {\n return $this->idCategoria;\n }", "title": "" }, { "docid": "11e3aaccb29488ef9b127fab0df69777", "score": "0.75239784", "text": "public function getIdCategoria()\n {\n return $this->idCategoria;\n }", "title": "" }, { "docid": "47409a4725fda3dd3fc602505510c26c", "score": "0.7496195", "text": "public function getCategoria_id()\n {\n return $this->categoria_id;\n }", "title": "" }, { "docid": "dece67b624871756b251ae301c9137f6", "score": "0.74413216", "text": "public function getId_categorie()\n {\n return $this->id_categorie;\n }", "title": "" }, { "docid": "89af2f81e36ff6b33677a7f11d979358", "score": "0.6988615", "text": "public function getCategoriaAcordo () {\n\n return $this->iCategoriaAcordo;\n }", "title": "" }, { "docid": "40ef8648efc89083128c3a33863ec0d5", "score": "0.6982859", "text": "public function getCategoriaID($id)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from categorias where idCategoria=:id');\n $stmt->bindParam(\":id\",$id);\n $stmt->execute();\n $resultado=$stmt->fetch();\n return $resultado;\n //return $resultado;\n }", "title": "" }, { "docid": "853c9caaa88ee748385d73658ee38c5b", "score": "0.6960004", "text": "public function getDataCategoria(){\n return $this->dataCategoria;\n }", "title": "" }, { "docid": "a19ed5e44e2e2ff73b0ff94a1d76b29b", "score": "0.69402397", "text": "public function getCategoriaNombreById($categoria_id)\r\n {\r\n \r\n include \"sesion/seguridad/open_conn.php\";\r\n $conn = mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\"); \r\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\r\n //comprobamos la conección de la base de datos\r\n $ssql2 =\"SELECT Nombre FROM categoria WHERE id = '$categoria_id'\";\r\n //variable que almacenará el nombre de role\r\n mysql_query(\"SET NAMES 'utf8'\");\r\n $categorias = mysql_fetch_assoc(mysql_query($ssql2,$conn)); \r\n $categoriaNombre = $categorias['Nombre'];\r\n return $categoriaNombre; \r\n }", "title": "" }, { "docid": "d738178efb78343a2b3756aeb42ff6bf", "score": "0.6890782", "text": "public function getCategoria()\n {\n return $this->categoria;\n }", "title": "" }, { "docid": "6000f65f18dbd3cf29e1902736e1be6b", "score": "0.68539006", "text": "function categoria($categoria) {\n $db = new MySQL(Sesion::getConexion());\n $consulta = $db->sql_query(\"SELECT * FROM `proveedores_archivos_categorias` WHERE `categoria` = '\" . $categoria . \"'\");\n $fila = $db->sql_fetchrow($consulta);\n $db->sql_close();\n return($fila);\n }", "title": "" }, { "docid": "c09c270ce47f606a6418f740299785a1", "score": "0.6836718", "text": "public function getcategoriebyid($idcategorie)\n {\n if( !is_null($idcategorie) )\n return self::find($idcategorie)->first();\n }", "title": "" }, { "docid": "82c3e36bff9c21288461fef4c81e6ff1", "score": "0.6811207", "text": "public function getCategoria($id_categoria) {\n $pdo = Database::connect();\n $sql = \"select * from categoria where id_categoria=?\";\n $consulta = $pdo->prepare($sql);\n $consulta->execute(array($id_categoria));\n //obtenemos el registro especifico:\n $res=$consulta->fetch(PDO::FETCH_ASSOC);\n $categoria=new categoria($res['id_categoria'],$res['nombre_categoria']);\n Database::disconnect();\n //retornamos el objeto encontrado:\n return $categoria;\n }", "title": "" }, { "docid": "bc3621cfb32bc8c65cf990c7aeab2275", "score": "0.6750437", "text": "public function getIdCat()\n {\n return $this->id_cat;\n }", "title": "" }, { "docid": "820d43c1266bd3b700a9586bc4216066", "score": "0.6705141", "text": "public function getCategoria()\n {\n return $this->categorias;\n }", "title": "" }, { "docid": "5786d1c1eeeadf25c23e619b84d4b64a", "score": "0.6688514", "text": "public function ver_categoria_codigo($id)\n {\n $query = $this->db->query(\"SELECT * FROM categorias WHERE id='$id' ORDER BY nombre asc\");\n\n $resultado = $query->row_array();\n if($resultado == NULL)\n {\n return 0;\n }\n else\n {\n return $resultado;\n }\n }", "title": "" }, { "docid": "b6e46cec9c8c0e38ed2dc9d920e4e403", "score": "0.6659043", "text": "public function getIdCat()\n {\n return $this->id_cat;\n }", "title": "" }, { "docid": "d76fbda31a51ef9610c031882597a3fe", "score": "0.6608215", "text": "public function setIdcategoria($idcategoria){\n $this->idcategoria = $idcategoria;\n }", "title": "" }, { "docid": "98fca14d198992887ef7408e442ef0c0", "score": "0.65684587", "text": "public function getCategoria($idcategoria){\n if ($_SESSION['permisosMod']['r']) {\n $intIdCategoria = intval($idcategoria);//se convierte a int con intval y el strClean limpia en caso de que sea un string o inyeccion sql\n if ($intIdCategoria > 0) {\n $arrData = $this->model->selectCategoria($intIdCategoria);\n // dep($arrData);exit;\n if (empty($arrData)) {\n $arrResponse = array('status' => false, 'msg' => 'Datos no encontrados.');\n }else {\n $arrData['url_portada'] = media().'/images/uploads/'.$arrData['portada'];//la direccion es agregada al array\n $arrResponse = array('status' => true, 'data' => $arrData);\n }\n // dep($arrData);\n // exit;\n echo json_encode($arrResponse, JSON_UNESCAPED_UNICODE);//da la respuesta\n }\n } \n die();\n }", "title": "" }, { "docid": "cba9da1730de5074f4a520c857e92ce6", "score": "0.6536436", "text": "public function Ver_Categoria($idCategoria){\n\t\t$query=\"Select * From productos Where idCategoria='\".$idCategoria.\"';\";\n\t\t$Cproductos=$this->db->query($query);\n\t\treturn $Cproductos->result();\n\t}", "title": "" }, { "docid": "0ce44c00e25191fcf808f4de0e0f100f", "score": "0.65064085", "text": "public function GetCategoriaById($idCategoria = NULL) {\r\n\r\n $this->db->select('*');\r\n $this->db->from('categoria');\r\n $this->db->where('idCategoria', $idCategoria);\r\n\r\n return $this->db->get()->result()[0];\r\n }", "title": "" }, { "docid": "d6d4d0d042f1254d6056f0e57ca35691", "score": "0.64533603", "text": "public function get_Code_sous_categorie_article(): int { return $this->Code_sous_categorie_article; }", "title": "" }, { "docid": "523ebe09a54dafce347cc03e522b9cfc", "score": "0.6453305", "text": "public function getCategorie()\n {\n return $this->categorie;\n }", "title": "" }, { "docid": "0e1f8e3fd07e8708a4eed45a49c71b83", "score": "0.64248", "text": "public function getDescripcionCategoria(){\n return $this->descripcionCategoria;\n }", "title": "" }, { "docid": "d19dd84d36bef1d73e4db57ae324fb24", "score": "0.6420414", "text": "function getCategorieById($idCategorie) {\n\n\t$myBdd = connectDB();\n\t\t\n\t$sql = 'SELECT nom FROM categories WHERE id_categorie='.$idCategorie;\n\n\t$reponse = $myBdd->query($sql);\n\n\t$myData = $reponse->fetch();\n\n\tdisconnectDB($myBdd);\n\n\treturn($myData['nom']);\n\n}", "title": "" }, { "docid": "69316589d8e82feff71dcf4b8f38fd61", "score": "0.6413253", "text": "public function getCategoria($id)\n\t{\n\t\t$this->db->where('id', $id);\n\t\t$query = $this->db->get('categorias');\n\t\treturn $query->row();\n\t}", "title": "" }, { "docid": "0e6264fb2d8491d1ed8fe65c040fb616", "score": "0.64045143", "text": "public function nameCategoria(){\n return $this->categorias->descripcion;\n }", "title": "" }, { "docid": "baa227e81bfffd577e456cfb6040225c", "score": "0.6404447", "text": "public function getId_subcategoria()\n {\n return $this->id_subcategoria;\n }", "title": "" }, { "docid": "4acbaded51f3534f276a32ca97e34623", "score": "0.63977844", "text": "function mostrar_categoria($id_categoria){\n include_once ('conexion.php');\n $con = getConexion(); \n $sql = \"SELECT * FROM categoria WHERE id = $id_categoria\"; \n\n $result = $con->query($sql); \n\n if($con->connect_errno){\n $con->close(); \n return false; \n }\n $get_categ = array(); \n $categorias = $result->fetch_all();\n foreach($categorias as $c){\n array_push($get_categ, obtener_categoria($c)); \n } \n $con->close(); \n return $get_categ; \n }", "title": "" }, { "docid": "f1ff903866cdb2ce6e40a872b2c6eac2", "score": "0.6376895", "text": "public function tatalCategorias(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idCategoria) as cantidadCategoria from tb_categoriasProductos \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadCategoria'];\t\t\t\n\t\t\t\n\t\t\t\n }", "title": "" }, { "docid": "70f80abcfb7d8ddbde8d7ad6342bd293", "score": "0.6351516", "text": "public function get_id() {\r\n return $this->cat_id;\r\n }", "title": "" }, { "docid": "bf1466ebaebd763439fe0978aafd82e5", "score": "0.63290644", "text": "public function getCategoria(int $id)\n {\n //CONEXAO AO BD USANDO BDCONNECTION\n $this->conexao = DBConnection::getConexao();\n\n //SELECT - TRAZ TODOS OS DADOS DE CATEGORIA\n $sql = \"select * from categoria where id_categoria =\" . $id;\n $resultado = $this->conexao->query($sql);\n //resultset do BD\n $categoria = $resultado->fetch(PDO::FETCH_ASSOC);\n\n\n $lista_categoria = new Categoria($categoria[\"id_categoria\"], $categoria [\"nome_categoria\"], $categoria [\"descricao_categoria\"]);\n\n return $lista_categoria;\n\n }", "title": "" }, { "docid": "3e9fc49decccd0b34a73ebab495c1375", "score": "0.63266414", "text": "public function &getCategoriaPerId($id) {\n $categoria = new Categoria();\n $query = \"select * from categorie where id = ?\";\n $mysqli = Db::getInstance()->connectDb();\n if (!isset($mysqli)) {\n error_log(\"[getCategoriaPerId] impossibile inizializzare il database\");\n $mysqli->close();\n return $categoria;\n }\n\n $stmt = $mysqli->stmt_init();\n $stmt->prepare($query);\n if (!$stmt) {\n error_log(\"[getCategoriaPerId] impossibile\" . \" inizializzare il prepared statement\");\n $mysqli->close();\n return $categoria;\n }\n if (!$stmt->bind_param('i', $id)) {\n error_log(\"[getcategoriaPerId] impossibile\" . \" effettuare il binding in input\");\n $mysqli->close();\n return $categoria;\n }\n if (!$stmt->execute()) {\n error_log(\"[getCategoriaPerId] impossibile\" . \" eseguire lo statement\");\n return $categoria;\n }\n\n $id = 0;\n $nomecategoria = \"\";\n $idcompetizione = 0;\n\n if (!$stmt->bind_result($id, $nomecategoria, $idcompetizione)) {\n error_log(\"[getCategoriaPerId] impossibile\" . \" effettuare il binding in output\");\n return $categoria;\n }\n \n while ($stmt->fetch()) {\n $categoria->setId($id);\n $categoria->setNome($nomecategoria);\n $categoria->setCompetizione(CompetizioneFactory::instance()->getCompetizionePerId($idcompetizione));\n }\n $mysqli->close();\n return $categoria;\n }", "title": "" }, { "docid": "93c4b7c52387bf4818c1107b675c2fdc", "score": "0.6326604", "text": "function espresso_custom_column_category_id($value, $column_name, $id) {\n\t\tif( $column_name == 'espresso_category_id' ){\n\t\t\treturn (int) $id;\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "0ce2aa0a1fe2f0d9f2ad93e66b5e894e", "score": "0.63215554", "text": "public function getId()\n {\n return $this->cat_id;\n }", "title": "" }, { "docid": "5586eebd1e3d1bbb3371be435fda4ac9", "score": "0.6275842", "text": "function getResultCategory()\n {\n return($this->CategoryIdDataEasy);\n }", "title": "" }, { "docid": "35d104108a5834a2d2d8ff76b37d074f", "score": "0.6271519", "text": "public function categoria() {\n if(isset($_GET)){\n $id= $_GET['id'];\n $productosPorCategoria = new Producto();\n $productosPorCategoria->setId_producto($id);\n \n $productos = $productosPorCategoria->mostrarPorCategoria();\n $categoria = $productosPorCategoria->getCategoria();\n require_once'views/producto/index.php';\n }\n }", "title": "" }, { "docid": "1d0937f764dcc5a0b9c9ea8f469999c0", "score": "0.6263345", "text": "public function getCategory_id()\n {\n return $this->category_id;\n }", "title": "" }, { "docid": "689aab643668ab50fbc913bb66165642", "score": "0.62617624", "text": "private function getCategorVar()\n {\n return 'cat';\n }", "title": "" }, { "docid": "f3ba025fa7f6c349ab0f1cae2bd2f675", "score": "0.6260441", "text": "public function getCodeCategorie(): ?string {\n return $this->codeCategorie;\n }", "title": "" }, { "docid": "7eae513e311570efb18ff1bf5efc0ba1", "score": "0.6255846", "text": "public function getId() : int\n {\n return $this->idcategory;\n }", "title": "" }, { "docid": "85fa524c2c0816c786c3149d3eeaafd0", "score": "0.62544346", "text": "public function kategoriaNazwa($id) {\n\t\t\t$stmt = $this->db->prepare('SELECT pt.title FROM `rodzaje` p\n\t\t INNER JOIN `rodzaje_tlumaczenia` pt ON p.id = pt.rodzaj_id\n\t\t WHERE p.id = :id AND pt.language_code = pl');\n\t\t\t$stmt->bindValue(':id', $id, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\t$tmp = $stmt->fetch();\n\t\t\treturn $tmp[0];\n\t\t}", "title": "" }, { "docid": "2ace17c6f67aff5d0b8c7ca6e5d88e66", "score": "0.6253368", "text": "function get_categoriaproduto($id)\n {\n return $this->db->get_where('categoria',array('id'=>$id))->row_array();\n }", "title": "" }, { "docid": "81247012d35faa8de3ba7274fb430112", "score": "0.6233989", "text": "static public function getCategoryById($tabla,$idCategoria){\n \n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla WHERE id = :idCategoria\");\n\n\t\t$stmt -> bindParam(\":idCategoria\", $idCategoria, PDO::PARAM_INT);\n\n\t\t$stmt ->execute();\n\n\t\treturn $stmt->fetch();\n\n\t\t$stmt-> close();\n\n\t\t$stmt = null;\n\t}", "title": "" }, { "docid": "d8f76193647528bb79b678e77fb0cd8a", "score": "0.6211499", "text": "function actualizarCategoria($idcategoria) {\n $menu_activo = 'active'; $data['menu_activo_catalogo'] = $menu_activo;\n //mandando el estilo del item activo\n $item_activo = 'enlace_activo'; $data['item_activo_inicio_categorias'] = $item_activo;\n //obtener la categoria seleccionada segun idcategorias\n $obtenerCategoriaSeleccionada = $this->Categorias_modelo->obtenerCategoriaSeleccionada($idcategoria);\n $data['obtenerCategoriaSeleccionada'] = $obtenerCategoriaSeleccionada;\n $data [\"contenido_principal\"] = \"categorias/actualizar_categorias\";\n $data [\"titulo\"] = \"Actualización de Categorias\";\n $this->load->view(\"includes/template_catalogo\", $data);\n }", "title": "" }, { "docid": "2348f6c19247b57837cdd1799617046c", "score": "0.6209709", "text": "public function getCategoriaController(){\n\t\t$id = (isset($_GET['id'])) ? $_GET['id'] : \"\"; //verificacion del id\n\t\t$peticion = Crud::getRegModel($id, 'categorias', $_SESSION['tienda']); //peticion al modelo del registro especificado por el id\n\t\tif(!empty($peticion)){\n\t\t\techo \"\n\t\t\t\t<div class='form-group'>\n <p>\n <label>Id</label>\n <input type='text' class='form-control' name='id' value='\".$peticion['id'].\"' placeholder='' required='' readonly='true'>\n </p>\n </div>\n <div class='form-group'>\n <p>\n <label>Nombre</label>\n <input type='text' class='form-control' name='nombre' value='\".$peticion['nombre'].\"' placeholder='Ingresa el nombre de la categoria' required=''>\n </p>\n </div>\n \";\n\t\t}\n\t}", "title": "" }, { "docid": "da4ae7314996659343b145b261e34133", "score": "0.6204957", "text": "public function getCat_id() {\r\n\t\t\t\t\t\treturn $this->cat_id;\r\n\t\t\t\t\t}", "title": "" }, { "docid": "c14c08544eacc9c1b5dd8b273269e610", "score": "0.61790913", "text": "function getCategoriaByIdCategoria($nId)\n\t{\n\t\t// Variables\n\t\tglobal $languages_id;\n\t\t$aCategorias = null;\n\n\n\t\t$aCategorias = tep_db_query( 'SELECT ctgr.categories_id, ctgr.categories_image, desp.categories_name, ctgr.categories_image, ctgr.parent_id\n\t\t\t\t\t\t\t\t\t FROM ' . TABLE_CATEGORIES . ' ctgr\n\t\t\t\t\t\t\t\t\t INNER JOIN ' . TABLE_CATEGORIES_DESCRIPTION . ' desp ON(ctgr.categories_id = desp.categories_id)\n\t\t\t\t\t\t\t\t\t WHERE desp.language_id = ' . (int)$languages_id . ' AND ctgr.categories_id = ' . $nId );\n\n\t\treturn (tep_db_num_rows( $aCategorias ) ? tep_db_fetch_array( $aCategorias ) : false);\n\t}", "title": "" }, { "docid": "eb88009d67a6ffa20a5fd8c1a1fc6bc8", "score": "0.61639583", "text": "function filtrar_categoria($id_categoria) {\n $libros = $this->model->getCategoria($id_categoria);\n $categorias = $this->modelcat->getAll();\n $this->view->showHome($libros, $categorias);\n }", "title": "" }, { "docid": "8d8c3bcfc0132fe8429c6f728573cdc3", "score": "0.61457235", "text": "public function getCategorie() {\n return Categorie::getById($this->getId_categorie());\n }", "title": "" }, { "docid": "00cc621a7e3a53d38b0d56e810215ac5", "score": "0.61432225", "text": "public function getCategoryId();", "title": "" }, { "docid": "3a404275c2a42cc6dcfaee0d08259262", "score": "0.6139315", "text": "public function buscaPorCategoria($id) {\n return $this->produtoModel->buscaPorCategoria($id);\n }", "title": "" }, { "docid": "9ad93fa11b93353cb285bf4a782e2473", "score": "0.61294657", "text": "public static function getDescricaoCategoriaAcordo($iCategoria = 0){\n\n $sCategoria = 'Não Informado';\n $oDaoCategoria = db_utils::getDao(\"acordocategoria\");\n $sSqlCategoria = $oDaoCategoria->sql_query_file(null, \"*\", null, \"ac50_sequencial = {$iCategoria}\");\n\n\n $rsCategoria = $oDaoCategoria->sql_record($sSqlCategoria);\n if ($oDaoCategoria->numrows > 0) {\n\n $sCategoria = db_utils::fieldsMemory($rsCategoria, 0)->ac50_descricao;\n }\n return $sCategoria;\n }", "title": "" }, { "docid": "49b03a6d4a25016713f3a7174cf8e139", "score": "0.6127034", "text": "function pesquisarUsuarioCategoria($id){\n return $this->dao->buscarUsuarioCategoria($id);\n }", "title": "" }, { "docid": "9880097b4d1af41408dbc226477e0ce1", "score": "0.6125101", "text": "public function datosModificar($id) {\n $this->idcategoria=$id;\n $this->consulta= $this->con->query(\"SELECT * FROM categorias WHERE idCategoria ='$this->idcategoria'\"); \n if($this->datos=$this->consulta->fetch_array()){\n ?>\n <div class=\"row clearfix\">\n <div class=\" col-md-3\">\n <div class=\"form-group\">\n <label for=\"categoria\">Categoría</label>\n <input type=\"text\" class=\"form-control\" id=\"categoria\" name=\"categoria\" value=\"<?php echo $this->datos['nombreCategoria']?>\" required=\"\">\n </div>\n </div> \n </div> \n <?php \n }\n $this->con->close();\n }", "title": "" }, { "docid": "32bb951bf22250c7581512f32914a338", "score": "0.61242294", "text": "protected function _getCategoria(){\n if (!is_object($this->_categoria)){\n $this->_categoria = new Cms_Model_Categoria_Mapper();\n }\n return $this->_categoria;\n }", "title": "" }, { "docid": "9bde30aedd8b3fc1c78c5414c60ecb1d", "score": "0.61164963", "text": "function getNBLivreCat(int $idCategorie) : int {\n try{\n $req = \"SELECT * FROM livre WHERE idCategorie=$idCategorie\";\n $lignereq =($this->db)->query($req);\n $result =$lignereq->fetchAll(PDO::FETCH_CLASS,'Livre');\n }\n catch(PDOException $e){\n return NULL;\n }\n $som = 0;\n foreach ($result as $livre) {\n $som += 1;\n }\n return $som;\n }", "title": "" }, { "docid": "7e34377db8f6df0b030184671ca4fc9f", "score": "0.610767", "text": "public function getKategori() {\n return explode('.', $this->getId())[0];\n }", "title": "" }, { "docid": "ddced5ebcf787de5f5ad4c942d0bbbec", "score": "0.6067403", "text": "function get_kategori_val($for_modul) {\n\n\t$ci = &get_instance();\n\t$data_ref_jenis_rapat = $ci->db\n\t\t->where('for_modul', $for_modul)\n\t\t->get('kategori')->result_array();\n\t$ref_kategori = [];\n\tforeach ($data_ref_jenis_rapat as $v) {\n\t\t$ref_kategori[$v['id_kat']] = $v['cat_name'];\n\t}\n\treturn $ref_kategori;\n}", "title": "" }, { "docid": "efaa30f644a34291f24773eb4655eb9a", "score": "0.60661334", "text": "function get_category_id()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_CATEGORY_ID);\r\n }", "title": "" }, { "docid": "bfaf7ef880718b2b27fd379c00207574", "score": "0.6050808", "text": "public function getCategoryId()\n {\n $value = $this->get(self::category_id);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "a3b929acbca75955dd511ba0f32d5fec", "score": "0.6040755", "text": "public function obtenerUltimoId()\r\n\t{\r\n\t\treturn parent::obtenerUltimoCodigo($this->tabla_categorias, 'c_id');\r\n\t}", "title": "" }, { "docid": "a4d9fa22813d25e419b10f65bade38a8", "score": "0.60377103", "text": "public function getCatId()\n {\n return $this->catId;\n }", "title": "" }, { "docid": "83a08b4b16c0cc0b2dfa26fc1e68813a", "score": "0.6035813", "text": "public function __toString()\n {\n return $this->categorie;\n }", "title": "" }, { "docid": "e5e7bb69cd0f0f87b7e9643a7fac517c", "score": "0.6022799", "text": "public function __toString(){\n return $this->nomCarburant;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "a0290b3947c9f70ea5eed2f4a25f8c39", "score": "0.6021504", "text": "public function Categoria(){\n\t\t$query=\"Select * from categorias\";\n\t\t$Categoria=$this->db->query($query);\n\t\treturn $Categoria->result();\n\t}", "title": "" }, { "docid": "ed76da872578020b236fcc0961a9088d", "score": "0.60123134", "text": "function obtenerC($categoria){\n \n if(!$this->redis->get($categoria)) {\n $sql = \"SELECT * FROM productos WHERE categoria = '\".$categoria.\"' \";\n \n $consulta = $this->conexion->query($sql);\n $datos = $consulta->fetch_all(MYSQLI_ASSOC);\n $this->redis->set($categoria, serialize($datos));\n $this->redis->expire($categoria, 120);\n return $datos;\n } else {\n return unserialize($this->redis->get($categoria));\n }\n}", "title": "" }, { "docid": "448287e21aef42b9d10bc216945a92bb", "score": "0.60112226", "text": "public function category()\n\t{\n\t\treturn $this->cat_id;\n\t}", "title": "" }, { "docid": "440929cb6a4c1834a069466435c303a7", "score": "0.599932", "text": "public function setsubcategoriaIdAttribute($valor){\n $this->attributes['subcategoria_id'] = empty($valor) ? null : $valor;\n }", "title": "" }, { "docid": "7c825cdcc401f446ada5e354f76cedd0", "score": "0.5995493", "text": "function editar_categoria($categoria){\n if(categoria_x_nombre($categoria, false)){\n include_once ('conexion.php');\n $con = getConexion(); \n $sql = \"UPDATE categoria SET nombre = '$categoria->nombre' WHERE id = '$categoria->id'\"; \n $result = $con->query($sql); \n\n if($con->connect_errno){\n $con->close(); \n return false; \n }\n return $result; \n }\n }", "title": "" }, { "docid": "0fcf9230a205c069bb1022d33ee10473", "score": "0.59951305", "text": "public function getCategoryId()\n {\n return $this->category_id;\n }", "title": "" }, { "docid": "0fcf9230a205c069bb1022d33ee10473", "score": "0.59951305", "text": "public function getCategoryId()\n {\n return $this->category_id;\n }", "title": "" }, { "docid": "378194c2f339ff318b3339e80618c3ad", "score": "0.5992627", "text": "function getCategoriaProducto($nId)\n\t{\n\t\t// Variables\n\t\tglobal $languages_id;\n\t\t$nId = tep_get_product_path( $nId );\n\n\t\t$aCategorias = tep_db_query( 'SELECT c.categories_id, cd.categories_name \n\t\t\t\t\t\t\t\t\t FROM ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd\n\t\t\t\t\t\t\t\t\t WHERE c.categories_id = ' . (int)$nId . ' and c.categories_id = cd.categories_id and cd.language_id = ' . (int)$languages_id );\n\n\t\twhile( $aCategoria = tep_db_fetch_array( $aCategorias ) )\n\t\t{\n\t\t\t$aSalida['nombre'] = $aCategoria['categories_name'];\n\t\t\t$aSalida['id'] = $aCategoria['categories_id'];\n\t\t}\n\n\t\treturn $aSalida;\n\t}", "title": "" }, { "docid": "293b0dadc20802aa8a401834eb5c0741", "score": "0.59905535", "text": "public function _getCategoryById( $id ) {\n\t\tif (! is_numeric ( $id ) ) {\n\t\t\tthrow new EErroConsulta ();\n\t\t} else {\n\t\t\t//nothing to do here\n\t\t}\n\t\t$category = $this->categoryDAO->idFind ( $id );\n\t\treturn $categoria;\n\t}", "title": "" }, { "docid": "233b5807174b15f3be8b03bc716f316c", "score": "0.59728134", "text": "function getCat(){\n\t\tglobal $tsdb, $tsCore;\n\t\t//\n\t\t//$db = $this->getDBtypes();\n\t\t$cid = $tsCore->setSecure($_GET['cid']);\n\t\t//\n\t\t$query = $tsdb->select(\"p_categorias\",\"*\",\"cid = {$cid}\",\"\",1);\n\t\t$data = $tsdb->fetch_assoc($query);\n\t\t$tsdb->free($query);\n\t\t//\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "626ed5a36a22b9f2a8ee82303cc5b683", "score": "0.5971209", "text": "public function getCategoryID()\n {\n return $this->categoryID;\n }", "title": "" }, { "docid": "626ed5a36a22b9f2a8ee82303cc5b683", "score": "0.5971209", "text": "public function getCategoryID()\n {\n return $this->categoryID;\n }", "title": "" }, { "docid": "06debef48e9ec1055f2d055e4374e8e6", "score": "0.5969157", "text": "static function BuscarCategoria\n\t(\n\t\t$id_categoria = null, \n\t\t$id_categoria_padre = null, \n\t\t$query = null\n\t);", "title": "" }, { "docid": "dd1856bd4e199343845fc18adb0f3e6d", "score": "0.5961289", "text": "public function getCategorie($categorieId)\n\t{\n\t\t$req = $this->db->prepare('SELECT * FROM categories WHERE id = ?');\n\t\t$req->execute([$categorieId]);\n\t\t$categorie = $req->fetch();\n\t\treturn $categorie;\n\t}", "title": "" }, { "docid": "0aa38b170a80f75f916bff41cdac0b84", "score": "0.5958117", "text": "public static function get_category_by_id($id){\n $name=category::where('entity_id',$id)->first();\n return $name->name;\n }", "title": "" }, { "docid": "d9bcd1345e4dbf176f550239cf36b4f4", "score": "0.59553295", "text": "public function getCategorias()\n {\n $query = $this->db->query(\"SELECT * FROM categorias ORDER BY nombre asc\");\n\n $resultado = $query->result_array();\n if($resultado == NULL)\n {\n return 0;\n }\n else\n {\n return $resultado;\n }\n }", "title": "" }, { "docid": "0265fc63df5a2c6e8036ace57034ba4e", "score": "0.5951439", "text": "function CategoriaUser($categoriaCarta){\n\n if($categoriaCarta==1){\n return 2;\n }\n else{\n return $categoriaCarta;\n }\n }", "title": "" }, { "docid": "5a5ad7217941abe5e2c7058c2ae6f366", "score": "0.5945441", "text": "public function getCategory(): string {\n return $this->category;\n }", "title": "" }, { "docid": "10f25fd6e450fdc0bd6ef3b3affa4551", "score": "0.59399384", "text": "public function getCategorie()\n\t{\n\t\treturn Categoria::orderBy('order', 'asc')->get();\n\t}", "title": "" }, { "docid": "9a1acf54277a5f33e0c45b77158552f1", "score": "0.5905618", "text": "public function getList_antimos(){\n $sql = \"SELECT * FROM `categories` WHERE `id` = 38 \";\n\n // $id = (int)$id;\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "356070c7a8f1a93f976008c371089b45", "score": "0.59034157", "text": "public function getDivisiIdAttribute($value)\n {\n $divisi = Divisi::find($value);\n $value = $divisi['nama'];\n return $value;\n }", "title": "" }, { "docid": "76aa2865aeb3eedfda9d1ee79fc7677b", "score": "0.58997065", "text": "public function editarCategoria($idCategoria, $nombreCategoria){\n \n $query = \"UPDATE tb_categoriasProductos SET nombre = '$nombreCategoria' WHERE idCategoria = '$idCategoria' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\n\t\t\t\n }", "title": "" }, { "docid": "ad9ffd92e32469cf9e559302a2c548e0", "score": "0.5895049", "text": "public function activarCategoria($idCategoria){\n\n \n $query = \"UPDATE tb_categoriasProductos SET estado = 'A' WHERE idCategoria = '$idCategoria' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\n\t\t\t\n\t\t\t\n }", "title": "" }, { "docid": "ef4a906a8e4db8f138ee3544cd58e986", "score": "0.5883453", "text": "public function capturarId(){\n //include_once 'class.conexon.php';\n //$con = new Conexion;\n $sql = \"SELECT * FROM sicloud.categoria ORDER BY ID_categoria DESC LIMIT 1 \";\n $stm = $this->db->prepare($sql);\n $stm->execute();\n $result = $stm->fetchAll(); \n return $result;\n //$datos = $con->query($sql);\n //while ($row = $datos->fetch_array());\n //$id = $row['ID_categoria'];\n //return $id;\n }", "title": "" }, { "docid": "75550ddb755829a2305bbb27fcb703ad", "score": "0.58716804", "text": "static function EditarCategoria\n\t(\n\t\t$id_categoria, \n\t\t$descripcion = null, \n\t\t$id_categoria_padre = null, \n\t\t$nombre = null\n\t);", "title": "" }, { "docid": "c69792e77c8a914d59c59828da646420", "score": "0.5866884", "text": "function getMejoresCategorias(){\n\t$sql = \"SELECT CATEGORIAS.ID, CATEGORIAS.NOMBRE_CATEGORIA , SUM(PUNTUACION) AS PUNTUACION1\n\t\t\t\tFROM CATEGORIAS\n\t\t\t\tLEFT JOIN PRODUCTOS_CATEGORIAS ON PRODUCTOS_CATEGORIAS.ID_CATEGORIA = CATEGORIAS.ID\n\t\t\t\tINNER JOIN PRODUCTOS ON PRODUCTOS.ID = PRODUCTOS_CATEGORIAS.ID_PRODUCTO\n\t\t\t\tINNER JOIN VALORACIONES ON PRODUCTOS.ID = VALORACIONES.ID_PRODUCTO\n GROUP BY ID\n \t\t\tORDER BY PUNTUACION1 DESC\";\n\t$resultado = $this->mysqli->query($sql);\n\n\treturn $resultado;\n}", "title": "" }, { "docid": "55f93c594150c36e5afb2db41f1f3cc2", "score": "0.5848361", "text": "public function getCategoryId()\n {\n return $this->categoryId;\n }", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5840229", "text": "public function getCategory();", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5840229", "text": "public function getCategory();", "title": "" }, { "docid": "57c67f7dd96f73bc2bd3afc91fb07c85", "score": "0.5837907", "text": "function get($id) {\n $query = $this->db->prepare('SELECT * FROM producto WHERE id = ?');\n $query->execute([$id]);\n \n //3. Obtengo la rta con un Fetch en este caso (por ser varias 1 categoria)\n return $query->fetch(PDO::FETCH_OBJ); //Arreglo de categorias \n }", "title": "" }, { "docid": "baff348fe9230c8b1117afa02f2fbe4d", "score": "0.5830444", "text": "public function getCategoryId()\n {\n\n return $this->category_id;\n }", "title": "" }, { "docid": "4d43588d1aa8a795639cc6c2dff8ffaf", "score": "0.5814505", "text": "public function mostrar($idcategoria)\n{\n $sqlcuat= \"SELECT * FROM categoria where idcategoria='$idcategoria'\";\n return ejecutarConsultaSimpleFila($sqlcuat);\n\n}", "title": "" } ]
ab6d4b977b18d57b112c9fbfb3360874
The Console_Table filter callback limits output to 80 columns.
[ { "docid": "94f2f7c14b7460c435882918d8d21dfc", "score": "0.0", "text": "function _splitFilename($data)\r\n {\r\n $str = '';\r\n if (strlen($data) > 0) {\r\n $sep = DIRECTORY_SEPARATOR;\r\n $base = basename($data);\r\n $padding = $this->split - strlen($this->glue);\r\n\r\n if (isset($this->dir)) {\r\n $dir = str_replace(array('\\\\', '/'), $sep, $this->dir);\r\n } else {\r\n $dir = str_replace(array('\\\\', '/'), $sep, dirname($data));\r\n }\r\n $str = str_replace($dir, '[...]', dirname($data)) . $sep;\r\n\r\n if (strlen($str) + strlen($base) > $this->split) {\r\n $str = str_pad($str, $padding) . $this->glue . \"\\r\\n\";\r\n if (strlen($base) > $this->split) {\r\n $str .= '[*]' . substr($base, (3 - $this->split)) ;\r\n } else {\r\n $str .= substr($base, -1 * $padding) ;\r\n }\r\n } else {\r\n $str .= $base;\r\n }\r\n }\r\n return $str;\r\n }", "title": "" } ]
[ { "docid": "639fad16cdbebec731e4869d6a2016e2", "score": "0.5676517", "text": "public function applyFilter()\n {\n\n $ilMyTableGUI = new ilMyTableGUI($this, self::CMD_STANDARD);\n $ilMyTableGUI->writeFilterToSession();\n $ilMyTableGUI->resetOffset();\n $this->ctrl->redirect($this, self::CMD_STANDARD);\n\n }", "title": "" }, { "docid": "0abd03d9858908463c8672406009aa17", "score": "0.5480457", "text": "public function hasCellsPerColumnLimitFilter(){\n return $this->_has(12);\n }", "title": "" }, { "docid": "4856036798a5f0226c897bc34625ef65", "score": "0.52611506", "text": "function getTableFilterHTML()\r\n\t{\r\n\t\t$html = $this->render();\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "be8247a119b3945eabbb9b467836b3ae", "score": "0.51796186", "text": "function getColumnCount() { }", "title": "" }, { "docid": "be8247a119b3945eabbb9b467836b3ae", "score": "0.51796186", "text": "function getColumnCount() { }", "title": "" }, { "docid": "433cc2c27f3a585345dd9406daf814d3", "score": "0.5087136", "text": "public function resetFilter()\n {\n $ilMyTableGUI = new ilMyTableGUI($this, self::CMD_STANDARD);\n $ilMyTableGUI->resetOffset();\n $ilMyTableGUI->resetFilter();\n $this->ctrl->redirect($this, self::CMD_STANDARD);\n }", "title": "" }, { "docid": "8407675ddf565a2cf4020e5c8597ab28", "score": "0.50565374", "text": "function bbp_filter_column_headers($columns = array())\n{\n}", "title": "" }, { "docid": "312b062348c488b821f9896042436181", "score": "0.50551295", "text": "public function renderFilterCell()\n\t{\n\t\techo CHtml::openTag('td',$this->filterHtmlOptions);\n\t\t$this->renderFilterCellContent();\n\t\techo \"</td>\";\n\t}", "title": "" }, { "docid": "5c1cb6afa411c1f1d762c8ecaf7c5655", "score": "0.49707308", "text": "function get_columns() {\n\n\t}", "title": "" }, { "docid": "0bf316e7b57e878d1d095a01db151eb4", "score": "0.49684218", "text": "public function outputTableRow() {\r\n $args = func_get_args();\r\n $mask_len = 90;\r\n $mask = $this->getOutputIndent() . \"%-\". $mask_len . \".\" . $mask_len . \"s %20.20s \\n\";\r\n \r\n if ($this->output_CLI) {\r\n foreach ($args as $key => $value) {\r\n $args[$key] = $this->replaceColors($value);\r\n }\r\n // If the first row is longer than the mask, print onto multiple rows with status at the end.\r\n $rows = array();\r\n $description = $args[0];\r\n $count = 0;\r\n while (strlen($description) > 0) {\r\n $rows[] = array(\r\n $mask,\r\n substr($description, 0, $mask_len),\r\n (!$count ? $args[1] : ''),\r\n );\r\n $description = substr($description, $mask_len);\r\n $count++;\r\n }\r\n\r\n // Print each row.\r\n foreach ($rows as $row) {\r\n call_user_func_array('printf', $row);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ad99560a9e172480c7bc206184bd7999", "score": "0.49571416", "text": "function truncate($table);", "title": "" }, { "docid": "1c7462c6fd74e8f6fb43a35a30fe7b71", "score": "0.4953616", "text": "public function ReadRecords($args)\r\n\t{\r\n\t\t$table = isset($args[\"table\"]) ? $args[\"table\"] : \"\";\t\t\r\n\t\t$sort = isset($args[\"sort\"]) ? $args[\"sort\"] : \"\";\r\n\t\t$prefilter = isset($args[\"prefilter\"]) ? $args[\"prefilter\"] : \"\";\r\n\t\t$filters = isset($args[\"filters\"]) ? $args[\"filters\"] : \"\";\r\n\t\t$page = isset($args[\"page\"]) ? $args[\"page\"] : \"\";\r\n\t\t$maxlines = isset($args[\"maxlines\"]) ? $args[\"maxlines\"] : \"\";\r\n\r\n\t\t#\r\n\t\t# make conditions for the query\r\n\t\t#\r\n\t\t$conditions='';\r\n\t\t#\r\n\t\t# translate filters to query conditions\r\n\t\t#\r\n\t\t#\r\n\t\t# first check prefilter\r\n\t\t#\r\n\t\tif($prefilter)\r\n\t\t{\r\n\t\t\tforeach($prefilter as $i => $value) \r\n\t\t\t{\r\n\t\t\t\tif($conditions) {$conditions .= ' and '; }\r\n\t\t\t\t$conditions .= '('. $i . '=\"' . $value . '\")';\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($filters)\r\n\t\t{\r\n\t\t\tforeach($filters as $f => $value)\r\n\t\t\t{\r\n\t\t\t\tif($conditions) {$conditions .= ' and '; }\r\n\t\t\t\t#\r\n\t\t\t\t# If < or > before value search on <= resp >=\r\n\t\t\t\t#\r\n\t\t\t\tif(preg_match('/^>(.*)/',$value,$match)) \r\n\t\t\t\t{\r\n\t\t\t\t\t$value = $match[1];\r\n\t\t\t\t\t$conditions .= '('. $f . ' >= \"' . $value . '\")';\r\n\t\t\t\t}\r\n\t\t\t\t#\r\n\t\t\t\t# when prefix of filter is max_ then the key the maximum value of a field.\r\n\t\t\t\t#\r\n\t\t\t\telseif(preg_match('/^<(.*)/',$value,$match)) \r\n\t\t\t\t{\r\n\t\t\t\t\t$value = $match[1];\r\n\t\t\t\t\t$conditions .= '('. $f . ' <= \"' . $value . '\")';\r\n\t\t\t\t}\r\n\t\t\t\t# if key numerical search on full field or word in field\r\n\t\t\t\t#\r\n\t\t\t\t#\r\n\t\t\t\telseif(is_numeric($value))\r\n\t\t\t\t{\r\n\t\t\t\t\t$conditions .= '('. $f . ' = \"' . $value . '\"';\r\n\t\t\t\t\t$conditions .= ' or ';\r\n\t\t\t\t\t$key = '\"' . $value . '\" ';\r\n\t\t\t\t\t$conditions .= $f . ' LIKE ' . $key;\r\n\t\t\t\t\t$conditions .= \" or \";\r\n\t\t\t\t\t$key = ' \"' . $value . '\" ';\r\n\t\t\t\t\t$conditions .= $f . \" LIKE \" . $key;\r\n\t\t\t\t\t$conditions .= \" or \";\r\n\t\t\t\t\t$key = ' \"' . $value . '\"';\r\n\t\t\t\t\t$conditions .= $f . ' LIKE ' . $key . ')';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif(preg_match(\"/#/\",$value))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$key=substr($value,1); #search on full content\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$key = \"%\" . $value . \"%\"; #match on content\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$conditions .= '('. $f . ' LIKE \"' . $key . '\")';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t#\r\n\t\t# start the query\r\n\t\t#\r\n\t\t#echo \"<br>conditions=\" . $conditions;\r\n\t\tglobal $wpdb;\r\n\t\t$wptable = $wpdb->prefix . $table;\r\n\t\t$query='SELECT * FROM '. $wptable;\r\n\t\tif($conditions) { $query .= ' WHERE ' . $conditions;}\r\n\t\t#\r\n\t\t# sort argument\r\n\t\t# translate to query sort field\r\n\t\t#\r\n\t\t#echo \"<br>sort=\" . $sort;\r\n\t\tif($sort && $sort != \"no\")\r\n\t\t{\r\n\t\t\t$query .= ' ORDER BY ' . $sort;\r\n\t\t}\r\n\t\t#\r\n\t\t# $limit is maximum number of rows to be displayed\r\n\t\t# $page = current pagenumber\r\n\t\t# so calculate offset\r\n\t\t#\r\n\t\tif($maxlines)\r\n\t\t{\r\n\t\t\t$offset=0;\r\n\t\t\tif(is_numeric($maxlines)) { $offset=($page-1)*$maxlines; }\r\n\t\t\t$query .= ' LIMIT '.$offset.','. $maxlines;\r\n\t\t}\r\n\t\t#\r\n\t\t#echo '<br>' . $query;\r\n\t\t$rows=$wpdb->get_results( $query );\r\n\t\treturn($rows);\r\n\t}", "title": "" }, { "docid": "1b9909fe6406bc9c942b3e7319146c9a", "score": "0.49484298", "text": "public function hasCellsPerRowLimitFilter(){\n return $this->_has(11);\n }", "title": "" }, { "docid": "bda0f03e449e9d2f703ad92b4a2c20f6", "score": "0.4924372", "text": "public static function add_subscriptions_table_column_filter(){\n\t\tadd_filter( 'manage_' . self::$admin_screen_id . '_columns', __CLASS__ . '::get_subscription_table_columns' );\n\t}", "title": "" }, { "docid": "d7aad547d90deeb860aa9da6e008fad9", "score": "0.4920271", "text": "public function hasColumnRangeFilter(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "b8a41d7cc665a5efed565a69e76a5aee", "score": "0.4883934", "text": "protected function getFilter()\n {\n return new TruncateStringFilter(15);\n }", "title": "" }, { "docid": "104e72790d3a2dd361024606162b6614", "score": "0.48804057", "text": "function e107cli_print_table($rows, $header = FALSE, $widths = array()) {\n $tbl = new Console_Table(CONSOLE_TABLE_ALIGN_LEFT, '');\n\n $auto_widths = e107cli_table_column_autowidth($rows, $widths);\n\n // Do wordwrap on all cells.\n $newrows = array();\n\n foreach ($rows as $rowkey => $row) {\n foreach ($row as $col_num => $cell) {\n $newrows[$rowkey][$col_num] = wordwrap($cell, $auto_widths[$col_num], \"\\n\", TRUE);\n if (isset($widths[$col_num])) {\n $newrows[$rowkey][$col_num] = str_pad($newrows[$rowkey][$col_num], $widths[$col_num]);\n }\n }\n }\n\n if ($header) {\n $headers = array_shift($newrows);\n $tbl->setHeaders($headers);\n }\n\n $tbl->addData($newrows);\n\n e107cli_print($tbl->getTable());\n\n return $tbl;\n}", "title": "" }, { "docid": "baa3d4cfd6b94c9703f9c4609f465fe8", "score": "0.48719633", "text": "public function searchTableRowsWithPagination();", "title": "" }, { "docid": "a9d0c085c8f2039a18b4bc875c5fd271", "score": "0.4856814", "text": "public function inspectTable()\n\t{\n\t\tif (defined('static::TABLENAME'))\n\t\t{\n\t\t\t$this->tabledefinition = array_map(function ($value)\n\t\t\t{\n\t\t\t\t$return = array();\n\n\t\t\t\t$return['type'] = $value;\n\n\t\t\t\tif (preg_match('/(set|enum)\\((.*)\\)/', $value, $matches))\n\t\t\t\t{\n\t\t\t\t\t$return['option'] = array_map(function ($value)\n\t\t\t\t\t{\n\t\t\t\t\t\t// return ucwords( trim($value, \"'\") );\n\t\t\t\t\t\treturn trim($value, \"'\");\n\t\t\t\t\t}, explode(',', $matches[2]));\n\t\t\t\t}\n\n\t\t\t\t$return['length'] = $matches[2];\n\n\t\t\t\treturn $return;\n\t\t\t}, \\R::inspect(static::TABLENAME));\n\t\t}\n\t}", "title": "" }, { "docid": "1f73890c480faa69a604168ba40518a9", "score": "0.48554754", "text": "public function setOutputColumns()\n\t{\n\t\t$this->outputColumns = array();\n\n\t\t//Run thru all columns\n\t\tfor($i=0; $i < func_num_args(); $i++)\n\t\t{\n\t\t\t//Check, if the value is valid\n\t\t\t$arg = func_get_arg($i);\n\t\t\tif (($arg >= 0) && ($arg <= CClientLister::COLUMN_MAX))\n\t\t\t\t$this->outputColumns[$i] = $arg;\n\t\t\telse\n\t\t\t\tdie (\"setOutputColumns: Unknown constant ($arg).\");\n\t\t}\n\t}", "title": "" }, { "docid": "7b660e39dbd322d7e1a65a9e91db9d91", "score": "0.48377258", "text": "function has_unlimited_columns() { return $this->columns_num < 0; }", "title": "" }, { "docid": "bf4779720f0700cfc4293463c8234ce9", "score": "0.48178184", "text": "protected function truncateTable()\n {\n // TODO: Implement truncateTable() method.\n }", "title": "" }, { "docid": "bf4779720f0700cfc4293463c8234ce9", "score": "0.48178184", "text": "protected function truncateTable()\n {\n // TODO: Implement truncateTable() method.\n }", "title": "" }, { "docid": "dfef31413045bd86a8e70bfb3e19143f", "score": "0.4807727", "text": "public function tableFilters(){\n $filters['status'] = ['active', 'inactive', 'blocked'];\n return ($filters);\n }", "title": "" }, { "docid": "289322b0e1e75efa874343eb1572fe61", "score": "0.47988778", "text": "function set_col_filter($col_filter) {\n $this->col_filter = $col_filter;\n }", "title": "" }, { "docid": "881672acb742cefae3d46b9ccc2f9e63", "score": "0.47941166", "text": "function viewTable($config, $fn=null, $columnHeadings='') {\n $totalrows = $config['rowcount'];\n $totalpages = $config['pagecount'];\n $page = $config['page'];\n $limit = $config['limit'];\n $data = $config['data'];\n \n ////// Add header //////\n // can be passed in as CSV or array\n echo '<thead><tr><th colspan=\"999\" style=\"text-align:left;\">'.$totalrows.' Results - Page '.$page.' of '.$totalpages.'</th></tr><tr>';\n if(getType($columnHeadings) == 'string' && strlen($columnHeadings) > 0) {\n $columnHeadings = explode(',', $columnHeadings); // split by comma\n }\n if(getType($columnHeadings) == 'array') {\n if(count($data) > 0 && getType($data[0]) == 'array') {\n $datakeys = array_keys($data[0]);\n } else {\n $datakeys = $columnHeadings; // this might not work but just do something!!\n }\n $current = 0;\n foreach($columnHeadings as $column) {\n echo '<th>'.$column.' <a href=\"#\" onclick=\"sortdata(\\''.$datakeys[$current].'\\',\\'asc\\')\">&#9650;</a><a href=\"#\" onclick=\"sortdata(\\''.$datakeys[$current].'\\',\\'desc\\')\">&#9660;</a></th>';\n $current++;\n }\n } else {\n // get headings from data\n foreach($data as $dataitem) {\n foreach($dataitem as $datakey => $dataproperty) {\n echo '<th>'.$datakey.' <a href=\"#\" onclick=\"sortdata(\\''.$datakey.'\\',\\'asc\\')\">&#9650;</a><a href=\"#\" onclick=\"sortdata(\\''.$datakey.'\\',\\'desc\\')\">&#9660;</a></th>';\n }\n break;\n }\n }\n echo '</tr></thead>';\n \n ////// Add body //////\n echo '<tbody>';\n if($fn==null) {\n foreach($data as $dataitem) {\n echo '<tr>';\n foreach($dataitem as $datakey => $dataproperty) {\n echo '<td>'.$dataproperty.'</td>';\n }\n echo '</tr>';\n }\n } else {\n foreach($data as $dataitem) {\n if(function_exists($fn)) $fn($dataitem);\n else echo 'Error: Function '.$fn.' not found!';\n }\n }\n echo '</tbody>';\n \n ////// Add footer (pagination) //////\n echo '<tfoot><tr><td colspan=\"999\">';\n for($i=1; $i<=$totalpages; $i++) {\n echo '<a href=\"#\" onclick=\"loadPage('.$i.','.$limit.'); return false;\">'.$i.'</a> | ';\n }\n echo '</td></tr></tfoot>';\n \n }", "title": "" }, { "docid": "414edc89f47832960757f095ec55303b", "score": "0.47841084", "text": "public function getColumns($table)\n {\n }", "title": "" }, { "docid": "03d9ba3ef2bc07da89bc43b46cea9415", "score": "0.47628048", "text": "public function testRenderLimitOptions_WithoutLimitOptions()\n {\n $settings = array(\n 'paginate' => array(\n 'limit' => array(\n 'options' => array()\n )\n )\n );\n\n $table = $this->getConcreteTableBuilder();\n\n $table->setSettings($settings);\n\n $this->assertEquals('', $table->renderLimitOptions());\n }", "title": "" }, { "docid": "a48e3cb38b21cde793bffc8ee70b9503", "score": "0.4761023", "text": "public function columns();", "title": "" }, { "docid": "a48e3cb38b21cde793bffc8ee70b9503", "score": "0.4761023", "text": "public function columns();", "title": "" }, { "docid": "4e1b72f3dd346bf56219664d3fa0219a", "score": "0.47602165", "text": "function renderTable($metadata, $data, $edit, $paginate, $action = 'delete') {\n\tif ($paginate > 0) {\n\t\techo '<script type=\"text/javascript\">numPerPage = ' . $paginate . ';</script>';\n\t} ?>\n\t<form><input id=\"searchInput\" type=\"text\" width=\"30\" /></form>\n\t<table class='<?php if ($edit) echo \"editable \"; if ($paginate > 0) echo \"paginated \";?>bordered filtered'>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>\n\t\t\t\t<ul>\n<?php\tforeach ($metadata as $col => $val) {\n\t\t\tif (!isset($val['subtable'])) {\n\t\t\t\t\techo \"<li class='\".$col.\"'>\".$val['title'].\"</li>\";\n\t\t\t}\n\t\t} ?>\n\t\t\t\t\t<li class='action'>Action</li>\n\t\t\t\t</ul>\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n<?php\t\tforeach ($data['main'] as $row) {\n\t\t\t\tdataRow($metadata, $row, $data, false, $action);\n\t\t\t}\n\t\t\tdataRow($metadata, null, $data, true); // last row is for adding ?>\n\t\t</tbody>\n\t</table>\n<?php\n}", "title": "" }, { "docid": "1f852851457e1fbb6b0184df0a57e37d", "score": "0.47517788", "text": "function getColumnCount() {\n\t\treturn 3;\n\t}", "title": "" }, { "docid": "ba79945ff4f8346f86f089545e7e5b5f", "score": "0.471974", "text": "protected function getTableWordWrap(): int\n {\n $this->cachedTableFormatQueries['statues'] ??= DB::table('statuses')->count();\n\n return floor((new Terminal)->getWidth() / $this->cachedTableFormatQueries['statues']) / 2;\n }", "title": "" }, { "docid": "8d4f39b144b34f517965058abddf4266", "score": "0.4695648", "text": "public function get_columns()\n {\n }", "title": "" }, { "docid": "49d6ab6e383ebbdcb1f81c4fbb0dda2c", "score": "0.4670542", "text": "public function get_columns();", "title": "" }, { "docid": "7a3d3d72c1765a2a9fa09a0c7648b814", "score": "0.46667644", "text": "public function hasCellsPerRowOffsetFilter(){\n return $this->_has(10);\n }", "title": "" }, { "docid": "875232dc4caad873a2122f5ec32a9924", "score": "0.4664557", "text": "protected function tableBorder(): void\n {\n $this->tableLine('-', '-', '-');\n }", "title": "" }, { "docid": "ce39a1b4924c31e60492d10ea90f94cd", "score": "0.46626776", "text": "function searchColumns($lastColumn = false)\n{\n $filterLastColumn = $lastColumn ? '' : ':not(:last)';\n\n return \"\n function () {\n this.api().columns('$filterLastColumn').every(function (index) {\n var column = this;\n var header = $(column.header(index));\n var title = header.text();\n var input = document.createElement('input');\n $(input).attr('placeholder', 'type to filter');\n $(input).attr('class', 'form-control');\n $(input).appendTo($(column.footer()).empty())\n .on('change', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n });\n }\";\n}", "title": "" }, { "docid": "6838de4457af9a7bffb5b3c089fad699", "score": "0.46594343", "text": "private function process_frequency_table() {\n arsort($this->table);\n $count = count($this->table);\n $diffcount = ($this->max_count - $this->min_count) != 0 ? ($this->max_count - $this->min_count) : 1;\n $diffsize = ($this->max_font_size - $this->min_font_size) != 0 ? ($this->max_font_size - $this->min_font_size) : 1;\n $slope = $diffsize / $diffcount;\n $yintercept = $this->max_font_size - ($slope * $this->max_count); \n \n //cut the table so we have only $this->words_limit\n $this->table = array_slice($this->table, 0, $this->words_limit);\n \n foreach($this->table as $key => $val) { \t\n $font_size = (integer)($slope * $this->table[$key]->count + $yintercept);\n\n // Set min/max val for font size\n if ($font_size < $this->min_font_size) {\n $font_size = $this->min_font_size;\n } elseif ($font_size > $this->max_font_size) {\n $font_size = $this->max_font_size;\n }\n $this->table[$key]->size = $font_size;\n\n $this->table[$key]->angle = 0;\n if (rand(1, 10) <= $this->vertical_freq) $this->table[$key]->angle = 90;\n $this->table[$key]->box = imagettfbbox ($this->table[$key]->size * $this->padding_size, $this->table[$key]->angle - $this->padding_angle, $this->font, $key);\n }\n }", "title": "" }, { "docid": "a4a7f7cff7143bb66ba52d4b669c06db", "score": "0.4651208", "text": "protected function applyFilter()\n\t{\n\t\tif(!$this->not_overview)\n\t\t{\n\t\t\t$this->provider_id = null;\n\t\t}\n\n\t\tinclude_once(\"./Services/ADN/TA/classes/class.adnTrainingEventTableGUI.php\");\n\t\t$table = new adnTrainingEventTableGUI($this, \"listTrainingEvents\", $this->provider_id,\n\t\t\t!$this->archived, false, !$this->not_overview);\n\t\t$table->resetOffset();\n\t\t$table->writeFilterToSession();\n\n\t\t$this->listTrainingEvents();\n\t}", "title": "" }, { "docid": "1b37c2810954e7afd08fb978efea88a9", "score": "0.4622193", "text": "public static function mla_manage_columns_filter( ) {\r\n\t\tself::_localize_default_columns_array();\r\n\t\treturn self::$default_columns;\r\n\t}", "title": "" }, { "docid": "1b37c2810954e7afd08fb978efea88a9", "score": "0.4622193", "text": "public static function mla_manage_columns_filter( ) {\r\n\t\tself::_localize_default_columns_array();\r\n\t\treturn self::$default_columns;\r\n\t}", "title": "" }, { "docid": "d929bc3b9afea0c4983bdfbf83f05281", "score": "0.46128368", "text": "public static function columns();", "title": "" }, { "docid": "f6cd66733236609727a9fb97be1d41f3", "score": "0.46124676", "text": "public function display_rows();", "title": "" }, { "docid": "29753f30457f1cf44ab4518a0b294c85", "score": "0.46065605", "text": "public function listEventsByFilter($data_value){\n $sTable = $this->final_table;\n\n /* Array of database columns which should be read and sent back to DataTables. Use a space where\n * you want to insert a non-database field (for example a counter or static image)\n */\n $aColumns = array('id', 'ticker', 'market', 'date_ann', 'event_type', 'evname', 'content');\n $aColumns_filter = array('id', 'ticker', 'market', 'date_ann', 'event_type', 'evname', 'content');\n $aColumns2 = array('id', 'ticker', 'market', 'date_ann', 'event_type', 'evname', 'content');\n \n if($data_value != ''){\n $arr_dv = explode(',',$data_value);\n if(count($arr_dv) > 1){\n $this->db->where_in('event_type',$arr_dv);\n $sql_where = \"event_type in ('\".implode(\"','\",$arr_dv).\"')\";\n }else{\n $this->db->where('event_type',$data_value);\n $sql_where = \"event_type ='\".$data_value.\"'\";\n }\n }\n \n $iDisplayStart = $this->input->get_post('iDisplayStart', true);\n $iDisplayLength = $this->input->get_post('iDisplayLength', true);\n $iSortCol_0 = $this->input->get_post('iSortCol_0', true);\n $iSortingCols = $this->input->get_post('iSortingCols', true);\n $sSearch = $this->input->get_post('sSearch', true);\n $sEcho = $this->input->get_post('sEcho', true);\n \n // Paging\n if(isset($iDisplayStart) && $iDisplayLength != '-1')\n {\n $this->db->limit($this->db->escape_str($iDisplayLength), $this->db->escape_str($iDisplayStart));\n }\n \n // Ordering\n if(isset($iSortCol_0))\n {\n for($i=0; $i<intval($iSortingCols); $i++)\n {\n $iSortCol = $this->input->get_post('iSortCol_'.$i, true);\n $bSortable = $this->input->get_post('bSortable_'.intval($iSortCol), true);\n $sSortDir = $this->input->get_post('sSortDir_'.$i, true);\n \n if($bSortable == 'true')\n {\n $this->db->order_by($aColumns[intval($this->db->escape_str($iSortCol)) + 1], $this->db->escape_str($sSortDir));\n }\n }\n }\n \n /* \n * Filtering\n * NOTE this does not match the built-in DataTables filtering which does it\n * word by word on any field. It's possible to do here, but concerned about efficiency\n * on very large tables, and MySQL's regex functionality is very limited\n */\n if(isset($sSearch) && !empty($sSearch))\n {\n $a_filter = array();\n for($i=0; $i<count($aColumns_filter); $i++)\n {\n $bSearchable = $this->input->get_post('bSearchable_'.$i, true);\n \n // Individual column filtering\n if(isset($bSearchable) && $bSearchable == 'true')\n {\n $arr_search = explode(',',$sSearch);\n $a_filter = array();\n foreach($arr_search as $value_search){\n $value_search = trim($value_search);\n if($value_search == ''){\n continue;\n }else{\n $row = $this->db->query('SELECT COUNT(*) as count_row FROM '.$sTable.' WHERE '.$sql_where.' AND '.$aColumns_filter[$i] . ' LIKE \\'%' . $this->db->escape_like_str($value_search) . '%\\'')->row_array();\n if($row['count_row'] != 0){\n $a_filter[] = $aColumns_filter[$i] . ' LIKE \\'%' . $this->db->escape_like_str($value_search) . '%\\'';\n }\n }\n }\n if(!empty($a_filter)){\n $a_filter_final[] = implode(' AND ', $a_filter);\n }\n }\n }\n if(!empty($a_filter_final)){\n $this->db->where('((' . implode(') OR (', $a_filter_final) . '))', NULL, false);\n }\n }\n \n // Select Data\n $this->db->select('SQL_CALC_FOUND_ROWS '.str_replace(' , ', ' ', implode(', ', $aColumns)), false);\n $rResult = $this->db->get($sTable);\n \n // Data set length after filtering\n $this->db->select('FOUND_ROWS() AS found_rows');\n $iFilteredTotal = $this->db->get()->row()->found_rows;\n \n // Total data set length\n $iTotal = $this->db->count_all($sTable);\n \n // Output\n $output = array(\n 'sEcho' => intval($sEcho),\n 'iTotalRecords' => $iTotal,\n 'iTotalDisplayRecords' => $iFilteredTotal,\n 'aaData' => array()\n );\n\n \n foreach($rResult->result_array() as $aRow)\n {\n $row = array();\n \n foreach($aColumns2 as $col)\n {\n if(!in_array($col, array('id'))){\n $value = '';\n $value = $aRow[$col];\n if($col == 'content'){\n $value = substr(strip_tags(html_entity_decode($aRow['content'])), 0, 70) . '...<a header=\"' . $aRow['ticker'] . ':' . $aRow['date_ann'] . '\" href=\"javascript:void(0)\" content=\"' . $aRow['content'] . '\" class=\"view-more\">view more</a>';\n }\n if(is_numeric($value) && $col != 'pay_yr'){\n $value = normalFormat($value);\n }\n $row[] = $value;\n }\n }\n $output['aaData'][] = $row;\n }\n return $output;\n\n // return $this->db->get($this->final_table)->result_array();\n }", "title": "" }, { "docid": "7a17213090c616019fd317fa4bf7bbbb", "score": "0.46014005", "text": "private function alterTable(TableBuilder $table, array $filters = [])\n {\n $isIncluded = (isset($filters['includeCeased']) && $filters['includeCeased'] === '1');\n\n $table->addAction(\n self::ACTION_CEASED_SHOW_HIDE,\n [\n 'label' => 'internal-psv-discs-filter-ceased-' . ($isIncluded ? 'hide' : 'show') . '-discs',\n 'class' => 'govuk-button govuk-button--secondary js-disable-crud',\n 'requireRows' => true,\n 'keepForReadOnly' => true,\n ]\n );\n\n if ($this->fetchDataForLva()['licenceType']['id'] !== RefData::LICENCE_TYPE_SPECIAL_RESTRICTED) {\n $table->setEmptyMessage(\"\");\n }\n return $table;\n }", "title": "" }, { "docid": "cfdff05651e0d552c3a37358b6629e34", "score": "0.45934266", "text": "private function filter( $table, $info ) {\n\t\t// Check the sql to make sure we aren't passing unneeded bound parameters\n\t\t/*\n\t\techo $this->sql;\n\t\techo 'before: ' . var_export($info, true);\n\t\tforeach( $info as $key => $value)\n\t\t\tif (stristr($this->sql, $key) === FALSE) unset($info[$key]);\t\n\t\t\n\t\techo 'after: ' . var_export($info, true);\t\n\t\t*/\n\t\t//echo $table;\n\t\t//print_r(array_keys( $info ));\n\t\t\n\t\t// If we use a shorthand table like `MBP_config` c it breaks the DESCRIBE method so lets trip it off\n\t\t$pos = strrpos($table, '`');\n\t\tif ($pos !== false)\n\t\t\t$table = substr($table, 0, $pos);\n\t\t\t\n\t\t$table = trim( $table, '`' );\n\t\t\n\t\t$sql = \"DESCRIBE `\" . $table . \"`;\";\n\t\t$key = \"Field\";\n\n\t\tif( false !== ( $list = $this->run( $sql ) ) ) {\n\t\t\t$fields = array();\n\t\t\tforeach( $list as $record )\n\t\t\t\t$fields[] = $record[$key];\n\t\t\t//print_r($fields);\n\t\t\t//print_r(array_keys( $info ));\n\t\t\treturn array_values( array_intersect( $fields, array_keys( $info ) ) );\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f979815eae9c0aee4a35f00d879cdf1f", "score": "0.45895642", "text": "private function _display_data_table(){\n $_SESSION[ $this->table_name ][ 'filter' ][ 'where' ] = \" AND `\".$this->table_fields['faq_category'].\"`!='1001' \";\n \n $sq = md5('column_toggle'.$_SESSION['key']);\n if(isset($_SESSION[$sq][$this->table_name])){\n unset($_SESSION[$sq][$this->table_name]);\n }\n \n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALid TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cfaq.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$form->datatables_settings = array(\n\t\t\t\t'show_toolbar' => 1,\t\t\t\t//Determines whether or not to show toolbar [Add New | Advance Search | Show Columns will be displayed]\n\t\t\t\t\t'show_add_new' => 1,\t\t\t//Determines whether or not to show add new record button\n\t\t\t\t\t'show_advance_search' => 1,\t\t//Determines whether or not to show advance search button\n\t\t\t\t\t'show_column_selector' => 1,\t//Determines whether or not to show column selector button\n\t\t\t\t\t'show_units_converter' => 0,\t//Determines whether or not to show units converter\n\t\t\t\t\t\t'show_units_converter_volume' => 0,\n\t\t\t\t\t\t'show_units_converter_currency' => 0,\n\t\t\t\t\t\t'show_units_converter_currency_per_unit_kvalue' => 0,\n\t\t\t\t\t\t'show_units_converter_kvalue' => 0,\n\t\t\t\t\t\t'show_units_converter_time' => 0,\n\t\t\t\t\t\t'show_units_converter_pressure' => 0,\n\t\t\t\t\t'show_edit_button' => 1,\t\t//Determines whether or not to show edit button\n\t\t\t\t\t'show_delete_button' => 1,\t\t//Determines whether or not to show delete button\n\t\t\t\t\t\n\t\t\t\t'show_timeline' => 0,\t\t\t\t//Determines whether or not to show timeline will be shown\n\t\t\t\t\t//'timestamp_action' => $this->action_to_perform,\t//Set Action of Timestamp\n\t\t\t\t\n\t\t\t\t'show_details' => 1,\t\t\t\t//Determines whether or not to show details\n\t\t\t\t'show_serial_number' => 1,\t\t\t//Determines whether or not to show serial number\n\t\t\t\t\n\t\t\t\t'show_verification_status' => 0,\t//Determines whether or not to show verification status\n\t\t\t\t'show_creator' => 0,\t\t\t\t//Determines whether or not to show record creator\n\t\t\t\t'show_modifier' => 0,\t\t\t\t//Determines whether or not to show record modifier\n\t\t\t\t'show_action_buttons' => 0,\t\t\t//Determines whether or not to show record action buttons\n\t\t\t\t\n\t\t\t\t'current_module_id' => $this->class_settings['current_module'],\t//Set id of the currently viewed module\n\t\t\t\t'real_table' => 'faq',\t//Set id of the currently viewed module\n\t\t\t);\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "a675475bf21f7b14c22e7ee883e634ee", "score": "0.45789945", "text": "public function numColumns()\n {\n }", "title": "" }, { "docid": "53156fddddd17cd4eb74c13eadb68829", "score": "0.45692313", "text": "public function tableCommand()\n {\n $data = [\n [\n 'id' => 1,\n 'name' => 'john',\n 'status' => 2,\n 'email' => '[email protected]',\n ],\n [\n 'id' => 2,\n 'name' => 'tom',\n 'status' => 0,\n 'email' => '[email protected]',\n ],\n [\n 'id' => 3,\n 'name' => 'jack',\n 'status' => 1,\n 'email' => '[email protected]',\n ],\n ];\n Show::table($data, 'table show');\n\n Show::table($data, 'No border table show', [\n 'showBorder' => 0\n ]);\n\n Show::table($data, 'change style table show', [\n 'bodyStyle' => 'info'\n ]);\n\n $data1 = [\n [\n 'Walter White',\n 'Father',\n 'Teacher',\n ],\n [\n 'Skyler White',\n 'Mother',\n 'Accountant',\n ],\n [\n 'Walter White Jr.',\n 'Son',\n 'Student',\n ],\n ];\n\n Show::table($data1, 'no head table show');\n }", "title": "" }, { "docid": "eb8eaf45cb61cb1e975be2ccdf3d5a75", "score": "0.456579", "text": "function echo_truncate()\n {\n \tif($this->truncated)\n \t{\n \t\techo '<h4>All the tables of the database have been truncated</h4>';\n \t}\n \telse\n \t{\n \t\techo '<h4>There are no tables to truncate</h4>';\n \t}\n }", "title": "" }, { "docid": "c59d4cb31816d50cf5142424b0c999cd", "score": "0.4563227", "text": "function endTable() {\n echo \"</table>\";\n }", "title": "" }, { "docid": "d6acac8987bccaf453cd4095e3e20b6e", "score": "0.4528897", "text": "public function getColumns(){ }", "title": "" }, { "docid": "95b1e0cf309a7ebff68dcd198a242908", "score": "0.45210937", "text": "public function enlargeResults()\n {\n $this->getFilter()->enlargeResults();\n }", "title": "" }, { "docid": "4585c49af170063fba4bf1a5a50d21c8", "score": "0.45166555", "text": "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'chelp.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t$budget_id = '';\n\t\t\tif( isset( $_GET['budget_id'] ) && $_GET['budget_id'] ){\n\t\t\t\t$budget_id = $_GET['budget_id'];\n\t\t\t\t\n\t\t\t\t$title_text = \"Apply all Changes Made to Line Items\";\n\t\t\t\t$caption = \"Apply Changes\";\n\t\t\t\t\n\t\t\t\t$this->datatable_settings['custom_edit_button'] = '<a href=\"#\" class=\"custom-action-button btn btn-mini btn-sm btn-danger\" function-id=\"'.$budget_id.'\" search-table=\"\" function-class=\"'.$this->table_name.'\" function-name=\"apply_changes\" module-id=\"'.$this->class_settings['current_module'].'\" module-name=\"\" action=\"?&module='.$this->class_settings['current_module'].'&action='.$this->table_name.'&todo=apply_changes\" mod=\"apply_changes-'.md5($this->table_name).'\" todo=\"apply_changes\" title=\"'.$title_text.'\">'.$caption.'</a>';\n\t\t\t}\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t\t//'status' => 'new-status',\n\t\t\t\t//'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state' ),\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "39c2477e14ea4b83baf261bb8bf51719", "score": "0.45119315", "text": "public static function print_search_bar( $owner_table ) {\n\t\tif ( self::can_i( 'view', 'Extra Fields' ) ) {\n\n\t\t\tif ( is_array( $owner_table ) && isset( $owner_table['owner_table'] ) ) {\n\t\t\t\t$options = $owner_table;\n\t\t\t\t$owner_table = $owner_table['owner_table'];\n\t\t\t} else {\n\t\t\t\t$options = array();\n\t\t\t}\n\n\n\t\t\t$result = hook_handle_callback( 'extra_fields_search_bar', $owner_table, $options );\n\t\t\tif ( is_array( $result ) ) {\n\t\t\t\t// has been handed by a theme.\n\t\t\t\techo current( $result );\n\t\t\t} else {\n\t\t\t\t$defaults = self::get_defaults( $owner_table );\n\t\t\t\t$searchable_fields = array();\n\t\t\t\tforeach ( $defaults as $default ) {\n\t\t\t\t\tif ( isset( $default['searchable'] ) && $default['searchable'] ) {\n\t\t\t\t\t\t$searchable_fields[ $default['key'] ] = $default;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ( $searchable_fields as $searchable_field ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<td class=\"search_title\">\n\t\t\t\t\t\t<?php echo htmlspecialchars( $searchable_field['key'] ); ?>:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"search_input\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tmodule_form::generate_form_element( array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'name' => 'search[extra_fields][' . htmlspecialchars( $searchable_field['key'] ) . ']',\n\t\t\t\t\t\t) ); ?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8c78cc3bc42a7cb88e2032b27de532c7", "score": "0.45082146", "text": "public function allRows()\n {\n call_user_func($this->callback, new TableWidget($this->name, $this->label, $this->authSystem, $this->requiredPermissions, $this->table));\n }", "title": "" }, { "docid": "3ffb40f9c2a48ab64fc5bf2c729f9c86", "score": "0.45027688", "text": "public static function columns(){\n\t\treturn (int) exec('/usr/bin/env tput cols');\n\t}", "title": "" }, { "docid": "84ef2f7b708e2f7cdb9f86c275e12fd6", "score": "0.44990593", "text": "function filterrows($rows)\n {\n $filters_arr = $this->bloxconfig['filters_arr'];\n $filters = array();\n $filterbys = array();\n if ($filters_arr > 0) {\n foreach ($filters_arr as $theFilter) {\n $thefilters = explode('(', $theFilter);\n $filterBy = $thefilters[0];\n $filterbys[] = $filterBy;\n $filterValues = str_replace(')', '', $thefilters[1]);\n $filters[$filterBy] = $filterValues;\n }\n }\n $outputrows = array();\n foreach ($rows as $row) {\n if (count($filterbys) == 0) {\n $pusharray = 1;\n } else {\n foreach ($filterbys as $filterBy) {\n $pusharray = 0;\n $filterValues = $filters[$filterBy];\n if ($filterValues == '') unset($filterValues);\n if (isset($filterValues)) {\n $Values = explode(\"|\", $filterValues);\n foreach ($Values as $filterValue) {\n if ($xdbconfig['showempty'] == $filterValue && (trim($row[$filterBy]) == '' || empty($row[$filterBy]))) {\n $pusharray = 1;\n } elseif (trim($row[$filterBy]) !== '' && !empty($row[$filterBy])) {\n $isValue = strpos(strtolower($filterValue), strtolower($row[$filterBy]));\n $isValueAlt = (strtolower($row[$filterBy]) == strtolower($filterValue));\n if ($isValueAlt === false) {\n } else $pusharray = 1;\n }\n }\n } elseif (!empty($row[$filterBy]) || trim($row[$filterBy]) !== '') {\n $pusharray = 0;\n }\n if ($pusharray == 0) break;\n }\n }\n if ($pusharray == 1) {\n $outputrows[] = $row;\n }\n }\n\n return $outputrows;\n\n }", "title": "" }, { "docid": "3057e55374518b649bb870633a125241", "score": "0.44982708", "text": "function get_filtered_table_records($appid,$tablename, $where_clause_filter)\n {\n include \"mysqlconnect.php\";\n \n $sql = \"call get_filtered_records_from_table_and_pivot('\".$appid.\"','\".$tablename.\"','\".$where_clause_filter.\"')\";\n \n $q = $conn->query($sql);\n \n if($q) {\n $app_list = $q->fetchAll(PDO::FETCH_ASSOC);\n $app_list = array(\"status\" => \"200\") + array(\"results\" => $app_list); \n } else {\n \t //echo \"Something went wrong...\";\n \t $app_list = $stmt->errorInfo();\n $app_list = array(\"status\" => \"400\") + array(\"results\" => $app_list);\n }\n \n \n return $app_list;\n }", "title": "" }, { "docid": "d2d44ffc5bb68d0b091c3ac7cd3f0922", "score": "0.44980234", "text": "private function display_filter_hooks( $filter_hooks = array() ) {\n\t\t$hook_in_count = 0;\n\t\t?>\n\t\t<table class=\"debug-bar-give-table debug-bar-give-filters\" cellspacing=\"0\">\n\t\t\t<thead><tr>\n\t\t\t\t<th class=\"filter-name\"><?php esc_html_e( 'Filter', 'debug-bar-give' ); ?></th>\n\t\t\t\t<th class=\"filter-priority\"><?php esc_html_e( 'Priority', 'debug-bar-give' ); ?></th>\n\t\t\t\t<th class=\"filter-callbacks\"><?php esc_html_e( 'Registered Callbacks', 'debug-bar-give' ); ?></th>\n\t\t\t</tr></thead>\n\t\t\t<tfoot><tr>\n\t\t\t\t<th class=\"filter-name\"><?php esc_html_e( 'Filter', 'debug-bar-give' ); ?></th>\n\t\t\t\t<th class=\"filter-priority\"><?php esc_html_e( 'Priority', 'debug-bar-give' ); ?></th>\n\t\t\t\t<th class=\"filter-callbacks\"><?php esc_html_e( 'Registered Callbacks', 'debug-bar-give' ); ?></th>\n\t\t\t</tr></tfoot>\n\t\t\t<tbody>\n\t\t\t<?php\n\t\t\tforeach ( $filter_hooks as $hook => $value ) {\n\t\t\t\t$filter_val = array();\n\t\t\t\tif ( $value instanceof WP_Hook ) {\n\t\t\t\t\t$filter_val = $value->callbacks;\n\t\t\t\t}\n\n\t\t\t\t$filter_count = count( $filter_val );\n\n\t\t\t\t$rowspan = '';\n\t\t\t\tif ( $filter_count > 1 ) {\n\t\t\t\t\t$rowspan = 'rowspan=\"' . $filter_count . '\"';\n\t\t\t\t}\n\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<th ' . esc_attr( $rowspan ) . '>' . esc_html( $hook ) . '</th>';\n\n\t\t\t\tif ( $filter_count > 0 ) {\n\t\t\t\t\t$first = true;\n\t\t\t\t\tforeach ( $value->callbacks as $priority => $functions ) {\n\t\t\t\t\t\tif ( true !== $first ) {\n\t\t\t\t\t\t\techo '<tr>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '<td class=\"prio\">' . esc_html( $priority ) . '</td>';\n\t\t\t\t\t\techo '<td><ul>';\n\t\t\t\t\t\tforeach ( $functions as $single_function ) {\n\t\t\t\t\t\t\t$signature = $single_function['function'];\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t! is_string( $single_function['function'] ) &&\n\t\t\t\t\t\t\t\t\t! is_object( $single_function['function'] )\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\t! is_array( $single_function['function'] ) ||\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tis_array( $single_function['function'] ) &&\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t! is_string( $single_function['function'][0] ) &&\n\t\t\t\t\t\t\t\t\t\t\t! is_object( $single_function['function'][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)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Type 1 - not a callback.\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} elseif (\n\t\t\t\t\t\t\tdbg_is_closure( $single_function['function'] )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Type 2 - closure.\n\t\t\t\t\t\t\t\techo '<li>[<em>' . esc_html_e( 'closure', 'debug-bar-give' ) . '</em>]</li>';\n\t\t\t\t\t\t\t\t$signature = get_class( $single_function['function'] ) . $hook_in_count;\n\t\t\t\t\t\t\t} elseif (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tis_array( $single_function['function'] ) ||\n\t\t\t\t\t\t\t\t\tis_object( $single_function['function'] )\n\t\t\t\t\t\t\t\t) &&\n\t\t\t\t\t\t\t\tdbg_is_closure( $single_function['function'][0] )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Type 3 - closure within an array.\n\t\t\t\t\t\t\t\techo '<li>[<em>' . esc_html_e( 'closure', 'debug-bar-give' ) . '</em>]</li>';\n\t\t\t\t\t\t\t\t$signature = get_class( $single_function['function'] ) . $hook_in_count;\n\t\t\t\t\t\t\t} elseif (\n\t\t\t\t\t\t\t\tis_string( $single_function['function'] ) &&\n\t\t\t\t\t\t\t\tstrpos( $single_function['function'], '::' ) === false\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Type 4 - simple string function (includes lambda's).\n\t\t\t\t\t\t\t\t$signature = sanitize_text_field( $single_function['function'] );\n\t\t\t\t\t\t\t\techo '<li>' . esc_html( $signature ) . '</li>';\n\t\t\t\t\t\t\t} elseif (\n\t\t\t\t\t\t\t\tis_string( $single_function['function'] ) &&\n\t\t\t\t\t\t\t\tstrpos( $single_function['function'], '::' ) !== false\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Type 5 - static class method calls - string.\n\t\t\t\t\t\t\t\t$signature = str_replace( '::', ' :: ', sanitize_text_field( $single_function['function'] ) );\n\t\t\t\t\t\t\t\techo '<li>[<em>' . esc_html__( 'class', 'debug-bar-give' ) . '</em>] ' . esc_html( $signature ) . '</li>';\n\t\t\t\t\t\t\t} elseif (\n\t\t\t\t\t\t\t\tis_array( $single_function['function'] ) &&\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tis_string( $single_function['function'][0] ) &&\n\t\t\t\t\t\t\t\t\tis_string( $single_function['function'][1] )\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\t// Type 6 - static class method calls - array.\n\t\t\t\t\t\t\t\t$signature = sanitize_text_field( $single_function['function'][0] ) . ' :: ' . sanitize_text_field( $single_function['function'][1] );\n\t\t\t\t\t\t\t\techo '<li>[<em>' . esc_html__( 'class', 'debug-bar-give' ) . '</em>] ' . esc_html( $signature ) . '</li>';\n\t\t\t\t\t\t\t} elseif (\n\t\t\t\t\t\t\t\tis_array( $single_function['function'] ) &&\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tis_object( $single_function['function'][0] ) &&\n\t\t\t\t\t\t\t\t\tis_string( $single_function['function'][1] )\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\t// Type 7 - object method calls.\n\t\t\t\t\t\t\t\t$signature = esc_html( get_class( $single_function['function'][0] ) ) . ' -> ' . sanitize_text_field( $single_function['function'][1] );\n\t\t\t\t\t\t\t\techo '<li>[<em>' . esc_html__( 'object', 'debug-bar-give' ) . '</em>] ' . esc_html( $signature ) . '</li>';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// Type 8 - undetermined.\n\t\t\t\t\t\t\t\tesc_html_e( 'Undetermined callback', 'debug-bar-give' );\n\t\t\t\t\t\t\t} // End if().\n\t\t\t\t\t\t} // End foreach().\n\t\t\t\t\t\techo '</ul></td>';\n\t\t\t\t\t} // End foreach().\n\t\t\t\t\techo '</tr>';\n\t\t\t\t} else {\n\t\t\t\t\t?>\n\t\t\t\t\t<td>&nbsp;</td><td>&nbsp;</td></tr>\n\t\t\t\t\t<?php\n\t\t\t\t} // End if().\n\t\t\t} // End foreach().\n\t\t\t?>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<?php\n\t}", "title": "" }, { "docid": "3c65acf924d4f72b4cda28aa0add2568", "score": "0.4497533", "text": "abstract public function tableColumns(): array;", "title": "" }, { "docid": "8cf659c279983e7602e34420284c715e", "score": "0.44937912", "text": "public static function isPlainTable100()\n {\n return isset($GLOBALS['TSFE']->config['config']['plainTable100']) && trim($GLOBALS['TSFE']->config['config']['plainTable100']) !== '' ? (bool)$GLOBALS['TSFE']->config['config']['plainTable100'] : true;\n }", "title": "" }, { "docid": "cbf8001d6f1e640309d6bccbb42cc60c", "score": "0.44802806", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periodemasuk': return \"substring(m.periodemasuk,1,4) = '$key'\";\n\t\t\t\tcase 'nim_skripsi': return \"p.nim = '$key'\";\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once(Route::getModelPath('unit'));\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"infoleft >= \".(int)$row['infoleft'].\" and inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "683e95897d14b2b9e90e5e0e876fbedc", "score": "0.44767338", "text": "function gridSize($tablename,$condition=\"\"){\n\t\t$output = array();\n\t\t$this_page = \"\";\n\t\t//parse_str($_SERVER['QUERY_STRING'], $url);\n\t\t$url = $_GET;\n\t\t// number of rows to show per page\n\t\t$rowsperpage = $this -> setting('rows_per_page');\n\t\t$rowsperpage = ((int)$rowsperpage > 0) ? (int)$rowsperpage : 10;\n\t\t// range of num links to show\n\t\t$range = 4;\n\t\t//add where to the condition if a condition has been set\n\t\tif(!empty($condition)) $condition = (stripos($condition,\"WHERE \") === false) ? \"WHERE $condition\" : $condition;\n\t\t$countsql = \"select count(*) as cnt from $tablename $condition\";\n\t\t$numrows = $this -> dbrow($countsql);\n\t\t$numrows = $numrows['cnt'];\n\t\t// find out total pages\n\t\t$totalpages = $this->mceil($numrows / $rowsperpage);\n\t\t\n\t\t// get the current page or set a default\n\t\t$currentpage = @$_GET['currentpage'];\n\t\t$currentpage = ((int)$currentpage > 0) ? (int) $_GET['currentpage'] : 1 ;\n\t\t\n\t\t// if current page is greater than total pages...\n\t\t$currentpage = ($currentpage > $totalpages) ? $totalpages : $currentpage;\n\t\t\n\t\t// if current page is less than first page...\n\t\t$currentpage = ($currentpage < 1) ? 1 : $currentpage;\n\t\t// the offset of the list, based on current page \n\t\t$offset = ($currentpage - 1) * $rowsperpage;\n\t\t$output['start'] = $offset+1;\n\t\t$output['size'] = $rowsperpage;\t\n\t\t$output['total'] = $numrows;\t\t\t\n\t\t$output['size'] = (($output['start']+$output['size'])>$output['total'])? ($output['total'] - $output['start']) + 1:$output['size'] ;\n\t\t/****** build the pagination links ******/\t\n\t\t// if not on page 1, don't show back links\n\t\t$pagination = \"\";\n\t\tif ($currentpage > 1) {\n\t\t // show << link to go back to page 1\n\t\t\t$url['currentpage'] = 1;//$currentpage;\n\t\t $pagination .= \" <a href='\".$this->makeSefUrl($this_page.\"?\".http_build_query($url)).\"'>[first]</a> \";\n\t\t // get previous page num\n\t\t $prevpage = $currentpage - 1;\n\t\t // show < link to go back to 1 page\n\t\t\t$url['currentpage'] = $prevpage;\n\t\t $pagination .= \" <a href='\".$this->makeSefUrl($this_page.\"?\".http_build_query($url)).\"'>[prev]</a> \";\n\t\t} // end if \n\t\t\n\t\t// loop to show links to range of pages around current page\n\t\tfor ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) {\n\t\t // if it's a valid page number...\n\t\t if (($x > 0) && ($x <= $totalpages)) {\n\t\t\t // if we're on current page...\n\t\t\t$url['currentpage'] = $x;\n\t\t\t $pagination .= ($x == $currentpage) ? \" [<b>$x</b>] \" : \" <a href='\".$this->makeSefUrl($this_page.\"?\".http_build_query($url)).\"'>$x</a> \";\n\t\t } // end if \n\t\t} // end for\n\t\t\t\t\t\t \n\t\t// if not on last page, show forward and last page links \n\t\tif ($currentpage != $totalpages) {\n\t\t // get next page\n\t\t $nextpage = $currentpage + 1;\n\t\t\t// echo forward link for next page \n\t\t\t$url['currentpage'] = $nextpage;\n\t\t $pagination .= \" <a href='\".$this->makeSefUrl($this_page.\"?\".http_build_query($url)).\"'>[Next]</a> \";\n\t\t // echo forward link for lastpage\n\t\t\t$url['currentpage'] = $totalpages;\n\t\t $pagination .= \" <a href='\".$this->makeSefUrl($this_page.\"?\".http_build_query($url)).\"'>[Last]</a> \";\n\t\t} // end if\n\t\t/****** end build pagination links ******/\n\t\t$output['links'] = $pagination;\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "f539f4027d02a87fdb4a3246ececc8f1", "score": "0.44747236", "text": "function eTable ()\n {\n echo \"</table>\\n\";\n }", "title": "" }, { "docid": "7c0d5645a2ba0acf70b0f6fc79ec0901", "score": "0.44732526", "text": "function csv_get_columns() {\r\n\t\t$t_columns = helper_call_custom_function( 'get_columns_to_view', array( COLUMNS_TARGET_CSV_PAGE ) );\r\n\t\treturn $t_columns;\r\n\t}", "title": "" }, { "docid": "e6d05442623a795bf11f1e607727fde3", "score": "0.44707966", "text": "abstract public function listColumns();", "title": "" }, { "docid": "35fb7050dfb5b34748fd94101a4ed1c4", "score": "0.44621593", "text": "function get_bottom_table($table_array) {\n $keys = array_keys($table_array);\n $class_amount = sizeof($keys);\n $column_width = round(100/$class_amount, 2);\n $output = \"\";\n foreach ($keys as $class) {\n $output .= '<div class=\"stats_class_title\" style=\"min-width: '.$column_width.'%;\">'.$class.'</div>';\n }\n return $output;\n }", "title": "" }, { "docid": "437ed4cc0088b7e1813fa3ffc4768885", "score": "0.44577882", "text": "public function testCellsAutoFilterPutWorksheetFilterTop10()\n {\n $name ='Book1.xlsx';\n $sheet_name ='Sheet1';\n $range ='A1:C10';\n $fieldIndex = 0; \n $isTop ='true';\n $isPercent ='true';\n $itemCount =1; \n $matchBlanks ='true';\n $refresh ='true';\n $folder = \"Temp\";\n CellsApiTestBase::ready( $this->instance,$name ,$folder);\n $result = $this->instance->cellsAutoFilterPutWorksheetFilterTop10($name, $sheet_name, $range,$fieldIndex, $isTop,$isPercent, $itemCount, $matchBlanks, $refresh,$folder);\n $this->assertEquals(200, $result['code']);\n }", "title": "" }, { "docid": "4ce7c91d074b9f2a8b5ae8d0f7f19ab4", "score": "0.44558433", "text": "public function setTableWidth($width)\r\n\t{\r\n\t\t$this->defaultTableWidth = $width;\r\n\t}", "title": "" }, { "docid": "df69790779c6781ab7996886f395e54e", "score": "0.44558126", "text": "public function paginate($perPage = 15, $filter = null, $scope = null, $paginate = true, $columns = array('*'));", "title": "" }, { "docid": "df69790779c6781ab7996886f395e54e", "score": "0.44558126", "text": "public function paginate($perPage = 15, $filter = null, $scope = null, $paginate = true, $columns = array('*'));", "title": "" }, { "docid": "df69790779c6781ab7996886f395e54e", "score": "0.44558126", "text": "public function paginate($perPage = 15, $filter = null, $scope = null, $paginate = true, $columns = array('*'));", "title": "" }, { "docid": "d598f475495be128b8ee5954dce1a558", "score": "0.4453254", "text": "public function truncate($table);", "title": "" }, { "docid": "b7010f5c90416f5002e62b666c78b218", "score": "0.44519973", "text": "function tableContent($model,$start=0,$len=100,$paged=false){\n\t\tif (!$this->isModel($model)) {\n\t\t\tshow_404();\n\t\t\texit;\n\t\t}\n\t\t$this->load->model('tableViewModel');\n\t\t$html = $this->tableViewModel->getTableHtml($model,$message,array(),array(),$paged,$start,$len);\n\t\t$data['tableData']=$html==true?$html:$message;\n\t\t$this->load->view('pages/modelTlogableView',$data);\n\t}", "title": "" }, { "docid": "7f6360e6e5252a3c873ac006c1e98291", "score": "0.44475153", "text": "public function getTableList() {\n $conn = $this->dbconnect();\n\n $myArray = $this->listTables();\n\n echo \"<table class='table table-sm'>\";\n for ($i=0; $i < count($myArray); $i++) {\n echo \"<tr>\";\n echo \"<td>{$myArray[$i][0]}</td>\";\n echo \"<td class='text-center'>{$myArray[$i][1]}</td>\";\n echo \"</tr>\";\n }\n echo \"</table>\";\n\n }", "title": "" }, { "docid": "ed02753b364b9e7b0ff759e24ef9bab4", "score": "0.4443955", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': return \"periode = '$key'\";\n\t\t\t\tcase 'kodemk': return \"kodemk = '$key'\";\n\t\t\t\tcase 'kelasmk': return \"kelasmk = '$key'\";\n\t\t\t\tcase 'sistemkuliah': return \"sistemkuliah = '$key'\";\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once(Route::getModelPath('unit'));\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f78d6653d381dffb2cc25e1352465bc2", "score": "0.44429567", "text": "private function _tableColumnWidth(&$table) {\n $cs = &$table['cells'];\n $nc = $table['nc'];\n $nr = $table['nr'];\n $listspan = array();\n for ($j = 0; $j < $nc; $j++) {\n $wc = &$table['wc'][$j];\n for ($i = 0; $i < $nr; $i++) {\n if (isset($cs[$i][$j]['miw'])) {\n $c = &$cs[$i][$j];\n if (isset($c['nowrap'])) {\n $c['miw'] = $c['maw'];\n }\n if (isset($c['w'])) {\n if ($c['miw'] < $c['w']) {\n $c['miw'] = $c['w'];\n } elseif ($c['miw'] > $c['w']) {\n $hCellPaddings = (isset($c['hpad']) ? $c['hpad'] : $this->hCellPadding) * 2;\n $c['w'] = $c['miw'] + $hCellPaddings;\n }\n if (!isset($wc['w'])) {\n $wc['w'] = 1;\n }\n }\n if (isset($c['flex']) && $c['flex'] > $wc['flex']) {\n $wc['flex'] = $c['flex'];\n }\n if ($c['maw'] < $c['miw']) {\n $c['maw'] = $c['miw'];\n }\n if (!isset($c['colspan'])) {\n if ($wc['miw'] < $c['miw']) {\n $wc['miw'] = $c['miw'];\n }\n if ($wc['maw'] < $c['maw']) {\n $wc['maw'] = $c['maw'];\n }\n if (isset($wc['w']) && $wc['w'] < $wc['miw']) {\n $wc['w'] = $wc['miw'];\n }\n } else {\n $listspan[] = array($i, $j);\n }\n }\n }\n }\n\n $wc = &$table['wc'];\n foreach ($listspan as $span) {\n list($i, $j) = $span;\n $c = &$cs[$i][$j];\n $lc = $j + $c['colspan'];\n if ($lc > $nc) {\n $lc = $nc;\n }\n\n $wis = $wisa = 0;\n $was = $wasa = 0;\n $list = array();\n for ($k = $j; $k < $lc; $k++) {\n $wis += $wc[$k]['miw'];\n $was += $wc[$k]['maw'];\n if (!isset($c['w'])) {\n $list[] = $k;\n $wisa += $wc[$k]['miw'];\n $wasa += $wc[$k]['maw'];\n }\n }\n if ($c['miw'] > $wis) {\n if (!$wis) {\n for ($k = $j; $k < $lc; $k++) {\n $wc[$k]['miw'] = $c['miw'] / $c['colspan'];\n }\n } elseif (!count($list)) {\n $wi = $c['miw'] - $wis;\n for ($k = $j; $k < $lc; $k++) {\n $wc[$k]['miw'] += ($wc[$k]['miw'] / $wis) * $wi;\n }\n } else {\n $wi = $c['miw'] - $wis;\n foreach ($list as $_z2=>$k) {\n $wc[$k]['miw'] += ($wc[$k]['miw'] / $wisa) * $wi;\n }\n }\n }\n if ($c['maw'] > $was) {\n if (!$wis) {\n for ($k = $j; $k < $lc; $k++) {\n $wc[$k]['maw'] = $c['maw'] / $c['colspan'];\n }\n } elseif (!count($list)) {\n $wi = $c['maw'] - $was;\n for ($k = $j; $k < $lc; $k++) {\n $wc[$k]['maw'] += ($wc[$k]['maw'] / $was) * $wi;\n }\n } else {\n $wi = $c['maw'] - $was;\n foreach ($list as $_z2=>$k) {\n $wc[$k]['maw'] += ($wc[$k]['maw'] / $wasa) * $wi;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "6a9056bdc7be6608ba975f4b483e4865", "score": "0.4434614", "text": "function &getFilter()\n\t{\n\t\tglobal $mainframe;\n\t\t$params \t\t=& $this->getParams();\n\t\t$tableModel =& $this->getTableModel();\n\t\t$table \t\t\t=& $tableModel->getTable();\n\t\t$element \t\t=& $this->getElement();\n\t\t$origTable \t= $table->db_table_name;\n\t\t$fabrikDb \t=& $tableModel->getDb();\n\t\t$aFilter \t\t=& $tableModel->getFilterArray();\n\t\t$js \t\t\t\t= \"\";\n\t\t$elName \t\t= $this->getFullName( true, true, false );\n\t\t$dbElName\t\t= $this->getFullName( true, false, false );\n\t\t$elName2 \t\t= $this->getFullName( false, false, false );\n\n\t\t$ids \t\t\t= $tableModel->getColumnData( $elName2 );\n\t\t$elLabel\t\t= $element->label;\n\t\t$elExactMatch \t= $element->filter_exact_match;\n\t\t$v \t\t\t\t= $elName . \"[value]\";\n\t\t$t \t\t\t\t= $elName . \"[type]\";\n\t\t$e \t\t\t\t= $elName . \"[match]\";\n\t\t$fullword \t\t= $elName . \"[full_words_only]\";\n\t\t//corect default got\n\n\n\t\t$default = $this->getDefaultFilterVal();\n\t\t$aThisFilter = array();\n\n\t\t$format = $params->get( 'date_table_format', '%Y-%m-%d' );\n\n\t\t$fromTable = $origTable;\n\t\t$joinStr = '';\n\t\tforeach ( $tableModel->_aJoins as $aJoin ) {\n\t\t\t// not sure why the group id key wasnt found - but put here to remove error\n\t\t\tif ( array_key_exists( 'group_id', $aJoin ) ) {\n\t\t\t\tif ($aJoin->group_id == $element->group_id && $aJoin->element_id == 0) {\n\t\t\t\t\t$fromTable = $aJoin->table_join;\n\t\t\t\t\t$joinStr = \" LEFT JOIN $fromTable ON \" . $aJoin->table_join . \".\" . $aJoin->table_join_key . \" = \" . $aJoin->join_from_table . \".\" . $aJoin->table_key;\n\t\t\t\t\t$elName = str_replace( $origTable . '.', $fromTable . '.', $elName);\n\t\t\t\t\t//$where = \"\\n WHERE TRIM($dbElName) <> '' $where2 GROUP BY elText ASC\";\n\t\t\t\t\t$v = $fromTable . '___' . $element->name . \"[value]\";\n\t\t\t\t\t$t = $fromTable . '___' . $element->name . \"[type]\";\n\t\t\t\t\t$e = $fromTable . '___' . $element->name . \"[match]\";\n\t\t\t\t\t$fullword = $elName . \"[full_words_only]\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$dbElName = explode(\".\", $dbElName);\n\t\t$dbElName = \"`\" . $dbElName[0] . \"`.`\" . $dbElName[1] . \"`\";\n\n\t\t//dont format here as the format string is different between mysql and php's calendar strftime\n\t\t//$sql = \"SELECT DISTINCT( DATE_FORMAT($dbElName, '$format') ) AS elText, $dbElName AS elVal FROM `$origTable` $joinStr\\n\";\n\t\t$sql = \"SELECT DISTINCT($dbElName) AS elText, $dbElName AS elVal FROM `$origTable` $joinStr\\n\";\n\n\t\t$sql .= \"WHERE $dbElName IN ('\" . implode( \"','\", $ids ) . \"')\"\n\t\t. \"\\n AND TRIM($dbElName) <> '' GROUP BY elText ASC\";\n\t\t$requestName \t\t= $elName . \"___filter\";\n\t\tif (array_key_exists( $elName, $_REQUEST )) {\n\t\t\tif (is_array( $_REQUEST[$elName] ) && array_key_exists( 'value', $_REQUEST[$elName] ) ) {\n\t\t\t\t$_REQUEST[$requestName] = $_REQUEST[$elName]['value'];\n\t\t\t}\n\t\t}\n\n\t\t$context\t\t\t\t\t= 'com_fabrik.table' . $table->id . '.filter.' . $requestName;\n\t\t$default\t\t\t= $mainframe->getUserStateFromRequest( $context, $requestName, $default );\n\n\t\t$format = $params->get( 'date_table_format', '%Y-%m-%d' );\n\t\tswitch ($element->filter_type)\n\t\t{\n\t\t\tcase \"range\":\n\t\t\t\tFabrikHelperHTML::loadCalendar();\n\t\t\t\t//@TODO: this messes up if the table date format is different to the form date format\n\t\t\t\tif (empty( $default )) {\n\t\t\t\t\t$default = array('','');\n\t\t\t\t}\n\t\t\t\t$return = JText::_( 'DATE RANGE BETWEEN' ) . JHTML::_('calendar', $default[0], $v.'[]', $this->getHTMLId() . \"_filter_range_0\", $format, array('class'=>'inputbox fabrik_filter', 'maxlength'=>'19') );\n\t\t\t\t$return .= \"<br />\" . JText::_( 'DATE RANGE AND' ) . JHTML::_('calendar', $default[1], $v.'[]', $this->getHTMLId() . \"_filter_range_1\", $format, array('class'=>'inputbox fabrik_filter', 'maxlength'=>'19'));\n\t\t\t\tbreak;\n\n\t\t\tcase \"dropdown\":\n\t\t\t\t$fabrikDb->setQuery( $sql );\n\t\t\t\tFabrikHelperHTML::debug( $fabrikDb->getQuery(), 'fabrikdate getFilter' );\n\t\t\t\t$oDistinctData = $fabrikDb->loadObjectList();\n\t\t\t\t// cant do the format in the MySQL query as its not the same formatting\n\t\t\t\t// e.g. M in mysql is month and J's date code its minute\n\t\t\t\tforeach($oDistinctData as $k=>$o){\n\t\t\t\t\tif ($fabrikDb->getNullDate() === $o->elText) {\n\t\t\t\t\t\t$o->elText = '';\n\t\t\t\t\t\t$o->elVal = '';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$d = new JDate($o->elText);\n\t\t\t\t\t\t$o->elText = $d->toFormat($format) ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$obj = new stdClass;\n\t\t\t\t$obj->elVal = \"\";\n\t\t\t\t$obj->elText = JText::_( 'Please select' );\n\t\t\t\t$aThisFilter[] = $obj;\n\t\t\t\tif (is_array( $oDistinctData )) {\n\t\t\t\t\t$aThisFilter = array_merge( $aThisFilter, $oDistinctData );\n\t\t\t\t}\n\t\t\t\t$return \t = JHTML::_('select.genericlist', $aThisFilter, $v, 'class=\"inputbox fabrik_filter\" size=\"1\" maxlength=\"19\"', \"elVal\", 'elText', $default, $this->getHTMLId() . \"_filter_range_0\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"field\":\n\t\t\t\tif (is_array( $default )) {\n\t\t\t\t\t$default = array_shift($default);\n\t\t\t\t}\n\t\t\t\tif (get_magic_quotes_gpc()) {\n\t\t\t\t\t$default\t\t\t= stripslashes( $default );\n\t\t\t\t}\n\t\t\t\t$default = htmlspecialchars( $default );\n\n\t\t\t\t$return = JHTML::_('calendar', $default, $v, $this->getHTMLId() . \"_filter_range_0\", $format, array('class'=>'inputbox fabrik_filter', 'maxlength'=>'19') );\n\t\t\t\tbreak;\n\n\t\t}\n\t\t$return .= \"\\n<input type='hidden' name='$t' value='$element->filter_type' />\\n\";\n\t\t$return .= \"\\n<input type='hidden' name='$e' value='$elExactMatch' />\\n\";\n\t\t$return .= \"\\n<input type='hidden' name='$fullword' value='\" . $params->get('full_words_only', '0') . \"' />\\n\";\n\t\treturn $return;\n\t\t/**/\n\t}", "title": "" }, { "docid": "18a1051fedfd550ed7e109ca0108192c", "score": "0.44335058", "text": "public function run()\n {\n $this->truncateTablas(['provinces']);\n\n }", "title": "" }, { "docid": "6410396888de55bb1379eaccb3e5e7ee", "score": "0.4430987", "text": "function createTable($data){\n if (count($data) > 0): ?>\n <table>\n <thead>\n <style>\n table {\n font-family: arial, sans-serif;\n border-collapse: collapse;\n width: 90%;\n }\n td, th {\n border: 1px solid #dddddd;\n text-align: left;\n padding: 8px;\n }\n tr:nth-child(even) {\n background-color: #dddddd;\n }\n </style>\n <tr>\n <th><?php echo implode('</th><th>', $data[0]);?></th>\n </tr>\n </thead>\n <tbody>\n <?php foreach (array_slice($data,1,200) as $row):?>\n <tr>\n <td><?php echo implode('</td><td>', $row); ?></td>\n </tr>\n <?php endforeach; ?>\n </tbody>\n </table>\n <?php endif;\n }", "title": "" }, { "docid": "a15357562d94bacb8266d4ac8ff2f1f0", "score": "0.44264662", "text": "abstract protected function getColumns($table);", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.44211063", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.44211063", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.44211063", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.44211063", "text": "public function getColumns();", "title": "" }, { "docid": "05090688ac3d0d0351d9edfbe161bbf1", "score": "0.44206688", "text": "function ReschemeTableForData($strDatabase, $strTable, $intPercentageExpansionRoom=30, $intMinRecordsToEstablishPattern=10)\n{\n\t$sql=conDB();\n\t$arrInfo=TableDataRange($strDatabase, $strTable);\n\t$intRecordCount=countrecords($strDatabase,$strTable);\n\tforeach($arrInfo as $arrThis)\n\t{\n\t\t$column=$arrThis[\"column\"];\n\t\t$min=$arrThis[\"minval\"];\n\t\t$max=$arrThis[\"maxval\"];\n\t\t$minsize=$arrThis[\"minsize\"];\n\t\t$intNonnullsCount=$arrThis[\"nonnulls\"];\n\t\t$type=$arrThis[\"type\"];\n\t\t$defacto_type=$arrThis[\"defacto_type\"];\n\t\t\n\t\t$defactotypename=TypeParse($defacto_type, 0);\n\t\t//echo $defacto_type . \" \" . $defactotypename . \"<BR>\";\n\t\t$defactosize=TypeParse($defacto_type, 1);\n\t\t$defactodecimal=\"\";\n\t\tif(contains($defactosize, \",\"))\n\t\t{\n\t\t\t$arrDefactosize=explode(\",\", $defactosize);\n\t\t\t$defactodecimal=$arrDefactosize[1];\n\t\t\t$defactosize=$arrDefactosize[0];\n\t\t}\n \n \t\tif($minsize==$defactosize && $intRecordCount>=$intMinRecordsToEstablishPattern)\n\t\t{\n\t\t\t$maxlengthtouse=intval($defactosize);//don't create rom for expansion in very uniform columns\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$maxlengthtouse=intval($defactosize) + intval($defactosize*($intPercentageExpansionRoom/100)); \n\t\t}\n\t\tif($defactotypename==\"bit\")\n\t\t{\n\t\t\t$defactotypename=\"tinyint\";\n\t\t}\n\t\tif($defactotypename==\"int\")\n\t\t{\n\t\t\t$maxlengthtouse=11;\n\t\t}\n\t\t//if($defactotypename==\"float\")\n\t\t{\n\t\t\t//$maxlengthtouse=\"10\";\n\t\t}\n\t\tif($defactotypename==\"varchar\" && $maxlengthtouse>250)\n\t\t{\n\t\t\t$defactotypename=\"text\";\n\t\t\t$maxlengthtouse=\"\";\n\t\t}\n\t\t$typeSQL=TypeSQL($defactotypename, $maxlengthtouse, $defactodecimal);\n\t\t\n\t\tif($defactosize>0 && $defacto_type!=\"\" && trim($typeSQL)!=trim($type))\n\t\t{\n\t\t\t$strAlterSQL=\"ALTER TABLE \" . $strDatabase . \".\" . $strTable . \" CHANGE COLUMN \" . $column . \" \" . $column . \" \" . $typeSQL . \" default NULL\";\n\t\t\t//echo $strAlterSQL . \"<BR>\";\n\t\t\t$records=$sql->query($strAlterSQL);\n\t\t\t$error=sql_error();\n\t\t\t///echo $error . \"<BR>\";\n\t\t\t$out=$out . $error . IfAThenB($error, \"<br>\\n\");\n\t\t}\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "11e1af2b277a0afcbbc2adfa0051e96f", "score": "0.44205981", "text": "private function maxChar50($value)\n {\n if (strlen($value) > 50){\n $this->message = $this->message . ' Maximum 50 charactères ';\n }\n }", "title": "" }, { "docid": "88a6ab2b622713f72363af712a250d0f", "score": "0.4419982", "text": "public function setHighlightMaxAnalyzedChars($value) {}", "title": "" }, { "docid": "f5195c3e3d510984ef0526b0d2b626e5", "score": "0.44175532", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'periodebobot' :\n\t\t\t\t\treturn \"f.kodeperiodebobot='$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'periode' :\n\t\t\t\t\treturn \"n.kodeperiode='$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'periodetim' :\n\t\t\t\t\treturn \"kodeperiode='$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'penilai' :\n\t\t\t\t\treturn \"idpenilai='$key'\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d05e6565bffcf4a5b19ee5a41fd8f855", "score": "0.44048125", "text": "public function table();", "title": "" }, { "docid": "fc2e43b22dec7cdec58e43d6d416b447", "score": "0.44014025", "text": "public function cutAll()\n\t{\n\t\tif ($GLOBALS['TL_DCA'][$this->strTable]['config']['notSortable'])\n\t\t{\n\t\t\t$this->log('Table \"'.$this->strTable.'\" is not sortable', __METHOD__, TL_ERROR);\n\t\t\t$this->redirect('contao/main.php?act=error');\n\t\t}\n\n\t\t$arrClipboard = $this->Session->get('CLIPBOARD');\n\n\t\tif (isset($arrClipboard[$this->strTable]) && is_array($arrClipboard[$this->strTable]['id']))\n\t\t{\n\t\t\tforeach ($arrClipboard[$this->strTable]['id'] as $id)\n\t\t\t{\n\t\t\t\t$this->intId = $id;\n\t\t\t\t$this->cut(true);\n\t\t\t\t\\Input::setGet('pid', $id);\n\t\t\t\t\\Input::setGet('mode', 1);\n\t\t\t}\n\t\t}\n\n\t\t$this->redirect($this->getReferer());\n\t}", "title": "" }, { "docid": "a8b01a610dff9fe244ba00e9d0ecd955", "score": "0.43923667", "text": "function BigSetRows(array $tab1){\n\t\n\tfor ($i=0; $i <count($tab1) ; $i++) {\n\techo \"<tr class=''>\".\"<td>\".($tab1[$i][0]).\"</td>\".\"<td>\".($tab1[$i][1]).\"</td>\".\"<td width='12%'>\".($tab1[$i][2]).\"</td>\".\"<td>\".($tab1[$i][3]).\"</td>\".\"<td width='15%'>\".($tab1[$i][4]).\"</td>\".\"<td>\".($tab1[$i][5]).\"</td>\".\"<td>\".($tab1[$i][6]).\"</td></tr>\";\n\t}\n\t\t\n\t}", "title": "" }, { "docid": "894705ef8df94f57e7b9814528c2ead1", "score": "0.4391135", "text": "function searchableColumns($searchableColumns = null)\n\t{\n\t\tif(empty($searchableColumns))\n\t\t{\n\t\t\tif(empty($this->searchableColumns))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$searchableColumns = $this->searchableColumns;\n\t\t\t}\n\t\t}\n\n\n//\t\t$this->hasFooter = true;//Removed this because we do not really want the footer to be visible\n\t\t$this->setDefaultParameters([\n\t\t\t'initComplete' => \"function () {\n\t\t\t\tvar searchableColumns = \" . json_encode($searchableColumns) . \"\n\t\t\t\tvar api = this.api();\n\t\t\t\tvar self = this;\n\t\t\t\tvar row = document.createElement(\\\"tr\\\");\n\t\t\t\t$.each(api.settings().init().columns, function(key, value)\n\t\t\t\t{\n\t\t\t\t\tvar index = searchableColumns.indexOf(value.class);\n\t\t\t\t\tif(index != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar column = document.createElement(\\\"th\\\");\n\t\t\t\t\t\t$(column).appendTo(row);\n\t\t\t\t\t\tvar input = document.createElement(\\\"input\\\");\n\t\t\t\t\t\t$(input).addClass('dt_select_input');\n\t\t\t\t\t\t$(input).addClass('form-control');\n\t\t\t\t\t\t$(input).appendTo(column)\n\t\t\t\t\t\t.on('keyup', function () \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tapi.column(key).search_array($(this).val(), false, false, true).draw();\n\t\t\t\t\t\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\tvar column = document.createElement(\\\"th\\\");\n\t\t\t\t\t\t$(column).appendTo(row);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('thead').append(row);\n\t\t\t}\",\n\t\t]);\n\t}", "title": "" }, { "docid": "8ecbf15f043e690248580785add2356f", "score": "0.4389782", "text": "function filterTable($sql)\n {\n $connect = mysqli_connect(\"localhost\", \"root\", \"\", \"ssip\");\n $filter_Result = mysqli_query($connect, $sql);\n return $filter_Result;\n }", "title": "" }, { "docid": "692db852b265cc32a5e5e549364068ef", "score": "0.43892112", "text": "function overcome_archive_grid_col(){\r\n return apply_filters('overcome_archive_grid_col','8');\r\n}", "title": "" }, { "docid": "d61aae2a4bbc76d798aea1d68ad603e7", "score": "0.43828768", "text": "function get_columns( ) {\r\n\t\treturn $columns = MLA_Example_List_Table::mla_manage_columns_filter();\r\n\t}", "title": "" }, { "docid": "256c6e5449ca13c0006846de2920c9d5", "score": "0.4380562", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t$this->User->query(\"SET SQL_BIG_SELECTS =1\");\n\t}", "title": "" }, { "docid": "2c41469a690ce7af9e9fa529bf0af025", "score": "0.43780613", "text": "function infoGeneralDetailTable($query_criteria_filter, $query_date_filter, $total_num_rst, $table_results_name_download_plugin)\n{\n\techo '\n\t\t\t<div class=\"section\">\n\t\t\t\t<div class=\"section row container\">\n\t\t\t\t\t<div class=\"col l3 m3 s12 center-align btn-flat\">\n\t\t\t\t\t\tDetalle: <b>' . $query_criteria_filter . '</b>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col l3 m3 s12 center-align btn-flat\">\n\t\t\t\t\t\tPeriodo: <b>' . $query_date_filter . '</b>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col l3 m3 s12 center-align btn-flat\">\n\t\t\t\t\t\tRegistros: <b>' . $total_num_rst . '</b>\n\t\t\t\t\t</div>\n\t\t\t\t\t<a onclick=\"javascript:xport.toCSV(' . $table_results_name_download_plugin . ');\">\n\t\t\t\t\t<div class=\"col l3 m3 s12 center-align\">\n\t\t\t\t\t\t<i class=\"material-icons small\">cloud_download</i>\n\t\t\t\t\t</div>\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">&nbsp;</div>\n\t';\n}", "title": "" }, { "docid": "a73d9cd43694099c93eb1e58503b960f", "score": "0.43739188", "text": "function queryToTable($sql,$title=\"\",$outputToPage=false,$tableWidth=null)\r\n{\t\r\n\tglobal $lang;\r\n\t$QQuery = db_query($sql);\r\n\t$num_rows = db_num_rows($QQuery);\r\n\t$num_cols = db_num_fields($QQuery);\r\n\t$failedText = ($QQuery ? \"\" : \"<span style='color:red;'>ERROR - Query failed!</span>\");\r\n\t$tableWidth = (is_numeric($tableWidth) && $tableWidth > 0) ? \"width:{$tableWidth}px;\" : \"\";\r\n\t\r\n\t$html_string = \"<table class='dt2' style='font-family:Verdana;font-size:11px;$tableWidth'>\r\n\t\t\t\t\t\t<tr class='grp2'><td colspan='$num_cols'>\r\n\t\t\t\t\t\t\t<div style='color:#800000;font-size:14px;max-width:700px;'>$title</div>\r\n\t\t\t\t\t\t\t<div style='font-size:11px;padding:12px 0 3px;'>\r\n\t\t\t\t\t\t\t\t<b>{$lang['custom_reports_02']}&nbsp; <span style='font-size:13px;color:#800000'>$num_rows</span></b>\r\n\t\t\t\t\t\t\t\t$failedText\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td></tr>\r\n\t\t\t\t\t\t<tr class='hdr2' style='white-space:normal;'>\";\r\n\t\t\t\t\t\t\t\r\n\tif ($num_rows > 0) {\r\n\t\t\r\n\t\t// Display column names as table headers\r\n\t\tfor ($i = 0; $i < $num_cols; $i++) {\r\n\t\t\t\r\n\t\t\t$this_fieldname = db_field_name($QQuery,$i);\t\t\t\r\n\t\t\t//Display the \"fieldname\"\r\n\t\t\t$html_string .= \"<td style='padding:5px;'>$this_fieldname</td>\";\r\n\t\t}\t\t\t\r\n\t\t$html_string .= \"</tr>\";\t\r\n\t\t\r\n\t\t// Display each table row\r\n\t\t$j = 1;\r\n\t\twhile ($row = db_fetch_array($QQuery)) {\r\n\t\t\t$class = ($j%2==1) ? \"odd\" : \"even\";\r\n\t\t\t$html_string .= \"<tr class='$class notranslate'>\";\t\t\t\r\n\t\t\tfor ($i = 0; $i < $num_cols; $i++) \r\n\t\t\t{\r\n\t\t\t\t// Escape the value in case of harmful tags\r\n\t\t\t\t$this_value = htmlspecialchars(html_entity_decode($row[$i], ENT_QUOTES), ENT_QUOTES);\r\n\t\t\t\t$html_string .= \"<td style='padding:3px;border-top:1px solid #CCCCCC;font-size:11px;'>$this_value</td>\";\r\n\t\t\t}\t\t\t\r\n\t\t\t$html_string .= \"</tr>\";\r\n\t\t\t$j++;\r\n\t\t}\r\n\t\t\r\n\t\t$html_string .= \"</table>\";\r\n\t\t\r\n\t} else {\r\n\t\r\n\t\tfor ($i = 0; $i < $num_cols; $i++) {\r\n\t\t\t\t\r\n\t\t\t$this_fieldname = db_field_name($QQuery,$i);\r\n\t\t\t\t\r\n\t\t\t//Display the Label and Field name\r\n\t\t\t$html_string .= \"<td style='padding:5px;'>$this_fieldname</td>\";\r\n\t\t}\r\n\t\t\r\n\t\t$html_string .= \"</tr><tr><td colspan='$num_cols' style='font-weight:bold;padding:10px;color:#800000;'>{$lang['custom_reports_06']}</td></tr></table>\";\r\n\t\t\r\n\t}\r\n\t\r\n\tif ($outputToPage) {\r\n\t\t// Output table to page\r\n\t\tprint $html_string;\r\n\t} else {\r\n\t\t// Return table as HTML\r\n\t\treturn $html_string;\r\n\t}\r\n}", "title": "" } ]
5cde645bb842af010c148e670880067a
this is for new services
[ { "docid": "22107bcf8d00c49f929bc34ddcb58754", "score": "0.0", "text": "function setNewCommissionCredit($newCommissionCredit) {\n $this->newCommissionCredit = $newCommissionCredit;\n }", "title": "" } ]
[ { "docid": "017efadbd17876e6a6e919d2f1469b23", "score": "0.684728", "text": "protected function register_services() { // phpcs:ignore\n\t\tparent::register_services();\n\t}", "title": "" }, { "docid": "4d07e5e052e708105f407931da8bed51", "score": "0.657699", "text": "private function registerServices()\n {\n }", "title": "" }, { "docid": "f3caf1ba362f42c87ad601982f97f8c9", "score": "0.65291524", "text": "public function getService();", "title": "" }, { "docid": "f6cf9c8e64de7e0bf950ed0622796914", "score": "0.6444298", "text": "function create_service($user_id,$info){\t\n}", "title": "" }, { "docid": "5cda68982897d793915c34e17f0f928b", "score": "0.63621604", "text": "public function service($name) {\n }", "title": "" }, { "docid": "985681959769aa51426fe18be9896928", "score": "0.63242453", "text": "function __construct(){\n\t\t\t$this->_name = \"htdb_services\";\n\t\t\tparent::__construct(array());\n\t\t}", "title": "" }, { "docid": "d1a253effc75bd13e9c5a1a1b94b1334", "score": "0.6234193", "text": "public function create_services(){\n\n\n\t\t$this->log(\"Creating application services...\");\n\t\t$this->services = array();\n\t $query = \"SELECT S.* FROM am_applications_cfservices ACS INNER JOIN am_cfservices S ON S.id = ACS.cfservice_id WHERE ACS.application_id = '\".$this->app->id.\"' \";\n\t \t \n\t $result = mysql_query($query,$this->dblink);\n\t $icont = 0;\n\t \n\t $num = mysql_num_rows($result);\n\t $services_cf = array();\n\t if($num > 1){\n\t \t$serv_ret = $this->vmc->services();\n\t \t\n\t \tforeach ($serv_ret as $service){\n\t \t\tarray_push($services_cf, $service[\"name\"]);\t\n\t \t}\n\t \t\n\t }\n\t while($cfs = mysql_fetch_object($result)){\n\t \t$service_name = $cfs->cfname.\"-\".$this->app->appcode;\n\t \t//array_push($services,array($cfs->cfname,$this->app->appcode.\"_\".$cfs->cfname)); //$this->app->appcode.\"_\".$cfs->cfname][\"type\"] = $cfs->cfname;\n\t \tif(in_array($service_name, $services_cf)){\n\t \t\t$this->log(\"Service already exists, service name:$service_name\");\n\t \t\t$this->services[$service_name] = array(\"type\"=> $cfs->cfname); \n\t \t\t\t//si ya existe no lo creo\n\t \t\tcontinue;\n\t \t}\n\t \t//array_push($this->services,array($service_name => $cfs->cfname));\n\t \t$ret = $this->vmc->create_service($cfs->cfname,$service_name);\n\t \t\n\t \t$arr_aux = json_decode($ret);\n\t \n\t \tif((isset($arr_aux->code))&&($arr_aux->code == 503)){ //checkeo error en servicio!\n\t \t\t$this->log(\"Error in platform service,\".$cfs->cfname.\"response:\".$ret);\n\t \t}else{\n\t \t\t$this->services[$service_name] = array(\"type\"=> $cfs->cfname);\n\t \t\t$this->log(\"\\nService \".$cfs->cfname.\".. OK\");\n\t \t}\n\t \t\t\n\n\t }\n\t \n\t //@todo:analizar respuesta!\n\t $this->log(\"Creating services...End\");\n\t return true;\n\t \n\t}", "title": "" }, { "docid": "88cb76c5f883fe3b00957f66c2b55e8c", "score": "0.62335885", "text": "public function __construct()\n {\n $this->createDefaultServices();\n }", "title": "" }, { "docid": "a6c91d86fe4b390a0d13fe090da8c157", "score": "0.61566246", "text": "public function Services($serv = NULL) {\r\n }", "title": "" }, { "docid": "a50ec3259dd929ba822b60ae3e1231dd", "score": "0.6115968", "text": "public function getServices();", "title": "" }, { "docid": "13a15b20fe33bde5af9185f1c65bb914", "score": "0.60533196", "text": "abstract protected function getServiceConfig();", "title": "" }, { "docid": "1e8277c5996f268e6e818c040632eb79", "score": "0.6007104", "text": "public function __construct($service)\n {\n $this->service = $service;\n }", "title": "" }, { "docid": "ce256e29b1b0476dabd5b4e19677d164", "score": "0.59761137", "text": "abstract public function getServiceClass();", "title": "" }, { "docid": "ac8f219298e7e5c59d5bbb03ff2d43d7", "score": "0.595269", "text": "abstract public function getComponentServices();", "title": "" }, { "docid": "a455b3c8360618fe7fd5fc3fcd9aaa3d", "score": "0.59261435", "text": "abstract protected function getServiceClass();", "title": "" }, { "docid": "c1609cefa8fa315b8f560e337849ec97", "score": "0.5920553", "text": "public abstract function getServiceManager();", "title": "" }, { "docid": "9266f7836eed4a8bbd0a5f1a4f06a961", "score": "0.5903991", "text": "public function service_add() {\n\tglobal $DB;\n\n\tLOGWrite(\"REST::service_add()::\".var_export($_POST, true),LOG_DEBUG);\n\n\tif($this->agent_id) {\n\t $agent = new Agent($this->agent_id);\n\t \n\t if($agent) {\n\t\t$job_id = sanitize($_POST[\"job_id\"]);\n\n\t\t$ip = sanitize($_POST[\"ip\"]);\n\t\t$port = sanitize($_POST[\"port\"]);\n\t\t$proto = sanitize($_POST[\"proto\"]);\n\t\t$state = sanitize($_POST[\"state\"]);\n\t\tif(!empty($_POST[\"banner\"])) {\n\t\t $banner = mysqli_real_escape_string($DB,sanitize($_POST[\"banner\"]));\n\t\t} else {\n\t\t $banner = NULL;\n\t\t}\n\n\t\t$job = new Job($job_id);\n\t\t// $job->itemId contains hostId\n\t\tif($job) {\n\t\t // Acquire and lock semaphore based on hostId\n\t\t $sem = sem_get($job->itemId);\n\t\t sem_acquire($sem);\n\n\t\t $result = doQuery(\"SELECT ID,State,Banner FROM Services WHERE hostId='$job->itemId' AND Port='$port' AND Proto='$proto';\");\n\t\t if(mysqli_num_rows($result) > 0) {\n\t\t\t// Seems that this service was already there: check for changes\n\t\t\t$row = mysqli_fetch_array($result,MYSQLI_ASSOC);\n\t\t\t$service_id = $row[\"ID\"];\n\t\t\t$old_service[\"state\"] = $row[\"State\"];\n\t\t\t$old_service[\"banner\"] = stripslashes($row[\"Banner\"]);\n\n\t\t\t$new_service[\"state\"] = $state;\n\t\t\t$new_service[\"banner\"] = stripslashes($banner);\n\n\t\t\t$arr_res = compareArray($new_service,$old_service);\n\t\t\tif(count($arr_res) > 0) {\n\t\t\t //Something has changed...so raise event !\n\t\t\t $args = array('id' => $service_id, 'port' => $port, 'proto' => $proto, 'state' => $state, 'banner' => $banner);\n\t\t\t addEvent($job->id,\"service_change\",$args);\n\t\t\t // $job->addCache($args);\n\t\t\t}\n\t\t } else {\n\t\t\t// New service found\n\t\t\tdoQuery(\"INSERT INTO Services(hostId,Port,Proto,State,Banner,addDate,lastSeen) VALUES ('$job->itemId','$port','$proto','$state','$banner',NOW(),NOW());\");\n\t\t\t$service_id = mysqli_insert_id($DB);\n\n\t\t\tif($service_id > 0) {\n\t\t\t // Prepare to raise event..\n\t\t\t $args = array('id' => $service_id, 'port' => $port, 'proto' => $proto, 'state' => $state, 'banner' => $banner);\n\t\t\t addEvent($job->id,\"new_service\",$args);\n\t\t\t // $job->addCache($args);\n\t\t\t}\n\t\t }\n\t\t // Release semaphore\n\t\t sem_release($sem);\n\n\t\t return array(\"success\" => \"OK\");\n\t\t} else {\n\t\t throw new RestException(500, \"Job ID Error\");\n\t\t}\n\t } else {\n\t throw new RestException(500, \"Agent Error\");\n\t }\n\t} else {\n\t throw new RestException(403, \"Access denied\");\n\t}\n }", "title": "" }, { "docid": "c132af2f6b9b54c64f8019e1d5b2ff53", "score": "0.58778626", "text": "private function serviceDependency(): void\n {\n $instance = container(static::class);\n\n $this->errors = $instance->call('errors');\n $this->rules = $instance->call('rules');\n $this->fields = $instance->call('fields');\n }", "title": "" }, { "docid": "6528e343de790671cec76862615c74ad", "score": "0.58376867", "text": "public function serviceMethod()\n {\n $runtimeB1 = $this->diFactory->createRuntimeB('one', 1);\n $runtimeB2 = $this->diFactory->createRuntimeB('two', 2);\n }", "title": "" }, { "docid": "89380e0c77f79c5ecb19eb5b3a0d6b32", "score": "0.58282655", "text": "abstract protected function getServiceKey();", "title": "" }, { "docid": "518ae5bd89a2d1cdf8c35cd3c2e6aa6b", "score": "0.58248335", "text": "protected function post_service() {\n // only service mainurls are accepted\n $this->data = $this->model->findRSDWithServiceUrlList($this->inputData);\n if (!$this->data) {\n $this->not_found();\n }\n }", "title": "" }, { "docid": "fa1b91c0962207619f54afb462c34d45", "score": "0.58203536", "text": "public function set_service($service){\n\t\t\tparent::set_service($service, $this->api_config[$service]);\n\t\t}", "title": "" }, { "docid": "d867b96dcd347535e41320c270588b0e", "score": "0.58138025", "text": "private function get_theme_services() : void {\n\n if( $this->services == null ) {\n\n $this->services = $this->themeclass->get_service_classes();\n\n }\n \n }", "title": "" }, { "docid": "771fd0d207797d906c6343158c9398d1", "score": "0.57968366", "text": "function mexp_service_wistia( array $services ) {\n\n\t$services['wistia'] = new MEXP_Wistia_Service;\n\n\treturn $services;\n\n}", "title": "" }, { "docid": "2b750567c1401dc697720333e49f29a9", "score": "0.57887137", "text": "protected function _initServices() {\r\n \t$this->registerService(new ELSTR_Service_CouchDB($this->m_options));\r\n }", "title": "" }, { "docid": "478bf2eaae3345dd255fdd06e225c2b5", "score": "0.578525", "text": "public function get_name() {\n\t\treturn 'services';\n\t}", "title": "" }, { "docid": "0c25046472875f021d4e4da8bd76f58e", "score": "0.5773343", "text": "public function __construct()\n {\n parent::__construct();\n $this->service= new SpotifyService();\n }", "title": "" }, { "docid": "a223342c0c5ae0d3b1038a7a1a2e97e9", "score": "0.5767192", "text": "public function setService()\n\t{\n \tswitch ($this->model){\n \t\tcase 'order':\n \t\tcase 'seller':\n \t\t\t$this->_service = new MarketplaceWebServiceOrders_Client(\n\t \t\t\t\t$this->aws_access_key_id,\n\t \t\t\t\t$this->aws_secret_access_id,\n\t \t\t\t\t$this->application_name,\n\t \t\t\t\t$this->application_version,\n\t\t \t\t\t$this->config\n\t \t\t\t);\n \t\t\tbreak;\n \t\tcase 'get_price':\n \t\t\t$this->_service = new MarketplaceWebServiceProducts_Client(\n\t \t\t\t\t$this->aws_access_key_id,\n\t \t\t\t\t$this->aws_secret_access_id,\n\t \t\t\t\t$this->application_name,\n\t \t\t\t\t$this->application_version,\n\t\t \t\t\t$this->config\n\t \t\t\t);\n \t\t\tbreak;\n \t\tcase 'tracking':\n \t\tcase 'inventory':\n \t\tcase 'listing_sold':\n \t\tcase 'listing_sell':\n \t\tcase 'fba_fee_report':\n \t\tcase 'nfba_fee_report':\n \t\tcase 'request_list':\n \t\tcase 'settlement':\n \t\t\t$this->_service = new MarketplaceWebService_Client(\n\t \t\t\t\t$this->aws_access_key_id,\n\t \t\t\t\t$this->aws_secret_access_id,\n\t \t\t\t\t$this->config,\n\t \t\t\t\t$this->application_name,\n\t \t\t\t\t$this->application_version\n\t \t\t);\n \t\t\tbreak;\n\t \t case 'list_inventory':\n\t \t$this->_service = new FBAInventoryServiceMWS_Client(\n\t \t\t\t\t$this->aws_access_key_id,\n\t \t\t\t\t$this->aws_secret_access_id,\n\t \t\t\t\t$this->config,\n\t \t\t\t\t$this->application_name,\n\t \t\t\t\t'2010-10-01'\n\t \t\t);\t \t\t\n\t \tbreak;\t\t\n \t\t\t\n \t\tdefault:\n \t\t\tbreak;\n \t}\n }", "title": "" }, { "docid": "840b7dcae2c3a2966f4ecc283f3a27d8", "score": "0.5761848", "text": "public function new_service() {\n\t\t$data \t\t= $this->service_data();\n\t\t$session \t= $this->access->session_data();\n\t\t$admin \t\t= $session['akses'];\n\n\t\t$insert_service = $this->crud_model->insert_data('bengkel', $data);\n\t\t\n\t\tif ($insert_service == TRUE) {\n\t\t\t$alert = array(\n\t\t\t\t'type'\t\t=> 'success',\n\t\t\t\t'message' \t=> 'bengkel berhasil ditambahkan'\n\t\t\t);\n\t\t\n\t\t\t$this->alert->gen_alert($alert);\n\t\t\tredirect($admin.'/service/', 'location', 303);\n\t\t}\n\t\telse {\n\t\t\t$alert = array(\n\t\t\t\t'type'\t\t=> 'danger',\n\t\t\t\t'message' \t=> 'bengkel gagal ditambahkan'\n\t\t\t);\n\t\t\t$this->alert->gen_alert($alert);\n\t\t\tredirect($admin.'/service/', 'location', 303);\n\t\t}\n\t}", "title": "" }, { "docid": "56f724875218aca670217a469ebd0173", "score": "0.57432544", "text": "abstract protected function GetDefaultServiceObject ();", "title": "" }, { "docid": "757c9fca748f997a14e7d99d0cd043a8", "score": "0.5718478", "text": "public function setService() {\n\t\n\t\t$settings = $this->getSettingsCarrier();\n\t\t\n\t\t$this->_service = array(\n\t\t\t'notemail'\t\t\t\t=> ($settings['notemail'] == 1 ? $this->_receiver['mail'] : null),\n\t\t\t'notesms'\t\t\t\t=> ($settings['notesms'] == 1 ? $this->_receiver['sms'] : null),\n\t\t\t'prenote'\t\t\t\t=> $settings['prenote'],\n\t\t\t'prenote_from'\t\t\t=> $settings['prenote_from'],\n\t\t\t'prenote_receiver'\t\t=> ($settings['prenote_receiver'] == '' ? $this->_receiver['mail'] : $settings['prenote_receiver']),\n\t\t\t'prenote_message'\t\t=> ($settings['prenote_message'] != '' ? $settings['prenote_message'] : null),\n\t\t\t'flex'\t\t\t\t\t=> ($this->getFlexDeliveryNote() ? true : null),\n\t\t\t'waybillid'\t\t\t\t=> $this->getWaybill($settings['waybillid'],$this->_receiver['country']),\n\t\t\t'smartdelivery'\t\t\t=> $this->isSmartDelivery(),\n\t\t\t'smartdelivery_start'\t=> $this->getSmartDeliveryTimeStart(),\n\t\t\t'smartdelivery_end'\t\t=> $this->getSmartDeliveryTimeEnd(),\n\t\t\t);\n\t\n\t}", "title": "" }, { "docid": "44b545142b7dac72c13e0cb6a729a16c", "score": "0.5716797", "text": "public function __construct(){\n\t\tparent::__construct();\n//\t\t$this->OrderService = new OrderService();\n//\t\t$this->CommonService = new CommonService();\n\t}", "title": "" }, { "docid": "d05df2a463c21e77af02a91412de93c1", "score": "0.5716488", "text": "public function run()\n {\n\n Service::create([\n 'title'=>\"Разработка\",\n 'alias'=>'development',\n 'short_text'=>\"услуги разработки заказного программного обеспечения под нужды заказчика\",\n 'img'=>\"cogs\",\n 'description'=>\"<h1>Разработка заказного программного обеспечения</h1>\n <p>\n Разработка и внедрение программного обеспечения по индивидуальным требованиям заказчика позволяет \n получить уникальный продукт, полностью адаптированный к условиям и нуждам заказчика, учитывающим \n динамику и перспективу развития не только предприятия заказчика, но и рынка на котором он работает.\n </p>\n <h3>Преимущества заказной разработки</h3>\n <ul>\n <li>Возможность получить только необходимый функционал;</li>\n <li>Возможность автоматизировать собственные бизнес-процессы, дающие конкурентное преимущество;</li>\n <li>Возможность добавить новые функции к&nbsp;уже созданной и&nbsp;работающей системе без изменения \n ее&nbsp;других компонент;</li>\n <li>Строгий контроль сроков и бюджета проекта;</li>\n <li>Сокращение сроков внедрения;</li>\n <li>Высокий уровень качества и соответствие требованиям пользователей;</li>\n <li>Ответственность разработчика;</li>\n <li>Поддержка системы на основе гарантированного уровня сервиса на&nbsp;длительный срок и&nbsp;возможность \n дальнейшего развития системы;</li>\n <li>Существенное снижение нагрузки на&nbsp;собственную службу ИТ;</li>\n <li>Меньшая совокупная стоимость владения по&nbsp;сравнению с&nbsp;самостоятельной организацией поддержки \n и&nbsp;развития системы.</li>\n </ul>\n <h3>Техническая экспертиза</h3>\n <p>\n Языки разработки:\n </p>\n <ul>\n <li>PHP;</li>\n <li>Java;</li>\n <li>PL/SQL (процедурное расширение SQL, для Oracle RDBM);</li>\n <li>JavaScript;</li>\n <li>Bootstrap;<br>\n </li>\n <li>CSS;</li>\n <li>HTML.</li>\n </ul>\n <p>\n Инструменты:\n </p>\n <ul>\n <li>Интеграционные системы — IBM WebSphere Cast Iron;</li>\n <li>CMS – Битрикс, Joomla!, WordPress, Drupal;</li>\n <li>Sitatex — обработка технологических телеграмм;</li>\n <li>SmartVista — интегрированная полнофункциональная система, предназначенная для организации и ведения \n всего спектра операций электронного бизнеса. Продукты SmartVista сертифицированы международными платежными \n системами Visa, MasterCard, China UnionPay, Diners Club...;</li>\n <li>SabreSonic Host / Sabre Web Services / Travel Data — инструменты бронирования билетов;</li>\n <li>CRM (Customer Relationship Management) — Битрикс24.</li>\n <li>Операционные системы: Solaris, Linux, Windows;</li>\n <li>СУБД: PostgreSQL, Oracle, Redis.</li>\n </ul>\",\n ]);\n Service::create([\n 'title'=>\"Интеграция\",\n 'alias'=>'integration',\n 'short_text'=>\"услуги по проектированию, реализации и сопровождению интеграционных решений\",\n 'img'=>\"server\",\n 'description'=>\"<h1>Построение интеграционных решений</h1>\n <p>\n Предлагаем услуги по проектированию, реализации и сопровождению интеграционных решений, основанных \n на открытых стандартах. Компания обладает большим опытом реализации интеграционных решений для \n транспорта (Аэрофлот, Трансаэро, Уральские Авиалинии...), сферы телекоммуникаций, энергетического \n комплекса (ГК РОсатом) и сферы государственного управления. Предложим решение, которое обеспечит \n решение ваших задач с разумными затратами и в разумные сроки.\n </p>\n <p>\n Задача интеграции является одной из серьезнейших задач, с которыми приходится сталкиваться компаниям. \n Даже в том случае, когда в компании декларируется полный переход на единую систему поддержки бизнеса \n (ERP и т.п.), задача интеграции никуда не исчезает. Переход на новую систему не может быть сделан \n моментально, и новая система достаточно долго (несколько лет) должна использоваться параллельно с \n унаследованными системами, либо с предыдущими версиями этой же системы, и эти системы нужно интегрировать.\n </p>\n <p>\n В реальной жизни ни одна ERP-система не в состоянии решить абсолютно все задачи, стоящие перед \n предприятием. Следовательно, потребуется приобретение дополнительных модулей или разработка \n собственного приложения, реализующего необходимую функциональность, и, как результат, проведение \n интеграции.\n </p>\n <h3>Можно выделить два основных вида интеграции:</h3>\n <ul>\n <li>Интеграция бизнес-процессов (Business Process Integration)<br>\n Целью является объединение функций одного приложения с функциями другого в единый бизнес-процесс. \n При этом может быть обеспечена интеграция близкая к реальному времени, когда данные при их изменении \n в одной из систем «моментально» становятся доступными для использования во всех остальных системах.</li>\n <li>Интеграция данных (Data Integration)<br>\n Основной целью данного вида интеграции является представление информации, находящейся в многочисленных \n системах, в полном, унифицированном, согласованном и точном виде, который пригоден для анализа и \n обработки.</li>\n </ul>\n <h3>Основными методами решения задачи интеграции бизнес-процессов являются:</h3>\n <ul>\n <li>Интеграция корпоративных приложений (Enterprise Application Integration)<br>\n Технологическую основу данного решения составляет интеграционная платформа, обеспечивающая передачу \n сообщений, \n маршрутизацию и трансформацию сообщений, а также взаимодействие с прикладными системами (с помощью \n адаптеров или интерфейсов приложений). </li>\n <li>Web-интеграция<br>\n Основу данного решения составляют корпоративные порталы, обеспечивающие доступ к структурированным, \n персонифицированным, корпоративным и другим данным, посредством Web-интерфейса. В Web-браузере \n пользователя формируется интегрированная рабочая среда, обеспечивающая возможность одновременной \n работы со всеми необходимыми системами. Передача необходимых данных между системами осуществляется \n средствами компонент портала. </li>\n <li>\n Комбинированный подход, когда портал является одним из интегрируемых приложений. </li>\n </ul>\"\n ]);\n Service::create([\n 'title'=>\"Веб-приложения\",\n 'alias'=>'web-applications',\n 'short_text'=>\"набор эффективных и качественных решений, построенных на веб-технологиях\",\n 'img'=>\"file-code\",\n 'description'=>\"<h1>Разработка web-приложений</h1>\n <p>\n Мы предлагаем полный спектр услуг по проектированию, разработке, внедрению и поддержке \n web-приложений/сайтов на всех стадиях жизненного цикла. Для получения более подробной \n информации обращайтесь по контактам на сайте.\n </p>\n <p>\n Работать с нами очень легко — отлаженные методы взаимодействия, доступные почти \n круглосуточно менеджеры проектов сократят издержки на коммуникации в разы и сделают \n наше сотрудничество наиболее продуктивным.\n </p>\n <h3>Автоматизация деятельности или что именно за Вас может делать IT-система?</h3>\n <p>\n Согласно статистике, менеджеры и персонал минимум на 40% нагружены задачами, \n которые могут выполнять автоматизированные системы, но проблема не только в \n банальном написании программы способной упростить или автоматизировать работу \n человека, самое главное — понять, что именно стоит упростить или автоматизировать в первую очередь.\n </p>\n <h3>Имеются типовые задачи, автоматизация которых даёт существенный эффект —</h3>\n <ul>\n <li>\n Контроль исполнения поручений руководства — не все компании до настоящего времени \n используют даже простые системы контроля исполнения поручений, установив и настроив \n такую систему, вы увидите, сколько задач было проигнорировано или упущено вашими \n подчиненными, на сколько эффективен тот или иной сотрудник в конкретной задачи. \n Помимо данных, которые лежат на поверхности, возможно также получать статистику о \n том, как часто сотрудник посещает систему или время его первого посещения каждый день.</li>\n <li>\n Автоматизация документооборота — теряются важные документы? Не удаётся найти в \n электронном виде договор, который был заключен несколько лет назад? В зависимости \n от того, на сколько это критично — на столько сложную систему документооборота \n стоит устанавливать. </li>\n <li>\n Контроль получения уведомлений — вы не можете быть уверены, что ваш партнёр знает об отправленном \n ему грузе, о назначенной ему встрече, а таких партнёров 50 и они говорят на трех разных языках? \n Очевидно, что в данном случае полезнее и дешевле двух секретарей будет автоматизированная система \n рассылки уведомлений по существующим каналам связи (SMS, E-mail, Facebook и пр.), которая запросит \n ответ о том, что информация получена, если ответа не придёт, то система после безуспешного повторного \n обращения автоматически подготовит список дополнительного контроля для связи с теми, кто эти уведомления \n не получил. </li>\n </ul>\n <h3>Коммуникация с клиентами и их поддержка, как?</h3>\n <p>\n Если у вас весьма обширная клиентская база, и все клиенты заказывают у вас разные услуги, а еще лучше, \n постоянно беспокоят и задают вопросы, на которые не все менеджеры знают ответ и передают их другим \n менеджерам, мы знаем, как разобраться в происходящем и существенно улучшить работу с клиентами.\n </p>\n <ul>\n <li>Внедрить базовую систему CRM — все клиенты будут структурированы, вы будете видеть, кто из менеджеров \n с кем общался и о чем договорился. Всегда будет возможность провести тематические рассылки по необходимой \n категории клиентов.</li>\n <li>Подключить к CRM АТС, чтобы вы могли прослушать историю телефонных переговоров с клиентом вашего \n менеджера, оценить качество работы менеджера, дать рекомендации да и просто знать о чем конкретно шел \n разговор с каждым из клиентов.</li>\n <li>Завести базу знаний — вы увидите, как улучшится преемственность кадров, как уменьшится нагрузка на \n службу поддержки клиентов, как ускорится процесс обучения новых сотрудников.</li>\n <li>Воспользоваться услугой SMO — с помощью базы знаний, мы аккумулируем ответы на часто задаваемые \n профильные вопросы, обеспечиваем полноценный диалог с потенциальными клиентами.</li>\n </ul>\n <p>\n Возможно решение других разных интересных задач, дайте взглянуть на ваш бизнес и мы подскажем \n чем можем быть полезны! Звоните!\n </p>\n <p>\n Свой большой опыт разработки web-проектов автоматизации бизнес-процессов взаимодействия с \n клиентами и партнерами мы перенесли на создание решений, помогающих организовать работу внутри компании.\n </p>\n <p>\n Помимо создания информационных web-порталов для сотрудников наших клиентов, мы разрабатываем \n решения, помогающие в процессах обучения и мотивации специалистов, организации рабочего процесса и \n контроля выполнения поручений.\n </p>\n <h3>Корпоративные порталы</h3>\n <ul>\n <li>Классический интранет портал (на базе Битрикс24: выполненные проекты - для сети ремонтных \n мастерских, для системы ТПП России, для промышленных предприятий и общественных организаций на \n территориях присутствия Росатома)</li>\n <li>Сервисы администрирования офиса (переговорные, объявления и пр.)</li>\n <li>Сервис электронного документооборота</li>\n </ul>\n <h3>Web-порталы управления бизнесом</h3>\n <ul>\n <li>Сервис постановки и контроля выполнения задач и поручений</li>\n <li>Сервис статистической отчетности по показателям предприятия</li>\n <li>Сервис статистической отчетности по активам предприятия</li>\n <li>CRM</li>\n </ul>\n <h3>Порталы автоматизации работы с партнерской сетью</h3>\n <ul>\n <li>Система аккредитации и мониторинга партнеров (выполнены проекты для Государственной корпорации \n по атомной энергии «Росатом», правительства Тульской Области, субподрядные договора)</li>\n <li>Система управления базой торговых точек и их сотрудников</li>\n <li>Система управления грузоперевозкой (проект для компании Авиасофтика)</li>\n </ul>\n <h3>B2C-сайты для продвижения товаров и услуг</h3>\n <ul>\n <li>Порталы электронной коммерции</li>\n <li>Туристические порталы</li>\n <li>Онлайн-калькулятор</li>\n <li>Онлайн-конфигуратор</li>\n <li>Личный кабинет клиента</li>\n <li>Сервисы программы лояльности<br>\n </li>\n <li>Интеграция с CRM</li>\n </ul>\n <h3>Авиа порталы</h3>\n <ul>\n <li>Системы бронирования</li>\n <li>Электронная коммерция</li>\n <li>Платежные решения</li>\n <li>Расписание и информирование пассажиров</li>\n <li>Грузоперевозка</li>\n </ul>\"\n ]);\n Service::create([\n 'title'=>\"Консалтинг\",\n 'alias'=>'consulting',\n 'short_text'=>\"оптимизация, проектирование, оценка эффективности, моделирование и документирование\",\n 'img'=>\"handshake\",\n 'description'=>\"<h1>Консалтинг</h1>\n <p>\n ИТ-консалтинг, служит для поиска путей более эффективного решения бизнес-задач средствами ИТ. \n Как и управленческий консалтинг, этот вид услуг выполняется в тесном сотрудничестве с проектной \n командой заказчика. Основная его задача - помочь заказчику выработать такую политику и стратегию \n использования средств ИТ, которые бы в наибольшей степени соответствовали целям его бизнеса или \n отдельных направлений деятельности, а также создать эффективный план по их реализации.\n </p>\n <h3>В числе услуг по ИТ-консалтингу можно выделить следующие:</h3>\n <ul>\n <li>Оптимизация стратегии развития программной и аппаратной составляющих инфраструктуры бизнеса, \n планирование и технико-экономическое обоснование соответствующих инвестиций;</li>\n <li>Планирование модернизации и развития ИТ-средств в соответствии с потребностями заказчика, в том \n числе помощь при выборе программных и технических средств;</li>\n <li>Реинжиниринг и моделирование деятельности предприятия, анализ, модельные эксперименты и разработка \n предложений по оптимизации бизнес-процессов;</li>\n <li>Разработка планов и программ по внедрению и модернизации средств ИКТ для бизнеса, в том числе \n технико-экономическое обоснование инвестиций в ИКТ;</li>\n <li>Создание решений по интеграции локальных прикладных систем, анализ существующих предложений на \n рынке и выбор программных продуктов, лучше всего соответствующих потребностям и возможностям заказчика.</li>\n </ul>\n <p>\n Деятельность по консалтингу выполняется специалистами компании Software Provider Ltd с обязательным \n использованием стандартов RUP, ГОСТ Р, ИСО 9001-2008, что позволяет обеспечивать прозрачность \n исполнения работ для клиентов. При этом используются современные методики (BSC, KPI и т.д.) и \n методы моделирования и оптимизации бизнес процессов. В качестве инструментальных средств применяются \n BPWin, Oracle BPA, Business Studio, Microsoft Visio и т.д.\n </p>\"\n ]);\n Service::create([\n 'title'=>\"Разработка веб-порталов\",\n 'alias'=>'web-portal-development',\n 'short_text'=>\"Разработка веб-портала, предоставляющего пользователю различные интерактивные интернет-сервисы, \n которые работают в рамках этого сайта\",\n 'img'=>\"laptop\",\n 'description'=>\"<h1>Разработка web-порталов</h1>\n <p>\n Мы предлагаем полный спектр услуг по проектированию, разработке, внедрению и поддержке web-порталов. \n Работать с нами очень легко — отлаженные методы взаимодействия, доступные почти круглосуточно менеджеры \n проектов сократят издержки на коммуникации в разы и сделают наше сотрудничество наиболее продуктивным.\n </p>\n <h3><i>Наша специализация:</i><br>\n </h3>\n <h3>Корпоративные порталы</h3>\n <ul>\n <li>Классический интранет портал (на базе Битрикс24: выполненные проекты - для сети ремонтных мастерских, \n для системы ТПП России, для промышленных предприятий и общественных организаций на территориях присутствия \n Росатома)</li>\n <li>Сервисы администрирования офиса (переговорные, объявления и пр.)</li>\n <li>Сервис электронного документооборота</li>\n <li>Сервис постановки и контроля выполнения задач и поручений</li>\n <li>Сервис статистической отчетности по показателям предприятия</li>\n <li>Сервис статистической отчетности по активам предприятия</li>\n <li>CRM</li>\n </ul>\n <h3>Порталы автоматизации работы с партнерской сетью</h3>\n <ul>\n <li>Система аккредитации и мониторинга партнеров (выполненны проекты для Государственной корпорации по \n атомной энергии «Росатом», правительства Тульской Области, субподрядные договора)</li>\n <li>Система управления базой торговых точек и их сотрудников</li>\n <li>Система управления грузоперевозкой (проект для компании Авиасофтика)</li>\n </ul>\n <h3>B2C-сайты для продвижения товаров и услуг</h3>\n <ul>\n <li>Порталы электронной коммерции</li>\n <li>Туристические порталы</li>\n <li>Онлайн-калькулятор</li>\n <li>Онлайн-конфигуратор</li>\n <li>Личный кабинет клиента</li>\n <li>Сервисы программы лояльности<br>\n </li>\n <li>Интеграция с CRM</li>\n </ul>\n <h3>Авиа порталы</h3>\n <ul>\n <li>Системы бронирования</li>\n <li>Электронная коммерция</li>\n <li>Платежные решения</li>\n <li>Расписание и информирование пассажиров</li>\n <li>Грузоперевозка</li>\n </ul>\"\n ]);\n Service::create([\n 'title'=>\"Разработка интернет магазинов и сайтов\",\n 'alias'=>'development-of-online-stores-and-websites',\n 'short_text'=>\"Разработка интернет магазинов и сайтов различной сложности\",\n 'img'=>\"shopping-cart\",\n 'description'=>\"<h1>Разработка интернет магазинов и сайтов</h1>\n <p>\n Мы предлагаем полный спектр услуг по созданию интернет магазинов и сайтов.\n </p>\n <p>\n Виды услуг:\n </p>\n <ul>\n <li>Создание уникального дизайна;</li>\n <li>Создание интернет магазина или сайта;</li>\n <li>Оптимизация сайта под мобильные устройства;</li>\n <li>Оптимизация и ускорение загрузки сайта;</li>\n <li>Установка сайта на хостинг и докупка доменного имени.</li>\n </ul>\n <h2>Разработка интернет магазинов</h2>\n <ul>\n <li>Опыт интеграции интернет магазина, офлайн точек, CRM и 1С;</li>\n <li>Собственные тиражируемые решения, для наших партнеров;</li>\n <li>Создание удобного и эффективного инструмента покупок для пользователей: снижение \n сроков обработки заказов, повышение конверсии, разнообразие и безопасность методов оплаты \n (собственный модуль поддержки TLS 1.2);</li>\n <li>Создание функционала интернет-магазина, способного конкурировать в своей нише и \n удовлетворять потребности пользователей как в информации о товарах, так и в возможностях \n быстрого и надежного совершения покупок.</li>\n </ul>\n <h2>Разработка сайтов</h2>\n <ul>\n <li>Разработка корпоративных сайтов;</li>\n <li>Разработка промо сайтов (в портфолио промо сайты ряда форумов малой авиации);</li>\n <li>Разработка информационных порталов (в нашем портфолио - портал бюро СЭРА с полным \n информационным каталогом по каждому из атомградов).</li>\n </ul>\"\n ]);\n }", "title": "" }, { "docid": "04b41c5d46f86cb0aba7ce91be421b1c", "score": "0.5704755", "text": "public function __construct()\n {\n parent::__construct();\n // $this->refService = new LabelService();\n }", "title": "" }, { "docid": "5e93fe07ff18253ed3ae5dfa2c9a585e", "score": "0.5693085", "text": "public function create()\n {\n //$ddd=Service::create(['nomService'=>'Ma première Service','localisation'=>'Ouaga']);\n }", "title": "" }, { "docid": "174669e1ab2efab575bfe9d458724194", "score": "0.56722873", "text": "private function add_ware_house_stafff(){ }", "title": "" }, { "docid": "9e03145b8009fa5890c59fab5fb4c102", "score": "0.56618845", "text": "public function __construct()\n {\n $this->Service = new LogService();\n }", "title": "" }, { "docid": "46a976118948ce520b5ef1a5194aa3e8", "score": "0.565201", "text": "public function getNumService():int{\n return $this->numService;\n }", "title": "" }, { "docid": "cdab8e0bb50abbc6968bb23d5b7e556a", "score": "0.5636325", "text": "public function __construct()\n {\n $this->alarmsServices = new AlarmsServices();\n $this->thresholdsServices = new ThresholdsServices();\n $this->collectorsServices = new CollectorsServices();\n }", "title": "" }, { "docid": "496503cced47ac4a2a1dd5a394b88da2", "score": "0.56208205", "text": "protected function _InitService()\n\t{\n\t\t//\n\t\t// Set idle status.\n\t\t//\n\t\t$this->_Status( FALSE );\n\n\t}", "title": "" }, { "docid": "038c31e4d0c6e1717bdd77520c468fcc", "score": "0.5619135", "text": "private function __construct() {\n\t\t// Initialize the Container Array \n\t\t/**\n\t\t *\tContainer is arranged in the following manner.\n\t\t *\n\t\t *\t$name = 'ServiceName';\n\t\t *\t$this->container_array[$name]['object'] -- Returns the object\n\t\t *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t instance\n\t\t *\n\t\t *\t$this->container_array[$name]['description'] -- Returns the Service\n\t\t *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription\n\t\t *\n\t\t *\t$name -- Service Name is the key of the array, hence there cannot be\n\t\t *\t\t\t\tduplicate service\n\t\t **/\n\t\t$this->container_array = array();\n\t\t\n\t}", "title": "" }, { "docid": "dc9daf21d5e1c8ff4bfcd194dc768e7a", "score": "0.56164366", "text": "private function initService()\n {\n $credentials = new Credentials(\n self::$CLIENT_ID,\n self::$CLIENT_SECRET,\n $this->getBaseUrl() . \"/connect\" // Callback URL\n );\n // Create the service\n $serviceFactory = new ServiceFactory();\n $serviceFactory->setHttpClient(new GuzzleClient());\n $this->sleepcloudService = $serviceFactory->createService(\n 'Google',\n $credentials,\n $this->credentialsManager->tokenCredentials,\n array(Google::SCOPE_USERINFO_EMAIL)\n );\n }", "title": "" }, { "docid": "1825913e40cdeae0c9bf5f52a53a01f0", "score": "0.5614883", "text": "public function Service()\n {\n \treturn $this->Instance()->Service();\n }", "title": "" }, { "docid": "ad04b7cfb3562dbfb3f22cc2362565bc", "score": "0.5611215", "text": "function services()\n{\n\n$this->database = new Database();\n\n}", "title": "" }, { "docid": "0149abc89933c785e07eb539475f983a", "score": "0.56065273", "text": "public function run()\n\t{\n\t\t$id=$this->getRequest()->getServiceParameter();\n\t\tif(isset($this->_services[$id]))\n\t\t{\n\t\t\t$serviceConfig=$this->_services[$id];\n\t\t\tif($this->getApplication()->getConfigurationType()==TApplication::CONFIG_TYPE_PHP)\n\t\t\t{\n\t\t\t\tif(isset($serviceConfig['class']))\n\t\t\t\t{\n\t\t\t\t\t$service=Prado::createComponent($serviceConfig['class']);\n\t\t\t\t\tif($service instanceof TJsonResponse)\n\t\t\t\t\t{\n\t\t\t\t\t\t$properties = isset($serviceConfig['properties'])?$serviceConfig['properties']:array();\n\t\t\t\t\t\t$this->createJsonResponse($service,$properties,$serviceConfig);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new TConfigurationException('jsonservice_response_type_invalid',$id);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tthrow new TConfigurationException('jsonservice_class_required',$id);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$properties=$serviceConfig->getAttributes();\n\t\t\t\tif(($class=$properties->remove('class'))!==null)\n\t\t\t\t{\n\t\t\t\t\t$service=Prado::createComponent($class);\n\t\t\t\t\tif($service instanceof TJsonResponse)\n\t\t\t\t\t\t$this->createJsonResponse($service,$properties,$serviceConfig);\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new TConfigurationException('jsonservice_response_type_invalid',$id);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tthrow new TConfigurationException('jsonservice_class_required',$id);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tthrow new THttpException(404,'jsonservice_provider_unknown',$id);\n\t}", "title": "" }, { "docid": "efbc6897007588cadf4019afc0edccc4", "score": "0.5593268", "text": "function listervuepersonnelservice(){\n session_start();\n $persoservicemanager = $this->loadManager('Personnelservice');\n $affichage = $persoservicemanager->listerpersonnelservice();\n ///$affichage = $this->persoservice->\n require_once './Vue/Vuepersonnelservice/Affichepersonnelservice.php';\n }", "title": "" }, { "docid": "b04106f60dd91fbb4031ce2e9c5192e5", "score": "0.5592795", "text": "public function add_service( $service ) {\n\t\t$this->services[ $service ] = true;\n\t}", "title": "" }, { "docid": "6f24ef91f33768030a2b073d81030d66", "score": "0.55891305", "text": "public function run()\n {\n \\App\\Service::create(['id' => 804040, 'name' => 'Sonstige Umzugsleistungen']);\n \\App\\Service::create(['id' => 802030, 'name' => 'Abtransport, Entsorgung und Entrümpelung']);\n \\App\\Service::create(['id' => 411070, 'name' => 'Fensterreinigung']);\n \\App\\Service::create(['id' => 402020, 'name' => 'Holzdielen schleifen']);\n \\App\\Service::create(['id' => 108140, 'name' => 'Kellersanierung']);\n }", "title": "" }, { "docid": "2b7d9b3b220a39950a2e17f3554265db", "score": "0.5584074", "text": "public function ErpSetoresService() \n\t{\n\t\t$this->ErpConexao = new ErpConexaoService();\n\t}", "title": "" }, { "docid": "23092d0014244276d9589ca65ee063ff", "score": "0.5571766", "text": "public function getServiceConfig()\n {\n // TODO: Implement getServiceConfig() method.\n }", "title": "" }, { "docid": "d3e2e13ed0adbbcc6056ab734481975d", "score": "0.5568686", "text": "public function getNomService():string{\n return $this->nomService;\n }", "title": "" }, { "docid": "56d2c127353ce222c8b8bbf2b6681225", "score": "0.55508643", "text": "public function __construct(){\n $this->file_service = new FileService();\n }", "title": "" }, { "docid": "56d2c127353ce222c8b8bbf2b6681225", "score": "0.55508643", "text": "public function __construct(){\n $this->file_service = new FileService();\n }", "title": "" }, { "docid": "41da95ea69dc6eb032b40d168269c850", "score": "0.5549638", "text": "public function addServices() {\n\t\tif ($this->commandManager->commandExist('systemctl')) {\n\t\t\t$output = $this->commandManager->send('systemctl list-units --type=service', true);\n\t\t\t$this->zipManager->addFileFromText('services.log', $output);\n\t\t}\n\t}", "title": "" }, { "docid": "54319ff96ec0aeae0847e6cac082ddfa", "score": "0.55466384", "text": "public function __construct()\n {\n // Dependencies automatically resolved by service container...\n \n }", "title": "" }, { "docid": "a1a1ce19214ca5f6ab9fef8eb013d070", "score": "0.55458635", "text": "public function __construct($api_service)\n {\n parent::__construct($api_service);\n }", "title": "" }, { "docid": "8aa2c96a7f0a69bd410a526481eaf07a", "score": "0.5543483", "text": "private function __construct() {\n if (!$this->client) {\n $this->client = \\Drupal::service('salesforce.client');\n }\n }", "title": "" }, { "docid": "f21bef2cc044d8a136a10ee1641c3ba0", "score": "0.55400485", "text": "public function __construct()\n {\n //$this->boundaryWallService = new BoundaryWallService();\n //$this->builtUpAreaService = new BuiltUpAreaService();\n $this->categoryService = new CategoryService();\n $this->commodityService = new CommodityService();\n //$this->coordinatingAgencyService = new CoordinatingAgencyService();\n $this->departmentService = new DepartmentService();\n $this->designationService = new DesignationService();\n $this->educationService = new EducationService();\n $this->idProofService = new IdProofService();\n $this->levelService = new LevelService();\n //$this->marketRegulationService = new MarketRegulationService();\n //$this->marketTypeService = new MarketTypeService();\n $this->memberRelationService = new MemberRelationService();\n $this->mfpUseService = new MFPUseService();\n $this->occupationService = new OccupationService();\n $this->officeBearerRoleService = new OfficeBearerRoleService();\n //$this->periodicityMasterService = new PeriodicityMasterService();\n $this->phoneTypeService = new PhoneTypeService();\n $this->procurementAgentService = new ProcurementAgentService();\n $this->regulationService = new RegulationService();\n $this->roleService = new RoleService();\n //$this->rpmOwnershipService = new RPMOwnershipService();\n // $this->trainingStatusService = new TrainingStatusService();\n //$this->transportationService = new TransportationService();\n $this->unitService = new UnitService();\n $this->vehicleService = new VehicleService();\n //$this->warehouseAgeService = new WarehouseAgeService();\n //$this->warehouseConditionService = new WarehouseConditionService();\n //$this->warehousePremisesService = new WarehousePremisesService();\n $this->warehouseTypeService = new WarehouseTypeService();\n $this->yearService = new YearService();\n $this->bankService = new BankService();\n $this->financialYearService = new FinancialYearService();\n }", "title": "" }, { "docid": "3d2bbcfda3fece0f855752a8794ebebf", "score": "0.55363464", "text": "public function getServiceName();", "title": "" }, { "docid": "3b48b15e921f4dec9f8eb83bd98de904", "score": "0.5535701", "text": "public function testCreateService(){\n\t\t$_SERVER['HTTP_HOST'] = 'boiler-app-messenger-test.com';\n\t\t$oCssToInlineStylesProcessorFactory = new \\BoilerAppMessenger\\Factory\\CssToInlineStylesProcessorFactory();\n\t\t$this->assertInstanceOf('BoilerAppMessenger\\StyleInliner\\Processor\\CssToInlineStylesProcessor',$oCssToInlineStylesProcessorFactory->createService($this->getServiceManager()));\n\t}", "title": "" }, { "docid": "b81d83c6b03d444aeff3ce34b441242f", "score": "0.5525218", "text": "function NasServiceList()\n{\n\tglobal $config;\n\n\t$serviceinfo = array();\n\n\t$serviceinfo['num'] = 4;\n\t\t\n\t$serviceinfo['service']['smb'] = isset($config['samba']['enable'])?\"open\":\"close\";\n\t$serviceinfo['service']['nfs'] = isset($config['nfsd']['enable'])?\"open\":\"close\";\n\t$serviceinfo['service']['iscsi'] = isset($config['iscsitarget']['enable'])?\"open\":\"close\";\n\t$serviceinfo['service']['ftp'] = isset($config['ftpd']['enable'])?\"open\":\"close\";\n\t\n\treturn new xmlrpcresp(php_xmlrpc_encode($serviceinfo));\n}", "title": "" }, { "docid": "9898ff1041cd2abdfb0eaa70637a7d20", "score": "0.5522449", "text": "abstract protected function getServiceProvider(): string;", "title": "" }, { "docid": "51c9dcd031bd39c47a05303c4878932b", "score": "0.5521836", "text": "public final function __construct() { \n $this->setLogger(\\Logger::getLogger(\"servicesLogger\"));\n }", "title": "" }, { "docid": "5bfaa530f568a6d8ddf096e2dd94dea8", "score": "0.55043346", "text": "private function run_theme_services() : void {\n\n foreach ( $this->services as $id => $service ) {\n\n if ( is_subclass_of( $service , 'FunctionsPhp\\Lib\\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 , 'FunctionsPhp\\Lib\\Registerable' ) ) {\n\n $service->register();\n\n }\n\n }\n\n }", "title": "" }, { "docid": "49d4307088139908b4c79541272148e0", "score": "0.5503567", "text": "public function __toString(){\n return \"{numero service}\".$this->numService.\"{nom de service}\".$this->nomService.\"{ville}\".$this->ville;\n }", "title": "" }, { "docid": "936722401b0765ac15f7cab678a04ea4", "score": "0.5502926", "text": "function hook_little_helpers_services_alter(array &$info) {\n $info['b']['class'] = '\\\\SplStack';\n}", "title": "" }, { "docid": "49daad2260afb60595b76a390fed6dc3", "score": "0.55018693", "text": "public function admin_service() {\n\t\t$data['service'] \t= $this->crud_model->_all_service();\n\t\t$data['session'] \t= $this->access->session_data();\n\n\t\t$this->access->pages_admin('service/admin', $data);\n\t}", "title": "" }, { "docid": "b9a0de464e9b2440adf2a6f8ab425b42", "score": "0.54956824", "text": "public function getServices(){\n\t\treturn $this->services;\n\t}", "title": "" }, { "docid": "f4db5f32fb97b23769fcbba7c6790053", "score": "0.54866964", "text": "public function testGetListOfAdditionalServicesDefinitionsUsingGET()\n {\n }", "title": "" }, { "docid": "a8b7030b1b6946665d89b1545bd38947", "score": "0.5484359", "text": "private function _getService() {\n\t\tif (isset($this->request->params['service'])) {\n\t\t\treturn $this->request->params['service'];\n\t\t}\n\t\treturn 'default';\n\t}", "title": "" }, { "docid": "d80bf71d46650ff5aa44a4b1de009437", "score": "0.5477619", "text": "function ciniki_services_serviceAdd(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'business_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Business'), \n\t\t'type'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Type', \n\t\t\t'validlist'=>array('1', '10')),\n\t\t'name'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Name'),\n 'category'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Category'), \n\t\t'status'=>array('required'=>'no', 'blank'=>'no', 'default'=>'10', 'name'=>'Status'),\n 'duration'=>array('required'=>'no', 'default'=>'0', 'blank'=>'yes', 'name'=>'Duration'), \n 'repeat_type'=>array('required'=>'no', 'default'=>'0', 'blank'=>'yes', 'name'=>'Repeat Type', \n\t\t\t'validlist'=>array('0', '10', '20', '30', '40')), \n 'repeat_interval'=>array('required'=>'no', 'default'=>'1', 'blank'=>'yes', 'name'=>'Repeat Interval'), \n 'due_after_days'=>array('required'=>'no', 'default'=>'0', 'blank'=>'yes', 'name'=>'Due After Days'), \n 'due_after_months'=>array('required'=>'no', 'default'=>'0', 'blank'=>'yes', 'name'=>'Due After Months'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this business\n // \n\tciniki_core_loadMethod($ciniki, 'ciniki', 'services', 'private', 'checkAccess');\n $rc = ciniki_services_checkAccess($ciniki, $args['business_id'], 'ciniki.services.serviceAdd', 0, 0); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n\t// \n\t// Turn off autocommit\n\t// \n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n\t$rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.services');\n\tif( $rc['stat'] != 'ok' ) { \n\t\treturn $rc;\n\t} \n\n\t//\n\t// Get a new UUID\n\t//\n\tciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUUID');\n\t$rc = ciniki_core_dbUUID($ciniki, 'ciniki.services');\n\tif( $rc['stat'] != 'ok' ) {\n\t\treturn $rc;\n\t}\n\t$uuid = $rc['uuid'];\n\n\t//\n\t// Add the service to the database\n\t//\n\t$strsql = \"INSERT INTO ciniki_services (uuid, business_id, status, \"\n\t\t. \"name, category, type, \"\n\t\t. \"duration, repeat_type, repeat_interval, repeat_number, \"\n\t\t. \"due_after_days, due_after_months, \"\n\t\t. \"date_added, last_updated) VALUES (\"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $uuid) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['business_id']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['status']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['name']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['category']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['type']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['duration']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['repeat_type']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['repeat_interval']) . \"', \"\n\t\t. \"0, \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['due_after_days']) . \"', \"\n\t\t. \"'\" . ciniki_core_dbQuote($ciniki, $args['due_after_months']) . \"', \"\n\t\t. \"UTC_TIMESTAMP(), UTC_TIMESTAMP())\"\n\t\t. \"\";\n\t$rc = ciniki_core_dbInsert($ciniki, $strsql, 'ciniki.services');\n\tif( $rc['stat'] != 'ok' ) { \n\t\tciniki_core_dbTransactionRollback($ciniki, 'ciniki.services');\n\t\treturn $rc;\n\t}\n\tif( !isset($rc['insert_id']) || $rc['insert_id'] < 1 ) {\n\t\tciniki_core_dbTransactionRollback($ciniki, 'ciniki.services');\n\t\treturn array('stat'=>'fail', 'err'=>array('pkg'=>'ciniki', 'code'=>'835', 'msg'=>'Unable to add service'));\n\t}\n\t$service_id = $rc['insert_id'];\n\n\t//\n\t// Add the uuid to the history\n\t//\n\t$rc = ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.services', 'ciniki_service_history', \n\t\t$args['business_id'], 1, 'ciniki_services', $service_id, 'uuid', $uuid);\n\n\t//\n\t// Add all the fields to the change log\n\t//\n\t$changelog_fields = array(\n\t\t'status',\n\t\t'name',\n\t\t'category',\n\t\t'type',\n\t\t'duration',\n\t\t'repeat_type',\n\t\t'repeat_interval',\n\t\t'due_after_days',\n\t\t'due_after_months',\n\t\t);\n\tforeach($changelog_fields as $field) {\n\t\tif( isset($args[$field]) && $args[$field] != '' ) {\n\t\t\t$rc = ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.services', 'ciniki_service_history', \n\t\t\t\t$args['business_id'], 1, 'ciniki_services', $service_id, $field, $args[$field]);\n\t\t}\n\t}\n\n\t//\n\t// Commit the database changes\n\t//\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.services');\n\tif( $rc['stat'] != 'ok' ) {\n\t\treturn $rc;\n\t}\n\n\t//\n\t// Update the last_change date in the business modules\n\t// Ignore the result, as we don't want to stop user updates if this fails.\n\t//\n\tciniki_core_loadMethod($ciniki, 'ciniki', 'businesses', 'private', 'updateModuleChangeDate');\n\tciniki_businesses_updateModuleChangeDate($ciniki, $args['business_id'], 'ciniki', 'services');\n\n\t$ciniki['syncqueue'][] = array('push'=>'ciniki.services.service', \n\t\t'args'=>array('id'=>$service_id));\n\n\treturn array('stat'=>'ok', 'id'=>$service_id);\n}", "title": "" }, { "docid": "d2cb449aca9f7914bdcd60c43790d32b", "score": "0.54704165", "text": "public function __construct()\n {\n $this->Service = new UsersService();\n $this->AccountService = new AccountService();\n }", "title": "" }, { "docid": "9d30c934d10da4c021368c3e131ff7ea", "score": "0.5462656", "text": "protected function registerServices() : void\n {\n $services = Configuration::read('Services');\n\n foreach ($services as $k => $v)\n {\n $this->set($k, $v);\n }\n }", "title": "" }, { "docid": "017c310748eaaeedd53cf42a31e77a64", "score": "0.545366", "text": "public static function get_services(){\n\t\treturn array(\n\t\t\tPages\\Dashboard::class,\n\t\t\tBase\\Enqueue::class,\n\t\t\tBase\\SettingsLinks::class,\n\t\t\tApi\\Ajax::class,\n\t\t\tBase\\Database::class,\n\t\t\tPages\\Search::class,\n\t\t\tPages\\Network::class,\n\t\t\tPages\\OCR::class,\n\t\t\tFunctions\\TemplateController::class,\n\t\t);\n\t}", "title": "" }, { "docid": "0e6a55ea6f2b680f1ca4f10dc6355105", "score": "0.5448267", "text": "public function __construct() {\n $this->contactsService2 = new Topic();\n $this->contactsService3 = new User();\n $this->contactsService = new User1();\n }", "title": "" }, { "docid": "e5c9871b589a9ba1e813ddc80576d5be", "score": "0.54374725", "text": "public static function get_services(){\n\t\treturn [\n\t\t\tBase\\AuthenticateEnqueue::class,\n\t\t\tBase\\AuthenticateShortcode::class\n\t\t];\n\t}", "title": "" }, { "docid": "d839a5ae9bc10d0535083ac02b67b214", "score": "0.54353136", "text": "protected function service($service_name)\n\t{\n\t\t$path = 'service';\n\t\t# Verify if Service Exist\n\t\tif (file_exists(\"{$path}/{$service_name}.php\")) {\n\t\t $service = \"{$service_name}\";\n\t\t \n # Include the Service\n\t\t\trequire_once(\"{$path}/{$service_name}.php\");\n\t\t\t# Instantiante the class Service and passing the Database Connection\n\t\t\treturn $service = new $service(Database::connect());\n\t\t} else {\n\t\t\techo \"( <b>{$service_name}</b> ) Service not exist in ( <b>{$path}</b> ) folder.\";\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "3351e04bec310130b36e73d7257839f9", "score": "0.5433222", "text": "public function ErpEmpresaService() \n\t{\n\t\t$this->ErpConexao = new ErpConexaoService();\n\t}", "title": "" }, { "docid": "40472753cecd0b62486f79d33bbf8f4b", "score": "0.5431939", "text": "public function services()\n\t{\n\n\t\t$this->load->view('public/services');\n\n\t}", "title": "" }, { "docid": "ea4a30c0459cca67e459c9171c47c4c5", "score": "0.5431662", "text": "public function __construct()\n {\n parent::__construct();\n $this->orderServiceImpl = new OrderServicesImpl();\n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5431159", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5431159", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "aceb2890063403d8007e65ccbe74f23d", "score": "0.5427765", "text": "public function __construct()\n {\n $this->service = new UserService;\n }", "title": "" }, { "docid": "0bfa0319d47a8b697a7d7aae82d846ed", "score": "0.5425734", "text": "public function __construct(EnricoService $service)\n {\n\t\t$this->enricoService = $service;\n parent::__construct();\n }", "title": "" }, { "docid": "a5e84493127f71d9c8a62dee0799aa12", "score": "0.542396", "text": "protected function onRequestStart() { return; }", "title": "" }, { "docid": "fd7cff61b6cf3fe8d1ff80c07bf00887", "score": "0.54117787", "text": "function generateServiceDescription() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "76596034f7b40cd8807676d244a278d9", "score": "0.541173", "text": "public function addService(object $service): void;", "title": "" }, { "docid": "eae69c5838e99663a62c1fdc61593bbc", "score": "0.53992003", "text": "public function getAllServices()\n {\n return OurService::select('id','slug','title','description','image')\n ->where('status','=',\\DB::raw(1))\n ->get();\n }", "title": "" }, { "docid": "456c13241d0187de1a833f1e0674e4e2", "score": "0.5398641", "text": "public function loadServices()\n {\n $this->_load(self::TYPE_SERVICE_LIST);\n $this->_extractListToArray();\n }", "title": "" }, { "docid": "93d60b1d8b54e1b06254957eafd10c61", "score": "0.5397558", "text": "public function create()\n {\n return \\Control::create('service');\n }", "title": "" }, { "docid": "0e83de3cf1b60c03ccc7cc182b9762d2", "score": "0.5393594", "text": "public function __construct( \\yolk\\app\\ServiceContainer $services ) {\r\n\t\t$this->services = $services;\r\n\t}", "title": "" }, { "docid": "7fcf75ad6cc6a1d7750fdfc8e0d21188", "score": "0.53894186", "text": "public function __construct()\n {\n // Dependencies are automatically resolved by the service container...\n\n }", "title": "" }, { "docid": "a61d5c6aea8b5cfc09226196fd3d3401", "score": "0.5387428", "text": "protected function serviceCreate()\n {\n $create = Str::studly(class_basename($this->argument('name')));\n\n $this->callSilent('service:create', [\n 'name' => \"{$create}Create\",\n ]);\n }", "title": "" }, { "docid": "cba7faef8b40969d4738ef5b602474e4", "score": "0.5377387", "text": "public function run()\n {\n $this->createService();\n }", "title": "" }, { "docid": "bafe3ae08368c389d4e05dfb6e16ab81", "score": "0.5375284", "text": "function setServiceName($serviceName) {\n $this->serviceName = $serviceName;\n\t}", "title": "" }, { "docid": "e6204cf57cbb146dcdca8e50867959fc", "score": "0.5372668", "text": "private function registerDefaultServices()\n\t{\n\t\t// register request object\n\t \t$this['request'] = function ($container) {\n return Request::createFromGlobals();\n };\n\n // register response object\n $this['response'] = function ($container) {\n \treturn new Response('', Response::HTTP_OK, array(\n\t\t \t'content-type' => 'text/html'\n\t\t ));\n };\n\n // register the router\n $this['router'] = function ($container) {\n \treturn new Router();\n };\n\t}", "title": "" }, { "docid": "0c089ca7743521e3bd3eb6f1f4204147", "score": "0.5372662", "text": "public function startup(){\r\n //To be rewritten\r\n }", "title": "" }, { "docid": "0a3b396205daa1ea3555eb18112cb2de", "score": "0.53709495", "text": "private function __construct() {\n }", "title": "" }, { "docid": "2ff3301708b5f785f3c34a3eb59fc217", "score": "0.5368719", "text": "private function create_services_db() {\n\n global $wpdb;\n $charset_collate = $wpdb->get_charset_collate();\n $sql = \"CREATE TABLE $wpdb->table_services (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n vehicle_id mediumint(9) NOT NULL,\n status text NULL,\n service text NOT NULL,\n odometer_at_last_serviced int(20) NULL,\n last_serviced datetime DEFAULT '0000-00-00' NULL,\n memo longtext NULL,\n time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n \t\tUNIQUE KEY id (id)\n \t) $charset_collate;\";\n\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n }", "title": "" }, { "docid": "64d29e8f6cf71d4250bf64b9b05205e2", "score": "0.5356215", "text": "public function Prismastar_product_feed_service(){\r\n\t\tparent::Data_feed_service();\r\n\t\tinclude_once(APPPATH.\"libraries/service/external_category_service.php\");\r\n\t\t$this->set_ext_cat_srv(new External_category_service());\r\n\r\n\t\t$this->set_output_delimiter(chr(9));\r\n\t\t//$this->set_cat_hash_map();\r\n\t}", "title": "" }, { "docid": "a51acb52000bb4cd5dde7e51e46c1b64", "score": "0.53540194", "text": "public function getService(){\n\t\t\treturn $this->service;\n\t\t}", "title": "" } ]
6953b74584b5b67d7a2b6967aa0497ca
obtiene la URL actual y la deja como variables
[ { "docid": "f7b2c6deaf2121f288113268209a0446", "score": "0.0", "text": "function setVariable($variable,$valor){if(strlen($variable)==0){return $valor;}return $variable;}", "title": "" } ]
[ { "docid": "5414ec49e4597b6e45463b51b4d48c02", "score": "0.68088746", "text": "private static function getUrl()\n\t{\n\t\t(input::get('url')) ? self::$url[] = input::get('url') : self::$url[] = '/';\n\t}", "title": "" }, { "docid": "0d45d2cb7553fd4751f43cc0b54f92fd", "score": "0.66718435", "text": "function ParseUrl() {\n ereg('^'.$_SERVER['SCRIPT_NAME'].'(.*)$', $_SERVER['REQUEST_URI'], $url);\n $a = split ('\\?', ereg_replace('^/','',$url[1]));\n $this->path = urldecode(ereg_replace('/$', '', $a[0]));\n foreach (split('&',$a[1]) as $cmd) {\n $a = split('=', $cmd);\n $this->get[urldecode($a[0])] = urldecode($a[1]);\n }\n}", "title": "" }, { "docid": "900a8a08306ddf7316ab96d24ce7db1c", "score": "0.6654034", "text": "private function _getURL() {\r\n $url = isset($_GET['url']) ? $_GET['url'] : null;\r\n $url = rtrim($url, '/');\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n $url_ex = explode('/', $url);\r\n// var_dump($url_ex);\r\n $this->_url = str_replace(\"-\", \"_\", $url_ex);\r\n// var_dump($this->_url);\r\n }", "title": "" }, { "docid": "b250286f9f2bb174a917d8b4d1f77939", "score": "0.6653677", "text": "private /* void */ function separarUrl() {\n if (isset($_GET['url'])) {\n // separa la url\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n $numElem = count($url);\n // Colocamos las partes de la URL en sus respectivos atributos\n $this->url_controlador = (isset($url[0]) ? $url[0] : null);\n $this->url_accion = (isset($url[1]) ? $url[1] : null);\n if ($numElem > 2) {\n $this->url_parametros = array_slice($url, 2, $numElem);\n }\n }\n }", "title": "" }, { "docid": "9ef185d03fdbcc4a6e5bac9dbe3f58c9", "score": "0.6613427", "text": "public function url();", "title": "" }, { "docid": "2a58707147d64177caf884d57c72011b", "score": "0.66070133", "text": "public function getURL()\r\n {\r\n $URLVars = array();\r\n $URLVars[] = 'q=' . urlencode(htmlspecialchars_decode($this->getQuery()));\r\n $URLVars[] = 'm=' . ($this->getWithImages() ? 1 : 0);\r\n $URLVars[] = 'd=' . ($this->getOnDisplay() ? 1 : 0);\r\n $URLVars[] = 'h=' . ($this->getWithHiResImages() ? 1 : 0);\r\n $URLVars[] = 'g=' . urlencode(htmlspecialchars_decode($this->getGallery()));\r\n $URLVars[] = 'n=' . urlencode(htmlspecialchars_decode($this->getName()));\r\n $URLVars[] = 'a=' . urlencode(htmlspecialchars_decode($this->getAccessionNumber()));\r\n $URLVars[] = 'date=' . urlencode(htmlspecialchars_decode($this->getDate()));\r\n $URLVars[] = 'c1=' . urlencode(htmlspecialchars_decode($this->getCategory()));\r\n $URLVars[] = 'c2=' . urlencode(htmlspecialchars_decode($this->getClassification()));\r\n $URLVars[] = 'c3=' . urlencode(htmlspecialchars_decode($this->getSubClassification()));\r\n $URLVars[] = 'g1=' . urlencode(htmlspecialchars_decode($this->getContinent()));\r\n $URLVars[] = 'g2=' . urlencode(htmlspecialchars_decode($this->getCountry()));\r\n $URLVars[] = 'g3=' . urlencode(htmlspecialchars_decode($this->getRegion()));\r\n $URLVars[] = 'g4=' . urlencode(htmlspecialchars_decode($this->getCity()));\r\n $URLVars[] = 'g5=' . urlencode(htmlspecialchars_decode($this->getLocality()));\r\n $URLVars[] = 'cl=' . urlencode(htmlspecialchars_decode($this->getCulture()));\r\n $URLVars[] = 'cr=' . urlencode(htmlspecialchars_decode($this->getCreditLine()));\r\n $URLVars[] = 'mat=' . urlencode(htmlspecialchars_decode($this->getMaterial()));\r\n $URLVars[] = 'man=' . urlencode(htmlspecialchars_decode($this->getManufacturingProcess()));\r\n $URLVars[] = 'ws=' . urlencode(htmlspecialchars_decode($this->getWorkingSet()));\r\n $URLVars[] = 'start=' . $this->startingRecord;\r\n $URLVars[] = 'sort=' . urlencode(htmlspecialchars_decode($this->getSortParameter()));\r\n $URLVars[] = 'fc1=' . urlencode(htmlspecialchars_decode($this->getFacetContinent()));\r\n $URLVars[] = 'fc2=' . urlencode(htmlspecialchars_decode($this->getFacetCountry()));\r\n $URLVars[] = 'fc3=' . urlencode(htmlspecialchars_decode($this->getFacetRegion()));\r\n $URLVars[] = 'fc4=' . urlencode(htmlspecialchars_decode($this->getFacetCity()));\r\n $URLVars[] = 'fc5=' . urlencode(htmlspecialchars_decode($this->getFacetLocality()));\r\n return \"/\".basename(__DIR__).\"/index.php?\" . implode('&', $URLVars);\r\n }", "title": "" }, { "docid": "7cf75980ce0bcd2889a448e1eae7293e", "score": "0.6585253", "text": "private function get_url() {\n\t\t$this->url = '';\n\t\t$request_url = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : '';\n\t\t$script_url = (isset($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : '';\n\n\t\t// Get rid of query string\n\t\t$request_url = strtok($request_url,'?');\n\t\t$script_url = strtok($script_url,'?');\n\t\t\n\t\t// Get our url path and trim the / of the left and the right\n\t\tif($request_url != $script_url) $this->url = trim(preg_replace('/'. str_replace('/', '\\/', str_replace('index.php', '', $script_url)) .'/', '', $request_url, 1), '/');\n\t}", "title": "" }, { "docid": "3999937222528b92bccd7c45c7f0ad12", "score": "0.6513174", "text": "function ExtractVInfoURL() {\n $this->URL=$this->serverVars['SCRIPT_NAME'].'?'.$this->serverVars['QUERY_STRING'];\n $this->debug('Extracted URL:'.$this->URL);\n }", "title": "" }, { "docid": "bec7cc9a452126a85d37e05188073e86", "score": "0.648782", "text": "public function parseUrl(){\n\t\tif(isset($_GET['url'])){\n\n\t\t\t // membersihkan karakter \"/\" pada string \n\t\t\t // sehingga hanya stringnya saja yang di ambil\n\t\t\t // dengan rtrim\n\t\t\t$url = rtrim($_GET['url'], '/');\n\n\t\t\t// membersihkan url dari karakter\n\t\t\t// biar tidak mudah d hack\n\t\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\n\t\t\t// pecah urlnya dengan tanda \"/\"\n\t\t\t$url = explode('/', $url);\n\t\t\treturn $url;\n\t\t}\n\t}", "title": "" }, { "docid": "39b38e151f5cc36867629a96a0121959", "score": "0.64814025", "text": "abstract public function url();", "title": "" }, { "docid": "60de875f8e9eb02831390e233bf2e78f", "score": "0.6477296", "text": "function urlnow(){\n $url1 = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '='));\n $url2 = explode(\"=\",$url1);\n $url = $url2[1];\n \n return $url;\n}", "title": "" }, { "docid": "e6e8e7ad1801a23c55ee1aacd207ccf1", "score": "0.64590657", "text": "function makeurl()\n\t{\n\t \n $url=\"\";\n\t\t$count=0;\n\t\t$arrget=$_GET;\n\t\tforeach($arrget as $key=>$value)\n\t\t{\n\t\t \n\t\t if($key!='url')\n\t\t {\n\t\t \n\t\t if($count==0)\n\t\t\t {\n\t\t\t $url.=\"?\".$key.\"=\".$value;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t $url.=\"&\".$key.\"=\".$value;\n\t\t\t }\n\t\t\t $count++;\n\t\t }\n\t\t\t\t \n\t\t} \n\t\treturn $url;\n\t}", "title": "" }, { "docid": "bc79b68115e7650e13b7935df744eea6", "score": "0.64380366", "text": "public function parseURL()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/'); //menghapus tanda '/' di akhir url\n $url = filter_var($url, FILTER_SANITIZE_URL); // membersihkan url dari karakter yang aneh dan ngaco\n $url = explode('/', $url); // pecah bbrp url dgn tanda pemisahnya(delimiter) '/'\n return $url;\n }\n }", "title": "" }, { "docid": "4bea17c49505fa12c13b03acd8bedbce", "score": "0.6432367", "text": "private function getUrl(){\n $url = \"http://www.ducamaleao.com.br\";\n \n return $url;\n }", "title": "" }, { "docid": "f5fd02461244d7d72584b3fc9a19acf4", "score": "0.6420444", "text": "function decode_url( $whattodo = \"global\" ) \n{\n\t\n\t//$url = substr(strrchr($_SERVER['REQUEST_URI'],'/'),1);\n\t\n\t$url = get_query();\n\t$url = explode(\";\",$url);\n\n\t\t\n\tif (isset($url)) \n\t{\n\t\tfor ($x=0;$x < sizeof($url);$x++) \n\t\t{\n\t\t\t\t$vars = explode(\".\",$url[$x]);\n\t\t\tif (isset($vars)&&sizeof($vars)==2) \n\t\t\t{\n\t\t\t\tif ('array' == $whattodo)\n\t\t\t\t{\n\t\t\t\t\t$gb_urlvars[$vars[0]] = $vars[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tisset($GLOBALS[$vars[0]])?true:$GLOBALS[$vars[0]] = $vars[1];\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tisset($gb_urlvars)?$GLOBALS[\"gb_urlvars\"] = $gb_urlvars:$GLOBALS[\"gb_urlvars\"] = \"\";\n}", "title": "" }, { "docid": "d42506c9ac41817b6e93665fd33fc6a4", "score": "0.6414788", "text": "public function getURL();", "title": "" }, { "docid": "e5b0e05f50a9c073d790021b51f8e768", "score": "0.6408484", "text": "private function _getUrl()\n {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n\n $utf8 = urldecode($url);\n $this->_utf8 = explode('/', $utf8);\n\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "title": "" }, { "docid": "23bd271a1e6712cae4296c85d4e76886", "score": "0.6406149", "text": "function dpt_url()\n{\n\t$url = isset($_GET['url']) ? $_GET['url'] : null;\n\t$url = rtrim($url, '/');\n\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t$url = explode('/', $url);\n\n\treturn $url;\n}", "title": "" }, { "docid": "5389f5dac3dc7ee5d3bc7b45ecf931f5", "score": "0.6395494", "text": "private function _calculateUrl()\n {\n $urlParts = array(\n $this->Marca->nome,\n $this->modelo,\n $this->placa,\n );\n\n $url = App_String::arrayToUrl($urlParts);\n $url = trim($url, '/');\n $this->_set('url', $url);\n }", "title": "" }, { "docid": "04c889c3a79db39deaa348a61974fb38", "score": "0.639121", "text": "function makeurl()\r\n\t{\r\n\t \r\n $url=\"\";\r\n\t\t$count=0;\r\n\t\t$arrget=$_GET;\r\n\t\tforeach($arrget as $key=>$value)\r\n\t\t{\r\n\t\t \r\n\t\t if($key!='url')\r\n\t\t {\r\n\t\t \r\n\t\t if($count==0)\r\n\t\t\t {\r\n\t\t\t $url.=\"?\".$key.\"=\".$value;\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t $url.=\"&\".$key.\"=\".$value;\r\n\t\t\t }\r\n\t\t\t $count++;\r\n\t\t }\r\n\t\t\t\t \r\n\t\t} \r\n\t\treturn $url;\r\n\t}", "title": "" }, { "docid": "3419747848f6d4e3329e59182b0a1447", "score": "0.638573", "text": "private static function get_url()\n {\n return self::$google_api.self::$url.self::build_request();\n }", "title": "" }, { "docid": "da95b6915674d6a302058cfbc3d29d9c", "score": "0.63710314", "text": "function getUrl();", "title": "" }, { "docid": "da95b6915674d6a302058cfbc3d29d9c", "score": "0.63710314", "text": "function getUrl();", "title": "" }, { "docid": "357037c745849d2f00954f4d5d33ccdb", "score": "0.63702023", "text": "public function parseURL(){\n if(isset($_GET['url'])){\n //Kita ambil url nya, lalu kita isi dengan url itu sendiri kemudian (lanjut di comment yg bawah)\n //Untuk membersihkan / atau slash yang berada pada paling akhir ujung url nya, menggunakan rtrim\n $url = rtrim($_GET['url'], '/');\n\n //Untuk membersihkan akan terjadi nya karakter2 ngaco pada url kita atau menghindari di hack, menggunakan filter sanitize\n $url = filter_var($url, FILTER_SANITIZE_URL);\n\n //Untuk memecah url yang sudah terbagi di sub slash2 tersebut, menggunakan fungsi explode\n $url = explode('/', $url);\n return $url;\n }\n }", "title": "" }, { "docid": "b555eb641ac09d35949bad52bc2c3c0d", "score": "0.63694066", "text": "public function getUrlPu();", "title": "" }, { "docid": "e240e65002e281a95c650e38c89e12d9", "score": "0.63510907", "text": "function getThisURLwithPostVariables() {\n\t$url=0;\n\t$url=\"\";\n\t//this may be a form submission hence check for all post variables\n\t$count=1;\n\tforeach($_POST as $var => $value) {\n\t\t$url.=($count==1?\"?\":\"&\").\"$var=$value\";\n\t\t$count++;\n\t}\n\treturn $url;\n}", "title": "" }, { "docid": "5a6d7833e7041a1c8107bcb2c3711f9b", "score": "0.6319507", "text": "public function getUrlParams();", "title": "" }, { "docid": "5a6d7833e7041a1c8107bcb2c3711f9b", "score": "0.6319507", "text": "public function getUrlParams();", "title": "" }, { "docid": "5a6d7833e7041a1c8107bcb2c3711f9b", "score": "0.6319507", "text": "public function getUrlParams();", "title": "" }, { "docid": "5a6d7833e7041a1c8107bcb2c3711f9b", "score": "0.6319507", "text": "public function getUrlParams();", "title": "" }, { "docid": "dbf8993e226f7e29437cab15ae6e4ca1", "score": "0.6318116", "text": "public function getUrl(){\n\t\tif(isset($_GET['url'])){//to check the url\n\t\t\t$url = rtrim($_GET['url'], '/');//to delete spaces\n\t\t\t$url = filter_var($url,FILTER_SANITIZE_URL);//to filter vars\n\t\t\t$url = explode('/',$url);//put it in an array\n\t\t\treturn $url;//to return the url\n\t\t}\n\n\t}", "title": "" }, { "docid": "82d5d49ed401081a7addb772b02448d0", "score": "0.6296163", "text": "function _get_url($params) {\n\t\t// init\n\t\t$url = '';\n\t\t// unset unwanted params\n\t\tunset($params[0], $params[1], $params[2]);\n\t\t// loop through params\n\t\tforeach($params as $p) {\n\t\t\t$url .= $p.'/';\n\t\t}\n\t\t// remove last slash\n\t\t$url = substr($url, 0, strrpos($url, '/'));\n\treturn $url;\n\t}", "title": "" }, { "docid": "53af7daf0ef36ea1409154af19dbf065", "score": "0.6294289", "text": "public function getUrl() { \r\n if(isset($_GET['url'])) {\r\n\r\n /*entfernt den Slash am Ende der URL*/\r\n $url = rtrim($_GET['url'], '/');\r\n \r\n /* entfernt alle ilegallen Zeichen im URL-String */\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n\r\n /* Spaltet URL-String an der Stelle / und speichert Einzelteile als Array*/\r\n $url = explode('/', $url);\r\n return $url;\r\n }\r\n }", "title": "" }, { "docid": "d0a16916beebeb8ace76b1080840f35a", "score": "0.62870514", "text": "private function parseUrl()\n\t{\n\t\tif(isset($_GET['url'])){\n\t\t\t$url = explode('/', trim(parse_url($_GET['url'], PHP_URL_PATH), '/'), 3);\n\n\t\t\tif(isset($url[0]) && $url[0] != '' && strtolower($url[0]) == 'admin'){\n\t\t\t\tunset($url[0]);\n\t\t\t\t$this->_isAdmin = 1;\n\t\t\t}\n\n\t\t\tif(isset($url[0]) && $url[0] != ''){\n\t\t\t\t$this->_controller = $url[0];\n\t\t\t}\n\n\t\t\tif(isset($url[1]) && $url[1] != ''){\n\t\t\t\t$this->_action = $url[1];\n\t\t\t}\n\n\t\t\tif(isset($url[2]) && $url[2] != ''){\n\t\t\t\t$this->_param = explode('/', $url[2]);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "84b3122c3bdb42c06339cbe62cd0c3b5", "score": "0.6283352", "text": "public function getUrl(){\n return $_POST[self::$Url];\n }", "title": "" }, { "docid": "4523a49dba0d4e6b3d495c2b849a9b96", "score": "0.6251698", "text": "function parse_adminurl() {\n $this->parse_sitevar('adminurl');\n }", "title": "" }, { "docid": "5ef18b07d477bf2464d300a2c27696c5", "score": "0.62331665", "text": "private function _getUrl()\n {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "title": "" }, { "docid": "e44a2c0972b69843fab617504825abdf", "score": "0.62207687", "text": "private function _getUrl() {\n $url = isset($_GET['url']) ? $_GET['url'] : NULL;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode(\"/\", $url);\n }", "title": "" }, { "docid": "8e43b28483e2ec8f8bb5448b7a7920ba", "score": "0.6217773", "text": "function parseURL() {\n global $username;\n\n if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n $parsed_url = parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_QUERY);\n $params = array();\n parse_str($parsed_url, $params);\n\n if (isset($params['username'])) {\n $username = $params['username'];\n }\n }\n }", "title": "" }, { "docid": "ca04a778ccb427c2b0aa4ebd7a7df6ef", "score": "0.6212362", "text": "function createURL($extra = array())\n{\n $url = \"\";\n $args = array();\n if (count($this->getVars)) {\n foreach($this->getVars as $key => $val) {\n $args[$key] = $val;\n }\n }\n if (count($extra)) {\n foreach($extra as $key => $val) {\n $args[$key] = $val;\n }\n }\n\n if (count($args)) {\n foreach($args as $key => $val) {\n if (strlen($url)) $url .= \"&\";\n else $url .= \"?\";\n\n $url .= urlencode($key);\n $url .= \"=\";\n $url .= urlencode($val);\n }\n }\n $baseURL = $_SERVER['REQUEST_URI'];\n $pos = strpos($baseURL, \"?\");\n\n if ($pos !== false) {\n $baseURL = substr($baseURL, 0, $pos);\n }\n\n\n $url = $baseURL . $url;\n return $url;\n}", "title": "" }, { "docid": "a2f12da1d54679f2fadce8cfc36d2965", "score": "0.61782163", "text": "function getUserUrl() {\n\t$url = getParam('url');\n\tif (isset($url)) {\n\t\treturn $url;\n\t}\n\treturn '';\n}", "title": "" }, { "docid": "8395f1b067c82482f91071ae937fa19f", "score": "0.6163374", "text": "public function url()\r\n {\r\n if(isset($_GET['url']))\r\n {\r\n return $url =explode('/', filter_var(rtrim($_GET['url'],'/'),FILTER_SANITIZE_URL));\r\n }\r\n }", "title": "" }, { "docid": "7e0d3d7e4955ca5e83f2b548d4b56956", "score": "0.6147945", "text": "public function getUrl()\n {\n if(isset($_GET['url']))\n {\n //cortamos los espacios que tenga hacia la derecha la url y el delimitador como segundo parametro ya q cuando\n // escribimos en la web va separado por esos simbolos /\n $url=rtrim($_GET['url'],'/');\n\n //filtramos la url con la constante FILTER_SANITIZE_URL Elimina todos los caracteres excepto letras, dígitos y\n // $-_.+!*'(),{}|\\\\^~[]`<>#%\";/?:@&=.\n $url=filter_var($url,FILTER_SANITIZE_URL);\n // Devuelve un array de string, siendo cada uno un substring del parámetro string formado por la división realizada\n // por los delimitadores indicados en el parámetro delimiter.\n $url=explode('/',$url);//osea lo convierte en array cada separacion de / es una posicion del array\n return $url;\n }\n }", "title": "" }, { "docid": "e15b964f600842c3fb0a9ce654ce29fe", "score": "0.61192733", "text": "public function obtenerDatosUrl()\n\t{\n\t\t$datosUrl = (isset($_GET['page'])) ? $_GET['page'] : '';\n\t\t$this->urlDirectorio = $datosUrl;\n\t\tif ($datosUrl == '')\n\t\t{\n\t\t\t$this->urlPartes[] = '';\n\t\t\t$this->urlDirectorio = '';\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\t$dato = explode('/',$datosUrl);\n\t\t\twhile (!empty($dato) && strlen(reset($dato)) === 0)\n\t\t\t{\n\t\t\t\tarray_shift($dato);\n\t\t\t}\n\t\t\twhile (!empty ($dato) && strlen (end ($dato)) === 0)\n\t\t\t{\n\t\t\t\tarray_pop($dato);\n\t\t\t}\n\t\t\t$this->urlPartes = $this->array_trim($dato);\n\t\t}\n\t}", "title": "" }, { "docid": "36db01285c0783e527617b10c39ddf9c", "score": "0.6112016", "text": "public static function xparam(){\n$URLparams = parse_url($_SERVER['REQUEST_URI']);\nparse_str($URLparams['query']);\nreturn ('&token='.$token.'&pass='.$pass);\n}", "title": "" }, { "docid": "4a9baac33c41d83c9aa7d2e0cf416b79", "score": "0.6109385", "text": "function url(){\r\n if(isset($_SERVER['HTTPS'])){\r\n $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != \"off\") ? \"https\" : \"http\";\r\n }\r\n else{\r\n $protocol = 'http';\r\n }\r\n return $protocol . \"://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\r\n }", "title": "" }, { "docid": "7f6d5f4bf6b2884abdf8ebf3f02b1c0d", "score": "0.61055386", "text": "public function url(){\r\n \t\treturn $this->url;\r\n \t}", "title": "" }, { "docid": "899a6b2cff1ee695072fbcbc196e0ce9", "score": "0.6085567", "text": "function url(){\n return sprintf(\n \"%s://%s%s\",\n isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',\n $_SERVER['SERVER_NAME'],\n $_SERVER['REQUEST_URI']\n );\n}", "title": "" }, { "docid": "e51647b7125befa007bcea62c6d1da33", "score": "0.60749066", "text": "function fc_url( $parameters ) {\n global $pseudo_parameters, $form_id;\n\n $url = 'index.php?';\n $anchor = '';\n foreach( $parameters as $key => $value ) {\n switch( $key ) {\n case 'anchor':\n $anchor = \"#$value\";\n continue 2;\n case 'url':\n return $value;\n default:\n if( in_array( $key, $pseudo_parameters ) )\n continue 2;\n }\n if( $value !== NULL )\n $url .= \"&amp;$key=$value\";\n }\n $url .= $anchor;\n return $url;\n}", "title": "" }, { "docid": "b53af1dc6206930e554a65f12f9823dc", "score": "0.60721004", "text": "protected function parseUrl()\n {\n foreach($this->requestParts as $name => $value) {\n switch($name) {\n case 'scheme':\n $this->scheme = $value;\n break;\n\n case 'host':\n $this->host = $value;\n break;\n\n case 'port':\n $this->port = $value;\n break;\n\n case 'user':\n $this->user = $value;\n break;\n\n case 'pass':\n $this->pass = $value;\n break;\n\n case 'path':\n $this->path = explode('/', rtrim($value, '/'));\n break;\n\n case 'query':\n $this->query = explode('&', $this->trimQueryString($value));\n break;\n\n case 'fragment':\n $this->fragment = $value;\n break;\n\n default:\n break;\n }\n }\n }", "title": "" }, { "docid": "afa4b210c96d6335b00d8f322c4ed1fb", "score": "0.6063611", "text": "public static function url()\n {\n }", "title": "" }, { "docid": "d6ad1a1b687a485326a0416cc594d827", "score": "0.6060363", "text": "function getUrl ()\n\t{\n\t\t$ret = \"\";\n\t\t//Add the scheme\n\t\tif ($this->scheme !== null) {\n\t\t\t$ret .= \"{$this->scheme}:\";\n\t\t}\n\t\t//Add the authority part\n\t\t$auth = $this->getAuthority();\n\t\tif ($auth) {\n\t\t\t$ret .= \"//$auth\";\n\t\t}\n\t\t//Add the path\n\t\t$ret .= $this->path;\n\t\t//Add the query string\n\t\tif ($this->query !== null) {\n\t\t\t$ret .= \"?{$this->query}\";\n\t\t}\n\t\t//Add the fragment\n\t\tif ($this->fragment !== null) {\n\t\t\t$ret .= \"#{$this->fragment}\";\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "f983ffa927ad33ae008630e0d333a318", "score": "0.60595495", "text": "function elink()\n {\n $x = explode(\",\", EMPS_URL_VARS);\n $rlist = array();\n while (list($n, $v) = each($x)) {\n $rlist[$v] = $GLOBALS[$v];\n }\n\n $t = \"\";\n $tc = \"\";\n reset($x);\n while (list($n, $v) = each($x)) {\n $v = $this->xrawurlencode($GLOBALS[$v]);\n if (!$v) {\n $tc .= \"/-\";\n } else {\n $t .= $tc;\n $t .= \"/$v\";\n $tc = \"\";\n }\n }\n $t .= \"/\";\n\n $s = false;\n $xx = explode(\",\", EMPS_VARS);\n while (list($name, $value) = each($xx)) {\n if ($GLOBALS[$value] == \"\") continue;\n if ($rlist[$value] != \"\") continue;\n if ($s) $t .= \"&\"; else $t .= \"?\";\n $s = true;\n $t .= $value . \"=\" . rawurlencode($GLOBALS[$value]);\n }\n return $t;\n }", "title": "" }, { "docid": "846d6cc2f0bf3cef50ceb8472e038dce", "score": "0.60586214", "text": "abstract protected function getUrl();", "title": "" }, { "docid": "846d6cc2f0bf3cef50ceb8472e038dce", "score": "0.60586214", "text": "abstract protected function getUrl();", "title": "" }, { "docid": "26cbcbac9a4d85c6e2780108b8725a13", "score": "0.60424364", "text": "private function _getUrl()\n {\n return 'http://www.bet365.com/home/mainpage.asp?rn=358572546';\n }", "title": "" }, { "docid": "d9fb529d9b22d01d2dbcbf9a54623105", "score": "0.6041851", "text": "function GetUrl() {\n $a = split('\\?', $_SERVER['REQUEST_URI']);\n return $a[0];\n}", "title": "" }, { "docid": "ccdc6a0c10029210b24bf007608fadf7", "score": "0.6040775", "text": "function getURL() {\t\t\n\tglobal $ZP;\n\n\t$URL = NULL;\n\n\tfor($i = 0; $i <= segments() - 1; $i++) {\n\t\tif($i === (segments() - 1)) {\n\t\t\t$URL .= segment($i); \t\n\t\t} else {\n\t\t\t$URL .= segment($i) .\"/\";\n\t\t}\n\t}\n\t\n\t$URL = get(\"webBase\") .\"/$URL\";\n\t\n\treturn $URL;\n}", "title": "" }, { "docid": "80522d386172275c39c77848ea606c02", "score": "0.6021337", "text": "public static function url()\n {\n return static::scheme(true) . static::host()\n . static::port(true) . static::uri() . static::query(true);\n }", "title": "" }, { "docid": "7f9e19904742bd08abbc30d39a0d7b03", "score": "0.60034317", "text": "public function getURL()\r\n {\r\n return $this->base_url . \"?\" . http_build_query($this->args);\r\n }", "title": "" }, { "docid": "9c6ced1dfa1ae00dc3ecff2ab16fde50", "score": "0.5997023", "text": "public function buildUrl($vars)\n {\n $url = atkSelf().'?'.http_build_query($vars);\n return $url;\n }", "title": "" }, { "docid": "d36a7850694feeed0b0fcd2bbf0c5d28", "score": "0.59967285", "text": "function http_get_str()\n{\n\tif(!empty($_GET))\n\t\t$var_str = '?';\n\tforeach ($_GET as $key => $value)\n\t{\n\t\t$var_str .= $key .'='. $value .'&';\n\t}\n\tif(!empty($_GET))\n\t\t$var_str = substr($var_str, 0, strlen($var_str)-1);\n\treturn $var_str;\n}", "title": "" }, { "docid": "6ad2846a91b42e90348093de095ddbac", "score": "0.5995705", "text": "function interpolateUrl() {\n if ($parameters = $this->get_parameters()) {\n return $this->base_url . '?' . http_build_query($parameters);\n }\n }", "title": "" }, { "docid": "1ebdb8dfa71c60730ccbe9fe9bddcd92", "score": "0.59946203", "text": "private function parse_url() {\r\n if (isset($_GET['url'])) {\r\n $url = rtrim($_GET['url'], '/');\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n $url = explode('/', $url);\r\n\r\n return $url;\r\n }\r\n }", "title": "" }, { "docid": "0558f4beb6772ccd9bd32dccd2e43efb", "score": "0.59932464", "text": "function prefijo_vinculo()\r\n\t{\r\n\t\treturn $this->url_actual . \"?\" . apex_hilo_qs_id . \"=\" . $this->id;\r\n\t}", "title": "" }, { "docid": "70aff3af7207bb331f37baf2cd5192bb", "score": "0.59824383", "text": "protected final function getParsedUrl() {\n\t\treturn strtr($this->getUrl(), $this->getUrlParams());\n\t}", "title": "" }, { "docid": "b96541509d61543818ed97395beb14c5", "score": "0.5981589", "text": "private function getUrl()\n {\n // Protocol\n $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? \"https://\" : \"http://\";\n // Get url, without / on the end\n self::$url_root = $protocol . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);\n // Remove last / from url\n if (substr(self::$url_root, -1) == '/') {\n // Set new url\n self::$url_root = substr(self::$url_root, 0, -1);\n }\n // Set url with public, without / on the end\n self::$url_public = self::$url_root . '/public';\n }", "title": "" }, { "docid": "8240b8f5998a3671ad7ad34521e69617", "score": "0.59791774", "text": "public function get_url_cha_id_kal(){\n\t\treturn $this->input ['jtkrueiruemn'];\n\t}", "title": "" }, { "docid": "06d187cc6dc6f08da011f6f3c0e53fb8", "score": "0.5973584", "text": "abstract protected function _getPostUrl();", "title": "" }, { "docid": "a6a4389d24e628688216f4f0ecfbcfca", "score": "0.5970132", "text": "abstract public function getURL(): string;", "title": "" }, { "docid": "ee10dc2fd71049a47a0d31a0cf0fd2c5", "score": "0.59673494", "text": "function url($url = '')\n{\n\treturn BASEURL . $url;\n}", "title": "" }, { "docid": "12987e37ea7ef2aea9f4173aad8e8d60", "score": "0.5963864", "text": "function fetch_variables()\r\n\t{\r\n\t\tglobal $_GET;\r\n\t\t\r\n\t\t$ret = '';\r\n\t\t \r\n\t\tif (isset($_GET) AND is_array($_GET))\r\n\t\t{\r\n\t\t\tforeach ($_GET as $key => $value)\r\n\t\t\t{\r\n\t\t\t\tif ($ret != '')\r\n\t\t\t\t{\r\n\t\t\t\t\t$ret .= '&amp;';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($key != 'cmd')\r\n\t\t\t\t{\r\n\t\t\t\t\t$ret .= \"$key=$value\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "1f7ef9cf3eb3604ad732857258e4d789", "score": "0.59622836", "text": "function self_url($variable = '', $value = '') {\n\t$ok = false;\n\t$get_baru = '';\n\tif (isset($_SERVER['QUERY_STRING']) and $_SERVER['QUERY_STRING'] != '') {\n\t\t$array_get = split('&', $_SERVER['QUERY_STRING']);\n\t\tforeach($array_get as $isi) {\n\t\t\tlist($var, $nilai) = split('=', $isi);\n\t\t\tif ($get_baru != '') $get_baru .= '&';\n\t\t\tif ($variable != '') {\n\t\t\t\tif ($var == $variable) {\n\t\t\t\t\t$nilai = urlencode($value);\n\t\t\t\t\t$ok = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$get_baru .= \"$var=$nilai\";\n\t\t}\n\t\tif (!$ok) {\n\t\t\tif ($get_baru != '') $get_baru .= '&';\n\t\t\t$get_baru .= \"$variable=\". urlencode($value);\n\t\t}\n\t\t$self_url = $_SERVER['PHP_SELF']. '?'. $get_baru;\n\t}\n\telse {\n\t\tif ($variable == '') $self_url = $_SERVER['PHP_SELF'];\n\t\telse $self_url = $_SERVER['PHP_SELF'] . \"?$variable=$value\";\n\t}\n\treturn $self_url;\n}", "title": "" }, { "docid": "f2cdd563895dde0cf8569c8b63a73732", "score": "0.5958508", "text": "protected function parseURL(){\n $request = trim($_SERVER['REQUEST_URI'],'/');\n if(!empty($request)){\n $url = explode('/',$request);\n $this->controller = isset($url[0]) ? $url[0] . 'Controller' : 'indexController';\n $this->action = isset($url[1]) ? $url[1] : 'Cadastrar';\n\n //Removendo o controller e action do url, e adicionando parametros adicionais na url no prams\n unset($url[0],$url[1]);\n $this->prams = !empty($url) ? array_values($url) : [];\n }\n }", "title": "" }, { "docid": "144deaafe6a467338bfe6c2a8fdfc853", "score": "0.5953237", "text": "function getURL() {\n\t return 'http://budts.be/weblog/';\n\t}", "title": "" }, { "docid": "58f0ca68d90142c5889c6e3b69b702f4", "score": "0.59500873", "text": "public function GetUrl()\r\n\t{\r\n\t\tif($this->Rewrite)\r\n\t\t{\r\n\t\t\t$this->Url = str_replace(\".php\",\"\",$this->Url);\r\n\r\n\t\t\t$param = \"\";\r\n\r\n\t\t\tforeach($this->Parametre as $key=>$value)\r\n\t\t\t{\r\n\t\t\t\t$param .= \"-\".$value;\r\n\t\t\t}\r\n\t\t\treturn $this->Url.$param;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$param = \"\";\r\n\r\n\t\t\tforeach($this->Parametre as $key=>$value)\r\n\t\t\t{\r\n\t\t\t\tif($param == \"\")\r\n\t\t\t\t{\r\n\t\t\t\t\tif((strrpos($this->Url,'?')) > 0)\r\n\t\t\t\t\t{\r\n\t \t\t$param .= \"&\".$key.\"=\".$value;\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$param .= \"?\".$key.\"=\".$value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t \t\t$param .= \"&\".$key.\"=\".$value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $this->Url.$param;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "82264666b986fd519d27a54bc639b103", "score": "0.5945044", "text": "private function setUrl()\n {\n // Verifica se foi digitado algo, se nao foi digitado nada encaminha para app/controllers/indexController.php.\n $_GET['url'] = (isset($_GET['url']) ? $_GET['url'] : 'index/');\n \n // Armazena a URL \n $this->_url = $_GET['url'];\n }", "title": "" }, { "docid": "9c7616d395fce8f29a7691096ae2df0f", "score": "0.5935365", "text": "public function __construct() {\r\n // a parámetros $_GET[p1]=dato1 $_GET[p2]=dato2 $_GET[p3]=dato3 ....\r\n \\core\\Rutas::interpretar_url_amigable();\r\n\r\n // Se conecta a la base de datos\r\n \\core\\sgbd\\bd::connect();\r\n\r\n // Distribuidor\r\n \\core\\Distribuidor::estudiar_query_string();\r\n\r\n // Cerrar conexión a la base de datos\r\n \\core\\sgbd\\bd::disconnect();\r\n \r\n \r\n }", "title": "" }, { "docid": "4719614aa69cb6f497f6e69b45a7818a", "score": "0.5935186", "text": "function base_url($param = []) {\n \n if (filter_var(BASE_URL, FILTER_VALIDATE_URL)) {\n \n // jika isi dari constanta BASE_URL adalah berupa url yang valid\n $result = (!$param) ? BASE_URL : BASE_URL . $param;\n \n return $result;\n \n }\n \n}", "title": "" }, { "docid": "083fd2db7047dcfe0b87254385a88f9a", "score": "0.5931219", "text": "function getCurrentUrl() {\n\n\t\t$url = array();\n\n\t\t// set protocol\n\t\t$url['protocol'] = 'http://';\n\t\tif (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) === 'on' || $_SERVER['HTTPS'] == 1)) {\n\t\t\t$url['protocol'] = 'https://';\n\t\t} elseif (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) {\n\t\t\t$url['protocol'] = 'https://';\n\t\t}\n\n\t\t// set host\n\t\t$url['host'] = $_SERVER['HTTP_HOST'];\n\t\t// set request uri in a secure way\n\t\t$url['request_uri'] = $_SERVER['REQUEST_URI'];\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "b17e981b5da91e9cd14a2b91a4036ab6", "score": "0.5924668", "text": "public function getUrl () {\n\t\tpreg_match_all('(%[a-zA-Z0-9]+)', $this->url, $matches);\n\t\t\n\t\tforeach ($matches[0] as $one) {\n\t\t\t$var = str_replace('%','',$one);\n\t\t\t$value = isset($this->$var) ? $this->$var : false;\n\n\t\t\t$this->url = str_replace($one, $value, $this->url);\n\t\t}\n\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "7faa94bc40bb58ace05251955d455e4c", "score": "0.5922219", "text": "private function get_url_token(){\n if ($this->_entorno == EPAGOS_ENTORNO_PRODUCCION)\n return 'https://api.epagos.com.ar/post.php';\n else\n return 'https://sandbox.epagos.com.ar/post.php';\n }", "title": "" }, { "docid": "1fcce41f3c073e59c3af04c80f9ec5c9", "score": "0.59072", "text": "function orongoURL($paramFile){\n $website_url = Settings::getWebsiteURL();\n $url = $website_url . $paramFile;\n if(substr($website_url, 0 ,1) == '/'){\n if(substr($paramFile, 0, 1) == '/'){\n $url = $website_url . substr($paramFile, 1);\n }\n }\n return $url;\n}", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.5902373", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.5902373", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.5902373", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.5902373", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.5902373", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.5902373", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.5902373", "text": "public function getUrl();", "title": "" }, { "docid": "87888121c120d5c70c691fcb7d0af883", "score": "0.5892036", "text": "protected function getUrl()\n {\n return str_replace('/?', '?', site_url($_SERVER['REQUEST_URI']));\n }", "title": "" }, { "docid": "2e04e9264e1f4b9333f2dbc3c137d577", "score": "0.58909786", "text": "function mkurl () {\n if ($this->url !== NULL){\n $url = $this->url;\n }else{\n $url = \"http://\".$this->imdbsite.\"/find?q=\".urlencode($this->name).\n# \"&restrict=Movies+only&GO.x=0&GO.y=0&GO=search;tt=1\"; // Sevec ori\n \";tt=on;nm=on;mx=20\"; // Izzy\n# \";more=tt;nr=1\"; // @moonface variant (untested)\n }\n return $url;\n }", "title": "" }, { "docid": "ecfbac51137f1451e9e95a927bcab5db", "score": "0.5889083", "text": "public function getUrlParameters() {\n \n $parms = \"\";\n foreach ($this->parameters as $name => $value) {\n $parms.= $name . '/' . $value . '/';\n }\n $parms = substr($parms, 0, -1);\n return $parms;\n }", "title": "" }, { "docid": "dc4f915fea9b0a106dd4c04405e257d0", "score": "0.5888094", "text": "protected abstract function getUrl();", "title": "" }, { "docid": "64267f84e72c2db5a3808e39651be9d0", "score": "0.58577186", "text": "function getUri();", "title": "" }, { "docid": "bcfdbc047688c59ebdefab30e28b6d7d", "score": "0.5852453", "text": "function get_request_url() {\n $endpoint = $this->get_endpoint();\n if (is_null($endpoint) || $enpoint = '') {\n throw new EndpointNuloException(\"Falta endpoint para Consulta\", 1);\n }\n\n //PDF return $endpoint . 'numerodocumento=' . str_replace(' ', '+', $_GET['id']) . '-I.pdf';\n $urlconsulta = $endpoint . '&numero_documento=' . str_replace(' ', '+', $_GET['numerodocumento'].'-APN-'.str_replace('#', '%23',$_GET['filtroc']));\n\n return $urlconsulta;\n\n }", "title": "" }, { "docid": "40bd9f558100f92c7c5af5d5e623c906", "score": "0.5843073", "text": "public function getURLData() {\n $urlData = (isset($_GET['page'])) ? $_GET['page'] : '';\n $this->_urlPath = $urlData;\n if ($urlData == '') {\n $this->_urlBits[] = '';\n $this->_urlPath = '';\n } else {\n $data = explode('/', $urlData);\n while (!empty($data) && strlen(reset($data)) === 0) {\n array_shift($data);\n }\n while (!empty($data) && strlen(end($data)) === 0) {\n array_pop($data);\n }\n $this->_urlBits = $this->arrayTrim($data);\n }\n }", "title": "" }, { "docid": "b60016da8e497a280bbbc70aa210b46c", "score": "0.5841067", "text": "public function getUserInfoUrl();", "title": "" }, { "docid": "d963e59a4d145f71920218269b8c9d4e", "score": "0.5840892", "text": "function getUrl() {\n\t$url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\t$url = str_replace(\"'\",\"\",$url);\n\tif(!empty($_SERVER['HTTPs']))\n\t\t$url = \"https://\".$url;\n\telse\n\t\t$url = \"http://\".$url;\n\treturn\t$url;\n}", "title": "" }, { "docid": "48f2ce48213e38dfb9d73ff1b9af6c61", "score": "0.58406657", "text": "private function getLinkUrl() {\n $this->start();\n if(empty($_SERVER['QUERY_STRING'])) $this->linkurl = $_SERVER['REQUEST_URI'].\"?\".$this->pageName.\"=\";\n else{\n if(isset($_GET[$this->pageName])) { \n $this->linkurl = str_replace($this->pageName.'='.$this->currentPage, $this->pageName.'=', $_SERVER['REQUEST_URI']);\n } else {\n $this->linkurl = $_SERVER['REQUEST_URI'].'&'.$this->pageName.'=';\n }\n }\n }", "title": "" }, { "docid": "db3b89807142fb6a2adddbe4f60c9ad8", "score": "0.5836866", "text": "public static function get_url() {\n\t\treturn ( isset( $_SERVER['HTTPS'] ) ? 'https' : 'http' ) . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; // phpcs:ignore\n\t}", "title": "" } ]
2a1b69faa3e86698751ba8f4f5f24b26
THIS FUNCTION IS USED FOR GETTING Room Type LIST $conditions :db clauses $limit:specifies limit orderBy:sort on which column Author :Gurkeerat Sidhu Created on : (19.05.2009) Copyright 20082009 syenergy Technologies Pvt. Ltd.
[ { "docid": "1f13625c783d47718daf365afa70934c", "score": "0.8017039", "text": "public function getRoomTypeList($conditions='', $orderBy=' roomType', $limit = '') {\n \n $query = \"\tSELECT * \n\t\t\t\t\tFROM room_type \n\t\t\t\t\t$conditions\n\t\t\t ORDER BY $orderBy \n\t\t\t\t\t$limit\";\n \n \n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" } ]
[ { "docid": "31334eee6f120b455401de57c61f240f", "score": "0.736307", "text": "public function getRoomType($conditions='') {\n $query = \"SELECT * \n FROM room_type\n $conditions\";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "3fa2266f53a8c5bd6996922ac67937cd", "score": "0.67009366", "text": "public function checkRoomType($conditions='') {\n \n $query = \"SELECT count(roomTypeId) AS foundRecord \n FROM room_type \n $conditions \";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "9860553118e459d9128b2bce562bb608", "score": "0.66965234", "text": "public function getAllTypes()\n {\n return $this->fetchAll('SELECT * FROM room_type');\n }", "title": "" }, { "docid": "2a83db13444e1f66861deedd3669cc76", "score": "0.6463332", "text": "public function getsRoomTypes() \r\n {\r\n $models = RoomType::find()->andWhere(['status' => 1])->all();\r\n \r\n return ArrayHelper::map($models, 'id', 'type');\r\n }", "title": "" }, { "docid": "393dcc2b8f5b32c05681876b95b689c8", "score": "0.64192754", "text": "function list_available_criteria_types() {\n\t\n\treturn array(\n\t\t'application_id' => 'Application ID #',\n\t\t'customer_id' => 'Customer ID #',\n\t\t'name_last' => 'Last Name',\n\t\t'name_first' => 'First Name',\n\t\t'social_security_number' => 'Social Security #',\n\t\t'email' => 'Email',\t//mantis:4253\n\t\t'ach_id' => 'ACH ID',\t//mantis:5500\n\t\t//'ecld_id' => 'QuickCheck #',\t// Disabled till Phase II\n\t\t'phone' => 'Phone #',\t//mantis:4313\n\t\t'ip_address' => 'IP Address',\t//mantis:4313\n\t);\n}", "title": "" }, { "docid": "41604faaee203a798a0473c0ed7fa115", "score": "0.6333129", "text": "function searchrooms($dbConn,$start,$end,$type=0){\n\tif($type==0){//default mode\n\t$sql = \"select roomID,type,price from Rooms where roomID not in \n(select roomID from Reservation where (startdate>='{$start}' and startdate<='{$end}') or (enddate>='{$start}' and enddate<='{$end}') or (startdate<='{$start}' and enddate>='{$end}'))\";}\n\telse if($type=='asc'){//reorder search results by price(from low to hign)\n\t$sql = \"select roomID,type,price from Rooms where roomID not in \n(select roomID from Reservation where (startdate>='{$start}' and startdate<='{$end}') or (enddate>='{$start}' and enddate<='{$end}') or (startdate<='{$start}' and enddate>='{$end}')) order by price asc\";\n\t}\n\telse if($type=='desc'){//reorder search results by price(from hign to low)\n\t$sql = \"select roomID,type,price from Rooms where roomID not in \n(select roomID from Reservation where (startdate>='{$start}' and startdate<='{$end}') or (enddate>='{$start}' and enddate<='{$end}') or (startdate<='{$start}' and enddate>='{$end}')) order by price desc\";\n\t\t\n\t}\n\telse{//search specific types of rooms\n\t$sql = \"select roomID,type,price from Rooms where roomID not in \n(select roomID from Reservation where (startdate>='{$start}' and startdate<='{$end}') or (enddate>='{$start}' and enddate<='{$end}') or (startdate<='{$start}' and enddate>='{$end}')) and type = '{$type}'\";\n\t\t\n\t}\n\t\n\t$result = $dbConn->query($sql);\n\tif(!$result){\n\t\techo 'Search failed,please doublecheck the inputting values!';\n\t}\n\n\twhile($row = $result->fetch_assoc())\n {\n echo\"<br><tr>\n <td>{$row['roomID']}</td>\n\t\t\t<td>{$row['type']}</td>\n\t\t\t<td>{$row['price']}</td>\n\t\t\t\n </tr></br>\";\n\t\tsearchfacilities($dbConn,$row['type']);\n }\n\t\n\t\n\t\n}", "title": "" }, { "docid": "7eaf90e9bd822c89331626e62f24bf16", "score": "0.6295331", "text": "function searchfacilities($dbConn,$roomtype){\n\t$cmdstr = 'isKRoom';//default room type'k'\n\tif($roomtype == 's'){\n\t\t$cmdstr = 'isSRoom';\n\t}\n\telse if($roomtype == 'm'){\n\t\t$cmdstr = 'isMRoom';\n\t}\n\telse if($roomtype == 'l'){\n\t\t$cmdstr = 'isLRoom';\n\t}\n\telse if($roomtype == 'k'){\n\t\t$cmdstr = 'isKRoom';\n\t}\n\t$sql = \"select facilityname from Facilities where {$cmdstr} = 1\";\n\t$result = $dbConn->query($sql);\n\twhile($row = $result->fetch_assoc())\n {\n\t\t\n echo\"<tr>\n <td>{$row['facilityname']}</td>\n </tr>\";\n }\n\t\n\t\n}", "title": "" }, { "docid": "bea2c621bcce84ca272e2d60bfa49740", "score": "0.62823766", "text": "public function getRoomTypes()\n {\n $list = $this->with('user')->paginate(RoomType::PAGINATION_VALUE_ON_PAGE);\n return $list;\n }", "title": "" }, { "docid": "7d2817511a1386022875ef7702fb1afd", "score": "0.6268605", "text": "function getRooms(){\n\tglobal $DB;\n\t\n\tif($DB->query(\"SELECT * FROM room ORDER BY code\")){\n\t\treturn $DB->results();\n\t}\n\t\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "a681284a5f18956762000d1f20ecd4ba", "score": "0.62446505", "text": "public function getTotalRoomType($conditions='') {\n $query = \"SELECT COUNT(*) AS totalRecords \n FROM room_type \n $conditions \";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "738f6fc1696011185b6b4d738abb5895", "score": "0.6235568", "text": "function get_list($table='ci_board', $type, $offset ,$limit, $soption, $sterm){\n\t\t$limit_query = '';\n\t\t$search_query =' WHERE';\n\n\t\t//If offset and limit parameters are not empty\n\t\tif($limit != '' OR $offset != ''){\n\t\t\t$limit_query = \" LIMIT \".$offset.','.$limit;\n\t\t}\n\n\t\t//Search query based on $soption (author, contents or both)\n\t\tif($soption != '' AND $sterm != ''){\n\t\t\tif($soption == 'Author'){\n\t\t\t\t$search_query .= \" author like '%\".$sterm.\"%' and\";\n\t\t\t}else if($soption == 'Title'){\n\t\t\t\t$search_query .= \" title like '%\".$sterm.\"%' and\";\n\t\t\t}else{\n\t\t\t\t$search_query .= \" title like '%\".$sterm.\"%' OR author like '%\".$sterm.\"'and \";\n\t\t\t}\n\t\t}\n\n\t\t$sql = \"SELECT * FROM \".$table.$search_query.\" board_pid= '0' ORDER BY board_id DESC\".$limit_query;\n\t\t$query = $this->db->query($sql);\n\n\t\tif($type == 'count'){\n\t\t\t$result = $query->num_rows();\n\t\t}\n\t\telse{\n\t\t\t$result = $query->result();\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "accb007072e3098443116691ef6d3135", "score": "0.62158716", "text": "public static function getRoomsBySearchCriteria($searchCriteria) {\n \t$ret = array();\n \t$table = new Room();\n \t$select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART)\n ->setIntegrityCheck(false)\n ->from(array(\"r\"=>\"room\"), array(\"roomId\"=>\"r.id\", \"rateId\"=>\"rate.id\", \"price\"=>\"rate.price\", \"adults\"=>\"r.max_adults\", \"children\"=>\"r.max_children\"))\n ->join(array(\"h\"=>\"hotel\"), \"r.hotel_id=h.id\")\n ->joinLeft(array(\"rate\"=>\"rate\"), \"r.id=rate.room_id\");\n if (!empty($searchCriteria[Hotel::CITY_PART])) {\n \t$select = $select->where(\"h.city_part=?\", $searchCriteria[Hotel::CITY_PART]);\n }\n if (!empty($searchCriteria[\"excludedHotels\"])) {\n\t $select = $select->where(\"h.id NOT IN (?)\", $searchCriteria[\"excludedHotels\"]);\n }\n if (!empty($searchCriteria[Room::MAX_ADULTS])) {\n \t\t$select = $select->where(\"r.max_adults >= ?\", $searchCriteria[Room::MAX_ADULTS]);\n }\n if (!empty($searchCriteria[Room::MAX_CHILDREN])) {\n \t$select = $select->where(\"r.max_children >= ?\", $searchCriteria[Room::MAX_CHILDREN]);\n }\n $select = $select->group(array(\"roomId\", \"rateId\", \"price\"));\n $select = $select->order(\"rate.price\")->order(\"r.max_adults DESC\")->order(\"r.max_children DESC\");\n return $table->fetchAll($select);\n \n// \t$table = new Room();\n// \tif (!empty($roomId) && $roomId != 0) {\n// \t\t$ret[0] = $table->findById($roomId);\n// \t} else if (!empty($hotelId) && $hotelId != 0) {\n// \t\t$table = new Hotel();\n// \t\t$hotel = $table->findById($hotelId);\n// \t\t$ret = Hotel::getRooms($hotel);\n// \t} else {\n// \t\t$excludeHotelsStr = \"\";\n// \t\tif (isset($excludeHotel)) {\n// \t\t\t$excludeHotelsStr = array(\n// \t\t\t\t$excludeHotel->id => $excludeHotel->id\n// \t\t\t);\n// \t\t}\n// \t\t$rooms = Room::getRoomsByCityPart($cityPart, $excludeHotelsStr);\n// \t\tforeach ($rooms as $room) {\n// \t\t\t$ret[$room->rid] = $room;\n// \t\t}\n// \t}\n \treturn $ret;\n }", "title": "" }, { "docid": "4aedb826e1a3b85d23f36d8d338416ee", "score": "0.6188437", "text": "function list_rooms(){\n\t\tglobal $db,$prefix;\n\t\t\n\t\t// Get the rooms from the database\n\t\t$return = array();\n\t\t$query = $db->DoQuery(\"SELECT name,topic,password,maxusers,logged FROM {$prefix}rooms WHERE type='1'\");\n\t\twhile($row = $db->Do_Fetch_Row($query)){\n\t\t\t$return[] = $row;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "4cc142cc6c1d8ffa618510551f0ea4d6", "score": "0.617103", "text": "public function getVehicleTyreList($conditions='', $limit = '', $orderBy='tyreNumber') {\n \n $query = \"\tSELECT \n\t\t\t\t\t\t\ttm.tyreId,\n\t\t\t\t\t\t\ttm.tyreNumber,\n\t\t\t\t\t\t\ttm.manufacturer,\n\t\t\t\t\t\t\ttm.modelNumber,\n\t\t\t\t\t\t\ttm.purchaseDate,\n\t\t\t\t\t\t\tth.busReadingOnInstallation,\n\t\t\t\t\t\t\tth.placementReason,\n\t\t\t\t\t\t\tb.busId,\n\t\t\t\t\t\t\tb.busNo,\n\t\t\t\t\t\t\tvt.vehicleType,\n\t\t\t\t\t\t\tif(tm.isActive = 1,'Yes','No') AS isActive,\n\t\t\t\t\t\t\tif(th.usedAsMainTyre = 1,'Main','Spare') AS usedAsMainTyre\n\t\t\t\t\tFROM\ttyre_master tm,\n\t\t\t\t\t\t\ttyre_history th,\n\t\t\t\t\t\t\tvehicle_type vt,\n\t\t\t\t\t\t\tbus b\n\t\t\t\t\tWHERE\ttm.tyreId = th.tyreId\n\t\t\t\t\tAND\t\tth.busId = b.busId\n\t\t\t\t\tAND\t\ttm.isActive = 1\n\t\t\t\t\tAND\t\tb.isActive = 1\n\t\t\t\t\tAND\t\tvt.vehicleTypeId = b.vehicleTypeId\n\t\t\t\t\t\t\t$conditions\n\t\t\t\t\t\t\tORDER BY $orderBy $limit\";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "6db52349f9e604ec7d5993b7398dbbd3", "score": "0.61203647", "text": "public function getListTypeRoomHabFree() {\n\t\t$query = \"SELECT tro.*\n FROM\n room_model AS tro\n LEFT OUTER JOIN service_room_model AS str ON tro.ID_ROOM_MODEL=str.ID_ROOM_MODEL\n WHERE tro.VALUE_TYPE_ROOM_MODEL=1 AND str.ID_ROOM_MODEL IS NULL\";\n\n\t\treturn $this->conexion->consultar($query);\n\t}", "title": "" }, { "docid": "f04a0de8bb187fb687e61c3ce4b60f07", "score": "0.60910636", "text": "public function GetRooms(){\n\t\t$GLOBALS['VD'] = array(\"Rooms\" => array());\n\t\t//Will not put layout on output\n\t\t$this->ApiCall = true;\n\t\t//Will search acording to search index if set, limit results by page and count\n\t\tif(isset($_POST['Search']) && $_POST['Search'] != \"\"){\n\t\t\tif(isset($_POST['Count']) && isset($_POST['CountIndex'])){\n\t\t\t\t$GLOBALS['VD']['Rooms'] = $this->Mod->GetRoomsSearch($_POST['Search'], $_POST['Count'], max($_POST['CountIndex'], 0));\n\t\t\t} else {\n\t\t\t\t$GLOBALS['VD']['Rooms'] = $this->Mod->GetRoomsSearch($_POST['Search'], 10,0);\n\t\t\t}\n\t\t} else {\n\t\t\tif(isset($_POST['Count']) && isset($_POST['CountIndex'])){\n\t\t\t\t$GLOBALS['VD']['Rooms'] = $this->Mod->GetRoomsSearch('',$_POST['Count'], max($_POST['CountIndex'],0));\n\t\t\t} else {\n\t\t\t\t$GLOBALS['VD']['Rooms'] = $this->Mod->GetRoomsSearch('',10, 0);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0236b982156071f73dfcb7db4ff8345b", "score": "0.60693777", "text": "function list_postings( $type ){\n\t\t$db = dblogin::dbconnect();\n\t\t\n\t\tswitch ($type){\n\t\t\tcase 'furniture':\n\t\t\t\t$cat = 1;\n\t\t\t\tbreak;\n\t\t\tcase 'books':\n\t\t\t\t$cat = 2;\n\t\t\t\tbreak;\n\t\t\tcase 'appliances':\n\t\t\t\t$cat = 3;\n\t\t\t\tbreak;\n\t\t\tcase 'electronics':\n\t\t\t\t$cat = 4;\n\t\t\t\tbreak;\n\t\t\tcase 'wanted':\n\t\t\t\t$cat = 5;\n\t\t\t\tbreak;\n\t\t\tcase 'other':\n\t\t\t\t$cat = 6;\n\t\t\t\tbreak;\n\t\t}\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM Listings\n\t\t\t\tWHERE type_id = '$cat'\n\t\t\t\tAND delete= 'null'\";\n\t\t\t\t\n\t\t$rows = $db->Execute( $sql );\n\t\t$return = $rows->GetRows();\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "eedd32a66be230a49e9ac363637b6131", "score": "0.60522115", "text": "public function getAllShowrooms()\r\n\t{\r\n\t\t$query = $this->db->get('tbl_artefact_type');\r\n\t\treturn $query->result();\r\n\t}", "title": "" }, { "docid": "27cde054a715d5bd1d57efc3022dbde1", "score": "0.6048306", "text": "public function show_device_report($type=\"\", $criteria=\"\")\n\t{\n\t\t$query = \"SELECT \n\t\t\t\t\ta.*, \n\t\t\t\t\tb.`type_name`, \n\t\t\t\t\tc.`location_name`,\n\t\t\t\t\td.`place_id`, \n\t\t\t\t\td.`building_id`, \n\t\t\t\t\td.`floor_id`, \n\t\t\t\t\tlp.`place_name`, \n\t\t\t\t\tlb.`building_name`, \n\t\t\t\t\tlf.`floor_name` \n\t\t\t\tFROM device_list a \n\t\t\t\tINNER JOIN device_type b ON a.`type_id` = b.`type_id` \n\t\t\t\tLEFT JOIN location c ON a.`location_id` = c.`location_id` \n\t\t\t\tLEFT JOIN location_details d ON c.`location_id` = d.`location_id` \n\t\t\t\tLEFT JOIN location_place lp ON d.`place_id` = lp.`place_id` \n\t\t\t\tLEFT JOIN location_building lb ON d.`building_id` = lb.`building_id` \n\t\t\t\tLEFT JOIN location_floor lf ON d.`floor_id` = lf.`floor_id`\";\n\t\t\t\t\n\t\tif ($criteria!=\"\") {\n\t\t\t$query .= \"WHERE $type IN ($criteria)\"; \n\t\t}\n\n\t\t$query .= \"ORDER BY $type ASC\";\n\n\t\t$process = $this->db->query($query);\n\t\treturn $process;\n\t}", "title": "" }, { "docid": "50f822c8a484c0dba5694a72055ce1c1", "score": "0.60392916", "text": "function listTypeAns(){\n\t\t$where = '';\n\t\t$q = \"SELECT * FROM $this->tableTypeAns $where ORDER BY id ASC\";\n\t\t$result = $this->db->query($q)->result();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a2ba10575ebad70c0591f5fa0272181c", "score": "0.6032372", "text": "public function getRoomtypes()\n {\n return $this->roomtypes;\n }", "title": "" }, { "docid": "ce23af5f72a74a49071ba087cc1ccbe9", "score": "0.600593", "text": "public function getRoomtypes()\n {\n $this->import('BackendUser', 'User');\n\n if (!$this->User->isAdmin) {\n return array();\n }\n \n $arrRoomtypes = array();\n $objRoomtypes = $this->Database->execute(\"SELECT id, roomtype FROM tl_roomtype ORDER BY roomtype\");\n\n while ($objRoomtypes->next()) {\n if ($this->User->isAdmin) {\n $arrRoomtypes[$objRoomtypes->id] = $objRoomtypes->roomtype;\n }\n }\n \n return $arrRoomtypes;\n }", "title": "" }, { "docid": "901e112cff50afc7bbef2baa5b44d909", "score": "0.5996114", "text": "public function getPartyList($conditions='', $orderBy=' partyName', $limit = '') {\n \n //no joining is donw with study period table as we dont need to display studyPeriod in the table listing\n \n $query = \"\tSELECT\t\t*\n\t\t\t\t\tFROM\t\tinv_party\n\t\t\t\t\t\t\t\t$conditions\n\t\t\t\t\t\t\t\tORDER BY $orderBy\n\t\t\t\t\t\t\t\t$limit\";\n \n \n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "aa7420d553a12ae76735ab601886a57f", "score": "0.59263265", "text": "private function getPartTypeAliasTypeList($mode = \"\")\r\n {\r\n \t$data = array();\r\n \t$query = \"\";\r\n \t$excludedIdArray = array();\r\n \tif($mode == \"\")\r\n \t{\r\n \t\t$excludedIdArray[] = 3;\r\n \t\tif(UserAccountService::isSystemAdmin() == false)\r\n\t\t\t{\r\n\t\t\t\t$excludedIdArray[] = 2;\r\n\t\t\t}\r\n \t}\r\n\r\n \tif(count($excludedIdArray) > 0)\r\n \t{\r\n \t\t$query = \"select id, name, valueType from parttypealiastype ptat where ptat.active = 1 and ptat.lu_entityaccessoptionId NOT IN (\".implode(\",\", $excludedIdArray).\")\";\r\n \t}\r\n \telse\r\n \t{\r\n \t\t$query = \"select id, name, valueType from parttypealiastype ptat where ptat.active = 1\";\r\n \t}\r\n\r\n \t$result = Dao::getResultsNative($query);\r\n \t$data[] = array(\"id\" => '', \"name\" => '', \"valueType\" => '');\r\n\r\n \tforeach($result as $row)\r\n \t{\r\n \t\t$data[] = array(\"id\" => $row[0], \"name\" => $row[1], \"valueType\" => $row[2]);\r\n \t}\r\n \treturn $data;\r\n }", "title": "" }, { "docid": "0ea3bda708ca009ebba23d28b4e0e263", "score": "0.5892863", "text": "function list_borrow($arr, $limit) {\r\n\t\t$whereCond = \"\";\r\n if (!empty($arr)) {\r\n if (!empty($arr['search_by_name'])) {\r\n $whereCond .= \" and upper(roomd_description) like upper('%\" . $arr['search_by_name'] . \"%')\";\r\n }\r\n\t\t\tif (!empty($arr['search_by_status'])) {\r\n $whereCond .= \" and upper(roomd_status) like upper('\" . $arr['search_by_status'] . \"')\";\r\n }\r\n }\r\n\r\n\t\t$sql = \"\r\n\t\t\tselect recnum,\r\n\t\t\t\t room_id,\r\n\t\t\t\t roomd_description,\r\n\t\t\t\t roomd_qty,\r\n\t\t\t\t warehouse_id,\r\n\t\t\t\t roomd_status,\r\n\t\t\t\t roomd_id,\r\n\t\t\t\t room_date\r\n\t\t\tfrom (\r\n\t\t\tselect rownum recnum,\r\n\t\t\t\t p.room_id,\r\n\t\t\t\t p.roomd_description,\r\n\t\t\t\t p.roomd_qty,\r\n\t\t\t\t p.warehouse_id,\r\n\t\t\t\t p.roomd_status,\r\n\t\t\t\t p.roomd_id,\r\n\t\t\t\t p.room_date\r\n\t\t\tfrom (\r\n\t\t\tselect det.ROOM_ID,\r\n\t\t\t\t det.ROOMD_DESCRIPTION,\r\n\t\t\t\t det.ROOMD_QTY,\r\n\t\t\t\t det.WAREHOUSE_ID,\r\n\t\t\t\t det.ROOMD_STATUS,\r\n\t\t\t\t det.ROOMD_ID, \".\r\n\t\t\t\t // --to_char(room.ROOM_DATE,'DD/MM/YYYY') as \r\n\t\t\t\t \" room.ROOM_DATE\r\n\t\t\tfrom FM_MEETING_ROOM_DET det \r\n\t\t\tinner join FM_MEETING_ROOM room on det.ROOM_ID = room.ROOM_ID\r\n\t\t\twhere 1=1 $whereCond \r\n\t\t\torder by det.ROOM_ID desc)p) $limit \r\n\t\t\";\r\n\t\t\r\n\t\t$query = $this->db->query($sql);\r\n return $query->result_array();\r\n\t}", "title": "" }, { "docid": "3109ed201753565e5f8eb47123a321fe", "score": "0.5886994", "text": "function users_filtered_list($type = ''){\n\t\tif($type!=''){ $clause = \" WHERE type_id = '\".$type.\"' and status = '1'\"; }else{ $clause = \"\"; }\n\t\t$sql\t\t=\t\"SELECT * FROM prj_user \".$clause.\"\";\n\t\t$result \t= \t$this->adodb->Execute($sql);\n\t\treturn $result;\t\n\t}", "title": "" }, { "docid": "b924e3797b8788b9195142288f28db34", "score": "0.58508146", "text": "function search_postings( $type, $params ){\n\t\t$db = dblogin::dbconnect();\n\t\tswitch ($type){\n\t\t\tcase 'furniture':\n\t\t\t\t$cat = 1;\n\t\t\t\tbreak;\n\t\t\tcase 'books':\n\t\t\t\t$cat = 2;\n\t\t\t\tbreak;\n\t\t\tcase 'appliances':\n\t\t\t\t$cat = 3;\n\t\t\t\tbreak;\n\t\t\tcase 'electronics':\n\t\t\t\t$cat = 4;\n\t\t\t\tbreak;\n\t\t\tcase 'wanted':\n\t\t\t\t$cat = 5;\n\t\t\t\tbreak;\n\t\t\tcase 'other':\n\t\t\t\t$cat = 6;\n\t\t\t\tbreak;\n\t\t}\n\t\t$return = array();\n\t\t$sql1 = \"SELECT * \n\t\t\t\tFROM Listings\n\t\t\t\tWHERE deleted = 0\n\t\t\t\tAND type_id = $cat\";\n\t\t$rows1 = $db->Execute( $sql1 );\n\t\t$return[0] = $rows1->GetRows();\n\t\t\n\t\tif( '' != $params ){\n\t\t\t$sql2 = \"SELECT * \n\t\t\t\t FROM Listings\n\t\t\t\t WHERE deleted = 0\n\t\t\t\t AND title LIKE '%$params%'\n\t\t\t\t OR description LIKE '%$params%'\";\n\t\t\t$rows2 = $db->Execute( $sql2 );\n\t\t\t$return[1] = $rows2->GetRows();\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "767c9f14b3e50c3e6ae5fa0af95d179a", "score": "0.5830824", "text": "function _get_list ($type='', $query=array(), $field=array(), $limit=array(1, 30), $order=array('id'=>'desc'), $opt=array()){\r\n \r\n if ($type==''||$field!=array()){\r\n foreach($field as $k=>$v) {\r\n switch($k) {\r\n default:\r\n $this->db->select($v);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n foreach($query as $k=>$v) {\r\n switch($k) {\r\n default:\r\n $this->db->where($k, $v);\r\n break;\r\n }\r\n }\r\n \r\n foreach($order as $k=>$v) {\r\n $this->db->order_by($k, $v);\r\n }\r\n \r\n if($limit!=array()) $this->db->limit($limit[1],($limit[0]-1)*$limit[1]);\r\n \r\n if(isset($opt['join'])) {\r\n foreach ($opt['join'] as $join){\r\n $this->db->join($join['table'], $join['on'], $join['type']);\r\n }\r\n }\r\n \r\n if(isset($opt['group'])) $this->db->group_by($opt['group']);\r\n \r\n $this->db->from($type.'_comments'); //set table\r\n \r\n $output = array();\r\n if(!isset($opt['return_type'])) $opt['return_type'] = 'data_array';\r\n if ($opt['return_type']!='compiled_select') {\r\n $return = $this->db->get();\r\n log_message('debug', \"Last Query: \".$this->db->last_query());\r\n }\r\n \r\n switch($opt['return_type']){\r\n case \"compiled_select\":\r\n return $this->db->get_compiled_select();\r\n break; \r\n \r\n case 'last_query':\r\n return $this->db->last_query();\r\n \r\n case 'data_array':\r\n default:\r\n foreach ($return->result() as $row_k=>$row_v) {\r\n $output[$row_k] = array();\r\n foreach ($row_v as $k=>$v)\r\n $output[$row_k][$k] = $v;\r\n }\r\n }\r\n \r\n return $output;\r\n }", "title": "" }, { "docid": "fc61e5080b3c64dc2bd69d95c96c0dbd", "score": "0.5814323", "text": "function selectLimit($limit,$length){\n$query=\"select o.orderDate,u.name,roomNumber,u.EXT,amount,o.oid from Orders o , Users u,Room r where o.uid = u.uid and u.rid= r.rid limit \".$limit.\",\".$length.\";\";\n$result=mysqli_query($this->con,$query);\n$i=0;\n$data=array();\nwhile($row=$result->fetch_array()){\n$data[$i]=$row;\n$i++;\n}\nreturn $data;\n}", "title": "" }, { "docid": "c18bc4ae2a182c8aef5ddbc29240d671", "score": "0.5776653", "text": "public function get_list($inc_global = true, $gid = false, $type = false, $count = false)\n {\n $return = array();\n $q_r = '';\n if ($gid !== false) {\n $q_r .= ' AND `gid`='.intval($gid);\n }\n if ($type !== false) {\n $q_r .= ($type == 'html') ? ' AND `type`=\"html\"' : ' AND `type`=\"text\"';\n }\n $q_r .= ($inc_global) ? ' AND `owner` IN(0,'.$this->uid.')' : ' AND `owner`='.$this->uid;\n\n $q_l = 'COUNT(*)';\n if (!$count) {\n $q_l = '`id`,`gid`,`type`,`name`,`owner`';\n $q_r .= ' ORDER BY `type` DESC, `name` ASC';\n }\n $qid = $this->query('SELECT '.$q_l.' FROM '.$this->Tbl['plates'].' WHERE 1 '.$q_r);\n if ($count) {\n if ($this->numrows($qid)) {\n list ($num) = $this->fetchrow($qid);\n return $num;\n }\n return 0;\n }\n while ($line = $this->assoc($qid)) {\n $return[] = $line;\n }\n return $return;\n }", "title": "" }, { "docid": "5ca11722c1cc05c5d7df2f744056fe9d", "score": "0.57689804", "text": "public function getBookRoomList($id,$mode)\n {\n \n $query=Edu_loanplacelst::select(\"edu_loanplacelst.*\",\"edu_loanplace.applykind\",\"edu_loanplace.num\",\"edu_loanplace.mstay\",\"edu_loanplace.fstay\"\n ,\"edu_classroomcls.croomclsname\",\"edu_classroomcls.croomclsfullname\",\"edu_classroomcls.classroom\"\n ,\"ts.name as timestartname\",\"te.name as timeendname\");\n $query->join(\"edu_loanplace\",\"edu_loanplacelst.applyno\",\"=\",\"edu_loanplace.applyno\");\n $query->leftJoin(\"edu_classroomcls\",\"edu_loanplacelst.croomclsno\",\"=\",\"edu_classroomcls.croomclsno\");\n $query->leftJoin(\"edu_classcode as ts\",function($join){\n $join->on(\"edu_loanplacelst.timestart\",\"=\",\"ts.code\");\n $join->where(\"ts.class\",\"=\",60);\n });\n $query->leftJoin(\"edu_classcode as te\",function($join){\n $join->on(\"edu_loanplacelst.timeend\",\"=\",\"te.code\");\n $join->where(\"te.class\",\"=\",61);\n });\n if($mode=='bed'){\n $query->where(\"edu_loanplacelst.id\",$id);\n }else{\n $query->where(\"edu_loanplacelst.applyno\",$id); \n }\n \n $result=$query->get();\n //$data=$data->toArray();\n\n\t\t/*$roomquery=$this->db->select('edu_loanplacelst.applyno,edu_loanplacelst.croomclsno,edu_loanplacelst.startdate,edu_loanplacelst.timestart,edu_loanplacelst.enddate,\n\t\t\t\t\t\t\t\t\t count(edu_loanroom.id) AS room')\n\t\t\t\t\t\t\t->from('edu_loanplacelst')\n\t\t\t\t\t\t\t->join('edu_loanroom','edu_loanplacelst.applyno=edu_loanroom.applyno AND edu_loanplacelst.croomclsno=edu_loanroom.croomclsno AND edu_loanplacelst.startdate=edu_loanroom.applydate','INNER')\n\t\t\t\t\t\t\t->where($qo)\n\t\t\t\t\t\t\t->group_by('edu_loanplacelst.applyno,edu_loanplacelst.croomclsno,edu_loanplacelst.startdate,edu_loanplacelst.timestart,edu_loanplacelst.enddate')\n\t\t\t\t\t\t\t->order_by('edu_loanplacelst.applyno,edu_loanplacelst.croomclsno,edu_loanplacelst.startdate,edu_loanplacelst.timestart,edu_loanplacelst.startdate')\n\t\t\t\t\t\t\t->get()\n ->result();*/\n $roomquery=Edu_loanplacelst::select(\"edu_loanplacelst.applyno\",\"edu_loanplacelst.croomclsno\",\"edu_loanplacelst.startdate\",\"edu_loanplacelst.timestart\"\n ,\"edu_loanplacelst.enddate\",DB::raw(\"count(edu_loanroom.id) AS room\"));\n\n $roomquery->join(\"edu_loanroom\",function($join){\n $join->on(\"edu_loanplacelst.applyno\",\"=\",\"edu_loanroom.applyno\");\n $join->on(\"edu_loanplacelst.croomclsno\",\"=\",\"edu_loanroom.croomclsno\");\n $join->on(\"edu_loanplacelst.startdate\",\"=\",\"edu_loanroom.applydate\");\n });\n if($mode=='bed'){\n $query->where(\"edu_loanplacelst.id\",$id);\n }else{\n $query->where(\"edu_loanplacelst.applyno\",$id); \n }\n $roomquery->groupBy(\"edu_loanplacelst.applyno\",\"edu_loanplacelst.croomclsno\",\"edu_loanplacelst.startdate\",\"edu_loanplacelst.timestart\",\"edu_loanplacelst.enddate\");\n $roomquery->orderBy(\"edu_loanplacelst.applyno\",\"edu_loanplacelst.croomclsno\",\"edu_loanplacelst.startdate\",\"edu_loanplacelst.timestart\",\"edu_loanplacelst.startdate\");\n\n $room_result=$roomquery->get();\n //$room_result=$room_result->toArray();\n\n\t\t/*$sroomquery=$this->db->select('edu_loanplacelst.applyno,edu_loanplacelst.croomclsno,edu_loanplacelst.startdate,\n\t\t\t\t\t\t\t\t\t edu_loansroom.sex,count(edu_loansroom.id) AS sroom')\n\t\t\t\t\t\t\t->from('edu_loanplacelst')\n\t\t\t\t\t\t\t->join('edu_loansroom','edu_loanplacelst.applyno=edu_loansroom.applyno AND edu_loanplacelst.croomclsno=edu_loansroom.croomclsno AND edu_loanplacelst.startdate=edu_loansroom.startdate','inner')\n\t\t\t\t\t\t\t->where($qo)\n\t\t\t\t\t\t\t->group_by('edu_loanplacelst.applyno,edu_loanplacelst.croomclsno,edu_loanplacelst.startdate,edu_loansroom.sex')\n\t\t\t\t\t\t\t->order_by('edu_loanplacelst.applyno,edu_loanplacelst.croomclsno,edu_loanplacelst.startdate')\n\t\t\t\t\t\t\t->get()\n ->result();*/\n $sroomquery=Edu_loanplacelst::select(\"edu_loanplacelst.applyno\",\"edu_loanplacelst.croomclsno\",\"edu_loanplacelst.startdate\"\n ,\"edu_loansroom.sex\",DB::raw(\"count(edu_loansroom.id) AS sroom\"));\n \n $sroomquery->join(\"edu_loansroom\",function($join){\n $join->on(\"edu_loanplacelst.applyno\",\"=\",\"edu_loansroom.applyno\");\n $join->on(\"edu_loanplacelst.croomclsno\",\"=\",\"edu_loansroom.croomclsno\");\n $join->on(\"edu_loanplacelst.startdate\",\"=\",\"edu_loansroom.startdate\");\n });\n if($mode=='bed'){\n $query->where(\"edu_loanplacelst.id\",$id);\n }else{\n $query->where(\"edu_loanplacelst.applyno\",$id); \n }\n $sroomquery->groupBy(\"edu_loanplacelst.applyno\",\"edu_loanplacelst.croomclsno\",\"edu_loanplacelst.startdate\",\"edu_loansroom.sex\");\n $sroomquery->orderBy(\"edu_loanplacelst.applyno\",\"edu_loanplacelst.croomclsno\",\"edu_loanplacelst.startdate\");\n $sroom_result=$sroomquery->get();\n\t\t\t\t\t\t\t\n\t\tforeach($result as $q){\n\t\t\t$q->setstatus='安排';\n\t\t\tif ($q->classroom==1){\n\t\t\t\tforeach($room_result as $room){\n\t\t\t\t\tif (($room->applyno==$q->applyno) && ($room->croomclsno==$q->croomclsno) && ($room->startdate==$q->startdate) \n\t\t\t\t\t\t&& ($room->timestart==$q->timestart) && ($room->enddate==$q->enddate)){\n\t\t\t\t\t\t$q->setstatus=$room->room.'間';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$mcount=0;\n\t\t\t\t$fcount=0;\n\t\t\t\t$s='';\n\t\t\t\tforeach($sroom_result as $sroom){\n\t\t\t\t\tif (($sroom->applyno==$q->applyno) && ($sroom->croomclsno==$q->croomclsno) && ($sroom->startdate==$q->startdate)){\n\t\t\t\t\t\tif ($sroom->sex==1) $mcount=$mcount+$sroom->sroom;\n\t\t\t\t\t\telse $fcount=$fcount+$sroom->sroom;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif ($mcount>0) $s='男:'.$mcount.'床';\n\t\t\t\tif (!empty($s)) $s=$s.'<BR>';\n\t\t\t\tif ($fcount>0) $s=$s.'女:'.$fcount.'床';\n\t\t\t\tif (!empty($s)) $q->setstatus=$s;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n }", "title": "" }, { "docid": "72a7d58ea4fa7f25e548e1c4aef76d91", "score": "0.5766069", "text": "function get_booking_types($is_use_filter = false , $is_use_limit=true ) { global $wpdb;\n\n ////////////////////////////////////////////////////////////////////////\n // CONSTANTS\n ////////////////////////////////////////////////////////////////////////\n /*update_bk_option( 'booking_resourses_num_per_page',10);\n $defaults = array(\n 'page_num' => '1',\n 'page_items_count' => get_bk_option( 'booking_resourses_num_per_page')\n );\n\n $r = wp_parse_args( $args, $defaults );\n extract( $r, EXTR_SKIP );\n /**/\n $page_num = (isset($_REQUEST['page_num']))?$_REQUEST['page_num']:1; // Pagination\n $page_items_count = get_bk_option( 'booking_resourses_num_per_page');\n $page_start = ( $page_num - 1 ) * $page_items_count ;\n\n\n $sql = \" SELECT * FROM {$wpdb->prefix}bookingtypes as bt\" ;\n $or_sort = 'title_asc';\n //$or_sort = 'booking_type_id_asc';\n $where = ''; // Where for the different situation: BL and MU\n $where = apply_bk_filter('multiuser_modify_SQL_for_current_user', $where);\n if ($where != '') $where = ' WHERE ' . $where;\n if ( class_exists('wpdev_bk_biz_l')) {\n if ($where != '') $where .= ' AND bt.parent = 0 ';\n else $where .= ' WHERE bt.parent = 0 ';\n $or_sort = 'prioritet';\n }\n\n if (isset($_REQUEST['wh_resource_id'])) {\n if ($where == '') $where .= \" WHERE \" ;\n else $where .= \" AND \";\n $where .= $wpdb->prepare( \" ( (bt.booking_type_id = %s) \", $_REQUEST['wh_resource_id'] ) \n . \"OR (bt.title like '%%\". wpbc_clean_string_for_db( $_REQUEST['wh_resource_id'] ) .\"%%') ) \";\n }\n\n if (strpos($or_sort, '_asc') !== false) { // Order\n $or_sort = str_replace('_asc', '', $or_sort);\n $sql_order = \" ORDER BY \" .$or_sort .\" ASC \";\n } else $sql_order = \" ORDER BY \" .$or_sort .\" DESC \";\n\n if ($is_use_limit) $sql_limit = $wpdb->prepare( \" LIMIT %d, %d \", $page_start, $page_items_count ) ;\n else $sql_limit = \" \";\n\n $types_list = $wpdb->get_results( $sql . $where. $sql_order . $sql_limit );\n\n\n\n $bk_type_id = array(); // Get all ID of booking resources.\n if (! empty($types_list))\n foreach ($types_list as $key=>$res) {\n $types_list[$key]->id = $res->booking_type_id;\n $bk_type_id[]=$res->booking_type_id;\n }\n\n // FIx: This fix do not show the \"Child\" booking resources at the Booking > Resources page. \n if ( ( ( isset($_GET['hide'] )) && ( $_GET['hide'] == 'child') ) \n// || ( ( isset($_GET['tab'] ) ) && ( $_GET['tab'] == 'cost') ) \n ) {\n foreach ($types_list as $key=>$res) {\n $types_list[$key]->count = 1;\n $types_list[$key]->id = $res->booking_type_id;\n }\n return $types_list;\n }\n\n if ( ( class_exists('wpdev_bk_biz_l')) && (count($bk_type_id)>0) ) {\n\n $bk_type_id = implode(',',$bk_type_id); // Get all ID of PARENT or SINGLE Resources.\n\n $sql = \" SELECT * FROM {$wpdb->prefix}bookingtypes as bt\" ;\n\n $where = ''; // Where for the different situation: BL and MU\n $where = apply_bk_filter('multiuser_modify_SQL_for_current_user', $where);\n if ($where != '') $where = ' WHERE ' . $where;\n\n if ($where != '') $where .= ' AND bt.parent IN (' . $bk_type_id . ') ';\n else $where .= ' WHERE bt.parent IN (' . $bk_type_id . ') ';\n\n $sql_order = 'ORDER BY parent, prioritet'; // Order\n\n $linear_list_child_resources = $wpdb->get_results( $sql . $where . $sql_order ); // Get child elements\n\n // Transfrom them into array for the future work\n $array_by_parents_child_resources = array();\n foreach ($linear_list_child_resources as $res) {\n if (! isset($array_by_parents_child_resources[$res->parent])) $array_by_parents_child_resources[$res->parent] = array();\n $res->id = $res->booking_type_id;\n $array_by_parents_child_resources[$res->parent][] = $res;\n }\n\n\n $final_resource_array = array();\n foreach ($types_list as $key=>$res) {\n // check if exist child resources\n if ( isset($array_by_parents_child_resources[ $res->booking_type_id ])) {\n $res->count = count( $array_by_parents_child_resources[ $res->booking_type_id ] )+1;\n } else\n $res->count = 1;\n\n // Fill the parent resource\n $final_resource_array[] = $res;\n\n // Fill all child resources (its already sorted)\n if ( isset($array_by_parents_child_resources[ $res->booking_type_id ])) {\n foreach ($array_by_parents_child_resources[ $res->booking_type_id ] as $child_obj) {\n $child_obj->count = 1;\n $final_resource_array[] = $child_obj;\n }\n }\n }\n $types_list = $final_resource_array;\n }\n\n return $types_list;\n\n/*===========================================================================================================================================================*/\n\n if ( class_exists('wpdev_bk_biz_s')) $mysql = \"SELECT booking_type_id as id, title, cost FROM {$wpdb->prefix}bookingtypes ORDER BY title\";\n else $mysql = \"SELECT booking_type_id as id, title FROM {$wpdb->prefix}bookingtypes ORDER BY title\";\n\n if ( class_exists('wpdev_bk_biz_l')) { // If Business Large then get resources from that\n $types_list = apply_bk_filter('get_booking_types_hierarhy_linear',array() );\n for ($i = 0; $i < count($types_list); $i++) {\n $types_list[$i]['obj']->count = $types_list[$i]['count'];\n $types_list[$i] = $types_list[$i]['obj'];\n //if ( ($booking_type_id != 0) && ($booking_type_id == $types_list[$i]->booking_type_id ) ) return $types_list[$i];\n }\n } else\n $types_list = $wpdb->get_results( $mysql );\n\n\n $types_list = apply_bk_filter('multiuser_resource_list', $types_list);\n\n return $types_list;\n\n/**/\n }", "title": "" }, { "docid": "f47de0e6066f3190defe2898a8ec7f79", "score": "0.5756806", "text": "function get_max_availability($start_date, $end_date, $room_types, $channel, $filter_can_be_sold_online=FALSE)\n {\n \t$room_types_string = implode(', ', $room_types);\n\t\t$can_be_sold_online_filter = $filter_can_be_sold_online ? 'AND r.can_be_sold_online = 1' : '';\n \t\n \t$query = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t\tdi.date, \n\t\t\t\trt.id as room_type_id, \n\t\t\t\trt.name,\n\t\t\t\t \n\t\t\t\t(\n\t\t\t\t\t(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t(IFNULL((\n\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\tdrxrtxc.availability\n\t\t\t\t\t\t\tfrom \n\t\t\t\t\t\t\t\tdate_range as dr,\n\t\t\t\t\t\t\t\tdate_range_x_room_type as drxrt,\n\t\t\t\t\t\t\t\tdate_range_x_room_type_x_channel as drxrtxc\n\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\t\tdrxrtxc.date_range_x_room_type_id = drxrt.date_range_x_room_type_id AND\n\t\t\t\t\t\t\t\tdrxrtxc.channel_id = \".$channel.\" AND\n\t\t\t\t\t\t\t\trt.id = drxrt.room_type_id AND\n\t\t\t\t\t\t\t\tdr.date_range_id = drxrt.date_range_id AND\n\t\t\t\t\t\t\t\tdr.date_start <= di.date AND \n\t\t\t\t\t\t\t\tdi.date <= dr.date_end AND\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(dr.sunday = '1' AND DAYOFWEEK(di.date) = '\".SUNDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.monday = '1' AND DAYOFWEEK(di.date) = '\".MONDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.tuesday = '1' AND DAYOFWEEK(di.date) = '\".TUESDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.wednesday = '1' AND DAYOFWEEK(di.date) = '\".WEDNESDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.thursday = '1' AND DAYOFWEEK(di.date) = '\".THURSDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.friday = '1' AND DAYOFWEEK(di.date) = '\".FRIDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.saturday = '1' AND DAYOFWEEK(di.date) = '\".SATURDAY.\"')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\torder by drxrt.date_range_x_room_type_id DESC\n\t\t\t\t\t\t\tLIMIT 0,1\n\t\t\t\t\t\t), 999)) - count(DITINCT b.booking_id)\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tbooking as b, \n\t\t\t\t\t\t\tbooking_block as brh,\n\t\t\t\t\t\t\troom as r\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tb.source IN (\".SOURCE_BOOKING_DOT_COM.\",\".SOURCE_EXPEDIA.\",\".SOURCE_AGODA.\",\".SOURCE_SITEMINDER.\") AND\n\t\t\t\t\t\t\tr.room_type_id = rt.id AND\n\t\t\t\t\t\t\tbrh.room_id = r.room_id AND\n\t\t\t\t\t\t\tbrh.check_out_date > di.date AND \n\t\t\t\t\t\t\tdi.date >= brh.check_in_date AND\n\t\t\t\t\t\t\tb.booking_id = brh.booking_id AND\n\t\t\t\t\t\t\tb.state < 4 AND\n\t\t\t\t\t\t\tb.is_deleted = '0' AND\n\t\t\t\t\t\t\tr.is_deleted = '0'\n\t\t\t\t\t) - (\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tcount(DITINCT b.booking_id)\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tbooking as b, \n\t\t\t\t\t\t\tbooking_block as brh\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tb.source IN (\".SOURCE_BOOKING_DOT_COM.\",\".SOURCE_EXPEDIA.\",\".SOURCE_AGODA.\",\".SOURCE_SITEMINDER.\") AND\n\t\t\t\t\t\t\tbrh.room_type_id = rt.id AND\n\t\t\t\t\t\t\t(brh.room_id IS NULL OR brh.room_id = 0) AND\n\t\t\t\t\t\t\tbrh.check_out_date > di.date AND \n\t\t\t\t\t\t\tdi.date >= brh.check_in_date AND\n\t\t\t\t\t\t\tb.booking_id = brh.booking_id AND\n\t\t\t\t\t\t\tb.state < 4 AND\n\t\t\t\t\t\t\tb.is_deleted = '0'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tas availability\n\t\t\tFROM\n\t\t\t\tdate_interval as di,\n\t\t\t\troom_type as rt\n\t\t\tLEFT JOIN room as r ON r.room_type_id = rt.id AND r.is_deleted = '0' \".$can_be_sold_online_filter.\"\n\t\t\tWHERE\n\t\t\t\trt.id IN (\".$room_types_string.\") AND\n\t\t\t\t\n\t\t\t\tdi.date >= '$start_date' AND \n\t\t\t\t'$end_date' >= di.date AND\n\t\t\t\trt.is_deleted = '0'\n\t\t\t\t\n\n\t\t\tGROUP BY rt.id, di.date\n\t\t\tORDER BY di.date ASC\n\t\t\");\n\n\t\t$result_array = Array();\n\t\tif ($this->db->_error_message())\n\t\t{\n\t\t\tshow_error($this->db->_error_message());\n\t\t} else {// otherwise, return insert_id;\n\t\t\t$result_array = $query->result_array();\n\t\t}\n\t\t\n\t\t//echo $this->db->last_query();\n\n\t\t$grouped_by_room_type = array();\n\t\t// organize the array into room_types\n\t\tforeach ($result_array as $availability)\n\t\t{\n\t\t\t$grouped_by_room_type[$availability['room_type_id']][] = Array(\n\t\t\t\t'date' => $availability['date'],\n\t\t\t\t'availability' => $availability['availability']\n\t\t\t\t);\n\t\t}\n\n\t\t$date_ranged_array = array();\n\n\t\tforeach ($grouped_by_room_type as $key => $array_of_room_type)\n\t\t{\n\t\t\t$date_ranged_array[$key] = get_array_with_range_of_dates(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$array_of_room_type,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$channel);\n\t\t};\n\n\t\treturn $date_ranged_array;\n\n }", "title": "" }, { "docid": "5d4813b76d16ffa8b31d323338504ad4", "score": "0.5719335", "text": "function get_inventory($start_date, $end_date, $room_types, $ota_id, $filter_can_be_sold_online=FALSE)\n {\n\t\t$room_types_string = implode(', ', $room_types);\n\t\t$can_be_sold_online_filter = $filter_can_be_sold_online ? 'AND r.can_be_sold_online = 1' : '';\n \t\n \t$query = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t\tdi.date, \n\t\t\t\trt.id as room_type_id, \n\t\t\t\trt.name,\n\n\t\t\t\t(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\tIFNULL((\n\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\tdrxrtxc.availability\n\t\t\t\t\t\t\tfrom \n\t\t\t\t\t\t\t\tdate_range as dr,\n\t\t\t\t\t\t\t\tdate_range_x_room_type as drxrt,\n\t\t\t\t\t\t\t\tdate_range_x_room_type_x_channel as drxrtxc\n\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\t\tdrxrtxc.date_range_x_room_type_id = drxrt.date_range_x_room_type_id AND\n\t\t\t\t\t\t\t\tdrxrtxc.channel_id = \".$ota_id.\" AND\n\t\t\t\t\t\t\t\trt.id = drxrt.room_type_id AND\n\t\t\t\t\t\t\t\tdr.date_range_id = drxrt.date_range_id AND\n\t\t\t\t\t\t\t\tdr.date_start <= di.date AND \n\t\t\t\t\t\t\t\tdi.date <= dr.date_end AND\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(dr.sunday = '1' AND DAYOFWEEK(di.date) = '\".SUNDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.monday = '1' AND DAYOFWEEK(di.date) = '\".MONDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.tuesday = '1' AND DAYOFWEEK(di.date) = '\".TUESDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.wednesday = '1' AND DAYOFWEEK(di.date) = '\".WEDNESDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.thursday = '1' AND DAYOFWEEK(di.date) = '\".THURSDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.friday = '1' AND DAYOFWEEK(di.date) = '\".FRIDAY.\"') OR\n\t\t\t\t\t\t\t\t\t(dr.saturday = '1' AND DAYOFWEEK(di.date) = '\".SATURDAY.\"')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\torder by drxrt.date_range_x_room_type_id DESC\n\t\t\t\t\t\t\tLIMIT 0,1\n\t\t\t\t\t\t), 999) - count(b.booking_id)\n\t\t\t\t\tFROM\n\t\t\t\t\t\tbooking as b, \n\t\t\t\t\t\tbooking_block as brh,\n\t\t\t\t\t\troom as r\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tb.source IN (\".SOURCE_BOOKING_DOT_COM.\",\".SOURCE_EXPEDIA.\",\".SOURCE_AGODA.\",\".SOURCE_MYALLOCATOR.\",\".SOURCE_SITEMINDER.\") AND\n\t\t\t\t\t\tr.room_type_id = rt.id AND\n\t\t\t\t\t\tbrh.room_id = r.room_id AND\n\t\t\t\t\t\tbrh.check_out_date > di.date AND \n\t\t\t\t\t\tdi.date >= brh.check_in_date AND\n\t\t\t\t\t\tb.booking_id = brh.booking_id AND\n\t\t\t\t\t\tb.state < 4 AND\n\t\t\t\t\t\tb.is_deleted = '0' AND\n\t\t\t\t\t\tr.is_deleted = '0'\n\t\t\t\t) as availability\n\t\t\tFROM\n\t\t\t\troom_type as rt,\n\t\t\t\tdate_interval as di,\n\t\t\t\troom as r\n\t\t\tWHERE\n\t\t\t\trt.id IN (\".$room_types_string.\") AND\n\t\t\t\tr.room_type_id = rt.id AND\n\t\t\t\tdi.date >= '$start_date' AND \n\t\t\t\t'$end_date' >= di.date AND\n\t\t\t\trt.is_deleted = '0' AND\n\t\t\t\tr.is_deleted = '0'\n\t\t\t\t\".$can_be_sold_online_filter.\"\n\n\t\t\tGROUP BY rt.id, di.date\n\t\t\tORDER BY di.date ASC\n\t\t\");\n\n\t\t$result_array = Array();\n\t\tif ($this->db->_error_message())\n\t\t{\n\t\t\tshow_error($this->db->_error_message());\n\t\t} else {// otherwise, return insert_id;\n\t\t\t$result_array = $query->result_array();\n\t\t}\n\n\t\t$grouped_by_room_type = array();\n\t\t// organize the array into room_types\n\t\tforeach ($result_array as $availability)\n\t\t{\n\t\t\t$grouped_by_room_type[$availability['room_type_id']][] = Array(\n\t\t\t\t'date' => $availability['date'],\n\t\t\t\t'availability' => $availability['availability']\n\t\t\t\t);\n\t\t}\n\n\t\t$date_ranged_array = array();\n\n\t\tforeach ($grouped_by_room_type as $key => $array_of_room_type)\n\t\t{\n\t\t\t$date_ranged_array[$key] = get_array_with_range_of_dates(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$array_of_room_type,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ota_id);\n\t\t};\n \n\t\t//return $grouped_by_room_type;\n\t\treturn $date_ranged_array;\n }", "title": "" }, { "docid": "3290f663d1b400a1445b39be646a4502", "score": "0.57017535", "text": "public function getRoomsData()\n {\n $param = $this->getParams();\n $excludeDays = $this->getRoomExcludeDays();\n\n $collection = $this->_objectManager->get('Ced\\Booking\\Model\\Rooms')->getCollection()->addFieldToFilter('main_table.product_id',$this->getProductId());\n $collection->getSelect()->joinLeft(\n ['image'=>'ced_booking_room_image_relation'],\n 'main_table.id = image.room_id',\n array('image.image_name')\n )->group('main_table.id');\n $collection->addFieldToFilter('status',1);\n if (isset($param['category']) && $param['category']!='') {\n\n $collection->addFieldToFilter('main_table.room_category_id',$param['category']);\n\n } elseif (isset($param['check_in']) && $param['check_in']!='' && isset($param['check_out']) && $param['check_out']!='' && count($excludeDays)!=0) {\n\n $collection->addFieldToFilter('main_table.id',['neq'=>$excludeDays]);\n\n } elseif (isset($param['category']) && $param['category']!='' && isset($param['check_in']) && $param['check_in']!='' && isset($param['check_out']) && $param['check_out']!='' && count($excludeDays)!=0) {\n\n $collection->addFieldToFilter('main_table.id',['neq'=>$excludeDays])->addFieldToFilter('main_table.room_category_id',$param['category']);\n } \n return $collection; \n }", "title": "" }, { "docid": "f19964b66b1e08157c8cce07353d6f29", "score": "0.56985986", "text": "public function categoryroomtype() {\n $RES = \"invalid\";\n $query = \"SELECT * FROM arib_category_tbl WHERE status='1'\";\n $ObjDB = new class_db();\n $ObjDB->sproc_name = $query;\n $RES = $ObjDB->SelectQuery();\n return $RES;\n }", "title": "" }, { "docid": "af42a2c0e29e5f192fc196937ba6e5a3", "score": "0.5692066", "text": "function ambilroom() {\n $query=mysql_query(\"SELECT * FROM room ORDER BY id_room\");\n\t while($row=mysql_fetch_array($query))\n\t\t $data[]=$row;\n\t return $data;\n }", "title": "" }, { "docid": "5c0044fb1c6e50330bb85ceed2d8316c", "score": "0.5691571", "text": "function GetTypes()\r\n {\r\n $typeId = $this->dbh->sql_safe($typeId);\r\n $sql = 'SELECT rt_id AS R_ID, rt_name AS R_NAME '\r\n . 'FROM report_type ';\r\n\r\n return $this->dbh->query_all($sql);\r\n }", "title": "" }, { "docid": "aa6140dd7c1cde6804f43fe11ba15f61", "score": "0.5683127", "text": "function get_list($type, $private, $filtre_where = \"\")\n{\n global $db, $user_data;\n $where = ($private == 1 ? \"WHERE `sender_id` = \" . $user_data['user_id'] : \"\");\n if ($filtre_where != \"\")\n if ($where == \"\")\n $where = \"WHERE \" . $filtre_where;\n else\n $where .= \" AND \" . $filtre_where;\n if ($type == 'cible')\n $query_limit = \"SELECT DISTINCT `$type`,`sender_id` FROM `\" . TABLE_QMS . \"` $where ORDER BY `sender_id` ASC\";\n else\n $query_limit = \"SELECT DISTINCT `$type` FROM `\" . TABLE_QMS . \"` $where ORDER BY `$type` ASC\";\n $result = $db->sql_query($query_limit);\n if ($result = $db->sql_numrows($result) == 0)\n $tab = array(\"\", \"\");\n else {\n if ($type == 'cible' && $private != 1) {\n $i = 0;\n $previd = 0;\n while (list($type_data, $sender_id_data) = $db->sql_fetch_row($result)) {\n if ($sender_id_data != $previd)\n $tab[$i++] = \"---> \" . $sender_id_data;\n $tab[$i++] = $type_data;\n $previd = $sender_id_data;\n }\n for ($j = 0; $j < count($tab); $j++)\n if (count($getsid = explode('>', $tab[$j])) > 1)\n $tab[$j] = '---> ' . get_user_name_by_id($getsid[1]);\n } else {\n $i = 0;\n while (list($type_data) = $db->sql_fetch_row($result))\n $tab[$i++] = $type_data;\n }\n }\n return $tab;\n}", "title": "" }, { "docid": "0281817352631e7b565a96831305ff64", "score": "0.5673928", "text": "public function getType()\n {\n $modelUser = Yii::$app->user->identity;\n $userRole = $modelUser->role;\n $associations = Yii::$app->rbac->getAssociations($modelUser->id);\n $association = null;\n $unit = null;\n if(isset($associations['residential_association_id']))\n {\n $association = $associations['residential_association_id'];\n }\n $types = BuildingType::find()->where(['building_type.status'=> 1]);\n // if($association)\n // {\n // $types->andWhere(['residence_category_id'=>$association]);\n // }\n if(isset($associations['hks_id']))\n {\n $unit = $associations['hks_id'];\n }\n if($unit)\n {\n $modelUnit = GreenActionUnit::find()->where(['id'=>$unit])->andWhere(['green_action_unit.status'=>1])->one();\n if($modelUnit)\n {\n $category = $modelUnit->residence_category_id;\n }\n else\n {\n $category = null;\n }\n if($category==3)\n {\n $types->andWhere(['residence_category_id'=>$category]);\n }\n }\n $types = $types->all();\n return $types;\n }", "title": "" }, { "docid": "10733726afb8d76cde5a2c2b3d1b2fdd", "score": "0.5667439", "text": "function Rooms()\n {\n if (empty($this->Rooms))\n {\n $this->Rooms=\n $this->RoomsObj()->Sql_Select_Hashes\n (\n array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n )\n );\n }\n\n return $this->Rooms;\n }", "title": "" }, { "docid": "5970af2c6927ba51348d0ec3d5a565e0", "score": "0.5658158", "text": "public function getInventoryDepartmentList($conditions='', $orderBy=' invDepttName', $limit = '') {\n\t\tglobal $inventoryDepartmentArr;\n //no joining is donw with study period table as we dont need to display studyPeriod in the table listing\n \n $query = \"\tSELECT\tinvd.invDepttId,\n\t\t\t\t\t\t\tinvd.invDepttName, \n\t\t\t\t\t\t\tinvd.invDepttAbbr,\n\t\t\t\t\t\t\tIF(invd.depttType=1,'\".$inventoryDepartmentArr[1].\"',IF(invd.depttType=2,'\".$inventoryDepartmentArr[2].\"','\".$inventoryDepartmentArr[3].\"')) AS departmentType,\n\t\t\t\t\t\t\temp.employeeName\n\t\t\t\t\tFROM\tinv_dept invd,\n\t\t\t\t\t\t\tinv_dept_incharge idi,\n\t\t\t\t\t\t\temployee emp\n\t\t\t\t\tWHERE\tinvd.invDepttId = idi.invDepttId\n\t\t\t\t\tAND\t\tidi.inchargeId = emp.employeeId\n\t\t\t\t\t\t$conditions\n\t\t\t ORDER BY $orderBy \n\t\t\t\t\t$limit\";\n \n \n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "85f589c71c7e87ab138b47131e6a10a6", "score": "0.5656198", "text": "public function index()\n {\n return RoomType::all();\n }", "title": "" }, { "docid": "74630f7b32151ec0656b1ab5a3b7fad2", "score": "0.56547695", "text": "public function getAttendanceCodeList($conditions='', $limit = '', $orderBy=' attendanceCodeName') {\n \t\tglobal $sessionHandler;\n\t\t$instituteId = $sessionHandler->getSessionVariable('InstituteId');\n\n\t\tif ($conditions != '') {\n\t\t\t$conditions .= \" and instituteId = $instituteId\";\n\t\t}\n\t\telse {\n\t\t\t$conditions .= \" where instituteId = $instituteId\";\n\t\t}\n \n $query = \"SELECT \n attendanceCodeDescription,\n attendanceCodePercentage,\n attendanceCodeId, \n attendanceCode, \n attendanceCodeName,\n IF(showInLeaveType=1,'Yes','No') AS showInLeaveType \n FROM \n attendance_code \n $conditions \n ORDER BY $orderBy \n $limit\";\n \n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "b8247faed2657a019d48ab7a2b03513c", "score": "0.564652", "text": "function retrieve_all_rooms($date) {\r\n $room_data = array (\"125y2T\"=>2,\"126yQ/3T\"=>4,\"151y2T\"=>2,\"152y2T\"=>2,\"214nQ\"=>2,\"215n2T\"=>2,\"218yQ\"=>2,\r\n\t\"223nQ\"=>2,\"224n3T\"=>3,\"231y2T\"=>2,\"232n2T\"=>2,\"233n3T\"=>3,\"243yQ/3T\"=>4,\"244nQ\"=>2,\r\n\t\"245nQ\"=>2,\"250y2T\"=>2,\"251y2T\"=>2,\"252yQ\"=>2,\"253yQ\"=>2,\"254y2T\"=>2,\"255y2T\"=>2);\r\n $active_bookings = retrieve_active_dbBookings($date);\r\n $my_rooms = array();\r\n\tforeach ($room_data as $room => $capacity){\r\n\t $room_no = substr($room, 0, 3);\r\n\t if (isset($active_bookings[$room_no]))\r\n\t\t $my_rooms[] = $room_no . \":\" . $active_bookings[$room_no];\r\n\t\telse $my_rooms[] = $room_no . \":\";\r\n\t}\r\n\treturn $my_rooms;\r\n}", "title": "" }, { "docid": "de67fdc4ab9d82a8c1f3486593248417", "score": "0.56353956", "text": "public function user_list_filter($type,$filter,$from_date,$to_date)\r\r\n\r\r\n\t{\r\r\n\r\r\n\t\tif($type=='national' || $type=='webadmin')\r\r\n\r\r\n\t\t{\r\r\n\r\r\n\t\t\t\r\r\n\r\r\n\t\t\t$res = $this->db->query(\"SELECT * FROM kr_users WHERE admin_type!='national' and admin_type='$filter' \");\r\r\n\r\r\n\t\t\treturn $res->result_array();\r\r\n\r\r\n\t\t}\r\r\n\r\r\n\t\tif($type=='zone')\r\r\n\r\r\n\t\t{\r\r\n\r\r\n\t\t\t$res = $this->db->query(\"SELECT * FROM kr_users WHERE id!='$id' and admin_type!='national' and admin_type!='$filter' and Zonal_admin_id='$id'\");\r\r\n\r\r\n\t\t\treturn $res->result_array();\r\r\n\r\r\n\t\t}\r\r\n\r\r\n\t\tif($type=='state')\r\r\n\r\r\n\t\t{\r\r\n\r\r\n\t\t\t$res = $this->db->query(\"SELECT * FROM kr_users WHERE id!='$id' and admin_type!='national' and admin_type!='$filter' and State_admin_id='$id'\");\r\r\n\r\r\n\t\t\treturn $res->result_array();\r\r\n\r\r\n\t\t}\r\r\n\r\r\n\t}", "title": "" }, { "docid": "2eee0d143c5f069946d68ac818f78130", "score": "0.56319654", "text": "function get_lift_types() {\n\t// global $myPDO;\n\t// $query = $myPDO->prepare(\"\n\t// \tSELECT * \n\t// \tFROM lift_types\n\t// \tORDER BY name_display ASC\n\t// \");\n\t// $result = $query->execute();\n\t// $fetch = $query->fetchAll(PDO::FETCH_ASSOC);\n\n\t$liftTypes = \\App\\LiftType::orderBy('name_display', 'ASC')->get();\n\t\n\treturn $liftTypes;\n}", "title": "" }, { "docid": "54c3301e1844db19a322ff34a680bec9", "score": "0.5631676", "text": "function ListeType()\n{\n\n\t$pdo = connexion();\n\t\n\tif($pdo != false)\n\t{\n\t$req = \"\n\t\t\tSelect IdType,LibelleType\n\t\t\t\tfrom type\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\";\n\t\t\t\t\t\n\t\t\t$result = $pdo->query($req)->fetchall();\n\t}\n\t \n\t \n\t\n\t \n\t return $result;\n\t \n\n}", "title": "" }, { "docid": "94437866739ca64e39f6b1443db315e0", "score": "0.56229985", "text": "public function roomTypeLists($idH){\n $data['hotel'] = $this->Standard_model->getSingle('tb_hotel','id_hotel',$idH);\n \n //get id user seller\n $id = $this->session->get_userdata('id_seller');\n\n //get data user seller\n $data['profile'] = $this->dataUser();\n\n //get id type room\n $idT = $this->Standard_model->getAll('tb_type','id_hotel',$idH);\n\n //get data room type lists\n $data['roomtype'] = $this->Seller_model->getRoomTypeLists($idH);\n\n //get data fasilitas kamar drom databases\n $data['roomfacility'] = $this->Standard_model->getAllData('tb_fasilitas_kamar');\n\n \n $this->load->view('seller/templates/header', $data);\n $this->load->view('seller/roomTypeLists',$data);\n $this->load->view('seller/templates/footer');\n }", "title": "" }, { "docid": "aee31431c117a6d8d5f08972731c4f9e", "score": "0.56162906", "text": "function search($length,$width,$rent_type){\n\t\t//============================== CONNECT TO DATABASE ========\n\t\t$db = get_data();\n\n\t\tif($rent_type==\"monthly\"){\n\t\t\t$rent_param=\"dcStdRate\";\n\t\t}\n\t\telse{\n\t\t\t$rent_param=\"dcStdWeeklyRate\";\n\t\t}\n\t\t//================ EXECUTE QUERY WITH PARAMS ========================\n\t\t//PARAMETERS:\tsUnitName ,dcWidth ,dcLength ,\".$rent_param.\" ,bPower ,bClimate bAlarm, bRent\n\t\ttry{\t\n\t\t\t$results = $db->prepare(\"SELECT * FROM UNITS WHERE dcWidth=? AND dcLength=? AND bRented=\\\"TRUE\\\"\");\n\t\t\t//bind paramaters on the back end to prevent MySQL injection\n\t\t\t$results->bindParam(1,$width);\n\t\t\t$results->bindParam(2,$length);\n\t\t\t$results->execute();\n\t\t\t$data = $results->fetchAll();\n\t\t}\tcatch(Exception $e){\n\t\t\techo \"could not query the database\";\n\t\t\texit;\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "2d94d867ecffb02fd9265ce3032eda2d", "score": "0.5614025", "text": "public function qry_all_record_type($page, $key_word = '', $member = '-1', $spec = '-1', $level = '-1')\n {\n $arr_return = array();\n\n $offset = _CONST_DEFAULT_ROWS_PER_PAGE;\n $limit = ($page - 1) * _CONST_DEFAULT_ROWS_PER_PAGE;\n $condition = \"\";\n //loc theo tu khoa\n if (!empty($key_word))\n {\n $condition .= \" AND C_NAME LIKE '%$key_word%'\";\n }\n\n //loc theo don vi\n if ($member != '-1')\n {\n $condition .= \" AND C_MEMBER_CODE = '$member'\";\n }\n\n //loc theo linh vuc\n if ($spec != '-1')\n {\n $condition .= \" AND C_SPEC_CODE = $spec\";\n }\n\n //loc theo muc do dvc\n if ($level != '-1')\n {\n $condition .= \" AND C_LEVEL = $level\";\n }\n\n $stmt = \"SELECT\n RT.C_NAME AS C_RECORD_TYPE_NAME,\n RT.PK_RECORD_TYPE AS C_RECORD_TYPE_ID,\n RT.C_CODE AS C_RECORD_TYPE_CODE,\n CASE WHEN RT.C_MEMBER_CODE = '\". _CONST_DEFAULT_SPEC_LEVEL_OF_DISTRICT .\"' THEN 'Cấp Quận/Huyện'\n ELSE M.C_NAME \n END AS C_MEMBER_NAME,\n S.C_NAME AS C_SPEC_NAME,\n RT.C_LEVEL AS C_LEVEL\n FROM (SELECT\n PK_RECORD_TYPE,\n C_NAME,\n C_SPEC_CODE,\n C_CODE,\n C_MEMBER_CODE,\n C_LEVEL\n FROM t_ps_record_type\n WHERE C_STATUS = 1 $condition\n ORDER BY C_ORDER\n LIMIT $limit,$offset) RT\n LEFT JOIN t_ps_spec S\n ON RT.C_SPEC_CODE = S.C_CODE\n LEFT JOIN t_ps_member M\n ON RT.C_MEMBER_CODE = M.C_CODE\";\n $arr_return['data'] = $this->db->getAll($stmt, array());\n\n //dem tong so ban ghi\n $stmt = \"SELECT\n COUNT(*)\n FROM t_ps_record_type\n WHERE C_STATUS = 1 $condition\";\n $arr_return['count'] = $this->db->getOne($stmt, array());\n\n return $arr_return;\n }", "title": "" }, { "docid": "b11da78737e4fed030a1f78b8aee9be5", "score": "0.56124926", "text": "public function room_available($type)\n {\n\t\t\n\t\t$conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);\n\t\t// Check connection\n\t\tif ($conn->connect_error) {\n\t\t die(\"Connection failed: \" . $conn->connect_error);\n\t\t}\n\t\tif($type == 'Normal Room'){\n\t\t\t//normal room available\n\t\t\t$sql = \"SELECT sum(left_qty)as room_available FROM rooms WHERE type = 'Normal Room'\";\n\t\t\t$result = $conn->query($sql);\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t//output\n\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\tif($row[\"room_available\"] > 0){\n\t\t\t\t\t$sql = \"SELECT sum(`left_qty`)as bed_available FROM `beds` WHERE `type` = 'Flat Beds'\";\n\t\t\t\t\t$result = $conn->query($sql);\n\t\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\t\t\tif($row[\"bed_available\"] > 0){\n\t\t\t\t\t\t\t$sql = \"SELECT SUM(`left_qty`) as equipments_available FROM equipments WHERE type='Normal Masks'\";\n\t\t\t\t\t\t\t$result = $conn->query($sql);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\t\t\t\tif($row[\"equipments_available\"] > 1){\n\t\t\t\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'yes'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t}\n\t\telse if($type == 'Oxygen Rooms'){\n\t\t\n\t\t\t$sql = \"SELECT sum(left_qty)as room_available FROM rooms WHERE type = 'Oxygen Rooms'\";\n\t\t\t$result = $conn->query($sql);\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t//output\n\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\tif($row[\"room_available\"] > 0){\n\t\t\t\t\t$sql = \"SELECT sum(`left_qty`)as bed_available FROM `beds` WHERE `type` = 'Recliner Beds'\";\n\t\t\t\t\t$result = $conn->query($sql);\n\t\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\t\t\tif($row[\"bed_available\"] > 0){\n\t\t\t\t\t\t\t$sql = \"SELECT type,SUM(left_qty)as equipment_available FROM equipments GROUP BY type HAVING type = 'Non rebreather masks' OR type='Oxygen Cylinder'\";\n\t\t\t\t\t\t\t$result = $conn->query($sql);\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t\t\t\t\tif($row['type'] == 'Non rebreather masks' & $row['equipment_available'] < 2){\n\t\t\t\t\t\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\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\telse if($row['type'] == 'Oxygen Cylinder' & $row['equipment_available'] < 1){\n\t\t\t\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'no'\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\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'Yes'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if($type == 'ICU'){\n\t\t\n\t\t\t$sql = \"SELECT sum(left_qty)as room_available FROM rooms WHERE type = 'ICU'\";\n\t\t\t$result = $conn->query($sql);\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t//output\n\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\tif($row[\"room_available\"] > 0){\n\t\t\t\t\t$sql = \"SELECT sum(`left_qty`)as bed_available FROM `beds` WHERE `type` = 'Recliner Beds'\";\n\t\t\t\t\t$result = $conn->query($sql);\n\t\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\t\t\tif($row[\"bed_available\"] > 0){\n\t\t\t\t\t\t\t$sql = \"SELECT type,SUM(left_qty)as equipment_available FROM equipments GROUP BY type HAVING type = 'Ventilator' OR type='Oxygen Cylinder'\";\n\t\t\t\t\t\t\t$result = $conn->query($sql);\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($row['type'] == 'Ventilator' & $row['equipment_available'] < 1){\n\t\t\t\t\t\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\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\telse if($row['type'] == 'Oxygen Cylinder' & $row['equipment_available'] < 1){\n\t\t\t\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'no'\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\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'Yes'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t\t'room_availability' => 'No'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$conn->close();\n\t}", "title": "" }, { "docid": "0010f9aa410a812327036ff246792d1e", "score": "0.5598351", "text": "public function rooms()\n {\n $sql = 'SELECT r.id,\n r.name_room,\n r.max_capacity_chairs,\n r.current_chairs,\n r.defective_chairs,\n d.day,\n s.start,\n s.end\n FROM availability AS a, room AS r, day AS d, schedule AS s\n WHERE a.id_room = r.id and a.id_day = d.id and a.id_schedule = s.id'; \n #$stmt = $this->db->prepare($sql);\n $rooms = $this->db->query($sql)->fetchAll(PDO::FETCH_CLASS, 'Room');\n return $rooms;\n }", "title": "" }, { "docid": "83dee6d627ac841843b83c7fe8b66365", "score": "0.5576599", "text": "public function fetchTrailerTypes() {\n\t\t$this->db->select('abbrevation,name');\n\t\treturn $this->db->get('equipment_types')->result_array();\n }", "title": "" }, { "docid": "1e4bfcec86f6cc1e844d73a28ec49cfa", "score": "0.5573541", "text": "function show_records($tablename,$sortfield,$mode,$start=0,$limit=1000,$sqry='') {\n\t$data = array();\n\t\n $record_rs = mysql_query(\"SELECT * FROM \".$tablename.\" \".$sqry.\" ORDER BY \".$sortfield.\" \".$mode.\" limit \".$start.\",\".$limit ) or die(mysql_error()); \n while($recordlist = mysql_fetch_object($record_rs))\n\t{\n\t\t$data[]=$recordlist;\n\t}\n\treturn $data;\n\t\n}", "title": "" }, { "docid": "e0d6e2afe4bbd8c2b5ecf4368c7b2557", "score": "0.5562598", "text": "public function listings_types()\n {\n $this->checkPermission();\n\n $data = self::$data;\n $data = html_escape($this->security->xss_clean($data));\n $this->load->view('admin/any-listings', $data);\n return;\n }", "title": "" }, { "docid": "17335204354734218e72e2b27e8e4ea5", "score": "0.5554676", "text": "protected function getListQuery()\n\t{\n\t\t// Initialise variables\n\t\t$db = $this->db;\n\t\t$query = $db->getQuery(true);\n\t\t$type = $this->getState('filter.type');\n\n\t\t$query->select(\n\t\t\t'DISTINCT a.'.$type\n\t\t);\n\t\t$query->from('#__games AS a');\n\t\t$query->where('a.'.$type.' LIKE '.$this->db->quote($this->getState('filter.q').'%'));\n\n\t\t// echo nl2br(str_replace('#__','jos_',$query));\n\t\treturn $query;\n\n\n\t}", "title": "" }, { "docid": "58bae828b55078d75f78821edd6906cf", "score": "0.5550883", "text": "function list_postings( $type ){}", "title": "" }, { "docid": "4fc94f6d3cf5f6327b7ec5a5315e69cf", "score": "0.5549756", "text": "public function getCondition(){\n \n $listeCritere = array();\n \n // Champ ID\n if(!is_null($this->id)){\n if(is_array($this->id)){\n if(sizeof($this->id)>0){\n \n $clauseType = \"typ_int_id IN (\";\n \n for ($i = 0; $i < sizeof($this->id); $i++) {\n $clauseType .= $this->id[$i];\n if($i!=sizeof($this->id)-1){\n $clauseType .=\",\";\n }\n }\n $clauseType .= \")\";\n array_push($listeCritere, $clauseType); \n } \n } \n }\n \n \n \n // CHAMP DES MOTS CLES\n if(!is_null($this->motscles)){ \n if(\"\"!=$this->motscles){\n //$keywords = $this->RetraiteMotsCles;\n $tabWors = explode(\" \", $this->motscles);\n $clauseKeyWords = \"\";\n $nbWords = count($tabWors);\n\n if($nbWords>1){\n // Mot clé sur le Nom du lieu\n $clauseKeyWords .=\"(\";\n for ($i = 0; $i < $nbWords; $i++) {\n $clauseKeyWords .= \"(typ_var_nom like '%\".$tabWors[$i].\"%')\";\n if($i<$nbWords-1){\n $clauseKeyWords .= \" AND \";\n }\n }\n $clauseKeyWords .=\") OR (\";\n\n // Mot clé sur la description\n for ($i = 0; $i < $nbWords; $i++) {\n $clauseKeyWords .= \"(typ_var_nom like '%\".$tabWors[$i].\"%')\";\n if($i<$nbWords-1){\n $clauseKeyWords .= \" AND \";\n }\n }\n $clauseKeyWords .=\")\";\n }else{\n $clauseKeyWords = \"((typ_var_nom like '%\".$tabWors[0].\"%') OR (typ_var_nom LIKE '%\".$tabWors[0].\"%'))\";\n }\n\n array_push($listeCritere, $clauseKeyWords);\n }\n }\n \n \n \n \n \n // Construction de la clause\n if(sizeof($listeCritere)>0){\n $this->condition = \" AND (\";\n $i=0;\n foreach ($listeCritere as $value) {\n\t\t$this->condition .= $value;\n if($i< sizeof($listeCritere)-1){\n $this->condition .= \" AND \";\n }\n $i++;\n }\n $this->condition .= \" )\"; \n\t}\n \n // AJOUT DU ORDER\n if(!is_null($this->order)){\n if(\"\"!=$this->order){\n $order = $this->order;\n $this->condition .=\" ORDER BY \".$order[0].\" \".$order[1];\n }\n }\n \n \n \n // AJOUT DU LIMIT\n if(!is_null($this->limit)){\n if(is_array($this->limit)){\n $limits = $this->limit;\n $this->condition .= \" LIMIT \".$limits[0].\",\".$limits[1];\n }\n \n }\n \n return $this->condition;\n }", "title": "" }, { "docid": "b465a966158ca64d46185b99963344a1", "score": "0.55492556", "text": "function count_room($arr) {\r\n $whereCond = \"\";\r\n if (!empty($arr)) {\r\n if (!empty($arr['search_by_room'])) {\r\n $whereCond .= \" and upper(mst_category_desc) like upper('%\" . $arr['search_by_room'] . \"%')\";\r\n }\r\n if (!empty($arr['search_by_floor'])) {\r\n $whereCond .= \" and upper(mst_floor_desc) = upper('\" . $arr['search_by_floor'] . \"')\";\r\n }\r\n if (!empty($arr['search_by_type'])) {\r\n $whereCond .= \" and a.mst_type_id = '\" . $arr['search_by_type'] . \"' \";\r\n }\r\n }\r\n\r\n $sql = \"\r\n\t\t\tselect COUNT (*) cnt from ( \r\n\t\t\t\r\n\t\t\tselect mst_type_id, mst_type_desc, mst_category_id, mst_category_desc, \r\n\t\t\tmst_floor_id, mst_floor_desc, mst_category_status, rownum recnum from ( \r\n\r\n\t\t\tselect a.mst_type_id, a.mst_type_desc, b.mst_category_id, b.mst_category_desc, \r\n\t\t\tc.mst_floor_id, c.mst_floor_desc, b.mst_category_status \r\n\t\t\tfrom fm_mst_type a, fm_mst_category b, fm_mst_floor c \r\n\t\t\twhere a.mst_type_id = b.mst_type_id and \r\n\t\t\t\t a.mst_type_id = c.mst_type_id and \r\n\t\t\t\t b.mst_floor_id = c.mst_floor_id and \r\n\t\t\t\t a.mst_type_status = 'Y' and \r\n\t\t\t\t c.mst_floor_status = 'Y' $whereCond\r\n\t\t\torder by a.mst_type_desc asc, b.mst_category_desc asc, c.mst_floor_desc asc )) \t\t\t\r\n\t\t\";\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n $result = $this->db->query($sql)->row();\r\n return $result->CNT;\r\n }", "title": "" }, { "docid": "8926e5bcae6a3067cd4f790675a996c8", "score": "0.55440724", "text": "function getAllCHO_Limit()\n\t{\n\t $str_query = \"SELECT NURSE_ID, LASTNAME, FIRSTNAME, CHUSERNAME, COMMUNITYID FROM community_health_officer GROUP BY NURSE_ID\";\n\t $exec=$this->init_query($str_query);\n\t if(!$exec)\n\t {\n\t\t\treturn false;\n\t }\n\t return true;\n\t}", "title": "" }, { "docid": "76f72d82ffc247cd6eaf20e56f130bc4", "score": "0.55433655", "text": "protected function getListQuery()\n\t{\n\n\t\t$params = $this->getState('params');\n\t\t$type = $params->get('type', 0);\n\n\n\t\t$app = JFactory::getApplication();\n\t\t// Initialise variables.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Select the required fields from the table.\n\t\t$query->select($this->getState('list.select', 'a.*, count(b.id) AS how')\n//\t\t\t\t'a.id AS id, a.title AS title, a.alias AS alias, a.users_id, '.\n//\t\t\t\t'a.published AS published, a.categories_id AS categories_id, '.\n//\t\t\t\t'a.date_publish AS date_publish, a.date_publish_down AS date_publish_down'\n//\t\t\t\t'a.checked_out AS checked_out,'.\n//\t\t\t\t'a.checked_out_time AS checked_out_time, a.catid AS catid,' .\n//\t\t\t\t'a.clicks AS clicks, a.metakey AS metakey, a.sticky AS sticky,'.\n//\t\t\t\t'a.impmade AS impmade, a.imptotal AS imptotal,' .\n//\t\t\t\t'a.state AS state, a.ordering AS ordering,'.\n//\t\t\t\t'a.purchase_type as purchase_type,'.\n//\t\t\t\t'a.language, a.publish_up, a.publish_down'\n\t\t);\n\t\t$query->from($db->quoteName('#__cddir_categories') . ' AS a');\n\n\t\t$query->where('a.extension = \\'com_jomdirectory.jomdirectory\\'');\n\t\t$query->join('LEFT', '#__cddir_categories AS c ON (c.lft>=a.lft AND c.rgt<=a.rgt)');\n\t\tif ($type == 0) {\n\t\t\t$query->join('LEFT', '#__cddir_products AS b ON (b.categories_id=c.id AND b.published=1)');\n\t\t} else {\n\t\t\t$query->join('LEFT', '#__cddir_content AS b ON (b.categories_id=c.id AND b.published=1)');\n\t\t}\n\n\n\t\t$categoryId = $params->get('categories_id', false);\n\t\tif (is_numeric($categoryId) && $categoryId != 0) {\n\t\t\t$cat_tbl = JTable::getInstance('Category', 'JomcomdevTable');\n\t\t\t$cat_tbl->load($categoryId);\n\t\t\t$rgt = $cat_tbl->rgt;\n\t\t\t$lft = $cat_tbl->lft;\n\t\t\t$baselevel = (int)$cat_tbl->level;\n\t\t\t$query->where('a.lft >= ' . (int)$lft);\n\t\t\t$query->where('a.rgt <= ' . (int)$rgt);\n\t\t\t$query->where('a.id != ' . (int)$categoryId);\n\t\t}\n\n\n\t\t$query->where('a.published = 1');\n\n\n\t\t// Filter by search in title\n\t\t$search = $this->getState('filter.search');\n\t\tif (!empty($search)) {\n\t\t\tif (stripos($search, 'id:') === 0) {\n\t\t\t\t$query->where('a.id = ' . (int)substr($search, 3));\n\t\t\t} else {\n\t\t\t\t$search = $db->Quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t$query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')');\n\t\t\t}\n\t\t}\n\n\t\t// Filter on the language.\n//\t\tif ($language = $this->getState('filter.language')) {\n//\t\t\t$query->where('a.language = ' . $db->quote($language));\n//\t\t}\n// $letter = $this->getUserStateFromRequest($this->context.'.filter.letter', 'letter', false, 'string');\n\t\t$letter = $app->input->getString('letter', false);\n\t\tif ($letter && $letter != 'all') {\n\t\t\t$query->where('LOWER(SUBSTRING(a.title, 1 ,1)) LIKE \\'' . $db->escape($letter) . '\\'');\n\t\t}\n\n\n\t\t$query->where('a.language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')');\n\t\t// Add the list ordering clause.\n//\t\t$orderCol\t= $this->state->get('list.ordering', 'a.id');\n//\t\t$orderDirn\t= $this->state->get('list.direction', 'ASC');\n//\n\t\t$query->group('a.id');\n\t\t$query->order($db->escape('a.lft ASC'));\n\n//\t\techo nl2br(str_replace('#__','e1skn_',$query));\n// exit;\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "427858abc0de9074080f8eb401c45677", "score": "0.55320483", "text": "function get_DevTypeArea_list($BeginDate,$EndDate){\r\n\t\t$query=\"SELECT * FROM IDP_M_DevelopmentAreaType1 WHERE BeginDate<='$BeginDate' AND EndDate>='$EndDate'\";\r\n\t\treturn $this->pms->query($query)->result();\r\n\t}", "title": "" }, { "docid": "69082b277500c02e44a8674eab261aa3", "score": "0.5527118", "text": "function getAllRooms($uid) {\n\t\t$res = $GLOBALS ['TYPO3_DB']->exec_SELECTquery ( 'tx_chtrip_hotel.*', 'tx_chtrip_hotel', 'tx_chtrip_hotel.uid=' . intval ( $uid ) . ' ORDER BY tx_chtrip_hotel.uid ASC' );\n\t\t$row = $GLOBALS ['TYPO3_DB']->sql_fetch_assoc ( $res );\n\t\t$res = $GLOBALS ['TYPO3_DB']->exec_SELECTquery ( '*', 'tx_chtrip_room', 'tx_chtrip_room.uid IN (' . $row ['room'] . ') ORDER BY tx_chtrip_room.uid ASC' );\n\t\twhile ( $row = $GLOBALS ['TYPO3_DB']->sql_fetch_assoc ( $res ) ) {\n\t\t\t$arr [] = $row;\n\t\t}\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "ac5998eafc374369e997cbee33655a7d", "score": "0.55254793", "text": "function get_partenaires($type) {\n\n\t\t$bdd = connection();\n\n\t\t$partenaires = $bdd -> query (\n\t\t\t'SELECT lien, Logo, Type\n\t\t\tFROM partenaires\n\t\t\tWHERE Type = \"'.$type.'\"\n\t\t\t');\n\n\t\twhile ($partenaire = $partenaires -> fetch()){\n\t\t\t$return[] = $partenaire;\n\t\t}\n\n\t\t$partenaires -> closeCursor();\n\n\t\tif (!empty($return)) {\n\n\t\t\techo '<h3>'.$type.'</h3>';\n\n\t\t\treturn $return;\n\n\t\t}else{\n\t\t\treturn \"Nous n'avons pas de partenaires pour le moment\";\n\t\t}\n\t}", "title": "" }, { "docid": "aa7ac1c5344347ca061fde5ef662f068", "score": "0.552095", "text": "public function get_All_Combo_travel_type()\n {\n// $res = $GLOBALS['db']->getAll($sql);\n// echo \"<pre>\";\n// print_r($res);die;\n// foreach($res as $k=>$v){\n// $res[$k]['combo_travels'] = explode('|',$v['combo_travels']);\n// foreach($res[$k]['combo_travels'] as $key=>$val){\n// $res[$k]['combo_travels']['combo_name'] = $res[$k]['combo_name'];\n// $res[$k]['combo_travels'][]\n// }\n// }\n /*\n $sql = \"SELECT COUNT(*) FROM \" . $GLOBALS['ecs']->table('combo_travel_type');\n $filter['record_count'] = $GLOBALS['db']->getOne($sql);\n $filter = page_and_size($filter);\n $sql = \"SELECT * FROM \" . $GLOBALS['ecs']->table('combo_travel_type'). \" LIMIT \" . $filter['start'] . \",$filter[page_size]\";\n $row = $this->db->getAll($sql);\n foreach($row as &$val){\n $val['combo_travel_date'] = date(\"m月d日\",$val['combo_travel_date']);\n }\n return array('combo_travel_list' => $row, 'filter' => $filter, 'page_count' => $filter['page_count'], 'record_count' => $filter['record_count']);\n */\n $sql = \"SELECT * FROM \" . $GLOBALS['ecs']->table('combo_travel_type');\n $row = $this->db->getAll($sql);\n// echo \"<pre>\";\n// print_r($row);die;\n// foreach($row as &$val){\n// @$val['combo_travel_date'] = date(\"m月d日\",$val['combo_travel_date']);\n// }\n return array('combo_travel_type_list' => $row);\n }", "title": "" }, { "docid": "befbb264c1682298e51e1f0218b96f60", "score": "0.5507186", "text": "public function SubjectsByRoom($first,$second,$filter){\n\t\tinclude 'connect.php';\n\t\t$json =\"\";\n\t\tswitch ($filter) {\n\t\t\tcase 'date':\n\t\t\t\t$req = $bdd->prepare(\"SELECT * FROM subject s JOIN user u ON u.UID=s.User WHERE s.Room=:Room ORDER BY s.SID DESC LIMIT \".$first.\" , \".$second);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'views':\n\t\t\t\t$req = $bdd->prepare(\"SELECT * FROM subject s JOIN user u ON u.UID=s.User WHERE s.Room=:Room ORDER BY s.View DESC LIMIT \".$first.\" , \".$second);\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'likes':\n\t\t\t\t$req = $bdd->prepare(\"SELECT * FROM subject s JOIN user u ON u.UID=s.User WHERE s.Room=:Room ORDER BY s.Likes DESC LIMIT \".$first.\" , \".$second);\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'pending':\n\t\t\t\t$req = $bdd->prepare(\"SELECT * FROM subject s JOIN user u ON u.UID=s.User WHERE s.Room=:Room AND s.State='pending' ORDER BY s.SID DESC LIMIT \".$first.\" , \".$second);\t\n\t\t\t\tbreak;\t\n\n\t\t\tcase 'closed':\n\t\t\t\t$req = $bdd->prepare(\"SELECT * FROM subject s JOIN user u ON u.UID=s.User WHERE s.Room=:Room AND s.State='closed' ORDER BY s.SID DESC LIMIT \".$first.\" , \".$second);\t\n\t\t\t\tbreak;\t\n\n\t\t}\n\n\t\t\n\t\t$req->execute(array(\n\t\t\t\"Room\"=>$this->getRoom()\n\t\t));\n\n\n\n\t\tif ($req->rowCount()==0) {\t\t\t\n\t\t\treturn \"empty\";\n\t\t}else{\n\t\t\t$json = array();\n\t\t\twhile ($data = $req->fetch()) {\n\t\t\t\tarray_push($json,\n\t\t\t\t\t\t\t array( \"SID\"=>$data['SID'],\n\t\t\t\t\t\t\t \t\t\"Room\"=>$data['Room'],\n\t\t\t\t\t\t\t \t\t\"Title\"=>$data['Title'],\n\t\t\t\t\t\t\t \t\t\"Text\"=>smiley($data['Text']),\n\t\t\t\t\t\t\t \t\t\"Likes\"=>$data['Likes'],\n\t\t\t\t\t\t\t \t\t\"Comments\"=>$data['Comments'],\n\t\t\t\t\t\t\t \t\t\"State\"=>$data['State'],\n\t\t\t\t\t\t\t \t\t\"Date\"=>$data['Date'],\n\t\t\t\t\t\t\t \t\t\"UID\"=>$data['UID'],\n\t\t\t\t\t\t\t \t\t\"FullName\"=>$data['FullName'],\n\t\t\t\t\t\t\t \t\t\"Avatar\"=>$data['Avatar'],\n\t\t\t\t\t\t\t \t\t\"View\"=>$data[\"View\"],\n\t\t\t \t\t\t\t\t\t\"BestComment\"=>$data[\"BestComment\"]\n\t\t\t\t\t\t\t )\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn json_encode($json);\n\t\t}\n\t}", "title": "" }, { "docid": "3f540d1f0eb3aba71101c844c01d9563", "score": "0.5502011", "text": "private function getrooms(){\t\n\t\t\t\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\n\t\t\t$rooms = mysql_query(\"SELECT id, name, description, img_url FROM rooms\", $this->db);\n\t\t\t\n\t\t\t\n\t\t\t\tif(mysql_num_rows($rooms) > 0){\n\t\t\t\t\t$result = array();\n\t\t\t\t\twhile($rlt = mysql_fetch_array($rooms,MYSQL_ASSOC)){\n\t\t\t\t\t\t$result[] = $rlt;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn $result;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "title": "" }, { "docid": "61de127642975e447875dfc2d021b27d", "score": "0.54993576", "text": "function Types()\r\n {\r\n $sql = 'SELECT rt_id AS RT_ID, rt_name AS RT_NAME '\r\n . 'FROM report_type ';\r\n\r\n return $this->dbh->query_all($sql);\r\n }", "title": "" }, { "docid": "ebd24017a798a0692a193f224ca4ad0b", "score": "0.54988945", "text": "public function selectList($limit_from, $rows_per_page, $select_status=null, $order_by=null, $order_direction='ASC', $select_type=null)\n {\n try {\n $SQL = \"SELECT * FROM `\".self::$table_name.\"`\";\n if ((is_array($select_status) && !empty($select_status)) || (is_array($select_type) && !empty($select_type))) {\n $SQL .= \" WHERE (\";\n $use_status = false;\n if (is_array($select_status) && !empty($select_status)) {\n $use_status = true;\n $SQL .= '(';\n $start = true;\n foreach ($select_status as $stat) {\n if (!$start) {\n $SQL .= \" OR \";\n }\n else {\n $start = false;\n }\n $SQL .= \"`contact_status`='$stat'\";\n }\n $SQL .= ')';\n }\n if (is_array($select_type) && !empty($select_type)) {\n if ($use_status) {\n $SQL .= ' AND ';\n }\n $SQL .= '(';\n $start = true;\n foreach ($select_type as $typ) {\n if (!$start) {\n $SQL .= \" OR \";\n }\n else {\n $start = false;\n }\n $SQL .= \"`contact_type`='$typ'\";\n }\n $SQL .= ')';\n }\n $SQL .= \")\";\n }\n if (is_array($order_by) && !empty($order_by)) {\n $SQL .= \" ORDER BY \";\n $start = true;\n foreach ($order_by as $by) {\n if (!$start) {\n $SQL .= \", \";\n }\n else {\n $start = false;\n }\n $SQL .= \"`$by`\";\n }\n $SQL .= \" $order_direction\";\n }\n $SQL .= \" LIMIT $limit_from, $rows_per_page\";\n $results = $this->app['db']->fetchAll($SQL);\n $overviews = array();\n foreach ($results as $result) {\n $overview = array();\n foreach ($result as $key => $value) {\n $overview[$key] = is_string($value) ? $this->app['utils']->unsanitizeText($value) : $value;\n }\n $overviews[] = $overview;\n }\n return (!empty($overviews)) ? $overviews : false;\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "title": "" }, { "docid": "ae3ea091e01edc95f5d23d40acafda04", "score": "0.54909575", "text": "public function getEmployeeTeachingList($conditions='') {\n\n global $sessionHandler;\n $query = \"SELECT count(*) as totalCount\n FROM\n `employee`\n WHERE\n instituteId = \".$sessionHandler->getSessionVariable('InstituteId');\n if($conditions)\n $query .=\" $conditions\";\n\n //$query .=\" GROUP BY roleName\";\n\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "4be06aaa437cda09da0c8a95906fa6d1", "score": "0.5489745", "text": "public function getTypes(){\n\n $query = \"SELECT DISTINCT type FROM tours\";\n $pdostmt = $this->db->prepare($query);\n $pdostmt->execute();\n $types = $pdostmt->fetchAll(PDO::FETCH_OBJ);\n return $types;\n\n }", "title": "" }, { "docid": "d3846a25574dec32850545e03ce7ac44", "score": "0.5483071", "text": "function selectAllRooms(){\n\t\t$data = array();\n\t\tif($stmt = $this->conn->prepare(\"select roomNumber, roomName from ROOM;\")){\n\t\t\t$stmt->execute();\n\t\t\t$data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\treturn $data;\n\t\n\t}", "title": "" }, { "docid": "bb5d8c3d06f49e08995fc29f98a00eeb", "score": "0.5480761", "text": "private function accommodation_room_type(){\n\t\t$type_name = self::get_accommodation_data('type');\n\t\t$type_slug = self::get_accommodation_data('slug');\n\t\t$taxonomy_name = self::get_accommodation_room_type_data('type');\n\t\t$taxonomy_slug = self::get_accommodation_room_type_data('slug');\n\t\t$labels\t = array(\n\t\t\t'name'\t\t\t\t\t\t => _x( 'Accommodation Room Type', 'taxonomy general name', $this->text_domain_name ),\n\t\t\t'singular_name'\t\t\t\t => _x( 'Accommodation Room Type', 'taxonomy singular name', $this->text_domain_name ),\n\t\t\t'search_items'\t\t\t\t => __( 'Search Accommodation Room Type', $this->text_domain_name ),\n\t\t\t'popular_items'\t\t\t\t => __( 'Popular Accommodation Room Type', $this->text_domain_name ),\n\t\t\t'all_items'\t\t\t\t\t => __( 'All Accommodation Room Type', $this->text_domain_name ),\n\t\t\t'parent_item'\t\t\t\t => null,\n\t\t\t'parent_item_colon'\t\t\t => null,\n\t\t\t'edit_item'\t\t\t\t\t => __( 'Edit Accommodation Room Type', $this->text_domain_name ),\n\t\t\t'update_item'\t\t\t\t => __( 'Update Accommodation Room Type', $this->text_domain_name ),\n\t\t\t'add_new_item'\t\t\t\t => __( 'Add New Room Type', $this->text_domain_name ),\n\t\t\t'new_item_name'\t\t\t\t => __( 'New Room Type', $this->text_domain_name ),\n\t\t\t'separate_items_with_commas' => __( 'Separate Room Type with commas', $this->text_domain_name ),\n\t\t\t'add_or_remove_items'\t\t => __( 'Add or remove Room Type', $this->text_domain_name ),\n\t\t\t'choose_from_most_used'\t\t => __( 'Choose from the most used Room Type', $this->text_domain_name ),\n\t\t\t'not_found'\t\t\t\t\t => __( 'No Room Type found.', $this->text_domain_name ),\n\t\t\t'menu_name'\t\t\t\t\t => __( 'Room Type', $this->text_domain_name ),\n\t\t);\n\t\t$args\t = array(\n\t\t\t\"labels\"\t\t\t => $labels,\n\t\t\t'public'\t\t\t => false,\n\t\t\t'hierarchical'\t\t => true,\n\t\t\t'show_ui'\t\t\t => true,\n\t\t\t'show_in_nav_menus'\t => true,\n\t\t\t'show_admin_column'\t => true,\n\t\t\t'args'\t\t\t\t => array('orderby' => 'term_order'),\n\t\t\t'query_var'\t\t\t => true,\n\t\t\t'rewrite'\t\t\t => false,\n\t\t\t'meta_box_cb'\t\t => false,\n\t\t);\n\t\tregister_taxonomy( $taxonomy_name, $type_name, $args );\n\t}", "title": "" }, { "docid": "7ac75121da23782e999c8b6e96c8e5b9", "score": "0.5466995", "text": "function getFloor()\r\n\t{\r\n\t\t/*\r\n\t\t$sql = \"SELECT\r\n\t\t\tdistinct mst_flo.MST_FLOOR_DESC\r\n\t\t\tFROM fm_mst_category mst_cat\r\n\t\t\tINNER JOIN fm_mst_floor mst_flo ON mst_flo.MST_FLOOR_ID = mst_cat.MST_FLOOR_ID AND mst_flo.MST_TYPE_ID = mst_cat.MST_TYPE_ID\r\n\t\t\tWHERE mst_cat.MST_CATEGORY_STATUS = 'Y' ORDER BY mst_flo.MST_FLOOR_DESC ASC\r\n\t\t*/\r\n\t\t$sql = \"select distinct mst_floor_desc \r\n\t\t\tfrom fm_mst_floor \r\n\t\t\twhere mst_floor_status='Y' \r\n\t\t\torder by mst_floor_desc asc \r\n\t\t\";\t\t\r\n\t\t$result = $this->db->query($sql);\r\n\t\t$Udata = $result->result_array('MST_FLOOR_DESC');\r\n\t\t$Rdata = $result->num_rows();\r\n\t\tif ($Rdata > 0)\r\n\t\t{\r\n\t\t\treturn $Udata;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3a41c94b35add9e6d37951bafcb786e9", "score": "0.5455405", "text": "function report_mistake_get_list($conditions = array()) {\n $query = db_select('report_mistake', 'rm');\n $query->fields('rm');\n if (isset($conditions)) {\n foreach ($conditions as $condition) {\n $query->condition($condition[0], $condition[1], $condition[2]);\n }\n }\n $query->orderBy('created', 'DESC');\n $result = $query->execute()->fetchAll();\n return $result;\n}", "title": "" }, { "docid": "6c03e874f3ac46b9662bbc9cd2b1f482", "score": "0.54504675", "text": "public static function getAllRooms()\n {\n global $QS;\n\n foreach($QS->query(\"SELECT * FROM \" . self::$table . \" as R LEFT JOIN mrbs_location as L ON (R.id = L.ref_id AND L.type_loc = 'RO')\") as $row) {\n $result[] = $row;\n }\n\n return $result;\n }", "title": "" }, { "docid": "531f83f803725856ff6d5119bb22466b", "score": "0.54437685", "text": "public function getItemList($conditions='', $limit = '', $orderBy=' itemCode') {\n \n $query = \"\tSELECT \n\t\t\t\t\t\t\t\tim.*,\n\t\t\t\t\t\t\t\tic.categoryName,\n\t\t\t\t\t\t\t\tic.categoryCode\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\titems_master im,\n\t\t\t\t\t\t\t\titem_category ic\n\t\t\t\t\t\tWHERE\tim.itemCategoryId = ic.itemCategoryId\n\t\t\t\t\t\t\t\t$conditions \n\t\t\t\t\t\t\t\tORDER BY $orderBy \n\t\t\t\t\t\t\t\t$limit\";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "ae421a3fdaff4de026b67562564b7b6d", "score": "0.5440495", "text": "function getAllRoomTypeEachPassenger($rt_id)\n {\n $data = $this->db\n ->join('hotel', 'hotel.ht_id = hotel_detail.dhht_id')\n ->join('room_types', 'room_types.rt_id = hotel_detail.dhrt_id')\n ->where('dhrt_id', $rt_id)\n ->get(\"hotel_detail\");\n return $data;\n }", "title": "" }, { "docid": "6e31737c40004810391251a99c5f6397", "score": "0.54335755", "text": "public function getRooms($data){\n\t\t\t$db = new \\PDO(\"mysql:hostname=127.0.0.1;port=8889;dbname=aquilex\", \"root\", \"root\");\n\t\t\t$sqlst = \"SELECT r.id, r.building_id, r.latitude, r.longitude, r.name, rt.type\n\t\t\t\t\t\tFROM rooms r\n\t\t\t\t\t\tLEFT JOIN room_types rt on (r.room_type_id = rt.id)\n\t\t\t\t\t\tWHERE building_id = :building_id\";\n\t\t\t$st = $db->prepare($sqlst);\n\t\t\t$results = $st->execute(array(\":building_id\"=>$data['building_id']));\n\t\t\t$resultData = $st->fetchAll(); //get all responses\n\t\t\tif($st->rowCount() > 0){ //if the record exists than \n\t\t\t\t//there is a record\n\t\t\t\treturn $resultData;\n\t\t\t}else{\n\t\t\t\treturn 'no record';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a3640382f48a2ae3b9d312ae59630f83", "score": "0.5432031", "text": "public static function getRooms()\n {\n return Room::where('fk_company','=', \\Auth::user()->fk_company)->get();\n }", "title": "" }, { "docid": "1099588a966ad074e69bc19f09ea2202", "score": "0.54269695", "text": "function Units_GetByType($vType, $vAllInfo = false)\n{\n\tif ($vAllInfo)\n\t{\n\t\t$vSQL = 'select * from units where name in (select name from units where field=\"type\" and content=\"' . $vType . '\")';\n\t}\n\telse\n\t{\n\t\t$vSQL = \"select * from units where field in ('name','type','code','buyable','class','iconurl','market','cash','cost','subtype','growTime','coinYield','action','limitedEnd','requiredLevel','crop','sizeX','sizeY','plantXp','masterymax','license','realname','desc') and name in (select name from units where field='type' and content='\" . $vType . \"')\";\n\t}\n\t$vResult = @$_SESSION['vDataDB']->query($vSQL);\n\twhile ($vRow = @$vResult->fetchArray(SQLITE3_ASSOC))\n\t{\n\t\t$vReturn[$vRow['name']][$vRow['field']] = $vRow['content'];\n\t}\n\treturn($vReturn);\n}", "title": "" }, { "docid": "138e5a69d1397932d6b3662d96069d5c", "score": "0.5423339", "text": "public function getShortEmployeeList($conditions='', $limit = '', $orderBy=' emp.employeeName') {\n global $sessionHandler;\n\n $instituteId = $sessionHandler->getSessionVariable('InstituteId');\n\n $query = \"SELECT\n DISTINCT (emp.employeeId),\n\t\t\t\t\t\t emp.userId,\n\t\t\t\t\t\t CONCAT(emp.employeeName,' ',emp.middleName,' ',emp.lastName) AS employeeName,\n\t\t\t\t\t\t emp.employeeCode,\n\t\t\t\t\t\t emp.employeeAbbreviation,\n IF(emp.isTeaching=1, 'Yes', 'No') as isTeaching,\n\t\t\t\t\t\t desg.designationName,\n\t\t\t\t\t\t emp.gender,\n IF(br.branchCode=\\\" \\\",'---', br.branchCode) as branchCode,\n IF(emp.contactNumber=\\\" \\\",'---',emp.contactNumber) as contactNumber,\n IF(emp.emailAddress=\\\" \\\", '---', emp.emailAddress) as emailAddress,\n\t\t\t\t\t\t IF(emp.mobileNumber=\\\" \\\",'---',emp.mobileNumber) as mobileNumber,\n\t\t\t\t\t\t emp.address1,\n\t\t\t\t\t\t emp.address2,\n\t\t\t\t\t\t emp.departmentId,\n IF(emp.guestFaculty=1, 'Yes', 'No') as guestFaculty,\n IFNULL(d.abbr,'\".NOT_APPLICABLE_STRING.\"') AS departmentAbbr,\n (SELECT\n GROUP_CONCAT(DISTINCT ii.instituteCode)\n FROM\n employee_can_teach_in et, institute ii\n WHERE\n et.instituteId = ii.instituteId AND et.employeeId=emp.employeeId) AS teachingInstitutes,\n us.userName, r.roleName\n FROM\n designation desg, branch br, employee emp\n LEFT JOIN employee_can_teach_in ect ON (emp.employeeId = ect.employeeId)\n\t\t\t\t\t\t LEFT JOIN user us ON (emp.userId = us.userId)\n\t\t\t\t\t\t LEFT JOIN role r ON (us.roleId = r.roleId)\n LEFT JOIN department d ON d.departmentId=emp.departmentId\n WHERE\n\t\t\t\t\t\t\temp.designationId = desg.designationId\n\t\t\t\t\t\t\tAND\temp.branchId=br.branchId\n\t\t\t\t\t\t\tAND emp.instituteId= $instituteId\n\t\t\t\t\t\t\t$conditions\n ORDER BY\n $orderBy $limit \";\n\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "911aaaff2bf9091677aaff358c3fb338", "score": "0.5414607", "text": "private function getFilteredQueryConditions($params)\n{\n\t$conditions = array();\n\t$lease_range_OR = array();\n\tif ($params['fall'] == \"true\")\n\t\tarray_push($lease_range_OR, 'fall');\n\tif ($params['spring'] == \"true\")\n\t\tarray_push($lease_range_OR, 'spring');\n\tif ($params['other'] == \"true\")\n\t\tarray_push($lease_range_OR, 'other');\n\n\t$unit_type_OR = array();\n\tif ($params['house'] == \"true\")\n\t\tarray_push($unit_type_OR, 'house');\n\tif ($params['apt'] == \"true\")\n\t\tarray_push($unit_type_OR, 'apt');\n\tif ($params['duplex'] == \"true\")\n\t\tarray_push($unit_type_OR, 'duplex');\n\tarray_push($unit_type_OR, 'greek');\n\tarray_push($unit_type_OR, 'dorm');\n\n\n\tif (count($lease_range_OR) > 0)\n\t{\n\t\tarray_push($conditions, array('OR' => array(\n\t\t\t'Listing.lease_range' => $lease_range_OR)));\n\t}\t\n\telse\n\t\tarray_push($conditions, array('OR' => array(\n\t\t\t'Listing.lease_range' => 'NONE')));\n\t\t\t// Without this, all lease ranges would be returned when all check boxes are unchecked\n\n\tarray_push($conditions, array('OR' => array(\n\t\t'Listing.unit_type' => $unit_type_OR)));\n\n\tarray_push($conditions, array(\n\t\t'Listing.rent >=' => $params['minRent'],\n\t\t'Listing.rent <=' => $params['maxRent'],\n\t\t'Listing.beds >=' => $params['minBeds'],\n\t\t'Listing.beds <=' => $params['maxBeds']));\n\n\treturn $conditions;\n}", "title": "" }, { "docid": "73cc65aecfb9a2c805ed89ecb951094d", "score": "0.54144746", "text": "function getAllClothingTypes()\n{\n $query=\"select clothing_type_id,Clothing_type_name,clothing_type_gender,createdAt,updatedAt,isActive,clothing_seo_name,clothing_type_title,meta_keywords,meta_description from funkids_clothingtype\";\n $result=mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "8c10059512d01138007b13c84b457247", "score": "0.5408692", "text": "function getMissionSelection1($searchParameters=NULL,$limit=NULL,$missionDetails=NULL)\n\t{\n\t\tif($missionDetails)\n\t\t{\n\t\t\t$hmission_ids=array();\n\t\t\tforeach($missionDetails as $hmission)\n\t\t\t{\n\t\t\t\t$hmission_ids[]=$hmission['mission_id'];\n\t\t\t}\n\t\t\t$hmission_ids=\"'\".implode(\"','\",$hmission_ids).\"'\";\n\t\t\t$condition.=\" AND qm.identifier NOT IN ($hmission_ids)\";\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif($searchParameters['language_source'])\n\t\t\t$condition.=\" AND qm.language_source='\".$searchParameters['language_source'].\"'\";\n\n\t\tif($searchParameters['product']=='redaction' || $searchParameters['product']=='autre')\n\t\t\t$condition.=\" AND qm.product='\".$searchParameters['product'].\"'\";\n\t\telse if($searchParameters['product']=='translation')\n\t\t{\n\t\t\t$condition.=\" AND qm.product='\".$searchParameters['product'].\"'\";\n\t\t\tif($searchParameters['language_dest'])\n\t\t\t$condition.=\" AND qm.language_dest='\".$searchParameters['language_dest'].\"'\";\n\t\t}\n\t\tif($searchParameters['product_type'])\n\t\t\t$condition.=\" AND qm.product_type='\".$searchParameters['product_type'].\"'\";\n\t\t\n\t\tif($searchParameters['mission_id'])\n\t\t\t$condition.=\" AND qm.identifier='\".$searchParameters['mission_id'].\"'\";\n\t\t\n\t\tif($searchParameters['selected_mission'])\n\t\t\t$orderCondition.=\" qm.identifier='\".$searchParameters['selected_mission'].\"' DESC,\";\n\t\t\n\t\tif($searchParameters['client_id'])\n\t\t\t$orderCondition.=\" q.client_id='\".$searchParameters['client_id'].\"' DESC,\";\n\t\t\n\t\t/* if($searchParameters['nb_words'])\n\t\t{\n\t\t\t$words_min=$searchParameters['nb_words']*0.8;\n\t\t\t$words_max=$searchParameters['nb_words']*1.2;\n\n\t\t\t$words_cnd=\"qm.nb_words >= $words_min AND qm.nb_words <= $words_max\";\n\t\t\t$haveQuery.=($haveQuery)? ' AND '.$words_cnd : \" Having $words_cnd\";\t\t\t\n\t\t\t\t\n\t\t} */\n\t\tif($searchParameters['mcurrency'])\n\t\t\t$condition.=\" AND q.sales_suggested_currency='\".$searchParameters['mcurrency'].\"'\";\n\t\t\n\t\tif($limit)\n $limitCondition=\" LIMIT 0,$limit\";\n\n\t\t\t$mission1_Query=\"SELECT qm.*,qm.identifier as mission_id,qm.quote_id,qm.product,qm.language_source,\n\t\t\t\t\t\t\tqm.language_dest,\n\t\t\t\t\t\t qm.nb_words,qm.volume,qm.unit_price,qm.margin_percentage,qm.internal_cost,\n\t\t\t\t\t\t qm.mission_length,qm.mission_length_option,q.signed_at,q.title,\n\t\t\t\t\t\t\tq.sales_suggested_currency as currency,q.client_id,(qm.volume) as published_articles,\n\t\t\t\t\t\t\t'uk' as from_site\n\t\t\t\t\t\tFROM \n\t\t\t\t\t QuoteMissions qm\n\t\t\t\t\t\tJOIN Quotes q ON q.identifier=qm.quote_id\n\t\t\t\t\t WHERE\n\t\t\t\t\t\t\tq.sales_review='signed' AND qm.include_final='yes'\n\t\t\t\t\t\t\t$condition\n\t\t\t\t\t\tGROUP BY mission_id\n\t\t\t\t\t\t$haveQuery\n\t\t\t\t\t\tORDER BY $orderCondition\n\t\t\t\t\t\t\tq.signed_at DESC\t\t\t\t\n\t\t\t\t\t\t$limitCondition\n\t\t\t\t\t\t\t\";\n\t\t//echo $mission1_Query.\"<br>\";exit;\n\n\t\tif(($count=$this->getNbRows($mission1_Query))>0)\n\t\t{\n\t\t\t$missionDetails=$this->getQuery($mission1_Query,true);\n\t\t\treturn $missionDetails;\n\t\t}\n\t\telse\n \treturn NULL;\n\n\t}", "title": "" }, { "docid": "b82ebaf84cb5b6bc412279e4b1ed751e", "score": "0.53845745", "text": "public function get_list() {\n\t\t$this->get_query();\n\n\t\tif($this->input->post('length') != -1){\n\t\t\t$this->db->limit($this->input->post('length'),$this->input->post('start'));\n\t\t\t$query = $this->db->get();\n\t\t}else{\n\t\t\t$query = $this->db->get();\n\t\t}\n\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "dd66e3db92720f72deed4d575e6ed090", "score": "0.53763354", "text": "function getVisibleCriteria($recordid='')\n{\n\tglobal $mod_strings; \n\tglobal $app_strings;\n\tglobal $adb,$current_user;\n\t//print_r(\"i am here\");die;\n\t$filter = array();\n\t$selcriteria = \"\";\n\tif($recordid!='')\n\t{\n\t\t$result = $adb->pquery(\"select sharingtype from vtiger_report where reportid=?\",array($recordid));\n\t\t$selcriteria=$adb->query_result($result,0,\"sharingtype\");\n\t}\n\tif($selcriteria == \"\"){\n\t\t$selcriteria = 'Public';\n\t}\n\t$filter_result = $adb->query(\"select * from vtiger_reportfilters\");\n\t$numrows = $adb->num_rows($filter_result);\n\tfor($j=0;$j<$numrows;$j++)\n\t{\n\t\t$filter_id = $adb->query_result($filter_result,$j,\"filterid\");\n\t\t$filtername = $adb->query_result($filter_result,$j,\"name\");\n\t\t$name=str_replace(' ','__',$filtername);\n\t\tif($filtername == 'Private') {\n\t\t\t$FilterKey='Private';\n\t\t\t$FilterValue=getTranslatedString('PRIVATE_FILTER');\n\t\t}elseif($filtername=='Shared')\n\t\t{\n\t\t\t$FilterKey='Shared';\n\t\t\t$FilterValue=getTranslatedString('SHARE_FILTER');\n\t\t}else{\n\t\t\t$FilterKey='Public';\n\t\t\t$FilterValue=getTranslatedString('PUBLIC_FILTER');\n\t\t}\n\t\tif($FilterKey == $selcriteria)\n\t\t{\n\t\t\t$shtml['value'] = $FilterKey;\n\t\t\t$shtml['text'] = $FilterValue;\n\t\t\t$shtml['selected'] = \"selected\";\n\t\t}else\n\t\t{\n\t\t\t$shtml['value'] = $FilterKey;\n\t\t\t$shtml['text'] = $FilterValue;\n\t\t\t$shtml['selected'] = \"\";\n\t\t}\n\t\t$filter[] = $shtml;\n\t}\t\t\n\treturn $filter;\n}", "title": "" }, { "docid": "a33caabd888c695d8f452a3a987e1182", "score": "0.53761405", "text": "function getPhoneTypes() {\n $query = ORM::forTable(\"phonetype\")->where(\"status\", 1)->find_result_set();\n return $query;\n}", "title": "" }, { "docid": "48ba37316696c48db5f2389295372002", "score": "0.536641", "text": "public function user_list($id,$type)\r\r\n\r\r\n\t{\r\r\n\r\r\n\t\tif($type=='national' || $type=='webadmin')\r\r\n\r\r\n\t\t{\r\r\n\r\r\n\t\t\t$res = $this->db->query(\"SELECT * FROM kr_users WHERE id!='$id' and admin_type!='national' \");\r\r\n\r\r\n\t\t\treturn $res->result_array();\r\r\n\r\r\n\t\t}\r\r\n\r\r\n\t\tif($type=='zone')\r\r\n\r\r\n\t\t{\r\r\n\r\r\n\t\t\t$res = $this->db->query(\"SELECT * FROM kr_users WHERE id!='$id' and admin_type!='national' and admin_type!='$type' and Zonal_admin_id='$id'\");\r\r\n\r\r\n\t\t\treturn $res->result_array();\r\r\n\r\r\n\t\t}\r\r\n\r\r\n\t\tif($type=='state')\r\r\n\r\r\n\t\t{\r\r\n\r\r\n\t\t\t$res = $this->db->query(\"SELECT * FROM kr_users WHERE id!='$id' and admin_type!='national' and admin_type!='$type' and State_admin_id='$id'\");\r\r\n\r\r\n\t\t\treturn $res->result_array();\r\r\n\r\r\n\t\t}\r\r\n\r\r\n\t}", "title": "" }, { "docid": "0040cb99cc967bf567edaf4c98656c85", "score": "0.5364825", "text": "public function _getHotelRooms() {\n }", "title": "" }, { "docid": "42eaf74b927139f40882d8677400652a", "score": "0.5364371", "text": "public function show_list($start=NULL,$limit=NULL)\r\n {\r\n try\r\n {\r\n $this->data['heading']=addslashes(t(\"User Type Master\"));//Package Name[@package] Panel Heading\r\n\r\n //generating search query//\r\n //Getting Posted or session values for search//\r\n $s_search=(isset($_POST[\"h_search\"])?$this->input->post(\"h_search\"):$this->session->userdata(\"h_search\"));\r\n $s_user_type=($this->input->post(\"h_search\")?$this->input->post(\"txt_user_type\"):$this->session->userdata(\"txt_user_type\")); \r\n //end Getting Posted or session values for search//\r\n\t\t\t$user_type_id = decrypt($this->data['admin_loggedin']['user_type_id']); \r\n $arr_search = array(); \r\n $arr_search[] = \" id >= {$user_type_id} AND id>1 \"; // Added to restrict the access of dev type user \r\n if($user_type_id >= 3)\r\n $arr_search[] = \" e_is_deleted = 'No'\";\r\n \r\n if($s_search == \"advanced\")\r\n {\r\n\t\t\t\tif(trim($s_user_type)!=\"\")\r\n \t$arr_search[] =\" s_user_type LIKE '%\".get_formatted_string($s_user_type).\"%' \";\r\n \r\n //Storing search values into session//\r\n $this->session->set_userdata(\"txt_user_type\",$s_user_type);\r\n $this->session->set_userdata(\"h_search\",$s_search);\r\n \r\n $this->data[\"h_search\"] = $s_search;\r\n $this->data[\"txt_user_type\"] = $s_user_type; \r\n //end Storing search values into session// \r\n \r\n }\r\n else//List all records, **not done\r\n {\r\n //Releasing search values from session//\r\n $this->session->unset_userdata(\"txt_user_type\");\r\n $this->session->unset_userdata(\"h_search\");\r\n \r\n $this->data[\"h_search\"]=$s_search;\r\n $this->data[\"txt_user_type\"]=\"\"; \r\n //end Storing search values into session// \r\n }\r\n $s_where = count($arr_search) > 0 ? implode(' AND ', $arr_search):''; \r\n unset($s_search,$s_user_type);\r\n\r\n //Setting Limits, If searched then start from 0//\r\n $start = $this->input->post(\"h_search\") ? 0 : $this->uri->segment($this->i_uri_seg);\r\n //end generating search query//\r\n \r\n $limit\t= $this->i_admin_page_limit;\r\n $info = $this->acs_model->fetch_data($this->tbl, $s_where, '', $start, $limit, 'i_display_order');\r\n\r\n //Creating List view for displaying//\r\n $table_view = array(); \r\n\t\t\t \r\n //Table Headers, with width,alignment//\r\n $table_view[\"caption\"]=addslashes(t(\"User Type\"));\r\n $table_view[\"total_rows\"]=count($info);\r\n\t\t\t$table_view[\"total_db_records\"] = $this->acs_model->count_info($this->tbl, $s_where);\r\n \r\n $table_view[\"headers\"][0][\"width\"]\t= \"25%\";\r\n $table_view[\"headers\"][0][\"align\"]\t= \"left\";\r\n $table_view[\"headers\"][0][\"val\"]\t= addslashes(t(\"User Type\"));\r\n if($this->data['action_allowed']['Access Control'] == 1){\r\n\t\t\t $table_view[\"headers\"][1][\"val\"]\t= addslashes(t(\"Access Control\"));\r\n $table_view[\"headers\"][1][\"align\"] = \"center\"; \r\n }\r\n \r\n if($user_type_id <= 2){\r\n $table_view[\"headers\"][2][\"val\"]= t(\"Deleted\"); \r\n $table_view[\"headers\"][2][\"align\"] = \"center\";\r\n }\r\n //end Table Headers, with width,alignment//\r\n\t\t\t\r\n //Table Data//\r\n for($i=0; $i<$table_view[\"total_rows\"]; $i++)\r\n {\r\n $i_col=0;\r\n $table_view[\"tablerows\"][$i][$i_col++]\t= encrypt($info[$i][\"id\"]);//Index 0 must be the encrypted PK \r\n $table_view[\"tablerows\"][$i][$i_col++]\t=$info[$i][\"s_user_type\"];\r\n \r\n if($this->data['action_allowed']['Access Control'] == 1){ // Check for permission\r\n\t\t\t\t $table_view[\"tablerows\"][$i][$i_col++]\t= '<a class=\"btn btn-xs btn-warning\" href=\"'.admin_base_url().'user_type_master/access_control/'.encrypt($info[$i][\"id\"]).'\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Access Control\"><i class=\"fa fa-gears\"></i></a>';\r\n }\r\n if($user_type_id <=2)\r\n $table_view[\"tablerows\"][$i][$i_col++] = '<span class=\"label label-'.($info[$i][\"e_is_deleted\"] == 'Yes' ? 'danger' : 'success').'\">'.$info[$i][\"e_is_deleted\"].'</span>';\r\n } \r\n //end Table Data//\r\n unset($i,$i_col,$start,$limit); \r\n \r\n $this->data[\"table_view\"]=$this->admin_showin_table($table_view);\r\n //Creating List view for displaying//\r\n $this->data[\"search_action\"]=$this->pathtoclass.$this->router->fetch_method();//used for search form action\r\n $this->render(); \r\n unset($table_view,$info);\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "95cfca5b66e04ce522cefd5e4c8dbfcc", "score": "0.53623354", "text": "function getRoom($floor_name)\r\n\t{\r\n\t\t$sql \t= \" SELECT rbf_id, rbf_room\r\n\t\t\t\t\tFROM fm_room_by_floor\r\n\t\t\t\t\tWHERE rbf_floor = '\".$floor_name.\"' \r\n\t\t\t\t\tORDER BY rbf_room ASC \";\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t$result = $this->db->query($sql);\r\n\t\t$Udata \t= $result->result_Array();\r\n\t\t$Rdata \t= $result->num_rows();\r\n\t\tif ($Rdata > 0)\r\n\t\t{\r\n\t\t\treturn $Udata;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b837c87f839d6a9cc9c8170cd3966330", "score": "0.53554964", "text": "function findAllDevicesByRoom($bdd, $idRoom){\n $sensors = $bdd->prepare('\n select name, state, cardNumber, objectNumber value, dateTime, sensor_type.type from sensor\n inner join\n data on data.id_sensor = sensor.ID\n inner join\n sensor_type on sensor.id_sensorType = sensor_type.ID\n where id_room = :idroom');\n $sensors->bindParam(':idroom', $idRoom);\n\n $effectors = $bdd->prepare('\n select name, action, state, effector_type.type from effector\n inner join\n effector_type on effector_type.ID = effector.id_effectorType\n where id_room = :idroom\n ');\n $effectors->bindParam('idroom',$idRoom);\n $sensors->execute();\n $effectors->execute();\n return array($sensors->fetchAll(), $effectors->fetchAll());\n\n}", "title": "" }, { "docid": "98e70fb8f16f0ce6e28a65a3827bc3af", "score": "0.5348212", "text": "public function getTypesList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "251787fde1dcc76f5064170b03480c68", "score": "0.5347435", "text": "function ambildetailreservasiroom() {\n $query=mysql_query(\"SELECT * FROM detail_reservasi_room ORDER BY id_reservasi\");\n\t while($row=mysql_fetch_array($query))\n\t\t $data[]=$row;\n\t return $data;\n }", "title": "" }, { "docid": "285c4bef7cb594917bc92ac7e59b82db", "score": "0.53453326", "text": "function godown_list() { \n $this->db->select('trv_godown_master.*');\n $this->db->where(array('trv_godown_master.owner_type' => '2','trv_godown_master.user_id' => $this->session->userdata('user_id')));\n $this->db->where('trv_godown_master.status != ',1);\n $this->db->order_by(\"trv_godown_master.id\", \"desc\");\n $this->db->from('trv_godown_master');\n return $this->db->get()->result();\t\n\t}", "title": "" }, { "docid": "7aca350a19bb1bfaeef43a4902afce2a", "score": "0.5344296", "text": "function get_mylist($type = '')\n\n\t{\n\n\t\t$user_id \t\t=\t$this->session->userdata('user_id');\n\n\t\t$active_user \t=\t$this->session->userdata('active_user');\n\n\n\n\t\t// Choosing the list between movie and series\n\n\t\tif ($type == 'movie')\n\n\t\t\t$list_field\t=\t$active_user.'_movielist';\n\n\t\telse if ($type == 'series')\n\n\t\t\t$list_field\t=\t$active_user.'_serieslist';\n\n\t\telse if ($type == 'animes')\n\t\t\n\t\t\t$list_field = \t$active_user.'_animeslist';\n\n\n\n\t\t// Getting the list\n\n\t\t$my_list\t=\t$this->db->get_where('user', array('user_id'=>$user_id))->row()->$list_field;\n\n\t\tif ($my_list == NULL)\n\n\t\t\t$my_list = '[]';\n\n\t\t$my_list_array\t=\tjson_decode($my_list);\n\n\n\n\t\treturn $my_list_array;\n\n\t}", "title": "" }, { "docid": "be2bb6432186f2d58d0910b69fb4881d", "score": "0.5341443", "text": "function getListeTypes ( ) {\n\t\treturn array ( '%'=>'--', 'CCAM'=>'CCAM', 'NGAP'=>'NGAP', 'DIAG'=>'DIAG' ) ;\n\t}", "title": "" }, { "docid": "6ef19f879d3aa1d6600dc0061e247905", "score": "0.53406173", "text": "function get_type() {\n\t\tglobal $db;\n\t\t$query = \" SELECT id, name \n\t\t\t\tFROM \" . $this->table_types;\n\t\tglobal $db;\n\t\t$sql = $db->query ( $query );\n\t\t$result = $db->getObjectList ();\n\t\treturn $result;\n\t}", "title": "" } ]
c892926d8436a497f97bcb5d45f9192b
Return TBS render result as string.
[ { "docid": "e02164e109e85d521baf49707a802bbd", "score": "0.0", "text": "function getTBSRender() {\r\n\t\tif (is_null($this->tbs)) return FALSE;\r\n\t\t$this->tbs->Show(TBS_NOTHING);\r\n\t\treturn $this->tbs->Source;\r\n\t}", "title": "" } ]
[ { "docid": "1711872fee2df4a162c8050a11b275e2", "score": "0.7441254", "text": "public function renderIntoString($resultParams = array())\r {\r ob_start();\r $this->renderHtml($resultParams);\r $_template_content = ob_get_contents();\r ob_end_clean();\r return $_template_content;\r }", "title": "" }, { "docid": "f570730ce74dee562da0e855e58f751f", "score": "0.73210615", "text": "public static function render(): string\n {\n return static::get()->render();\n }", "title": "" }, { "docid": "bc046e2a18e4d79d8f29723eb9ba26bd", "score": "0.7074821", "text": "public function render(): string;", "title": "" }, { "docid": "bc046e2a18e4d79d8f29723eb9ba26bd", "score": "0.7074821", "text": "public function render(): string;", "title": "" }, { "docid": "bc046e2a18e4d79d8f29723eb9ba26bd", "score": "0.7074821", "text": "public function render(): string;", "title": "" }, { "docid": "0948c7b0f07db4542c7b526cec823671", "score": "0.7005743", "text": "public function __tostring() {\n return $this->render();\n }", "title": "" }, { "docid": "3bd8ace96dbd4c53fdd7b724fb93630d", "score": "0.69403124", "text": "public function render(): string\n {\n return $this->data;\n }", "title": "" }, { "docid": "7cbfa67f4c6433cba51560cce9dadee6", "score": "0.69246876", "text": "public function run(): string\n {\n $block = ob_get_clean();\n\n if ($this->renderInPlace) {\n return $block;\n }\n\n if (!empty($block)) {\n $this->webView->setBlocks($this->id, $block);\n }\n\n return '';\n }", "title": "" }, { "docid": "2cac97355676dae0ee56de55b404384c", "score": "0.6907562", "text": "public function toString()\n {\n ob_start();\n $this->create();\n return ob_get_clean();\n }", "title": "" }, { "docid": "a3ad5edabd0b16998a24d5329b8eaed1", "score": "0.6902624", "text": "public function render()\n {\n return $this->renderTemplate();\n }", "title": "" }, { "docid": "99738eaa85ff048d5f1d6d7878653d8c", "score": "0.6880933", "text": "function render () {\n\t\t$content = '';\n\n\t\tob_start();\n\t\trequire( $this->templateFile );\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "6fb54a8a60c2a1879ed702120527f647", "score": "0.68563104", "text": "public function render()\n {\n if (!$this->checkAnsiAwareSystem()) {\n return $this->str;\n }\n\n if ($this->has_tags) {\n return $this->tag_format->parse($this->str);\n } elseif (!empty($this->str)) {\n $this->output->useEffect($this->format);\n return $this->output->build();\n }\n\n return $this->str;\n }", "title": "" }, { "docid": "afcfee4952082b952773797ef5ccf5e1", "score": "0.6832638", "text": "public function __tostring() {\n\t\treturn (string)$this->render();\n\t}", "title": "" }, { "docid": "ed15aaad1b07e5219bc9f2e2450baa75", "score": "0.67955244", "text": "public function render()\n\t{\n\t\treturn $this->fetch($this->templateFile);\n\t}", "title": "" }, { "docid": "459c3f47c1ff0c5c595269407988160c", "score": "0.6785635", "text": "public function render()\n {\n extract($this->params);\n ob_start();\n include($this->view);\n return ob_get_clean();\n }", "title": "" }, { "docid": "12eb6caf80a14c84ca7096840d62c544", "score": "0.6750918", "text": "public function render(): string\n {\n parent::enqueue();\n $bid = input_get('bid');\n $json = $this->jsonBook($bid);\n return twig_render('page_book', $json);\n }", "title": "" }, { "docid": "f2c26411a8889c68dbe7c9c0e94854c8", "score": "0.6749092", "text": "public function render()\n\t{\n\t\treturn $this->view_driver->render();\n\t}", "title": "" }, { "docid": "301cd921ffacb15c5b14415b77493cf1", "score": "0.6747914", "text": "public function render()\n\t{\n\t\treturn $this->getContent();\n\t}", "title": "" }, { "docid": "c9feeea9d7301447ab5338441f605bb0", "score": "0.6741535", "text": "public function getRenderString() {\n return $this->_renderString();\n }", "title": "" }, { "docid": "8a1ef1fa47978437eb275cc0a8b62420", "score": "0.67373455", "text": "public function render(){\n $this->isRendered = true;\n return $this->html;\n }", "title": "" }, { "docid": "8bd4ce5875fb8c6d4ff86c028166122d", "score": "0.6711956", "text": "public function __toString()\n {\n if ($this->_config['template']) {\n try {\n return $this->render();\n } catch (Exception $e) {\n return '';\n }\n }\n\n return '';\n }", "title": "" }, { "docid": "9e2ea963ea8e1abc69a772edde8cc8be", "score": "0.6697232", "text": "public function __toString()\n {\n try\n {\n return $this->render();\n }\n catch (\\Exception $e)\n {\n \\CB::exception($e);\n }\n }", "title": "" }, { "docid": "a659fce0aa1edd0bc7dbc2c8d37a4d1a", "score": "0.6671416", "text": "public function render() {\n $view = $this->get_view();\n if ($view === NULL)\n return '';\n\n return $view->render();\n }", "title": "" }, { "docid": "62ac551a507825518019414b349b1291", "score": "0.66564864", "text": "public function __toString(){\n extract($this->vars); // extract our template variables ex: $value\n \n ob_start(); // store as internal buffer\n\n include (dirname(__FILE__) . $this->template); // include the template into our file\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "e0aaeae76a377cb97a8d0aa4764b8b03", "score": "0.6652134", "text": "public function getOutput(){\n\t\tob_start();\n\t\trequire(dirname(__FILE__) .DS. USE_TEMPLATE);\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "c7ee179e4849493fe916313686e75316", "score": "0.664209", "text": "public function __tostring(){\n ob_start();\n extract($this->data);\n require_once(getcwd() . '/views/' . strtolower($this->controller) . '/' . $this->view . '.php');\n $content = ob_get_contents();\n ob_clean();\n\n ob_start();\n $headerFiles['scripts'] = $this->scripts;\n $headerFiles['styles'] = $this->styles;\n require_once(getcwd() . '/views/template.php');\n $html = ob_get_contents();\n ob_clean();\n\n return $html;\n }", "title": "" }, { "docid": "69667d4ebc873c4100c308faa8ce6a96", "score": "0.6627593", "text": "function render(): String\n {\n\n }", "title": "" }, { "docid": "333aab9c9aeb538cdb44775beb3a68b5", "score": "0.66195905", "text": "public function getHTML(){\n $twig = get_instance()->twig->getTwig();\n $template = $twig->load($this->getURL());\n \n return $template->render();\n }", "title": "" }, { "docid": "698fe5e95e43926de8469b3246e04f96", "score": "0.66110075", "text": "public function render() {\n ob_start();\n if(file_exists($this->template))\n include($this->template);\n return ob_get_clean();\n }", "title": "" }, { "docid": "5026ecec1c7bafe6ce83a5314c50408b", "score": "0.6607495", "text": "public function toHtml()\n {\n return $this->getEngine()->fetch($this->template);\n }", "title": "" }, { "docid": "36e8dd79322158ca9600526ccd5b94dc", "score": "0.6602973", "text": "public function render()\n {\n return $this->__toString();\n }", "title": "" }, { "docid": "98a6a22b120ec9886d670c8809e52ee2", "score": "0.65911365", "text": "public function __toString()\n {\n try {\n $html = $this->render();\n } catch (\\Exception $exception) {\n trigger_error($exception, E_USER_WARNING);\n $html = '';\n }\n return $html;\n }", "title": "" }, { "docid": "78e7c5bfe8001abb8e0dbafe0f369a85", "score": "0.65755016", "text": "public function __toString()\n {\n try {\n return $this->render();\n } catch (\\Exception $e) {\n return $this->str;\n }\n }", "title": "" }, { "docid": "17a929e75c2084e8a38340c07335d4be", "score": "0.65668416", "text": "public function render(): string\n {\n if (empty($this->filename)) {\n return '';\n }\n $content = file_get_contents(self::$pathPrefix . $this->filename);\n foreach ($this->data as $key => $val) {\n $content = str_replace(self::$tags[0] . $key . self::$tags[1], $val, $content);\n }\n return $content;\n }", "title": "" }, { "docid": "f39a2a368fb64ead780e7179b4ecde6d", "score": "0.6551731", "text": "protected function render(): string\n {\n $html = '<div class=\"' . $this->classes() . '\">' .\n $this->content .\n '</div>';\n\n return $html;\n }", "title": "" }, { "docid": "daf868c69cb4efb08b47f6a84295bf6e", "score": "0.65410006", "text": "public function __toString()\n {\n try {\n return (string) $this->render();\n } catch (Exception $e) {\n return '';\n }\n }", "title": "" }, { "docid": "b862b8d7f65bc99c83fac44998001641", "score": "0.6534195", "text": "public function __toString()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->render();\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "58f3a52fc6606250631146b27c306799", "score": "0.6512524", "text": "public function __toString()\n { \n if (!empty($this->viewPath) && !empty($this->viewFile)) {\n return $this->view->render($this->viewFile, $this->attributes);\n }\n\n return '';\n }", "title": "" }, { "docid": "87685767b4d0667250ae82997f458744", "score": "0.65051436", "text": "public function render() {\n\t\t//return $this->file->read();\n\t}", "title": "" }, { "docid": "7cdd7c265623612ffc392de40f65dbea", "score": "0.649957", "text": "public function render()\r\n {\r\n $content = $this->_beforeRender();\r\n $content = $this->_render($content);\r\n $this->_afterRender($content);\r\n\r\n return $content;\r\n }", "title": "" }, { "docid": "79f067178f9a313286ce8f160d9fe0bb", "score": "0.64964676", "text": "public function get() {\n return $this->render();\n }", "title": "" }, { "docid": "881cbf5e7f6f7508d5ab82e4db50aeb4", "score": "0.6490872", "text": "public function getHTML() {\n\t\tob_start();\n\t\t$this->execute();\n\t\t$html = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "f05375727ac654a5314bf5cb3f2ef4ff", "score": "0.64883745", "text": "public function __toString()\n {\n return (string) $this->render();\n }", "title": "" }, { "docid": "f05375727ac654a5314bf5cb3f2ef4ff", "score": "0.64883745", "text": "public function __toString()\n {\n return (string) $this->render();\n }", "title": "" }, { "docid": "3b49e1a5b9adfc930f039e22dd02f0a6", "score": "0.64803267", "text": "public function __toString(): string\n {\n return $this->render();\n }", "title": "" }, { "docid": "3b49e1a5b9adfc930f039e22dd02f0a6", "score": "0.64803267", "text": "public function __toString(): string\n {\n return $this->render();\n }", "title": "" }, { "docid": "3b49e1a5b9adfc930f039e22dd02f0a6", "score": "0.64803267", "text": "public function __toString(): string\n {\n return $this->render();\n }", "title": "" }, { "docid": "28cd9c7b0c02ab3596bda74774bca1ec", "score": "0.6479875", "text": "function getOutput()\n {\n ob_start();\n $this->renderOutput();\n $output = ob_get_clean();\n return $output;\n }", "title": "" }, { "docid": "5d0a25b0500419ab283952236e191210", "score": "0.6473298", "text": "public final function render(){\n\t\tif($this->renderStatus){\n\t\t\tif($this->template){\n\t\t\t\t$this->template->setVars($this->view->getVars());\n\t\t\t\t$this->template->content = $this->view->render();\n\t\t\t\treturn $this->template->render();\n\t\t\t}\n\t\t\treturn $this->view->render();\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "5d9a935900cc08b2c24e6f754d182fa7", "score": "0.64373636", "text": "public function render()\n {\n return $this->getRenderer()->render($this);\n }", "title": "" }, { "docid": "819098136104faab494737ec8ea8f781", "score": "0.64335966", "text": "function output()\n {\n global $application;\n\n #define whether to output the view or not\n if ($this->NoView)\n {\n $application->outputTagErrors(true, \"SearchResult\", \"Errors\");\n return \"\";\n }\n else\n {\n $application->outputTagErrors(true, \"SearchResult\", \"Warnings\");\n }\n\n $this->templateFiller = new TemplateFiller();\n $this->template = $application->getBlockTemplate('SearchResult');\n $this->templateFiller->setTemplate($this->template);\n\n /*\n If the search id doesn't exist in the session, then putput the empty\n template.\n */\n if(modApiFunc('Session', 'is_Set', 'search_result_id'))\n {\n $this->search_id = $search_id = modApiFunc('Session', 'get', 'search_result_id');\n modAPIFunc('paginator', 'setCurrentPaginatorName', \"Catalog_SearchResult_$search_id\");\n $this->prodlist = modApiFunc('CatalogSearch', 'getProdsListInSearchResult', $search_id, true);\n\n #If the search result is empty, then output a special template created\n #for such case\n if (NULL != $this->prodlist)\n {\n $html = $this->templateFiller->fill(\"Container\");\n }\n else\n {\n $html = $this->templateFiller->fill(\"ContainerNotMatch\");\n }\n }\n else\n {\n $html = $this->templateFiller->fill(\"ContainerEmpty\");\n }\n return $html;\n }", "title": "" }, { "docid": "1ae1231f2817e464834c0eb270611c28", "score": "0.64331084", "text": "public function render()\n\t{\n\t\ttry {\n\t\t\treturn $this->latte->renderToString(\n\t\t\t\t$this->getTemplatesPath() . $this->getFilename(),\n\t\t\t\t$this->templateParams\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\tthrow new WireException($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "2a2f2395772d71e548ee27ade6f981c2", "score": "0.6428532", "text": "public function __toString()\n {\n /** @var $this ResourceObject */\n if (is_string($this->view)) {\n return $this->view;\n }\n if ($this->renderer instanceof RenderInterface) {\n try {\n $view = $this->renderer->render($this);\n } catch (Exception $e) {\n $view = '';\n error_log('Exception caught in ' . __METHOD__);\n error_log((string)$e);\n }\n\n return $view;\n }\n if (is_scalar($this->body)) {\n return (string)$this->body;\n }\n error_log('No renderer bound for \\BEAR\\Resource\\RenderInterface' . get_class($this) . ' in ' . __METHOD__);\n\n return '';\n }", "title": "" }, { "docid": "46856f35d07aefef7fefdf4a91bdc982", "score": "0.6424352", "text": "public function render() {\n return '<div>' . htmlspecialchars($this->text) . '</div>';\n }", "title": "" }, { "docid": "35b08fdf37185a7cf071f8974e8e6a24", "score": "0.6420108", "text": "public function __toString() : string\n {\n return $this->render();\n }", "title": "" }, { "docid": "35b08fdf37185a7cf071f8974e8e6a24", "score": "0.6420108", "text": "public function __toString() : string\n {\n return $this->render();\n }", "title": "" }, { "docid": "8090c94bb1e0589f519cd132fcc981ef", "score": "0.6419976", "text": "public function render(): string\n {\n $this->dom->formatOutput = true;\n\n return (string) $this->dom->saveXml();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.64158595", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "50e4a153613608ce3bbc40a2cb9ca518", "score": "0.6415141", "text": "public function render() {\r\n\t\techo $this->get();\r\n\t}", "title": "" }, { "docid": "b0b9ba5f6c4269d860d85a17a3a5950a", "score": "0.64106905", "text": "function __toString()\n {\n ob_start();\n ob_implicit_flush(false);\n try {\n $out = $this->run();\n } catch (\\Exception $e) {\n\n if (ob_get_level() > 0) {\n ob_end_clean();\n }\n throw $e;\n }\n return ob_get_clean() . $out;\n }", "title": "" }, { "docid": "1199dc8bd9f030f6efe6c7c3f3d27c48", "score": "0.6409624", "text": "public function render()\n\t{\n\t\t$template = $this->_engine->loadTemplate($this->_scriptPath);\n\t\treturn $template->render($this->_varibles);\n\t}", "title": "" }, { "docid": "2871553f99e337650c09cc41a070f5a4", "score": "0.64074117", "text": "public function render(){\r\n if (!$this->init_flag){\r\n $this->init_flag=true;\r\n return \"\";\r\n }\r\n $res = $this->sql->select($this->request);\r\n return $this->render_set($res);\r\n }", "title": "" }, { "docid": "91544d6324b033ae3da0e11fd0bd988d", "score": "0.6394521", "text": "public function __toString(){\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f17c16c59ff9c1bb68c6214e007e0edb", "score": "0.63932407", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "794b55a27e1937fbfb3e9592aa29375f", "score": "0.63930327", "text": "protected function renderHtmlResponse()\n {\n return $this->controller->render($this->view ?: $this->id, $this->getViewRenderParams());\n }", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.6390283", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.6390283", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.6390283", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.6390283", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.6390283", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "0a723d186a539a86d83b76b6c0fe2edd", "score": "0.63890696", "text": "function __toString() {\n\t\ttry {\n\t\t\treturn $this->render();\n\t\t}\n\t\tcatch (\\Exception $exception) {\n\t\t\treturn ''; # gracefully emmit the error\n\t\t}\n\t}", "title": "" }, { "docid": "d09d6891d75adc1c23e6c05567600cb3", "score": "0.63777554", "text": "public function show()\n {\n ob_start();\n require TMPLDIR . $this->_template;\n return ob_get_clean();\n }", "title": "" }, { "docid": "9074214e16d63ab66792b44744caf933", "score": "0.6376582", "text": "public function render() \n {\n return '';\n }", "title": "" }, { "docid": "823b143da02935d498e7ec5aae5369f7", "score": "0.6360289", "text": "abstract public function render(): string;", "title": "" }, { "docid": "0215c8c3bc6d71713b63469c2e8a0f14", "score": "0.6358318", "text": "public function as_string() { return $this->template; }", "title": "" }, { "docid": "976cb74ca9585581afd4e573f4772ee2", "score": "0.6356965", "text": "public function render(): string\n {\n /** @var View $oView */\n $oView = Factory::service('View');\n return $oView\n ->load(\n 'admin/_components/dynamic-table',\n [\n 'sKey' => $this->sKey,\n 'aFields' => $this->aFields,\n 'aData' => $this->aData,\n 'bIsSortable' => $this->bIsSortable,\n ],\n true\n );\n }", "title": "" }, { "docid": "228ae2bb922d30c0f096467d4a5649e4", "score": "0.63557583", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1d5c629764e55f7e39d0bc9d14625e3a", "score": "0.6353965", "text": "public function __toString() {\n\t\ttry {return $this->render ();} \n\t\tcatch ( Exception $e ) {echo $e->getMessage ();return \"\";}\n\t}", "title": "" }, { "docid": "034add96db1f1c562ed3bfc0f38acc29", "score": "0.6350803", "text": "abstract public function render():string;", "title": "" }, { "docid": "ce260c8b92ce5bd50f5ac71fd36d053c", "score": "0.6335622", "text": "public function render()\t\r\r\n\t{\r\r\n\t\t$this->assign_header('Content-type', 'text/plain; charset=utf-8');\t\t\r\r\n\t\tif (is_array($this->data))\r\r\n\t\t{\r\r\n\t\t\t$result = array_values($this->data);\r\r\n\t\t\techo $result[0];\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "04f0b0f21d5b7b7f1b548442a14615e3", "score": "0.6326998", "text": "public function render() {}", "title": "" }, { "docid": "04f0b0f21d5b7b7f1b548442a14615e3", "score": "0.6326998", "text": "public function render() {}", "title": "" }, { "docid": "04f0b0f21d5b7b7f1b548442a14615e3", "score": "0.6326998", "text": "public function render() {}", "title": "" }, { "docid": "c911495c501f201e2b80aca22bcfdccf", "score": "0.63185954", "text": "public function renderContent(){\n //execute the php content and return it as string, then you can echo it later\n ob_start();\n $data = $this->data;\n //get the php view file path\n $viewPath = BASE_PATH.'/protected/views/'.$this->controllerName.'/'.$this->viewBluePrint.'.php';\n include($viewPath);\n $returned = ob_get_contents();\n ob_end_clean();\n return $returned;\n }", "title": "" } ]
8e600f16cfb7342c1541382f114892cd
Gets the context string that uniquely identifies the editor instance.
[ { "docid": "d3a6b71595909b68ed0aa2eaa0590bc4", "score": "0.6543706", "text": "public function getContextString();", "title": "" } ]
[ { "docid": "f4b1315b00dcfe05bd92e1262a64c279", "score": "0.7092612", "text": "public function getContext(): string\n {\n return $this->context;\n }", "title": "" }, { "docid": "e8bd38d9a348fc0b536af35acff262a7", "score": "0.6682323", "text": "public function getEditorToken() : string {\n return $this->getUserToken(['editor']);\n }", "title": "" }, { "docid": "4fa67350c08af807e14433d420826529", "score": "0.65656835", "text": "function getContextId() {\n\t\treturn $this->getData('contextId');\n\t}", "title": "" }, { "docid": "069ddfc12e351d9eeb869da4cc089dbf", "score": "0.6545036", "text": "public static function getEditorName()\n {\n static $sEditor;\n\n if (!isset($sEditor))\n {\n $sEditor = JchPlatformUtility::getEditorName();\n }\n\n return $sEditor;\n }", "title": "" }, { "docid": "a2578b3b820d659837d6b6516270931d", "score": "0.6479456", "text": "protected function getEditorName()\n {\n // First check for an RTE defined on our particular \"namespace\"\n $editor = $this->modx->getOption(\n \"{$this->config['namespace']}.which_editor\",\n null,\n $this->modx->getOption(\"{$this->config['namespace']}.which_editor\", $this->options, null)\n );\n if (!$editor || empty($editor)) {\n // No particular namespace editor found, let's fall back to the global one\n $editor = $this->modx->getOption('which_editor', null, null);\n } else {\n // We have an RTE defined, which might not be the \"default\" system wide one (which_editor setting)\n $this->modx->setOption('which_editor', $editor);\n }\n\n return $editor;\n }", "title": "" }, { "docid": "43620f357fc07ae90e2772c7996b7cf0", "score": "0.6398112", "text": "public function get_context() {\n\t\treturn $this->current_context;\n\t}", "title": "" }, { "docid": "30896ad6b6f8f3d47b15597c941d3aba", "score": "0.6339027", "text": "public function context()\n {\n return sprintf(\n '%s:%s',\n null === $this->inputFile ? '-' : $this->inputFile,\n $this->lineno\n );\n }", "title": "" }, { "docid": "23be93884ae2d48894075e4f18ae54da", "score": "0.629779", "text": "public function getEditorName(): EditorName\n {\n return $this->editorName;\n }", "title": "" }, { "docid": "855cb838d05faf6e94782d53f8233431", "score": "0.6216165", "text": "function getContextId() {\n return $this->getFieldValue('context_id');\n }", "title": "" }, { "docid": "f933e331f8c7e8f1319d5c5e1f5a7748", "score": "0.62059957", "text": "public function getContextName()\n {\n $tab = explode('\\\\', $this->getNamespace());\n unset($tab[0], $tab[1]);\n $context = implode('\\\\', $tab);\n\n return '' !== $context ? $context : null;\n }", "title": "" }, { "docid": "80a0c4783dffc5da060da6ce277e3bf6", "score": "0.6108795", "text": "public function getContextId()\n {\n\n return $this->contextId;\n\n }", "title": "" }, { "docid": "14c579f4cdddd4dfb54420c78e961dc5", "score": "0.6080473", "text": "private function context()\n {\n return $this->request->get('context', FILTER_SANITIZE_STRING);\n }", "title": "" }, { "docid": "e8309d7d1f75e5e8084ff0c51de3129a", "score": "0.6067293", "text": "public function getQueryContextId()\n {\n return $this->_fields['QueryContextId']['FieldValue'];\n }", "title": "" }, { "docid": "8d9c5326fa09f6d9f2ab4bd3e552e3fe", "score": "0.6062624", "text": "protected function getContext()\n {\n return $this->repository->getContext().'/notebooks/'.$this->id;\n }", "title": "" }, { "docid": "99b76ac0fd425bcc622efaaeefb8aa67", "score": "0.59931976", "text": "public function get_context() {\n return $this->context;\n }", "title": "" }, { "docid": "abc951de1cbdd2bfb6ce1ece476df50b", "score": "0.59231335", "text": "function get_context() {\r\n\t\treturn $this->context;\r\n\t}", "title": "" }, { "docid": "ff8f01febb34d8f7a4067ca007209281", "score": "0.5885843", "text": "static private function generateContext()\n\t{\n\t\treturn self::compose('Context') . \"\\n-------\" .\n\t\t\t\"\\n\\n\\$_SERVER: \" . self::dump($_SERVER) .\n\t\t\t\"\\n\\n\\$_POST: \" . self::dump($_POST) .\n\t\t\t\"\\n\\n\\$_GET: \" . self::dump($_GET) .\n\t\t\t\"\\n\\n\\$_FILES: \" . self::dump($_FILES) .\n\t\t\t\"\\n\\n\\$_SESSION: \" . self::dump((isset($_SESSION)) ? $_SESSION : NULL) .\n\t\t\t\"\\n\\n\\$_COOKIE: \" . self::dump($_COOKIE);\n\t}", "title": "" }, { "docid": "b7e4c389c714feaf0df76569e257fd9d", "score": "0.5802617", "text": "public function getContext()\n {\n if ($this->pageContext) {\n return $this->pageContext;\n }\n\n $current = $this->router->current();\n\n if (!$current) {\n return 'default';\n }\n\n if ($current->getName()) {\n return $this->pageContext = $current->getName();\n }\n\n if ($current->getActionName() != \"Closure\") {\n return $this->pageContext = $current->getActionName();\n }\n\n return $this->pageContext = trim($current->uri(), \"/\");\n }", "title": "" }, { "docid": "b04c5c12ce675977505e5094cb9e709e", "score": "0.5776331", "text": "public function getEditor()\n {\n return $this->editor;\n }", "title": "" }, { "docid": "40fa09683d67c53fad9703a6c6eed44f", "score": "0.5752761", "text": "private function getContextKey(): string\n {\n return sprintf('db.connection.%s', $this->poolName);\n }", "title": "" }, { "docid": "7bd3d46a7391e7c17f78d2ffa62b34e3", "score": "0.5706976", "text": "public function get_context();", "title": "" }, { "docid": "df6fa3a1b24a5866a9984fafbf185268", "score": "0.5653779", "text": "public function getIdentifier(): string\n {\n return $this->instance()->getIdentifier();\n }", "title": "" }, { "docid": "eb8a60a16c2c51e3be1eac3c4cb5ba75", "score": "0.56476474", "text": "public function context()\n {\n return $this->getContext($this->context);\n }", "title": "" }, { "docid": "b7ea0a19cf6905ca368070c42cc9d57b", "score": "0.56383616", "text": "public function getManagingEditor () {\r\r\n\t\treturn (string) $this->managingEditor;\r\r\n\t}", "title": "" }, { "docid": "f71f02e1ff2ba263eed80132b0366e53", "score": "0.5614688", "text": "public function getExternalContextId()\n {\n if (array_key_exists(\"externalContextId\", $this->_propDict)) {\n return $this->_propDict[\"externalContextId\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4a19dc3e9b92467eacc3efa7e6771c03", "score": "0.56121624", "text": "protected function getEditor() {\n\t\tif ( !$this->editor ) {\n\t\t\t$this->editor = $this->createEditor( $this->editorName );\n\t\t}\n\n\t\treturn $this->editor;\n\t}", "title": "" }, { "docid": "472a63c98c49b2538727881310675661", "score": "0.56047964", "text": "function ctools_context_id($context, $type = 'context') {\n if (!$context['id']) {\n $context['id'] = 1;\n }\n\n return $type . '_' . $context['name'] . '_' . $context['id'];\n}", "title": "" }, { "docid": "390983793551e5a367020da35616218f", "score": "0.5594255", "text": "protected function getRootContext()\n\t{\n\t\treturn $this->encode($this->config['rootContext']);\n\t}", "title": "" }, { "docid": "c5502c58a5d28d714f88eaf0ea822e8c", "score": "0.55917466", "text": "public function getUserContext() : string;", "title": "" }, { "docid": "ff94fd507c1adde31fef924ab312d997", "score": "0.5587031", "text": "function get_context() {\n\n\t\t\tglobal $context;\n\n\t\t\treturn $context;\n\n\t\t}", "title": "" }, { "docid": "750e28c4bad118651d128df52854714e", "score": "0.5574944", "text": "public function getThingContext() : string;", "title": "" }, { "docid": "74f79f833a531e451317af973c54f934", "score": "0.55725026", "text": "public static function getContext() {\n return self::$context;\n }", "title": "" }, { "docid": "b407a3844a76c12c9bb40a1908eb2e75", "score": "0.5572139", "text": "protected static function context()\n {\n return end(static::$macroContextStack) ?: null;\n }", "title": "" }, { "docid": "f1d9e43d76b7cdc1d3c30e14b585dec7", "score": "0.5540917", "text": "public function getContext(): ?string {\n $val = $this->getBackingStore()->get('context');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'context'\");\n }", "title": "" }, { "docid": "f70fd038077ca42c0531f9103edc5025", "score": "0.5540539", "text": "public function getContext()\n {\n return $this->_context;\n }", "title": "" }, { "docid": "f70fd038077ca42c0531f9103edc5025", "score": "0.5540539", "text": "public function getContext()\n {\n return $this->_context;\n }", "title": "" }, { "docid": "f70fd038077ca42c0531f9103edc5025", "score": "0.5540539", "text": "public function getContext()\n {\n return $this->_context;\n }", "title": "" }, { "docid": "cdc55515a50ac7c55e87b0078d8db7b5", "score": "0.5525151", "text": "public function getContext()\n {\n return $this->get('pum.context');\n }", "title": "" }, { "docid": "03a2728cc5f4cdd1d925de4a1760a7e2", "score": "0.5524894", "text": "public function getContext()\r\n {\r\n return $this->context;\r\n }", "title": "" }, { "docid": "f845ba4c424932146fcf30954e956f56", "score": "0.55202276", "text": "public static function context() {\n return static::$instance;\n }", "title": "" }, { "docid": "50e42822c0ce00f3288ea2728da32c18", "score": "0.5519855", "text": "function getContext() {\n\t\treturn $this->_context;\n\t}", "title": "" }, { "docid": "f5a51738740c7e14d403fc32774507a7", "score": "0.5518689", "text": "public static function getCurrent()\n\t{\n\t\t$application = Application::getInstance();\n\t\treturn $application->getContext();\n\t}", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "6482c55a2ba39bb9c45d90cff45514ba", "score": "0.55146253", "text": "public function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "b4305d0c0ede7a08dd0f07b94f8f2766", "score": "0.55142623", "text": "public function getClassName() \n {\n return 'Widget_Context';\n }", "title": "" }, { "docid": "9942940097da2e896713a8d94c3fb8a7", "score": "0.5504815", "text": "public function template_ident()\n\t{\n\t\t$ident = $this->parent_template()->ident();\n\t\t$ident = preg_replace( '#^' . $this->module() . '\\b#', '', $ident );\n\t\t$ident = trim( $ident, '.-' );\n\n\t\treturn $ident;\n\t}", "title": "" }, { "docid": "b5706357a14000ab93b4033b214dcb5d", "score": "0.55027354", "text": "function getContext() {\n return $this->_context;\n }", "title": "" }, { "docid": "d420b9347e2b28ca382ac976d53fe6ba", "score": "0.55017835", "text": "public function getContext()\n\t{\n\t\treturn $this->context;\n\t}", "title": "" }, { "docid": "d420b9347e2b28ca382ac976d53fe6ba", "score": "0.55017835", "text": "public function getContext()\n\t{\n\t\treturn $this->context;\n\t}", "title": "" }, { "docid": "499d01e8d3d4062314225160c94934cf", "score": "0.55012435", "text": "protected function getContext()\n\t{\n\t\treturn $this->context;\n\t}", "title": "" }, { "docid": "c8eef9a7f6cded8f3ea712d79f80549e", "score": "0.5497009", "text": "public function getContextId()\n {\n return $this->getXml()->getElementsByTagName('MatchContextId')->item(0)->nodeValue;\n }", "title": "" }, { "docid": "17aca60d56c0b85b8d4455ccdbe40ec5", "score": "0.5494452", "text": "public function getContext() {\n return $this->context;\n }", "title": "" }, { "docid": "17aca60d56c0b85b8d4455ccdbe40ec5", "score": "0.5494452", "text": "public function getContext() {\n return $this->context;\n }", "title": "" }, { "docid": "ab0c87c7c2e157985e8d9d3f610a3a44", "score": "0.5492508", "text": "public function getContext() {\n return $this->context;\n }", "title": "" }, { "docid": "28f45008c42e5aababff4c0e51999073", "score": "0.5476003", "text": "public function getContext() /* {{{ */\n\t{\n\t\treturn $this->context;\n\t}", "title": "" }, { "docid": "99b4dac91f2de90ae91218fe7776b812", "score": "0.54676527", "text": "public function context()\n\t{\n\t\tif ( ! $this->_context ) {\n\t\t\t$this->_context = $this->section();\n\t\t}\n\n\t\treturn $this->_context;\n\t}", "title": "" }, { "docid": "657fb22cdc19686a2b68ab06c5a938af", "score": "0.5466113", "text": "public function getContext() {\n\n\t\treturn $this->context;\n\t}", "title": "" }, { "docid": "f846ab4837872ab5ff338ee6abaf436b", "score": "0.5466046", "text": "public function getCurrentCode()\n {\n return $this->_current->id;\n }", "title": "" }, { "docid": "2546cdd49a4d1db7f226f3b961628654", "score": "0.542653", "text": "public function getContext()\n\t{\n\t return $this->_context;\n\t}", "title": "" }, { "docid": "29cff92a575b9d78109d54ca7e0e8d87", "score": "0.5418499", "text": "function elgg_get_context() {\n\treturn _elgg_services()->context->peek();\n}", "title": "" }, { "docid": "c5c940734236efde10deb841a8dd4a2e", "score": "0.53823376", "text": "public function context_type()\n\t{\n\t\treturn $this->context()->obj_type();\n\t}", "title": "" }, { "docid": "0a36ba13c87e24d5ed908cf17bf58d29", "score": "0.5380719", "text": "public static function get_context() {\n\t\treturn 'resume_manager';\n\t}", "title": "" }, { "docid": "e3006136fb06dd7594bede5ef366443b", "score": "0.5376194", "text": "public function getCurrentScope()\n {\n return $this->get_string($this->get_option('scope', ''), '');\n }", "title": "" }, { "docid": "870d3941e8d02642f9242004f8d089d0", "score": "0.5372159", "text": "public function getIdcontextemetaetape()\n {\n return $this->idcontextemetaetape;\n }", "title": "" }, { "docid": "4cb5109fbb0438c1290b133878fa0e2b", "score": "0.53609383", "text": "public final function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "4cb5109fbb0438c1290b133878fa0e2b", "score": "0.53609383", "text": "public final function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "4cb5109fbb0438c1290b133878fa0e2b", "score": "0.53609383", "text": "public final function getContext()\n {\n return $this->context;\n }", "title": "" }, { "docid": "b8e8e140b2bd793976c40dae04eaa82e", "score": "0.53494847", "text": "static function getContext() {\n\t\treturn Controller::getInstance()->getContext();\n\t}", "title": "" }, { "docid": "607a0a44173f13f72d11222acc49c708", "score": "0.5345522", "text": "public function getIdentifiable(): string\n {\n return 'Galactium\\Modules\\\\' . camelize($this->module) . '\\\\' . camelize($this->namespace) . '\\\\' . camelize($this->class);\n }", "title": "" }, { "docid": "a5eb8578161d1301b003e38b7528d97f", "score": "0.53441393", "text": "public final function getContext()\n\t{\n\t\treturn $this->context;\n\t}", "title": "" }, { "docid": "dcfb1b18da6e91ee618471bf90c4fbf8", "score": "0.53391844", "text": "public function getContext();", "title": "" }, { "docid": "dcfb1b18da6e91ee618471bf90c4fbf8", "score": "0.53391844", "text": "public function getContext();", "title": "" }, { "docid": "dcfb1b18da6e91ee618471bf90c4fbf8", "score": "0.53391844", "text": "public function getContext();", "title": "" }, { "docid": "dcfb1b18da6e91ee618471bf90c4fbf8", "score": "0.53391844", "text": "public function getContext();", "title": "" }, { "docid": "dcfb1b18da6e91ee618471bf90c4fbf8", "score": "0.53391844", "text": "public function getContext();", "title": "" }, { "docid": "dcfb1b18da6e91ee618471bf90c4fbf8", "score": "0.53391844", "text": "public function getContext();", "title": "" }, { "docid": "a4d64cca889b160132800a8333f1df71", "score": "0.53329754", "text": "public function getIdTypeContexte()\n {\n return $this->idTypeContexte;\n }", "title": "" }, { "docid": "4ffc891e953aa4a76dae7e355eedb2dd", "score": "0.532018", "text": "public static function get_name() {\n\t\treturn 'general_translation_editor';\n\t}", "title": "" }, { "docid": "14207b0da9c140af33f63741aa8e5583", "score": "0.5311368", "text": "function ctools_get_context($context) {\n ctools_include('plugins');\n return ctools_get_plugins('ctools', 'contexts', $context);\n}", "title": "" }, { "docid": "b6a452c7e78debf77a4fe5d3c6543a4e", "score": "0.53028804", "text": "function id() {\n return $this->getVar($this->handler->keyName, 'e');\n }", "title": "" }, { "docid": "b04fdfaf5661ee1859f13f6dc47a07f0", "score": "0.52851224", "text": "protected function getIdentifier() {\n return StringHelper::namespaceToIdentifier($this->componentNamespace);\n }", "title": "" }, { "docid": "21713dec18e824403d800e79a3b64f03", "score": "0.52721864", "text": "public function getSubredditContext() : string;", "title": "" }, { "docid": "6c0f5d54f3b66c97f8822f4606b32769", "score": "0.5255022", "text": "public function getContext(): Context\n\t{\n\t\treturn $this->settings->getContext();\n\t}", "title": "" }, { "docid": "a242956da2b7316a3323c9eef652ee5a", "score": "0.5251003", "text": "public function getClotureContexte(): ?string {\n return $this->clotureContexte;\n }", "title": "" }, { "docid": "93fefaa95a121839826656cc8dd7b72f", "score": "0.5249096", "text": "public function getSource() {\n return 'token';\n }", "title": "" }, { "docid": "996322131d751495d4ce730f0c6c5ca3", "score": "0.52365595", "text": "public function getSourceContext()\n\t{\n\t\treturn $this->name ? new Source($this->sourceCode, $this->name, $this->sourcePath) : null;\n\t}", "title": "" }, { "docid": "2e8b234478f035bb82ef49bfedb084dc", "score": "0.52172506", "text": "public function getContentId() : string\n {\n return $this->contentId;\n }", "title": "" }, { "docid": "c73c2dee2e4b5fdcf66b9d97ff52c3c0", "score": "0.52114636", "text": "public function getId(): string\n {\n $this->start();\n\n return $this->engine->getId();\n }", "title": "" }, { "docid": "abfa8eeac3e4757ae41404ff1209eb2b", "score": "0.51946235", "text": "public function getName() {\n\t\treturn $this->share->getToken();\n\t}", "title": "" }, { "docid": "e87168b4d90846e1e1fb097bcce10863", "score": "0.5194224", "text": "public function getContextDefinition() {\n return $this->getPlugin('argument_validator')->getContextDefinition();\n }", "title": "" }, { "docid": "b8fbebe572482b6ea670480cb0cb9a8a", "score": "0.51748985", "text": "public function getEditKey()\n {\n return $this->editKey;\n }", "title": "" }, { "docid": "c6c3c1439c7313e0cdc22ce1dd48052d", "score": "0.5166929", "text": "public function getPersonContext()\n\t{\n\t\treturn $this->_person_context;\n\t}", "title": "" }, { "docid": "4b3b1aa20969b46bbc68d44f2f4f35ac", "score": "0.51463515", "text": "public function getCurrentId()\n {\n return $this->currentLanguageId;\n }", "title": "" } ]
7b3ee9f8ec69fb52e7fb22f895a64bea
Is this a HEAD method request?
[ { "docid": "9bf4ec7a04bd8e0b0d15f86af26f1c9b", "score": "0.79124635", "text": "public function isHead ()\n {\n return ($this->method === self::METHOD_HEAD);\n }", "title": "" } ]
[ { "docid": "d9e74ede34658ca0b7149721c0f66cdf", "score": "0.83257914", "text": "public function isHead()\n {\n return $this->isMethod('HEAD');\n }", "title": "" }, { "docid": "3e475a01c36db4c21fa6716f00347f96", "score": "0.8249841", "text": "public function isHead()\n {\n if ('HEAD' == $this->getMethod()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "15e773a2bdbddcd0c60cec453d51e25b", "score": "0.821283", "text": "public function isHead() {\n\n\t\treturn ($this->getMethod() === 'HEAD');\n\n\t}", "title": "" }, { "docid": "a12d077e8a8c45d1b37fe343715f4ff2", "score": "0.81921816", "text": "public function isHead()\n\t{\n\t\treturn ($this->server['REQUEST_METHOD'] == 'HEAD');\n\t}", "title": "" }, { "docid": "a1191d353ae3af4ebaa68b8cf1d9ca0f", "score": "0.7949547", "text": "public function is_head_request()\n {\n return $this->get_request_type() === \"head\";\n }", "title": "" }, { "docid": "8e4e95c6d68d23eabd35404fbfb9443b", "score": "0.78971136", "text": "public function isHead()\n {\n return $this->getMethod() === self::METHOD_HEAD;\n }", "title": "" }, { "docid": "17689a1337e0139c1d4fdb130981a73f", "score": "0.7603425", "text": "public function isHead() {\n\t\treturn $this->is('HEAD');\n\t}", "title": "" }, { "docid": "25952a8d09320d8b453e41dca2e314c8", "score": "0.7353973", "text": "public static function isHead(ServerRequestInterface $request)\n {\n return self::isMethod($request, 'HEAD');\n }", "title": "" }, { "docid": "dc95ebe61524ec1f8ab294278c43dd5b", "score": "0.7276575", "text": "public function isHead()\n {\n return $this->getMethod() == 'head';\n }", "title": "" }, { "docid": "bb8219be97703b4b6fa74caa5fa9142e", "score": "0.7257052", "text": "protected function HttpHead(): void\n {\n $this->CompareHttpMethod(HttpMethod::Head);\n }", "title": "" }, { "docid": "36fdb434f1cf33336d884268869d5d14", "score": "0.7005057", "text": "function http_head($url, array $options = array()) {\n\treturn http_request('HEAD', $url, null, $options);\n}", "title": "" }, { "docid": "eea7ac84d7eb42e16ab8a52b69af61c6", "score": "0.68702924", "text": "public function isHead(): bool\n {\n return $this->isMethod('head');\n }", "title": "" }, { "docid": "f80687f6a1df87b09615174e448d3730", "score": "0.6865682", "text": "function head($url, $vars = array()) {\n\t\treturn $this->request('HEAD', $url, $vars);\n\t}", "title": "" }, { "docid": "78adf6f02e42fd332db9f7af7f1a6358", "score": "0.6701125", "text": "function test_head_request() {\n\t\t$url = 'http://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';\n\t\t$response = wp_remote_head( $url );\n\t\t$headers = wp_remote_retrieve_headers( $response );\n\n\t\t$this->assertTrue( is_array( $headers ) );\n\t\t$this->assertEquals( 'image/jpeg', $headers['content-type'] );\n\t\t$this->assertEquals( '40148', $headers['content-length'] );\n\t\t$this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) );\n\t}", "title": "" }, { "docid": "5936a33e41b8a4628b5530c24e49d73b", "score": "0.66837883", "text": "public function isHead()\n {\n $info = static::exists($this->getFilespec(true), $this->getConnection());\n\n if (isset($info['rev']) && $info['rev'] === $this->getStatus('headRev')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5aff71cf81995c8a010ccdefe6dc8966", "score": "0.6658135", "text": "public function head($endpoint, $method=''){\n\t\treturn $this->request($endpoint, $method, 'HEAD');\n\t}", "title": "" }, { "docid": "595d1fa58a08b69c4d1bc767c7f02ddd", "score": "0.66309804", "text": "public function method(): string\n {\n return 'HEAD';\n }", "title": "" }, { "docid": "63912046ec33517e44c2c4704ac0ca2e", "score": "0.65660477", "text": "public function It_should_remove_body_from_HEAD_requests()\n\t{\n\t\t$response = self::responseFor( array( 'REQUEST_METHOD' => 'HEAD' ) );\n\t\t$this->assertEquals( 200, $response[ 0 ] );\n\t\t$this->assertEquals( array( 'Content-type' => 'test/plain', 'Content-length' => '3' ), $response[ 1 ] );\n\t\t$this->assertEquals( array(), $response[ 2 ] );\n\t}", "title": "" }, { "docid": "ca33b8b97cfe0278bbac9e82096887e9", "score": "0.65234673", "text": "public function head($url, $headers = null)\n\t{\n\t\t// Parse the request url.\n\t\t$uri = JUri::getInstance($url);\n\n\t\ttry {\n\t\t\t$connection = $this->_connect($uri);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Send the command to the server.\n\t\tif (!$this->_sendRequest($connection, 'HEAD', $uri, null, $headers)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->_getResponseObject();\n\t}", "title": "" }, { "docid": "1bfcbb0f74fe0c7bea9db2a9758287cc", "score": "0.6517242", "text": "public function validate( ) {\n\n\t\t$arrHeaders = HTTP::headers($this->getURL());\n\t\t\n\t\tif(is_array($arrHeaders) && $arrHeaders[0] == 'HTTP/1.0 200 OK'){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "614624de52777c863000738c71c0d2b7", "score": "0.6468651", "text": "public function head(Request $request): Response;", "title": "" }, { "docid": "b4e29bea2f23b435795f75f7ffdb24c4", "score": "0.6459442", "text": "function HEAD($uri, $options = null, $headers = null)\n {\n return $this->__makeRequestCall(HttpRequest::METHOD_HEAD, $uri, $options, null, $headers);\n }", "title": "" }, { "docid": "470bebc204f92d0cbf6b9692791eed20", "score": "0.6392153", "text": "function head($url)\n {\n $purl = parse_url($url);\n $port = (isset($purl['port'])) ? $purl['port'] : 80;\n $fp = fsockopen($purl['host'], $port, $errno, $errstr, 10);\n if (!$fp) {\n return PEAR::raiseError(\"HTTP::head Error $errstr ($erno)\");\n }\n $path = (!empty($purl['path'])) ? $purl['path'] : '/';\n\n fputs($fp, \"HEAD $path HTTP/1.0\\r\\n\");\n fputs($fp, \"Host: \" . $purl['host'] . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\n $response = rtrim(fgets($fp, 4096));\n if(preg_match(\"|^HTTP/[^\\s]*\\s(.*?)\\s|\", $response, $status)) {\n $headers['response_code'] = $status[1];\n }\n $headers['response'] = $response;\n\n while ($line = fgets($fp, 4096)) {\n if (!trim($line)) {\n break;\n }\n if (($pos = strpos($line, ':')) !== false) {\n $header = substr($line, 0, $pos);\n $value = trim(substr($line, $pos + 1));\n $headers[$header] = $value;\n }\n }\n fclose($fp);\n return $headers;\n }", "title": "" }, { "docid": "d35efb96daad23218742eabe2b5163df", "score": "0.6335831", "text": "public function headAction()\r\n {\r\n $this->_response->ok();\r\n }", "title": "" }, { "docid": "b97aa1f5d0e7c7fb0ad8d027d0d0ed1e", "score": "0.6223355", "text": "public function head($params = [])\n {\n $this->getRequest()\n ->setMethod(HttpRequestMethod::HEAD)\n ->setParams($params);\n\n return $this->handle($this->getRequest());\n }", "title": "" }, { "docid": "97d08f133ff0160393db68b43268faa6", "score": "0.62093383", "text": "protected function head()\n {\n $result = $this->_get();\n if ($this->restfulRequest->resourceId) {\n return \\response(null, 200, ['ETag' => $result->meta->etag]);\n }\n return \\response(null, 200, ['X-Total' => $result->meta->total]);\n }", "title": "" }, { "docid": "eff1d9b8ad9209c7cda1829b4c1ba077", "score": "0.62062943", "text": "#[@test]\n public function doHead() {\n $this->newRequest('HEAD', new \\peer\\URL('http://localhost/'));\n \n $s= newinstance('scriptlet.HttpScriptlet', array(), '{\n public function doHead($request, $response) {\n $response->write(\"Hello HEAD\");\n }\n }');\n $response= $s->process();\n $this->assertEquals(\\peer\\http\\HttpConstants::STATUS_OK, $response->statusCode);\n $this->assertEquals('Hello HEAD', $response->getContent());\n }", "title": "" }, { "docid": "6c5feb1ce3f54746702f958eee3d1b53", "score": "0.61555576", "text": "public function headersAreSent(): bool;", "title": "" }, { "docid": "4aec7dd5b62a5d943b2bc18cfd7837a5", "score": "0.61528057", "text": "public function head($uri)\n {\n $this->setHeader('Accept', '*/*');\n $resource = $this->_getResource($uri, true);\n curl_exec($resource);\n $this->_headInfo = curl_getinfo($resource);\n if ((int) curl_errno($resource) !== 0) {\n $code = $this->_curlErrors[(int) curl_errno($resource)];\n $this->_error = array(\n 'code' => $code,\n 'message' => curl_error($resource)\n );\n }\n $this->_close($resource);\n }", "title": "" }, { "docid": "0c4a466e3121c3eb571d2467d63dd881", "score": "0.6138072", "text": "public function head($url, $data = [])\n {\n array_unshift($data, $url);\n $this->request('head', $data);\n\n return $this->_response->headers;\n }", "title": "" }, { "docid": "2dae4648e087a5ac16c03ce7dc3a7dad", "score": "0.6114969", "text": "public function testGetRouteIsAlsoMappedAsHead()\n {\n $s = new \\Slim\\Slim();\n $route = $s->get('/foo', function () {});\n $this->assertTrue($route->supportsHttpMethod(\\Slim\\Http\\Request::METHOD_GET));\n $this->assertTrue($route->supportsHttpMethod(\\Slim\\Http\\Request::METHOD_HEAD));\n }", "title": "" }, { "docid": "92faf1f6a527082ed01f7f72d80dcf0e", "score": "0.611471", "text": "public function head($params) { throw new MethodNotImplementedException('Method HEAD not implemented for ' . get_class($this)); }", "title": "" }, { "docid": "5cb5bcf25ef624dc620509bb7ab0825d", "score": "0.61034507", "text": "public function testHead() {\n $this->enableService('relaxed:local:doc', 'GET');\n $entity_types = ['entity_test_local'];\n foreach ($entity_types as $entity_type) {\n // Create a user with the correct permissions.\n $permissions = $this->entityPermissions($entity_type, 'view');\n $permissions[] = 'administer workspaces';\n $permissions[] = 'restful get relaxed:local:doc';\n $account = $this->drupalCreateUser($permissions);\n $this->drupalLogin($account);\n\n // We set this here just for testing.\n $this->multiversionManager->setActiveWorkspaceId($this->workspace->id());\n\n $entity = $this->entityTypeManager->getStorage($entity_type)->create();\n $entity->save();\n $this->httpRequest(\"$this->dbname/_local/\" . $entity->uuid(), 'HEAD', NULL);\n $this->assertHeader('content-type', $this->defaultMimeType);\n $this->assertResponse('200', 'HTTP response code is correct.');\n }\n\n // Test with an entity type that is not local.\n $entity = $this->entityTypeManager->getStorage('entity_test_rev')->create();\n $entity->save();\n $this->httpRequest(\"$this->dbname/_local/\" . $entity->uuid(), 'HEAD', NULL);\n $this->assertHeader('content-type', $this->defaultMimeType);\n $this->assertResponse('400', 'HTTP response code is correct.');\n }", "title": "" }, { "docid": "69691be6c5b69b25b0354e903c9bd327", "score": "0.6050654", "text": "public function head(string $url, array $data = [], array $options = []): Response\n {\n $options = $this->_mergeOptions($options);\n $url = $this->buildUrl($url, $data, $options);\n\n return $this->_doRequest(Request::METHOD_HEAD, $url, '', $options);\n }", "title": "" }, { "docid": "a6615f01f1a47b708f6a741c7f60e334", "score": "0.6030175", "text": "function is_url_exist($url){\n $ch = curl_init($url); \n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if($code == 200){\n\t\t$status = true;\n }else{\necho \"<!-- FOO $url, $code -->\"; \n\t\t$status = false;\n }\n curl_close($ch);\n\treturn $status;\n}", "title": "" }, { "docid": "41532e1e085621d4795c9da5dc720dd4", "score": "0.6011353", "text": "public function head($url, $headers = [], $options = []) {\n\t\treturn $this->request($url, $headers, null, Requests::HEAD, $options);\n\t}", "title": "" }, { "docid": "99d5442f5f7acc8241fb7df400efd748", "score": "0.5991229", "text": "public function head() {\n // @TODO return Allow header listing allowed methods\n return $this->error(Response::MethodNotAllowed);\n }", "title": "" }, { "docid": "c381ce01a5a698a87410c94c2889e2dd", "score": "0.5991103", "text": "public static function head(string $url, array $obj = [], string $return = 'complete') {\n\n $curl = self::loadCurl($url);\n\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');\n\n if (strrpos($url, '?') === false) {\n $url .= '?' . http_build_query($obj);\n }\n\n return self::execCurl($curl, $return);\n }", "title": "" }, { "docid": "0dd5ae822b87d2349ae2cbf0b8a7b6d3", "score": "0.5981093", "text": "protected function requestHasETag()\n {\n return !empty($_SERVER['HTTP_IF_NONE_MATCH']);\n }", "title": "" }, { "docid": "8258b66a817e56b1a25a0b3624bfac56", "score": "0.5962755", "text": "function is_get_request(){\n if (request_method() == \"GET\"){\n return true;\n }\n\t}", "title": "" }, { "docid": "a02d319067133437c27f6984226a038e", "score": "0.5952532", "text": "function urlExist($url) {\n $file_headers = @get_headers($url);\n if($file_headers[0] == 'HTTP/1.1 404 Not Found')\n {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "78f31687f77c61563f9fb3ab6d7e8df9", "score": "0.59444666", "text": "function check_method($allowed_methods)\n{\n $method = $_SERVER['REQUEST_METHOD'];\n $allowed_methods[] = \"HEAD\";\n if (!in_array($method, $allowed_methods)) {\n throw new APIException(ERROR_METHOD_NOT_ALLOWED, null,\n \"$method not allowed, expected one of \".json_encode($allowed_methods));\n }\n}", "title": "" }, { "docid": "7dab75ec4260556564f467b230e7fdc7", "score": "0.5931721", "text": "function url_exists($url, $method = null) {\n\t$old = ini_set('default_socket_timeout', 5);\n\n\tif ($method) {\n\t\t// By default get_headers uses a GET request to fetch the headers.\n\t\t// If you want to send a HEAD request instead,\n\t\t// you can change method with a stream context\n\t\tstream_context_set_default(\n\t\tarray(\n 'http' => array(\n 'method' => $method\n\t\t)\n\t\t)\n\t\t);\n\t}\n\n\t$headers = @get_headers($url);\n\tini_set('default_socket_timeout', $old);\n\treturn (preg_match(\"|200|\", $headers[0]));\n}", "title": "" }, { "docid": "9e49656cedbcde952b364434d7540c00", "score": "0.592745", "text": "public function isHead()\n {\n return $this->head;\n }", "title": "" }, { "docid": "141c4655c67ba0af7619e2b60a7a3e6f", "score": "0.5922543", "text": "public function performHead($url, $arguments, $accept);", "title": "" }, { "docid": "7b01963e69e59938a68cbaf0d44d5485", "score": "0.5900991", "text": "public function testRouteSpecifyingGetMatchesHead()\n {\n $route = new Route('/foo', 'foo', ['GET']);\n\n $uri = $this->prophesize(UriInterface::class);\n $uri->getPath()->willReturn('/foo');\n\n $request = $this->prophesize(ServerRequestInterface::class);\n $request->getUri()->willReturn($uri);\n $request->getMethod()->willReturn('HEAD');\n\n // This test needs to determine what the default dispatcher does with\n // HEAD requests when the route does not support them. As a result,\n // it does not mock the router or dispatcher.\n $router = new FastRouteRouter();\n $router->addRoute($route); // Must add, so we can determine middleware later\n $result = $router->match($request->reveal());\n $this->assertInstanceOf(RouteResult::class, $result);\n $this->assertTrue($result->isSuccess());\n }", "title": "" }, { "docid": "33b3ea9ab6ecbeaa1053fdba94fca968", "score": "0.586499", "text": "public function hasHeaders();", "title": "" }, { "docid": "65a941a10d4399e77b4d642dd1cd0a65", "score": "0.58501434", "text": "public function hasHead(){\n return $this->_has(10);\n }", "title": "" }, { "docid": "4981d644111586e2070281ae559aedb9", "score": "0.5826952", "text": "function is_url( $url ) {\n\tif ( ( $url == '' ) || ( $url == null ) ) {\n\t\treturn false; }\n\t$response = wp_remote_head( $url, array( 'timeout' => 5 ) );\n\t$accepted_status_codes = array( 200, 301, 302 );\n\tif ( ! is_wp_error( $response ) && in_array( wp_remote_retrieve_response_code( $response ), $accepted_status_codes ) ) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "36f45953923dc4bb024ac80e66edaad7", "score": "0.58213603", "text": "function is_url_exist($url){\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n if($code == 200){\n $status = true;\n }else{\n $status = false;\n }\n curl_close($ch);\n return $status;\n}", "title": "" }, { "docid": "ef4276e12e6e06f2a47165c2bc1e1e90", "score": "0.5819392", "text": "function test_head_redirect() {\n\t\t$url = 'http://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';\n\t\t$response = wp_remote_head( $url );\n\t\t$this->assertEquals( '301', wp_remote_retrieve_response_code( $response ) );\n\t}", "title": "" }, { "docid": "c047f5c617bd3246ae0b4fd0bcd60f87", "score": "0.58121085", "text": "public function hasRequest();", "title": "" }, { "docid": "9d8156c99f9e0d86acd3c8d30b35a734", "score": "0.57684064", "text": "public function isGet()\n {\n return $this->method() === \"GET\";\n }", "title": "" }, { "docid": "ec47fb348213ac59a482c829a96cc4b2", "score": "0.57626456", "text": "function url_exists($url){\n $ch = curl_init($url); \n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n if($code == 200){\n $status = true;\n }else{\n $status = false;\n }\n curl_close($ch);\n return $status;\n}", "title": "" }, { "docid": "3dfb194bc9735a74847da3035dcf0944", "score": "0.5757922", "text": "public function head($uri = null, $headers = array())\n {\n return $this->request('HEAD', $uri, null, $headers);\n }", "title": "" }, { "docid": "eb35baa1d49985840982a947ae80f9e7", "score": "0.57386494", "text": "public function isGet(): bool\n {\n return $this->method() === 'GET';\n }", "title": "" }, { "docid": "a2f7fdd1f92a2a19eafc79e6b01e64ed", "score": "0.57157403", "text": "function url_exists($url) {\n $getHeaders = @get_headers($url);\n if (preg_match(\"|200|\", $getHeaders[0])) {\n // file exists\n return TRUE;\n } else {\n // file doesn't exists\n return FALSE;\n }\n}", "title": "" }, { "docid": "635c258303556492992bf05bc5eb0a06", "score": "0.57049596", "text": "public function head() { \n $response = $this->get(); \n $response->setContent(null);\n return $response;\n }", "title": "" }, { "docid": "169439f4eba472dc6197089feb414aab", "score": "0.5693674", "text": "public function doGet()\n {\n // First, ETag Validation\n $etags = $this->request->getIfNoneMatch();\n\n foreach( $etags as $etag )\n {\n if( $etag === $this->getEtag() )\n {\n return false;\n }\n }\n\n // Second, Modification Date Validation\n $ifModifiedSince = $this->request->getIfModifiedSince();\n\n if( $ifModifiedSince && $this->request->attemptedEtag('if-none-match') === false )\n {\n if( $ifModifiedSince->getTimestamp() >= $this->getLastModified()->getTimestamp() )\n {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "111099cd2718b4fa62504800c69d1307", "score": "0.5690866", "text": "function request_is_get() {\n\treturn $_SERVER['REQUEST_METHOD'] === 'GET';\n}", "title": "" }, { "docid": "79f261a010fbe67e7b5eb15b8876b6ee", "score": "0.5686916", "text": "function wpr_remote_check_file( $remote_file_path ) {\n\tif ( ! filter_var( $remote_file_path, FILTER_VALIDATE_URL ) === false ) {\n\t\tstream_context_set_default(\n\t\t\tarray(\n\t\t\t\t'http' => array(\n\t\t\t\t\t'method' => 'HEAD'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$headers = get_headers( $remote_file_path, 1 );\n\t\t$file_found = stristr( $headers[0], '200' ); // Returns all of haystack starting from and including the first occurrence of needle to the end. In our case \"200 OK\" If everything is ok.\n\t\tif ( $file_found ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "9ed132a72d429ce946901e6f81dd099c", "score": "0.56810117", "text": "function checkURLexists( $url ){\n $ret = FALSE;\n $header = get_headers(urldecode($url));\n if ( preg_match('/HTTP|200/i',$header[0]) ){\n // When matched, URL Exists\n $ret = TRUE;\n }\n return $ret;\n}", "title": "" }, { "docid": "c725a0494ec14541436154605aa8fc12", "score": "0.56794834", "text": "public function head($url)\n {\n curl_setopt($this->_oCurlSession, CURLOPT_NOBODY, 1);\n $this->url($url);\n return $this->exec();\n }", "title": "" }, { "docid": "5873fdc414b2801ddac874f07b3b7b34", "score": "0.565003", "text": "public function isGet()\r\n {\r\n return $this->isMethod('GET');\r\n }", "title": "" }, { "docid": "b028b2a9b7457322c102947d72547304", "score": "0.56495327", "text": "function is_get_request(){\n return $_SERVER['REQUEST_METHOD'] == 'GET';\n }", "title": "" }, { "docid": "e189e2ea2ad595561783bb390da162cd", "score": "0.56332564", "text": "function is_get_request()\n{\n return $_SERVER['REQUEST_METHOD'] == 'GET';\n}", "title": "" }, { "docid": "4875395e5338be4e103eb381344082b0", "score": "0.5627065", "text": "public function isGetRequest(): bool\n {\n return isset($_SERVER['REQUEST_METHOD'])\n && !strcasecmp($_SERVER['REQUEST_METHOD'], 'GET');\n }", "title": "" }, { "docid": "d30690a5a69485509f571271a41c07f1", "score": "0.5627021", "text": "public function head($uri, $handler = null);", "title": "" }, { "docid": "fd8ce071a74ccfbd1d96911d73008ffc", "score": "0.56234944", "text": "function checkLink($url=null) {\n if ($url == null) { return false; }\n // Initialize the curl call\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n // Execute the call and close the call\n curl_exec($ch);\n $status = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));\n curl_close($ch);\n // Return the code as an integer value\n return $status;\n}", "title": "" }, { "docid": "797ba0bbf923408b6c29d327cd72040f", "score": "0.56229603", "text": "public function isRedirect()\n {\n return $this->statusCode() >= 300 && $this->statusCode() < 400;\n }", "title": "" }, { "docid": "ed29557962d87a07a9c0943b10024721", "score": "0.5622208", "text": "public function isGet()\n {\n return $this->isMethod('GET');\n }", "title": "" }, { "docid": "7fa34a9465bba9107441fbf7800e2839", "score": "0.5615756", "text": "public function isGet()\n\t{\n\t\treturn ($this->server['REQUEST_METHOD'] == 'GET');\n\t}", "title": "" }, { "docid": "714fea6937f87dd75e05adba6f774408", "score": "0.55970156", "text": "public function hasHeader(): bool\n {\n return false;\n }", "title": "" }, { "docid": "8e10054fd680a53ba2cf0caaddb52497", "score": "0.55872816", "text": "function isValidUrl($url){\n \n $response = array();\n //Check if URL is empty\n if(!empty($url)) {\n $response = get_headers($url);\n }\n return (bool)in_array(\"HTTP/1.1 200 OK\", $response, true);\n\n }", "title": "" }, { "docid": "09cded741fdf59ba348d69e15ec1d14f", "score": "0.5581664", "text": "function isGetRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET' );\r\n}", "title": "" }, { "docid": "61f18730e12ead1b182a30f259fe0fe2", "score": "0.55726695", "text": "public function isPatch(): bool\n {\n return $this->method() === 'PATCH';\n }", "title": "" }, { "docid": "da77805355f685cba44d8a6e030d7c8a", "score": "0.55707455", "text": "public function isGET(): bool {\n\t\treturn $this->method === HttpRoute::METHOD_GET;\n\t}", "title": "" }, { "docid": "80e44e68d0569760608a69ac1fbb4a68", "score": "0.5569609", "text": "public function isGet() {\n\t\treturn $this->is('GET');\n\t}", "title": "" }, { "docid": "2d16522d37015f9bab3a6e1e631eb539", "score": "0.55662805", "text": "public function hasHeader($name);", "title": "" }, { "docid": "c1be6ec113173692f6eb783e34c7f944", "score": "0.5563274", "text": "function isGetRequest() {\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET' );\n}", "title": "" }, { "docid": "c1be6ec113173692f6eb783e34c7f944", "score": "0.5563274", "text": "function isGetRequest() {\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET' );\n}", "title": "" }, { "docid": "c1be6ec113173692f6eb783e34c7f944", "score": "0.5563274", "text": "function isGetRequest() {\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET' );\n}", "title": "" }, { "docid": "510f6c3a567b6daddd1f715fb110fc5b", "score": "0.55427456", "text": "public function isGet(){\n return $this->getMethod() === \"GET\";\n }", "title": "" }, { "docid": "9cd367fe52aa9dc5385dda342e9c68a7", "score": "0.55397403", "text": "public function isGet()\n {\n if ('GET' == $this->getMethod()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "4458f042ad01c573e688af611c1a72a7", "score": "0.55150056", "text": "protected function _valid()\n {\n /**\n * HTTP Status Code\n * \n */\n $validHTTPCodes = $this->_options['validHTTPCodes'];\n if (in_array($this->_headInfo['http_code'], $validHTTPCodes) === false) {\n $this->_error = array(\n 'code' => 'CUSTOM_HTTPSTATUSCODE',\n 'message' => ($this->_headInfo['http_code']) .\n ' status code received while trying to retrieve ' .\n ($this->_headInfo['url'])\n );\n return false;\n }\n\n /**\n * Mime\n * \n */\n $mimes = $this->getMimes();\n $pieces = explode(';', $this->_headInfo['content_type']);\n $mime = current($pieces);\n if (in_array($mime, $mimes) === false) {\n $mime = current(explode(';', $this->_headInfo['content_type']));\n $accepted = implode(', ', $this->getMimes());\n $this->_error = array(\n 'code' => 'CUSTOM_MIME',\n 'message' => 'Mime-type requirement not met. Resource is ' .\n ($mime) . '. You were hoping for one of: ' .\n ($accepted) . '.',\n );\n return false;\n }\n\n /**\n * Filesize\n * \n */\n $maxFilesize = (int) $this->_options['maxFilesize'];\n $contentLength = (int) $this->_headInfo['download_content_length'];\n if ($contentLength > $maxFilesize) {\n $this->_error = array(\n 'code' => 'CUSTOM_FILESIZE',\n 'message' => 'File size limit reached. Limit was set to ' .\n ($maxFilesize) . '. Resource is ' . ($contentLength)\n );\n return false;\n }\n\n // Done\n return true;\n }", "title": "" }, { "docid": "e271d4eafdb72cb46c3cb5253d39a857", "score": "0.55122596", "text": "public static function urlUp($url)\n {\n $fileHeaders = @get_headers($url);\n\n return ($fileHeaders[0] == 'HTTP/1.1 200 OK');\n }", "title": "" }, { "docid": "e764fa0ca92701fc8332374622a7f88a", "score": "0.55109197", "text": "function head($status = 204, $headers = [])\n{\n return new Response\\EmptyResponse($status, $headers);\n}", "title": "" }, { "docid": "b84c7c46db8aaf664576f080df81530f", "score": "0.5509499", "text": "public function exists(string $path): bool\n\t{\n\t\t$response = $this->sendRequest($this->getFilePath($path), self::METHOD_HEAD);\n\n\t\treturn $response->getStatusCode() === self::STATUS_200_OK;\n\t}", "title": "" }, { "docid": "4a3f1d1830432005ca39e1aaed832f36", "score": "0.5494249", "text": "public function isEmpty()\n {\n return in_array($this->status, array(201, 204, 304));\n }", "title": "" }, { "docid": "3fd36e4769ee063c3a4afd993381b1f9", "score": "0.54916155", "text": "public function head($url, array $params=array())\n {\n $params = array_merge($this->apiKey, $params);\n\n return $this->client->request('HEAD', $url, $params, $this->headers);\n }", "title": "" }, { "docid": "be09cc102d1f5dd90640626b22565bf9", "score": "0.54889214", "text": "public function head($url, $params = array())\n {\n $params['url'] = $url;\n $params['header'] = true;\n $params['nobody'] = true;\n return $this->request($params);\n }", "title": "" }, { "docid": "940fd3dae77dadc7709d722821d1eed3", "score": "0.54846954", "text": "protected function hasHeaders(): bool\n {\n return $this->origin || $this->sameOrigin;\n }", "title": "" }, { "docid": "6a50a8ef495cbf6873497c59a908eb16", "score": "0.5474673", "text": "private function url_exists($url) {\n\t $hdrs = @get_headers($url);\n\t return is_array($hdrs) ? preg_match('/^HTTP\\\\/\\\\d+\\\\.\\\\d+\\\\s+2\\\\d\\\\d\\\\s+.*$/',$hdrs[0]) : false;\n\t}", "title": "" }, { "docid": "1f9cb79a62862fe8b8ffa04c88010072", "score": "0.5468021", "text": "public function head($url, array $params=array());", "title": "" }, { "docid": "227cc27f6b618bcbf011a72d7cf87e0a", "score": "0.5463274", "text": "public static function isGetRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET' );\r\n }", "title": "" }, { "docid": "6b0dc0d835e07a6d8ac57f5b225fbca3", "score": "0.54625154", "text": "public function head(string $url): self\n {\n $this->setMethod(\"HEAD\")->request($url);\n\n return $this;\n }", "title": "" }, { "docid": "8822ef21ed0d54a6b1ce4703c58f4632", "score": "0.54614544", "text": "public function isGet() {\n return 'GET' === $this->getMethod();\n }", "title": "" }, { "docid": "09615edc947c287f028125ae9fb1524c", "score": "0.54598457", "text": "public function isPreflightRequest(Request $request): bool;", "title": "" }, { "docid": "16d4f4c9b34458e61ef5770d6b29953e", "score": "0.54573363", "text": "function request_is_get(){\n return $_SERVER['REQUEST_METHOD'] == 'GET';\n}", "title": "" }, { "docid": "a69c8afcb6b4ba7f74ddb4787e90d7b4", "score": "0.54499555", "text": "function check_if_alive($url) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($ch);\n $headers = curl_getinfo($ch);\n curl_close($ch);\n\n if(in_array($headers['http_code'], array(\"200\", \"301\", \"302\"))) return true;\n else return false;\n}", "title": "" } ]
9af50ad9428152260f855a852dbd1efe
Validates a given code, optionally for a given timestamp and future window.
[ { "docid": "6dd889444a8ff280772ede609a5f5c33", "score": "0.7064338", "text": "public function validateCode(string $code, int $window = null) : bool;", "title": "" } ]
[ { "docid": "df092f853272dec22ba135b4a20a9004", "score": "0.574835", "text": "public function validate($code)\n {\n $aux = explode('-', $this->getSessionValue());\n //si no existe el momento en que se creo el captcha => no es valido\n if (!isset($aux[1])) {\n return false;\n }\n //si el captcha se creo hace mas tiempo que el permitido => no es valido\n $timeDiff = ceil(microtime(true) - $aux[1]);\n if ($timeDiff > $this->ttl) {\n return false;\n }\n //si los codigos no son iguales => no es valido\n return ($aux[0] == $this->cleanAndSanitize($code));\n }", "title": "" }, { "docid": "8cad26c0d69d706699a60c0dc6fa91e3", "score": "0.53967124", "text": "public function checkCodeValidation($code) {\n $this->db->query('SELECT * FROM members WHERE activation_code = :activation_code');\n $this->db->bind(':activation_code', $code);\n $member = $this->db->single();\n // Check row\n if ($this->db->rowCount() > 0) {\n if (($member->request_password_time + 86400) > time()) {\n return true;\n } else {\n return FALSE;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f6f510b4ea52ddd4e9faa5b88a758aa9", "score": "0.52601165", "text": "function wpus_verify_pwreset_request ($email, $code) {\n\tglobal $wpdb, $wpus;\n\n\t// get the current time using PHP (so that the time zone is respected)\n\t$now = new DateTime();\n\t$nowSQL = $now->format('Y-m-d H:i:s');\n\n\t// look for a code that fits!\n\t$query = $wpdb->prepare( \"SELECT * FROM $wpus->pwreset_requests WHERE `email`=%s AND `code`=%s AND `expires` > %s\", $email, $code, $nowSQL );\n\n\tif ( ! $row = $wpdb->get_row( $query ) )\n\t\treturn false; // No data\n\n\t// the query returned something so the request is clearly valid\n\treturn true;\n}", "title": "" }, { "docid": "17878dc78024d180f1d622946b4a2134", "score": "0.52379984", "text": "public function isValidCode($code){\n return ( $this->phone_verification_expires_at > now() ) && ( md5($code) == $this->phone_verification_code);\n }", "title": "" }, { "docid": "2deb88ba65678724f3fe39f9d05e0650", "score": "0.5237429", "text": "public function is_reset_code_valid()\n\t{\n\t\t$code = $this->reset_code;\n\t\t$time = $this->reset_created_at;\n\t\t$timeout = $time + (60 * 60 * 24 * 7); // 7 days\n\n\t\tif (! isset($code) or empty($code))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// reset expired\n\t\tif (! isset($time) or $timeout < time())\n\t\t{\n\t\t\t$this->empty_reset_code();\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ba5a439f6865e00edaede0c3b8fc929a", "score": "0.51396835", "text": "private function _validate()\n {\n $this->_newTimestampIsValidTimestamp();\n $this->_newTimestampHasNotChanged();\n $this->_adjustedTimeIsInConflictWithPreviousTimestamp();\n $this->_adjustedTimeIsInConflictWithNextTimestamp();\n }", "title": "" }, { "docid": "e6e08659183d9879f08c39ee8d328ce3", "score": "0.511738", "text": "public function checkValidTimestamp($timestamp)\n {\n $prevdaytimestamp = mktime(23, 59, 59, date(\"m\"), (date(\"d\") - 1), date(\"Y\"));\n if ($timestamp <= $prevdaytimestamp) {\n // Message\n $this->getSyncInstance()->addOkMessage($this->getGCMesgPrefixed($this->getSyncInstance()->getSyncLabels('stage.gc.proc.valid_timestamp')));\n\n return true;\n }\n\n // Message\n $this->getSyncInstance()->addErrorMessage($this->getGCMesgPrefixed($this->getSyncInstance()->getSyncLabels('stage.gc.proc.error_timestamp_less_than_today')));\n\n return false;\n }", "title": "" }, { "docid": "cb1513f753d59dda96f1cf3cfb0d564c", "score": "0.5073899", "text": "function isValidTimeStamp($timestamp)\n{\n if(strlen($timestamp) === 10)\n {\n return ((string) (int) $timestamp === $timestamp) \n && ($timestamp <= PHP_INT_MAX)\n && ($timestamp >= ~PHP_INT_MAX);\n }\n else\n {\n return false;\n }\n}", "title": "" }, { "docid": "72a0daafc10143ba1f01f4e50c22c1a0", "score": "0.50634265", "text": "function LOG_CODE_validate($log_code)\n\t{\n\treturn in_array($log_code,LOG_CODE_get_all());\n\t}", "title": "" }, { "docid": "5e7446e51222fedf68f17eccc5953bc9", "score": "0.5009543", "text": "function validateDateTime($year, $month, $day, $hours, $minutes, $seconds = null) {\n\treturn !($month < 1 || $month > 12\n\t\t\t|| $day < 1 || $day > 31 || (($month == 4 || $month == 6 || $month == 9 || $month == 11) && $day > 30)\n\t\t\t|| ($month == 2 && ((($year % 4) == 0 && $day > 29) || (($year % 4) != 0 && $day > 28)))\n\t\t\t|| $hours < 0 || $hours > 23\n\t\t\t|| $minutes < 0 || $minutes > 59\n\t\t\t|| (!is_null($seconds) && ($seconds < 0 || $seconds > 59)));\n}", "title": "" }, { "docid": "adfb8dbf6622aa9c0f52533c27d0b6a6", "score": "0.49824658", "text": "public function check($data){\n $code = $this->decrypt($data);\n $createdAt = Carbon::parse($code->created_at);\n if(Carbon::now()->subMinutes($code->expires)->gt($createdAt)) {\n return false;\n }\n return $code;\n }", "title": "" }, { "docid": "0226c04bc292aa80e94abd7dd0772d89", "score": "0.49727738", "text": "function qa_check_form_security_code($action, $value)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\t$reportproblems = array();\n\t$silentproblems = array();\n\n\tif (!isset($value)) {\n\t\t$silentproblems[] = 'code missing';\n\n\t} elseif (!strlen($value)) {\n\t\t$silentproblems[] = 'code empty';\n\n\t} else {\n\t\t$parts = explode('-', $value);\n\n\t\tif (count($parts) == 3) {\n\t\t\t$loggedin = $parts[0];\n\t\t\t$timestamp = $parts[1];\n\t\t\t$hash = $parts[2];\n\t\t\t$timenow = qa_opt('db_time');\n\n\t\t\tif ($timestamp > $timenow) {\n\t\t\t\t$reportproblems[] = 'time ' . ($timestamp - $timenow) . 's in future';\n\t\t\t} elseif ($timestamp < ($timenow - QA_FORM_EXPIRY_SECS)) {\n\t\t\t\t$silentproblems[] = 'timeout after ' . ($timenow - $timestamp) . 's';\n\t\t\t}\n\n\t\t\tif (qa_is_logged_in()) {\n\t\t\t\tif (!$loggedin) {\n\t\t\t\t\t$silentproblems[] = 'now logged in';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($loggedin) {\n\t\t\t\t\t$silentproblems[] = 'now logged out';\n\t\t\t\t} else {\n\t\t\t\t\t$key = @$_COOKIE['qa_key'];\n\n\t\t\t\t\tif (!isset($key)) {\n\t\t\t\t\t\t$silentproblems[] = 'key cookie missing';\n\t\t\t\t\t} elseif (!strlen($key)) {\n\t\t\t\t\t\t$silentproblems[] = 'key cookie empty';\n\t\t\t\t\t} elseif (strlen($key) != QA_FORM_KEY_LENGTH) {\n\t\t\t\t\t\t$reportproblems[] = 'key cookie ' . $key . ' invalid';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (empty($silentproblems) && empty($reportproblems)) {\n\t\t\t\tif (!hash_equals(strtolower(qa_calc_form_security_hash($action, $timestamp)), strtolower($hash))) {\n\t\t\t\t\t$reportproblems[] = 'code mismatch';\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$reportproblems[] = 'code ' . $value . ' malformed';\n\t\t}\n\t}\n\n\tif (!empty($reportproblems) && QA_DEBUG_PERFORMANCE) {\n\t\t@error_log(\n\t\t\t'PHP studentrf form security violation for ' . $action .\n\t\t\t' by ' . (qa_is_logged_in() ? ('userid ' . qa_get_logged_in_userid()) : 'anonymous') .\n\t\t\t' (' . implode(', ', array_merge($reportproblems, $silentproblems)) . ')' .\n\t\t\t' on ' . @$_SERVER['REQUEST_URI'] .\n\t\t\t' via ' . @$_SERVER['HTTP_REFERER']\n\t\t);\n\t}\n\n\treturn (empty($silentproblems) && empty($reportproblems));\n}", "title": "" }, { "docid": "9d0c1f552e6c319eb238ba4d0e059724", "score": "0.49483323", "text": "public function isValidLoaApplication() {\n //scratch it: let everyone pass this time\n return true;\n\n\n //\ttrap invalid date range\n if (strtotime($this->from_datetime) >= strtotime($this->to_datetime)) {\n $this->addError('from_datetime', 'Invalid Date Range: Start Date must be less than the End Date');\n $this->addError('to_datetime', 'Invalid Date Range: End Date must be greater than the Start Date');\n Yii::log('LOA Invalid: Date Range!', 'error', 'app');\n return false;\n }\n\n //normalize the start and end datetime based on the scheduled shifts within that date period; validate if there are shifts within as well\n if ($this->normalizeLeavePeriod()) { //means there are adjustments to the dates\n //$this->addError('','normalizeLeavePeriod Error!');\n Yii::log('LOA Invalid: normalizeLeavePeriod!', 'error', 'app');\n return false;\n }\n\n // validate for VL Policy\t\n if ($this->job_code_id == '2003' and !$this->passVLPolicy($this->days_requested)) {\n //$this->addError('','VL-2003 Policy Error!');\n Yii::log('LOA Invalid: VL-2003!', 'error', 'app');\n return false;\n }\n //echo 'job_code = '.$this->job_code_id; exit();\n //validate for SL Policy\n if ($this->job_code_id == '2002' and !$this->passSLPolicy($this->days_requested)) {\n //$this->addError('','VL-2002 Policy Error!');\n Yii::log('LOA Invalid: VL-2002!', 'error', 'app');\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "20c43eb50d515b96c6ab25c1197602a8", "score": "0.49481624", "text": "static public function validate($datetime)\n {\n }", "title": "" }, { "docid": "e7f4143652393011a573a88e1f0d4884", "score": "0.49475086", "text": "public function ensureCode();", "title": "" }, { "docid": "dd23611286b1a393117a1448577ee935", "score": "0.49346727", "text": "private function _newTimestampIsValidTimestamp()\n {\n if (!RegexHandler::isTimestamp($this->timestamp->time_stamp)) {\n throw new Exception(\"Invalid timestamp format given\");\n }\n }", "title": "" }, { "docid": "2a1085bb33e9cd1dfb3e0a4a7de73b8d", "score": "0.4917228", "text": "function isValidSchedule($ts_id_begin, $ts_id_end, $pause_time_units)\n{\n\tif (($ts_id_begin >= 1)\t\t\t\t&& \n\t\t($ts_id_end >= 1)\t\t\t\t&&\n\t\t($pause_time_units >= 0)\t\t&&\n\t\t($ts_id_end >= $ts_id_begin)\t&&\n\t\t(($ts_id_end - $ts_id_begin + 1) * 15 - $pause_time_units * 30 > 0))\n\t{\n\t\treturn (true);\n\t}\n\telse\n\t{\n\t\treturn (false);\n\t}\n\n}", "title": "" }, { "docid": "5862e2bfaf4f3246cb8c0dfb0aa3f343", "score": "0.49130931", "text": "protected function validate()\n\t{\n\t\tif (!is_string($this->code) || strlen($this->code) == 0) {\n\t\t\t$code = $this->getCode(true);\n\t\t\t// returns stored code, or an empty string if no stored code was found\n\t\t\t// checks the session\n\t\t} else {\n\t\t\t$code = $this->code;\n\t\t}\n\t\tif (is_array($code)) {\n\t\t\tif (!empty($code)) {\n\t\t\t\t$ctime = $code['time'];\n\t\t\t\t$code = $code['code'];\n\t\t\t\t$this->_timeToSolve = time() - $ctime;\n\t\t\t} else {\n\t\t\t\t$code = '';\n\t\t\t}\n\t\t}\n\t\tif ($this->case_sensitive == false && preg_match('/[A-Z]/', $code)) {\n\t\t\t// case sensitive was set from securimage_show.php but not in class\n\t\t\t// the code saved in the session has capitals so set case sensitive to true\n\t\t\t$this->case_sensitive = true;\n\t\t}\n\t\t$code_entered = trim( (($this->case_sensitive) ? $this->code_entered\n\t\t: strtolower($this->code_entered))\n\t\t);\n\t\t$this->correct_code = false;\n\t\tif ($code != '') {\n\t\t\tif (strpos($code, ' ') !== false) {\n\t\t\t\t// for multi word captchas, remove more than once space from input\n\t\t\t\t$code_entered = preg_replace('/\\s+/', ' ', $code_entered);\n\t\t\t\t$code_entered = strtolower($code_entered);\n\t\t\t}\n\t\t\tif ((string)$code === (string)$code_entered) {\n\t\t\t\t$this->correct_code = true;\n\t\t\t\tif ($this->no_session != true) {\n\t\t\t\t\t$_SESSION['securimage_code_disp'] [$this->namespace] = '';\n\t\t\t\t\t$_SESSION['securimage_code_value'][$this->namespace] = '';\n\t\t\t\t\t$_SESSION['securimage_code_ctime'][$this->namespace] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "adc4836731df47e5efbcc4ce7a111bb0", "score": "0.49062887", "text": "public function verify($code)\n\t{\n\t\t$result = new Main\\Result();\n\n\t\t$attempts = (int)$this->code->getAttempts();\n\n\t\tif($attempts >= 3)\n\t\t{\n\t\t\t$result->addError(new Main\\Error(\"Retry count exceeded.\", \"ERR_RETRY_COUNT\"));\n\t\t\treturn $result;\n\t\t}\n\n\t\t$totp = new Main\\Security\\Mfa\\TotpAlgorithm();\n\t\t$totp->setInterval($this->checkInterval);\n\t\t$totp->setSecret($this->code->getOtpSecret());\n\n\t\t$otpResult = false;\n\t\ttry\n\t\t{\n\t\t\tlist($otpResult, ) = $totp->verify($code);\n\t\t}\n\t\tcatch(Main\\ArgumentException $e)\n\t\t{\n\t\t}\n\n\t\tif($otpResult)\n\t\t{\n\t\t\t$this->code->setDateSent(null);\n\t\t\t$this->code->setDateResent(null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result->addError(new Main\\Error(\"Incorrect code.\", \"ERR_CONFIRM_CODE\"));\n\n\t\t\t$this->code->setAttempts($attempts + 1);\n\t\t}\n\n\t\t$this->code->save();\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0ade5e253de161901ed94b752e159bbd", "score": "0.48865017", "text": "protected function validApiCode($code = 1000)\n {\n $apiCode = $this->apiCode();\n return (int)$apiCode === (int)$code;\n }", "title": "" }, { "docid": "f6b8bc179680b9aa18b3123ba301d9ba", "score": "0.48862687", "text": "function validateCode($inputCode, $email){\t\t\n\t$emailParameters = array(':mailadres' => \"$email\");\n\t$emailEquivalent = handleQuery(\"SELECT * FROM ActivatieCode WHERE mailadres = :mailadres\",$emailParameters)[0];\n\t// $emailEquivalent['code'] = trim($emailEquivalent['code']);\n\t$hashedCode = md5($inputCode); //hashed de code, zodat deze gecontroleerd kan worden met de gesahesde code binnen de database\n\n\tif ($emailEquivalent['code'] == $hashedCode){\n\t\t$state = true;\n\t} else {\n\t\t$state = false;\n\t}\n\treturn $state;\n}", "title": "" }, { "docid": "f0466766ab17450d85e7c6108a7bc31a", "score": "0.48704767", "text": "private function check_code ($code)\n\t\t{\n\t\t$received = (int) substr ($this->get_data (), 0, 3);\n\t\t\n\t\tif (in_array ($received, (array) $code))\n\t\t\t{\n\t\t\tlog::debug ('SMTP: Code check passed: ' . $received);\n\t\t\t\n\t\t\treturn true;\n\t\t\t}\n\t\t\n\t\tlog::debug ('SMTP: Code check failed. Expecting ' . implode (',', (array) $code) . ' but got ' . $received);\n\t\t\n\t\treturn false;\n\t\t}", "title": "" }, { "docid": "379753449542e7e722b37bc855de52a1", "score": "0.48560923", "text": "public function checkCode($code)\n {\n # Authenticate the google client\n $this->client->authenticate($code);\n # Get access token by retrieving it from the authenticated client and save it to the session\n HTTPSession::getInstance()->ACCESS_TOKEN = $this->client->getAccessToken();\n # Set the access token\n $this->setToken();\n }", "title": "" }, { "docid": "12b692fa0cc2f174dd9fdcc6033c863b", "score": "0.48351148", "text": "protected function validateBefore($identifier, mixed $value, ?array $option): bool\n {\n return Chronos::date($value)->travel($option['before']) > 0;\n }", "title": "" }, { "docid": "8131362743438c6f1e629f116965ab62", "score": "0.48076746", "text": "public function event_code_verify(){\n\t\t/* Variable initialization */\n\t\t$eventPublicCode \t= (!empty($this->input->post('event-code'))) ? $this->input->post('event-code',true) : '';\n\t\t$strResponseArr \t= array('message' => 'Requested event does not exist.', 'status' => false);\n\t\t$eventDataArr \t\t= array();\n\t\t\n\t\t/* if event code is passed then verify it */\n\t\tif (!empty($eventPublicCode)) {\n\t\t\t/* Get the event details by event code */\n\t\t\t$eventDataArr = $this->_checkEventPublicCodeExist($eventPublicCode);\n\t\t}\n\t\t\n\t\t/* if event details found then do needful */\n\t\tif (!empty($eventDataArr)) {\n\t\t\t/* debugVar($_SERVER, true); */\n\t\t\t/* sub domain formation */\n\t\t\t$newSiteUrl \t= str_replace(array('http','https', 's://', '://', 'www.', '/'), array(''), SITE_URL);\n\t\t\t$protocol\t\t= 'http://';\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') { \n\t\t\t\t$protocol\t\t= 'https://';\n\t\t\t} \n\t\t\t/* $protocol \t\t= strtolower(substr($_SERVER[\"SERVER_PROTOCOL\"],0,strpos( $_SERVER[\"SERVER_PROTOCOL\"],'/'))).'://'; */\n\t\t\t/* value overwriting */\n\t\t\t$strResponseArr = array('message' => 'Event Found. Redirecting to user feeds wall.', 'status' => true, 'destinationURL' => $protocol.$eventPublicCode.'.'.$newSiteUrl);\n\t\t}\n\t\t\n\t\t/* Return the response */\n\t\tjsonReturn($strResponseArr,true);\n\t}", "title": "" }, { "docid": "222b7345abffed5f05a05690742b0abe", "score": "0.48017314", "text": "public function testCheckingIsActiveWithFutureValidFrom()\n {\n $validFrom = new DateTime(\"+1 day\");\n $validTo = new DateTime(\"+1 week\");\n $token = new Token(1, \"\", $validFrom, $validTo, true);\n $this->assertFalse($token->isActive());\n }", "title": "" }, { "docid": "1d028273e8cc39d8e3bbd0a3ae2f98dc", "score": "0.4783012", "text": "function validity_check($date, $currentDate, $startTime, $currentTime) {\r\n //the below can be a single statement, since both conditions cant be true at once\r\n if ($date < $currentDate) {\r\n //echo \"selected date \" . $date . \" is before today!\";\r\n return -1;\r\n } elseif ($startTime < $currentTime && $currentDate == $date) {\r\n //echo \"start time is before current time, on current date\";\r\n return -2;\r\n } else {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "63cb5cc41099755303414a1c346c529a", "score": "0.47821668", "text": "function validatePsqlTimeStamp($psqltime) {\n $regex = \"....-..-.. ..:..:..\";\n \n if(preg_match(\"/^$regex$/\", $psqltime)) { \n return true; \n } else \n return false;\n }", "title": "" }, { "docid": "37d521386001d316e39de3dab5e47131", "score": "0.47811618", "text": "function DateCheck(string $start = \"\", string $end = \"\", string $factor = \"between\"){\n // vars\n $current_date = time();\n $startdate = strtotime($start);\n $enddate = strtotime($end);\n // check start date\n if($start !== \"\"):\n if($startdate < $current_date):\n $show_start = \"past\";\n else:\n $show_start = \"future\";\n endif;\n else:\n $show_start = \"empty\";\n endif;\n // check end date\n if($end !== \"\"):\n if($enddate >= $current_date):\n $show_end = \"future\";\n else:\n $show_end = \"past\";\n endif;\n else:\n // end date fallback\n $show_end = \"empty\";\n endif;\n\n // returning the validation\n if($factor == \"between\"):\n // if event started and still running\n if($show_start == \"past\" && $show_end == \"future\"):\n return true;\n else:\n return false;\n endif;\n elseif($factor == \"future\"):\n // if event is in the future\n if($show_start == \"future\" && $show_end == \"future\" || $show_start == \"future\" && $show_end == \"empty\"):\n return true;\n else:\n return false;\n endif;\n elseif($factor == \"past\"):\n // if event is in the past\n if($show_start == \"past\" && $show_end == \"past\" || $show_start == \"past\" && $show_end == \"empty\" || $show_start == \"empty\" && $show_end == \"past\"):\n return true;\n else:\n return false;\n endif;\n endif;\n }", "title": "" }, { "docid": "a705963bbd65630c3973b3a661cdce37", "score": "0.47538236", "text": "function check_reset_password_code($resetCode, $resetCodeTimeout, $input)\n{\n\n if (isNullOrEmptyString($resetCode)) {\n log_error(\"reset code is null or empty in database\");\n return false;\n }\n if (isNullOrEmptyString($input)) {\n log_error(\"input for reset code is null or empty in database\");\n return false;\n }\n\n // Verify the timeout\n if ($resetCodeTimeout < new \\DateTime()) {\n log_error(\"Reset code has timeout\");\n return false;\n }\n\n // We made it this far, compare the hashes\n $result = hash_equals($resetCode, $input);\n return $result;\n}", "title": "" }, { "docid": "009fe9484814396fe3bcc4f36c6202f6", "score": "0.47491798", "text": "function yourls_check_timestamp( $time ) {\r\n\t$now = time();\r\n\treturn ( $now >= $time && ceil( $now - $time ) < YOURLS_NONCE_LIFE );\r\n}", "title": "" }, { "docid": "dfc3b2c3b68a6e695a880ae91fed5d32", "score": "0.47396028", "text": "public function isValid() {\n $loc = __CLASS__ . '::' . __FUNCTION__;\n $mess = '';\n\n $evtId = isset( $this->event_ID ) ? $this->event_ID : '???';\n $mn = $this->match_num;\n $rn = $this->round_num;\n $home = $this->getHomeEntrant();\n $hname = isset($home) ? $home->getName() : 'unknown';\n $visitor = $this->getVisitorEntrant();\n $vname = isset($visitor) ? $visitor->getName() : 'unknown';\n $id = $this->title();\n $code = 0;\n\n if( !isset( $this->event_ID ) ) {\n $mess = __( \"$id must have an event id.\" );\n $code = 500;\n $this->log->error_log( $mess );\n } \n elseif ( !$this->isNew() && (!isset( $this->bracket_num ) || $this->bracket_num === 0 ) ) {\n $mess = __( \"$id must have a bracket number.\" );\n $code = 510;\n $this->log->error_log( $mess );\n }\n elseif( !isset( $this->round_num ) ) {\n $mess = __( \"$id must have a round number.\" );\n $code = 515;\n $this->log->error_log( $mess );\n }\n elseif( !$this->isNew() && ( !isset( $this->match_num ) || $this->match_num === 0 ) ) {\n $mess = __( \"Existing match $id must have a match number.\" );\n $code = 520;\n $this->log->error_log( $mess );\n }\n elseif( !isset( $this->match_type ) ) {\n $mess = __( \"$id must have a match type.\" );\n $code = 525;\n $this->log->error_log( $mess );\n }\n elseif( $this->round_num < 0 || $this->round_num > self::MAX_ROUNDS ) {\n $max = self::MAX_ROUNDS;\n $mess = __( \"$id round number not between 1 and $max (inclusive).\" );\n $code = 530;\n $this->log->error_log( $mess );\n }\n elseif( $this->round_num === 0 && ( !isset( $this->home ) || !isset( $this->visitor ) ) ) {\n $mess = __( \"$id is a round 0 match and must have both home and visitor entrants.\" );\n $code = 535;\n $this->log->error_log( $mess );\n }\n elseif( $this->round_num === 1 && !isset( $this->home ) ) {\n $mess = __( \"$id is a round 1 match and must have at least a home entrant.\" );\n $code = 540;\n $this->log->error_log( $mess );\n }\n\n if( false === MatchType::isValid( $this->match_type ) ) {\n $mess = __( \"{$id} - Match Type is invalid: {$this->match_type}\", TennisEvents::TEXT_DOMAIN );\n $code = 560;\n $this->log->error_log( $mess );\n }\n\n if( strlen( $mess ) > 0 ) throw new InvalidMatchException( $mess, $code );\n\n return true;\n }", "title": "" }, { "docid": "ff6329609c75eefa955a593978a9cd95", "score": "0.473206", "text": "public function verify($otp, $input, $window = null);", "title": "" }, { "docid": "616d88f80a91fe7ec674b13f5cb29717", "score": "0.4731916", "text": "function ValidateInputTime($input){\n if(preg_match('/^$|^(([01][0-9])|(2[0-3])):[0-5][0-9]$/', $input)){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "582cebaf8e1d4e3943d913e3fbe75245", "score": "0.47253746", "text": "public function testCheckingIsActiveWithPastValidFrom()\n {\n $validFrom = new DateTime(\"-1 week\");\n $validTo = new DateTime(\"+1 week\");\n $token = new Token(1, \"\", $validFrom, $validTo, true);\n $this->assertTrue($token->isActive());\n }", "title": "" }, { "docid": "f6a79c7055b39e2e71dd5bdcfc47bede", "score": "0.47214752", "text": "public static function isValueValid($value) : bool\n {\n if (! is_string($value)) {\n return false;\n }\n \n $regex = '#^'\n . '[0-9]{4}' // year\n . '-(01|02|03|04|05|06|07|08|09|10|11|12)' // month\n . '-(01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)' // day\n . 'T(00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23)' // hours\n . ':(00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59)' // minutes\n . ':(00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59)' // seconds\n . '(-|\\+)[0-9]{2}:[0-9]{2}' // timezone\n . '$#';\n \n return preg_match($regex, $value) === 1;\n }", "title": "" }, { "docid": "7678f1db446cd35843a1953e6e339d01", "score": "0.47046822", "text": "function pmpro_checkDiscountCode( $code, $level_id = null, $return_errors = false ) {\n\tglobal $wpdb;\n\n\t$error = false;\n\t$dbcode = false;\n\n\t// no code, no code\n\tif ( empty( $code ) ) {\n\t\t$error = __( 'No code was given to check.', 'paid-memberships-pro' );\n\t}\n\n\t// get code from db\n\tif ( ! $error ) {\n\t\t$dbcode = $wpdb->get_row( \"SELECT *, UNIX_TIMESTAMP(starts) as starts, UNIX_TIMESTAMP(expires) as expires FROM $wpdb->pmpro_discount_codes WHERE code ='\" . esc_sql( $code ) . \"' LIMIT 1\" );\n\n\t\t// did we find it?\n\t\tif ( empty( $dbcode->id ) ) {\n\t\t\t$error = __( 'The discount code could not be found.', 'paid-memberships-pro' );\n\t\t}\n\t}\n\n\t// check if the code has started\n\tif ( ! $error ) {\n\t\t// fix the date timestamps\n\t\t$dbcode->starts = strtotime( date_i18n( 'm/d/Y', $dbcode->starts ) );\n\t\t$dbcode->expires = strtotime( date_i18n( 'm/d/Y', $dbcode->expires ) );\n\n\t\t// today\n\t\t$today = strtotime( date_i18n( 'm/d/Y 00:00:00', current_time( 'timestamp' ) ) );\n\n\t\t// has this code started yet?\n\t\tif ( ! empty( $dbcode->starts ) && $dbcode->starts > $today ) {\n\t\t\t$error = sprintf( __( 'This discount code goes into effect on %s.', 'paid-memberships-pro' ), date_i18n( get_option( 'date_format' ), $dbcode->starts ) );\n\t\t}\n\t}\n\n\t// check if the code is expired\n\tif ( ! $error ) {\n\t\tif ( ! empty( $dbcode->expires ) && $dbcode->expires < $today ) {\n\t\t\t$error = sprintf( __( 'This discount code expired on %s.', 'paid-memberships-pro' ), date_i18n( get_option( 'date_format' ), $dbcode->expires ) );\n\t\t}\n\t}\n\n\t// have we run out of uses?\n\tif ( ! $error ) {\n\t\tif ( $dbcode->uses > 0 ) {\n\t\t\t$used = $wpdb->get_var( \"SELECT COUNT(*) FROM $wpdb->pmpro_discount_codes_uses WHERE code_id = '\" . $dbcode->id . \"'\" );\n\t\t\tif ( $used >= $dbcode->uses ) {\n\t\t\t\t$error = __( 'This discount code is no longer valid.', 'paid-memberships-pro' );\n\t\t\t}\n\t\t}\n\t}\n\n\t// if a level was passed check if this code applies\n\tif ( ! $error ) {\n\t\t$pmpro_check_discount_code_levels = apply_filters( 'pmpro_check_discount_code_levels', true, $dbcode->id );\n\t\tif ( ! empty( $level_id ) && $pmpro_check_discount_code_levels ) {\n\t\t\t// clean up level id for security before the database call\n\t\t\tif ( is_array( $level_id ) ) {\n\t\t\t\t$levelnums = array_map( 'intval', $level_id );\n\t\t\t\t$level_id = implode( ',', $levelnums );\n\t\t\t} else {\n\t\t\t\t$level_id = intval( $level_id );\n\t\t\t}\n\t\t\t$code_level = $wpdb->get_row( \"SELECT l.id, cl.*, l.name, l.description, l.allow_signups FROM $wpdb->pmpro_discount_codes_levels cl LEFT JOIN $wpdb->pmpro_membership_levels l ON cl.level_id = l.id WHERE cl.code_id = '\" . $dbcode->id . \"' AND cl.level_id IN (\" . $level_id . \") LIMIT 1\" );\n\n\t\t\tif ( empty( $code_level ) ) {\n\t\t\t\t$error = __( 'This discount code does not apply to this membership level.', 'paid-memberships-pro' );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Filter the results of the discount code check.\n\t *\n\t * @since 1.7.13.1\n\t *\n\t * @param bool $okay true if code check is okay or false if there was an error\n\t * @param object $dbcode Object containing code data from the database row\n\t * @param int $level_id ID of the level the user is checking out for.\n\t * @param string $code Discount code string.\n\t *\n\t * @return mixed $okay true if okay, false or error message string if not okay\n\t */\n\t$okay = ! $error;\n\t$pmpro_check_discount_code = apply_filters( 'pmpro_check_discount_code', $okay, $dbcode, $level_id, $code );\n\tif ( is_string( $pmpro_check_discount_code ) ) {\n\t\t$error = $pmpro_check_discount_code; // string returned, this is an error\n\t} elseif ( ! $pmpro_check_discount_code && ! $error ) {\n\t\t$error = true; // no error before, but filter returned error\n\t} elseif ( $pmpro_check_discount_code ) {\n\t\t$error = false; // filter is true, so error false\n\t}\n\n\t// return\n\tif ( $error ) {\n\t\t// there was an error\n\t\tif ( ! empty( $return_errors ) ) {\n\t\t\treturn array( false, $error );\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\t// guess we're all good\n\t\tif ( ! empty( $return_errors ) ) {\n\t\t\treturn array( true, __( 'This discount code is okay.', 'paid-memberships-pro' ) );\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "64d59a9890ab3dac2e9a98c62e204c26", "score": "0.4690065", "text": "static function test($video_code) {\n\t\treturn preg_match('~(https?:)?//(.+)?(wistia\\.com|wistia\\.net|wi\\.st)/.*~i', $video_code);\n\t}", "title": "" }, { "docid": "695f8895674af950ef9fe581aa12d9f8", "score": "0.4681449", "text": "protected function _timestampCheck() {\n $timestamp = $this->input->get('timestamp');\n\n // Verify the provided timestamp\n $sha1 = sha1($timestamp . $this->_secret);\n if ($this->input->get('timestamp_secret') != $sha1) {\n // Wrong hash, spammed.\n return false;\n }\n\n // Compare timestamps. Anything less than 5 seconds is considered as spam.\n if (time() - $timestamp < 5) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "6758a3c46ef2090dffd4e881a95f75ca", "score": "0.4666593", "text": "function CheckText($text, $chat_id, $telegram){\r\n\tglobal $code;\r\n\t$iscode = preg_match('/^[0-9]{5}$/', $text) ? true : false;\r\n\tswitch ( $text ) {\r\n\t\tcase $iscode:\r\n\t\t\t$code = $text;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn $code;\r\n}", "title": "" }, { "docid": "013ebabc19bf4a310cd19a48fe73541e", "score": "0.46546867", "text": "public function timeIsValid($start, $stop);", "title": "" }, { "docid": "7ab014be0724e47eef6f91ed48db7146", "score": "0.463981", "text": "function verifyCPFT($ident, array $requirements, array $actual) {\n $query =\"SELECT TEST_CODE FROM CPFT_TEST_TYPES WHERE IS_RUNNING=TRUE\"; //gets the tests that are running\n $running = allResults(Query($query, $ident));\n $query = \"SELECT TEST_CODE FROM CPFT_TEST_TYPES WHERE IS_RUNNING=FALSE\"; //gets non-running events\n $non_running= allResults(Query($query, $ident));\n $counter=0;\n $running_passed=false;\n for($i=0;$i<count($running);$i++) { //check if passed running element\n $buffer=$running[$i]['TEST_CODE'];\n if($buffer=='MR'&&!is_numeric($actual[$buffer])) {\n $actual[$buffer]= parseMinutes($actual[$buffer]); //if it's a mile rule then convert it to decimal\n }\n if(isset($actual[$buffer],$requirements[$buffer])&&$actual[$buffer]>=$requirements[$buffer])\n $counter++;\n if($buffer=='RS'&&isset($actual[$buffer],$requirements[$buffer])&&$actual[$buffer]<=$requirements[$buffer])\n $counter++;\n if($counter>=CPFT_RUNNING_REQ) { //if passed the running req say so then break\n $running_passed=true;\n break;\n }\n }\n $counter=0;\n for($i=0;$i<count($non_running);$i++) { //check non-running events\n $buffer=$non_running[$i]['TEST_CODE'];\n if(isset($actual[$buffer],$requirements[$buffer])&&$actual[$buffer]>=$requirements[$buffer]) {\n $counter++;\n }\n if($counter>=CPFT_OTHER_REQ) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "c96ea33f18d9264242e984fb2e217022", "score": "0.46352124", "text": "protected function validRequestTime()\n\t{\n\t\treturn now() > $this->getRequestTime();\n\t}", "title": "" }, { "docid": "bcb58708e8fe8d1cd16a4fad715b946d", "score": "0.4627568", "text": "private function _safeCheckSyntax ($code)\r\n\t{\r\n\t\t$code = trim(str_replace(\"pbel.\", \"\", $code));\r\n\t\t$code = \"return true;\\n\" . $code;\r\n\t\tif (!$code) return false;\r\n\t\t\r\n\t\tob_start();\r\n\t\t$eval = @eval($code);\r\n\t\tif ($eval === false) {\r\n\t\t\tob_end_clean();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tob_end_clean();\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "91802a04ce41724e109a1c8a6d16aa60", "score": "0.46257427", "text": "function inside_schedule_window($hour = null)\n{\n $time = $hour ?? (int)date(\"H\");\n $windows = jj_scheduled_hours();\n if (in_array($time, $windows)) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "526489c1340b84b557d7855594d88121", "score": "0.46247995", "text": "function validateTimeOnObject()\n{\n for ($i = 0; $i < 11; $i++) {\n if ($GLOBALS['timeOnObject'] == \"0:0:$i\") {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "d786427c2c0506ef646917499706826c", "score": "0.4620682", "text": "private function http_code_check($code) {\n\t\t$http_code_check = $this->config->get_endpoint_setting('http_code_check');\n\n\t\t// if returned code doesn't start with the ok code\n\t\tif (!empty($http_code_check) && strpos($code, $http_code_check) !== 0)\n\t\t\tthrow new SDKlessException(\"failed http code check\");\n\t}", "title": "" }, { "docid": "ff61b44567d8d3f5f5c49b959d98cc2c", "score": "0.46205455", "text": "protected function _validateCaptchaMinTime($data) {\n\t\tif ($this->settings[$this->Model->alias]['minTime'] <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (isset($data['captcha_hash']) && isset($data['captcha_time'])) {\n\t\t\tif ($data['captcha_time'] < time() - $this->settings[$this->Model->alias]['minTime']) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "087994af9c1aae701ec281afe7802023", "score": "0.46102726", "text": "public function testCodeMaxLengthValid()\n {\n $value = \"\";\n for ($i = 0; $i < $this->max_valid_strlen; $i++) {\n $value .= $this->first_char;\n }\n $this->flight->code = $value;\n $this->assertLessThanOrEqual($this->max_valid_strlen, strlen($this->flight->code));\n }", "title": "" }, { "docid": "8b35a178d590dd1339d0d152f896a4d5", "score": "0.45911965", "text": "public function testInvalidPastDate()\n {\n $this->validator->validate('2018-01-11 12:22:11', new InFutureDateTime());\n $this->assertSame(1, $violationsCount = \\count($this->context->getViolations()));\n }", "title": "" }, { "docid": "7b602904b1c59ba8f7168f990e0d725b", "score": "0.4578393", "text": "protected function validate()\n {\n if (!is_string($this->code) || strlen($this->code) == 0) {\n $code = $this->getCode();\n // returns stored code, or an empty string if no stored code was found\n // checks the session and sqlite database if enabled\n } else {\n $code = $this->code;\n }\n\n if ($this->case_sensitive == false && preg_match('/[A-Z]/', $code)) {\n // case sensitive was set from securimage_show.php but not in class\n // the code saved in the session has capitals so set case sensitive to true\n $this->case_sensitive = true;\n }\n\n $code_entered = trim( (($this->case_sensitive) ? $this->code_entered\n : strtolower($this->code_entered))\n );\n $this->correct_code = false;\n\n if ($code != '') {\n if ($code == $code_entered) {\n $this->correct_code = true;\n if ($this->no_session != true) {\n $_SESSION['securimage_code_value'][$this->namespace] = '';\n $_SESSION['securimage_code_ctime'][$this->namespace] = '';\n }\n $this->clearCodeFromDatabase();\n }\n }\n }", "title": "" }, { "docid": "077ce6bebb5a0617245b1db9dad8ee89", "score": "0.45730975", "text": "public function check($value): bool\n {\n $this->requireParameters($this->fillableParams);\n $time = $this->parameter('time');\n\n if (!$this->isValidDate($value)) {\n throw $this->throwException($value);\n }\n\n if (!$this->isValidDate($time)) {\n throw $this->throwException($time);\n }\n\n return $this->getTimeStamp($time) < $this->getTimeStamp($value);\n }", "title": "" }, { "docid": "d7b9c0210669af61d92522866358109b", "score": "0.4565812", "text": "public function verifyCode($secret, $code, $discrepancy = 1, $currentTimeSlice = null)\r\n {\r\n if ($currentTimeSlice === null) {\r\n $currentTimeSlice = floor(time() / 30);\r\n }\r\n\r\n if (strlen($code) != 6) {\r\n return false;\r\n }\r\n\r\n for ($i = -$discrepancy; $i <= $discrepancy; ++$i) {\r\n $calculatedCode = $this->getCode($secret, $currentTimeSlice + $i);\r\n if ($this->timingSafeEquals($calculatedCode, $code)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "3293faf789132f471f207a1da8e5698d", "score": "0.4549261", "text": "function meetupDataIsValid($data) {\n return true;\n}", "title": "" }, { "docid": "7060bcfc62fee50e3d14fde4749b7a79", "score": "0.45469183", "text": "private function validateDateTime($data){\n return (DateTime::createFromFormat('Y-m-d H:i:s', $data) !== false);\n }", "title": "" }, { "docid": "85cdbf03e4ff9681f67de163dbb97577", "score": "0.4545217", "text": "function validate_date($input){\n $validateStatus = preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$input);\n return $validateStatus !== false ? true : false;\n}", "title": "" }, { "docid": "d698f17280469c6ba6afb30d1a99a4b7", "score": "0.4543374", "text": "abstract protected function _validateCardType($code);", "title": "" }, { "docid": "93e4e65dd08d2e0a4b99dff6585c9f1c", "score": "0.45363048", "text": "function checkSchedule($startt,$endt,$mdate,$rID) {\n return checkOverlap($startt,$endt,$mdate,$rID);\n}", "title": "" }, { "docid": "d038c555e43225e9e6d8b23622dd1d99", "score": "0.45317206", "text": "public function valid()\n {\n\n if (strlen($this->container['localTime']) > 255) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "36887605070519cfebf7256a3afc1901", "score": "0.45236686", "text": "function MAX_checkTime_Date($limitation, $op)\n{\n\t\n\tif ($limitation == '' && $limitation == '00000000') {\n return true;\n }\n \n\t\n\t$timestamp \t\t= time();\n\t$date \t\t\t= date('Ymd', $timestamp);\n switch ($op) {\n case '==': return ($date == $limitation); break;\n case '!=': return ($date != $limitation); break;\n case '<=': return ($date <= $limitation); break;\n case '>=': return ($date >= $limitation); break;\n case '<': return ($date < $limitation); break;\n case '>': return ($date > $limitation); break;\n }\n return true;\n}", "title": "" }, { "docid": "e813877081cca85458e5f707fd74c9cf", "score": "0.45234057", "text": "function validate(string $ean_code):bool {\n if (!preg_match(\"/^[0-9]{13}$/\", $ean_code)) {\n return [false, \"The mentioned EAN13 code does not have 13 numeric characters\"];\n }\n $code = substr($ean_code, 0, 12);\n // alternative to check validity:\n // return ($ean_code[12] + $ean_chk) % 10 == 0;\n $ean_chk = self::get_check_digit($code);\n if ($ean_chk == $ean_code[12]) {\n return [true, 'Valid EAN13'];\n } else {\n return [false, sprintf('Invalid check digit %s<>%s', $ean_chk, $ean_code[12])];\n }\n }", "title": "" }, { "docid": "5b7742bc30642d5f19ac5cc94f9fd462", "score": "0.4516862", "text": "public function validateCode() {\n\t\tif (empty($this->code)) {\n\t\t\tthrow new UserInputException('code');\n\t\t}\n\t\t\n\t\t$sql = \"SELECT\tCOUNT(*) AS count\n\t\t\tFROM\twcf\".WCF_N.\"_smiley\n\t\t\tWHERE\tsmileyCode = '\".escapeString($this->code).\"'\";\n\t\t$row = WCF::getDB()->getFirstRow($sql);\n\t\tif ($row['count']) {\n\t\t\tthrow new UserInputException('code', 'notUnique');\n\t\t}\n\t}", "title": "" }, { "docid": "2dd69232c627e08a2f12c5cafb3c49aa", "score": "0.45146042", "text": "private function checkTimestamp($timestamp)\n { \n // verify that timestamp is recentish\n $now = time();\n if ($now - $timestamp > $this->_timestampThreshold) {\n throw new Oauth_Exception(\"Expired timestamp, yours $timestamp, ours $now\");\n }\n }", "title": "" }, { "docid": "60cbc9189c493a987941596179c8d013", "score": "0.45132494", "text": "public function checkDate($data)\n {\n // check reservation sent limit\n if ($this->isSomeReservationExistsInLastTime()) {\n throw new ApplicationException('You can sent only one reservation per 30 seconds, please wait a second.');\n }\n\n // check date availability\n if (!$this->isDateAvailable($data['date'])) {\n throw new ApplicationException($data['date']->format('d.m.Y H:i') . ' is already booked.');\n }\n }", "title": "" }, { "docid": "f91745f2de07b35503d7062b28b63059", "score": "0.4511088", "text": "public function validateAge($then)\n {\n //, $min\n // $then will first be a string-date\n $then = strtotime($then);\n //The age to be over, over +18\n $min = strtotime('+18 years', $then);\n //echo $min;\n if(time() < $min) {\n //die('Not 18');\n $msg = '<div class=\"alert alert-block alert-danger fade in\">\n <button data-dismiss=\"alert\" class=\"close close-sm\" type=\"button\">\n <i class=\"fa fa-times\"></i>\n </button>\n <strong>Nah!</strong> You cannot create user who is less than 15 years!\n </div>';\n return $msg;\n }\n }", "title": "" }, { "docid": "460731f5dad95ac895e8e94a64eef1c2", "score": "0.4504036", "text": "function validate($type, $data){\n if ($type=='userID'){\n return (!preg_match('/[0-9]{4}/',$data))?false:true;\n }else if($type=='shaKey'){\n return (!preg_match('/[a-zA-Z0-9]{40}/',$data))?false:true;\n }else if($type=='qrHash'){\n if (sha1($pyHashSalt.\".\".ltrim(substr($data,-4),'0')) != substr($data,0,40))\n return false;\n return (!preg_match('/[a-zA-Z0-9]{40,45}/',$data))?false:true;\n }else if($type=='eventID'){ // event ID data validation here\n return (!preg_match('/[1-3][0-9]{4}/',$data))?false:true;\n }\n}", "title": "" }, { "docid": "e3c38268157e9d1b95cd1e15c5de2a70", "score": "0.45027506", "text": "function validate_course($crsid) {\n\tglobal $DB, $USER;\n\n\t$iddate = up1_meta_get_id($crsid, 'datevalid');\n $idwho = up1_meta_get_id($crsid, 'approbateureffid');\n\n\tif ( ! ($iddate && $idwho)) {\n throw new coding_exception('Erreur ! manque up1datevalid ou up1approbateureffid pour le cours ' . $crsid);\n return false;\n }\n $DB->update_record('custom_info_data', array('id' => $iddate, 'data' => time()));\n $DB->update_record('custom_info_data', array('id' => $idwho, 'data' => $USER->id));\n send_notification_validation($crsid);\n return true;\n}", "title": "" }, { "docid": "2bae53cdf3c372a8b1581f56ecd6ac3c", "score": "0.4499275", "text": "function verifyRequiredFieldsForCreateNewAppointment($data) {\n $createAppointment['Insert_NewAppointment'] = array();\n $result = array();\n\n//** Check if required fields are empty\n if (empty($data->startDate) || empty($data->expiredDate) || empty($data->typeId) ||\n empty($data->userId) || empty($data->voucherId) || empty($data->verificationCode) ||\n empty($data->locationId) || empty($data->time)) {\n\n $result['error'] = required_fields_missing_message;\n $result['errorCode'] = required_fields_missing_code;\n\n array_push($createAppointment['Insert_NewAppointment'], $result);\n\n return array('error' => true, 'response' => $createAppointment);\n }\n\n $requiredFieldsValidityResultForTimeData = $this->verifyRequiredFieldsForTimeData($data, 'Insert_NewAppointment');\n\n if ($requiredFieldsValidityResultForTimeData['error']) {\n return array('error' => true, 'response' => $requiredFieldsValidityResultForTimeData['response']);\n }\n\n $dataArray = array(\n 'startDate' => $data->startDate,\n 'expiredDate' => $data->expiredDate,\n 'typeId' => $data->typeId,\n 'voucherId' => $data->voucherId,\n 'verificationCode' => $data->verificationCode,\n 'locationId' => $data->locationId\n );\n\n//** Check if required fields's patterns are match\n $startDatePatternCheckResult = $this->passedPatternCheck($dataArray, $dataArray['startDate'], $this->dateRegEx);\n $expireDatePatternCheckResult = $this->passedPatternCheck($dataArray, $dataArray['expiredDate'], $this->dateRegEx);\n $typeIdPatternCheckResult = $this->passedPatternCheck($dataArray, $dataArray['typeId'], $this->typeIdRegex);\n $voucherIdPatternCheckResult = $this->passedPatternCheck($dataArray, $dataArray['voucherId'], $this->voucherIdRegEx);\n $verificationCodePatternCheckResult = $this->passedPatternCheck($dataArray, $dataArray['verificationCode'], $this->verificationCodeRegEx);\n $locationIdPatternCheckResult = $this->passedPatternCheck($dataArray, $dataArray['locationId'], $this->locationIdRegEx);\n\n if (!$startDatePatternCheckResult['match'] || !$expireDatePatternCheckResult['match'] || !$typeIdPatternCheckResult['match'] ||\n !$voucherIdPatternCheckResult['match'] || !$verificationCodePatternCheckResult['match'] || !$locationIdPatternCheckResult['match']) {\n $result['status'] = '0';\n $result['errorCode'] = pattern_fail_code;\n\n if (!empty($startDatePatternCheckResult['field'])) {\n $result['error'] = $startDatePatternCheckResult['field'] . pattern_fail_message;\n } else if (!empty($expireDatePatternCheckResult['field'])) {\n $result['error'] = $expireDatePatternCheckResult['field'] . pattern_fail_message;\n } else if (!empty($typeIdPatternCheckResult['field'])) {\n $result['error'] = $typeIdPatternCheckResult['field'] . pattern_fail_message;\n } else if (!empty($voucherIdPatternCheckResult['field'])) {\n $result['error'] = $voucherIdPatternCheckResult['field'] . pattern_fail_message;\n } else if (!empty($verificationCodePatternCheckResult['field'])) {\n $result['error'] = $verificationCodePatternCheckResult['field'] . pattern_fail_message;\n } else if (!empty($locationIdPatternCheckResult['field'])) {\n $result['error'] = $locationIdPatternCheckResult['field'] . pattern_fail_message;\n }\n\n array_push($createAppointment['Insert_NewAppointment'], $result);\n\n return array('error' => true, 'response' => $createAppointment);\n }\n\n return array('error' => false);\n\n }", "title": "" }, { "docid": "1055d5580f75b1017bf4248fad627a36", "score": "0.4497162", "text": "private function validateTime($data){\n return (DateTime::createFromFormat('H:i:s', $data) !== false);\n }", "title": "" }, { "docid": "91778360ba6278ea964ae0fcb8f89410", "score": "0.44968998", "text": "public function testCheckingIsActiveWithFutureValidTo()\n {\n $validFrom = new DateTime(\"now\");\n $validTo = new DateTime(\"+1 week\");\n $token = new Token(1, \"\", $validFrom, $validTo, true);\n $this->assertTrue($token->isActive());\n }", "title": "" }, { "docid": "afcd2e86cf39b13cf8fe42d65e1cb37b", "score": "0.4492522", "text": "public function testValidFutureDate()\n {\n $this->validator->validate('2050-11-11 12:22:11', new InFutureDateTime());\n $this->assertNoViolation();\n }", "title": "" }, { "docid": "77fe1479a3d210fbc0b2df9e270dac8d", "score": "0.44873777", "text": "function Contract_Check($snum,$chkba=1,$ret=0) {\n global $YEAR;\n//echo \"check $snum $YEAR<br>\";\n $Check_Fails = array('',\"Start Time\",\"Bank Details missing\",\"No Events\",\"Venue Unknown\",\"Duration not yet known\",\"Events Clash\"); // Least to most critical\n// 0=ok, 1 - lack times, 2 - no bank details, 3 - no events, 4 - no Ven, 5 - no dur, 6 - clash\n include_once('ProgLib.php');\n// All Events have - Venue, Start, Duration, Type - Start & End/Duration can be TBD if event-type has a not critical flag set\n $InValid = 3;\n $Evs = Get_Events4Act($snum,$YEAR);\n $types = Get_Event_Types(1);\n $Vens = Get_Real_Venues(1);\n $LastEv = 0;\n if ($Evs) foreach ($Evs as $e) {\n if ($InValid == 3) $InValid = 0;\n if ($LastEv) {\n if (($e['Day'] == $LastEv['Day']) && ($e['Start'] > 0) && ($e['Venue'] >0)) {\n if ($LastEv['SubEvent'] < 0) { $End = $LastEv['SlotEnd']; } else { $End = $LastEv['End']; };\n if ($LastEv['BigEvent']) $End -=30; // Fudge for procession\n if (($End > 0) && !$LastEv['IgnoreClash'] && !$e['IgnoreClash']) {\n if ($End > $e['Start']) $InValid = 6;\n if ($InValid < 5 && $End == $e['Start'] && $LastEv['Venue'] != $e['Venue']) $InValid = 6;\n }\n }\n }\n \n $et = $types[$e['Type']];\n if ($InValid < 4 && ($e['Venue']==0) || !isset($Vens[$e['Venue']])) $InValid = 4;\n if (!$et['NotCrit']) {\n if ($e['SubEvent'] < 0) { $End = $e['SlotEnd']; } else { $End = $e['End']; };\n if ($InValid == 0 && $e['Start'] == 0) $InValid = 1;\n if (($e['Start'] != 0) && ($End != 0) && ($e['Duration'] == 0)) $e['Duration'] = timeadd2($End, - $e['Start']);\n if ($InValid < 5 && ($End == 0) && ($e['Duration'] == 0)) $InValid = 5; \n } \n $LastEv = $e;\n } \n\n if ($InValid == 0 && $chkba) { // Check Bank Account if fee\n $ActY = Get_SideYear($snum);\n if ($ActY['TotalFee']) {\n $Side = Get_Side($snum);\n if ( (strlen($Side['SortCode'])<6 ) || ( strlen($Side['Account']) < 8) || (strlen($Side['AccountName']) < 6)) $InValid = 2;\n }\n }\n\n//echo \"$InValid <br>\";\n if ($ret) return $InValid; \n if ($InValid == 0) {\n $act = Get_Side($snum);\n// if (!$act['Description']) return \"No Short Blurb\";\n if (!$act['Photo']) return \"No Photo\";\n }\n return $Check_Fails[$InValid];\n}", "title": "" }, { "docid": "cb1021916e789068a8dfde3c8996c3b7", "score": "0.44819263", "text": "public function isValid()\n {\n $codeItem = $this->getItem();\n if(!$codeItem->code){\n $this->resultCode = self::FAILURE_CODE_NOT_FOUND;\n $this->messages = 'Code not found';\n return false;\n }\n\n $codeItem->self(array('*'));\n if(!$codeItem){\n $this->resultCode = self::FAILURE_CODE_NOT_FOUND;\n $this->messages = 'Code not found';\n return false;\n }\n\n if($codeItem->codeStatus != 'active'){\n if($codeItem->codeStatus == 'expired'){\n $this->resultCode = self::FAILURE_CODE_EXPIRED;\n $this->messages = 'Code already expired';\n } elseif($codeItem->codeStatus == 'used'){\n $this->resultCode = self::FAILURE_CODE_USED;\n $this->messages = 'Code has been used';\n }\n return false;\n }\n\n $this->resultCode = self::SUCCESS;\n $this->messages = 'Code validated';\n return true;\n }", "title": "" }, { "docid": "04e5f3dc1c77d34e8281c4721bde9eda", "score": "0.44815087", "text": "public function check_fiscal_code($fcode) {\n\t\t$regex = '/^[a-zA-Z]{6}[0-9]{2}[a-zA-Z][0-9]{2}[a-zA-Z][0-9]{3}[a-zA-Z]$/';\n\t\treturn preg_match($regex, $fcode);\n\t}", "title": "" }, { "docid": "0e16b74e4e17ef6cfb6ee46a36207bf5", "score": "0.44804856", "text": "function work_out_time ($id, $number) {\n global $cond;\n \n $hour = (int) $_POST['val'][$id][$number]['hr'];\n $min = (int) $_POST['val'][$id][$number]['mn'];\n if ($_POST['val'][$id][$number]['mn'] == '') $min = null;\n $ampm = (int) $_POST['val'][$id][$number]['AP'];\n $quote = false;\n \n switch ($cond) {\n case LOGIC_CONDITION_LIKE:\n case LOGIC_CONDITION_NOT_LIKE:\n if ($hour == 0) {\n $hour = '__';\n } else {\n $hour = hour_24 ($hour, $ampm);\n }\n if ($min === null) $min = '__';\n $sec = '__';\n $quote = true;\n break;\n \n case LOGIC_CONDITION_BETWEEN:\n if ($hour == 0) {\n if ($number == 0) {\n $hour = '00';\n } else {\n $hour = '23';\n }\n } else {\n $hour = hour_24 ($hour, $ampm);\n }\n if ($number == 0) {\n $sec = '00';\n } else {\n $sec = '59';\n }\n if ($min === null) {\n if ($number == 0) {\n $min = '00';\n } else {\n $min = '59';\n }\n }\n break;\n \n case LOGIC_CONDITION_LT:\n case LOGIC_CONDITION_GT_OR_EQ:\n if ($hour == 0) {\n $hour = '00';\n } else {\n $hour = hour_24 ($hour, $ampm);\n }\n $sec = '00';\n if ($min === null) $min = '00';\n break;\n \n case LOGIC_CONDITION_GT:\n case LOGIC_CONDITION_LT_OR_EQ:\n if ($hour == 0) {\n $hour = '23';\n } else {\n $hour = hour_24 ($hour, $ampm);\n }\n $sec = '59';\n if ($min === null) $min = '59';\n break;\n }\n \n if ($min < 0) $min = '00';\n if ($min > 59) $min = 59;\n if (is_int($hour) and ($hour < 10)) $hour = '0'. $hour;\n if (is_int($min) and ($min < 10)) $min = '0'. $min;\n \n $value = $hour. ':'. $min. ':'. $sec;\n \n // return it\n return new ReturnVal ($value, $quote);\n}", "title": "" }, { "docid": "afde20ca6cadc9c10b76426f3527643a", "score": "0.44795927", "text": "public function testCheckingIsActiveWithPastValidTo()\n {\n $validFrom = new DateTime(\"now\");\n $validTo = new DateTime(\"-1 week\");\n $token = new Token(1, \"\", $validFrom, $validTo, true);\n $this->assertFalse($token->isActive());\n }", "title": "" }, { "docid": "1826df7c378320355a795b19f6e0acf5", "score": "0.44779223", "text": "function api_period_check($period){\n\t// check parameters\n\tif(strlen($period)!=6){return false;}\n\t// definitions\n\t$year=(int)substr($period,0,4);\n\t$month=(int)substr($period,4,2);\n\t// check year\n\tif($year<1000||$month>2999){return false;}\n\t// check month\n\tif($month<1||$month>12){return false;}\n\t// return\n\treturn true;\n}", "title": "" }, { "docid": "48ab5aabc41677ed8ef068afe470eac2", "score": "0.44667813", "text": "function api_week_check($week){\n\tif(strlen($week)!=6&&strlen($week)!=8){return false;}\n\t// make year and week\n\t$year=substr($week,0,4);\n\t$week=(int)substr($week,-2);\n\t// get last week of year\n\t$last_week=date('W',strtotime($year.'-12-28'));\n\t// check\n\tif($week>0&&$week<=$last_week){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "cdb27dcd0aee684ce9527f9186f08c79", "score": "0.44656157", "text": "function is_2_hours_past_window()\n{\n $windows = jj_scheduled_hours();\n\n // add 2 hours to time\n $time = (int)date(\"H\") + 2;\n foreach ($windows as $key => $window) {\n // store next hour unless the last hour in the array\n $mod_key = ($key === count($windows) - 1 ? 0 : $key + 1);\n if ($time >= $window && $time < $windows[$mod_key]) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "3ed66b01becc1b744797eb48dd2c2cf3", "score": "0.44651726", "text": "protected function isCodeExpired($creation_time)\n\t{\n\t\t$expired = true;\n\t\tif (!is_numeric($this->expiry_time) || $this->expiry_time < 1) {\n\t\t\t$expired = false;\n\t\t} else if (time() - $creation_time < $this->expiry_time) {\n\t\t\t$expired = false;\n\t\t}\n\t\treturn $expired;\n\t}", "title": "" }, { "docid": "3cb9d75380861ead4afb33a5042480e6", "score": "0.4461478", "text": "function valid();", "title": "" }, { "docid": "231e6b848b40ad4e65d048abe2879fc9", "score": "0.44592658", "text": "public function isValidateTimeFormat($time);", "title": "" }, { "docid": "76a22f8b2119506c6b20b44d025c3fba", "score": "0.44589993", "text": "function isValid() {\n\t \n \t if (!\\IdnoPlugins\\OAuth2\\Application::getOne(['key' => $this->key])) return false;\n\t return ($this->created + $this->expires_in > time());\n\t}", "title": "" }, { "docid": "6a820a4f36579dc6edc9dccf3215fbb3", "score": "0.4457788", "text": "private static function validateTs($messageType, $paramValue, &$validationErrorMsg = null) {\n\t\tif (!filter_var($paramValue, FILTER_VALIDATE_INT)) {\n\t\t\t$validationErrorMsg = 'Invalid timestamp.';\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "f602a43c88648e98507ad9dcb2cb9997", "score": "0.44518882", "text": "function nsm_validate_timestamp_header($session, $conf) {\n\t// the provided timestamp header must look like a timestamp\n\tif (!nsm_validate_timestamp($_SERVER['HTTP_X_PHPJOBS_TIMESTAMP'])) {\n\t\texit_with_error('Malformed security header');\n\t}\n\t\n\t// the provided timestamp must not be older than max_age\n\t$timestamp = @array_shift(explode('.', $_SERVER['HTTP_X_PHPJOBS_TIMESTAMP']));\n\tif ($conf['request_time'] - $timestamp > $conf['max_age']) {\n\t\texit_with_error('provided timestamp is too old (trying to reuse former request?)');\n\t}\n\t\n\t// retrieve the timestamp of the last request for the provided session\n\t$session_timestamp = nsm_get_session_timestamp($session);\n\t\n\tif ($session_timestamp !== 0) {\n\t\t// get rid of the dot in both timestamps\n\t\t$session_timestamp = str_replace('.', '', $session_timestamp);\n\t\t$user_timestamp = str_replace('.', '', $_SERVER['HTTP_X_PHPJOBS_TIMESTAMP']);\n\t\t\n\t\t// the provided timestamp must be strictly greater than the current one for this session\n\t\tif ($user_timestamp <= $session_timestamp) {\n\t\t\texit_with_error('provided timestamp is too old for this session (trying to reuse former request?)');\n\t\t}\n\t}\n\t\n\t// update last known timestamp for this session\n\tnsm_set_session_timestamp($session, $_SERVER['HTTP_X_PHPJOBS_TIMESTAMP']);\n\t\n\treturn TRUE;\n}", "title": "" }, { "docid": "fd3b7c3e5b215802e535371d713e26eb", "score": "0.44485566", "text": "public static function is_token_valid ($a_token) {\n\t\t\n\t\t$expiration_gap = date(\"Y-m-d H:i:s\", strtotime(\"24 hours ago\"));\n\t\t$database = new Apine\\Core\\Database();\n\t\t$id_sql = $database->select(\"SELECT `id` FROM `apine_password_tokens` WHERE `token` = '$a_token' AND `creation_date` > '$expiration_gap'\");\n\t\t\n\t\tif ($id_sql) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "5d16a5380b86d454112ab55c005b0a51", "score": "0.44364196", "text": "public function isValid()\n {\n return $this->valid_until >= Carbon::now();\n }", "title": "" }, { "docid": "99bad61948e04aaa7ede20aee103edc2", "score": "0.44313768", "text": "public function isRight($code){\n $expiration = time() - 7200; // Two hour limit,2小时内\n $this->db->where('captcha_time < ', $expiration)\n ->delete('captcha');\n\n // Then see if a captcha exists:\n $sql = 'SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?';\n $binds = array($code, $this->input->ip_address(), $expiration);\n $query = $this->db->query($sql, $binds);\n $row = $query->row();\n\n if ($row->count == 0)\n {\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "d0d5a04e559b2f810b79577c0abd98e0", "score": "0.44287476", "text": "public function isValid (Entities\\Event $event);", "title": "" }, { "docid": "5ef6fc471f9c9c250cffd93d63e1283e", "score": "0.44244066", "text": "function _check(DateTime $d, Station $station) {\n\t\t$u = $this;\n\t\tif(!array_key_exists($d->format(\"Ymd\"), $u->dates[$station->getId()])) return false;\n\t\t\n\t\tforeach($u->dates[$station->getId()][$d->format(\"Ymd\")] as $fKey => $frame) \n\t\t\tif($frame['s'] <= $d && $d <= $frame['e']) return true;\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6ed409b3341e83f0f22fcf3e7d0e0171", "score": "0.442", "text": "function validateDate($date)\n {\n }", "title": "" }, { "docid": "99366433c69f0938dc02fb7ff3900cd2", "score": "0.44168937", "text": "function checkYear($intPYear,$strPErrorBlankMessage='',$strPErrorInvalidMessage=''){\n\t\t\tif(trim($intPYear) != \"\") { \n\t\t\tif(!eregi(\"^[1|2]{1}[9|0]{1}[0-9]{2}$\",trim($intPYear))){\n\t\t\t\t\t\n\t\t\t\t\t\tif($strPErrorInvalidMessage =='')\n\t\t\t\t\t\t$strPErrorInvalidMessage = \"Please enter valid year\";\n\t\t\t\t\t\t$this->strErrorMessage = $strPErrorInvalidMessage;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\telse if(!ereg(\"19\", $intPYear)){\n\t\t\t\t\tif(strtotime($intPYear) > strtotime(date(\"Y\"))) {\n\t\t\t\t\t\tif($strPErrorInvalidMessage =='')\n\t\t\t\t\t\t\t$strPErrorInvalidMessage = \"Please enter valid year\";\n\t\t\t\t\t\t\t$this->strErrorMessage = $strPErrorInvalidMessage;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\tif($strPErrorBlankMessage =='')\n\t\t\t\t\t$strPErrorBlankMessage = \"Year filed should not be blank\";\n\t\t\t\t\t\t\n\t\t\t\t\t$this->strErrorMessage = $strPErrorBlankMessage;\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "7704be61e334d4671bee038f3d70b745", "score": "0.4415287", "text": "private function validateTime($time){\n\n $timeExplode = explode(':',$time);\n $hours = $timeExplode[0];\n $minutes = $timeExplode[1];\n $seconds = $timeExplode[2];\n\n if($hours <= 12 && $minutes < 60 && $seconds < 60)\n return (($hours > 0 && $minutes >= 0 && $seconds >= 0));\n\n return false; \n\n }", "title": "" }, { "docid": "45240751aaab0e4728c520966e6cba92", "score": "0.4411697", "text": "protected function isStatusCodeInvalid($n_status_code){\n \n if (!is_numeric($n_status_code)) return true;\n \n return $n_status_code >= 400;\n \n}", "title": "" }, { "docid": "a312d13a9dbc8ebdbb7594787e69eabe", "score": "0.44103715", "text": "static function isValid($format);", "title": "" }, { "docid": "b0c1390e224630de9563cda984c1ec43", "score": "0.43953297", "text": "public static function deadline($origin, $destination, $code): Deadline;", "title": "" }, { "docid": "b3478906e35c22d7e63a052599d2fb20", "score": "0.4392031", "text": "public function testNoCodeValidation()\n {\n $code1 = PageProoferCode::create();\n $code1->Title = 'Test Code';\n $code1->Domain = 'http://muskie9.com/';\n $code1->Enabled = true;\n $this->assertFalse($code1->validate()->isValid());\n }", "title": "" }, { "docid": "401169972d5cc88c1796a96fb34a8b7e", "score": "0.4391524", "text": "function _check_captcha($code)\r\n\t{\r\n\t\t$time = $this->session->flashdata('captcha_time');\r\n\t\t$word = $this->session->flashdata('captcha_word');\r\n\r\n\t\tlist($usec, $sec) = explode(\" \", microtime());\r\n\t\t$now = ((float)$usec + (float)$sec);\r\n\r\n\t\tif ($now - $time > $this->config->item('captcha_expire', 'tank_auth')) {\r\n\t\t\t$this->form_validation->set_message('_check_captcha', $this->lang->line('auth_captcha_expired'));\r\n\t\t\treturn FALSE;\r\n\r\n\t\t} elseif (($this->config->item('captcha_case_sensitive', 'tank_auth') AND\r\n\t\t\t\t$code != $word) OR\r\n\t\t\t\tstrtolower($code) != strtolower($word)) {\r\n\t\t\t$this->form_validation->set_message('_check_captcha', $this->lang->line('auth_incorrect_captcha'));\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "3bd86511cdf149e149a8d58770f0d6e2", "score": "0.4387584", "text": "function checkForUniqueCode($code)\n{\n require_once('trellian/db.php');\n $sub_conn = trellian_db_connect('submissions', 'www-data');\n $query = \"SELECT verification_code FROM ps_user_verification_code_log WHERE verification_code='\".pg_escape_string($code).\"'\";\n $code_result_set = trellian_db_query($sub_conn,$query);\n \n $code_object = pg_fetch_object($code_result_set);\t\n if(!empty($code_object) && $code_object->verification_code!=\"\")\n {\n\treturn false;\n }\n else\t\n return true;\n}", "title": "" }, { "docid": "17b1b66d6791c48f8cead820311e1d92", "score": "0.43861553", "text": "public static function isAllowed(string $code): bool\n {\n static $mapFlip = [];\n\n if (!$mapFlip) {\n $mapFlip = array_flip(self::MAP);\n }\n\n if (\n isset($mapFlip[$code]) &&\n \\Bitrix\\Main\\Loader::includeModule('bitrix24')\n ) {\n return Feature::isFeatureEnabled('landing_hook_' . $mapFlip[$code]);\n }\n\n return true;\n }", "title": "" } ]
5df69c23d5a160cd8e26bbdf802afb4c
Lists the usage of a given entity.
[ { "docid": "5db06913f96f0acd373581a0c7180c61", "score": "0.0", "text": "public function listUsageLocalTask(RouteMatchInterface $route_match) {\n $entity = $this->getEntityFromRouteMatch($route_match);\n return parent::listUsagePage($entity->getEntityTypeId(), $entity->id());\n }", "title": "" } ]
[ { "docid": "a623b2a389450a642612b74f73d5d83b", "score": "0.6452495", "text": "public function listUsagePage($entity_type, $entity_id) {\n $all_rows = $this->getRows($entity_type, $entity_id);\n if (empty($all_rows)) {\n return [\n '#markup' => $this->t('There are no recorded usages for entity of type: @type with id: @id', ['@type' => $entity_type, '@id' => $entity_id]),\n ];\n }\n\n $header = [\n $this->t('Entity'),\n $this->t('Type'),\n $this->t('Language'),\n $this->t('Field name'),\n $this->t('Status'),\n $this->t('Used in'),\n ];\n\n $total = count($all_rows);\n $pager = $this->pagerManager->createPager($total, $this->itemsPerPage);\n $page = $pager->getCurrentPage();\n $page_rows = $this->getPageRows($page, $this->itemsPerPage, $entity_type, $entity_id);\n // If all rows on this page are of entities that have usage on their default\n // revision, we don't need the \"Used in\" column.\n $used_in_previous_revisions = FALSE;\n foreach ($page_rows as $row) {\n if ($row[5] == $this->t('Translations or previous revisions')) {\n $used_in_previous_revisions = TRUE;\n break;\n }\n }\n if (!$used_in_previous_revisions) {\n unset($header[5]);\n array_walk($page_rows, function (&$row, $key) {\n unset($row[5]);\n });\n }\n $build[] = [\n '#theme' => 'table',\n '#rows' => $page_rows,\n '#header' => $header,\n ];\n\n $build[] = [\n '#type' => 'pager',\n ];\n\n return $build;\n }", "title": "" }, { "docid": "f8d74c66fa9c46e6759ac62d78760963", "score": "0.583779", "text": "public function getEntities($entity);", "title": "" }, { "docid": "535b44e52fe1f58185a00f98123e57a1", "score": "0.57083774", "text": "function listEntities($params) {\n return Entity::listEntities($params);\n}", "title": "" }, { "docid": "29a5c4f70f89556bab761b8aac344f9a", "score": "0.56964767", "text": "function viewEntityList($entities, $view_type = \"list\", $wrapper_class = NULL, $item_class = NULL, $link = true, $size = \"medium\") {\n return Entity::viewEntityList($entities, $view_type, $wrapper_class, $item_class, $link, $size);\n}", "title": "" }, { "docid": "c811a56e1457280b6579b9e63dc96efe", "score": "0.5599221", "text": "public function myListAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n\t\t$entities = $em->getRepository('MainExerciceBundle:Exercice')->findByUser($this->container->get('security.context')->getToken()->getUser());\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "e479680c976f1ec5006eda96a6ace0e4", "score": "0.5430318", "text": "public function table_item_list()\n {\n //echo 'table_item_list';\n $items = $this->purchase_model->get_item_by_vendor(get_client_user_id());\n $this->app->get_table_data(module_views_path('purchase', 'items/table_item_list'), [], 'supplier', $items);\n }", "title": "" }, { "docid": "601b3fadaba162493cf762e318fe54ab", "score": "0.5411346", "text": "public function actionHTUselisting()\n {\n \t \n \t $rec=HtuseHome::model()->findAll();\n \t $this->render('htuselisting',array('list'=>$rec));\n }", "title": "" }, { "docid": "8c4595b02bd5941163e6a5344a59f515", "score": "0.5353683", "text": "public function vendorsListAction(){\n $vendors = $this->getDoctrine()->getRepository(\"AppBundle:Vendor\")->findBy(array(), array(\"name\"=>\"ASC\"));\n return $this->render(\"AppBundle:Dashboard/Vendors:list.html.twig\", array(\"vendors\" => $vendors));\n }", "title": "" }, { "docid": "413dd59cc18fa9afade4829c8f5d3a4b", "score": "0.5350898", "text": "public function listAction()\n { \n $config = $this->get('bundy_shoes.config');\n $rand = mt_rand(1, 100);\n \n if ($rand < 6 && $config->isPHPErrorTriggered()) {\n set_error_handler(function($errno, $errstr) {\n echo $errstr;\n });\n $var = getProductList();\n }\n \n $products = $this->getDoctrine()\n ->getRepository('BundyShoesBundle:Product')\n ->findBy(array(), null, 10);\n \n return $this->render('BundyShoesBundle:Product:list.html.php', array('products' => $products));\n }", "title": "" }, { "docid": "84642cd86b52154288d83ff55da04b2c", "score": "0.534001", "text": "public function actionUserList()\n {\n\n $this->loadTarget();\n\n $page = (int) Yii::app()->request->getParam('page', 1);\n $total = Like::model()->count('object_model=:omodel AND object_id=:oid', array(':omodel' => $this->model, 'oid' => $this->id));\n\n $usersPerPage = HSetting::Get('paginationSize');\n\n $sql = \"SELECT u.* FROM `like` l \" .\n \"LEFT JOIN user u ON l.created_by = u.id \" .\n \"WHERE l.object_model=:omodel AND l.object_id=:oid AND u.status=\" . User::STATUS_ENABLED . \" \" .\n \"ORDER BY l.created_at DESC \" .\n \"LIMIT \" . intval(($page - 1) * $usersPerPage) . \",\" . intval($usersPerPage);\n $params = array(':omodel' => $this->model, ':oid' => $this->id);\n\n $pagination = new CPagination($total);\n $pagination->setPageSize($usersPerPage);\n\n $users = User::model()->findAllBySql($sql, $params);\n\n $output = $this->renderPartial('application.modules_core.user.views._listUsers', array(\n 'title' => Yii::t('LikeModule.controllers_LikeController', \"<strong>Users</strong> who like this\"),\n 'users' => $users,\n 'pagination' => $pagination\n ), true);\n\n Yii::app()->clientScript->render($output);\n echo $output;\n Yii::app()->end();\n }", "title": "" }, { "docid": "a9152291e72de561c907f0d16b4dd8e9", "score": "0.5328607", "text": "public function indexAction()\n {\n // Get the entity we are making the list of\n $this->entity = $this->params()->fromRoute('entity');\n if (!isset($this->entity))\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Get information about the entity to display to view\n if (empty($info = $this->entity_table[$this->entity]))\n {\n return false;\n }\n\n // Change the view strategy if it is set to use a different one\n if (!empty($info['view_strategy']))\n {\n $view_strategy_class = $info['view_strategy'];\n if (!class_exists($view_strategy_class))\n {\n throw new \\Exception(\"The view strategy class being used to render this page cannot be found.\");\n }\n\n $view_strategy = new $view_strategy_class;\n if (!($view_strategy instanceof IViewStrategy))\n {\n throw new \\Exception(\"The view strategy being used must implement the IViewStrategy interface.\");\n }\n\n $this->setViewStrategy($view_strategy);\n }\n\n // Render the list using the strategy given\n $view_results = $this->view_strategy->render($this);\n if (false === $view_results)\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Attach javascript\n $this->getServiceLocator()->get('ViewRenderer')->headScript()->appendFile('/js/backend/list.js');\n\n return $view_results;\n }", "title": "" }, { "docid": "fda3c2edc6b3b564b62fc53020b9ede5", "score": "0.52818245", "text": "public function usage()\n {\n $url = $this->buildBaseUrl(self::API_URL_RESOURCE_USAGE);\n\n return $this->request($url);\n }", "title": "" }, { "docid": "0d6360bbfb5cbead7071076e02e0389a", "score": "0.52802736", "text": "abstract public function getUsage();", "title": "" }, { "docid": "85b10588c78cebd72fa7d60169983579", "score": "0.5276898", "text": "public function seeAction(): void\n {\n $params = $this->getSeeParam();\n\n $this->seeEntity(...$params);\n }", "title": "" }, { "docid": "9b458a7bb26c6b344fb7b867eb29a4a5", "score": "0.5272103", "text": "public function getUsage()\n {\n }", "title": "" }, { "docid": "ff2f1aea3edb4b7690a1f325b0ecd681", "score": "0.52490187", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n//\n// get the session username\n $username = $this->get('security.token_storage')->getToken()->getUser();\n\n if ($this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) {\n // find all records according to session username\n $entities = $em->getRepository('SurlUrlBundle:Url')->findByAuthor(\n $username -> getUsername()\n );\n }else{\n $entities = 'no data yet';\n }\n//\n\n\n// $repository = $this->getDoctrine()\n// ->getRepository('SurlUrlBundle:Url');\n//\n//// createQueryBuilder automatically selects FROM AppBundle:Product\n//// and aliases it to \"p\"\n// $query = $repository->createQueryBuilder('p')\n// ->where('p.author = :author')\n// ->setParameter('author', $username -> getUsername())\n// ->getQuery();\n//\n// $entities = $query->getResult();\n\n\n return $this->render('SurlUrlBundle:Url:index.html.twig', array(\n 'entities' => $entities,\n 'user' => $username\n ));\n }", "title": "" }, { "docid": "e391c8a4a7b5b2169da07ac68a611b44", "score": "0.5240852", "text": "public function index() {\n $this->View->render('entity/index', [\n 'entities' => EntityModel::getAllEntities()\n ]);\n }", "title": "" }, { "docid": "5e7b25a881590df0cb2db3c8698fd656", "score": "0.5228006", "text": "public function listEmpruntsbyUserAction()\n {\n $user = $this->get('security.token_storage')->getToken()->getUser();\n $em = $this->container->get('doctrine')->getEntityManager();\n $emprunts = $em->getRepository('BiblioBundle:Emprunter')->findBy(['emprunteur' => $user]);\n return $this->render('@Biblio/Emprunter/listByUser.html.twig',array(\n 'emprunts'=>$emprunts\n ));\n }", "title": "" }, { "docid": "ae84ddafba2cae1261bc67bf52005f3e", "score": "0.5208933", "text": "protected function _listAction(Request $request, $arguments=null) {\n\t \n /* Fill the default arguments */\n if($arguments==null){ $arguments = array(); }\t\n if(!array_key_exists(\"editable\", $arguments)){ $arguments[\"editable\"] = false; }\n if(!array_key_exists(\"add_new\", $arguments)){ $arguments[\"add_new\"] = true; }\n \n /* Get the instances that will be shown, in order to correctly set the subtitle in the list portlet */\n /* This should be from the table action, but as we return the response content, it would not be possible */\n /* to get the result number from here. */\n if (!array_key_exists(\"instances_array\", $arguments)) {\n $instancesArray = $this->_getInstances($request, $arguments);\n $arguments[\"instances_array\"] = $instancesArray;\n \n /* If the controllers is set for pagination, then count the total number\n * of instances in the database. Otherwise, only count the instances in the array */\n if ($this->maxInstancesToList!=null) {\n $arguments[\"num_found\"] = $this->_countInstances($request, $arguments);\n }\n else {\n $arguments[\"num_found\"] = count($instancesArray);\n }\n }\n else {\n $instancesArray = $arguments[\"instances_array\"];\n $arguments[\"num_found\"] = count($instancesArray);\n }\n \n $arguments[\"num_shown\"] = count($instancesArray);\n\t\n if(!array_key_exists(\"base_template_url\", $arguments)){\n $arguments[\"base_template_url\"] = $this->templateBase;\n }\n if(!array_key_exists(\"editable\", $arguments)){\n $arguments[\"editable\"] = false;\n }\n \n /* Add pagination arguments */\n $arguments = array_merge($arguments, $this->__getPaginatedArguments($request));\n \n \n // In development. Add a simple filter \n //$arguments[\"filter_form\"] = $this->_getSimpleFilter($request, $arguments)->createView();\n\n $table = $this->tableAction($request, $arguments)->getContent();\n $arguments[\"portlets\"] = [$table];\n \n return new Response($this->renderView('common/entity/list.html.twig', $arguments));\n }", "title": "" }, { "docid": "d629c356dfe1ce38c7c8bfc611ca0fe0", "score": "0.5208395", "text": "public function listing(Request $request = NULL) {\n return $this->entityTypeManager()->getListBuilder('escort')->render($request);\n }", "title": "" }, { "docid": "f04ca66136e9e10d8ac50de502989fbb", "score": "0.5198538", "text": "public function index()\n {\n access_is_allowed('read.point.inventory.usage');\n\n $list_inventory_usage = InventoryUsage::joinFormulir()\n ->joinWarehouse()\n ->notArchived()\n ->selectOriginal();\n\n $list_inventory_usage = InventoryUsageHelper::searchList(\n $list_inventory_usage,\n app('request')->input('order_by'),\n app('request')->input('order_type'),\n app('request')->input('status'),\n app('request')->input('date_from'),\n app('request')->input('date_to'),\n app('request')->input('search')\n );\n\n $view = view('point-inventory::app.inventory.point.inventory-usage.index');\n $view->list_inventory_usage = $list_inventory_usage->paginate(100);\n \n return $view;\n }", "title": "" }, { "docid": "34cc5a5bcb89cb3b70aac961159a912e", "score": "0.5188255", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $dql = \"SELECT v FROM ControlEquipoBundle:Visita v join v.usuario u order by v.fechaentrada DESC, v.horaentrada DESC\";\n $query = $em->createQuery($dql);\n //$query->setMaxResults(250);\n $entities = $query->getResult();\n\n return $this->render('ControlEquipoBundle:Visita:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "035f6de7d67b67c8aac107864bb88b5b", "score": "0.5180829", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Feast:list.html.twig');\n }", "title": "" }, { "docid": "b9d64c1ee856a23c946d372c35bcdbbc", "score": "0.51793796", "text": "public function listAction() {\n return $this->render('BitcoinAdminBundle:Product:list.html.twig');\n }", "title": "" }, { "docid": "028093644275607026d1dae30fda249b", "score": "0.51791745", "text": "public function list() {\n $sql = 'SELECT * FROM ' . $this->getEntity()::getTableName();\n return Database::getInstance()->query($sql, \\PDO::FETCH_CLASS, $this->getEntity()::getClassName());\n }", "title": "" }, { "docid": "7665f66a7ce6c7ce94409c669ebb2ead", "score": "0.5174629", "text": "public function index(Entity $entity)\n {\n return response()->json($entity::latest()->simplePaginate());\n }", "title": "" }, { "docid": "7532fe8c0e13780920bbcfd7f19666c9", "score": "0.51329535", "text": "public function indexAction() {\n $em = $this->getDoctrine()->getEntityManager();\n\n \n $max_items_per_page = MyConfig::$items_per_page_backend;\n $current_page = $this->getRequest()->get('page', 1);\n\n $repo = $this->getDoctrine()->getEntityManager()->getRepository('SimpleCatalogBundle:BaseEntity');\n $query = $repo->createQueryBuilder('p')->orderBy('p.created_at', 'DESC');\n\n $adapter = new DoctrineORMAdapter($query);\n $pagerfanta = new Pagerfanta($adapter);\n\n $pagerfanta->setMaxPerPage($max_items_per_page);\n $pagerfanta->setCurrentPage($current_page);\n\n\n $entities = $pagerfanta->getCurrentPageResults();\n $num_pages = $pagerfanta->getNbPages();\n \n\n return $this->render('SimpleCatalogBundle:BaseEntity:index.html.twig', array(\n 'entities' => $entities,\n 'pagination' => $pagerfanta,\n 'num_pages' => $num_pages,\n ));\n }", "title": "" }, { "docid": "efe3dea804261580d76117796601a6d8", "score": "0.51252866", "text": "public function index()\n {\n\n\n $entities = $this->service->all();\n\n return view('admin/entities/index', compact('entities'));\n }", "title": "" }, { "docid": "3e8faab16dddae2ffef8981ea7248563", "score": "0.51176584", "text": "public function listHelperAction()\n {\n $em = $this->getDoctrine()->getManager();\n $userRepository = $em->getRepository(User::class);\n $promotionRepository = $em->getRepository(Promotion::class);\n $projectRepository = $em->getRepository(Project::class);\n \n $userQuery = $userRepository->findAll();\n $users=[];\n foreach($userQuery as $usersLoop){\n if ($usersLoop->hasRole('ROLE_HELPER')) {\n array_push($users, $usersLoop);\n }\n }\n return $this->render('ProjetYdaysManagerBundle:YdaysManager:ListeEtudiant.html.twig', array('promotions' => $promotionRepository->findAll(), 'users' => $users ));\n\n\n }", "title": "" }, { "docid": "cc15e268d7f19475118f1a3872565cf8", "score": "0.51079357", "text": "public function entities();", "title": "" }, { "docid": "4025db201e42cabfaa1621f9cfd1ffa3", "score": "0.5088974", "text": "function getUsages()\n\t{\n\t\tglobal $ilDB;\n\n\t\t// get usages in learning modules\n\t\t$q = \"SELECT * FROM file_usage WHERE id = \".$ilDB->quote($this->getId(), \"integer\");\n\t\t$us_set = $ilDB->query($q);\n\t\t$ret = array();\n\t\twhile($us_rec = $ilDB->fetchAssoc($us_set))\n\t\t{\n\t\t\t$ret[] = array(\"type\" => $us_rec[\"usage_type\"],\n\t\t\t\t\"id\" => $us_rec[\"usage_id\"],\n\t\t\t\t\"lang\" => $us_rec[\"usage_lang\"],\n\t\t\t\t\"hist_nr\" => $us_rec[\"usage_hist_nr\"]);\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "a9db7341e21c67371a3368b83b56e812", "score": "0.5087826", "text": "public function authlist($entity)\n\t{\n\t\t$auth = $this->session->get('auth');\t\n\t\t$categories = Acl::find('userid = \"'.$auth['id'].'\" AND entity = \"category\"');\n\t\t$cats = array();\n\n\t\t$cc=0;\n\t\t//TODO PUSH THE ALSO TEAMS \n\t\tforeach($categories as $cat)\n\t\t{\t\n\t\t\tarray_push($cats,$cat->entityid);\t$cc++;\t\n\t\t}\n\t\t\n\t\t$Entity = ucfirst($entity);\n\t\tif($entity == 'category')\n\t\t{\n\t\t\treturn $this->orquery('id',$cats);\n\t\t}\n\t\telse if($entity == 'emailmessage')\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\telse if($entity == 'user')\n\t\t{\n\t\t\t//USERS ARE CONNECTED BY ACL\n\t\t\t$users = array();\n\t\t\t$rules = Acl::find('entity = \"category\" AND ( '.$this->orquery('entityid',$cats).' ) ');\n\t\t\tforeach($rules as $rule)\n\t\t\t{ array_push($users,$rule->userid); }\n\t\t\n\t\t\t//return users\n\t\t\treturn $this->orquery('id',$users);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->orquery('categoryid',$cats);\n\t\t}\n\t}", "title": "" }, { "docid": "73f2765908654491ec9f8260d5265ec6", "score": "0.5082825", "text": "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BitcoinAdminBundle:Product')->findAll();\n\n return $this->render('BitcoinAdminBundle:Product:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "8aeec5a26248c77452386363b1b26f72", "score": "0.5081019", "text": "public function listCommand() {\n\t\t$accounts = $this->accountRepository->findAll();\n\t\tforeach ($accounts as $account) {\n\t\t\t$this->outputLine('- ' . $account->getAccountIdentifier() . ' | ' . $account->getParty()->getName() .\n\t\t\t\t' | ' . $account->getParty()->getEmail() . ' | ' . (in_array('Chantrea.Training:Administrator', $account->getRoles()) ?\n\t\t\t\t'Administrator' : 'User') . ' | ' . $account->getAuthenticationProviderName());\n\t\t}\n\t}", "title": "" }, { "docid": "b77735ad46fe36c7703267a37802902c", "score": "0.50722045", "text": "public function getEntities();", "title": "" }, { "docid": "2e3ffa0bcf0e670106def42b9b6b368b", "score": "0.50702554", "text": "public function displayListsUsage(): string\n {\n if ($this->maxLists() == '∞') {\n return '∞';\n }\n\n return $this->listsUsage().'%';\n }", "title": "" }, { "docid": "ecbc687d726376b317f5a7a8027e7e40", "score": "0.50647557", "text": "public function entityItemsCount();", "title": "" }, { "docid": "5ac0e8a4324a8a0923bcc6782ccd27d0", "score": "0.5063748", "text": "public function index()\n {\n $entities = $this->entityProvider->findAll();\n return view('entities.index', compact('entities'));\n }", "title": "" }, { "docid": "6ff9f5c3605cd11b10749fcd8b60642d", "score": "0.50583816", "text": "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CustomAzureusBundle:User')->findAll();\n\n return $this->render('CustomAzureusBundle:User:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "d29399034be7f5e56ab0c5ec77f7aa5a", "score": "0.50566477", "text": "public function listAction()\n {\n $repository = $this->getDoctrine()\n ->getRepository('MyRecipesDosBundle:Recipe');\n \n $recipe = $repository->findAll();\n return $this->render('MyRecipesDosBundle:Recipe:list.html.twig', array('recipes' => $recipe));\n }", "title": "" }, { "docid": "b07545dec93a7a6b5ffa821dec5df5b5", "score": "0.5046187", "text": "public function indexAction()\n {\n\n /*$em = $this->getDoctrine()->getManager('yilinker');\n $brand = $em->getRepository('Yilinker:Brand')->findOne(4);\n\n dump($brand);\n exit;*/\n\n\n\n $em = $this->getDoctrine()->getManager();\n //$em->getConfiguration()->getResultCacheImpl()->delete('productId_11');\n //$em->getConfiguration()->getResultCacheImpl()->delete('productId_2');\n\n $product = $em->getRepository('AppCoreBundle:Product')->findOne(1);\n \n dump($product->getBrand());\n exit;\n $product2 = $em->getRepository('AppCoreBundle:Product')->findOne(2);\n \n\n \n $user = $em->getRepository('AppCoreBundle:User')->find(1);\n\n //dump($user->getFirstName());\n dump($product[0]->getUser()->getFirstName());\n dump($user->getFirstName());\n\n dump($product2);\n //exit;\n\n return $this->render('AppCoreBundle:Default:index.html.twig', array('name' => /*$product[0]->getUser()->getFirstName()*/ ' ~~' .$product[0]->getName()));\n\n exit;\n }", "title": "" }, { "docid": "dfeddce21c510cb83b20d1e10433a992", "score": "0.504221", "text": "public function entityDescription();", "title": "" }, { "docid": "ba14098aefb832fd7f0d32c089d2f7a3", "score": "0.5037231", "text": "public function list()\n {\n $equipe= $this->getDoctrine()->getRepository(Equipe::class)->findAll();\n\n\n return $this->render('equipe/list.html.twig', [\n 'equipes' => $equipe,\n ]);\n }", "title": "" }, { "docid": "fcf838eba8d7a46d46bab96877808d69", "score": "0.50344336", "text": "public function list(Request $request) {\n $products = Product::all();\n return view('products.listings', ['products' => $products, 'productController' => $this]);\n }", "title": "" }, { "docid": "e5078368ccfa41f99b2ba33557ccffcf", "score": "0.50237226", "text": "public function testControllerListing() {\n\n $testUser = $this->drupalCreateUser(array(\n 'view iai_ocean_temperature entity',\n ));\n\n $this->drupalLogin($testUser);\n $this->drupalGet('/iai_ocean_temperature/entity-list');\n $page_text = $this->getTextContent();\n $this->assertContains('Fifth Entity', $page_text);\n $this->assertContains('First Entity', $page_text);\n $this->assertContains('Fourth Entity', $page_text);\n $this->assertContains('Page 2', $page_text);\n $this->clickLink('Label');\n $page_text = $this->getTextContent();\n $this->assertContains('Third Entity', $page_text);\n $this->assertContains('Second Entity', $page_text);\n $this->assertContains('Fourth Entity', $page_text);\n $this->clickLink('Third Entity');\n $page_text = $this->getTextContent();\n $this->assertContains('56.0', $page_text);\n\n/******************************************************************************\n ** **\n ** If I were testing multilingual I would either need add more tests here **\n ** or I would add another test to check how the listing works when I **\n ** navigate to a listing using the translated language. **\n ** **\n ******************************************************************************/\n }", "title": "" }, { "docid": "91514a51b9c45793b4ecf9d3e698790d", "score": "0.50157815", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $utils = $em->getRepository('UtiliBundle:Util')->findAll();\n\n return $this->render('util/index.html.twig', array(\n 'utils' => $utils,\n ));\n }", "title": "" }, { "docid": "cf7cfba7630ff9d5336cec343811df2e", "score": "0.50113416", "text": "public function actionViewMyProductList()\n {\n $userId = Yii::app()->user->getId();\n\n $dataProvider = new CActiveDataProvider('Product', array(\n 'criteria' => array(\n 'condition' => 'user_id=' . $userId,\n ))\n );\n\n $this->render('viewMyProductList', array('dataProvider' => $dataProvider));\n }", "title": "" }, { "docid": "0b05133fd6c903dfdaf9973a22d67c0b", "score": "0.5004941", "text": "function viewEntity($entity) {\n if (!is_object($entity)) {\n $entity = getEntity($entity);\n }\n return $entity->view();\n}", "title": "" }, { "docid": "5377702223db1b6f48abd6d2a89deef6", "score": "0.4995814", "text": "public function listAction()\n {\n $objects = $this->getManager()->getRepository($this->entity)->findAll();\n\n $json = array();\n foreach ($objects as $object) {\n $json[] = $object->jsonSerialize();\n }\n\n return new JsonResponse($json);\n }", "title": "" }, { "docid": "d5cad0ee3d2aac43964dd6d7314501fe", "score": "0.49953526", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n/* $entities = $em->getRepository('HegesAppServiceBundle:Service')->findAll(); */\n $entities = $em->getRepository('HegesAppServiceBundle:Service')->getAllServicesByNodeName();\n\n return $this->render('HegesAppServiceBundle:Service:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "9c8446bdda246c4d668c853fcd5f4072", "score": "0.4989604", "text": "public function actionList()\n { \n $model = new Tag();\n $params = \\Yii::$app->request->getBodyParams();\n $dataProvider = $model->searchList($params);\n\n return $this->renderList('list', [\n 'model' => $model,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "e32b446e238f62b10429218dfc9bf547", "score": "0.4988717", "text": "public function listOffersByUserAction(Request $request)\n {\n $page = (int)$request->attributes->get('page');\n $userAttr = $this->user->getAttributes();\n $offers = $this->enMan->getRepository('CatalogueOffersBundle:Offers')\n ->getOffersListByUser(array(\n 'maxResults' => $this->config['pager']['perPage'],\n 'start' => $this->config['pager']['perPage']*($page-1)\n ), (int)$userAttr['id']);\n\t$pager = new Pager(array('before' => $this->config['pager']['before'],\n\t 'after' => $this->config['pager']['after'], 'all' => $userAttr['stats']['offers'],\n\t\t\t\t\t 'page' => $page, 'perPage' => $this->config['pager']['perPage']\n\t\t\t\t ));\n return $this->render('CatalogueOffersBundle:Offers:listUserOffers.html.php', array('offers' => $offers, 'pager' => $pager->setPages(),\n 'ticket' => $this->sessionTicket));\n }", "title": "" }, { "docid": "e02a06d98906077d91ba6b7291cb8d49", "score": "0.49823534", "text": "public function list(Request $request)\n {\n $this->ShareModelOther();\n $datas = Product::orderBy('updated_at','DESC')->paginate(3);\n return view('admin.product.list')->with('datas',$datas);\n }", "title": "" }, { "docid": "02f3b10adeb3fcbf12d4ac2e2b04aec8", "score": "0.4977005", "text": "public function getBackendEntitySearchResults(){\n \n // Optional security check \n // The json feed is only accessible for logged in users\n $user = new \\Concrete\\Core\\User\\User();\n if(!$user->isRegistered()){\n $this->renderJsonNoCaching(array('error' => 'You must be logged in to be able to fetch this information.'));\n }\n \n $entities = $this->entityRepo->findAll();\n \n \n $results = array();\n if(count($entities) > 0){\n foreach($entities as $entity){\n \n // @todo = take the URL_REWRITING into account\n $link = BASE_URL.'/index.php/dashboard/example/entity/edit/'.$entity->getId();\n\n // The \"label\" will be shown in the typeahead\n // The \"value\" will be searched against\n // The \"link\" contains the url to the edit view in the backend\n $results[] = array(\n 'label' => $entity->getName(),\n 'value' => $entity->getName(),\n 'url' => $link\n );\n }\n }\n // output a cached json string\n // In most cases this is the best choice for the frontend implementations.\n //$this->renderJson($results);\n \n // output a not cached json string - desired for the most backend use cases\n $this->renderJsonNoCaching($results);\n }", "title": "" }, { "docid": "1f07bed0877f5d98797b9a7a3f507751", "score": "0.49761277", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DeteccionBundle:Cpu')->findAll();\n\n return $this->render('DeteccionBundle:Cpu:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "0210f2f86d2459fa888675f97adc2c63", "score": "0.49745873", "text": "public function listar(){\n $page=0;\n $firstResult=0;\n $maxResultsQuery = ($GLOBALS['em']->getRepository('Src\\Entity\\Configuration\\Configuration')->find(1));\n $maxResults = $maxResultsQuery->getNumberOfItems();\n \n if (isset($_GET['page'])) {\n $page=$_GET['page'];\n $firstResult=$page * $maxResults;\n }\n /* Paginacion -- que elementos mostrar */\n /* Paginacion -- calcular numero de paginas */\n \n $numberOfItems= count($GLOBALS['em']->getRepository('Src\\Entity\\Purchase\\Sale')-> findAll());\n $numberOfPages= ceil($numberOfItems / $maxResults);\n\n /* Paginacion -- calcular numero de paginas */\n $sales = $GLOBALS['em']->getRepository('Src\\Entity\\Purchase\\Sale')->findOrderedByName($firstResult, $maxResults);\n $plantilla = $GLOBALS['twig']-> loadTemplate('purchase/sales.html.twig');\n $plantilla-> display(array('sales' => $sales, 'accion' => \"Vendas\", 'actualPage' => $page, 'numberOfPages' => $numberOfPages,'url'=>$this->url));\n }", "title": "" }, { "docid": "43f811cf57ec80a9a031e90455b520f4", "score": "0.4968009", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t$show_type = intval($this->getInput('show_type'));\n\t\t$show_type = !empty($show_type) ? $show_type : $this->show_type;\n\t list($total, $suppliers) = Gou_Service_Supplier::getList($page, $perpage, array('show_type'=>$show_type));\n\t\t$this->assign('suppliers', $suppliers);\n\t\t$url = $this->actions['listUrl'] .'/?show_type=' . $show_type . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('show_type', $show_type);\n\t}", "title": "" }, { "docid": "751acf3ed5a3b1d65e5ff6d475d2d511", "score": "0.49637285", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('DeclareNounouGestNounouBundle:Enfant')->findByUser($this->getUser());\n\n return $this->render('DeclareNounouGestNounouBundle:Enfant:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "c77e065bad22f9e3f89b1936d0463ae7", "score": "0.49617603", "text": "public function list(Request $request) : JsonResponse{\n\n /* check if User does not have permission */\n $this->checkPerms($request, 'view', $this->module);\n return DataTables::eloquent(Equipment::with('area'))\n ->addColumn('actions', function ($equipment) {\n return View::make(\"pages.{$this->module}.datatables.actions\")->with('equipment', $equipment)->render();\n })\n ->rawColumns(['actions'])\n ->toJson();\n }", "title": "" }, { "docid": "48a6e84e1514f2e18771eca89dbad4e3", "score": "0.49602842", "text": "public function list(Request $request)\n\t{\t\n\t\treturn response()->json(Article::select(['id', 'title', 'user_id', 'approve_status', 'created_at', 'updated_at', 'is_featured', 'paid_status'])->get(), 200);\n\t}", "title": "" }, { "docid": "f6cb41c7d36da380fbe942e5915706cc", "score": "0.4955746", "text": "public function listAction()\n {\n $this->view->assign('value', $this->personRepository->findAll());\n }", "title": "" }, { "docid": "89366075bab35ab7d8eddb1f851a7760", "score": "0.49526536", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('BangnationUserBundle:User')->findAll();\n\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "1425e45c9bc4ece395edb4b1758c7f4c", "score": "0.49504402", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MinsalsifdaBundle:FosUserUser')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "bceea2886e120ad36d4c5b8eaff78e10", "score": "0.49494943", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n\n $user = $this->get('security.context')->getToken()->getUser();\n $userEntities = $em->getRepository('BackendBundle:Client')->findByUserOrderedDesc($user);\n $notUserEntities = $em->getRepository('BackendBundle:Client')->findClientsWithNoUserOrderedDesc($user);\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n array_merge($userEntities, $notUserEntities),\n $this->get('request')->query->get('page', 1),\n 30);\n\n return $this->render('BackendBundle:Client:index.html.twig', array(\n 'entities' => $pagination,\n 'clientes' => $em->getRepository('BackendBundle:Client')->findAll()\n ));\n }", "title": "" }, { "docid": "7da6016509fd17c9cd028d720a511aca", "score": "0.49475998", "text": "public function getEntityAttributesFiltered($entity, $usage, $paths) {\n // validation begin\n $validate = IW_Core_Validate::getInstance();\n $validate\n ->validEnum($usage, 'IW\\Core\\Attribute\\Enum\\Usage', 'usage');\n\n // Entities can contain string from enum or dynamic entities, e.g: DYNAMIC_ENTITY.allTypes\n $this->_validateEntities(array($entity));\n\n $validate->checkValid();\n // validation end\n\n $options = array(\n OptionsKeys::LANG => IW_Core_Context::getInstance()->getLanguage()\n );\n\n if ($this->_isEntityType($entity, Entity::DYNAMIC_ENTITY)) {\n $apiName = $this->_getApiNameFromDynamicEntityType($entity);\n\n $entityVo = EntityFactory::createEntityForAttributes(\n Entity::DYNAMIC_ENTITY,\n $usage,\n $options\n );\n\n $entityVo->setApiName($apiName);\n\n $result = $entityVo->getAttributesFiltered($paths);\n } else {\n $entityVo = EntityFactory::createEntityForAttributes($entity, $usage, $options);\n $result = $entityVo->getAttributesFiltered($paths);\n }\n\n return $result;\n }", "title": "" }, { "docid": "2eba24dae3b223805eafe792254a0a9c", "score": "0.49343622", "text": "public function userStats() {\r\n $content = array();\r\n\r\n $this->_response = parent::query('CMD_API_SHOW_USER_USAGE', $content);\r\n return $this->_response;\r\n }", "title": "" }, { "docid": "3c6cae22c627d1ece2035bcbd89096b4", "score": "0.49311376", "text": "public function indexAction()\n {\n $listing = $this->createListing(new TokenOptions($this->getDoctrine()->getEntityManager()));\n\n return array(\n 'listing' => $listing\n );\n }", "title": "" }, { "docid": "44cbd710492e397689e1ee1926572062", "score": "0.493067", "text": "public function listUserAction($request) {\r\n $conn = $this->getConnection();\r\n \r\n \r\n $request= $conn->createQueryBuilder()\r\n ->select('*')\r\n ->from('users','u')\r\n ->execute();\r\n\r\n\r\n $user = $request->fetchAll();\r\n \r\n\r\n //you can return a Response object\r\n return [\r\n // je pars de l index et je retourne en arriere\r\n 'view' => 'WebSite/View/user/listUser.html.php', // should be Twig : 'SupInternetMVC/View/user/listUser.html.twig'\r\n 'users' => $user\r\n\r\n ];\r\n }", "title": "" }, { "docid": "9edf5da99bd8697d5f7811f3a80d124b", "score": "0.49300376", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SolicitudesBundle:Unidades')->findAll();\n\n return $this->render('SolicitudesBundle:Unidades:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "a08d513362d52968225490a233336988", "score": "0.49196413", "text": "public function getList() {\n $results = [];\n \n $conditions = [];\n $id = $this->request->getData('id');\n $entity = $this->request->getData('entity');\n \n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t \n\t\t \n $exclude_ids = $this->request->getData('exclude_ids');\n if(!empty($exclude_ids))\n $conditions += ['id not in' => $exclude_ids];\n\n $entityTable = TableRegistry::get($entity);\n\n $results = $entityTable->find('list', ['conditions' => $conditions, 'limit' => Configure::read('paginate.limit')]); \n\n return $this->_response($results); \n }", "title": "" }, { "docid": "a293bbc68f99e89683de02e0b1b1cd9d", "score": "0.4914375", "text": "public function getList(Request $request)\n {\n return MedicalServiceProviderResource::collection(MedicalServiceProvider::all());\n }", "title": "" }, { "docid": "c821b9471b45ba7f4345e1c320423ea5", "score": "0.49131063", "text": "public function actionList() {\n\t\t#$this->check_auth();\n\t\t//Get params data\n\t\t//validate params\n\t\t//$model = User::model();\n\t\t//\t\t$model->scenario = 'User'; // create scenario name\n\t\t//\t\t$model->id = 1; // set value for id\n\t\t//\t\tif (!$model->validate()){\n\t\t//\t\t\t$result = $this->get_error_validates($model->getErrors());\n\t\t//\t\t\t$this->response($result, 'errors');\n\t\t//\t\t}\n\n\t\t$models = User::model()->findAll();\n\t\tif (is_null($models)) {\n\t\t\t$this->_sendResponse(200, sprintf('No items where found for model user'));\n\t\t} else {\n\t\t\t$rows = array();\n\n\t\t\tforeach ($models as $model)\n\t\t\t\t$rows[] = $model->attributes;\n\t\t\t// $API = new ApiController(\"\");\n\t\t\t$this->_sendResponse(200, $this->_getObjectEncoded('user', $rows));\n\t\t}\n\n\n\t\t//\t\tif(empty($data))\n\t\t\t// $this->response(array('error'=>array('status'=>204, 'message'=>'No Content')));\n\t\t\t// else {\n\t\t\t// \t$data_response = array(\n\t\t\t//\t\t\t\t'error'=> array('status'=>200, 'message'=>''),\n\t\t\t//\t\t\t\t'datas'=>$data->attributes\n\t\t\t//\t\t\t);\n\t\t\t//\t\t\t$this->response($data_response);\n\t\t\t//\t\t}\n\t\t}", "title": "" }, { "docid": "d680eea2f5ef592531ce08b4fa019972", "score": "0.49094123", "text": "public function listCommand($identifierFilter = NULL, $limit = 100) {\n\n\t\t$result = $this->accountManagementService->getAccountList($identifierFilter, $limit);\n\n\t\t$this->outputLine('Creation date Expiration date Auth. prov. name Identifier');\n\t\t$this->outputLine('------------------------ ------------------------ -------------------- -------------');\n\n\t\t/** @var $account \\TYPO3\\Flow\\Security\\Account */\n\n\t\t$displayCount = 0;\n\t\tforeach ($result as $account) {\n\t\t\t$this->outputLine('%s %s %s %s', array(\n\t\t\t\t$account->getCreationDate() ? $account->getCreationDate()->format(\\DateTime::ISO8601) : 'NULL' . str_repeat(' ', 20),\n\t\t\t\t$account->getExpirationDate() ? $account->getExpirationDate()->format(\\DateTime::ISO8601) : 'NULL' . str_repeat(' ', 20),\n\t\t\t\tstr_pad($account->getAuthenticationProviderName(), 20, ' ', STR_PAD_RIGHT),\n\t\t\t\t$account->getAccountIdentifier()\n\t\t\t));\n\t\t\t$displayCount++;\n\t\t\tif ($displayCount >= $limit) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine();\n\t\t$this->outputLine('Displayed %d of %d accounts', array($displayCount, $result->count()));\n\t}", "title": "" }, { "docid": "a77999c80d352aef3b33ea8265718b89", "score": "0.49036202", "text": "public function actionList()\n {\n $model = new User('search');\n $model->unsetAttributes();\n if(isset($_GET['User'])){\n $model->attributes = $_GET['User'];\n }\n $this->render('list',array('model'=>$model));\n }", "title": "" }, { "docid": "04a4689766670d961f1b0c25d30afc4b", "score": "0.4903314", "text": "public function indexAction() {\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\n\t\t$entities = $em->getRepository('GuepeCrmBankBundle:BankProduct')\n\t\t\t\t->findAll();\n\n\t\treturn array('entities' => $entities);\n\t}", "title": "" }, { "docid": "0cbf06d23ee2f14f7ac0e3b31009633a", "score": "0.48977402", "text": "public function index (Entity $entity)\n {\n return view('contacts.index', compact('entity'));\n }", "title": "" }, { "docid": "90fe7e79b9c7c8f7d35032f816e93596", "score": "0.48935232", "text": "public function indexAction()\n {\n list($filterForm, $queryBuilder) = $this->filter();\n\n list($entities, $pagerHtml) = $this->paginator($queryBuilder);\n\n return $this->render('CoreUserBundle:User:index.html.twig', array(\n 'entities' => $entities,\n 'pagerHtml' => $pagerHtml,\n 'filterForm' => $filterForm->createView(),\n ));\n }", "title": "" }, { "docid": "fd0bffa5136ea12a47d14ef42d170f10", "score": "0.4892888", "text": "public function list()\n {\n\n\n }", "title": "" }, { "docid": "3cfaabd2bc4d5baab9b1f97374a61c07", "score": "0.4885538", "text": "public function tableAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $goods = $em->getRepository(Goods::class)->findAll();\n\n if (!$goods) {\n throw $this->createNotFoundException('Данные не найдены');\n }\n\n return $this->render('ShopBundle:Table:table.html.twig', [\n 'goods' => $goods,\n ]);\n }", "title": "" }, { "docid": "c186aa6367852b798bb4f2f7f0c488c1", "score": "0.48840725", "text": "public function users_list( UserRepository $repo) {\n\n $users = $repo->findAll();\n\n return $this->render('user/list.html.twig', [\n \"users\" => $users,\n ]);\n }", "title": "" }, { "docid": "56ede7238aec31e67d0676b9d154204a", "score": "0.48830605", "text": "static function print_usage() {\n foreach (self::$objects as $class=>$objects) {\n print \"$class=\".count($objects).\"\\n\";\n }\n\t}", "title": "" }, { "docid": "a1836a85440fd7e70146db0b66cf4668", "score": "0.48765752", "text": "public function list_atk() {\n\t\t\t\t$site \t\t= $this->mConfig->list_config();\n\t\t\t\t$barang \t\t= $this->mProses->get_atk();\n\t\t\t\t\n\t\t\t\t$data = array(\t'title'\t\t=> 'Proses',\n\t\t\t\t\t\t\t\t'menu'\t\t=> 'proses-unit-list',\n\t\t\t\t\t\t\t\t'site'\t\t=> $site,\n\t\t\t\t\t\t\t\t'barang'\t=> $barang,\n\t\t\t\t\t\t\t\t'isi'\t\t=> 'sistem/proses/unit/list-atk');\n\t\t\t\t$this->load->view('public/layout/wrapper',$data);\t\t\n\t\t\t}", "title": "" }, { "docid": "979ad0ba8a23a993970120a9a30f2c36", "score": "0.48691553", "text": "public function indexAction()\n {\n $user = $this->getUser();\n $username = $user -> getUsername();\n\n $em = $this->getDoctrine()->getManager();\n\n $todolists = $em->getRepository('A2xBlogBundle:Todolist')->findBy( array('creator' => $username) );\n\n return $this->render('list/index.html.twig', array(\n 'todolists' => $todolists,\n ));\n }", "title": "" }, { "docid": "2dc5f07ee4f24339fd950bfd78dec8d2", "score": "0.48684862", "text": "public function collectionGetAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MLDemoBundle:User')->findAll();\n\n return $entities;\n }", "title": "" }, { "docid": "2640848d117d1c30a7348840dc4c8be0", "score": "0.48675162", "text": "public function listItemUser() {\r\n $criteria = new CDbCriteria();\r\n //$criteria->with = array('Language', 'LandsLanguage');\r\n $criteria->order = 'record_order DESC, postdate DESC';\r\n $criteria->condition = 'username =:user';\r\n $criteria->params = array(\":user\" => Yii::app()->memberLands->id);\r\n\r\n $count = $this->count($criteria);\r\n\r\n // elements per page\r\n $pages = new CPagination($count);\r\n $pages->pageSize = 15;\r\n $pages->applyLimit($criteria);\r\n\r\n return array('models' => $this->findAll($criteria), 'pages' => $pages);\r\n }", "title": "" }, { "docid": "2aeb657fec5c37d4cdfafe99ff9e0ba0", "score": "0.48670477", "text": "public static function generateUses(Entity $object) {\n\t\t\n\t\t$str = '';\n\t\t$uses = $object->getUses();\n\t\t\n\t\tif (! empty($uses)) {\n\t\t\t\n\t\t\tforeach($uses as $class => $as) {\n\t\t\t\t\n\t\t\t\t$str .= \"use {$class}\";\n\t\t\t\t\n\t\t\t\tif ($as !== $class) {\n\t\t\t\t\t$str .= \" as {$as}\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$str .= \";\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$str .= \"\\n\";\n\t\t}\n\t\t\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "59679cabef1534f8a3441704c51fd24e", "score": "0.48579985", "text": "function UserListShow($listType, $itemList){}", "title": "" }, { "docid": "bdea5e9c41cb88f8e22e460dc4b73507", "score": "0.48548812", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('PasaRequirementBundle:Feature')->findAll();\n\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "e087c75df0cacd52ea91cca2821df122", "score": "0.48543018", "text": "public function indexAction()\n {\n $entities = $this->get('FabricationManager')->getAllEntity();\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "a5cb09b734f998367e99eef4e4470a19", "score": "0.48524317", "text": "public function actionList()\n {\n $users = User::find()->asArray()->all();\n\n $this->stdout(sprintf(\"%4s %-15s %-15s %-15s %-25s\\n\", \"ID\", \"User\", \"First Name\", \"Last Name\", \"Email Address\"), Console::BOLD);\n foreach ($users as $user) {\n $this->stdout(sprintf(\"%4s %-15s %-15s %-15s %-25s\\n\", $user['id'], $user['username'], $user['firstname'], $user['lastname'], $user['email']));\n }\n\n return Controller::EXIT_CODE_NORMAL;\n }", "title": "" }, { "docid": "bfacad40788b1146d46fd78e214c89f7", "score": "0.48458976", "text": "public function getListOfLenders_get()\n\t{\n\t\t$fields = array('entity_id','full_name','short_name');\n\t\t$where_condition_array = array('isactive' => 1,'fk_entity_type_id' => 2);\n\t\t$result_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,ENTITY);\n\t\tif(count($result_data))\n\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach($result_data as $key => $value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fields = array('*');\n\t\t\t\t\t\t\t$where_condition_array = array('isactive' => 1,'fk_entity_id' => $value['entity_id']);\n\t\t\t\t\t\t\t$result_data[$key]['billing_address'] = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,ENTITYBILLING);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data['dataStatus'] = true;\n\t\t\t\t\t\t$data['status'] = REST_Controller::HTTP_OK;\n\t\t\t\t\t\t$data['records'] = $result_data;\n\t\t\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t\t\t$data['dataStatus'] = false;\n\t\t\t\t\t\t$data['status'] = REST_Controller::HTTP_NO_CONTENT;\n\t\t\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "85a1ada2ce89fa305531610b073a656d", "score": "0.48456472", "text": "public function listar() {\n $produto = new Produto();\n $lista_produtos = $produto->buscaLista();\n /**\n * Exiba a lista de produtos\n */\n require 'view/produto-view.php';\n }", "title": "" }, { "docid": "2b3f78c1e989f7637352cf1704bda452", "score": "0.4843555", "text": "public function testList()\n {\n $this->visit('/admin/user')\n ->see(UserCrudController::SINGLE_NAME);\n }", "title": "" }, { "docid": "c19ef1ccb4be65ba7e89cd0019e0d999", "score": "0.48411873", "text": "public function getUsersAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ObjectBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "187ec101935a79ed032959ef1b75d4ae", "score": "0.48376358", "text": "public function actionList()\n {\n \n return $this->render('_list');\n }", "title": "" }, { "docid": "a678f70dfb01d3e0201dfffa69b80e2f", "score": "0.48280293", "text": "public function Listing() {\n\tthrow new exception('Listing() is deprecated; call RenderRows() and output the returned results.');\n }", "title": "" }, { "docid": "91b29c734dd33fa6ab5758c46e47554b", "score": "0.48278782", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n $optin = $this->Request()->getParam('optin', 2);\n $result = $this->resource->getList($offset, $limit, $filter, $sort, $optin);\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "89fcc39a1abcdd0078ad377bd35dc628", "score": "0.48246774", "text": "function listar(){\n\trequire './modulousuarios/modelos/usuariosModelo.php';\n\n\t//Le pide al modelo todos los items\n\t$items = buscarTodosLosItems();\n\n\t//Pasa a la vista toda la información que se desea representar\n\trequire './modulousuarios/vistas/listar.php';\n}", "title": "" }, { "docid": "4089678553076638d3ed555c6794e465", "score": "0.48210168", "text": "public function getListAction(): void\n {\n $repository = $this->repository;\n $entities = [];\n\n if ($limit = $this->request->query->get('limit')) {\n $repository->take($limit);\n }\n\n if ($offset = $this->request->query->get('offset')) {\n $repository->skip($offset);\n }\n\n if ($order = $this->request->query->get('order')) {\n $orderParts = explode(',', $order);\n\n if (count($orderParts) !== 2) {\n throw new InvalidArgumentException('Invalid format in order query param. Should be: ?order=id,DESC');\n }\n\n $direction = strtoupper($orderParts[1]);\n\n if (!in_array($direction, ['ASC', 'DESC'])) {\n throw new InvalidArgumentException('Invalid direction kind - allowed is ASC or DESC');\n }\n\n $this->repository->orderBy(snake_case($orderParts[0]), $direction);\n }\n\n if ($where = $this->request->query->get('where')) {\n foreach ($where as $condition) {\n $this->repository->where(snake_case($condition[0]), $condition[1], $condition[2]);\n }\n }\n\n if ($fields = $this->request->query->get('fields')) {\n $entities = $repository->get($fields)->toArray();\n } else {\n $entities = $repository->get()->toArray();\n }\n\n if (Config::get('Entity.CamelCaseFieldNames')) {\n $entities = $this->toCamelCase($entities);\n }\n\n $this->responseData = $entities;\n }", "title": "" }, { "docid": "3be3d978b9d733ae568c95615e9a0f54", "score": "0.48162007", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $maincompany = $this->getUser()->getMaincompany();\n $entities = $em->getRepository('NvCargaBundle:Adservice')->findByMaincompany($maincompany);\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "7b77e71977df6dff00c1d89286e491a4", "score": "0.48142025", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('IntranetBundle:Ueb')->findAll();\n\n return $this->render('IntranetBundle:Ueb:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" } ]
fac7fbd8f0dade0c96e4d57c22f04c64
Very basic password generator
[ { "docid": "dee3244fb658e4d062af76715b24fc7e", "score": "0.0", "text": "private function generatePWD()\n\t{\n\t\t$letters=\"abcdefghijklmnopqrstuvwxyz\";\n\t\t$numbers =\"0123456789\";\n\t\t\n\t\t$randomstring = '';\n\t\tfor ($i=0;$i<1;$i++)\n\t\t{\n\t\t\t$rlet = rand(0,strlen($letters));\n\t\t\t$randomstring = $randomstring . $letters[$rlet];\n\t\t}\n\t\tfor ($i=0;$i<2;$i++)\n\t\t{\n\t\t\t$rlet = rand(0,strlen($numbers));\n\t\t\t$randomstring = $randomstring . $numbers[$rlet];\n\t\t}\n\t\tfor ($i=0;$i<3;$i++)\n\t\t{\n\t\t\t$rlet = rand(0,strlen($letters));\n\t\t\t$randomstring = $randomstring . $letters[$rlet];\n\t\t}\n\t\tfor ($i=0;$i<2;$i++)\n\t\t{\n\t\t\t$rlet = rand(0,strlen($numbers));\n\t\t\t$randomstring = $randomstring . $numbers[$rlet];\n\t\t}\n\t\t\n\t\treturn $randomstring;\n\t}", "title": "" } ]
[ { "docid": "cc0e80f05a16757c54ee202e751d5704", "score": "0.85167974", "text": "public function generatePassword();", "title": "" }, { "docid": "3131220333db9a6c81173dd7ebf75a86", "score": "0.8229798", "text": "public function generatePassword() {\n srand();\n $pass = \"\";\n\n for ( $i=1; $i <= 8; $i++ ) {\n $char = 58;\n\n while ( $char > 57 and $char < 65 or strpos ( \"1l0ouvi4589\", strtolower( chr( $char ) ) ) !== false ) {\n $char = rand( 0, 42 ) + 48;\n }\n\n $pass .= chr( $char );\n }\n\n $pass = strtolower ( $pass );\n $this->plaintextPassword = $pass;\n }", "title": "" }, { "docid": "7a9995ea9ec485e3b526c93d4eb1cf7e", "score": "0.80774504", "text": "public function passwordGenerator()\n{\n return str_random(8);\n}", "title": "" }, { "docid": "59bcc21cbac90001653c05d90cc2490b", "score": "0.80762786", "text": "function genPass($len = 8) {\n for ($i=0;$i<=$len;$i++) {\n $passwd = sprintf('%s%c', isset($passwd) ? $passwd : NULL, rand(48, 122));\n }\n return $passwd;\n}", "title": "" }, { "docid": "347caf2d723b8b482c8fa58a013bbb6f", "score": "0.79219884", "text": "function createPassword() {\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\"; // no 1 or L\n srand((double)microtime() * 1000000);\n $pass = \"\";\n for ($i = 0; $i < 10; $i++) {\n $num = rand() % 33;\n $tmp = substr($chars, $num, 1);\n $pass .= $tmp;\n }\n\n return $pass;\n }", "title": "" }, { "docid": "36ae76de7a4a7fe608883beae1b06c23", "score": "0.7859869", "text": "public static function createPassword()\n {\n $combinations = array( );\n\n // Combinacoes do tipo letras + numeros\n\n $combinations[] = 'abcdefghijklmnopqrstuvwxyz';\n $combinations[] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n // numeros (AUTOMATIC_PASSWORD_GENERATION_SOURCE = NUMERIC)\n $combinations[] = '1234567890';\n\n // Agrupa todos os tipos de de caracteres\n $caracteres = implode('', $combinations);\n\n // Obtem o tamanho dos caracteres agrupados\n $len = strlen($caracteres);\n\n $return = null;\n\n for ( $count = 1;\n $count <= 6;\n $count++ )\n {\n // Cria um número aleatório de 1 até $len para pegar um dos caracteres\n $rand = mt_rand(1, $len);\n\n // Concatenado o caracteres gerado aleatório na variável $retorno\n $return .= $caracteres[$rand - 1];\n }\n\n return $return;\n }", "title": "" }, { "docid": "d958374cda8861e5e3fd5c466c0e7ef5", "score": "0.785915", "text": "private function generatePassword() {\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n \n $newPassword = \"\";\n \n for($i = 0; $i < 8; $i++) {\n $newPassword .= $chars[rand(0, 61)];\n }\n \n return $newPassword;\n }", "title": "" }, { "docid": "3b8e9135c11c98e5ab281c895c616d00", "score": "0.7811676", "text": "function generatePassword()\r\n{\r\n \t$passwort = \"\";\r\n \t$pool = \"qwertzupasdfghkyxcvbnm23456789\";\r\n \tsrand ((double)microtime()*1000000);\r\n \tfor($n = 0; $n <= 5; $n++) {\r\n \t$passwort .= substr($pool,(rand()%(strlen ($pool))), 1);\r\n \t}\r\n return $passwort;\r\n}", "title": "" }, { "docid": "949e12d506015b6ecd0a8a0029d0b84f", "score": "0.77893835", "text": "function _generatePassword()\n {\n $chars_array = array();\n for($i = 48; $i <= 57; $i++)\n {\n $chars_array[] = chr($i);\n }\n \n for($i = 97; $i <= 122; $i++)\n {\n $chars_array[] = chr($i);\n }\n \n $cnt_chars_array = count($chars_array) - 1;\n \n $password = array();\n for($i = 0; $i < 4; $i++)\n {\n $password[] = $chars_array[rand(0, $cnt_chars_array)];\n }\n \n $return = implode('', $password);\n \n return $return;\n }", "title": "" }, { "docid": "e460a6d297a1554f02b93b70183760da", "score": "0.7774057", "text": "private function _generatePassword()\n {\n return substr(base64_encode(rand()), 0, 8);\n }", "title": "" }, { "docid": "7acf557a5f451c3d8f6c8664902b5960", "score": "0.7767588", "text": "public function createPassword()\n {\n \t$token = 'abcdefghjkmnpqrstuvz123456789';\n\n $password = '';\n for ($i = 0; $i < 7; $i++)\n {\n $password .= $token[(rand() % strlen($token))];\n }\n\n return $password;\n }", "title": "" }, { "docid": "ccbf0c35b55d05fd2ab11510c59a6349", "score": "0.7742479", "text": "function generaPass() {\n //Se define una cadena de caractares. Te recomiendo que uses esta.\n $cadena = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n //Obtenemos la longitud de la cadena de caracteres\n $longitudCadena = strlen($cadena);\n \n //Se define la variable que va a contener la contraseña\n $pass = \"\";\n //Se define la longitud de la contraseña, en mi caso 10, pero puedes poner la longitud que quieras\n $longitudPass = 10;\n \n //Creamos la contraseña\n for ($i = 1; $i <= $longitudPass; $i++) {\n //Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\n $pos = rand(0, $longitudCadena - 1);\n\n //Vamos formando la contraseña en cada iteraccion del bucle, añadiendo a la cadena $pass la letra correspondiente a la posicion $pos en la cadena de caracteres definida.\n $pass.= substr($cadena, $pos, 1);\n }\n return $pass;\n }", "title": "" }, { "docid": "41779eca148366092e25012b99a6f7bd", "score": "0.77023447", "text": "function generate_random_pass()\n\t{\n\t\t$result_password = \"\";\n\t\t$password_length = 10;\n\t\t$alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\n\n\t\tfor ($i = 0; $i < $password_length; $i++)\n\t\t{\n\t\t\t$random_index = rand(0, strlen($alphabet) - 1);\n\t\t\t$result_password .= $alphabet[$random_index];\n\t\t}\n\t\n\t\treturn $result_password;\n\t}", "title": "" }, { "docid": "ef1a88bd1ee4d5fc5a50d4072f0d930e", "score": "0.7697693", "text": "function createRandomPassword() {\n $password=\"\";\n $randomGenerator=array_merge(range('A','Z'),range('a','z'),range(0,9));\n for($i=0;$i < 8;$i++) {\n\t$password .= $randomGenerator[array_rand($randomGenerator)];\n }\n \n return $password;\n}", "title": "" }, { "docid": "d641d7359938df7b615d4e486b618abf", "score": "0.76966316", "text": "private function _generatePassword(){\n\t\t\t$list = new GenericList();\n\t\t\t$list->push($this->_getRandomWordFromPool());\n\n\t\t\t$i = $list->length;\n\t\t\t$len = $this->_config->get(\"length\");\n\t\t\t\n\t\t\twhile($len > $i){\n\t\t\t\t//base the next random word on the next item in the list\n\t\t\t\t$this->_resetPool($list->indexOf($i));\n\n\t\t\t\t$list->push($this->_getRandomWordFromPool());\n\t\t\t\t\n\t\t\t\t$len--;\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$this->_password = $list->join($this->_config->get(\"separator\"), true);\n\n\t\t\treturn $this->_password;\n\t\t}", "title": "" }, { "docid": "5ec8d7d30821da8009c98a83c9190fdd", "score": "0.7678112", "text": "function _makeRandomPassword() {\n\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789!@#$%&*\";\n\t\tsrand((double)microtime()*1000000);\n\t\t$i = 0;\n\t\t$pass = '' ;\n\n\t\twhile ($i <= 14) {\n\t\t\t$num = rand() % 40;\n\t\t\t$tmp = substr($chars, $num, 1);\n\t\t\t$pass = $pass . $tmp;\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $pass;\n\t}", "title": "" }, { "docid": "f63ae515c032e3d05f51761276e486e3", "score": "0.767607", "text": "protected function generatePassword()\n {\n return base64_encode(random_bytes(self::NUMBER_OF_RANDOM_BYTES));\n }", "title": "" }, { "docid": "714ef5053804f8c77f030363296e0d6a", "score": "0.7652482", "text": "function password_generate($chars) \n{\n $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';\n return substr(str_shuffle($data), 0, $chars);\n}", "title": "" }, { "docid": "082b06db65304dc47802a1fdb6fb33a2", "score": "0.7647566", "text": "function generarPassword()\r\n {\r\n $longitud = 8;\r\n $psswd = substr( md5(microtime()), 1, $longitud);\r\n $psswd = strtoupper($psswd);\r\n\r\n $this->psswd = $psswd;\r\n }", "title": "" }, { "docid": "0792daa738baeec5f48104a8607037ec", "score": "0.7642875", "text": "function randomPassword() {\n //number 0 is hard to distinguish from capital O and lowercase o\n $alphabet = \"abcdefghijkmnpqrstuwxyzABCDEFGHJKLMNPQRSTUWXYZ23456789\";\n $pass = \"\";\n $alphaLength = strlen($alphabet) - 1;\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass .= $alphabet[$n];\n }\n return $pass;\n}", "title": "" }, { "docid": "7bda83afda850c58cf5c89418782e0f0", "score": "0.7619846", "text": "function createRandomPassword() {\r\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\r\n srand((double)microtime()*1000000);\r\n $i = 0;\r\n $pass = '' ;\r\n\r\n while ($i <= 7) {\r\n $num = rand() % 33;\r\n $tmp = substr($chars, $num, 1);\r\n $pass = $pass . $tmp;\r\n $i++;\r\n }\r\n\r\n return $pass;\r\n\r\n }", "title": "" }, { "docid": "84ebaf342f2366afc6db572dfb2b1fdd", "score": "0.76184237", "text": "function password_generate($chars)\n {\n $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';\n return substr(str_shuffle($data), 0, $chars); \n\n }", "title": "" }, { "docid": "a091a80ae36389bb543dc0f47893b589", "score": "0.761263", "text": "function create_password()\n{\n $stroka = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789[]{}?%#@$!&\";\n $password = \"\";\n for ($i = 0; $i < 9; $i++) {\n $password .= $stroka[rand(0, strlen($stroka) - 1)];\n }\n return $password;\n}", "title": "" }, { "docid": "1fa0e60ad763de25a6c98dbfae346ab2", "score": "0.76045364", "text": "public function generate()\n\t{\n\t\tshuffle($this->_chars);\n\n\t\t$password = '';\n\n\t\tfor ($i = 0; $i < $this->_length; $i++) {\n\t\t\t$index = rand(0, (count($this->_chars) - 1));\n\t\t\t$password .= $this->_chars[$index];\n\t\t}\n\n\t\treturn $password;\n\n\t}", "title": "" }, { "docid": "85922186532d32391827b6623028493c", "score": "0.7602569", "text": "function createRandomPassword() {\n //! Possible characters in the password\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\n srand((double)microtime()*1000000);\n $i = 0;\n $pass = '' ;\n\n //! Random Selection of 8 characters\n while ($i <= 13) {\n $num = rand() % 33;\n $tmp = substr($chars, $num, 1);\n $pass = $pass . $tmp;\n $i++;\n }\n\n return $pass;\n }", "title": "" }, { "docid": "0b1b70895edd03290348ad598afb599c", "score": "0.7596959", "text": "function createNewPassword() {\n\t$chars = \"abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRTUVWXYZ023456789\";\n srand((double)microtime()*1000000);\n\t$i = 0;\n\t$pass = '' ;\n\t$validpwd = false;\n\twhile (!$validpwd) {\n\t\twhile ($i <= 7) {\n\t\t\t$num = rand() % strlen($chars);\n\t\t\t$tmp = substr($chars, $num, 1);\n\t\t\t$pass = $pass . $tmp;\n\t\t\t$i++;\n\t\t}\n\t\tif (preg_match('/\\d/', $pass) && preg_match('/[A-Z]/', $pass) && preg_match('/[a-z]/', $pass)) {\n\t\t\t$validpwd = true;\n\t\t} else {\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t}\n\t}\n\treturn $pass;\n}", "title": "" }, { "docid": "cc7bac413a6566d709b016403780d1cc", "score": "0.7595876", "text": "public function generatePassword()\n {\n $haystack = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz';\n $code = '';\n while (strlen($code) < 9)\n $code .= substr($haystack, rand(0, strlen($haystack) - 1), 1);\n\n return $code;\n }", "title": "" }, { "docid": "bd27c80eb60d7c9a1018f6df90faa902", "score": "0.7556017", "text": "private function randPW() {\n\n\tstatic $permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t$pass = substr(str_shuffle($permitted_chars),0,5);\n\t return $pass;\n }", "title": "" }, { "docid": "cb7ccf616b585086298580bc4ecb327c", "score": "0.75480855", "text": "function generate_password($length = 8) {\n\t#$chars = \"+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\t# NOTE: avoid chars like #, ?, and / etc if you want to be able to embed credentials in a URL\n\t$chars = \"23456789-bcd+fgh.jkmnpqrst:vwxyz\";\t# 32 characters => 5 bits entropy. Need 20 chars for 80 bit entropy\n\t#$length = 20;\n\t$length = 12;\t# settle for 60 bit\n\n\t$count = mb_strlen($chars);\n\tfor ($i = 0, $result = ''; $i < $length; $i++) {\n\t\t$index = rand(0, $count - 1);\n\t\t$result .= mb_substr($chars, $index, 1);\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "cfe2fa2008897ed2e9793ba3f9882233", "score": "0.7545137", "text": "function drush_generate_password($length = 10) {\n // This variable contains the list of allowable characters for the\n // password. Note that the number 0 and the letter 'O' have been\n // removed to avoid confusion between the two. The same is true\n // of 'I', 1, and 'l'.\n $allowable_characters = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789';\n\n // Zero-based count of characters in the allowable list:\n $len = strlen($allowable_characters) - 1;\n\n // Declare the password as a blank string.\n $pass = '';\n\n // Loop the number of times specified by $length.\n for ($i = 0; $i < $length; $i++) {\n\n // Each iteration, pick a random character from the\n // allowable string and append it to the password:\n $pass .= $allowable_characters[mt_rand(0, $len)];\n }\n\n return $pass;\n}", "title": "" }, { "docid": "d9b3a6b5b3571586310e87da2aa55b4d", "score": "0.754207", "text": "function randomPasswordGen() {\n\t $salt = \"abchefghjkmnpqrstuvwxyz0123456789\"; \n\t for($i=0;$i<8; $i++) { \n\t\t$num = mt_rand() % 33; \n\t\t$password .= substr($salt, $num, 1);\n\t\t}\n\t return $password; \n}", "title": "" }, { "docid": "25e262187972f05d6bc078a9d5709800", "score": "0.7537339", "text": "public static function generatePassword()\n {\n // Generate random string and encrypt it. \n return bcrypt(str_random(35));\n }", "title": "" }, { "docid": "b7d8631c05b0cdb6cc760c9327d827d1", "score": "0.75221306", "text": "function makeRandomPassword() {\r\n\t\t\t$salt = \"abchefghjkmnpqrstuvwxyz0123456789\";\r\n\t\t\tsrand((double)microtime()*1000000);\r\n\t\t\t$i = 0;\r\n\t\t\twhile ($i <= 7) {\r\n\t\t\t$num = rand() % 33;\r\n\t\t\t$tmp = substr($salt, $num, 1);\r\n\t\t\t$pass = $pass . $tmp;\r\n\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\treturn $pass;\r\n\t\t}", "title": "" }, { "docid": "acfa9b0bb64277dbe5ee908eb6989013", "score": "0.7506148", "text": "function generaPass(){\n\t\t $cadena = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t //Obtenemos la longitud de la cadena de caracteres\n\t\t $longitudCadena=strlen($cadena);\n\t\t \n\t\t //Se define la variable que va a contener la contraseña\n\t\t $pass = \"\";\n\t\t //Se define la longitud de la contraseña, en mi caso 10, pero puedes poner la longitud que quieras\n\t\t $longitudPass=10;\n\t\t \n\t\t //Creamos la contraseña\n\t\t for($i=1 ; $i<=$longitudPass ; $i++){\n\t\t //Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\n\t\t $pos=rand(0,$longitudCadena-1);\n\t\t \n\t\t //Vamos formando la contraseña en cada iteraccion del bucle, añadiendo a la cadena $pass la letra correspondiente a la posicion $pos en la cadena de caracteres definida.\n\t\t $pass .= substr($cadena,$pos,1);\n\t\t }\n\t\t return $pass;\n\t\t}", "title": "" }, { "docid": "c6b64e07c7dc2e262eff4d414b707dfe", "score": "0.74741936", "text": "public function createPassword()\n\t{\n\t\t\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n \t\t$randomString = '';\n \t\tfor ($i = 0; $i < 6; $i++) {\n \t\t$randomString .= $characters[rand(0, strlen($characters) - 1)];\n \t\t}\n \t\treturn $randomString;\n\t}", "title": "" }, { "docid": "ef332aba9e565aa8c6988ecfde316b34", "score": "0.74660814", "text": "public\n\t\tfunction generatePassword($length = 8){\n\t\t\t$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\t\t$count = mb_strlen($chars);\n\t\t\tfor ($i = 0, $result = ''; $i < $length; $i++) {\n\t\t\t\t$index = rand(0, $count - 1);\n\t\t\t\t$result .= mb_substr($chars, $index, 1);\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "596a93ea21504fae2ab4a16f1e4b1c9b", "score": "0.7466063", "text": "public static function generatePassword()\n {\n return bcrypt(str_random(35));\n }", "title": "" }, { "docid": "8aefe12fa7c424d8b2fc3e6bed270b7a", "score": "0.74652046", "text": "function generate_password($vars=''){\n global $config;\n $vars = (array)$vars;\n $min_length=$config['pass_min_length'] < 4 ? 4 : $config['pass_min_length'];\n $max_length=$config['pass_max_length'] > 10 ? 10 : $config['pass_max_length'];\n $all_g = \"aeiyo\";\n $all_gn = $all_g . \"1234567890\";\n $all_s = \"bcdfghjkmnpqrstwxz\";\n /// let's go\n $pass = \"\";\n srand((double)microtime()*1000000);\n $length = rand($min_length, $max_length);\n for($i=0;$i<$length;$i++) {\n srand((double)microtime()*1000000);\n if ($i % 2)\n if ($i < $min_length)\n $pass .= $all_g[ rand(0, strlen($all_g) - 1) ];\n else\n $pass .= $all_gn[ rand(0, strlen($all_gn) - 1) ];\n else\n $pass .= $all_s[ rand(0, strlen($all_s) - 1) ];\n }\n return $pass;\n}", "title": "" }, { "docid": "ca228576f4233bb0e2f51aad4e0aef92", "score": "0.74621975", "text": "function CreatePassword($tp_length) {\n $pstring = \"abcdefghijklmnop1234567890\";\n $plength = strlen($pstring);\n\tfor ($i = 1; $i <= $tp_length; $i++) {\n\t\t$start = rand(0,$plength);\n\t\t$temp_password.= substr($pstring, $start, 1);\n\t}\n\treturn $temp_password;\n}", "title": "" }, { "docid": "0065eadf2513e0f84acfdd37f73d275f", "score": "0.74442285", "text": "function mk_pw($length = 12) {\n\n\t\t\t$characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-+=_,!@$#*%[]{}\";\n\n\t\t\t$pw = '';\n\n\t\t\tfor ($i = 0; $i < $length; $i++) {\n\n\t\t\t$pw .= $characters[mt_rand(0, strlen($characters) - 1)];\n\n\t\t\t}\n\n\t\t\treturn $pw;\n\n\t\t\t}", "title": "" }, { "docid": "0002372d4af17ef581dcf51e20a4bcef", "score": "0.74036664", "text": "private function generatePassword(): string {\n\t\t$symbols = str_replace(['\"', '\\\\'], '', ISecureRandom::CHAR_SYMBOLS);\n\n\t\t// make sure we have at least one of all categories\n\t\t$upper = $this->random->generate(1, ISecureRandom::CHAR_UPPER);\n\t\t$lower = $this->random->generate(1, ISecureRandom::CHAR_LOWER);\n\t\t$digit = $this->random->generate(1, ISecureRandom::CHAR_DIGITS);\n\t\t$symbol = $this->random->generate(1, $symbols);\n\n\t\t$randomString = $this->random->generate(68, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS . $symbols);\n\n\t\t$password = $upper . $lower . $digit . $symbol . $randomString;\n\t\t$password = str_shuffle($password);\n\t\treturn $password;\n\t}", "title": "" }, { "docid": "180c8b9b8bd1099410cf1bbeeddfa973", "score": "0.7402085", "text": "public function generatePassword(): string\n {\n $characters = $this->getAvailableCharacters();\n $passwordLength = $this->policy->getMinimumLength();\n\n $password = '';\n for ($i = 0; $i < $passwordLength; $i++) {\n $password .= $this->getRandomCharacter($characters);\n }\n if ($this->validator->isValidPassword($password)) {\n return $password;\n }\n\n return $this->generatePassword();\n }", "title": "" }, { "docid": "be3a9bfa261da478cace2b26df9c5c03", "score": "0.7394967", "text": "function generatePassword($length = 10) {\n // Seed\n srand((double) microtime()*1000000);\n \n $vowels = array('a', 'e', 'i', 'o', 'u');\n $cons = array('b', 'c', 'd', 'g', 'h', 'j', 'k', 'l', 'm', 'n',\n 'p', 'r', 's', 't', 'u', 'v', 'w', 'tr',\n 'cr', 'br', 'fr', 'th', 'dr', 'ch', 'ph',\n 'wr', 'st', 'sp', 'sw', 'pr', 'sl', 'cl');\n \n $num_vowels = count($vowels);\n $num_cons = count($cons);\n \n $password = '';\n for ($i = 0; $i < $length; $i++){\n $password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)];\n }\n \n return substr($password, 0, $length);\n }", "title": "" }, { "docid": "438553270bb945cb17858c88ce6673f9", "score": "0.73935527", "text": "function generate_password ($length = 8)\n{\n\t$var = 'abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789';\n\t$len = strlen($var);\n\t$return = '';\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$return .= $var[rand(0, $len - 1)];\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "7807d75f0db431b4d20751f211ba2912", "score": "0.73864794", "text": "protected function generatePassword(): string\n {\n $this->displayPassword = true;\n\n return Str::random(22);\n }", "title": "" }, { "docid": "f1416d929793965a376d1fa4e9a347fb", "score": "0.7385497", "text": "function generate_pass() {\n\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n srand((double)microtime()*1000000);\n\n $i = 0;\n $pass = '' ;\n\n while ($i <= 7) {\n $num = rand() % (strlen($chars) - 1);\n $tmp = substr($chars, $num, 1);\n $pass = $pass . $tmp;\n\n $i++;\n }\n\n return $pass;\n}", "title": "" }, { "docid": "2df04dc4df2cdcebceeebf156c48185b", "score": "0.73825395", "text": "function genPassword($length) \n{\n $password = \"\";\n // define possible characters\n $possible = \"0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $i = 0;\n // add random characters to $password until $length is reached\n while ($i < $length) {\n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n // we don't want this character if it's already in the password\n if (!strstr($password, $char)) {\n $password .= $char;\n $i++;\n }\n }\n return $password;\n}", "title": "" }, { "docid": "2df04dc4df2cdcebceeebf156c48185b", "score": "0.73825395", "text": "function genPassword($length) \n{\n $password = \"\";\n // define possible characters\n $possible = \"0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $i = 0;\n // add random characters to $password until $length is reached\n while ($i < $length) {\n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n // we don't want this character if it's already in the password\n if (!strstr($password, $char)) {\n $password .= $char;\n $i++;\n }\n }\n return $password;\n}", "title": "" }, { "docid": "9fc2be44f365a14d790502cdfff5fca4", "score": "0.7381096", "text": "static public function generateNewPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = array();\n\n //Generate random password\n $alphaLength = strlen($alphabet) - 1;\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n\n return implode($pass);\n }", "title": "" }, { "docid": "dc779a73829c0a0160f988aaa3f9d654", "score": "0.73801035", "text": "public function getPassword()\n {\n return str_random(10);\n }", "title": "" }, { "docid": "dc037107cfcf7c9494961d3511ea9acd", "score": "0.73710406", "text": "function randomPassword() {\r\n\t\t\t // http://stackoverflow.com/q/6101956/1414176\r\n\t\t\t $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\r\n\t\t\t $pass = array(); //remember to declare $pass as an array\r\n\t\t\t $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\r\n\t\t\t for ($i = 0; $i < 8; $i++) {\r\n\t\t\t $n = rand(0, $alphaLength);\r\n\t\t\t $pass[] = $alphabet[$n];\r\n\t\t\t }\r\n\t\t\t return implode($pass); //turn the array into a string\r\n\t\t\t }", "title": "" }, { "docid": "3c0e135103761f5a88030aa6ccccd32b", "score": "0.7367572", "text": "function generatePassword($chars_min=6, $chars_max=8, $use_upper_case=false, $include_numbers=false, $include_special_chars=false){\r\n $length = rand($chars_min, $chars_max);\r\n $selection = 'aeuoyibcdfghjklmnpqrstvwxz';\r\n if($include_numbers) {\r\n $selection .= \"1234567890\";\r\n }//end of if\r\n if($include_special_chars) {\r\n $selection .= \"!@\\\"#$%&[]{}?|\";\r\n }//end of if\r\n\r\n $password = \"\";\r\n for($i=0; $i<$length; $i++) {\r\n $current_letter = $use_upper_case ? (rand(0,1) ? strtoupper($selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))]; \r\n $password .= $current_letter;\r\n }//end of for \r\n\r\n return $password;\r\n }", "title": "" }, { "docid": "95c6ddabd21763a1d6db099798168b1c", "score": "0.7365085", "text": "function generatePassword ($length = 8){\r\n\r\n // start with a blank password\r\n $password = \"\";\r\n\r\n // define possible characters (drop some vowels to avoid real words) and any other confusing characters\r\n $possible = \"abcdefghjkmnpqrstvwxyz\"; \r\n \r\n $i = 0; \r\n // add random characters to $password until $length is reached\r\n while ($i < $length) { \r\n\r\n // pick a random character from the possible ones\r\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n \r\n // doesn't matter if it is duplicated\r\n //if (!strstr($password, $char)) { \r\n $password .= $char;\r\n $i++;\r\n //}\r\n }\r\n return $password;\r\n}", "title": "" }, { "docid": "83ce43f81b83ca747468b4d1f4141ae7", "score": "0.73598164", "text": "function create_random_password(){\n\t$pass1 = array(\"little\",\"big\",\"loud\",\"quiet\",\"short\",\"tall\",\"tiny\",\"huge\",\"old\",\"young\",\"nice\",\"mean\",\"scary\",\"sneaky\",\"snooty\",\"pretty\",\"happy\",\"sneezy\",\"itchy\");\n\t$rnd1 = array_rand($pass1);\n\tsrand ((double) microtime( )*1000000);\n\t$pass2 = rand(1,9);\n\t$pass3 = array(\"cat\",\"dog\",\"chicken\",\"mouse\",\"deer\",\"snake\",\"fawn\",\"rat\",\"lion\",\"tiger\",\"chipmunk\",\"owl\",\"bear\",\"rooster\",\"whale\",\"fish\",\"puma\",\"panther\",\"horse\");\n\t$rnd3 = array_rand($pass3);\n\treturn $pass1[$rnd1] . $pass2 . $pass3[$rnd3];\n}", "title": "" }, { "docid": "32d13dc4aad33d4f105035b807d9f811", "score": "0.7351568", "text": "function randid($length){\n $string = \"ABCDEFGHIJKLMNOPQRSTU1234567890\";\n $len = strlen($string);\n \n// mengenerate password\n for($i=1;$i<=$length; $i++){\n $start = rand(0, $len);\n $pass .= substr($string, $start, 1);\n }\n \n return $pass;\n}", "title": "" }, { "docid": "5c522cca567d9ba192c4674284f12332", "score": "0.7350951", "text": "function randomPassword() {\r\r $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\r\r $pass = array(); //remember to declare $pass as an array\r\r $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\r\r for ($i = 0; $i < 6; $i++) {\r\r $n = rand(0, $alphaLength);\r\r $pass[] = $alphabet[$n];\r\r }\r\r return implode($pass); //turn the array into a string\r\r }", "title": "" }, { "docid": "908255c487926ed2931ca3bf0f482835", "score": "0.735075", "text": "function genPassword($length) {\n $password = \"\";\n // define possible characters\n $possible = \"0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $i = 0;\n // add random characters to $password until $length is reached\n while ($i < $length) {\n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n // we don't want this character if it's already in the password\n if (!strstr($password, $char)) {\n $password .= $char;\n $i++;\n }\n }\n return $password;\n }", "title": "" }, { "docid": "d1192aef809621a4a03678b3432e68cc", "score": "0.73439777", "text": "function generate_password($length = 15) : string\n {\n return str_random($length);\n }", "title": "" }, { "docid": "dbebc76a2a311ca264effe41c06387f5", "score": "0.7340051", "text": "function generatePassword($length){\n\t\t//create a character set - the set of characters allowed in the password - uppercase, lowercase, numbers, symbols\n\t\t$lowerCase = 'abcdefghijklmnopqrstuvwxyz';\n\t\t$upperCase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$numbers = '0123456789';\n\t\t$symbols = '£$%^&*~#@?';\n\t\t\n\t\t//if these are false, they will not be used in the srting\n\t\t$useLowerCase = true;\n\t\t$useUpperCase = true;\n\t\t$useNumbers = false;\n\t\t$useSymbols = true;\n\n\n\t\t$character = '';\n\t\tif($useLowerCase === true){//if $useLower is true it will concatenate $lowerCase onto $character\n\t\t\t$character .= $lowerCase; \n\t\t}\n\n\t\tif($useUpperCase === true){\n\t\t\t$character .= $upperCase; \n\t\t}\n\n\t\tif($useNumbers === true){\n\t\t\t$character .= $numbers; \n\t\t}\n\n\t\tif($useSymbols === true){\n\t\t\t$character .= $symbols; \n\t\t}\n\n\t\t//$character = $lowerCase . $upperCase . $numbers . $symbols;\n\n\t\t//echo $character;\n\n\t\treturn randomString($length, $character);\n\n\t}", "title": "" }, { "docid": "fff150332861829a8bf3fe3a8c0f380a", "score": "0.7338934", "text": "function makeRandomPassword() {\n $salt = \"abchefghjkmnpqrstuvwxyz0123456789\";\n srand((double)microtime()*1000000); \n \t$i = 0;\n \twhile ($i <= 7) {\n \t\t$num = rand() % 33;\n \t\t$tmp = substr($salt, $num, 1);\n \t\t$pass = $pass . $tmp;\n \t\t$i++;\n \t}\n \treturn $pass;\n}", "title": "" }, { "docid": "2af90e834c01299d48d8532defa34e23", "score": "0.7337699", "text": "function Generate_password($largo){\n $cadena_base = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n $cadena_base .= '0123456789' ;\n $cadena_base .= '!@#%^&*()_,./<>?;:[]{}\\|=+';\n \n $pass = '';\n $limite = strlen($cadena_base) - 1;\n \n for ($i=0; $i < $largo; $i++)\n $pass .= $cadena_base[rand(0, $limite)];\n \n return $pass;\n }", "title": "" }, { "docid": "2e4cb82d841fa9b4aa7201cf6bd311ad", "score": "0.733702", "text": "function generate_password($length = 8) {\r\n\t\r\n $password = uniqid();\r\n\r\n // define possible characters\r\n $possible = \"2346789bcdfghjkmnpqrtvwxyzBCDFGHJKLMNPQRTVWXYZ\";\r\n\r\n // we refer to the length of $possible a few times, so let's grab it now\r\n $maxlength = strlen($possible);\r\n \r\n // check for length overflow and truncate if necessary\r\n if ($length > $maxlength) {\r\n $length = $maxlength;\r\n }\r\n\t\r\n // repeat generation until it's sufficiently strong enough\r\n while (!check_pass_strength($password)) {\r\n\t \r\n // set up a counter for how many characters are in the password so far\r\n $i = 0; \r\n \r\n // add random characters to $password until $length is reached\r\n while ($i < $length) { \r\n\r\n // pick a random character from the possible ones\r\n $char = substr($possible, mt_rand(0, $maxlength-1), 1);\r\n \r\n // have we already used this character in $password?\r\n if (!strstr($password, $char)) { \r\n\t \r\n // no, so it's OK to add it onto the end of whatever we've already got...\r\n $password .= $char;\r\n $i++;\r\n }\r\n }\r\n }\r\n return $password;\r\n}", "title": "" }, { "docid": "19882cfa660f69b847e702cca1260eba", "score": "0.7327047", "text": "public static function randomPassword()\n {\n\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n\n $pass = array(); //remember to declare $pass as an array\n\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return md5(implode($pass)); //turn the array into a string\n }", "title": "" }, { "docid": "64a0e8214a1955212680c83f270022f0", "score": "0.73237497", "text": "function generatePassword($length = 10) {\n // Seed\n srand((double) microtime()*1000000);\n\n $vowels = array('a', 'e', 'i', 'o', 'u');\n $cons = array('b', 'c', 'd', 'g', 'h', 'j', 'k', 'l', 'm', 'n',\n 'p', 'r', 's', 't', 'u', 'v', 'w', 'tr',\n 'cr', 'br', 'fr', 'th', 'dr', 'ch', 'ph',\n 'wr', 'st', 'sp', 'sw', 'pr', 'sl', 'cl');\n\n $num_vowels = count($vowels);\n $num_cons = count($cons);\n\n $password = '';\n for ($i = 0; $i < $length; $i++){\n $password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)];\n }\n\n return substr($password, 0, $length);\n }", "title": "" }, { "docid": "461d55102b839678bcbe070115f50754", "score": "0.73229045", "text": "public static function GenerateNicePassword()\n {\n $makepass = '';\n $syllables = 'er,in,tia,wol,fe,pre,vet,jo,nes,al,len,son,cha,ir,ler,bo,ok,tio,nar,sim,ple,bla,ten,toe,cho,co,lat,spe,ak,er,po,co,lor,pen,cil,li,ght,wh,at,the,he,ck,is,mam,bo,no,fi,ve,any,way,pol,iti,cs,ra,dio,sou,rce,sea,rch,pa,per,com,bo,sp,eak,st,fi,rst,gr,oup,boy,ea,gle,tr,ail,bi,ble,brb,pri,dee,kay,en,be,se';\n $syllable_array = explode(',', $syllables);\n srand((float) microtime() * 1000000);\n for ($count = 1; $count <= 4; ++$count) {\n if (1 == rand() % 10) {\n $makepass .= sprintf('%0.0f', (rand() % 50) + 1);\n } else {\n $makepass .= sprintf('%s', $syllable_array[rand() % 62]);\n }\n }\n\n return $makepass;\n }", "title": "" }, { "docid": "e2c98549007962d807800265c94a9895", "score": "0.73227733", "text": "function make_password($length) {\n\t\t$vowels = 'aeiouyAEIUY0123456789';\n\t\t$consonants = 'bdghjlmnpqrstvwxzBDGHJLMNPQRSTVWXZ';\n\t\t$password = '';\n\t\t$alt = time() % 2;\n\t\tsrand(time());\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\tif ($alt == 1) {\n\t\t\t\t$password .= $consonants[(rand() % strlen($consonants))];\n\t\t\t $alt = 0;\n\t\t\t} else {\n\t\t\t\t$password .= $vowels[(rand() % strlen($vowels))];\n\t\t\t \t$alt = 1;\n\t\t\t}\n\t\t}\n\t\treturn $password;\n\t}", "title": "" }, { "docid": "4fe662a23b720f9b45eb5a46546d5b2a", "score": "0.73147225", "text": "public function randomPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); //turn the array into a string\n }", "title": "" }, { "docid": "63ada4a1d6ac549ab4931d862b1437a9", "score": "0.730592", "text": "public function generate_random_password(){\n $length = 6;\n $alphabets = range('A','Z');\n $numbers = range('0','9');\n $additional_characters = array('_','.');\n $final_array = array_merge($alphabets,$numbers,$additional_characters);\n\n $password = '';\n\n while($length--) {\n $key = array_rand($final_array);\n $password .= $final_array[$key];\n }\n\n return $password;\n }", "title": "" }, { "docid": "28b7d826a3a76a23633a8f5951beb187", "score": "0.7301259", "text": "function generate_password ($length = 8) {\n $password = \"\";\n\n // define possible characters\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\"; \n\n // set up a counter\n $i = 0; \n\n // add random characters to $password until $length is reached\n while ($i < $length) { \n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n \n // we don't want this character if it's already in the password\n if (!strstr($password, $char)) { \n $password .= $char;\n $i++;\n }\n }\n\n return $password;\n }", "title": "" }, { "docid": "7bb577073d62084830d66b836a5db900", "score": "0.7297929", "text": "public function testGenerateReturnsPasswordOfCorrectLength()\n {\n $generator = new PasswordGenerator();\n $password = $generator->generate(12);\n\n $this->assertEquals(12, strlen($password), 'generate() returns password of correct length');\n }", "title": "" }, { "docid": "1cb21e808b84097fbac32b66febe16f5", "score": "0.72957087", "text": "function via_create_user_password() {\n $password = via_get_random_letter().\n via_get_random_letter().\n via_get_random_letter().\n rand(2, 9).rand(2, 9).\n via_get_random_letter().\n via_get_random_letter();\n return $password;\n}", "title": "" }, { "docid": "71b3dcc674140c8ede077a909ede3418", "score": "0.72831786", "text": "function generate_password($syllables = 3, $use_prefix = false)\n{\n\tif (!function_exists('ae_arr')) {\n\t\t// This function returns random array element\n\t\tfunction ae_arr(&$arr)\n\t\t{\n\t\t\treturn $arr[rand(0, sizeof($arr) - 1)];\n\t\t}\n\t}\n\n\t// 20 prefixes\n\t$prefix = ['aero', 'anti', 'auto', 'bi', 'bio',\n\t 'cine', 'deca', 'demo', 'dyna', 'eco',\n\t 'ergo', 'geo', 'gyno', 'hypo', 'kilo',\n\t 'mega', 'tera', 'mini', 'nano', 'duo'];\n\n\t// random suffixes\n\t$suffix = ['maki', 'ja', 'inen', 'us', 'ri', 'i', 'ka', 'in'];\n\n\t// vowel sounds\n\t$vowels =\n\t\t\t['a', 'o', 'e', 'i', 'y', 'u', 'uu', 'oi', 'ie', 'yy', 'ui', 'ai', 'ei', 'eu', 'ou', 'aa', 'uo', 'ii'];\n\n\t// random consonants\n\t$consonants = ['r', 't', 'p', 's', 'g', 'h', 'j', 'k', 'l', 'n', 'm'];\n\n\t$password = $use_prefix ? ae_arr($prefix) : '';\n\n\t$password_suffix = ae_arr($suffix);\n\n\tfor ($i = 0; $i < $syllables; $i++) {\n\t\t// selecting random consonant\n\t\t$doubles = ['k', 't', 's', 'n', 'l', 'm', 'p'];\n\t\t$c = ae_arr($consonants);\n\t\tif (in_array($c, $doubles) && ($i != 0)) { // maybe double it\n\t\t\tif (rand(0, 2) == 1) // 33% probability\n\t\t\t\t$c .= $c;\n\t\t}\n\t\t$password .= $c;\n\t\t//\n\n\t\t// selecting random vowel\n\t\t$password .= ae_arr($vowels);\n\n\t\tif ($i == $syllables - 1) // if suffix begin with vovel\n\t\t\tif (in_array($password_suffix[0], $vowels)) // add one more consonant\n\t\t\t\t$password .= ae_arr($consonants);\n\n\t}\n\n\t// selecting random suffix\n\t$password .= $password_suffix;\n\n\treturn $password;\n}", "title": "" }, { "docid": "9495b1d8c0c160547628eecf7098579b", "score": "0.7279685", "text": "function generatePassword($strength = null ) {\n \n \n /*************************************************************\n * Password Strenth Levels\n *************************************************************/\n \n $base = 2;\n $strong = 3;\n $stronger = 4;\n $maximum = 5;\n \n /*******************************************************\n * Set default strength level\n *******************************************************/\n \n if($strength == null){ $strength = $strong; }\n if(!is_numeric($strength)){ $strength = $strong; }\n if($strength > 5){ $strength = $maximum; }\n \n /******************************************\n * Initialize variables\n ******************************************/\n \n $length = 4;\n $slength = 0;\n $choice = 0;\n $sMin = 0;\n $uMin = 0;\n $uCnt = 0;\n $sCnt = 0;\n $symbol = false;\n $upper = false;\n $numbers = '0123456789';\n $lower_case = 'asdfghjklzxcvbnmqwertyuiop';\n $upper_case = 'ASDFGHJKLZXCVBNMQWERTYUIOP';\n $symbol_chr = '/[|!@#$%&*\\/(=?;).:\\-_+~^\\\\]';\n $password = '';\n \n /************************************************************\n * Set variables for building password based on strength\n ************************************************************/\n\n if($strength >= $base){ $upper = true; $uMin = 2; $length = 5;}\n if($strength >= $strong){ $symbol = true; $sMin = 1; $length = 7;}\n if($strength >= $stronger){ $sMin = 2; $length = 12; }\n if($strength >= $maximum){ $sMin = 3; $uMin = 3; $length = 23;}\n \n /***********************************************************\n * Build Password Based on strenth level requirements\n ***********************************************************/\n while($slength < $length){\n $choice = rand(1,4);\n \n if($choice == 1){ // Check to add upper case characters\n if($upper == true){\n preg_match_all('/[A-Z]/', $password, $uppercase_characters);\n if (!empty($uppercase_characters)){\n $uCnt= count($uppercase_characters[0]);\n if($uCnt < $uMin){\n $password .= $upper_case[(rand() % strlen($upper_case))]; \n }\n }\n \n }\n }\n if($choice == 2){ // add lower case characters\n if(($length - $slength) > (($uMin - $uCnt) + ($sMin - $sCnt))){ \n $password .= $lower_case[(rand() % strlen($lower_case))];\n }\n }\n if($choice == 3){ // add numbers\n if(($slength > 0) && (($length - $slength) > (($uMin - $uCnt) + ($sMin - $sCnt)))){ \n $password .= $numbers[(rand() % strlen($numbers))];\n }\n }\n if($choice == 4){ // check to add special characters\n if($symbol == true){\n preg_match_all('/[|!@#$%&*\\/(=?;).:\\-_+~^\\\\\\]/', $password, $symbols);\n if (!empty($symbols)){\n $sCnt = count($symbols[0]);\n if (($sCnt < $sMin) && $slength > 0){\n $password .= $symbol_chr[(rand() % strlen($symbol_chr))];\n }\n } \n }\n }\n $slength = strlen($password);\n\n }\n \n \n return $password;\n}", "title": "" }, { "docid": "75e4e125f49877b295877735f72c8d71", "score": "0.7278452", "text": "function generatePassword($l = 8, $c = 0, $n = 0, $s = 0) {\n $count = $c + $n + $s;\n $out = \"\";\n // sanitize inputs; should be self-explanatory\n if (!is_int($l) || !is_int($c) || !is_int($n) || !is_int($s)) {\n trigger_error('Argument(s) not an integer', E_USER_WARNING);\n return false;\n } elseif ($l < 0 || $l > 20 || $c < 0 || $n < 0 || $s < 0) {\n trigger_error('Argument(s) out of range', E_USER_WARNING);\n return false;\n } elseif ($c > $l) {\n trigger_error('Number of password capitals required exceeds password length', E_USER_WARNING);\n return false;\n } elseif ($n > $l) {\n trigger_error('Number of password numerals exceeds password length', E_USER_WARNING);\n return false;\n } elseif ($s > $l) {\n trigger_error('Number of password capitals exceeds password length', E_USER_WARNING);\n return false;\n } elseif ($count > $l) {\n trigger_error('Number of password special characters exceeds specified password length', E_USER_WARNING);\n return false;\n }\n\n // all inputs clean, proceed to build password\n // change these strings if you want to include or exclude possible password characters\n $chars = \"abcdefghijklmnopqrstuvwxyz\";\n $caps = strtoupper($chars);\n $nums = \"0123456789\";\n $syms = \"!@#$%^&*()-+?\";\n\n // build the base password of all lower-case letters\n for ($i = 0; $i < $l; $i++) {\n $out .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);\n }\n\n // create arrays if special character(s) required\n if ($count) {\n // split base password to array; create special chars array\n $tmp1 = str_split($out);\n $tmp2 = array();\n\n // add required special character(s) to second array\n for ($i = 0; $i < $c; $i++) {\n array_push($tmp2, substr($caps, mt_rand(0, strlen($caps) - 1), 1));\n }\n for ($i = 0; $i < $n; $i++) {\n array_push($tmp2, substr($nums, mt_rand(0, strlen($nums) - 1), 1));\n }\n for ($i = 0; $i < $s; $i++) {\n array_push($tmp2, substr($syms, mt_rand(0, strlen($syms) - 1), 1));\n }\n\n // hack off a chunk of the base password array that's as big as the special chars array\n $tmp1 = array_slice($tmp1, 0, $l - $count);\n // merge special character(s) array with base password array\n $tmp1 = array_merge($tmp1, $tmp2);\n // mix the characters up\n shuffle($tmp1);\n // convert to string for output\n $out = implode('', $tmp1);\n }\n\n return $out;\n}", "title": "" }, { "docid": "22f95c0190aa3c257c5caefc4f7b2fa1", "score": "0.726825", "text": "function generate_password() {\n $this->password = generate_password();\n return $this->password;\n }", "title": "" }, { "docid": "6cd5b69f0646c13341c535c4cdd5bbc0", "score": "0.7257254", "text": "function generateRandomPassword(){\n $password = \"\";\n\n //Charset, that is used to generate a password.\n $charset = array(\n\n \"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\n \"P\",\"Q\",\"R\",\"S\",\"T\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\n \"p\",\"q\",\"r\",\"s\",\"t\",\"v\",\"w\",\"x\",\"y\",\"z\"\n\n );\n\n /*$arrayLength contains the length of array(amount of elements),\n and $arrayLengthModified contains the length of array, but in the result\n decrements returned value on 1 point. */\n $arrayLength = count($charset);\n $arrayLengthModified = $arrayLength - 1;\n\n //Generates 20 random chars and put them together.\n for($i = 0; $i<20; $i++){\n $randomArrayIndex = rand(0, $arrayLengthModified);\n $password = $charset[$randomArrayIndex].$password;\n }\n\n //Returns a password.\n return $password;\n }", "title": "" }, { "docid": "8c068f28937ad41fa97c44794e61d3ac", "score": "0.7253774", "text": "function randomPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); //turn the array into a string\n}", "title": "" }, { "docid": "663a6e560c31e08c3b692a6827635e76", "score": "0.72513103", "text": "function genTempPassword($length) \n{\n $password = \"\";\n // define possible characters\n $possible = \"123456789\";\n $i = 0;\n // add random characters to $password until $length is reached\n while ($i < $length) {\n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n // we don't want this character if it's already in the password\n if (!strstr($password, $char)) {\n $password .= $char;\n $i++;\n }\n }\n return $password;\n}", "title": "" }, { "docid": "9df15e90f9fc87d2f090246dad9d73c6", "score": "0.72303694", "text": "public static function randomPassword()\n {\n $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\n $pass = array(); // remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; // put the length -1 in cache\n for ($i = 0; $i < 8; $i ++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); // turn the array into a string\n }", "title": "" }, { "docid": "3118017821219ff4cbbcac88b02ca2f7", "score": "0.7192699", "text": "function generate_password($length = 12, $special_chars = true) {\r\n $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\r\n if ($special_chars)\r\n $chars .= '!@#$%^&*()';\r\n\r\n $password = '';\r\n for ($i = 0; $i < $length; $i++)\r\n $password .= substr($chars, rand(0, strlen($chars) - 1), 1);\r\n return $password;\r\n}", "title": "" }, { "docid": "023fdd37dfec141d9b648d8d4935a990", "score": "0.7185416", "text": "function generatePassword($length = 8) {\n\t$password = \"\";\n\t\n\t// define possible characters\n\t$possible = \"0123456789abcdfghjkmnpqrstvwxyz\";\n\t\n\t// set up a counter\n\t$i = 0;\n\t\n\t// add random characters to $password until $length is reached\n\twhile ( $i < $length ) {\n\t\t\n\t\t// pick a random character from the possible ones\n\t\t$char = substr ( $possible, mt_rand ( 0, strlen ( $possible ) - 1 ), 1 );\n\t\t\n\t\t// we don't want this character if it's already in the password\n\t\tif (! strstr ( $password, $char )) {\n\t\t\t$password .= $char;\n\t\t\t$i ++;\n\t\t}\n\t}\n\t\n\t// done!\n\treturn $password;\n}", "title": "" }, { "docid": "39a1969920a9375450672e80bbe06102", "score": "0.71789336", "text": "function createPassword($charnum = 8, $case = \"M\"){\n \t$strChars = \"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9\";\n \t$arrChars = explode(\",\", $strChars);\n \tshuffle($arrChars);\n \t$strPassword = \"\";\n \t\t\n \tfor($i=0; $i < $charnum; $i++){\n \t\t$strPassword .= $arrChars[ array_rand($arrChars) ];\n \t}\n \t\n \tif($case == \"L\"){ // lowercased\n \t\t$strPassword = strtolower($strPassword);\n \t}elseif($case == \"U\"){ //uppercased\n \t\t$strPassword = strtoupper($strPassword);\n \t}\n \t \n \treturn $strPassword;\n }", "title": "" }, { "docid": "68ea0b6bc0548ebdf36660ae040041c1", "score": "0.7175529", "text": "function generate_password($length = 10, $complex = 3) \n\t{\n\t\t$min \t=\t\"abcdefghijklmnopqrstuvwxyz\";\n\t\t$num \t=\t\"0123456789\";\n\t\t$maj \t=\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t\t$symb \t=\t\"!@#$%^&*()_-=+;:,.?\";\n\t\t$chars \t=\t$min;\n\t\t\n\t\tif ($complex >= 2) { $chars .= $num; }\n\t\tif ($complex >= 3) { $chars .= $maj; }\n\t\tif ($complex >= 4) { $chars .= $symb; }\n\t\t\n\t\t$password = substr( str_shuffle( $chars ), 0, $length );\n\t\t\n\t\treturn $password;\n\t}", "title": "" }, { "docid": "e3a4fc2c045bbd3626d4d59ddfd0a58a", "score": "0.7172661", "text": "function getRandomPass($len = 8) {\n \n // CREATE AN ARRAY OF LETTERS a -z & A - Z.\n $word = array_merge(range('a', 'z'), range('A', 'Z'));\n // SHUFFLE THE LETTERS WITHIN THE ARRAY.\n shuffle($word);\n // CREATE A STRING FROM THE ARRAY AND GRAB THE FIRST X CHARACTERS\n // TO CREATE THE PASSWORD.\n // RETURNS A STRING.\n return substr(implode($word), 0, $len);\n \n }", "title": "" }, { "docid": "44b54fed29201370325b052354e60b9d", "score": "0.71658397", "text": "protected function generateCode()\n {\n $cadena_base = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n $cadena_base .= '0123456789' ;\n $password = '';\n $largo=40;\n $limite = strlen($cadena_base) - 1;\n for ($i=0; $i < $largo; $i++)\n $password .= $cadena_base[rand(0, $limite)];\n return $password;\n }", "title": "" }, { "docid": "6455bf0a698be71103ccfbd650704434", "score": "0.7161914", "text": "function generatePassword($length = 8) {\n $password = \"\";\n // define possible characters - any character in this string can be\n // picked for use in the password, so if you want to put vowels back in\n // or add special characters such as exclamation marks, this is where\n // you should do it\n $possible = \"2346789bcdfghjkmnpqrtvwxyzBCDFGHJKLMNPQRTVWXYZ\";\n // we refer to the length of $possible a few times, so let's grab it now\n $maxlength = strlen($possible);\n // check for length overflow and truncate if necessary\n if ($length > $maxlength) {\n $length = $maxlength;\n }\n // set up a counter for how many characters are in the password so far\n $i = 0;\n // add random characters to $password until $length is reached\n while ($i < $length) {\n\n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, $maxlength - 1), 1);\n\n // have we already used this character in $password?\n if (!strstr($password, $char)) {\n // no, so it's OK to add it onto the end of whatever we've already got...\n $password .= $char;\n // ... and increase the counter by one\n $i++;\n }\n }\n return $password;\n}", "title": "" }, { "docid": "07a49df8e9faedf81ed194cff36a1787", "score": "0.71588314", "text": "function generate_code($length=16)\n{\n\t$vowels = '0123';\n\t$consonants = '456789ABCDEF';\n \n\t$password = '';\n\t$alt = time() % 2;\n\tfor ($i = 0; $i < $length; $i++) {\n\t\tif ($alt == 1) {\n\t\t\t$password .= $consonants[(rand() % strlen($consonants))];\n\t\t\t$alt = 0;\n\t\t} else {\n\t\t\t$password .= $vowels[(rand() % strlen($vowels))];\n\t\t\t$alt = 1;\n\t\t}\n\t}\n\treturn $password;\n}", "title": "" }, { "docid": "2ac5d5bc461cd7a3f4f180e78f220cdf", "score": "0.71527386", "text": "function randPass() {\n\t $s = '';\n\t \n\t for ($i = 0, $z = strlen($a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')-1; $i != 12; $x = rand(0, $z), $s .= $a{$x}, $i++);\n\t \n\t return $s;\n}", "title": "" }, { "docid": "1aae9f499f5eae213415a1ddf283d7af", "score": "0.71451956", "text": "function rendPwd($pwd_length = 6)\n{\n\t\t$pwd_length = $pwd_length;\n\t\t$possible_letters = implode(range(0, 9)).implode(range('a', 'z')).implode(range('A', 'Z')).'@_^';\n\t\t$alphaLength = strlen($possible_letters) - 1; //put the length -1 in cache\n\t\t$code = '';\n\t\t$i = 0;\n\t\twhile($i < $pwd_length)\n\t\t{\n\t\t\t$code .= substr($possible_letters, mt_rand(0, $alphaLength), 1);\n\t\t\t$i++;\n\t\t}\n\treturn $code;\n}", "title": "" }, { "docid": "1e9e4354efdd6a5b99c6e4c7404c775b", "score": "0.713122", "text": "function randomPassword() {\n $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 16; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); //turn the array into a string\n}", "title": "" }, { "docid": "ce323bb7519ec942a67e118f2b2a3d7b", "score": "0.7113285", "text": "function generate_password($length = 12, $special_chars = true) {\n\t\t$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\tif ($special_chars)\n\t\t\t$chars .= '!@#$%^&*()';\n\n\t\t$password = '';\n\t\tfor ($i = 0; $i < $length; $i++)\n\t\t\t$password .= substr($chars, rand(0, strlen($chars) - 1), 1);\n\t\treturn $password;\n\t}", "title": "" }, { "docid": "dded8238a9713f4b7477a1cf41046988", "score": "0.7106837", "text": "function generate_random_password() {\n\t$charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()';\n\t$generated_password = substr(str_shuffle($charset), 0, 8);\n\treturn $generated_password;\n}", "title": "" }, { "docid": "585c3b3fc1295975f2a77d491e48f090", "score": "0.7106439", "text": "public function password() {\n\t\treturn wp_generate_password( 30 );\n\t}", "title": "" }, { "docid": "17bf1ddbd5e0596637596f73fa54714a", "score": "0.7102292", "text": "public function generatePassword()\n {\n $plain = str_random(8);\n\n $encrypted = $this->makeHash($plain);\n\n return [ 'plain' => $plain, 'encrypted' => $encrypted ];\n }", "title": "" }, { "docid": "36aac89ddd9d9857546a662576f685a2", "score": "0.7098356", "text": "public function generatePassword ($length = 8){\n\t\t// inicializa variables\n\t\t$password = \"\";\n\t\t$i = 0;\n\t\t$possible = \"0123456789bcdfghjkmnpqrstvwxyzJEWEL\"; \n\t\t\n\t\t// agrega random\n\t\twhile ($i < $length){\n\t\t\t$char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t\t\n\t\t\tif (!strstr($password, $char)) { \n\t\t\t\t$password .= $char;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\treturn $password; \n\t}", "title": "" }, { "docid": "5f663896114433bacb21ea259be2adb9", "score": "0.7095894", "text": "function generatePassword($length=9, $strength=0)\n {\n $vowels = 'aeuy';\n $consonants = 'bdghjmnpqrstvz';\n if ($strength & 1) {\n $consonants .= 'BDGHJLMNPQRSTVWXZ';\n }\n if ($strength & 2) {\n $vowels .= \"AEUY\";\n }\n if ($strength & 4) {\n $consonants .= '123456789';\n }\n if ($strength & 8) {\n $consonants .= '@#$%';\n }\n\n $password = '';\n $alt = time() % 2;\n for ($i = 0; $i < $length; $i++) {\n if ($alt == 1) {\n $password .= $consonants[(rand() % strlen($consonants))];\n $alt = 0;\n } else {\n $password .= $vowels[(rand() % strlen($vowels))];\n $alt = 1;\n }\n }\n return $password;\n }", "title": "" }, { "docid": "2ea556d2ed2131c22e98a3e68a9aa700", "score": "0.70935", "text": "function ecams_alphanumeric_pass()\n\t{\n\t\t// Do not modify anything below here\n\t\t$underscores = 2; // Maximum number of underscores allowed in password\n\t\t$length = 6; // Length of password\n\t\t$p =\"\";\n\t\tfor ($i=0;$i<$length;$i++)\n\t\t{ \n\t\t\t$c = mt_rand(1,10);\n\t\t\tswitch ($c)\n\t\t\t{\n\t\t\t\tcase ($c<=2):\n\t\t\t\t\t// Add a number\n\t\t\t\t\t$p .= mt_rand(0,9); \n\t\t\t\tbreak;\n\t\t\t\tcase ($c<=4):\n\t\t\t\t\t// Add an uppercase letter\n\t\t\t\t\t$p .= chr(mt_rand(65,90)); \n\t\t\t\tbreak;\n\t\t\t\tcase ($c<=6):\n\t\t\t\t\t// Add a lowercase letter\n\t\t\t\t\t$p .= chr(mt_rand(97,122)); \n\t\t\t\tbreak;\n\t\t\t\tcase ($c<=10):\n\t\t\t\t\t $len = strlen($p);\n\t\t\t\t\tif ($underscores>0&&$len>0&&$len<($length-1)&&$p[$len-1]!=\"_\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$p .= \"_\";\n\t\t\t\t\t\t$underscores--; \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$i--;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\tbreak; \n\t\t\t}\n\t\t}\n\t\treturn $p;\n\t}", "title": "" }, { "docid": "1178789e0245fbccf1388c7af35a45d5", "score": "0.70744914", "text": "function getPassword();", "title": "" }, { "docid": "79a2f7fc61f12cb75c91a7831dbb373d", "score": "0.7068158", "text": "public function generate_password($length = 8){\n\t\t$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\t$count = mb_strlen($chars);\n\n\t\tfor ($i = 0, $result = ''; $i < $length; $i++) {\n\t\t\t$index = rand(0, $count - 1);\n\t\t\t$result .= mb_substr($chars, $index, 1);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "bc4778106ca73e1a5d7ec4ee81628b5f", "score": "0.7065114", "text": "public function makePassword($password): string;", "title": "" }, { "docid": "d809712b7e6c7713107390e703548ac1", "score": "0.7045135", "text": "function genRandomPassword($length = 8) {\n $salt = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n $len = strlen($salt);\n $makepass = '';\n mt_srand(10000000 * (double) microtime());\n\n for ($i = 0; $i < $length; $i++) {\n $makepass .= $salt[mt_rand(0, $len - 1)];\n }\n\n return $makepass;\n}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "3c8444cc8e89040ab8c1730c597127a8", "score": "0.0", "text": "public function show($id)\n {\n $funcionario = new Funcionario();\n $item = $funcionario->get($id);\n return view('funcionario.main.show', compact('item'));\n }", "title": "" } ]
[ { "docid": "165e2bbcf8f47c0adbed93548f33d6c1", "score": "0.8019291", "text": "public function show(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5e8acc247b28ba8722842dd97070847", "score": "0.74223363", "text": "abstract protected function makeDisplayFromResource();", "title": "" }, { "docid": "cf7a236473d0b19def52419220a82d95", "score": "0.7193305", "text": "public function show(Resource $resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.7159185", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "1981d87b70ebb966cb1a7214c5461ecf", "score": "0.7105166", "text": "function display($resource_name) {\n return include $resource_name;\n }", "title": "" }, { "docid": "815f5613a8189df2880c7c0be463594e", "score": "0.69159317", "text": "public function show(Resource $resource)\n {\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "1be3fb8370513aa7e96f7c3e96fdff88", "score": "0.6462615", "text": "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "title": "" }, { "docid": "bf9855687af595254565be84ecf08da3", "score": "0.6460327", "text": "public function show(Request $request, $resource, $id)\n {\n $command = $this->translator->getCommandFromResource($resource, 'show');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request, [\n 'modelClass' => $this->translator->getClassFromResource($resource),\n 'id' => $id\n ]);\n\n $this->fireEventForResource($resource, 'show', $data);\n\n return $this->success($data);\n }", "title": "" }, { "docid": "1cff5c8d606548f28e8af3af4e531294", "score": "0.6286817", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, NULL, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "237d3c90b7035170d5fd20572d1e0dbb", "score": "0.6247061", "text": "public function display( Response $response );", "title": "" }, { "docid": "1e1b2e6a47cd86a471b2f6e43a786d4f", "score": "0.6238523", "text": "public function testShowResourceReturnsTheCorrectResource()\n {\n $items = factory(Item::class, 10)->create();\n $item = $items->get(6);\n\n $this->call('GET', sprintf('/api/v1/item/%s', $item->id));\n\n $this->seeJson([\n 'id' => $item->id,\n 'name' => $item->name,\n ]);\n }", "title": "" }, { "docid": "1b943006f882cdea6214d3238f5094bb", "score": "0.61226845", "text": "public function display($id);", "title": "" }, { "docid": "988fc9380f55f5086ebf1ea38e63511d", "score": "0.61054146", "text": "public function operate()\n {\n echo $this->resource.\"\\n\";\n }", "title": "" }, { "docid": "9cd2c7f88d644fa456e7453c3bb610d2", "score": "0.6069253", "text": "function show()\n {\n $this->display();\n }", "title": "" }, { "docid": "31c91777927cb1b0555e264f1cece7a9", "score": "0.6053162", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array('id' => array('HtmlEntities', 'StripTags', 'StringTrim')); \n $validators = array('id' => array('NotEmpty', 'Int'));\n\n // test if input is valid retrieve requested record attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.60360175", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "9c46cbbf718572f41d5fb18cb85408df", "score": "0.60352117", "text": "public function viewName($resource)\n {\n return $this->name.'::'.$resource;\n }", "title": "" }, { "docid": "4157890d7ce997c99fc951f60a368f8a", "score": "0.6034318", "text": "public function showResource()\n {\n return new ParceiroResource(Parceiro::find(2));\n }", "title": "" }, { "docid": "5f890361bf8d16515c9463c62dee48f3", "score": "0.602238", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/User/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "4b6584e73c632121e7d29d1a53288f08", "score": "0.600146", "text": "public function show(Request $request ,$id){\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])) {\n $resource = $request->session()->get('resources')[$id];\n $data = [];\n $data['resource'] = $resource;\n $data['enterprise'] = 'Resources Ltd.';\n \n return view('resource.show', $data); \n \n }\n \n return redirect('resource');\n \n }", "title": "" }, { "docid": "f4584c6fbf6732a4cc30c153518eac85", "score": "0.5962682", "text": "function displayResource($file) {\n\tglobal $mosConfig_lang;\n\t$file_lang = migratorBasePath() . '/resources/' . $file . '.' . $mosConfig_lang . '.html';\n\t$file = migratorBasePath() . '/resources/' . $file . '.english.html';\n\tif (file_exists($file_lang)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file_lang);\n\t\techo '</div>';\n\t} else if (file_exists($file)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file);\n\t\techo '</div>';\n\t}\n\telse\n\t\tdie(_BBKP_CRITINCLERR . $file);\n\techo __VERSION_STRING;\n}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.59581137", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.5942475", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "d0d1f283ce410ec0d9c7e82af4062258", "score": "0.59333754", "text": "public function display(WebResource $res) {\n $view = $res->getView() ?: array();\n switch(count($view)) {\n case 0:\n case 1:\n $viewType = Config::get('view.defaultViewType', 'json');\n break;\n default:\n $viewType = $view[0];\n break;\n }\n $viewMappings = Config::get('view.mappings');\n if (!isset($viewMappings[$viewType])) {\n throw new Exception(\n \"Could not render view by type $viewType\",\n Exception::CODE_PRETTY_VIEW_NOTFOUND);\n }\n $viewName = $viewMappings[$viewType];\n $view = $this->classLoader->load($viewName, true);\n if (!$view) {\n throw new Exception(\"Could not render view by $viewName, view class not found.\",\n Exception::CODE_PRETTY_CLASS_NOTFOUND);\n }\n $view->render($res);\n }", "title": "" }, { "docid": "9c9f166dfbd4a1117126f1616068d929", "score": "0.590676", "text": "public function displayAction()\n {\n\n $domainName = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST');\n\n $shortenUrl = $this->urlRepository->findShortUrlByPage($this->currentPage);\n\n if (empty($shortenUrl)) {\n $shortenUrl = $this->generateShortUrl();\n }\n\n $this->view\n ->assign('display', $shortenUrl)\n ->assign('domain', $domainName);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e45bfcde7a17ab2a4f6f9e2caad01271", "score": "0.5883924", "text": "function display()\n\t{\n\t\t// Set a default view if none exists\n\t\tif ( ! JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar('view', 'category' );\n\t\t}\n\n\t\t$layout = JRequest::getCmd( 'layout' );\n\n\t\tif ($layout == 'form') {\n\t\t\tJError::raiseError( 404, JText::_(\"Resource Not Found\") );\n\t\t\treturn;\n\t\t}\n\n\t\t$view = JRequest::getVar('view');\n\n\t\tparent::display(true);\n\t}", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.5864878", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e278522937d7847767c9d2ff92455995", "score": "0.5863409", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n \n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Tripjacks_Model_News i')\n ->where('i.newsid = ?', $input->id);\n\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->news = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "8c62873548eaa44202c0ae405fd7d4b3", "score": "0.58593535", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n $this->prepareLines($resource, $attribute);\n }", "title": "" }, { "docid": "bf80668121276aa95e552b7e16de0410", "score": "0.58592206", "text": "public function display() \n\t{\n\t\t\n\t\tparent::display(); \n\t}", "title": "" }, { "docid": "f0ce504b8c6c28b59b1b83da05a1e7ee", "score": "0.58354145", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/png');\n\t\theader('Content-disposition: inline');\n\t\timagepng($imageResource, null, 0);\n\t}", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "bcb7bd8aa9f807e36423f26674169bf6", "score": "0.5785241", "text": "public static function resource($resource, $controller, $options) {\n \n }", "title": "" }, { "docid": "06a412168984820a16a8be534a2d85f1", "score": "0.57841134", "text": "public function display()\n\t{\n\t\theader('Content-type: image/png');\n\t\timagepng($this->_imageResource , null , 5 );\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "2543e47f21a6d16ac7911a7ed2e24588", "score": "0.5771402", "text": "public function showAction()\n {\n //loads the artist\n $artist = $this->_getArtistById($this->_getParam('id'));\n \n //sends it to the view\n $this->view->artist = $artist;\n \n //loads and sends its albums to the view\n $this->view->albums = $artist->findDependentRowset('Model_Album');\n }", "title": "" }, { "docid": "a1ebeebfc498c76d0c8996e04e37ac78", "score": "0.5764601", "text": "public function show(){\n $this->init();\n $this->load(self::class);\n }", "title": "" }, { "docid": "41311b65a90295f931830bf21bc118c5", "score": "0.57608664", "text": "public function DisplayResources($resource_IDs) {\n \n //Variables for the pagination\n $limit_offset = $this->CPagination->limit_offset;\n $limit_maxNumRows = $this->CPagination->limit_maxNumRows;\n \n //Get resources\n $result = $this->MDatabase->GetResources((int) $limit_offset, (int) $limit_maxNumRows, $resource_IDs);\n \n //If nothing is returned, say so and end here\n if(!$result) {\n echo 'No results.';\n return;\n }\n \n //Initiate the variable that will contain all the output\n $output = '';\n \n //Display the resources one by one\n while($row = $result->fetch_array()) {\n $output .= '<div class=\"resource\">';\n \n $title = htmlspecialchars($row['title']);\n $resource_type = htmlspecialchars($row['resource_type']);\n $description = htmlspecialchars($row['description']);\n $publishing_date = htmlspecialchars($row['publishing_date']);\n \n $output .= \"<h3>\" . $title . \"</h3>\";\n $output .= \"<table class='resource_info'><tbody>\";\n $output .= \"<tr>Type: \" . ucwords(strtolower($resource_type)) . '</tr>';\n $output .= ' <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"#\" class=\"tooltip\">'\n . '<img src=\"img/information-icon-small.png\">'\n . '<span><img class=\"callout\" src=\"img/callout_black.gif\" />'\n . '<strong>Description</strong><br />' . $this->Parsedown->text($description)\n . '</span></a></tr>';\n \n /* Get and display the URLs */\n $output .= $this->DisplayURLs((int) $row['resource_id']); \n \n //Clear the float\n $output .= '<div class=\"clear\"></div>';\n \n /* Display the publishing date, if it exists */\n $output .= $publishing_date ? \"<tr>Publishing Date: {$publishing_date}</tr>\" : '';\n \n /* Get and display the authors */\n $output .= $this->DisplayAuthors((int) $row['resource_id']);\n\n /* Get and display the keywords */\n $output .= $this->DisplayKeywords((int) $row['resource_id']);\n \n $output .= '</div>'; //close the class=\"resource\" div\n }\n \n echo $output;\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "e9b2cd8fa004ddb7b0d9e03744f3126f", "score": "0.57506883", "text": "public function display()\n {\n $return = $this->fetch();\n echo $return;\n }", "title": "" }, { "docid": "2c3490c6d6b2073fd195968f652e07c5", "score": "0.57488596", "text": "public function render()\n {\n $rows = $this->resource->model()::all();\n\n $title = Str::of($this->resource->name())->plural();\n\n return view('moon::resources.index', [\n 'title' => $title,\n 'columns' => $this->resource->columns(),\n 'rows' => $rows\n ])->layout('moon::layouts.app', ['title' => $title]);\n }", "title": "" }, { "docid": "b817fe8afcad697af904cbcdb8688cef", "score": "0.57483834", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AVBundle:Reto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AVBundle:Reto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c0a70a08a2849ac13def6ed6304e58da", "score": "0.5743798", "text": "public function show(): UserResource\n {\n return $this->repository->show();\n }", "title": "" }, { "docid": "c952768f11b98a6aed12e59d779b7efa", "score": "0.57387173", "text": "public function display() { echo $this->render(); }", "title": "" }, { "docid": "9aee1654836904270de00365634a70fd", "score": "0.57323885", "text": "protected function show($param) {\n $method = 'show_' . $param;\n if (method_exists($this, $method)) {\n $this->$method();\n } else {\n $this->error('Invalid command argument!');\n $this->help();\n }\n }", "title": "" }, { "docid": "c7ce15d35acae8f764d0adba3a337cb0", "score": "0.57273036", "text": "public function display($file) \n {\n echo $this->fetch($file); \n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7fa9265465a0729600bbbce97f9e8303", "score": "0.57220465", "text": "function render(Request $Req, Response $Res, $resource);", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "3635f9e6312e7f3ef2e689432f8a3312", "score": "0.5705637", "text": "public function show( Patient $patient ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "a042815ce2283cc6c3688042abe87a56", "score": "0.56963277", "text": "public function show($id)\n\t{\n\t\t//\n \n \n\t}", "title": "" }, { "docid": "5bc1d8742885bcbc1dc675e2bcd69dd2", "score": "0.56894034", "text": "public function display(midgardmvc_core_request $request);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]